diff --git a/dist/pnp.d.ts b/dist/pnp.d.ts new file mode 100644 index 00000000..63e98369 --- /dev/null +++ b/dist/pnp.d.ts @@ -0,0 +1,4700 @@ +/// +declare module "collections/collections" { + /** + * Interface defining an object with a known property type + */ + export interface TypedHash { + [key: string]: T; + } + /** + * Generic dictionary + */ + export class Dictionary { + private keys; + private values; + /** + * Creates a new instance of the Dictionary class + * + * @constructor + */ + constructor(keys?: string[], values?: T[]); + /** + * Gets a value from the collection using the specified key + * + * @param key The key whose value we want to return, returns null if the key does not exist + */ + get(key: string): T; + /** + * Adds the supplied key and value to the dictionary + * + * @param key The key to add + * @param o The value to add + */ + add(key: string, o: T): void; + /** + * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate. + */ + merge(source: TypedHash | Dictionary): void; + /** + * Removes a value from the dictionary + * + * @param key The key of the key/value pair to remove. Returns null if the key was not found. + */ + remove(key: string): T; + /** + * Returns all the keys currently in the dictionary as an array + */ + getKeys(): string[]; + /** + * Returns all the values currently in the dictionary as an array + */ + getValues(): T[]; + /** + * Clears the current dictionary + */ + clear(): void; + /** + * Gets a count of the items currently in the dictionary + */ + count(): number; + } +} +declare module "utils/logging" { + /** + * A set of logging levels + * + */ + export enum LogLevel { + Verbose = 0, + Info = 1, + Warning = 2, + Error = 3, + Off = 99, + } + /** + * Interface that defines a log entry + * + */ + export interface LogEntry { + /** + * The main message to be logged + */ + message: string; + /** + * The level of information this message represents + */ + level: LogLevel; + /** + * Any associated data that a given logging listener may choose to log or ignore + */ + data?: any; + } + /** + * Interface that defines a log listner + * + */ + export interface LogListener { + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + } + /** + * Class used to subscribe ILogListener and log messages throughout an application + * + */ + export class Logger { + private static _instance; + static activeLogLevel: LogLevel; + private static readonly instance; + /** + * Adds ILogListener instances to the set of subscribed listeners + * + * @param listeners One or more listeners to subscribe to this log + */ + static subscribe(...listeners: LogListener[]): void; + /** + * Clears the subscribers collection, returning the collection before modifiction + */ + static clearSubscribers(): LogListener[]; + /** + * Gets the current subscriber count + */ + static readonly count: number; + /** + * Writes the supplied string to the subscribed listeners + * + * @param message The message to write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + static write(message: string, level?: LogLevel): void; + /** + * Writes the supplied string to the subscribed listeners + * + * @param json The json object to stringify and write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + static writeJSON(json: any, level?: LogLevel): void; + /** + * Logs the supplied entry to the subscribed listeners + * + * @param entry The message to log + */ + static log(entry: LogEntry): void; + /** + * Logs performance tracking data for the the execution duration of the supplied function using console.profile + * + * @param name The name of this profile boundary + * @param f The function to execute and track within this performance boundary + */ + static measure(name: string, f: () => T): T; + } + /** + * Implementation of ILogListener which logs to the browser console + * + */ + export class ConsoleListener implements LogListener { + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + /** + * Formats the message + * + * @param entry The information to format into a string + */ + private format(entry); + } + /** + * Implementation of ILogListener which logs to the supplied function + * + */ + export class FunctionListener implements LogListener { + private method; + /** + * Creates a new instance of the FunctionListener class + * + * @constructor + * @param method The method to which any logging data will be passed + */ + constructor(method: (entry: LogEntry) => void); + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + } +} +declare module "utils/decorators" { + export function deprecated(message: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; +} +declare module "utils/storage" { + /** + * A wrapper class to provide a consistent interface to browser based storage + * + */ + export class PnPClientStorageWrapper implements PnPClientStore { + private store; + defaultTimeoutMinutes: number; + /** + * True if the wrapped storage is available; otherwise, false + */ + enabled: boolean; + /** + * Creates a new instance of the PnPClientStorageWrapper class + * + * @constructor + */ + constructor(store: Storage, defaultTimeoutMinutes?: number); + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + get(key: string): T; + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + put(key: string, o: any, expire?: Date): void; + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + delete(key: string): void; + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + getOrPut(key: string, getter: () => Promise, expire?: Date): Promise; + /** + * Used to determine if the wrapped storage is available currently + */ + private test(); + /** + * Creates the persistable to store + */ + private createPersistable(o, expire?); + } + /** + * Interface which defines the operations provided by a client storage object + */ + export interface PnPClientStore { + /** + * True if the wrapped storage is available; otherwise, false + */ + enabled: boolean; + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + get(key: string): any; + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + put(key: string, o: any, expire?: Date): void; + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + delete(key: string): void; + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + getOrPut(key: string, getter: Function, expire?: Date): any; + } + /** + * A class that will establish wrappers for both local and session storage + */ + export class PnPClientStorage { + /** + * Provides access to the local storage of the browser + */ + local: PnPClientStore; + /** + * Provides access to the session storage of the browser + */ + session: PnPClientStore; + /** + * Creates a new instance of the PnPClientStorage class + * + * @constructor + */ + constructor(); + } +} +declare module "sharepoint/caching" { + import { ODataParser } from "sharepoint/odata"; + import { PnPClientStore, PnPClientStorage } from "utils/storage"; + export interface ICachingOptions { + expiration?: Date; + storeName?: "session" | "local"; + key: string; + } + export class CachingOptions implements ICachingOptions { + key: string; + protected static storage: PnPClientStorage; + expiration: Date; + storeName: "session" | "local"; + constructor(key: string); + readonly store: PnPClientStore; + } + export class CachingParserWrapper implements ODataParser { + private _parser; + private _cacheOptions; + constructor(_parser: ODataParser, _cacheOptions: CachingOptions); + parse(response: Response): Promise; + } +} +declare module "utils/exceptions" { + /** + * Represents an exception with an HttpClient request + * + */ + export class ProcessHttpClientResponseException extends Error { + readonly status: number; + readonly statusText: string; + readonly data: any; + constructor(status: number, statusText: string, data: any); + } + export class NoCacheAvailableException extends Error { + constructor(msg?: string); + } + export class APIUrlException extends Error { + constructor(msg?: string); + } + export class AuthUrlException extends Error { + constructor(data: any, msg?: string); + } + export class NodeFetchClientUnsupportedException extends Error { + constructor(msg?: string); + } + export class SPRequestExecutorUndefinedException extends Error { + constructor(); + } + export class MaxCommentLengthException extends Error { + constructor(msg?: string); + } + export class NotSupportedInBatchException extends Error { + constructor(operation?: string); + } + export class ODataIdException extends Error { + constructor(data: any, msg?: string); + } + export class BatchParseException extends Error { + constructor(msg: string); + } + export class AlreadyInBatchException extends Error { + constructor(msg?: string); + } + export class FunctionExpectedException extends Error { + constructor(msg?: string); + } + export class UrlException extends Error { + constructor(msg: string); + } +} +declare module "sharepoint/queryablerequest" { + import { ODataParser, ODataBatch } from "sharepoint/odata"; + import { ICachingOptions } from "sharepoint/caching"; + import { FetchOptions } from "net/httpclient"; + /** + * Defines the context for a given request to be processed in the pipeline + */ + export interface RequestContext { + batch: ODataBatch; + batchDependency: () => void; + cachingOptions: ICachingOptions; + isBatched: boolean; + isCached: boolean; + requestAbsoluteUrl: string; + verb: string; + options: FetchOptions; + parser: ODataParser; + hasResult?: boolean; + result?: T; + requestId: string; + } + /** + * Processes a given context through the request pipeline + * + * @param context The request context we are processing + */ + export function pipe(context: RequestContext): Promise; +} +declare module "sharepoint/queryable" { + import { Dictionary } from "collections/collections"; + import { FetchOptions } from "net/httpclient"; + import { ODataParser, ODataBatch } from "sharepoint/odata"; + import { ICachingOptions } from "sharepoint/caching"; + export interface QueryableConstructor { + new (baseUrl: string | Queryable, path?: string): T; + } + /** + * Queryable Base Class + * + */ + export class Queryable { + /** + * Tracks the query parts of the url + */ + protected _query: Dictionary; + /** + * Tracks the batch of which this query may be part + */ + private _batch; + /** + * Tracks the url as it is built + */ + private _url; + /** + * Stores the parent url used to create this instance, for recursing back up the tree if needed + */ + private _parentUrl; + /** + * Explicitly tracks if we are using caching for this request + */ + private _useCaching; + /** + * Any options that were supplied when caching was enabled + */ + private _cachingOptions; + /** + * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * + * @param pathPart The string to concatonate to the url + */ + concat(pathPart: string): void; + /** + * Appends the given string and normalizes "/" chars + * + * @param pathPart The string to append + */ + protected append(pathPart: string): void; + /** + * Blocks a batch call from occuring, MUST be cleared by calling the returned function + */ + protected addBatchDependency(): () => void; + /** + * Indicates if the current query has a batch associated + * + */ + protected readonly hasBatch: boolean; + /** + * Gets the parent url used when creating this instance + * + */ + protected readonly parentUrl: string; + /** + * Provides access to the query builder for this url + * + */ + readonly query: Dictionary; + /** + * Creates a new instance of the Queryable class + * + * @constructor + * @param baseUrl A string or Queryable that should form the base part of the url + * + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Adds this query to the supplied batch + * + * @example + * ``` + * + * let b = pnp.sp.createBatch(); + * pnp.sp.web.inBatch(b).get().then(...); + * b.execute().then(...) + * ``` + */ + inBatch(batch: ODataBatch): this; + /** + * Enables caching for this request + * + * @param options Defines the options used when caching this request + */ + usingCaching(options?: ICachingOptions): this; + /** + * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object + * + */ + toUrl(): string; + /** + * Gets the full url with query information + * + */ + toUrlAndQuery(): string; + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + protected getParent(factory: QueryableConstructor, baseUrl?: string | Queryable, path?: string): T; + /** + * Executes the currently built request + * + * @param parser Allows you to specify a parser to handle the result + * @param getOptions The options used for this request + */ + get(parser?: ODataParser, getOptions?: FetchOptions): Promise; + getAs(parser?: ODataParser, getOptions?: FetchOptions): Promise; + protected post(postOptions?: FetchOptions, parser?: ODataParser): Promise; + protected postAs(postOptions?: FetchOptions, parser?: ODataParser): Promise; + protected patch(patchOptions?: FetchOptions, parser?: ODataParser): Promise; + protected delete(deleteOptions?: FetchOptions, parser?: ODataParser): Promise; + private toRequestContext(verb, options, parser); + } + /** + * Represents a REST collection which can be filtered, paged, and selected + * + */ + export class QueryableCollection extends Queryable { + /** + * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported) + * + * @param filter The string representing the filter query + */ + filter(filter: string): this; + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + orderBy(orderBy: string, ascending?: boolean): this; + /** + * Skips the specified number of items + * + * @param skip The number of items to skip + */ + skip(skip: number): this; + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + top(top: number): this; + } + /** + * Represents an instance that can be selected + * + */ + export class QueryableInstance extends Queryable { + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + } +} +declare module "sharepoint/odata" { + import { QueryableConstructor } from "sharepoint/queryable"; + export function extractOdataId(candidate: any): string; + export interface ODataParser { + parse(r: Response): Promise; + } + export abstract class ODataParserBase implements ODataParser { + parse(r: Response): Promise; + protected handleError(r: Response, reject: (reason?: any) => void): boolean; + protected parseODataJSON(json: any): U; + } + export class ODataDefaultParser extends ODataParserBase { + } + export class ODataRawParserImpl implements ODataParser { + parse(r: Response): Promise; + } + export let ODataRaw: ODataRawParserImpl; + export function ODataValue(): ODataParser; + export function ODataEntity(factory: QueryableConstructor): ODataParser; + export function ODataEntityArray(factory: QueryableConstructor): ODataParser; + /** + * Manages a batch of OData operations + */ + export class ODataBatch { + private baseUrl; + private _batchId; + private _batchDependencies; + private _requests; + constructor(baseUrl: string, _batchId?: string); + /** + * Adds a request to a batch (not designed for public use) + * + * @param url The full url of the request + * @param method The http method GET, POST, etc + * @param options Any options to include in the request + * @param parser The parser that will hadle the results of the request + */ + add(url: string, method: string, options: any, parser: ODataParser): Promise; + /** + * Adds a dependency insuring that some set of actions will occur before a batch is processed. + * MUST be cleared using the returned resolve delegate to allow batches to run + */ + addBatchDependency(): () => void; + /** + * Execute the current batch and resolve the associated promises + * + * @returns A promise which will be resolved once all of the batch's child promises have resolved + */ + execute(): Promise; + private executeImpl(); + /** + * Parses the response from a batch request into an array of Response instances + * + * @param body Text body of the response from the batch request + */ + private _parseResponse(body); + } + export class TextFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class BlobFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class JSONFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class BufferFileParser implements ODataParser { + parse(r: any): Promise; + } +} +declare module "net/digestcache" { + import { Dictionary } from "collections/collections"; + import { HttpClient } from "net/httpclient"; + export class CachedDigest { + expiration: Date; + value: string; + } + export class DigestCache { + private _httpClient; + private _digests; + constructor(_httpClient: HttpClient, _digests?: Dictionary); + getDigest(webUrl: string): Promise; + clear(): void; + } +} +declare module "net/httpclient" { + export interface FetchOptions { + method?: string; + headers?: string[][] | { + [key: string]: string; + }; + body?: BodyInit; + mode?: string | RequestMode; + credentials?: string | RequestCredentials; + cache?: string | RequestCache; + } + export class HttpClient { + private _digestCache; + private _impl; + constructor(); + fetch(url: string, options?: FetchOptions): Promise; + fetchRaw(url: string, options?: FetchOptions): Promise; + get(url: string, options?: FetchOptions): Promise; + post(url: string, options?: FetchOptions): Promise; + patch(url: string, options?: FetchOptions): Promise; + delete(url: string, options?: FetchOptions): Promise; + private mergeHeaders(target, source); + } + export interface HttpClientImpl { + fetch(url: string, options: FetchOptions): Promise; + } +} +declare module "net/fetchclient" { + import { HttpClientImpl } from "net/httpclient"; + /** + * Makes requests using the fetch API + */ + export class FetchClient implements HttpClientImpl { + fetch(url: string, options: any): Promise; + } +} +declare module "configuration/pnplibconfig" { + import { TypedHash } from "collections/collections"; + import { HttpClientImpl } from "net/httpclient"; + export interface LibraryConfiguration { + /** + * Any headers to apply to all requests + */ + headers?: TypedHash; + /** + * Allows caching to be global disabled, default: false + */ + globalCacheDisable?: boolean; + /** + * Defines the default store used by the usingCaching method, default: session + */ + defaultCachingStore?: "session" | "local"; + /** + * Defines the default timeout in seconds used by the usingCaching method, default 30 + */ + defaultCachingTimeoutSeconds?: number; + /** + * Defines a factory method used to create fetch clients + */ + fetchClientFactory?: () => HttpClientImpl; + /** + * The base url used for all requests + */ + baseUrl?: string; + /** + * Used to supply the current context from an SPFx webpart to the library + */ + spfxContext?: any; + } + export class RuntimeConfigImpl { + private _headers; + private _defaultCachingStore; + private _defaultCachingTimeoutSeconds; + private _globalCacheDisable; + private _fetchClientFactory; + private _baseUrl; + private _spfxContext; + constructor(); + set(config: LibraryConfiguration): void; + readonly headers: TypedHash; + readonly defaultCachingStore: "session" | "local"; + readonly defaultCachingTimeoutSeconds: number; + readonly globalCacheDisable: boolean; + readonly fetchClientFactory: () => HttpClientImpl; + readonly baseUrl: string; + } + export let RuntimeConfig: RuntimeConfigImpl; + export function setRuntimeConfig(config: LibraryConfiguration): void; +} +declare module "utils/util" { + import { TypedHash } from "collections/collections"; + export class Util { + /** + * Gets a callback function which will maintain context across async calls. + * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...) + * + * @param context The object that will be the 'this' value in the callback + * @param method The method to which we will apply the context and parameters + * @param params Optional, additional arguments to supply to the wrapped method when it is invoked + */ + static getCtxCallback(context: any, method: Function, ...params: any[]): Function; + /** + * Tests if a url param exists + * + * @param name The name of the url paramter to check + */ + static urlParamExists(name: string): boolean; + /** + * Gets a url param value by name + * + * @param name The name of the paramter for which we want the value + */ + static getUrlParamByName(name: string): string; + /** + * Gets a url param by name and attempts to parse a bool value + * + * @param name The name of the paramter for which we want the boolean value + */ + static getUrlParamBoolByName(name: string): boolean; + /** + * Inserts the string s into the string target as the index specified by index + * + * @param target The string into which we will insert s + * @param index The location in target to insert s (zero based) + * @param s The string to insert into target at position index + */ + static stringInsert(target: string, index: number, s: string): string; + /** + * Adds a value to a date + * + * @param date The date to which we will add units, done in local time + * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'] + * @param units The amount to add to date of the given interval + * + * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object + */ + static dateAdd(date: Date, interval: string, units: number): Date; + /** + * Loads a stylesheet into the current page + * + * @param path The url to the stylesheet + * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues + */ + static loadStylesheet(path: string, avoidCache: boolean): void; + /** + * Combines an arbitrary set of paths ensuring that the slashes are normalized + * + * @param paths 0 to n path parts to combine + */ + static combinePaths(...paths: string[]): string; + /** + * Gets a random string of chars length + * + * @param chars The length of the random string to generate + */ + static getRandomString(chars: number): string; + /** + * Gets a random GUID value + * + * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + */ + static getGUID(): string; + /** + * Determines if a given value is a function + * + * @param candidateFunction The thing to test for being a function + */ + static isFunction(candidateFunction: any): boolean; + /** + * @returns whether the provided parameter is a JavaScript Array or not. + */ + static isArray(array: any): boolean; + /** + * Determines if a string is null or empty or undefined + * + * @param s The string to test + */ + static stringIsNullOrEmpty(s: string): boolean; + /** + * Provides functionality to extend the given object by doing a shallow copy + * + * @param target The object to which properties will be copied + * @param source The source object from which properties will be copied + * @param noOverwrite If true existing properties on the target are not overwritten from the source + * + */ + static extend(target: any, source: TypedHash, noOverwrite?: boolean): any; + /** + * Determines if a given url is absolute + * + * @param url The url to check to see if it is absolute + */ + static isUrlAbsolute(url: string): boolean; + /** + * Attempts to make the supplied relative url absolute based on the _spPageContextInfo object, if available + * + * @param url The relative url to make absolute + */ + static makeUrlAbsolute(url: string): string; + /** + * Ensures that a given url is absolute for the current web based on context + * + * @param candidateUrl The url to make absolute + * + */ + static toAbsoluteUrl(candidateUrl: string): Promise; + } +} +declare module "configuration/configuration" { + import { TypedHash } from "collections/collections"; + /** + * Interface for configuration providers + * + */ + export interface IConfigurationProvider { + /** + * Gets the configuration from the provider + */ + getConfiguration(): Promise>; + } + /** + * Class used to manage the current application settings + * + */ + export class Settings { + /** + * The settings currently stored in this instance + */ + private _settings; + /** + * Creates a new instance of the settings class + * + * @constructor + */ + constructor(); + /** + * Adds a new single setting, or overwrites a previous setting with the same key + * + * @param {string} key The key used to store this setting + * @param {string} value The setting value to store + */ + add(key: string, value: string): void; + /** + * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read + * + * @param {string} key The key used to store this setting + * @param {any} value The setting value to store + */ + addJSON(key: string, value: any): void; + /** + * Applies the supplied hash to the setting collection overwriting any existing value, or created new values + * + * @param {TypedHash} hash The set of values to add + */ + apply(hash: TypedHash): Promise; + /** + * Loads configuration settings into the collection from the supplied provider and returns a Promise + * + * @param {IConfigurationProvider} provider The provider from which we will load the settings + */ + load(provider: IConfigurationProvider): Promise; + /** + * Gets a value from the configuration + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {string} string value from the configuration + */ + get(key: string): string; + /** + * Gets a JSON value, rehydrating the stored string to the original object + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {any} object from the configuration + */ + getJSON(key: string): any; + } +} +declare module "sharepoint/search" { + import { Queryable, QueryableInstance } from "sharepoint/queryable"; + /** + * Describes the SearchQuery interface + */ + export interface SearchQuery { + /** + * A string that contains the text for the search query. + */ + Querytext: string; + /** + * A string that contains the text that replaces the query text, as part of a query transform. + */ + QueryTemplate?: string; + /** + * A Boolean value that specifies whether the result tables that are returned for + * the result block are mixed with the result tables that are returned for the original query. + */ + EnableInterleaving?: boolean; + /** + * A Boolean value that specifies whether stemming is enabled. + */ + EnableStemming?: boolean; + /** + * A Boolean value that specifies whether duplicate items are removed from the results. + */ + TrimDuplicates?: boolean; + /** + * A Boolean value that specifies whether the exact terms in the search query are used to find matches, or if nicknames are used also. + */ + EnableNicknames?: boolean; + /** + * A Boolean value that specifies whether the query uses the FAST Query Language (FQL). + */ + EnableFql?: boolean; + /** + * A Boolean value that specifies whether the phonetic forms of the query terms are used to find matches. + */ + EnablePhonetic?: boolean; + /** + * A Boolean value that specifies whether to perform result type processing for the query. + */ + BypassResultTypes?: boolean; + /** + * A Boolean value that specifies whether to return best bet results for the query. + * This parameter is used only when EnableQueryRules is set to true, otherwise it is ignored. + */ + ProcessBestBets?: boolean; + /** + * A Boolean value that specifies whether to enable query rules for the query. + */ + EnableQueryRules?: boolean; + /** + * A Boolean value that specifies whether to sort search results. + */ + EnableSorting?: boolean; + /** + * Specifies whether to return block rank log information in the BlockRankLog property of the interleaved result table. + * A block rank log contains the textual information on the block score and the documents that were de-duplicated. + */ + GenerateBlockRankLog?: boolean; + /** + * The result source ID to use for executing the search query. + */ + SourceId?: string; + /** + * The ID of the ranking model to use for the query. + */ + RankingModelId?: string; + /** + * The first row that is included in the search results that are returned. + * You use this parameter when you want to implement paging for search results. + */ + StartRow?: number; + /** + * The maximum number of rows overall that are returned in the search results. + * Compared to RowsPerPage, RowLimit is the maximum number of rows returned overall. + */ + RowLimit?: number; + /** + * The maximum number of rows to return per page. + * Compared to RowLimit, RowsPerPage refers to the maximum number of rows to return per page, + * and is used primarily when you want to implement paging for search results. + */ + RowsPerPage?: number; + /** + * The managed properties to return in the search results. + */ + SelectProperties?: string[]; + /** + * The locale ID (LCID) for the query. + */ + Culture?: number; + /** + * The set of refinement filters used when issuing a refinement query (FQL) + */ + RefinementFilters?: string[]; + /** + * The set of refiners to return in a search result. + */ + Refiners?: string; + /** + * The additional query terms to append to the query. + */ + HiddenConstraints?: string; + /** + * The list of properties by which the search results are ordered. + */ + SortList?: Sort[]; + /** + * The amount of time in milliseconds before the query request times out. + */ + Timeout?: number; + /** + * The properties to highlight in the search result summary when the property value matches the search terms entered by the user. + */ + HithighlightedProperties?: string[]; + /** + * The type of the client that issued the query. + */ + ClientType?: string; + /** + * The GUID for the user who submitted the search query. + */ + PersonalizationData?: string; + /** + * The URL for the search results page. + */ + ResultsURL?: string; + /** + * Custom tags that identify the query. You can specify multiple query tags + */ + QueryTag?: string[]; + /** + * Properties to be used to configure the search query + */ + Properties?: SearchProperty[]; + /** + * A Boolean value that specifies whether to return personal favorites with the search results. + */ + ProcessPersonalFavorites?: boolean; + /** + * The location of the queryparametertemplate.xml file. This file is used to enable anonymous users to make Search REST queries. + */ + QueryTemplatePropertiesUrl?: string; + /** + * Special rules for reordering search results. + * These rules can specify that documents matching certain conditions are ranked higher or lower in the results. + * This property applies only when search results are sorted based on rank. + */ + ReorderingRules?: ReorderingRule[]; + /** + * The number of properties to show hit highlighting for in the search results. + */ + HitHighlightedMultivaluePropertyLimit?: number; + /** + * A Boolean value that specifies whether the hit highlighted properties can be ordered. + */ + EnableOrderingHitHighlightedProperty?: boolean; + /** + * The managed properties that are used to determine how to collapse individual search results. + * Results are collapsed into one or a specified number of results if they match any of the individual collapse specifications. + * In a collapse specification, results are collapsed if their properties match all individual properties in the collapse specification. + */ + CollapseSpecification?: string; + /** + * The locale identifier (LCID) of the user interface + */ + UIlanguage?: number; + /** + * The preferred number of characters to display in the hit-highlighted summary generated for a search result. + */ + DesiredSnippetLength?: number; + /** + * The maximum number of characters to display in the hit-highlighted summary generated for a search result. + */ + MaxSnippetLength?: number; + /** + * The number of characters to display in the result summary for a search result. + */ + SummaryLength?: number; + } + /** + * Describes the search API + * + */ + export class Search extends QueryableInstance { + /** + * Creates a new instance of the Search class + * + * @param baseUrl The url for the search context + * @param query The SearchQuery object to execute + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * ....... + * @returns Promise + */ + execute(query: SearchQuery): Promise; + } + /** + * Describes the SearchResults class, which returns the formatted and raw version of the query response + */ + export class SearchResults { + PrimarySearchResults: any; + RawSearchResults: any; + RowCount: number; + TotalRows: number; + TotalRowsIncludingDuplicates: number; + ElapsedTime: number; + /** + * Creates a new instance of the SearchResult class + * + */ + constructor(rawResponse: any); + /** + * Formats a search results array + * + * @param rawResults The array to process + */ + protected formatSearchResults(rawResults: Array | any): SearchResult[]; + } + /** + * Describes the SearchResult class + */ + export class SearchResult { + /** + * Creates a new instance of the SearchResult class + * + */ + constructor(rawItem: any); + } + /** + * Defines how search results are sorted. + */ + export interface Sort { + /** + * The name for a property by which the search results are ordered. + */ + Property: string; + /** + * The direction in which search results are ordered. + */ + Direction: SortDirection; + } + /** + * Defines one search property + */ + export interface SearchProperty { + Name: string; + Value: SearchPropertyValue; + } + /** + * Defines one search property value + */ + export interface SearchPropertyValue { + StrVal: string; + QueryPropertyValueTypeIndex: QueryPropertyValueType; + } + /** + * defines the SortDirection enum + */ + export enum SortDirection { + Ascending = 0, + Descending = 1, + FQLFormula = 2, + } + /** + * Defines how ReorderingRule interface, used for reordering results + */ + export interface ReorderingRule { + /** + * The value to match on + */ + MatchValue: string; + /** + * The rank boosting + */ + Boost: number; + /** + * The rank boosting + */ + MatchType: ReorderingRuleMatchType; + } + /** + * defines the ReorderingRuleMatchType enum + */ + export enum ReorderingRuleMatchType { + ResultContainsKeyword = 0, + TitleContainsKeyword = 1, + TitleMatchesKeyword = 2, + UrlStartsWith = 3, + UrlExactlyMatches = 4, + ContentTypeIs = 5, + FileExtensionMatches = 6, + ResultHasTag = 7, + ManualCondition = 8, + } + /** + * Specifies the type value for the property + */ + export enum QueryPropertyValueType { + None = 0, + StringType = 1, + Int32TYpe = 2, + BooleanType = 3, + StringArrayType = 4, + UnSupportedType = 5, + } +} +declare module "sharepoint/searchsuggest" { + import { Queryable, QueryableInstance } from "sharepoint/queryable"; + /** + * Defines a query execute against the search/suggest endpoint (see https://msdn.microsoft.com/en-us/library/office/dn194079.aspx) + */ + export interface SearchSuggestQuery { + /** + * A string that contains the text for the search query. + */ + querytext: string; + /** + * The number of query suggestions to retrieve. Must be greater than zero (0). The default value is 5. + */ + count?: number; + /** + * The number of personal results to retrieve. Must be greater than zero (0). The default value is 5. + */ + personalCount?: number; + /** + * A Boolean value that specifies whether to retrieve pre-query or post-query suggestions. true to return pre-query suggestions; otherwise, false. The default value is false. + */ + preQuery?: boolean; + /** + * A Boolean value that specifies whether to hit-highlight or format in bold the query suggestions. true to format in bold the terms in the returned query suggestions + * that match terms in the specified query; otherwise, false. The default value is true. + */ + hitHighlighting?: boolean; + /** + * A Boolean value that specifies whether to capitalize the first letter in each term in the returned query suggestions. true to capitalize the first letter in each term; + * otherwise, false. The default value is false. + */ + capitalize?: boolean; + /** + * The locale ID (LCID) for the query (see https://msdn.microsoft.com/en-us/library/cc233982.aspx). + */ + culture?: string; + /** + * A Boolean value that specifies whether stemming is enabled. true to enable stemming; otherwise, false. The default value is true. + */ + stemming?: boolean; + /** + * A Boolean value that specifies whether to include people names in the returned query suggestions. true to include people names in the returned query suggestions; + * otherwise, false. The default value is true. + */ + includePeople?: boolean; + /** + * A Boolean value that specifies whether to turn on query rules for this query. true to turn on query rules; otherwise, false. The default value is true. + */ + queryRules?: boolean; + /** + * A Boolean value that specifies whether to return query suggestions for prefix matches. true to return query suggestions based on prefix matches, otherwise, false when + * query suggestions should match the full query word. + */ + prefixMatch?: boolean; + } + export class SearchSuggest extends QueryableInstance { + constructor(baseUrl: string | Queryable, path?: string); + execute(query: SearchSuggestQuery): Promise; + private mapQueryToQueryString(query); + } + export class SearchSuggestResult { + PeopleNames: string[]; + PersonalResults: PersonalResultSuggestion[]; + Queries: any[]; + constructor(json: any); + } + export interface PersonalResultSuggestion { + HighlightedTitle?: string; + IsBestBet?: boolean; + Title?: string; + TypeId?: string; + Url?: string; + } +} +declare module "sharepoint/siteusers" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import { SiteGroups } from "sharepoint/sitegroups"; + import { TypedHash } from "collections/collections"; + /** + * Properties that provide both a getter, and a setter. + * + */ + export interface UserUpdateResult { + user: SiteUser; + data: any; + } + /** + * Describes a collection of all site collection users + * + */ + export class SiteUsers extends QueryableCollection { + /** + * Creates a new instance of the Users class + * + * @param baseUrl The url or Queryable which forms the parent of this user collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a user from the collection by email + * + * @param email The email of the user + */ + getByEmail(email: string): SiteUser; + /** + * Gets a user from the collection by id + * + * @param id The id of the user + */ + getById(id: number): SiteUser; + /** + * Gets a user from the collection by login name + * + * @param loginName The email address of the user + */ + getByLoginName(loginName: string): SiteUser; + /** + * Removes a user from the collection by id + * + * @param id The id of the user + */ + removeById(id: number | Queryable): Promise; + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user + */ + removeByLoginName(loginName: string): Promise; + /** + * Add a user to a group + * + * @param loginName The login name of the user to add to the group + * + */ + add(loginName: string): Promise; + } + /** + * Describes a single user + * + */ + export class SiteUser extends QueryableInstance { + /** + * Creates a new instance of the User class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, passes the path to the user + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Get's the groups for this user. + * + */ + readonly groups: SiteGroups; + /** + * Updates this user instance with the supplied properties + * + * @param properties A plain object of property names and values to update for the user + */ + update(properties: TypedHash): Promise; + /** + * Delete this user + * + */ + delete(): Promise; + } + /** + * Represents the current user + */ + export class CurrentUser extends QueryableInstance { + constructor(baseUrl: string | Queryable, path?: string); + } +} +declare module "sharepoint/sitegroups" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import { SiteUsers } from "sharepoint/siteusers"; + import { TypedHash } from "collections/collections"; + /** + * Principal Type enum + * + */ + export enum PrincipalType { + None = 0, + User = 1, + DistributionList = 2, + SecurityGroup = 4, + SharePointGroup = 8, + All = 15, + } + /** + * Result from adding a group. + * + */ + export interface GroupUpdateResult { + group: SiteGroup; + data: any; + } + /** + * Results from updating a group + * + */ + export interface GroupAddResult { + group: SiteGroup; + data: any; + } + /** + * Describes a collection of site users + * + */ + export class SiteGroups extends QueryableCollection { + /** + * Creates a new instance of the SiteUsers class + * + * @param baseUrl The url or Queryable which forms the parent of this user collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Adds a new group to the site collection + * + * @param props The properties to be updated + */ + add(properties: TypedHash): Promise; + /** + * Gets a group from the collection by name + * + * @param email The name of the group + */ + getByName(groupName: string): SiteGroup; + /** + * Gets a group from the collection by id + * + * @param id The id of the group + */ + getById(id: number): SiteGroup; + /** + * Removes the group with the specified member ID from the collection. + * + * @param id The id of the group to remove + */ + removeById(id: number): Promise; + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user + */ + removeByLoginName(loginName: string): Promise; + } + /** + * Describes a single group + * + */ + export class SiteGroup extends QueryableInstance { + /** + * Creates a new instance of the Group class + * + * @param baseUrl The url or Queryable which forms the parent of this site group + * @param path Optional, passes the path to the group + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Get's the users for this group + * + */ + readonly users: SiteUsers; + /** + * Updates this group instance with the supplied properties + * + * @param properties A GroupWriteableProperties object of property names and values to update for the user + */ + update(properties: TypedHash): Promise; + } + export interface SiteGroupAddResult { + group: SiteGroup; + data: any; + } +} +declare module "sharepoint/types" { + /** + * Represents the unique sequential location of a change within the change log. + */ + export interface ChangeToken { + /** + * Gets or sets a string value that contains the serialized representation of the change token generated by the protocol server. + */ + StringValue: string; + } + /** + * Defines a query that is performed against the change log. + */ + export interface ChangeQuery { + /** + * Gets or sets a value that specifies whether add changes are included in the query. + */ + Add?: boolean; + /** + * Gets or sets a value that specifies whether changes to alerts are included in the query. + */ + Alert?: boolean; + /** + * Gets or sets a value that specifies the end date and end time for changes that are returned through the query. + */ + ChangeTokenEnd?: ChangeToken; + /** + * Gets or sets a value that specifies the start date and start time for changes that are returned through the query. + */ + ChangeTokenStart?: ChangeToken; + /** + * Gets or sets a value that specifies whether changes to content types are included in the query. + */ + ContentType?: boolean; + /** + * Gets or sets a value that specifies whether deleted objects are included in the query. + */ + DeleteObject?: boolean; + /** + * Gets or sets a value that specifies whether changes to fields are included in the query. + */ + Field?: boolean; + /** + * Gets or sets a value that specifies whether changes to files are included in the query. + */ + File?: boolean; + /** + * Gets or sets value that specifies whether changes to folders are included in the query. + */ + Folder?: boolean; + /** + * Gets or sets a value that specifies whether changes to groups are included in the query. + */ + Group?: boolean; + /** + * Gets or sets a value that specifies whether adding users to groups is included in the query. + */ + GroupMembershipAdd?: boolean; + /** + * Gets or sets a value that specifies whether deleting users from the groups is included in the query. + */ + GroupMembershipDelete?: boolean; + /** + * Gets or sets a value that specifies whether general changes to list items are included in the query. + */ + Item?: boolean; + /** + * Gets or sets a value that specifies whether changes to lists are included in the query. + */ + List?: boolean; + /** + * Gets or sets a value that specifies whether move changes are included in the query. + */ + Move?: boolean; + /** + * Gets or sets a value that specifies whether changes to the navigation structure of a site collection are included in the query. + */ + Navigation?: boolean; + /** + * Gets or sets a value that specifies whether renaming changes are included in the query. + */ + Rename?: boolean; + /** + * Gets or sets a value that specifies whether restoring items from the recycle bin or from backups is included in the query. + */ + Restore?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleAssignmentAdd?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleAssignmentDelete?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionAdd?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionDelete?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionUpdate?: boolean; + /** + * Gets or sets a value that specifies whether modifications to security policies are included in the query. + */ + SecurityPolicy?: boolean; + /** + * Gets or sets a value that specifies whether changes to site collections are included in the query. + */ + Site?: boolean; + /** + * Gets or sets a value that specifies whether updates made using the item SystemUpdate method are included in the query. + */ + SystemUpdate?: boolean; + /** + * Gets or sets a value that specifies whether update changes are included in the query. + */ + Update?: boolean; + /** + * Gets or sets a value that specifies whether changes to users are included in the query. + */ + User?: boolean; + /** + * Gets or sets a value that specifies whether changes to views are included in the query. + */ + View?: boolean; + /** + * Gets or sets a value that specifies whether changes to Web sites are included in the query. + */ + Web?: boolean; + } + /** + * Specifies a Collaborative Application Markup Language (CAML) query on a list or joined lists. + */ + export interface CamlQuery { + /** + * Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format. + */ + DatesInUtc?: boolean; + /** + * Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned. + */ + FolderServerRelativeUrl?: string; + /** + * Gets or sets a value that specifies the information required to get the next page of data for the list view. + */ + ListItemCollectionPosition?: ListItemCollectionPosition; + /** + * Gets or sets value that specifies the XML schema that defines the list view. + */ + ViewXml?: string; + } + /** + * Specifies the information required to get the next page of data for a list view. + */ + export interface ListItemCollectionPosition { + /** + * Gets or sets a value that specifies information, as name-value pairs, required to get the next page of data for a list view. + */ + PagingInfo: string; + } + /** + * Represents the input parameter of the GetListItemChangesSinceToken method. + */ + export interface ChangeLogitemQuery { + /** + * The change token for the request. + */ + ChangeToken?: string; + /** + * The XML element that defines custom filtering for the query. + */ + Contains?: string; + /** + * The records from the list to return and their return order. + */ + Query?: string; + /** + * The options for modifying the query. + */ + QueryOptions?: string; + /** + * RowLimit + */ + RowLimit?: string; + /** + * The names of the fields to include in the query result. + */ + ViewFields?: string; + /** + * The GUID of the view. + */ + ViewName?: string; + } + /** + * Determines the display mode of the given control or view + */ + export enum ControlMode { + Display = 1, + Edit = 2, + New = 3, + } + /** + * Represents properties of a list item field and its value. + */ + export interface ListItemFormUpdateValue { + /** + * The error message result after validating the value for the field. + */ + ErrorMessage?: string; + /** + * The internal name of the field. + */ + FieldName?: string; + /** + * The value of the field, in string format. + */ + FieldValue?: string; + /** + * Indicates whether there was an error result after validating the value for the field. + */ + HasException?: boolean; + } + /** + * Specifies the type of the field. + */ + export enum FieldTypes { + Invalid = 0, + Integer = 1, + Text = 2, + Note = 3, + DateTime = 4, + Counter = 5, + Choice = 6, + Lookup = 7, + Boolean = 8, + Number = 9, + Currency = 10, + URL = 11, + Computed = 12, + Threading = 13, + Guid = 14, + MultiChoice = 15, + GridChoice = 16, + Calculated = 17, + File = 18, + Attachments = 19, + User = 20, + Recurrence = 21, + CrossProjectLink = 22, + ModStat = 23, + Error = 24, + ContentTypeId = 25, + PageSeparator = 26, + ThreadIndex = 27, + WorkflowStatus = 28, + AllDayEvent = 29, + WorkflowEventType = 30, + } + export enum DateTimeFieldFormatType { + DateOnly = 0, + DateTime = 1, + } + /** + * Specifies the control settings while adding a field. + */ + export enum AddFieldOptions { + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection + */ + DefaultValue = 0, + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection. + */ + AddToDefaultContentType = 1, + /** + * Specify that a new field must not be added to any other content type + */ + AddToNoContentType = 2, + /** + * Specify that a new field that is added to the specified list must also be added to all content types in the site collection + */ + AddToAllContentTypes = 4, + /** + * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations + */ + AddFieldInternalNameHint = 8, + /** + * Specify that a new field that is added to the specified list must also be added to the default list view + */ + AddFieldToDefaultView = 16, + /** + * Specify to confirm that no other field has the same display name + */ + AddFieldCheckDisplayName = 32, + } + export interface XmlSchemaFieldCreationInformation { + Options?: AddFieldOptions; + SchemaXml: string; + } + export enum CalendarType { + Gregorian = 1, + Japan = 3, + Taiwan = 4, + Korea = 5, + Hijri = 6, + Thai = 7, + Hebrew = 8, + GregorianMEFrench = 9, + GregorianArabic = 10, + GregorianXLITEnglish = 11, + GregorianXLITFrench = 12, + KoreaJapanLunar = 14, + ChineseLunar = 15, + SakaEra = 16, + UmAlQura = 23, + } + export enum UrlFieldFormatType { + Hyperlink = 0, + Image = 1, + } + export interface BasePermissions { + Low: string; + High: string; + } + export interface FollowedContent { + FollowedDocumentsUrl: string; + FollowedSitesUrl: string; + } + export interface UserProfile { + /** + * An object containing the user's FollowedDocumentsUrl and FollowedSitesUrl. + */ + FollowedContent?: FollowedContent; + /** + * The account name of the user. (SharePoint Online only) + */ + AccountName?: string; + /** + * The display name of the user. (SharePoint Online only) + */ + DisplayName?: string; + /** + * The FirstRun flag of the user. (SharePoint Online only) + */ + O15FirstRunExperience?: number; + /** + * The personal site of the user. + */ + PersonalSite?: string; + /** + * The capabilities of the user's personal site. Represents a bitwise PersonalSiteCapabilities value: + * None = 0; Profile Value = 1; Social Value = 2; Storage Value = 4; MyTasksDashboard Value = 8; Education Value = 16; Guest Value = 32. + */ + PersonalSiteCapabilities?: number; + /** + * The error thrown when the user's personal site was first created, if any. (SharePoint Online only) + */ + PersonalSiteFirstCreationError?: string; + /** + * The date and time when the user's personal site was first created. (SharePoint Online only) + */ + PersonalSiteFirstCreationTime?: Date; + /** + * The status for the state of the personal site instantiation + */ + PersonalSiteInstantiationState?: number; + /** + * The date and time when the user's personal site was last created. (SharePoint Online only) + */ + PersonalSiteLastCreationTime?: Date; + /** + * The number of attempts made to create the user's personal site. (SharePoint Online only) + */ + PersonalSiteNumberOfRetries?: number; + /** + * Indicates whether the user's picture is imported from Exchange. + */ + PictureImportEnabled?: boolean; + /** + * The public URL of the personal site of the current user. (SharePoint Online only) + */ + PublicUrl?: string; + /** + * The URL used to create the user's personal site. + */ + UrlToCreatePersonalSite?: string; + } + export interface HashTag { + /** + * The hash tag's internal name. + */ + Name?: string; + /** + * The number of times that the hash tag is used. + */ + UseCount?: number; + } + export interface HashTagCollection { + Items: HashTag[]; + } + export interface UserIdInfo { + NameId?: string; + NameIdIssuer?: string; + } + export enum PrincipalType { + None = 0, + User = 1, + DistributionList = 2, + SecurityGroup = 4, + SharePointGroup = 8, + All = 15, + } + export interface DocumentLibraryInformation { + AbsoluteUrl?: string; + Modified?: Date; + ModifiedFriendlyDisplay?: string; + ServerRelativeUrl?: string; + Title?: string; + } + export interface ContextInfo { + FormDigestTimeoutSeconds?: number; + FormDigestValue?: number; + LibraryVersion?: string; + SiteFullUrl?: string; + SupportedSchemaVersions?: string[]; + WebFullUrl?: string; + } + export interface RenderListData { + Row: any[]; + FirstRow: number; + FolderPermissions: string; + LastRow: number; + FilterLink: string; + ForceNoHierarchy: string; + HierarchyHasIndention: string; + } + export enum PageType { + Invalid = -1, + DefaultView = 0, + NormalView = 1, + DialogView = 2, + View = 3, + DisplayForm = 4, + DisplayFormDialog = 5, + EditForm = 6, + EditFormDialog = 7, + NewForm = 8, + NewFormDialog = 9, + SolutionForm = 10, + PAGE_MAXITEMS = 11, + } + export interface ListFormData { + ContentType?: string; + Title?: string; + Author?: string; + Editor?: string; + Created?: Date; + Modified: Date; + Attachments?: any; + ListSchema?: any; + FormControlMode?: number; + FieldControlModes?: { + Title?: number; + Author?: number; + Editor?: number; + Created?: number; + Modified?: number; + Attachments?: number; + }; + WebAttributes?: { + WebUrl?: string; + EffectivePresenceEnabled?: boolean; + AllowScriptableWebParts?: boolean; + PermissionCustomizePages?: boolean; + LCID?: number; + CurrentUserId?: number; + }; + ItemAttributes?: { + Id?: number; + FsObjType?: number; + ExternalListItem?: boolean; + Url?: string; + EffectiveBasePermissionsLow?: number; + EffectiveBasePermissionsHigh?: number; + }; + ListAttributes?: { + Id?: string; + BaseType?: number; + Direction?: string; + ListTemplateType?: number; + DefaultItemOpen?: number; + EnableVersioning?: boolean; + }; + CSRCustomLayout?: boolean; + PostBackRequired?: boolean; + PreviousPostBackHandled?: boolean; + UploadMode?: boolean; + SubmitButtonID?: string; + ItemContentTypeName?: string; + ItemContentTypeId?: string; + JSLinks?: string; + } +} +declare module "sharepoint/roles" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import { SiteGroups } from "sharepoint/sitegroups"; + import { BasePermissions } from "sharepoint/types"; + import { TypedHash } from "collections/collections"; + /** + * Describes a set of role assignments for the current scope + * + */ + export class RoleAssignments extends QueryableCollection { + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Adds a new role assignment with the specified principal and role definitions to the collection. + * + * @param principalId The ID of the user or group to assign permissions to + * @param roleDefId The ID of the role definition that defines the permissions to assign + * + */ + add(principalId: number, roleDefId: number): Promise; + /** + * Removes the role assignment with the specified principal and role definition from the collection + * + * @param principalId The ID of the user or group in the role assignment. + * @param roleDefId The ID of the role definition in the role assignment + * + */ + remove(principalId: number, roleDefId: number): Promise; + /** + * Gets the role assignment associated with the specified principal ID from the collection. + * + * @param id The id of the role assignment + */ + getById(id: number): RoleAssignment; + } + export class RoleAssignment extends QueryableInstance { + /** + * Creates a new instance of the RoleAssignment class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + readonly groups: SiteGroups; + /** + * Get the role definition bindings for this role assignment + * + */ + readonly bindings: RoleDefinitionBindings; + /** + * Delete this role assignment + * + */ + delete(): Promise; + } + export class RoleDefinitions extends QueryableCollection { + /** + * Creates a new instance of the RoleDefinitions class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path + * + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the role definition with the specified ID from the collection. + * + * @param id The ID of the role definition. + * + */ + getById(id: number): RoleDefinition; + /** + * Gets the role definition with the specified name. + * + * @param name The name of the role definition. + * + */ + getByName(name: string): RoleDefinition; + /** + * Gets the role definition with the specified type. + * + * @param name The name of the role definition. + * + */ + getByType(roleTypeKind: number): RoleDefinition; + /** + * Create a role definition + * + * @param name The new role definition's name + * @param description The new role definition's description + * @param order The order in which the role definition appears + * @param basePermissions The permissions mask for this role definition + * + */ + add(name: string, description: string, order: number, basePermissions: BasePermissions): Promise; + } + export class RoleDefinition extends QueryableInstance { + constructor(baseUrl: string | Queryable, path?: string); + /** + * Updates this web intance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + update(properties: TypedHash): Promise; + /** + * Delete this role definition + * + */ + delete(): Promise; + } + export interface RoleDefinitionUpdateResult { + definition: RoleDefinition; + data: any; + } + export interface RoleDefinitionAddResult { + definition: RoleDefinition; + data: any; + } + export class RoleDefinitionBindings extends QueryableCollection { + constructor(baseUrl: string | Queryable, path?: string); + } +} +declare module "sharepoint/queryablesecurable" { + import { RoleAssignments } from "sharepoint/roles"; + import { Queryable, QueryableInstance } from "sharepoint/queryable"; + export class QueryableSecurable extends QueryableInstance { + /** + * Gets the set of role assignments for this item + * + */ + readonly roleAssignments: RoleAssignments; + /** + * Gets the closest securable up the security hierarchy whose permissions are applied to this list item + * + */ + readonly firstUniqueAncestorSecurableObject: QueryableInstance; + /** + * Gets the effective permissions for the user supplied + * + * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com) + */ + getUserEffectivePermissions(loginName: string): Queryable; + /** + * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes + * + * @param copyRoleAssignments If true the permissions are copied from the current parent scope + * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object + */ + breakRoleInheritance(copyRoleAssignments?: boolean, clearSubscopes?: boolean): Promise; + /** + * Removes the local role assignments so that it re-inherit role assignments from the parent object. + * + */ + resetRoleInheritance(): Promise; + } +} +declare module "sharepoint/webparts" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + export class LimitedWebPartManager extends Queryable { + /** + * Creates a new instance of the LimitedWebPartManager class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the set of web part definitions contained by this web part manager + * + */ + readonly webparts: WebPartDefinitions; + /** + * Exports a webpart definition + * + * @param id the GUID id of the definition to export + */ + export(id: string): Promise; + /** + * Imports a webpart + * + * @param xml webpart definition which must be valid XML in the .dwp or .webpart format + */ + import(xml: string): Promise; + } + export class WebPartDefinitions extends QueryableCollection { + /** + * Creates a new instance of the WebPartDefinitions class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a web part definition from the collection by id + * + * @param id GUID id of the web part definition to get + */ + getById(id: string): WebPartDefinition; + } + export class WebPartDefinition extends QueryableInstance { + /** + * Creates a new instance of the WebPartDefinition class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the webpart information associated with this definition + */ + readonly webpart: WebPart; + /** + * Removes a webpart from a page, all settings will be lost + */ + delete(): Promise; + } + export class WebPart extends QueryableInstance { + /** + * Creates a new instance of the WebPart class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + } +} +declare module "sharepoint/files" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + import { LimitedWebPartManager } from "sharepoint/webparts"; + export interface ChunkedFileUploadProgressData { + stage: "starting" | "continue" | "finishing"; + blockNumber: number; + totalBlocks: number; + chunkSize: number; + currentPointer: number; + fileSize: number; + } + /** + * Describes a collection of File objects + * + */ + export class Files extends QueryableCollection { + /** + * Creates a new instance of the Files class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a File by filename + * + * @param name The name of the file, including extension. + */ + getByName(name: string): File; + /** + * Uploads a file. + * + * @param url The folder-relative url of the file. + * @param content The file contents blob. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @returns The new File and the raw response. + */ + add(url: string, content: Blob, shouldOverWrite?: boolean): Promise; + /** + * Uploads a file. + * + * @param url The folder-relative url of the file. + * @param content The Blob file content to add + * @param progress A callback function which can be used to track the progress of the upload + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + * @returns The new File and the raw response. + */ + addChunked(url: string, content: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, shouldOverWrite?: boolean, chunkSize?: number): Promise; + /** + * Adds a ghosted file to an existing list or document library. + * + * @param fileUrl The server-relative url where you want to save the file. + * @param templateFileType The type of use to create the file. + * @returns The template file that was added and the raw response. + */ + addTemplateFile(fileUrl: string, templateFileType: TemplateFileType): Promise; + } + /** + * Describes a single File instance + * + */ + export class File extends QueryableInstance { + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a value that specifies the list item field values for the list item corresponding to the file. + * + */ + readonly listItemAllFields: QueryableCollection; + /** + * Gets a collection of versions + * + */ + readonly versions: Versions; + /** + * Approves the file submitted for content approval with the specified comment. + * Only documents in lists that are enabled for content approval can be approved. + * + * @param comment The comment for the approval. + */ + approve(comment: string): Promise; + /** + * Stops the chunk upload session without saving the uploaded data. + * If the file doesn’t already exist in the library, the partially uploaded file will be deleted. + * Use this in response to user action (as in a request to cancel an upload) or an error or exception. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + */ + cancelUpload(uploadId: string): Promise; + /** + * Checks the file in to a document library based on the check-in type. + * + * @param comment A comment for the check-in. Its length must be <= 1023. + * @param checkinType The check-in type for the file. + */ + checkin(comment?: string, checkinType?: CheckinType): Promise; + /** + * Checks out the file from a document library. + */ + checkout(): Promise; + /** + * Copies the file to the destination url. + * + * @param url The absolute url or server relative url of the destination file path to copy to. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? + */ + copyTo(url: string, shouldOverWrite?: boolean): Promise; + /** + * Delete this file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Denies approval for a file that was submitted for content approval. + * Only documents in lists that are enabled for content approval can be denied. + * + * @param comment The comment for the denial. + */ + deny(comment?: string): Promise; + /** + * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view. + * An exception is thrown if the file is not an ASPX page. + * + * @param scope The WebPartsPersonalizationScope view on the Web Parts page. + */ + getLimitedWebPartManager(scope?: WebPartsPersonalizationScope): LimitedWebPartManager; + /** + * Moves the file to the specified destination url. + * + * @param url The absolute url or server relative url of the destination file path to move to. + * @param moveOperations The bitwise MoveOperations value for how to move the file. + */ + moveTo(url: string, moveOperations?: MoveOperations): Promise; + /** + * Submits the file for content approval with the specified comment. + * + * @param comment The comment for the published file. Its length must be <= 1023. + */ + publish(comment?: string): Promise; + /** + * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item. + * + * @returns The GUID of the recycled file. + */ + recycle(): Promise; + /** + * Reverts an existing checkout for the file. + * + */ + undoCheckout(): Promise; + /** + * Removes the file from content approval or unpublish a major version. + * + * @param comment The comment for the unpublish operation. Its length must be <= 1023. + */ + unpublish(comment?: string): Promise; + /** + * Gets the contents of the file as text + * + */ + getText(): Promise; + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + getBlob(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getBuffer(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getJSON(): Promise; + /** + * Sets the content of a file, for large files use setContentChunked + * + * @param content The file content + * + */ + setContent(content: string | ArrayBuffer | Blob): Promise; + /** + * Sets the contents of a file using a chunked upload approach + * + * @param file The file to upload + * @param progress A callback function which can be used to track the progress of the upload + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + */ + setContentChunked(file: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, chunkSize?: number): Promise; + /** + * Starts a new chunk upload session and uploads the first fragment. + * The current file content is not changed when this method completes. + * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream. + * The upload session ends either when you use the CancelUpload method or when you successfully + * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods. + * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes, + * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + private startUpload(uploadId, fragment); + /** + * Continues the chunk upload session with an additional fragment. + * The current file content is not changed. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + private continueUpload(uploadId, fileOffset, fragment); + /** + * Uploads the last file fragment and commits the file. The current file content is changed when this method completes. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The newly uploaded file. + */ + private finishUpload(uploadId, fileOffset, fragment); + } + /** + * Describes a collection of Version objects + * + */ + export class Versions extends QueryableCollection { + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a version by id + * + * @param versionId The id of the version to retrieve + */ + getById(versionId: number): Version; + /** + * Deletes all the file version objects in the collection. + * + */ + deleteAll(): Promise; + /** + * Deletes the specified version of the file. + * + * @param versionId The ID of the file version to delete. + */ + deleteById(versionId: number): Promise; + /** + * Deletes the file version object with the specified version label. + * + * @param label The version label of the file version to delete, for example: 1.2 + */ + deleteByLabel(label: string): Promise; + /** + * Creates a new file version from the file specified by the version label. + * + * @param label The version label of the file version to restore, for example: 1.2 + */ + restoreByLabel(label: string): Promise; + } + /** + * Describes a single Version instance + * + */ + export class Version extends QueryableInstance { + /** + * Creates a new instance of the Version class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Delete a specific version of a file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + } + export enum CheckinType { + Minor = 0, + Major = 1, + Overwrite = 2, + } + export interface FileAddResult { + file: File; + data: any; + } + export enum WebPartsPersonalizationScope { + User = 0, + Shared = 1, + } + export enum MoveOperations { + Overwrite = 1, + AllowBrokenThickets = 8, + } + export enum TemplateFileType { + StandardPage = 0, + WikiPage = 1, + FormPage = 2, + } +} +declare module "sharepoint/folders" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + import { Files } from "sharepoint/files"; + /** + * Describes a collection of Folder objects + * + */ + export class Folders extends QueryableCollection { + /** + * Creates a new instance of the Folders class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a folder by folder name + * + */ + getByName(name: string): Folder; + /** + * Adds a new folder to the current folder (relative) or any folder (absolute) + * + * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute. + * @returns The new Folder and the raw response. + */ + add(url: string): Promise; + } + /** + * Describes a single Folder instance + * + */ + export class Folder extends QueryableInstance { + /** + * Creates a new instance of the Folder class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Specifies the sequence in which content types are displayed. + * + */ + readonly contentTypeOrder: QueryableCollection; + /** + * Gets this folder's files + * + */ + readonly files: Files; + /** + * Gets this folder's sub folders + * + */ + readonly folders: Folders; + /** + * Gets this folder's list item field values + * + */ + readonly listItemAllFields: QueryableCollection; + /** + * Gets the parent folder, if available + * + */ + readonly parentFolder: Folder; + /** + * Gets this folder's properties + * + */ + readonly properties: QueryableInstance; + /** + * Gets this folder's server relative url + * + */ + readonly serverRelativeUrl: Queryable; + /** + * Gets a value that specifies the content type order. + * + */ + readonly uniqueContentTypeOrder: QueryableCollection; + /** + * Delete this folder + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + } + export interface FolderAddResult { + folder: Folder; + data: any; + } +} +declare module "sharepoint/contenttypes" { + import { TypedHash } from "collections/collections"; + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + /** + * Describes a collection of content types + * + */ + export class ContentTypes extends QueryableCollection { + /** + * Creates a new instance of the ContentTypes class + * + * @param baseUrl The url or Queryable which forms the parent of this content types collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a ContentType by content type id + */ + getById(id: string): ContentType; + /** + * Adds an existing contenttype to a content type collection + * + * @param contentTypeId in the following format, for example: 0x010102 + */ + addAvailableContentType(contentTypeId: string): Promise; + /** + * Adds a new content type to the collection + * + * @param id The desired content type id for the new content type (also determines the parent content type) + * @param name The name of the content type + * @param description The description of the content type + * @param group The group in which to add the content type + * @param additionalSettings Any additional settings to provide when creating the content type + * + */ + add(id: string, name: string, description?: string, group?: string, additionalSettings?: TypedHash): Promise; + } + /** + * Describes a single ContentType instance + * + */ + export class ContentType extends QueryableInstance { + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the column (also known as field) references in the content type. + */ + readonly fieldLinks: FieldLinks; + /** + * Gets a value that specifies the collection of fields for the content type. + */ + readonly fields: QueryableCollection; + /** + * Gets the parent content type of the content type. + */ + readonly parent: ContentType; + /** + * Gets a value that specifies the collection of workflow associations for the content type. + */ + readonly workflowAssociations: QueryableCollection; + } + export interface ContentTypeAddResult { + contentType: ContentType; + data: any; + } + /** + * Represents a collection of field link instances + */ + export class FieldLinks extends QueryableCollection { + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a FieldLink by GUID id + * + * @param id The GUID id of the field link + */ + getById(id: string): FieldLink; + } + /** + * Represents a field link instance + */ + export class FieldLink extends QueryableInstance { + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + constructor(baseUrl: string | Queryable, path?: string); + } +} +declare module "sharepoint/attachmentfiles" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + /** + * Describes a collection of Item objects + * + */ + export class AttachmentFiles extends QueryableCollection { + /** + * Creates a new instance of the AttachmentFiles class + * + * @param baseUrl The url or Queryable which forms the parent of this attachments collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a Attachment File by filename + * + * @param name The name of the file, including extension. + */ + getByName(name: string): AttachmentFile; + /** + * Adds a new attachment to the collection + * + * @param name The name of the file, including extension. + * @param content The Base64 file content. + */ + add(name: string, content: string | Blob | ArrayBuffer): Promise; + } + /** + * Describes a single attachment file instance + * + */ + export class AttachmentFile extends QueryableInstance { + /** + * Creates a new instance of the AttachmentFile class + * + * @param baseUrl The url or Queryable which forms the parent of this attachment file + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the contents of the file as text + * + */ + getText(): Promise; + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + getBlob(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getBuffer(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getJSON(): Promise; + /** + * Sets the content of a file + * + * @param content The value to set for the file contents + */ + setContent(content: string | ArrayBuffer | Blob): Promise; + /** + * Delete this attachment file + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + } + export interface AttachmentFileAddResult { + file: AttachmentFile; + data: any; + } +} +declare module "sharepoint/items" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + import { QueryableSecurable } from "sharepoint/queryablesecurable"; + import { Folder } from "sharepoint/folders"; + import { File } from "sharepoint/files"; + import { ContentType } from "sharepoint/contenttypes"; + import { TypedHash } from "collections/collections"; + import * as Types from "sharepoint/types"; + import { AttachmentFiles } from "sharepoint/attachmentfiles"; + /** + * Describes a collection of Item objects + * + */ + export class Items extends QueryableCollection { + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets an Item by id + * + * @param id The integer id of the item to retrieve + */ + getById(id: number): Item; + /** + * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6) + * + * @param skip The starting id where the page should start, use with top to specify pages + */ + skip(skip: number): this; + /** + * Gets a collection designed to aid in paging through data + * + */ + getPaged(): Promise>; + /** + * Adds a new item to the collection + * + * @param properties The new items's properties + */ + add(properties?: TypedHash, listItemEntityTypeFullName?: string): Promise; + } + /** + * Descrines a single Item instance + * + */ + export class Item extends QueryableSecurable { + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the set of attachments for this item + * + */ + readonly attachmentFiles: AttachmentFiles; + /** + * Gets the content type for this item + * + */ + readonly contentType: ContentType; + /** + * Gets the effective base permissions for the item + * + */ + readonly effectiveBasePermissions: Queryable; + /** + * Gets the effective base permissions for the item in a UI context + * + */ + readonly effectiveBasePermissionsForUI: Queryable; + /** + * Gets the field values for this list item in their HTML representation + * + */ + readonly fieldValuesAsHTML: QueryableInstance; + /** + * Gets the field values for this list item in their text representation + * + */ + readonly fieldValuesAsText: QueryableInstance; + /** + * Gets the field values for this list item for use in editing controls + * + */ + readonly fieldValuesForEdit: QueryableInstance; + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + readonly folder: Folder; + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + readonly file: File; + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + update(properties: TypedHash, eTag?: string): Promise; + /** + * Delete this item + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + /** + * Gets a string representation of the full URL to the WOPI frame. + * If there is no associated WOPI application, or no associated action, an empty string is returned. + * + * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview + */ + getWopiFrameUrl(action?: number): Promise; + /** + * Validates and sets the values of the specified collection of fields for the list item. + * + * @param formValues The fields to change and their new values. + * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false. + */ + validateUpdateListItem(formValues: Types.ListItemFormUpdateValue[], newDocumentUpdate?: boolean): Promise; + } + export interface ItemAddResult { + item: Item; + data: any; + } + export interface ItemUpdateResult { + item: Item; + data: ItemUpdateResultData; + } + export interface ItemUpdateResultData { + "odata.etag": string; + } + /** + * Provides paging functionality for list items + */ + export class PagedItemCollection { + private nextUrl; + results: T; + constructor(nextUrl: string, results: T); + /** + * If true there are more results available in the set, otherwise there are not + */ + readonly hasNext: boolean; + /** + * Gets the next set of results, or resolves to null if no results are available + */ + getNext(): Promise>; + } +} +declare module "sharepoint/views" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + import { TypedHash } from "collections/collections"; + /** + * Describes the views available in the current context + * + */ + export class Views extends QueryableCollection { + /** + * Creates a new instance of the Views class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable); + /** + * Gets a view by guid id + * + * @param id The GUID id of the view + */ + getById(id: string): View; + /** + * Gets a view by title (case-sensitive) + * + * @param title The case-sensitive title of the view + */ + getByTitle(title: string): View; + /** + * Adds a new view to the collection + * + * @param title The new views's title + * @param personalView True if this is a personal view, otherwise false, default = false + * @param additionalSettings Will be passed as part of the view creation body + */ + add(title: string, personalView?: boolean, additionalSettings?: TypedHash): Promise; + } + /** + * Describes a single View instance + * + */ + export class View extends QueryableInstance { + /** + * Creates a new instance of the View class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + readonly fields: ViewFields; + /** + * Updates this view intance with the supplied properties + * + * @param properties A plain object hash of values to update for the view + */ + update(properties: TypedHash): Promise; + /** + * Delete this view + * + */ + delete(): Promise; + /** + * Returns the list view as HTML. + * + */ + renderAsHtml(): Promise; + } + export class ViewFields extends QueryableCollection { + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a value that specifies the XML schema that represents the collection. + */ + getSchemaXml(): Promise; + /** + * Adds the field with the specified field internal name or display name to the collection. + * + * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add. + */ + add(fieldTitleOrInternalName: string): Promise; + /** + * Moves the field with the specified field internal name to the specified position in the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to move. + * @param index The zero-based index of the new position for the field. + */ + move(fieldInternalName: string, index: number): Promise; + /** + * Removes all the fields from the collection. + */ + removeAll(): Promise; + /** + * Removes the field with the specified field internal name from the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to remove from the view. + */ + remove(fieldInternalName: string): Promise; + } + export interface ViewAddResult { + view: View; + data: any; + } + export interface ViewUpdateResult { + view: View; + data: any; + } +} +declare module "sharepoint/fields" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + import { TypedHash } from "collections/collections"; + import * as Types from "sharepoint/types"; + /** + * Describes a collection of Field objects + * + */ + export class Fields extends QueryableCollection { + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a field from the collection by title + * + * @param title The case-sensitive title of the field + */ + getByTitle(title: string): Field; + /** + * Gets a field from the collection by using internal name or title + * + * @param name The case-sensitive internal name or title of the field + */ + getByInternalNameOrTitle(name: string): Field; + /** + * Gets a list from the collection by guid id + * + * @param title The Id of the list + */ + getById(id: string): Field; + /** + * Creates a field based on the specified schema + */ + createFieldAsXml(xml: string | Types.XmlSchemaFieldCreationInformation): Promise; + /** + * Adds a new list to the collection + * + * @param title The new field's title + * @param fieldType The new field's type (ex: SP.FieldText) + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + add(title: string, fieldType: string, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldText to the collection + * + * @param title The field title + * @param maxLength The maximum number of characters allowed in the value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addText(title: string, maxLength?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldCalculated to the collection + * + * @param title The field title. + * @param formula The formula for the field. + * @param dateFormat The date and time format that is displayed in the field. + * @param outputType Specifies the output format for the field. Represents a FieldType value. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addCalculated(title: string, formula: string, dateFormat: Types.DateTimeFieldFormatType, outputType?: Types.FieldTypes, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldDateTime to the collection + * + * @param title The field title + * @param displayFormat The format of the date and time that is displayed in the field. + * @param calendarType Specifies the calendar type of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addDateTime(title: string, displayFormat?: Types.DateTimeFieldFormatType, calendarType?: Types.CalendarType, friendlyDisplayFormat?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldNumber to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addNumber(title: string, minValue?: number, maxValue?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldCurrency to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addCurrency(title: string, minValue?: number, maxValue?: number, currencyLocalId?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldMultiLineText to the collection + * + * @param title The field title + * @param numberOfLines Specifies the number of lines of text to display for the field. + * @param richText Specifies whether the field supports rich formatting. + * @param restrictedMode Specifies whether the field supports a subset of rich formatting. + * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms. + * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + * + */ + addMultilineText(title: string, numberOfLines?: number, richText?: boolean, restrictedMode?: boolean, appendOnly?: boolean, allowHyperlink?: boolean, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldUrl to the collection + * + * @param title The field title + */ + addUrl(title: string, displayFormat?: Types.UrlFieldFormatType, properties?: TypedHash): Promise; + } + /** + * Describes a single of Field instance + * + */ + export class Field extends QueryableInstance { + /** + * Creates a new instance of the Field class + * + * @param baseUrl The url or Queryable which forms the parent of this field instance + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Updates this field intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param fieldType The type value, required to update child field type properties + */ + update(properties: TypedHash, fieldType?: string): Promise; + /** + * Delete this fields + * + */ + delete(): Promise; + /** + * Sets the value of the ShowInDisplayForm property for this field. + */ + setShowInDisplayForm(show: boolean): Promise; + /** + * Sets the value of the ShowInEditForm property for this field. + */ + setShowInEditForm(show: boolean): Promise; + /** + * Sets the value of the ShowInNewForm property for this field. + */ + setShowInNewForm(show: boolean): Promise; + } + export interface FieldAddResult { + data: any; + field: Field; + } + export interface FieldUpdateResult { + data: any; + field: Field; + } +} +declare module "sharepoint/forms" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + /** + * Describes a collection of Field objects + * + */ + export class Forms extends QueryableCollection { + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a form by id + * + * @param id The guid id of the item to retrieve + */ + getById(id: string): Form; + } + /** + * Describes a single of Form instance + * + */ + export class Form extends QueryableInstance { + /** + * Creates a new instance of the Form class + * + * @param baseUrl The url or Queryable which is the parent of this form instance + */ + constructor(baseUrl: string | Queryable, path?: string); + } +} +declare module "sharepoint/subscriptions" { + import { Queryable, QueryableCollection, QueryableInstance } from "sharepoint/queryable"; + /** + * Describes a collection of webhook subscriptions + * + */ + export class Subscriptions extends QueryableCollection { + /** + * Creates a new instance of the Subscriptions class + * + * @param baseUrl - The url or Queryable which forms the parent of this webhook subscriptions collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Returns all the webhook subscriptions or the specified webhook subscription + * + */ + getById(subscriptionId: string): Subscription; + /** + * Create a new webhook subscription + * + */ + add(notificationUrl: string, expirationDate: string, clientState?: string): Promise; + } + /** + * Describes a single webhook subscription instance + * + */ + export class Subscription extends QueryableInstance { + /** + * Creates a new instance of the Subscription class + * + * @param baseUrl - The url or Queryable which forms the parent of this webhook subscription instance + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Update a webhook subscription + * + */ + update(expirationDate: string): Promise; + /** + * Remove a webhook subscription + * + */ + delete(): Promise; + } + export interface SubscriptionAddResult { + subscription: Subscription; + data: any; + } + export interface SubscriptionUpdateResult { + subscription: Subscription; + data: any; + } +} +declare module "sharepoint/usercustomactions" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import { TypedHash } from "collections/collections"; + export class UserCustomActions extends QueryableCollection { + constructor(baseUrl: string | Queryable, path?: string); + /** + * Returns the custom action with the specified identifier. + * + * @param id The GUID ID of the user custom action to get. + */ + getById(id: string): UserCustomAction; + /** + * Create a custom action + * + * @param creationInfo The information which defines the new custom action + * + */ + add(properties: TypedHash): Promise; + /** + * Deletes all custom actions in the collection. + * + */ + clear(): Promise; + } + export class UserCustomAction extends QueryableInstance { + constructor(baseUrl: string | Queryable, path?: string); + update(properties: TypedHash): Promise; + /** + * Remove a custom action + * + */ + delete(): Promise; + } + export interface UserCustomActionAddResult { + data: any; + action: UserCustomAction; + } + export interface UserCustomActionUpdateResult { + data: any; + action: UserCustomAction; + } +} +declare module "sharepoint/lists" { + import { Items } from "sharepoint/items"; + import { Views, View } from "sharepoint/views"; + import { ContentTypes } from "sharepoint/contenttypes"; + import { Fields } from "sharepoint/fields"; + import { Forms } from "sharepoint/forms"; + import { Subscriptions } from "sharepoint/subscriptions"; + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import { QueryableSecurable } from "sharepoint/queryablesecurable"; + import { TypedHash } from "collections/collections"; + import { ControlMode, RenderListData, ChangeQuery, CamlQuery, ChangeLogitemQuery, ListFormData } from "sharepoint/types"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + /** + * Describes a collection of List objects + * + */ + export class Lists extends QueryableCollection { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a list from the collection by title + * + * @param title The title of the list + */ + getByTitle(title: string): List; + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the list (GUID) + */ + getById(id: string): List; + /** + * Adds a new list to the collection + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body + */ + add(title: string, description?: string, template?: number, enableContentTypes?: boolean, additionalSettings?: TypedHash): Promise; + /** + * Ensures that the specified list exists in the collection (note: this method not supported for batching) + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list + */ + ensure(title: string, description?: string, template?: number, enableContentTypes?: boolean, additionalSettings?: TypedHash): Promise; + /** + * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages. + */ + ensureSiteAssetsLibrary(): Promise; + /** + * Gets a list that is the default location for wiki pages. + */ + ensureSitePagesLibrary(): Promise; + } + /** + * Describes a single List instance + * + */ + export class List extends QueryableSecurable { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the content types in this list + * + */ + readonly contentTypes: ContentTypes; + /** + * Gets the items in this list + * + */ + readonly items: Items; + /** + * Gets the views in this list + * + */ + readonly views: Views; + /** + * Gets the fields in this list + * + */ + readonly fields: Fields; + /** + * Gets the forms in this list + * + */ + readonly forms: Forms; + /** + * Gets the default view of this list + * + */ + readonly defaultView: QueryableInstance; + /** + * Get all custom actions on a site collection + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the effective base permissions of this list + * + */ + readonly effectiveBasePermissions: Queryable; + /** + * Gets the event receivers attached to this list + * + */ + readonly eventReceivers: QueryableCollection; + /** + * Gets the related fields of this list + * + */ + readonly relatedFields: Queryable; + /** + * Gets the IRM settings for this list + * + */ + readonly informationRightsManagementSettings: Queryable; + /** + * Gets the webhook subscriptions of this list + * + */ + readonly subscriptions: Subscriptions; + /** + * Gets a view by view guid id + * + */ + getView(viewId: string): View; + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + update(properties: TypedHash, eTag?: string): Promise; + /** + * Delete this list + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + getChanges(query: ChangeQuery): Promise; + /** + * Returns a collection of items from the list based on the specified query. + * + * @param CamlQuery The Query schema of Collaborative Application Markup + * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation + * to define queries against list data. + * see: + * + * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx + * + * @param expands A URI with a $expand System Query Option indicates that Entries associated with + * the Entry or Collection of Entries identified by the Resource Path + * section of the URI must be represented inline (i.e. eagerly loaded). + * see: + * + * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx + * + * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption + */ + getItemsByCAMLQuery(query: CamlQuery, ...expands: string[]): Promise; + /** + * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx + */ + getListItemChangesSinceToken(query: ChangeLogitemQuery): Promise; + /** + * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + /** + * Renders list data based on the view xml provided + */ + renderListData(viewXml: string): Promise; + /** + * Gets the field values and field schema attributes for a list item. + */ + renderListFormData(itemId: number, formId: string, mode: ControlMode): Promise; + /** + * Reserves a list item ID for idempotent list item creation. + */ + reserveListItemId(): Promise; + /** + * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items + * + */ + getListItemEntityTypeFullName(): Promise; + } + export interface ListAddResult { + list: List; + data: any; + } + export interface ListUpdateResult { + list: List; + data: any; + } + export interface ListEnsureResult { + list: List; + created: boolean; + data: any; + } +} +declare module "sharepoint/navigation" { + import { TypedHash } from "collections/collections"; + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + export interface NavigationNodeAddResult { + data: any; + node: NavigationNode; + } + export interface NavigationNodeUpdateResult { + data: any; + node: NavigationNode; + } + /** + * Represents a collection of navigation nodes + * + */ + export class NavigationNodes extends QueryableCollection { + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a navigation node by id + * + * @param id The id of the node + */ + getById(id: number): NavigationNode; + /** + * Adds a new node to the collection + * + * @param title Display name of the node + * @param url The url of the node + * @param visible If true the node is visible, otherwise it is hidden (default: true) + */ + add(title: string, url: string, visible?: boolean): Promise; + /** + * Moves a node to be after another node in the navigation + * + * @param nodeId Id of the node to move + * @param previousNodeId Id of the node after which we move the node specified by nodeId + */ + moveAfter(nodeId: number, previousNodeId: number): Promise; + } + export class NavigationNode extends QueryableInstance { + constructor(baseUrl: string | Queryable, path?: string); + /** + * Represents the child nodes of this node + */ + readonly children: NavigationNodes; + /** + * Updates this node based on the supplied properties + * + * @param properties The hash of key/value pairs to update + */ + update(properties: TypedHash): Promise; + /** + * Deletes this node and any child nodes + */ + delete(): Promise; + } + /** + * Exposes the navigation components + * + */ + export class Navigation extends Queryable { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the quicklaunch navigation for the current context + * + */ + readonly quicklaunch: NavigationNodes; + /** + * Gets the top bar navigation navigation for the current context + * + */ + readonly topNavigationBar: NavigationNodes; + } +} +declare module "sharepoint/features" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + /** + * Describes a collection of List objects + * + */ + export class Features extends QueryableCollection { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the feature (GUID) + */ + getById(id: string): Feature; + /** + * Adds a new list to the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature activation will be forced + */ + add(id: string, force?: boolean): Promise; + /** + * Removes (deactivates) a feature from the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature deactivation will be forced + */ + remove(id: string, force?: boolean): Promise; + } + export class Feature extends QueryableInstance { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Removes (deactivates) a feature from the collection + * + * @param force If true the feature deactivation will be forced + */ + deactivate(force?: boolean): Promise; + } + export interface FeatureAddResult { + data: any; + feature: Feature; + } +} +declare module "sharepoint/webs" { + import { Queryable, QueryableCollection } from "sharepoint/queryable"; + import { QueryableSecurable } from "sharepoint/queryablesecurable"; + import { Lists } from "sharepoint/lists"; + import { Fields } from "sharepoint/fields"; + import { Navigation } from "sharepoint/navigation"; + import { SiteGroups } from "sharepoint/sitegroups"; + import { ContentTypes } from "sharepoint/contenttypes"; + import { Folders, Folder } from "sharepoint/folders"; + import { RoleDefinitions } from "sharepoint/roles"; + import { File } from "sharepoint/files"; + import { TypedHash } from "collections/collections"; + import * as Types from "sharepoint/types"; + import { List } from "sharepoint/lists"; + import { SiteUsers, SiteUser, CurrentUser } from "sharepoint/siteusers"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + import { ODataBatch } from "sharepoint/odata"; + import { Features } from "sharepoint/features"; + export class Webs extends QueryableCollection { + constructor(baseUrl: string | Queryable, webPath?: string); + /** + * Adds a new web to the collection + * + * @param title The new web's title + * @param url The new web's relative url + * @param description The web web's description + * @param template The web's template + * @param language The language code to use for this web + * @param inheritPermissions If true permissions will be inherited from the partent web + * @param additionalSettings Will be passed as part of the web creation body + */ + add(title: string, url: string, description?: string, template?: string, language?: number, inheritPermissions?: boolean, additionalSettings?: TypedHash): Promise; + } + /** + * Describes a web + * + */ + export class Web extends QueryableSecurable { + constructor(baseUrl: string | Queryable, path?: string); + readonly webs: Webs; + /** + * Get the content types available in this web + * + */ + readonly contentTypes: ContentTypes; + /** + * Get the lists in this web + * + */ + readonly lists: Lists; + /** + * Gets the fields in this web + * + */ + readonly fields: Fields; + /** + * Gets the active features for this web + * + */ + readonly features: Features; + /** + * Gets the available fields in this web + * + */ + readonly availablefields: Fields; + /** + * Get the navigation options in this web + * + */ + readonly navigation: Navigation; + /** + * Gets the site users + * + */ + readonly siteUsers: SiteUsers; + /** + * Gets the site groups + * + */ + readonly siteGroups: SiteGroups; + /** + * Gets the current user + */ + readonly currentUser: CurrentUser; + /** + * Get the folders in this web + * + */ + readonly folders: Folders; + /** + * Get all custom actions on a site + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the collection of RoleDefinition resources. + * + */ + readonly roleDefinitions: RoleDefinitions; + /** + * Creates a new batch for requests within the context of context this web + * + */ + createBatch(): ODataBatch; + /** + * Get a folder by server relative url + * + * @param folderRelativeUrl the server relative path to the folder (including /sites/ if applicable) + */ + getFolderByServerRelativeUrl(folderRelativeUrl: string): Folder; + /** + * Get a file by server relative url + * + * @param fileRelativeUrl the server relative path to the file (including /sites/ if applicable) + */ + getFileByServerRelativeUrl(fileRelativeUrl: string): File; + /** + * Get a list by server relative url (list's root folder) + * + * @param listRelativeUrl the server relative path to the list's root folder (including /sites/ if applicable) + */ + getList(listRelativeUrl: string): List; + /** + * Updates this web intance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + update(properties: TypedHash): Promise; + /** + * Delete this web + * + */ + delete(): Promise; + /** + * Applies the theme specified by the contents of each of the files specified in the arguments to the site. + * + * @param colorPaletteUrl Server-relative URL of the color palette file. + * @param fontSchemeUrl Server-relative URL of the font scheme. + * @param backgroundImageUrl Server-relative URL of the background image. + * @param shareGenerated true to store the generated theme files in the root site, or false to store them in this site. + */ + applyTheme(colorPaletteUrl: string, fontSchemeUrl: string, backgroundImageUrl: string, shareGenerated: boolean): Promise; + /** + * Applies the specified site definition or site template to the Web site that has no template applied to it. + * + * @param template Name of the site definition or the name of the site template + */ + applyWebTemplate(template: string): Promise; + /** + * Returns whether the current user has the given set of permissions. + * + * @param perms The high and low permission range. + */ + doesUserHavePermissions(perms: Types.BasePermissions): Promise; + /** + * Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site. + * + * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com) + */ + ensureUser(loginName: string): Promise; + /** + * Returns a collection of site templates available for the site. + * + * @param language The LCID of the site templates to get. + * @param true to include language-neutral site templates; otherwise false + */ + availableWebTemplates(language?: number, includeCrossLanugage?: boolean): QueryableCollection; + /** + * Returns the list gallery on the site. + * + * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114, + * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125 + */ + getCatalog(type: number): Promise; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + getChanges(query: Types.ChangeQuery): Promise; + /** + * Gets the custom list templates for the site. + * + */ + readonly customListTemplate: QueryableCollection; + /** + * Returns the user corresponding to the specified member identifier for the current site. + * + * @param id The ID of the user. + */ + getUserById(id: number): SiteUser; + /** + * Returns the name of the image file for the icon that is used to represent the specified file. + * + * @param filename The file name. If this parameter is empty, the server returns an empty string. + * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1. + * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName + */ + mapToIcon(filename: string, size?: number, progId?: string): Promise; + } + export interface WebAddResult { + data: any; + web: Web; + } + export interface WebUpdateResult { + data: any; + web: Web; + } + export interface GetCatalogResult { + data: any; + list: List; + } +} +declare module "sharepoint/site" { + import { Queryable, QueryableInstance } from "sharepoint/queryable"; + import { Web } from "sharepoint/webs"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + import { ContextInfo, DocumentLibraryInformation } from "sharepoint/types"; + import { ODataBatch } from "sharepoint/odata"; + import { Features } from "sharepoint/features"; + /** + * Describes a site collection + * + */ + export class Site extends QueryableInstance { + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | Queryable, path?: string); + /** + * Gets the root web of the site collection + * + */ + readonly rootWeb: Web; + /** + * Gets the active features for this site + * + */ + readonly features: Features; + /** + * Get all custom actions on a site collection + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the context information for the site. + */ + getContextInfo(): Promise; + /** + * Gets the document libraries on a site. Static method. (SharePoint Online only) + * + * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned + */ + getDocumentLibraries(absoluteWebUrl: string): Promise; + /** + * Gets the site URL from a page URL. + * + * @param absolutePageUrl The absolute url of the page + */ + getWebUrlFromPageUrl(absolutePageUrl: string): Promise; + /** + * Creates a new batch for requests within the context of context this site + * + */ + createBatch(): ODataBatch; + } +} +declare module "utils/files" { + /** + * Reads a blob as text + * + * @param blob The data to read + */ + export function readBlobAsText(blob: Blob): Promise; + /** + * Reads a blob into an array buffer + * + * @param blob The data to read + */ + export function readBlobAsArrayBuffer(blob: Blob): Promise; +} +declare module "sharepoint/userprofiles" { + import { Queryable, QueryableInstance, QueryableCollection } from "sharepoint/queryable"; + import * as Types from "sharepoint/types"; + export class UserProfileQuery extends QueryableInstance { + private profileLoader; + constructor(baseUrl: string | Queryable, path?: string); + /** + * The URL of the edit profile page for the current user. + */ + readonly editProfileLink: Promise; + /** + * A Boolean value that indicates whether the current user's People I'm Following list is public. + */ + readonly isMyPeopleListPublic: Promise; + /** + * A Boolean value that indicates whether the current user's People I'm Following list is public. + * + * @param loginName The account name of the user + */ + amIFollowedBy(loginName: string): Promise; + /** + * Checks whether the current user is following the specified user. + * + * @param loginName The account name of the user + */ + amIFollowing(loginName: string): Promise; + /** + * Gets tags that the user is following. + * + * @param maxCount The maximum number of tags to get. + */ + getFollowedTags(maxCount?: number): Promise; + /** + * Gets the people who are following the specified user. + * + * @param loginName The account name of the user. + */ + getFollowersFor(loginName: string): Promise; + /** + * Gets the people who are following the current user. + * + */ + readonly myFollowers: QueryableCollection; + /** + * Gets user properties for the current user. + * + */ + readonly myProperties: QueryableInstance; + /** + * Gets the people who the specified user is following. + * + * @param loginName The account name of the user. + */ + getPeopleFollowedBy(loginName: string): Promise; + /** + * Gets user properties for the specified user. + * + * @param loginName The account name of the user. + */ + getPropertiesFor(loginName: string): Promise; + /** + * Gets the most popular tags. + * + */ + readonly trendingTags: Promise; + /** + * Gets the specified user profile property for the specified user. + * + * @param loginName The account name of the user. + * @param propertyName The case-sensitive name of the property to get. + */ + getUserProfilePropertyFor(loginName: string, propertyName: string): Promise; + /** + * Removes the specified user from the user's list of suggested people to follow. + * + * @param loginName The account name of the user. + */ + hideSuggestion(loginName: string): Promise; + /** + * Checks whether the first user is following the second user. + * + * @param follower The account name of the user who might be following followee. + * @param followee The account name of the user who might be followed. + */ + isFollowing(follower: string, followee: string): Promise; + /** + * Uploads and sets the user profile picture + * + * @param profilePicSource Blob data representing the user's picture + */ + setMyProfilePic(profilePicSource: Blob): Promise; + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) + * + * @param emails The email addresses of the users to provision sites for + */ + createPersonalSiteEnqueueBulk(...emails: string[]): Promise; + /** + * Gets the user profile of the site owner. + * + */ + readonly ownerUserProfile: Promise; + /** + * Gets the user profile that corresponds to the current user. + */ + readonly userProfile: Promise; + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files. + * + * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request + */ + createPersonalSite(interactiveRequest?: boolean): Promise; + /** + * Sets the privacy settings for this profile. + * + * @param share true to make all social data public; false to make all social data private. + */ + shareAllSocialData(share: boolean): Promise; + } +} +declare module "sharepoint/rest" { + import { SearchQuery, SearchResults } from "sharepoint/search"; + import { SearchSuggestQuery, SearchSuggestResult } from "sharepoint/searchsuggest"; + import { Site } from "sharepoint/site"; + import { Web } from "sharepoint/webs"; + import { UserProfileQuery } from "sharepoint/userprofiles"; + import { ODataBatch } from "sharepoint/odata"; + /** + * Root of the SharePoint REST module + */ + export class Rest { + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + searchSuggest(query: string | SearchSuggestQuery): Promise; + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + search(query: string | SearchQuery): Promise; + /** + * Begins a site collection scoped REST request + * + */ + readonly site: Site; + /** + * Begins a web scoped REST request + * + */ + readonly web: Web; + /** + * Access to user profile methods + * + */ + readonly profiles: UserProfileQuery; + /** + * Creates a new batch object for use with the Queryable.addToBatch method + * + */ + createBatch(): ODataBatch; + /** + * Begins a cross-domain, host site scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + crossDomainSite(addInWebUrl: string, hostWebUrl: string): Site; + /** + * Begins a cross-domain, host web scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + crossDomainWeb(addInWebUrl: string, hostWebUrl: string): Web; + /** + * Implements the creation of cross domain REST urls + * + * @param factory The constructor of the object to create Site | Web + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + * @param urlPart String part to append to the url "site" | "web" + */ + private _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart); + } +} +declare module "sharepoint/index" { + export * from "sharepoint/caching"; + export { AttachmentFileAddResult } from "sharepoint/attachmentfiles"; + export { FieldAddResult, FieldUpdateResult } from "sharepoint/fields"; + export { CheckinType, FileAddResult, WebPartsPersonalizationScope, MoveOperations, TemplateFileType, ChunkedFileUploadProgressData } from "sharepoint/files"; + export { FeatureAddResult } from "sharepoint/features"; + export { FolderAddResult } from "sharepoint/folders"; + export { Item, ItemAddResult, ItemUpdateResult, ItemUpdateResultData, PagedItemCollection } from "sharepoint/items"; + export { NavigationNodeAddResult, NavigationNodeUpdateResult, NavigationNodes, NavigationNode } from "sharepoint/navigation"; + export { List, ListAddResult, ListUpdateResult, ListEnsureResult } from "sharepoint/lists"; + export { extractOdataId, ODataParser, ODataParserBase, ODataDefaultParser, ODataRaw, ODataValue, ODataEntity, ODataEntityArray, TextFileParser, BlobFileParser, BufferFileParser, JSONFileParser } from "sharepoint/odata"; + export { RoleDefinitionUpdateResult, RoleDefinitionAddResult, RoleDefinitionBindings } from "sharepoint/roles"; + export { Search, SearchProperty, SearchPropertyValue, SearchQuery, SearchResult, SearchResults, Sort, SortDirection, ReorderingRule, ReorderingRuleMatchType, QueryPropertyValueType } from "sharepoint/search"; + export { SearchSuggest, SearchSuggestQuery, SearchSuggestResult, PersonalResultSuggestion } from "sharepoint/searchsuggest"; + export { Site } from "sharepoint/site"; + export { SiteGroupAddResult } from "sharepoint/sitegroups"; + export { UserUpdateResult } from "sharepoint/siteusers"; + export { SubscriptionAddResult, SubscriptionUpdateResult } from "sharepoint/subscriptions"; + export * from "sharepoint/types"; + export { UserCustomActionAddResult, UserCustomActionUpdateResult } from "sharepoint/usercustomactions"; + export { ViewAddResult, ViewUpdateResult } from "sharepoint/views"; + export { Web, WebAddResult, WebUpdateResult, GetCatalogResult } from "sharepoint/webs"; +} +declare module "net/sprequestexecutorclient" { + import { HttpClientImpl, FetchOptions } from "net/httpclient"; + /** + * Makes requests using the SP.RequestExecutor library. + */ + export class SPRequestExecutorClient implements HttpClientImpl { + /** + * Fetches a URL using the SP.RequestExecutor library. + */ + fetch(url: string, options: FetchOptions): Promise; + /** + * Converts a SharePoint REST API response to a fetch API response. + */ + private convertToResponse; + } +} +declare module "net/nodefetchclient" { + import { HttpClientImpl } from "net/httpclient"; + export interface AuthToken { + token_type: string; + expires_in: string; + not_before: string; + expires_on: string; + resource: string; + access_token: string; + } + /** + * Fetch client for use within nodejs, requires you register a client id and secret with app only permissions + */ + export class NodeFetchClient implements HttpClientImpl { + siteUrl: string; + private _clientId; + private _clientSecret; + private _realm; + private static SharePointServicePrincipal; + private token; + constructor(siteUrl: string, _clientId: string, _clientSecret: string, _realm?: string); + fetch(url: string, options: any): Promise; + /** + * Gets an add-in only authentication token based on the supplied site url, client id and secret + */ + getAddInOnlyAccessToken(): Promise; + private getRealm(); + private getAuthUrl(realm); + private getFormattedPrincipal(principalName, hostName, realm); + private toDate(epoch); + } +} +declare module "configuration/providers/cachingConfigurationProvider" { + import { IConfigurationProvider } from "configuration/configuration"; + import { TypedHash } from "collections/collections"; + import * as storage from "utils/storage"; + /** + * A caching provider which can wrap other non-caching providers + * + */ + export default class CachingConfigurationProvider implements IConfigurationProvider { + private wrappedProvider; + private store; + private cacheKey; + /** + * Creates a new caching configuration provider + * @constructor + * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration + * @param {string} cacheKey Key that will be used to store cached items to the cache + * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings. + */ + constructor(wrappedProvider: IConfigurationProvider, cacheKey: string, cacheStore?: storage.PnPClientStore); + /** + * Gets the wrapped configuration providers + * + * @return {IConfigurationProvider} Wrapped configuration provider + */ + getWrappedProvider(): IConfigurationProvider; + /** + * Loads the configuration values either from the cache or from the wrapped provider + * + * @return {Promise>} Promise of loaded configuration values + */ + getConfiguration(): Promise>; + private selectPnPCache(); + } +} +declare module "configuration/providers/spListConfigurationProvider" { + import { IConfigurationProvider } from "configuration/configuration"; + import { TypedHash } from "collections/collections"; + import { default as CachingConfigurationProvider } from "configuration/providers/cachingConfigurationProvider"; + import { Web } from "sharepoint/webs"; + /** + * A configuration provider which loads configuration values from a SharePoint list + * + */ + export default class SPListConfigurationProvider implements IConfigurationProvider { + private sourceWeb; + private sourceListTitle; + /** + * Creates a new SharePoint list based configuration provider + * @constructor + * @param {string} webUrl Url of the SharePoint site, where the configuration list is located + * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = "config") + */ + constructor(sourceWeb: Web, sourceListTitle?: string); + /** + * Gets the url of the SharePoint site, where the configuration list is located + * + * @return {string} Url address of the site + */ + readonly web: Web; + /** + * Gets the title of the SharePoint list, which contains the configuration settings + * + * @return {string} List title + */ + readonly listTitle: string; + /** + * Loads the configuration values from the SharePoint list + * + * @return {Promise>} Promise of loaded configuration values + */ + getConfiguration(): Promise>; + /** + * Wraps the current provider in a cache enabled provider + * + * @return {CachingConfigurationProvider} Caching providers which wraps the current provider + */ + asCaching(): CachingConfigurationProvider; + } +} +declare module "configuration/providers/index" { + export { default as CachingConfigurationProvider } from "configuration/providers/cachingConfigurationProvider"; + export { default as SPListConfigurationProvider } from "configuration/providers/spListConfigurationProvider"; +} +declare module "types/index" { + export * from "sharepoint/index"; + export { FetchOptions, HttpClient, HttpClientImpl } from "net/httpclient"; + export { SPRequestExecutorClient } from "net/sprequestexecutorclient"; + export { NodeFetchClient } from "net/nodefetchclient"; + export { FetchClient } from "net/fetchclient"; + export { IConfigurationProvider } from "configuration/configuration"; + export * from "configuration/providers/index"; + export { LibraryConfiguration } from "configuration/pnplibconfig"; + export { TypedHash, Dictionary } from "collections/collections"; + export { Util } from "utils/util"; + export * from "utils/logging"; + export * from "utils/exceptions"; +} +declare module "pnp" { + import { Util } from "utils/util"; + import { PnPClientStorage } from "utils/storage"; + import { Settings } from "configuration/configuration"; + import { Logger } from "utils/logging"; + import { Rest } from "sharepoint/rest"; + import { LibraryConfiguration } from "configuration/pnplibconfig"; + /** + * Root class of the Patterns and Practices namespace, provides an entry point to the library + */ + /** + * Utility methods + */ + export const util: typeof Util; + /** + * Provides access to the REST interface + */ + export const sp: Rest; + /** + * Provides access to local and session storage + */ + export const storage: PnPClientStorage; + /** + * Global configuration instance to which providers can be added + */ + export const config: Settings; + /** + * Global logging instance to which subscribers can be registered and messages written + */ + export const log: typeof Logger; + /** + * Allows for the configuration of the library + */ + export const setup: (config: LibraryConfiguration) => void; + /** + * Expose a subset of classes from the library for public consumption + */ + export * from "types/index"; + let Def: { + config: Settings; + log: typeof Logger; + setup: (config: LibraryConfiguration) => void; + sp: Rest; + storage: PnPClientStorage; + util: typeof Util; + }; + export default Def; +} +declare module "net/nodefetchclientbrowser" { + import { HttpClientImpl } from "net/httpclient"; + /** + * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by + * not including all of the node dependencies + */ + export class NodeFetchClient implements HttpClientImpl { + /** + * Always throws an error that NodeFetchClient is not supported for use in the browser + */ + fetch(): Promise; + } +} +declare module "types/locale" { + export enum Locale { + AfrikaansSouthAfrica = 1078, + AlbanianAlbania = 1052, + Alsatian = 1156, + AmharicEthiopia = 1118, + ArabicSaudiArabia = 1025, + ArabicAlgeria = 5121, + ArabicBahrain = 15361, + ArabicEgypt = 3073, + ArabicIraq = 2049, + ArabicJordan = 11265, + ArabicKuwait = 13313, + ArabicLebanon = 12289, + ArabicLibya = 4097, + ArabicMorocco = 6145, + ArabicOman = 8193, + ArabicQatar = 16385, + ArabicSyria = 10241, + ArabicTunisia = 7169, + ArabicUAE = 14337, + ArabicYemen = 9217, + ArmenianArmenia = 1067, + Assamese = 1101, + AzeriCyrillic = 2092, + AzeriLatin = 1068, + Bashkir = 1133, + Basque = 1069, + Belarusian = 1059, + BengaliIndia = 1093, + BengaliBangladesh = 2117, + BosnianBosniaHerzegovina = 5146, + Breton = 1150, + Bulgarian = 1026, + Burmese = 1109, + Catalan = 1027, + CherokeeUnitedStates = 1116, + ChinesePeoplesRepublicofChina = 2052, + ChineseSingapore = 4100, + ChineseTaiwan = 1028, + ChineseHongKongSAR = 3076, + ChineseMacaoSAR = 5124, + Corsican = 1155, + Croatian = 1050, + CroatianBosniaHerzegovina = 4122, + Czech = 1029, + Danish = 1030, + Dari = 1164, + Divehi = 1125, + DutchNetherlands = 1043, + DutchBelgium = 2067, + Edo = 1126, + EnglishUnitedStates = 1033, + EnglishUnitedKingdom = 2057, + EnglishAustralia = 3081, + EnglishBelize = 10249, + EnglishCanada = 4105, + EnglishCaribbean = 9225, + EnglishHongKongSAR = 15369, + EnglishIndia = 16393, + EnglishIndonesia = 14345, + EnglishIreland = 6153, + EnglishJamaica = 8201, + EnglishMalaysia = 17417, + EnglishNewZealand = 5129, + EnglishPhilippines = 13321, + EnglishSingapore = 18441, + EnglishSouthAfrica = 7177, + EnglishTrinidad = 11273, + EnglishZimbabwe = 12297, + Estonian = 1061, + Faroese = 1080, + Farsi = 1065, + Filipino = 1124, + Finnish = 1035, + FrenchFrance = 1036, + FrenchBelgium = 2060, + FrenchCameroon = 11276, + FrenchCanada = 3084, + FrenchDemocraticRepofCongo = 9228, + FrenchCotedIvoire = 12300, + FrenchHaiti = 15372, + FrenchLuxembourg = 5132, + FrenchMali = 13324, + FrenchMonaco = 6156, + FrenchMorocco = 14348, + FrenchNorthAfrica = 58380, + FrenchReunion = 8204, + FrenchSenegal = 10252, + FrenchSwitzerland = 4108, + FrenchWestIndies = 7180, + FrisianNetherlands = 1122, + FulfuldeNigeria = 1127, + FYROMacedonian = 1071, + Galician = 1110, + Georgian = 1079, + GermanGermany = 1031, + GermanAustria = 3079, + GermanLiechtenstein = 5127, + GermanLuxembourg = 4103, + GermanSwitzerland = 2055, + Greek = 1032, + Greenlandic = 1135, + GuaraniParaguay = 1140, + Gujarati = 1095, + HausaNigeria = 1128, + HawaiianUnitedStates = 1141, + Hebrew = 1037, + Hindi = 1081, + Hungarian = 1038, + IbibioNigeria = 1129, + Icelandic = 1039, + IgboNigeria = 1136, + Indonesian = 1057, + Inuktitut = 1117, + Irish = 2108, + ItalianItaly = 1040, + ItalianSwitzerland = 2064, + Japanese = 1041, + Kiche = 1158, + Kannada = 1099, + KanuriNigeria = 1137, + Kashmiri = 2144, + KashmiriArabic = 1120, + Kazakh = 1087, + Khmer = 1107, + Kinyarwanda = 1159, + Konkani = 1111, + Korean = 1042, + KyrgyzCyrillic = 1088, + Lao = 1108, + Latin = 1142, + Latvian = 1062, + Lithuanian = 1063, + Luxembourgish = 1134, + MalayMalaysia = 1086, + MalayBruneiDarussalam = 2110, + Malayalam = 1100, + Maltese = 1082, + Manipuri = 1112, + MaoriNewZealand = 1153, + Mapudungun = 1146, + Marathi = 1102, + Mohawk = 1148, + MongolianCyrillic = 1104, + MongolianMongolian = 2128, + Nepali = 1121, + NepaliIndia = 2145, + NorwegianBokmål = 1044, + NorwegianNynorsk = 2068, + Occitan = 1154, + Oriya = 1096, + Oromo = 1138, + Papiamentu = 1145, + Pashto = 1123, + Polish = 1045, + PortugueseBrazil = 1046, + PortuguesePortugal = 2070, + Punjabi = 1094, + PunjabiPakistan = 2118, + QuechaBolivia = 1131, + QuechaEcuador = 2155, + QuechaPeru = 3179, + RhaetoRomanic = 1047, + Romanian = 1048, + RomanianMoldava = 2072, + Russian = 1049, + RussianMoldava = 2073, + SamiLappish = 1083, + Sanskrit = 1103, + ScottishGaelic = 1084, + Sepedi = 1132, + SerbianCyrillic = 3098, + SerbianLatin = 2074, + SindhiIndia = 1113, + SindhiPakistan = 2137, + SinhaleseSriLanka = 1115, + Slovak = 1051, + Slovenian = 1060, + Somali = 1143, + Sorbian = 1070, + SpanishSpainModernSort = 3082, + SpanishSpainTraditionalSort = 1034, + SpanishArgentina = 11274, + SpanishBolivia = 16394, + SpanishChile = 13322, + SpanishColombia = 9226, + SpanishCostaRica = 5130, + SpanishDominicanRepublic = 7178, + SpanishEcuador = 12298, + SpanishElSalvador = 17418, + SpanishGuatemala = 4106, + SpanishHonduras = 18442, + SpanishLatinAmerica = 22538, + SpanishMexico = 2058, + SpanishNicaragua = 19466, + SpanishPanama = 6154, + SpanishParaguay = 15370, + SpanishPeru = 10250, + SpanishPuertoRico = 20490, + SpanishUnitedStates = 21514, + SpanishUruguay = 14346, + SpanishVenezuela = 8202, + Sutu = 1072, + Swahili = 1089, + Swedish = 1053, + SwedishFinland = 2077, + Syriac = 1114, + Tajik = 1064, + TamazightArabic = 1119, + TamazightLatin = 2143, + Tamil = 1097, + Tatar = 1092, + Telugu = 1098, + Thai = 1054, + TibetanBhutan = 2129, + TibetanPeoplesRepublicofChina = 1105, + TigrignaEritrea = 2163, + TigrignaEthiopia = 1139, + Tsonga = 1073, + Tswana = 1074, + Turkish = 1055, + Turkmen = 1090, + UighurChina = 1152, + Ukrainian = 1058, + Urdu = 1056, + UrduIndia = 2080, + UzbekCyrillic = 2115, + UzbekLatin = 1091, + Venda = 1075, + Vietnamese = 1066, + Welsh = 1106, + Wolof = 1160, + Xhosa = 1076, + Yakut = 1157, + Yi = 1144, + Yiddish = 1085, + Yoruba = 1130, + Zulu = 1077, + HIDHumanInterfaceDevice = 1279, + } +} diff --git a/dist/pnp.js b/dist/pnp.js new file mode 100644 index 00000000..7017c47d --- /dev/null +++ b/dist/pnp.js @@ -0,0 +1,9937 @@ +/** + * sp-pnp-js v2.0.1 - A JavaScript library for SharePoint development. + * MIT (https://github.com/SharePoint/PnP-JS-Core/blob/master/LICENSE) + * Copyright (c) 2016 Microsoft + * docs: http://officedev.github.io/PnP-JS-Core + * source: https://github.com/SharePoint/PnP-JS-Core + * bugs: https://github.com/SharePoint/PnP-JS-Core/issues + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["$pnp"] = factory(); + else + root["$pnp"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/assets/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + function __export(m) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + } + var util_1 = __webpack_require__(1); + var storage_1 = __webpack_require__(6); + var configuration_1 = __webpack_require__(7); + var logging_1 = __webpack_require__(3); + var rest_1 = __webpack_require__(9); + var pnplibconfig_1 = __webpack_require__(4); + /** + * Root class of the Patterns and Practices namespace, provides an entry point to the library + */ + /** + * Utility methods + */ + exports.util = util_1.Util; + /** + * Provides access to the REST interface + */ + exports.sp = new rest_1.Rest(); + /** + * Provides access to local and session storage + */ + exports.storage = new storage_1.PnPClientStorage(); + /** + * Global configuration instance to which providers can be added + */ + exports.config = new configuration_1.Settings(); + /** + * Global logging instance to which subscribers can be registered and messages written + */ + exports.log = logging_1.Logger; + /** + * Allows for the configuration of the library + */ + exports.setup = pnplibconfig_1.setRuntimeConfig; + /** + * Expose a subset of classes from the library for public consumption + */ + __export(__webpack_require__(42)); + // creating this class instead of directly assigning to default fixes issue #116 + var Def = { + /** + * Global configuration instance to which providers can be added + */ + config: exports.config, + /** + * Global logging instance to which subscribers can be registered and messages written + */ + log: exports.log, + /** + * Provides access to local and session storage + */ + setup: exports.setup, + /** + * Provides access to the REST interface + */ + sp: exports.sp, + /** + * Provides access to local and session storage + */ + storage: exports.storage, + /** + * Utility methods + */ + util: exports.util + }; + Object.defineProperty(exports, "__esModule", { value: true }); + /** + * Enables use of the import pnp from syntax + */ + exports.default = Def; + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {"use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);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; + }return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var decorators_1 = __webpack_require__(2); + var pnplibconfig_1 = __webpack_require__(4); + + var Util = function () { + function Util() { + _classCallCheck(this, Util); + } + + _createClass(Util, null, [{ + key: "getCtxCallback", + + /** + * Gets a callback function which will maintain context across async calls. + * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...) + * + * @param context The object that will be the 'this' value in the callback + * @param method The method to which we will apply the context and parameters + * @param params Optional, additional arguments to supply to the wrapped method when it is invoked + */ + value: function getCtxCallback(context, method) { + for (var _len = arguments.length, params = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + params[_key - 2] = arguments[_key]; + } + + return function () { + method.apply(context, params); + }; + } + /** + * Tests if a url param exists + * + * @param name The name of the url paramter to check + */ + + }, { + key: "urlParamExists", + value: function urlParamExists(name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); + return regex.test(location.search); + } + /** + * Gets a url param value by name + * + * @param name The name of the paramter for which we want the value + */ + + }, { + key: "getUrlParamByName", + value: function getUrlParamByName(name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); + var results = regex.exec(location.search); + return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); + } + /** + * Gets a url param by name and attempts to parse a bool value + * + * @param name The name of the paramter for which we want the boolean value + */ + + }, { + key: "getUrlParamBoolByName", + value: function getUrlParamBoolByName(name) { + var p = this.getUrlParamByName(name); + var isFalse = p === "" || /false|0/i.test(p); + return !isFalse; + } + /** + * Inserts the string s into the string target as the index specified by index + * + * @param target The string into which we will insert s + * @param index The location in target to insert s (zero based) + * @param s The string to insert into target at position index + */ + + }, { + key: "stringInsert", + value: function stringInsert(target, index, s) { + if (index > 0) { + return target.substring(0, index) + s + target.substring(index, target.length); + } + return s + target; + } + /** + * Adds a value to a date + * + * @param date The date to which we will add units, done in local time + * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'] + * @param units The amount to add to date of the given interval + * + * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object + */ + + }, { + key: "dateAdd", + value: function dateAdd(date, interval, units) { + var ret = new Date(date.toLocaleString()); // don't change original date + switch (interval.toLowerCase()) { + case "year": + ret.setFullYear(ret.getFullYear() + units); + break; + case "quarter": + ret.setMonth(ret.getMonth() + 3 * units); + break; + case "month": + ret.setMonth(ret.getMonth() + units); + break; + case "week": + ret.setDate(ret.getDate() + 7 * units); + break; + case "day": + ret.setDate(ret.getDate() + units); + break; + case "hour": + ret.setTime(ret.getTime() + units * 3600000); + break; + case "minute": + ret.setTime(ret.getTime() + units * 60000); + break; + case "second": + ret.setTime(ret.getTime() + units * 1000); + break; + default: + ret = undefined; + break; + } + return ret; + } + /** + * Loads a stylesheet into the current page + * + * @param path The url to the stylesheet + * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues + */ + + }, { + key: "loadStylesheet", + value: function loadStylesheet(path, avoidCache) { + if (avoidCache) { + path += "?" + encodeURIComponent(new Date().getTime().toString()); + } + var head = document.getElementsByTagName("head"); + if (head.length > 0) { + var e = document.createElement("link"); + head[0].appendChild(e); + e.setAttribute("type", "text/css"); + e.setAttribute("rel", "stylesheet"); + e.setAttribute("href", path); + } + } + /** + * Combines an arbitrary set of paths ensuring that the slashes are normalized + * + * @param paths 0 to n path parts to combine + */ + + }, { + key: "combinePaths", + value: function combinePaths() { + for (var _len2 = arguments.length, paths = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + paths[_key2] = arguments[_key2]; + } + + return paths.filter(function (path) { + return typeof path !== "undefined" && path !== null; + }).map(function (path) { + return path.replace(/^[\\|\/]/, "").replace(/[\\|\/]$/, ""); + }).join("/").replace(/\\/g, "/"); + } + /** + * Gets a random string of chars length + * + * @param chars The length of the random string to generate + */ + + }, { + key: "getRandomString", + value: function getRandomString(chars) { + var text = new Array(chars); + var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + for (var i = 0; i < chars; i++) { + text[i] = possible.charAt(Math.floor(Math.random() * possible.length)); + } + return text.join(""); + } + /** + * Gets a random GUID value + * + * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + */ + /* tslint:disable no-bitwise */ + + }, { + key: "getGUID", + value: function getGUID() { + var d = new Date().getTime(); + var guid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === "x" ? r : r & 0x3 | 0x8).toString(16); + }); + return guid; + } + /* tslint:enable */ + /** + * Determines if a given value is a function + * + * @param candidateFunction The thing to test for being a function + */ + + }, { + key: "isFunction", + value: function isFunction(candidateFunction) { + return typeof candidateFunction === "function"; + } + /** + * @returns whether the provided parameter is a JavaScript Array or not. + */ + + }, { + key: "isArray", + value: function isArray(array) { + if (Array.isArray) { + return Array.isArray(array); + } + return array && typeof array.length === "number" && array.constructor === Array; + } + /** + * Determines if a string is null or empty or undefined + * + * @param s The string to test + */ + + }, { + key: "stringIsNullOrEmpty", + value: function stringIsNullOrEmpty(s) { + return typeof s === "undefined" || s === null || s === ""; + } + /** + * Provides functionality to extend the given object by doing a shallow copy + * + * @param target The object to which properties will be copied + * @param source The source object from which properties will be copied + * @param noOverwrite If true existing properties on the target are not overwritten from the source + * + */ + + }, { + key: "extend", + value: function extend(target, source) { + var noOverwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (source === null || typeof source === "undefined") { + return target; + } + // ensure we don't overwrite things we don't want overwritten + var check = noOverwrite ? function (o, i) { + return !(i in o); + } : function () { + return true; + }; + return Object.getOwnPropertyNames(source).filter(function (v) { + return check(target, v); + }).reduce(function (t, v) { + t[v] = source[v]; + return t; + }, target); + } + /** + * Determines if a given url is absolute + * + * @param url The url to check to see if it is absolute + */ + + }, { + key: "isUrlAbsolute", + value: function isUrlAbsolute(url) { + return (/^https?:\/\/|^\/\//i.test(url) + ); + } + /** + * Attempts to make the supplied relative url absolute based on the _spPageContextInfo object, if available + * + * @param url The relative url to make absolute + */ + + }, { + key: "makeUrlAbsolute", + value: function makeUrlAbsolute(url) { + if (Util.isUrlAbsolute(url)) { + return url; + } + if (typeof global._spPageContextInfo !== "undefined") { + if (global._spPageContextInfo.hasOwnProperty("webAbsoluteUrl")) { + return Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, url); + } else if (global._spPageContextInfo.hasOwnProperty("webServerRelativeUrl")) { + return Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, url); + } + } else { + return url; + } + } + /** + * Ensures that a given url is absolute for the current web based on context + * + * @param candidateUrl The url to make absolute + * + */ + + }, { + key: "toAbsoluteUrl", + value: function toAbsoluteUrl(candidateUrl) { + return new Promise(function (resolve) { + if (Util.isUrlAbsolute(candidateUrl)) { + // if we are already absolute, then just return the url + return resolve(candidateUrl); + } + if (pnplibconfig_1.RuntimeConfig.baseUrl !== null) { + // base url specified either with baseUrl of spfxContext config property + return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.baseUrl, candidateUrl)); + } + if (typeof global._spPageContextInfo !== "undefined") { + // operating in classic pages + if (global._spPageContextInfo.hasOwnProperty("webAbsoluteUrl")) { + return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl)); + } else if (global._spPageContextInfo.hasOwnProperty("webServerRelativeUrl")) { + return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl)); + } + } + // does window.location exist and have _layouts in it? + if (typeof global.location !== "undefined") { + var index = global.location.toString().toLowerCase().indexOf("/_layouts/"); + if (index > 0) { + // we are likely in the workbench in /_layouts/ + return resolve(Util.combinePaths(global.location.toString().substr(0, index), candidateUrl)); + } + } + return resolve(candidateUrl); + }); + } + }]); + + return Util; + }(); + + __decorate([decorators_1.deprecated("The Util.makeUrlAbsolute method is deprecated and will be removed from future releases. Use Util.toAbsoluteUrl instead")], Util, "makeUrlAbsolute", null); + exports.Util = Util; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var logging_1 = __webpack_require__(3); + function deprecated(message) { + return function (target, propertyKey, descriptor) { + var method = descriptor.value; + descriptor.value = function () { + logging_1.Logger.log({ + data: { + descriptor: descriptor, + propertyKey: propertyKey, + target: target + }, + level: logging_1.LogLevel.Warning, + message: message + }); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return method.apply(this, args); + }; + }; + } + exports.deprecated = deprecated; + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + "use strict"; + /** + * A set of logging levels + * + */ + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var LogLevel; + (function (LogLevel) { + LogLevel[LogLevel["Verbose"] = 0] = "Verbose"; + LogLevel[LogLevel["Info"] = 1] = "Info"; + LogLevel[LogLevel["Warning"] = 2] = "Warning"; + LogLevel[LogLevel["Error"] = 3] = "Error"; + LogLevel[LogLevel["Off"] = 99] = "Off"; + })(LogLevel = exports.LogLevel || (exports.LogLevel = {})); + /** + * Class used to subscribe ILogListener and log messages throughout an application + * + */ + + var Logger = function () { + function Logger() { + _classCallCheck(this, Logger); + } + + _createClass(Logger, null, [{ + key: "subscribe", + + /** + * Adds ILogListener instances to the set of subscribed listeners + * + * @param listeners One or more listeners to subscribe to this log + */ + value: function subscribe() { + for (var _len = arguments.length, listeners = Array(_len), _key = 0; _key < _len; _key++) { + listeners[_key] = arguments[_key]; + } + + listeners.map(function (listener) { + return Logger.instance.subscribe(listener); + }); + } + /** + * Clears the subscribers collection, returning the collection before modifiction + */ + + }, { + key: "clearSubscribers", + value: function clearSubscribers() { + return Logger.instance.clearSubscribers(); + } + /** + * Gets the current subscriber count + */ + + }, { + key: "write", + + /** + * Writes the supplied string to the subscribed listeners + * + * @param message The message to write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + value: function write(message) { + var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose; + + Logger.instance.log({ level: level, message: message }); + } + /** + * Writes the supplied string to the subscribed listeners + * + * @param json The json object to stringify and write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + + }, { + key: "writeJSON", + value: function writeJSON(json) { + var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose; + + Logger.instance.log({ level: level, message: JSON.stringify(json) }); + } + /** + * Logs the supplied entry to the subscribed listeners + * + * @param entry The message to log + */ + + }, { + key: "log", + value: function log(entry) { + Logger.instance.log(entry); + } + /** + * Logs performance tracking data for the the execution duration of the supplied function using console.profile + * + * @param name The name of this profile boundary + * @param f The function to execute and track within this performance boundary + */ + + }, { + key: "measure", + value: function measure(name, f) { + return Logger.instance.measure(name, f); + } + }, { + key: "activeLogLevel", + get: function get() { + return Logger.instance.activeLogLevel; + }, + set: function set(value) { + Logger.instance.activeLogLevel = value; + } + }, { + key: "instance", + get: function get() { + if (typeof Logger._instance === "undefined" || Logger._instance === null) { + Logger._instance = new LoggerImpl(); + } + return Logger._instance; + } + }, { + key: "count", + get: function get() { + return Logger.instance.count; + } + }]); + + return Logger; + }(); + + exports.Logger = Logger; + + var LoggerImpl = function () { + function LoggerImpl() { + var activeLogLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LogLevel.Warning; + var subscribers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + _classCallCheck(this, LoggerImpl); + + this.activeLogLevel = activeLogLevel; + this.subscribers = subscribers; + } + + _createClass(LoggerImpl, [{ + key: "subscribe", + value: function subscribe(listener) { + this.subscribers.push(listener); + } + }, { + key: "clearSubscribers", + value: function clearSubscribers() { + var s = this.subscribers.slice(0); + this.subscribers.length = 0; + return s; + } + }, { + key: "write", + value: function write(message) { + var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose; + + this.log({ level: level, message: message }); + } + }, { + key: "log", + value: function log(entry) { + if (typeof entry === "undefined" || entry.level < this.activeLogLevel) { + return; + } + this.subscribers.map(function (subscriber) { + return subscriber.log(entry); + }); + } + }, { + key: "measure", + value: function measure(name, f) { + console.profile(name); + try { + return f(); + } finally { + console.profileEnd(); + } + } + }, { + key: "count", + get: function get() { + return this.subscribers.length; + } + }]); + + return LoggerImpl; + }(); + /** + * Implementation of ILogListener which logs to the browser console + * + */ + + + var ConsoleListener = function () { + function ConsoleListener() { + _classCallCheck(this, ConsoleListener); + } + + _createClass(ConsoleListener, [{ + key: "log", + + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + value: function log(entry) { + var msg = this.format(entry); + switch (entry.level) { + case LogLevel.Verbose: + case LogLevel.Info: + console.log(msg); + break; + case LogLevel.Warning: + console.warn(msg); + break; + case LogLevel.Error: + console.error(msg); + break; + } + } + /** + * Formats the message + * + * @param entry The information to format into a string + */ + + }, { + key: "format", + value: function format(entry) { + return "Message: " + entry.message + " Data: " + JSON.stringify(entry.data); + } + }]); + + return ConsoleListener; + }(); + + exports.ConsoleListener = ConsoleListener; + /** + * Implementation of ILogListener which logs to the supplied function + * + */ + + var FunctionListener = function () { + /** + * Creates a new instance of the FunctionListener class + * + * @constructor + * @param method The method to which any logging data will be passed + */ + function FunctionListener(method) { + _classCallCheck(this, FunctionListener); + + this.method = method; + } + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + + + _createClass(FunctionListener, [{ + key: "log", + value: function log(entry) { + this.method(entry); + } + }]); + + return FunctionListener; + }(); + + exports.FunctionListener = FunctionListener; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var fetchclient_1 = __webpack_require__(5); + + var RuntimeConfigImpl = function () { + function RuntimeConfigImpl() { + _classCallCheck(this, RuntimeConfigImpl); + + // these are our default values for the library + this._headers = null; + this._defaultCachingStore = "session"; + this._defaultCachingTimeoutSeconds = 30; + this._globalCacheDisable = false; + this._fetchClientFactory = function () { + return new fetchclient_1.FetchClient(); + }; + this._baseUrl = null; + this._spfxContext = null; + } + + _createClass(RuntimeConfigImpl, [{ + key: "set", + value: function set(config) { + if (config.hasOwnProperty("headers")) { + this._headers = config.headers; + } + if (config.hasOwnProperty("globalCacheDisable")) { + this._globalCacheDisable = config.globalCacheDisable; + } + if (config.hasOwnProperty("defaultCachingStore")) { + this._defaultCachingStore = config.defaultCachingStore; + } + if (config.hasOwnProperty("defaultCachingTimeoutSeconds")) { + this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds; + } + if (config.hasOwnProperty("fetchClientFactory")) { + this._fetchClientFactory = config.fetchClientFactory; + } + if (config.hasOwnProperty("baseUrl")) { + this._baseUrl = config.baseUrl; + } + if (config.hasOwnProperty("spFXContext")) { + this._spfxContext = config.spfxContext; + } + } + }, { + key: "headers", + get: function get() { + return this._headers; + } + }, { + key: "defaultCachingStore", + get: function get() { + return this._defaultCachingStore; + } + }, { + key: "defaultCachingTimeoutSeconds", + get: function get() { + return this._defaultCachingTimeoutSeconds; + } + }, { + key: "globalCacheDisable", + get: function get() { + return this._globalCacheDisable; + } + }, { + key: "fetchClientFactory", + get: function get() { + return this._fetchClientFactory; + } + }, { + key: "baseUrl", + get: function get() { + if (this._baseUrl !== null) { + return this._baseUrl; + } else if (this._spfxContext !== null) { + return this._spfxContext.pageContext.web.absoluteUrl; + } + return null; + } + }]); + + return RuntimeConfigImpl; + }(); + + exports.RuntimeConfigImpl = RuntimeConfigImpl; + var _runtimeConfig = new RuntimeConfigImpl(); + exports.RuntimeConfig = _runtimeConfig; + function setRuntimeConfig(config) { + _runtimeConfig.set(config); + } + exports.setRuntimeConfig = setRuntimeConfig; + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {"use strict"; + /** + * Makes requests using the fetch API + */ + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var FetchClient = function () { + function FetchClient() { + _classCallCheck(this, FetchClient); + } + + _createClass(FetchClient, [{ + key: "fetch", + value: function fetch(url, options) { + return global.fetch(url, options); + } + }]); + + return FetchClient; + }(); + + exports.FetchClient = FetchClient; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var util_1 = __webpack_require__(1); + /** + * A wrapper class to provide a consistent interface to browser based storage + * + */ + + var PnPClientStorageWrapper = function () { + /** + * Creates a new instance of the PnPClientStorageWrapper class + * + * @constructor + */ + function PnPClientStorageWrapper(store, defaultTimeoutMinutes) { + _classCallCheck(this, PnPClientStorageWrapper); + + this.store = store; + this.defaultTimeoutMinutes = defaultTimeoutMinutes; + this.defaultTimeoutMinutes = defaultTimeoutMinutes === void 0 ? 5 : defaultTimeoutMinutes; + this.enabled = this.test(); + } + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + + + _createClass(PnPClientStorageWrapper, [{ + key: "get", + value: function get(key) { + if (!this.enabled) { + return null; + } + var o = this.store.getItem(key); + if (o == null) { + return null; + } + var persistable = JSON.parse(o); + if (new Date(persistable.expiration) <= new Date()) { + this.delete(key); + return null; + } else { + return persistable.value; + } + } + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + + }, { + key: "put", + value: function put(key, o, expire) { + if (this.enabled) { + this.store.setItem(key, this.createPersistable(o, expire)); + } + } + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + + }, { + key: "delete", + value: function _delete(key) { + if (this.enabled) { + this.store.removeItem(key); + } + } + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + + }, { + key: "getOrPut", + value: function getOrPut(key, getter, expire) { + var _this = this; + + if (!this.enabled) { + return getter(); + } + return new Promise(function (resolve) { + var o = _this.get(key); + if (o == null) { + getter().then(function (d) { + _this.put(key, d, expire); + resolve(d); + }); + } else { + resolve(o); + } + }); + } + /** + * Used to determine if the wrapped storage is available currently + */ + + }, { + key: "test", + value: function test() { + var str = "test"; + try { + this.store.setItem(str, str); + this.store.removeItem(str); + return true; + } catch (e) { + return false; + } + } + /** + * Creates the persistable to store + */ + + }, { + key: "createPersistable", + value: function createPersistable(o, expire) { + if (typeof expire === "undefined") { + expire = util_1.Util.dateAdd(new Date(), "minute", this.defaultTimeoutMinutes); + } + return JSON.stringify({ expiration: expire, value: o }); + } + }]); + + return PnPClientStorageWrapper; + }(); + + exports.PnPClientStorageWrapper = PnPClientStorageWrapper; + /** + * A class that will establish wrappers for both local and session storage + */ + + var PnPClientStorage = + /** + * Creates a new instance of the PnPClientStorage class + * + * @constructor + */ + function PnPClientStorage() { + _classCallCheck(this, PnPClientStorage); + + this.local = typeof localStorage !== "undefined" ? new PnPClientStorageWrapper(localStorage) : null; + this.session = typeof sessionStorage !== "undefined" ? new PnPClientStorageWrapper(sessionStorage) : null; + }; + + exports.PnPClientStorage = PnPClientStorage; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var collections_1 = __webpack_require__(8); + /** + * Class used to manage the current application settings + * + */ + + var Settings = function () { + /** + * Creates a new instance of the settings class + * + * @constructor + */ + function Settings() { + _classCallCheck(this, Settings); + + this._settings = new collections_1.Dictionary(); + } + /** + * Adds a new single setting, or overwrites a previous setting with the same key + * + * @param {string} key The key used to store this setting + * @param {string} value The setting value to store + */ + + + _createClass(Settings, [{ + key: "add", + value: function add(key, value) { + this._settings.add(key, value); + } + /** + * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read + * + * @param {string} key The key used to store this setting + * @param {any} value The setting value to store + */ + + }, { + key: "addJSON", + value: function addJSON(key, value) { + this._settings.add(key, JSON.stringify(value)); + } + /** + * Applies the supplied hash to the setting collection overwriting any existing value, or created new values + * + * @param {TypedHash} hash The set of values to add + */ + + }, { + key: "apply", + value: function apply(hash) { + var _this = this; + + return new Promise(function (resolve, reject) { + try { + _this._settings.merge(hash); + resolve(); + } catch (e) { + reject(e); + } + }); + } + /** + * Loads configuration settings into the collection from the supplied provider and returns a Promise + * + * @param {IConfigurationProvider} provider The provider from which we will load the settings + */ + + }, { + key: "load", + value: function load(provider) { + var _this2 = this; + + return new Promise(function (resolve, reject) { + provider.getConfiguration().then(function (value) { + _this2._settings.merge(value); + resolve(); + }).catch(function (reason) { + reject(reason); + }); + }); + } + /** + * Gets a value from the configuration + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {string} string value from the configuration + */ + + }, { + key: "get", + value: function get(key) { + return this._settings.get(key); + } + /** + * Gets a JSON value, rehydrating the stored string to the original object + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {any} object from the configuration + */ + + }, { + key: "getJSON", + value: function getJSON(key) { + var o = this.get(key); + if (typeof o === "undefined" || o === null) { + return o; + } + return JSON.parse(o); + } + }]); + + return Settings; + }(); + + exports.Settings = Settings; + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + "use strict"; + /** + * Generic dictionary + */ + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var Dictionary = function () { + /** + * Creates a new instance of the Dictionary class + * + * @constructor + */ + function Dictionary() { + var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + _classCallCheck(this, Dictionary); + + this.keys = keys; + this.values = values; + } + /** + * Gets a value from the collection using the specified key + * + * @param key The key whose value we want to return, returns null if the key does not exist + */ + + + _createClass(Dictionary, [{ + key: "get", + value: function get(key) { + var index = this.keys.indexOf(key); + if (index < 0) { + return null; + } + return this.values[index]; + } + /** + * Adds the supplied key and value to the dictionary + * + * @param key The key to add + * @param o The value to add + */ + + }, { + key: "add", + value: function add(key, o) { + var index = this.keys.indexOf(key); + if (index > -1) { + this.values[index] = o; + } else { + this.keys.push(key); + this.values.push(o); + } + } + /** + * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate. + */ + + }, { + key: "merge", + value: function merge(source) { + var _this = this; + + if ("getKeys" in source) { + (function () { + var sourceAsDictionary = source; + sourceAsDictionary.getKeys().map(function (key) { + _this.add(key, sourceAsDictionary.get(key)); + }); + })(); + } else { + var sourceAsHash = source; + for (var key in sourceAsHash) { + if (sourceAsHash.hasOwnProperty(key)) { + this.add(key, sourceAsHash[key]); + } + } + } + } + /** + * Removes a value from the dictionary + * + * @param key The key of the key/value pair to remove. Returns null if the key was not found. + */ + + }, { + key: "remove", + value: function remove(key) { + var index = this.keys.indexOf(key); + if (index < 0) { + return null; + } + var val = this.values[index]; + this.keys.splice(index, 1); + this.values.splice(index, 1); + return val; + } + /** + * Returns all the keys currently in the dictionary as an array + */ + + }, { + key: "getKeys", + value: function getKeys() { + return this.keys; + } + /** + * Returns all the values currently in the dictionary as an array + */ + + }, { + key: "getValues", + value: function getValues() { + return this.values; + } + /** + * Clears the current dictionary + */ + + }, { + key: "clear", + value: function clear() { + this.keys = []; + this.values = []; + } + /** + * Gets a count of the items currently in the dictionary + */ + + }, { + key: "count", + value: function count() { + return this.keys.length; + } + }]); + + return Dictionary; + }(); + + exports.Dictionary = Dictionary; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var search_1 = __webpack_require__(10); + var searchsuggest_1 = __webpack_require__(18); + var site_1 = __webpack_require__(19); + var webs_1 = __webpack_require__(20); + var util_1 = __webpack_require__(1); + var userprofiles_1 = __webpack_require__(40); + var exceptions_1 = __webpack_require__(15); + /** + * Root of the SharePoint REST module + */ + + var Rest = function () { + function Rest() { + _classCallCheck(this, Rest); + } + + _createClass(Rest, [{ + key: "searchSuggest", + + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + value: function searchSuggest(query) { + var finalQuery = void 0; + if (typeof query === "string") { + finalQuery = { querytext: query }; + } else { + finalQuery = query; + } + return new searchsuggest_1.SearchSuggest("").execute(finalQuery); + } + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + + }, { + key: "search", + value: function search(query) { + var finalQuery = void 0; + if (typeof query === "string") { + finalQuery = { Querytext: query }; + } else { + finalQuery = query; + } + return new search_1.Search("").execute(finalQuery); + } + /** + * Begins a site collection scoped REST request + * + */ + + }, { + key: "createBatch", + + /** + * Creates a new batch object for use with the Queryable.addToBatch method + * + */ + value: function createBatch() { + return this.web.createBatch(); + } + /** + * Begins a cross-domain, host site scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + + }, { + key: "crossDomainSite", + value: function crossDomainSite(addInWebUrl, hostWebUrl) { + return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, "site"); + } + /** + * Begins a cross-domain, host web scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + + }, { + key: "crossDomainWeb", + value: function crossDomainWeb(addInWebUrl, hostWebUrl) { + return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, "web"); + } + /** + * Implements the creation of cross domain REST urls + * + * @param factory The constructor of the object to create Site | Web + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + * @param urlPart String part to append to the url "site" | "web" + */ + + }, { + key: "_cdImpl", + value: function _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart) { + if (!util_1.Util.isUrlAbsolute(addInWebUrl)) { + throw new exceptions_1.UrlException("The addInWebUrl parameter must be an absolute url."); + } + if (!util_1.Util.isUrlAbsolute(hostWebUrl)) { + throw new exceptions_1.UrlException("The hostWebUrl parameter must be an absolute url."); + } + var url = util_1.Util.combinePaths(addInWebUrl, "_api/SP.AppContextSite(@target)"); + var instance = new factory(url, urlPart); + instance.query.add("@target", "'" + encodeURIComponent(hostWebUrl) + "'"); + return instance; + } + }, { + key: "site", + get: function get() { + return new site_1.Site(""); + } + /** + * Begins a web scoped REST request + * + */ + + }, { + key: "web", + get: function get() { + return new webs_1.Web(""); + } + /** + * Access to user profile methods + * + */ + + }, { + key: "profiles", + get: function get() { + return new userprofiles_1.UserProfileQuery(""); + } + }]); + + return Rest; + }(); + + exports.Rest = Rest; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var util_1 = __webpack_require__(1); + /** + * Describes the search API + * + */ + + var Search = function (_queryable_1$Queryabl) { + _inherits(Search, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Search class + * + * @param baseUrl The url for the search context + * @param query The SearchQuery object to execute + */ + function Search(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/search/postquery"; + + _classCallCheck(this, Search); + + return _possibleConstructorReturn(this, (Search.__proto__ || Object.getPrototypeOf(Search)).call(this, baseUrl, path)); + } + /** + * ....... + * @returns Promise + */ + + + _createClass(Search, [{ + key: "execute", + value: function execute(query) { + var formattedBody = void 0; + formattedBody = query; + if (formattedBody.SelectProperties) { + formattedBody.SelectProperties = { results: query.SelectProperties }; + } + if (formattedBody.RefinementFilters) { + formattedBody.RefinementFilters = { results: query.RefinementFilters }; + } + if (formattedBody.SortList) { + formattedBody.SortList = { results: query.SortList }; + } + if (formattedBody.HithighlightedProperties) { + formattedBody.HithighlightedProperties = { results: query.HithighlightedProperties }; + } + if (formattedBody.ReorderingRules) { + formattedBody.ReorderingRules = { results: query.ReorderingRules }; + } + if (formattedBody.Properties) { + formattedBody.Properties = { results: query.Properties }; + } + var postBody = JSON.stringify({ + request: util_1.Util.extend({ + "__metadata": { "type": "Microsoft.Office.Server.Search.REST.SearchRequest" } + }, formattedBody) + }); + return this.post({ body: postBody }).then(function (data) { + return new SearchResults(data); + }); + } + }]); + + return Search; + }(queryable_1.QueryableInstance); + + exports.Search = Search; + /** + * Describes the SearchResults class, which returns the formatted and raw version of the query response + */ + + var SearchResults = function () { + /** + * Creates a new instance of the SearchResult class + * + */ + function SearchResults(rawResponse) { + _classCallCheck(this, SearchResults); + + var response = rawResponse.postquery ? rawResponse.postquery : rawResponse; + this.PrimarySearchResults = this.formatSearchResults(response.PrimaryQueryResult.RelevantResults.Table.Rows); + this.RawSearchResults = response; + this.ElapsedTime = response.ElapsedTime; + this.RowCount = response.PrimaryQueryResult.RelevantResults.RowCount; + this.TotalRows = response.PrimaryQueryResult.RelevantResults.TotalRows; + this.TotalRowsIncludingDuplicates = response.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates; + } + /** + * Formats a search results array + * + * @param rawResults The array to process + */ + + + _createClass(SearchResults, [{ + key: "formatSearchResults", + value: function formatSearchResults(rawResults) { + var results = new Array(), + tempResults = rawResults.results ? rawResults.results : rawResults; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = tempResults[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var i = _step.value; + + results.push(new SearchResult(i.Cells)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return results; + } + }]); + + return SearchResults; + }(); + + exports.SearchResults = SearchResults; + /** + * Describes the SearchResult class + */ + + var SearchResult = + /** + * Creates a new instance of the SearchResult class + * + */ + function SearchResult(rawItem) { + _classCallCheck(this, SearchResult); + + var item = rawItem.results ? rawItem.results : rawItem; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = item[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var i = _step2.value; + + Object.defineProperty(this, i.Key, { + configurable: false, + enumerable: false, + value: i.Value, + writable: false + }); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + }; + + exports.SearchResult = SearchResult; + /** + * defines the SortDirection enum + */ + var SortDirection; + (function (SortDirection) { + SortDirection[SortDirection["Ascending"] = 0] = "Ascending"; + SortDirection[SortDirection["Descending"] = 1] = "Descending"; + SortDirection[SortDirection["FQLFormula"] = 2] = "FQLFormula"; + })(SortDirection = exports.SortDirection || (exports.SortDirection = {})); + /** + * defines the ReorderingRuleMatchType enum + */ + var ReorderingRuleMatchType; + (function (ReorderingRuleMatchType) { + ReorderingRuleMatchType[ReorderingRuleMatchType["ResultContainsKeyword"] = 0] = "ResultContainsKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["TitleContainsKeyword"] = 1] = "TitleContainsKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["TitleMatchesKeyword"] = 2] = "TitleMatchesKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["UrlStartsWith"] = 3] = "UrlStartsWith"; + ReorderingRuleMatchType[ReorderingRuleMatchType["UrlExactlyMatches"] = 4] = "UrlExactlyMatches"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ContentTypeIs"] = 5] = "ContentTypeIs"; + ReorderingRuleMatchType[ReorderingRuleMatchType["FileExtensionMatches"] = 6] = "FileExtensionMatches"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ResultHasTag"] = 7] = "ResultHasTag"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ManualCondition"] = 8] = "ManualCondition"; + })(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {})); + /** + * Specifies the type value for the property + */ + var QueryPropertyValueType; + (function (QueryPropertyValueType) { + QueryPropertyValueType[QueryPropertyValueType["None"] = 0] = "None"; + QueryPropertyValueType[QueryPropertyValueType["StringType"] = 1] = "StringType"; + QueryPropertyValueType[QueryPropertyValueType["Int32TYpe"] = 2] = "Int32TYpe"; + QueryPropertyValueType[QueryPropertyValueType["BooleanType"] = 3] = "BooleanType"; + QueryPropertyValueType[QueryPropertyValueType["StringArrayType"] = 4] = "StringArrayType"; + QueryPropertyValueType[QueryPropertyValueType["UnSupportedType"] = 5] = "UnSupportedType"; + })(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {})); + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var util_1 = __webpack_require__(1); + var collections_1 = __webpack_require__(8); + var odata_1 = __webpack_require__(12); + var pnplibconfig_1 = __webpack_require__(4); + var exceptions_1 = __webpack_require__(15); + var queryablerequest_1 = __webpack_require__(16); + /** + * Queryable Base Class + * + */ + + var Queryable = function () { + _createClass(Queryable, [{ + key: "concat", + + /** + * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * + * @param pathPart The string to concatonate to the url + */ + value: function concat(pathPart) { + this._url += pathPart; + } + /** + * Appends the given string and normalizes "/" chars + * + * @param pathPart The string to append + */ + + }, { + key: "append", + value: function append(pathPart) { + this._url = util_1.Util.combinePaths(this._url, pathPart); + } + /** + * Blocks a batch call from occuring, MUST be cleared by calling the returned function + */ + + }, { + key: "addBatchDependency", + value: function addBatchDependency() { + if (this.hasBatch) { + return this._batch.addBatchDependency(); + } + return function () { + return null; + }; + } + /** + * Indicates if the current query has a batch associated + * + */ + + }, { + key: "hasBatch", + get: function get() { + return this._batch !== null; + } + /** + * Gets the parent url used when creating this instance + * + */ + + }, { + key: "parentUrl", + get: function get() { + return this._parentUrl; + } + /** + * Provides access to the query builder for this url + * + */ + + }, { + key: "query", + get: function get() { + return this._query; + } + /** + * Creates a new instance of the Queryable class + * + * @constructor + * @param baseUrl A string or Queryable that should form the base part of the url + * + */ + + }]); + + function Queryable(baseUrl, path) { + _classCallCheck(this, Queryable); + + this._query = new collections_1.Dictionary(); + this._batch = null; + if (typeof baseUrl === "string") { + // we need to do some extra parsing to get the parent url correct if we are + // being created from just a string. + var urlStr = baseUrl; + if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf("/") < 0) { + this._parentUrl = urlStr; + this._url = util_1.Util.combinePaths(urlStr, path); + } else if (urlStr.lastIndexOf("/") > urlStr.lastIndexOf("(")) { + // .../items(19)/fields + var index = urlStr.lastIndexOf("/"); + this._parentUrl = urlStr.slice(0, index); + path = util_1.Util.combinePaths(urlStr.slice(index), path); + this._url = util_1.Util.combinePaths(this._parentUrl, path); + } else { + // .../items(19) + var _index = urlStr.lastIndexOf("("); + this._parentUrl = urlStr.slice(0, _index); + this._url = util_1.Util.combinePaths(urlStr, path); + } + } else { + var q = baseUrl; + this._parentUrl = q._url; + var target = q._query.get("@target"); + if (target !== null) { + this._query.add("@target", target); + } + this._url = util_1.Util.combinePaths(this._parentUrl, path); + } + } + /** + * Adds this query to the supplied batch + * + * @example + * ``` + * + * let b = pnp.sp.createBatch(); + * pnp.sp.web.inBatch(b).get().then(...); + * b.execute().then(...) + * ``` + */ + + + _createClass(Queryable, [{ + key: "inBatch", + value: function inBatch(batch) { + if (this._batch !== null) { + throw new exceptions_1.AlreadyInBatchException(); + } + this._batch = batch; + return this; + } + /** + * Enables caching for this request + * + * @param options Defines the options used when caching this request + */ + + }, { + key: "usingCaching", + value: function usingCaching(options) { + if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) { + this._useCaching = true; + this._cachingOptions = options; + } + return this; + } + /** + * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object + * + */ + + }, { + key: "toUrl", + value: function toUrl() { + return this._url; + } + /** + * Gets the full url with query information + * + */ + + }, { + key: "toUrlAndQuery", + value: function toUrlAndQuery() { + var _this = this; + + var url = this.toUrl(); + if (this._query.count() > 0) { + url += "?" + this._query.getKeys().map(function (key) { + return key + "=" + _this._query.get(key); + }).join("&"); + } + return url; + } + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + + }, { + key: "getParent", + value: function getParent(factory) { + var baseUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.parentUrl; + var path = arguments[2]; + + var parent = new factory(baseUrl, path); + var target = this.query.get("@target"); + if (target !== null) { + parent.query.add("@target", target); + } + return parent; + } + /** + * Executes the currently built request + * + * @param parser Allows you to specify a parser to handle the result + * @param getOptions The options used for this request + */ + + }, { + key: "get", + value: function get() { + var parser = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new odata_1.ODataDefaultParser(); + var getOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return this.toRequestContext("GET", getOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "getAs", + value: function getAs() { + var parser = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new odata_1.ODataDefaultParser(); + var getOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return this.toRequestContext("GET", getOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "post", + value: function post() { + var postOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser(); + + return this.toRequestContext("POST", postOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "postAs", + value: function postAs() { + var postOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser(); + + return this.toRequestContext("POST", postOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "patch", + value: function patch() { + var patchOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser(); + + return this.toRequestContext("PATCH", patchOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "delete", + value: function _delete() { + var deleteOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser(); + + return this.toRequestContext("DELETE", deleteOptions, parser).then(function (context) { + return queryablerequest_1.pipe(context); + }); + } + }, { + key: "toRequestContext", + value: function toRequestContext(verb) { + var _this2 = this; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var parser = arguments[2]; + + var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { + return; + }; + return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) { + // build our request context + var context = { + batch: _this2._batch, + batchDependency: dependencyDispose, + cachingOptions: _this2._cachingOptions, + isBatched: _this2.hasBatch, + isCached: _this2._useCaching, + options: options, + parser: parser, + requestAbsoluteUrl: url, + requestId: util_1.Util.getGUID(), + verb: verb + }; + return context; + }); + } + }]); + + return Queryable; + }(); + + exports.Queryable = Queryable; + /** + * Represents a REST collection which can be filtered, paged, and selected + * + */ + + var QueryableCollection = function (_Queryable) { + _inherits(QueryableCollection, _Queryable); + + function QueryableCollection() { + _classCallCheck(this, QueryableCollection); + + return _possibleConstructorReturn(this, (QueryableCollection.__proto__ || Object.getPrototypeOf(QueryableCollection)).apply(this, arguments)); + } + + _createClass(QueryableCollection, [{ + key: "filter", + + /** + * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported) + * + * @param filter The string representing the filter query + */ + value: function filter(_filter) { + this._query.add("$filter", _filter); + return this; + } + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + + }, { + key: "select", + value: function select() { + for (var _len = arguments.length, selects = Array(_len), _key = 0; _key < _len; _key++) { + selects[_key] = arguments[_key]; + } + + this._query.add("$select", selects.join(",")); + return this; + } + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + + }, { + key: "expand", + value: function expand() { + for (var _len2 = arguments.length, expands = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + expands[_key2] = arguments[_key2]; + } + + this._query.add("$expand", expands.join(",")); + return this; + } + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + + }, { + key: "orderBy", + value: function orderBy(_orderBy) { + var ascending = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var keys = this._query.getKeys(); + var query = []; + var asc = ascending ? " asc" : " desc"; + for (var i = 0; i < keys.length; i++) { + if (keys[i] === "$orderby") { + query.push(this._query.get("$orderby")); + break; + } + } + query.push("" + _orderBy + asc); + this._query.add("$orderby", query.join(",")); + return this; + } + /** + * Skips the specified number of items + * + * @param skip The number of items to skip + */ + + }, { + key: "skip", + value: function skip(_skip) { + this._query.add("$skip", _skip.toString()); + return this; + } + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + + }, { + key: "top", + value: function top(_top) { + this._query.add("$top", _top.toString()); + return this; + } + }]); + + return QueryableCollection; + }(Queryable); + + exports.QueryableCollection = QueryableCollection; + /** + * Represents an instance that can be selected + * + */ + + var QueryableInstance = function (_Queryable2) { + _inherits(QueryableInstance, _Queryable2); + + function QueryableInstance() { + _classCallCheck(this, QueryableInstance); + + return _possibleConstructorReturn(this, (QueryableInstance.__proto__ || Object.getPrototypeOf(QueryableInstance)).apply(this, arguments)); + } + + _createClass(QueryableInstance, [{ + key: "select", + + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + value: function select() { + for (var _len3 = arguments.length, selects = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + selects[_key3] = arguments[_key3]; + } + + this._query.add("$select", selects.join(",")); + return this; + } + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + + }, { + key: "expand", + value: function expand() { + for (var _len4 = arguments.length, expands = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + expands[_key4] = arguments[_key4]; + } + + this._query.add("$expand", expands.join(",")); + return this; + } + }]); + + return QueryableInstance; + }(Queryable); + + exports.QueryableInstance = QueryableInstance; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var util_1 = __webpack_require__(1); + var logging_1 = __webpack_require__(3); + var httpclient_1 = __webpack_require__(13); + var pnplibconfig_1 = __webpack_require__(4); + var exceptions_1 = __webpack_require__(15); + var exceptions_2 = __webpack_require__(15); + function extractOdataId(candidate) { + if (candidate.hasOwnProperty("odata.id")) { + return candidate["odata.id"]; + } else if (candidate.hasOwnProperty("__metadata") && candidate.__metadata.hasOwnProperty("id")) { + return candidate.__metadata.id; + } else { + throw new exceptions_1.ODataIdException(candidate); + } + } + exports.extractOdataId = extractOdataId; + + var ODataParserBase = function () { + function ODataParserBase() { + _classCallCheck(this, ODataParserBase); + } + + _createClass(ODataParserBase, [{ + key: "parse", + value: function parse(r) { + var _this = this; + + return new Promise(function (resolve, reject) { + if (_this.handleError(r, reject)) { + if (r.headers.has("Content-Length") && parseFloat(r.headers.get("Content-Length")) === 0 || r.status === 204) { + resolve({}); + } else { + r.json().then(function (json) { + return resolve(_this.parseODataJSON(json)); + }); + } + } + }); + } + }, { + key: "handleError", + value: function handleError(r, reject) { + if (!r.ok) { + r.json().then(function (json) { + reject(new exceptions_2.ProcessHttpClientResponseException(r.status, r.statusText, json)); + }); + } + return r.ok; + } + }, { + key: "parseODataJSON", + value: function parseODataJSON(json) { + var result = json; + if (json.hasOwnProperty("d")) { + if (json.d.hasOwnProperty("results")) { + result = json.d.results; + } else { + result = json.d; + } + } else if (json.hasOwnProperty("value")) { + result = json.value; + } + return result; + } + }]); + + return ODataParserBase; + }(); + + exports.ODataParserBase = ODataParserBase; + + var ODataDefaultParser = function (_ODataParserBase) { + _inherits(ODataDefaultParser, _ODataParserBase); + + function ODataDefaultParser() { + _classCallCheck(this, ODataDefaultParser); + + return _possibleConstructorReturn(this, (ODataDefaultParser.__proto__ || Object.getPrototypeOf(ODataDefaultParser)).apply(this, arguments)); + } + + return ODataDefaultParser; + }(ODataParserBase); + + exports.ODataDefaultParser = ODataDefaultParser; + + var ODataRawParserImpl = function () { + function ODataRawParserImpl() { + _classCallCheck(this, ODataRawParserImpl); + } + + _createClass(ODataRawParserImpl, [{ + key: "parse", + value: function parse(r) { + return r.json(); + } + }]); + + return ODataRawParserImpl; + }(); + + exports.ODataRawParserImpl = ODataRawParserImpl; + + var ODataValueParserImpl = function (_ODataParserBase2) { + _inherits(ODataValueParserImpl, _ODataParserBase2); + + function ODataValueParserImpl() { + _classCallCheck(this, ODataValueParserImpl); + + return _possibleConstructorReturn(this, (ODataValueParserImpl.__proto__ || Object.getPrototypeOf(ODataValueParserImpl)).apply(this, arguments)); + } + + _createClass(ODataValueParserImpl, [{ + key: "parse", + value: function parse(r) { + return _get(ODataValueParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataValueParserImpl.prototype), "parse", this).call(this, r).then(function (d) { + return d; + }); + } + }]); + + return ODataValueParserImpl; + }(ODataParserBase); + + var ODataEntityParserImpl = function (_ODataParserBase3) { + _inherits(ODataEntityParserImpl, _ODataParserBase3); + + function ODataEntityParserImpl(factory) { + _classCallCheck(this, ODataEntityParserImpl); + + var _this4 = _possibleConstructorReturn(this, (ODataEntityParserImpl.__proto__ || Object.getPrototypeOf(ODataEntityParserImpl)).call(this)); + + _this4.factory = factory; + return _this4; + } + + _createClass(ODataEntityParserImpl, [{ + key: "parse", + value: function parse(r) { + var _this5 = this; + + return _get(ODataEntityParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataEntityParserImpl.prototype), "parse", this).call(this, r).then(function (d) { + var o = new _this5.factory(getEntityUrl(d), null); + return util_1.Util.extend(o, d); + }); + } + }]); + + return ODataEntityParserImpl; + }(ODataParserBase); + + var ODataEntityArrayParserImpl = function (_ODataParserBase4) { + _inherits(ODataEntityArrayParserImpl, _ODataParserBase4); + + function ODataEntityArrayParserImpl(factory) { + _classCallCheck(this, ODataEntityArrayParserImpl); + + var _this6 = _possibleConstructorReturn(this, (ODataEntityArrayParserImpl.__proto__ || Object.getPrototypeOf(ODataEntityArrayParserImpl)).call(this)); + + _this6.factory = factory; + return _this6; + } + + _createClass(ODataEntityArrayParserImpl, [{ + key: "parse", + value: function parse(r) { + var _this7 = this; + + return _get(ODataEntityArrayParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataEntityArrayParserImpl.prototype), "parse", this).call(this, r).then(function (d) { + return d.map(function (v) { + var o = new _this7.factory(getEntityUrl(v), null); + return util_1.Util.extend(o, v); + }); + }); + } + }]); + + return ODataEntityArrayParserImpl; + }(ODataParserBase); + + function getEntityUrl(entity) { + if (entity.hasOwnProperty("odata.editLink")) { + // we are dealign with minimal metadata (default) + return util_1.Util.combinePaths("_api", entity["odata.editLink"]); + } else if (entity.hasOwnProperty("__metadata")) { + // we are dealing with verbose, which has an absolute uri + return entity.__metadata.uri; + } else { + // we are likely dealing with nometadata, so don't error but we won't be able to + // chain off these objects + logging_1.Logger.write("No uri information found in ODataEntity parsing, chaining will fail for this object.", logging_1.LogLevel.Warning); + return ""; + } + } + exports.ODataRaw = new ODataRawParserImpl(); + function ODataValue() { + return new ODataValueParserImpl(); + } + exports.ODataValue = ODataValue; + function ODataEntity(factory) { + return new ODataEntityParserImpl(factory); + } + exports.ODataEntity = ODataEntity; + function ODataEntityArray(factory) { + return new ODataEntityArrayParserImpl(factory); + } + exports.ODataEntityArray = ODataEntityArray; + /** + * Manages a batch of OData operations + */ + + var ODataBatch = function () { + function ODataBatch(baseUrl) { + var _batchId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : util_1.Util.getGUID(); + + _classCallCheck(this, ODataBatch); + + this.baseUrl = baseUrl; + this._batchId = _batchId; + this._requests = []; + this._batchDependencies = Promise.resolve(); + } + /** + * Adds a request to a batch (not designed for public use) + * + * @param url The full url of the request + * @param method The http method GET, POST, etc + * @param options Any options to include in the request + * @param parser The parser that will hadle the results of the request + */ + + + _createClass(ODataBatch, [{ + key: "add", + value: function add(url, method, options, parser) { + var info = { + method: method.toUpperCase(), + options: options, + parser: parser, + reject: null, + resolve: null, + url: url + }; + var p = new Promise(function (resolve, reject) { + info.resolve = resolve; + info.reject = reject; + }); + this._requests.push(info); + return p; + } + /** + * Adds a dependency insuring that some set of actions will occur before a batch is processed. + * MUST be cleared using the returned resolve delegate to allow batches to run + */ + + }, { + key: "addBatchDependency", + value: function addBatchDependency() { + var resolver = void 0; + var promise = new Promise(function (resolve) { + resolver = resolve; + }); + this._batchDependencies = this._batchDependencies.then(function () { + return promise; + }); + return resolver; + } + /** + * Execute the current batch and resolve the associated promises + * + * @returns A promise which will be resolved once all of the batch's child promises have resolved + */ + + }, { + key: "execute", + value: function execute() { + var _this8 = this; + + return this._batchDependencies.then(function () { + return _this8.executeImpl(); + }); + } + }, { + key: "executeImpl", + value: function executeImpl() { + var _this9 = this; + + logging_1.Logger.write("Executing batch with " + this._requests.length + " requests.", logging_1.LogLevel.Info); + // if we don't have any requests, don't bother sending anything + // this could be due to caching further upstream, or just an empty batch + if (this._requests.length < 1) { + logging_1.Logger.write("Resolving empty batch.", logging_1.LogLevel.Info); + return Promise.resolve(); + } + // creating the client here allows the url to be populated for nodejs client as well as potentially + // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl + // below to be correct + var client = new httpclient_1.HttpClient(); + // due to timing we need to get the absolute url here so we can use it for all the individual requests + // and for sending the entire batch + return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) { + // build all the requests, send them, pipe results in order to parsers + var batchBody = []; + var currentChangeSetId = ""; + _this9._requests.map(function (reqInfo) { + if (reqInfo.method === "GET") { + if (currentChangeSetId.length > 0) { + // end an existing change set + batchBody.push("--changeset_" + currentChangeSetId + "--\n\n"); + currentChangeSetId = ""; + } + batchBody.push("--batch_" + _this9._batchId + "\n"); + } else { + if (currentChangeSetId.length < 1) { + // start new change set + currentChangeSetId = util_1.Util.getGUID(); + batchBody.push("--batch_" + _this9._batchId + "\n"); + batchBody.push("Content-Type: multipart/mixed; boundary=\"changeset_" + currentChangeSetId + "\"\n\n"); + } + batchBody.push("--changeset_" + currentChangeSetId + "\n"); + } + // common batch part prefix + batchBody.push("Content-Type: application/http\n"); + batchBody.push("Content-Transfer-Encoding: binary\n\n"); + var headers = { + "Accept": "application/json;" + }; + // this is the url of the individual request within the batch + var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url); + logging_1.Logger.write("Adding request " + reqInfo.method + " " + url + " to batch.", logging_1.LogLevel.Verbose); + if (reqInfo.method !== "GET") { + var method = reqInfo.method; + if (reqInfo.hasOwnProperty("options") && reqInfo.options.hasOwnProperty("headers") && typeof reqInfo.options.headers["X-HTTP-Method"] !== "undefined") { + method = reqInfo.options.headers["X-HTTP-Method"]; + delete reqInfo.options.headers["X-HTTP-Method"]; + } + batchBody.push(method + " " + url + " HTTP/1.1\n"); + headers = util_1.Util.extend(headers, { "Content-Type": "application/json;odata=verbose;charset=utf-8" }); + } else { + batchBody.push(reqInfo.method + " " + url + " HTTP/1.1\n"); + } + if (typeof pnplibconfig_1.RuntimeConfig.headers !== "undefined") { + headers = util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.headers); + } + if (reqInfo.options && reqInfo.options.headers) { + headers = util_1.Util.extend(headers, reqInfo.options.headers); + } + for (var name in headers) { + if (headers.hasOwnProperty(name)) { + batchBody.push(name + ": " + headers[name] + "\n"); + } + } + batchBody.push("\n"); + if (reqInfo.options.body) { + batchBody.push(reqInfo.options.body + "\n\n"); + } + }); + if (currentChangeSetId.length > 0) { + // Close the changeset + batchBody.push("--changeset_" + currentChangeSetId + "--\n\n"); + currentChangeSetId = ""; + } + batchBody.push("--batch_" + _this9._batchId + "--\n"); + var batchHeaders = { + "Content-Type": "multipart/mixed; boundary=batch_" + _this9._batchId + }; + var batchOptions = { + "body": batchBody.join(""), + "headers": batchHeaders + }; + logging_1.Logger.write("Sending batch request.", logging_1.LogLevel.Info); + return client.post(util_1.Util.combinePaths(absoluteRequestUrl, "/_api/$batch"), batchOptions).then(function (r) { + return r.text(); + }).then(_this9._parseResponse).then(function (responses) { + if (responses.length !== _this9._requests.length) { + throw new exceptions_1.BatchParseException("Could not properly parse responses to match requests in batch."); + } + logging_1.Logger.write("Resolving batched requests.", logging_1.LogLevel.Info); + return responses.reduce(function (chain, response, index) { + var request = _this9._requests[index]; + logging_1.Logger.write("Resolving request " + request.method + " " + request.url + ".", logging_1.LogLevel.Verbose); + return chain.then(function (_) { + return request.parser.parse(response).then(request.resolve).catch(request.reject); + }); + }, Promise.resolve()); + }); + }); + } + /** + * Parses the response from a batch request into an array of Response instances + * + * @param body Text body of the response from the batch request + */ + + }, { + key: "_parseResponse", + value: function _parseResponse(body) { + return new Promise(function (resolve, reject) { + var responses = []; + var header = "--batchresponse_"; + // Ex. "HTTP/1.1 500 Internal Server Error" + var statusRegExp = new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)", "i"); + var lines = body.split("\n"); + var state = "batch"; + var status = void 0; + var statusText = void 0; + for (var i = 0; i < lines.length; ++i) { + var line = lines[i]; + switch (state) { + case "batch": + if (line.substr(0, header.length) === header) { + state = "batchHeaders"; + } else { + if (line.trim() !== "") { + throw new exceptions_1.BatchParseException("Invalid response, line " + i); + } + } + break; + case "batchHeaders": + if (line.trim() === "") { + state = "status"; + } + break; + case "status": + var parts = statusRegExp.exec(line); + if (parts.length !== 3) { + throw new exceptions_1.BatchParseException("Invalid status, line " + i); + } + status = parseInt(parts[1], 10); + statusText = parts[2]; + state = "statusHeaders"; + break; + case "statusHeaders": + if (line.trim() === "") { + state = "body"; + } + break; + case "body": + responses.push(status === 204 ? new Response() : new Response(line, { status: status, statusText: statusText })); + state = "batch"; + break; + } + } + if (state !== "status") { + reject(new exceptions_1.BatchParseException("Unexpected end of input")); + } + resolve(responses); + }); + } + }]); + + return ODataBatch; + }(); + + exports.ODataBatch = ODataBatch; + + var TextFileParser = function () { + function TextFileParser() { + _classCallCheck(this, TextFileParser); + } + + _createClass(TextFileParser, [{ + key: "parse", + value: function parse(r) { + return r.text(); + } + }]); + + return TextFileParser; + }(); + + exports.TextFileParser = TextFileParser; + + var BlobFileParser = function () { + function BlobFileParser() { + _classCallCheck(this, BlobFileParser); + } + + _createClass(BlobFileParser, [{ + key: "parse", + value: function parse(r) { + return r.blob(); + } + }]); + + return BlobFileParser; + }(); + + exports.BlobFileParser = BlobFileParser; + + var JSONFileParser = function () { + function JSONFileParser() { + _classCallCheck(this, JSONFileParser); + } + + _createClass(JSONFileParser, [{ + key: "parse", + value: function parse(r) { + return r.json(); + } + }]); + + return JSONFileParser; + }(); + + exports.JSONFileParser = JSONFileParser; + + var BufferFileParser = function () { + function BufferFileParser() { + _classCallCheck(this, BufferFileParser); + } + + _createClass(BufferFileParser, [{ + key: "parse", + value: function parse(r) { + if (util_1.Util.isFunction(r.arrayBuffer)) { + return r.arrayBuffer(); + } + return r.buffer(); + } + }]); + + return BufferFileParser; + }(); + + exports.BufferFileParser = BufferFileParser; + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var digestcache_1 = __webpack_require__(14); + var util_1 = __webpack_require__(1); + var pnplibconfig_1 = __webpack_require__(4); + var exceptions_1 = __webpack_require__(15); + + var HttpClient = function () { + function HttpClient() { + _classCallCheck(this, HttpClient); + + this._impl = pnplibconfig_1.RuntimeConfig.fetchClientFactory(); + this._digestCache = new digestcache_1.DigestCache(this); + } + + _createClass(HttpClient, [{ + key: "fetch", + value: function fetch(url) { + var _this = this; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var opts = util_1.Util.extend(options, { cache: "no-cache", credentials: "same-origin" }, true); + var headers = new Headers(); + // first we add the global headers so they can be overwritten by any passed in locally to this call + this.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.headers); + // second we add the local options so we can overwrite the globals + this.mergeHeaders(headers, options.headers); + // lastly we apply any default headers we need that may not exist + if (!headers.has("Accept")) { + headers.append("Accept", "application/json"); + } + if (!headers.has("Content-Type")) { + headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); + } + if (!headers.has("X-ClientService-ClientTag")) { + headers.append("X-ClientService-ClientTag", "PnPCoreJS:2.0.1"); + } + opts = util_1.Util.extend(opts, { headers: headers }); + if (opts.method && opts.method.toUpperCase() !== "GET") { + if (!headers.has("X-RequestDigest")) { + var index = url.indexOf("_api/"); + if (index < 0) { + throw new exceptions_1.APIUrlException(); + } + var webUrl = url.substr(0, index); + return this._digestCache.getDigest(webUrl).then(function (digest) { + headers.append("X-RequestDigest", digest); + return _this.fetchRaw(url, opts); + }); + } + } + return this.fetchRaw(url, opts); + } + }, { + key: "fetchRaw", + value: function fetchRaw(url) { + var _this2 = this; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + // here we need to normalize the headers + var rawHeaders = new Headers(); + this.mergeHeaders(rawHeaders, options.headers); + options = util_1.Util.extend(options, { headers: rawHeaders }); + var retry = function retry(ctx) { + _this2._impl.fetch(url, options).then(function (response) { + return ctx.resolve(response); + }).catch(function (response) { + // grab our current delay + var delay = ctx.delay; + // Check if request was throttled - http status code 429 + // Check is request failed due to server unavailable - http status code 503 + if (response.status !== 429 && response.status !== 503) { + ctx.reject(response); + } + // Increment our counters. + ctx.delay *= 2; + ctx.attempts++; + // If we have exceeded the retry count, reject. + if (ctx.retryCount <= ctx.attempts) { + ctx.reject(response); + } + // Set our retry timeout for {delay} milliseconds. + setTimeout(util_1.Util.getCtxCallback(_this2, retry, ctx), delay); + }); + }; + return new Promise(function (resolve, reject) { + var retryContext = { + attempts: 0, + delay: 100, + reject: reject, + resolve: resolve, + retryCount: 7 + }; + retry.call(_this2, retryContext); + }); + } + }, { + key: "get", + value: function get(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var opts = util_1.Util.extend(options, { method: "GET" }); + return this.fetch(url, opts); + } + }, { + key: "post", + value: function post(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var opts = util_1.Util.extend(options, { method: "POST" }); + return this.fetch(url, opts); + } + }, { + key: "patch", + value: function patch(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var opts = util_1.Util.extend(options, { method: "PATCH" }); + return this.fetch(url, opts); + } + }, { + key: "delete", + value: function _delete(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var opts = util_1.Util.extend(options, { method: "DELETE" }); + return this.fetch(url, opts); + } + }, { + key: "mergeHeaders", + value: function mergeHeaders(target, source) { + if (typeof source !== "undefined" && source !== null) { + var temp = new Request("", { headers: source }); + temp.headers.forEach(function (value, name) { + target.append(name, value); + }); + } + } + }]); + + return HttpClient; + }(); + + exports.HttpClient = HttpClient; + ; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var collections_1 = __webpack_require__(8); + var util_1 = __webpack_require__(1); + var odata_1 = __webpack_require__(12); + + var CachedDigest = function CachedDigest() { + _classCallCheck(this, CachedDigest); + }; + + exports.CachedDigest = CachedDigest; + + var DigestCache = function () { + function DigestCache(_httpClient) { + var _digests = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new collections_1.Dictionary(); + + _classCallCheck(this, DigestCache); + + this._httpClient = _httpClient; + this._digests = _digests; + } + + _createClass(DigestCache, [{ + key: "getDigest", + value: function getDigest(webUrl) { + var _this = this; + + var cachedDigest = this._digests.get(webUrl); + if (cachedDigest !== null) { + var now = new Date(); + if (now < cachedDigest.expiration) { + return Promise.resolve(cachedDigest.value); + } + } + var url = util_1.Util.combinePaths(webUrl, "/_api/contextinfo"); + return this._httpClient.fetchRaw(url, { + cache: "no-cache", + credentials: "same-origin", + headers: { + "Accept": "application/json;odata=verbose", + "Content-type": "application/json;odata=verbose;charset=utf-8" + }, + method: "POST" + }).then(function (response) { + var parser = new odata_1.ODataDefaultParser(); + return parser.parse(response).then(function (d) { + return d.GetContextWebInformation; + }); + }).then(function (data) { + var newCachedDigest = new CachedDigest(); + newCachedDigest.value = data.FormDigestValue; + var seconds = data.FormDigestTimeoutSeconds; + var expiration = new Date(); + expiration.setTime(expiration.getTime() + 1000 * seconds); + newCachedDigest.expiration = expiration; + _this._digests.add(webUrl, newCachedDigest); + return newCachedDigest.value; + }); + } + }, { + key: "clear", + value: function clear() { + this._digests.clear(); + } + }]); + + return DigestCache; + }(); + + exports.DigestCache = DigestCache; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var logging_1 = __webpack_require__(3); + function defaultLog(error) { + logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: "[" + error.name + "]::" + error.message }); + } + /** + * Represents an exception with an HttpClient request + * + */ + + var ProcessHttpClientResponseException = function (_Error) { + _inherits(ProcessHttpClientResponseException, _Error); + + function ProcessHttpClientResponseException(status, statusText, data) { + _classCallCheck(this, ProcessHttpClientResponseException); + + var _this = _possibleConstructorReturn(this, (ProcessHttpClientResponseException.__proto__ || Object.getPrototypeOf(ProcessHttpClientResponseException)).call(this, "Error making HttpClient request in queryable: [" + status + "] " + statusText)); + + _this.status = status; + _this.statusText = statusText; + _this.data = data; + _this.name = "ProcessHttpClientResponseException"; + logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message }); + return _this; + } + + return ProcessHttpClientResponseException; + }(Error); + + exports.ProcessHttpClientResponseException = ProcessHttpClientResponseException; + + var NoCacheAvailableException = function (_Error2) { + _inherits(NoCacheAvailableException, _Error2); + + function NoCacheAvailableException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Cannot create a caching configuration provider since cache is not available."; + + _classCallCheck(this, NoCacheAvailableException); + + var _this2 = _possibleConstructorReturn(this, (NoCacheAvailableException.__proto__ || Object.getPrototypeOf(NoCacheAvailableException)).call(this, msg)); + + _this2.name = "NoCacheAvailableException"; + defaultLog(_this2); + return _this2; + } + + return NoCacheAvailableException; + }(Error); + + exports.NoCacheAvailableException = NoCacheAvailableException; + + var APIUrlException = function (_Error3) { + _inherits(APIUrlException, _Error3); + + function APIUrlException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Unable to determine API url."; + + _classCallCheck(this, APIUrlException); + + var _this3 = _possibleConstructorReturn(this, (APIUrlException.__proto__ || Object.getPrototypeOf(APIUrlException)).call(this, msg)); + + _this3.name = "APIUrlException"; + defaultLog(_this3); + return _this3; + } + + return APIUrlException; + }(Error); + + exports.APIUrlException = APIUrlException; + + var AuthUrlException = function (_Error4) { + _inherits(AuthUrlException, _Error4); + + function AuthUrlException(data) { + var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Auth URL Endpoint could not be determined from data. Data logged."; + + _classCallCheck(this, AuthUrlException); + + var _this4 = _possibleConstructorReturn(this, (AuthUrlException.__proto__ || Object.getPrototypeOf(AuthUrlException)).call(this, msg)); + + _this4.name = "APIUrlException"; + logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this4.message }); + return _this4; + } + + return AuthUrlException; + }(Error); + + exports.AuthUrlException = AuthUrlException; + + var NodeFetchClientUnsupportedException = function (_Error5) { + _inherits(NodeFetchClientUnsupportedException, _Error5); + + function NodeFetchClientUnsupportedException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Using NodeFetchClient in the browser is not supported."; + + _classCallCheck(this, NodeFetchClientUnsupportedException); + + var _this5 = _possibleConstructorReturn(this, (NodeFetchClientUnsupportedException.__proto__ || Object.getPrototypeOf(NodeFetchClientUnsupportedException)).call(this, msg)); + + _this5.name = "NodeFetchClientUnsupportedException"; + defaultLog(_this5); + return _this5; + } + + return NodeFetchClientUnsupportedException; + }(Error); + + exports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException; + + var SPRequestExecutorUndefinedException = function (_Error6) { + _inherits(SPRequestExecutorUndefinedException, _Error6); + + function SPRequestExecutorUndefinedException() { + _classCallCheck(this, SPRequestExecutorUndefinedException); + + var msg = ["SP.RequestExecutor is undefined. ", "Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library."].join(" "); + + var _this6 = _possibleConstructorReturn(this, (SPRequestExecutorUndefinedException.__proto__ || Object.getPrototypeOf(SPRequestExecutorUndefinedException)).call(this, msg)); + + _this6.name = "SPRequestExecutorUndefinedException"; + defaultLog(_this6); + return _this6; + } + + return SPRequestExecutorUndefinedException; + }(Error); + + exports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException; + + var MaxCommentLengthException = function (_Error7) { + _inherits(MaxCommentLengthException, _Error7); + + function MaxCommentLengthException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "The maximum comment length is 1023 characters."; + + _classCallCheck(this, MaxCommentLengthException); + + var _this7 = _possibleConstructorReturn(this, (MaxCommentLengthException.__proto__ || Object.getPrototypeOf(MaxCommentLengthException)).call(this, msg)); + + _this7.name = "MaxCommentLengthException"; + defaultLog(_this7); + return _this7; + } + + return MaxCommentLengthException; + }(Error); + + exports.MaxCommentLengthException = MaxCommentLengthException; + + var NotSupportedInBatchException = function (_Error8) { + _inherits(NotSupportedInBatchException, _Error8); + + function NotSupportedInBatchException() { + var operation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "This operation"; + + _classCallCheck(this, NotSupportedInBatchException); + + var _this8 = _possibleConstructorReturn(this, (NotSupportedInBatchException.__proto__ || Object.getPrototypeOf(NotSupportedInBatchException)).call(this, operation + " is not supported as part of a batch.")); + + _this8.name = "NotSupportedInBatchException"; + defaultLog(_this8); + return _this8; + } + + return NotSupportedInBatchException; + }(Error); + + exports.NotSupportedInBatchException = NotSupportedInBatchException; + + var ODataIdException = function (_Error9) { + _inherits(ODataIdException, _Error9); + + function ODataIdException(data) { + var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Could not extract odata id in object, you may be using nometadata. Object data logged to logger."; + + _classCallCheck(this, ODataIdException); + + var _this9 = _possibleConstructorReturn(this, (ODataIdException.__proto__ || Object.getPrototypeOf(ODataIdException)).call(this, msg)); + + _this9.name = "ODataIdException"; + logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this9.message }); + return _this9; + } + + return ODataIdException; + }(Error); + + exports.ODataIdException = ODataIdException; + + var BatchParseException = function (_Error10) { + _inherits(BatchParseException, _Error10); + + function BatchParseException(msg) { + _classCallCheck(this, BatchParseException); + + var _this10 = _possibleConstructorReturn(this, (BatchParseException.__proto__ || Object.getPrototypeOf(BatchParseException)).call(this, msg)); + + _this10.name = "BatchParseException"; + defaultLog(_this10); + return _this10; + } + + return BatchParseException; + }(Error); + + exports.BatchParseException = BatchParseException; + + var AlreadyInBatchException = function (_Error11) { + _inherits(AlreadyInBatchException, _Error11); + + function AlreadyInBatchException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "This query is already part of a batch."; + + _classCallCheck(this, AlreadyInBatchException); + + var _this11 = _possibleConstructorReturn(this, (AlreadyInBatchException.__proto__ || Object.getPrototypeOf(AlreadyInBatchException)).call(this, msg)); + + _this11.name = "AlreadyInBatchException"; + defaultLog(_this11); + return _this11; + } + + return AlreadyInBatchException; + }(Error); + + exports.AlreadyInBatchException = AlreadyInBatchException; + + var FunctionExpectedException = function (_Error12) { + _inherits(FunctionExpectedException, _Error12); + + function FunctionExpectedException() { + var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "This query is already part of a batch."; + + _classCallCheck(this, FunctionExpectedException); + + var _this12 = _possibleConstructorReturn(this, (FunctionExpectedException.__proto__ || Object.getPrototypeOf(FunctionExpectedException)).call(this, msg)); + + _this12.name = "FunctionExpectedException"; + defaultLog(_this12); + return _this12; + } + + return FunctionExpectedException; + }(Error); + + exports.FunctionExpectedException = FunctionExpectedException; + + var UrlException = function (_Error13) { + _inherits(UrlException, _Error13); + + function UrlException(msg) { + _classCallCheck(this, UrlException); + + var _this13 = _possibleConstructorReturn(this, (UrlException.__proto__ || Object.getPrototypeOf(UrlException)).call(this, msg)); + + _this13.name = "UrlException"; + defaultLog(_this13); + return _this13; + } + + return UrlException; + }(Error); + + exports.UrlException = UrlException; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);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; + }return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var caching_1 = __webpack_require__(17); + var httpclient_1 = __webpack_require__(13); + var logging_1 = __webpack_require__(3); + var util_1 = __webpack_require__(1); + /** + * Processes a given context through the request pipeline + * + * @param context The request context we are processing + */ + function pipe(context) { + // this is the beginning of the extensible pipeline in future versions + var pipeline = [PipelineMethods.logStart, PipelineMethods.caching, PipelineMethods.send, PipelineMethods.logEnd]; + return pipeline.reduce(function (chain, next) { + return chain.then(function (c) { + return next(c); + }); + }, Promise.resolve(context)).then(function (ctx) { + return PipelineMethods.returnResult(ctx); + }).catch(function (e) { + logging_1.Logger.log({ + data: e, + level: logging_1.LogLevel.Error, + message: "Error in request pipeline: " + e.message + }); + throw e; + }); + } + exports.pipe = pipe; + /** + * decorator factory applied to methods in the pipeline to control behavior + */ + function requestPipelineMethod() { + var alwaysRun = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + return function (target, propertyKey, descriptor) { + var method = descriptor.value; + descriptor.value = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // if we have a result already in the pipeline, pass it along and don't call the tagged method + if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty("hasResult") && args[0].hasResult) { + logging_1.Logger.write("[" + args[0].requestId + "] (" + new Date().getTime() + ") Skipping request pipeline method " + propertyKey + ", existing result in pipeline.", logging_1.LogLevel.Verbose); + return Promise.resolve(args[0]); + } + // apply the tagged method + logging_1.Logger.write("[" + args[0].requestId + "] (" + new Date().getTime() + ") Calling request pipeline method " + propertyKey + ".", logging_1.LogLevel.Verbose); + return method.apply(target, args); + }; + }; + } + /** + * Contains the methods used within the request pipeline + */ + + var PipelineMethods = function () { + function PipelineMethods() { + _classCallCheck(this, PipelineMethods); + } + + _createClass(PipelineMethods, null, [{ + key: "logStart", + + /** + * Logs the start of the request + */ + value: function logStart(context) { + return new Promise(function (resolve) { + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + new Date().getTime() + ") Beginning " + context.verb + " request to " + context.requestAbsoluteUrl + }); + resolve(context); + }); + } + /** + * Handles caching of the request + */ + + }, { + key: "caching", + value: function caching(context) { + return new Promise(function (resolve) { + // handle caching, if applicable + if (context.verb === "GET" && context.isCached) { + logging_1.Logger.write("[" + context.requestId + "] (" + new Date().getTime() + ") Caching is enabled for request, checking cache...", logging_1.LogLevel.Info); + var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase()); + if (typeof context.cachingOptions !== "undefined") { + cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions); + } + // we may not have a valid store, i.e. on node + if (cacheOptions.store !== null) { + // check if we have the data in cache and if so resolve the promise and return + var data = cacheOptions.store.get(cacheOptions.key); + if (data !== null) { + // ensure we clear any help batch dependency we are resolving from the cache + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + new Date().getTime() + ") Value returned from cache." + }); + context.batchDependency(); + return PipelineMethods.setResult(context, data).then(function (ctx) { + return resolve(ctx); + }); + } + } + logging_1.Logger.write("[" + context.requestId + "] (" + new Date().getTime() + ") Value not found in cache.", logging_1.LogLevel.Info); + // if we don't then wrap the supplied parser in the caching parser wrapper + // and send things on their way + context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions); + } + return resolve(context); + }); + } + /** + * Sends the request + */ + + }, { + key: "send", + value: function send(context) { + return new Promise(function (resolve, reject) { + // send or batch the request + if (context.isBatched) { + // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise + var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser); + // we release the dependency here to ensure the batch does not execute until the request is added to the batch + context.batchDependency(); + logging_1.Logger.write("[" + context.requestId + "] (" + new Date().getTime() + ") Batching request.", logging_1.LogLevel.Info); + resolve(p.then(function (result) { + return PipelineMethods.setResult(context, result); + })); + } else { + logging_1.Logger.write("[" + context.requestId + "] (" + new Date().getTime() + ") Sending request.", logging_1.LogLevel.Info); + // we are not part of a batch, so proceed as normal + var client = new httpclient_1.HttpClient(); + var opts = util_1.Util.extend(context.options, { method: context.verb }); + client.fetch(context.requestAbsoluteUrl, opts).then(function (response) { + return context.parser.parse(response); + }).then(function (result) { + return PipelineMethods.setResult(context, result); + }).then(function (ctx) { + return resolve(ctx); + }).catch(function (e) { + return reject(e); + }); + } + }); + } + /** + * Logs the end of the request + */ + + }, { + key: "logEnd", + value: function logEnd(context) { + return new Promise(function (resolve) { + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + new Date().getTime() + ") Completing " + context.verb + " request to " + context.requestAbsoluteUrl + }); + resolve(context); + }); + } + /** + * At the end of the pipeline resolves the request's result + */ + + }, { + key: "returnResult", + value: function returnResult(context) { + logging_1.Logger.log({ + data: context.result, + level: logging_1.LogLevel.Verbose, + message: "[" + context.requestId + "] (" + new Date().getTime() + ") Returning, see data property for value." + }); + return Promise.resolve(context.result); + } + /** + * Sets the result on the context + */ + + }, { + key: "setResult", + value: function setResult(context, value) { + return new Promise(function (resolve) { + context.result = value; + context.hasResult = true; + resolve(context); + }); + } + }]); + + return PipelineMethods; + }(); + + __decorate([requestPipelineMethod(true)], PipelineMethods, "logStart", null); + __decorate([requestPipelineMethod()], PipelineMethods, "caching", null); + __decorate([requestPipelineMethod()], PipelineMethods, "send", null); + __decorate([requestPipelineMethod(true)], PipelineMethods, "logEnd", null); + __decorate([requestPipelineMethod(true)], PipelineMethods, "returnResult", null); + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var storage_1 = __webpack_require__(6); + var util_1 = __webpack_require__(1); + var pnplibconfig_1 = __webpack_require__(4); + + var CachingOptions = function () { + function CachingOptions(key) { + _classCallCheck(this, CachingOptions); + + this.key = key; + this.expiration = util_1.Util.dateAdd(new Date(), "second", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds); + this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore; + } + + _createClass(CachingOptions, [{ + key: "store", + get: function get() { + if (this.storeName === "local") { + return CachingOptions.storage.local; + } else { + return CachingOptions.storage.session; + } + } + }]); + + return CachingOptions; + }(); + + CachingOptions.storage = new storage_1.PnPClientStorage(); + exports.CachingOptions = CachingOptions; + + var CachingParserWrapper = function () { + function CachingParserWrapper(_parser, _cacheOptions) { + _classCallCheck(this, CachingParserWrapper); + + this._parser = _parser; + this._cacheOptions = _cacheOptions; + } + + _createClass(CachingParserWrapper, [{ + key: "parse", + value: function parse(response) { + var _this = this; + + // add this to the cache based on the options + return this._parser.parse(response).then(function (data) { + if (_this._cacheOptions.store !== null) { + _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration); + } + return data; + }); + } + }]); + + return CachingParserWrapper; + }(); + + exports.CachingParserWrapper = CachingParserWrapper; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + + var SearchSuggest = function (_queryable_1$Queryabl) { + _inherits(SearchSuggest, _queryable_1$Queryabl); + + function SearchSuggest(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/search/suggest"; + + _classCallCheck(this, SearchSuggest); + + return _possibleConstructorReturn(this, (SearchSuggest.__proto__ || Object.getPrototypeOf(SearchSuggest)).call(this, baseUrl, path)); + } + + _createClass(SearchSuggest, [{ + key: "execute", + value: function execute(query) { + this.mapQueryToQueryString(query); + return this.get().then(function (response) { + return new SearchSuggestResult(response); + }); + } + }, { + key: "mapQueryToQueryString", + value: function mapQueryToQueryString(query) { + this.query.add("querytext", "'" + query.querytext + "'"); + if (query.hasOwnProperty("count")) { + this.query.add("inumberofquerysuggestions", query.count.toString()); + } + if (query.hasOwnProperty("personalCount")) { + this.query.add("inumberofresultsuggestions", query.personalCount.toString()); + } + if (query.hasOwnProperty("preQuery")) { + this.query.add("fprequerysuggestions", query.preQuery.toString()); + } + if (query.hasOwnProperty("hitHighlighting")) { + this.query.add("fhithighlighting", query.hitHighlighting.toString()); + } + if (query.hasOwnProperty("capitalize")) { + this.query.add("fcapitalizefirstletters", query.capitalize.toString()); + } + if (query.hasOwnProperty("culture")) { + this.query.add("culture", query.culture.toString()); + } + if (query.hasOwnProperty("stemming")) { + this.query.add("enablestemming", query.stemming.toString()); + } + if (query.hasOwnProperty("includePeople")) { + this.query.add("showpeoplenamesuggestions", query.includePeople.toString()); + } + if (query.hasOwnProperty("queryRules")) { + this.query.add("enablequeryrules", query.queryRules.toString()); + } + if (query.hasOwnProperty("prefixMatch")) { + this.query.add("fprefixmatchallterms", query.prefixMatch.toString()); + } + } + }]); + + return SearchSuggest; + }(queryable_1.QueryableInstance); + + exports.SearchSuggest = SearchSuggest; + + var SearchSuggestResult = function SearchSuggestResult(json) { + _classCallCheck(this, SearchSuggestResult); + + if (json.hasOwnProperty("suggest")) { + // verbose + this.PeopleNames = json.suggest.PeopleNames.results; + this.PersonalResults = json.suggest.PersonalResults.results; + this.Queries = json.suggest.Queries.results; + } else { + this.PeopleNames = json.PeopleNames; + this.PersonalResults = json.PersonalResults; + this.Queries = json.Queries; + } + }; + + exports.SearchSuggestResult = SearchSuggestResult; + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var webs_1 = __webpack_require__(20); + var usercustomactions_1 = __webpack_require__(37); + var odata_1 = __webpack_require__(12); + var features_1 = __webpack_require__(39); + /** + * Describes a site collection + * + */ + + var Site = function (_queryable_1$Queryabl) { + _inherits(Site, _queryable_1$Queryabl); + + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Site(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/site"; + + _classCallCheck(this, Site); + + return _possibleConstructorReturn(this, (Site.__proto__ || Object.getPrototypeOf(Site)).call(this, baseUrl, path)); + } + /** + * Gets the root web of the site collection + * + */ + + + _createClass(Site, [{ + key: "getContextInfo", + + /** + * Gets the context information for the site. + */ + value: function getContextInfo() { + var q = new Site(this.parentUrl, "_api/contextinfo"); + return q.post().then(function (data) { + if (data.hasOwnProperty("GetContextWebInformation")) { + var info = data.GetContextWebInformation; + info.SupportedSchemaVersions = info.SupportedSchemaVersions.results; + return info; + } else { + return data; + } + }); + } + /** + * Gets the document libraries on a site. Static method. (SharePoint Online only) + * + * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned + */ + + }, { + key: "getDocumentLibraries", + value: function getDocumentLibraries(absoluteWebUrl) { + var q = new queryable_1.Queryable("", "_api/sp.web.getdocumentlibraries(@v)"); + q.query.add("@v", "'" + absoluteWebUrl + "'"); + return q.get().then(function (data) { + if (data.hasOwnProperty("GetDocumentLibraries")) { + return data.GetDocumentLibraries; + } else { + return data; + } + }); + } + /** + * Gets the site URL from a page URL. + * + * @param absolutePageUrl The absolute url of the page + */ + + }, { + key: "getWebUrlFromPageUrl", + value: function getWebUrlFromPageUrl(absolutePageUrl) { + var q = new queryable_1.Queryable("", "_api/sp.web.getweburlfrompageurl(@v)"); + q.query.add("@v", "'" + absolutePageUrl + "'"); + return q.get().then(function (data) { + if (data.hasOwnProperty("GetWebUrlFromPageUrl")) { + return data.GetWebUrlFromPageUrl; + } else { + return data; + } + }); + } + /** + * Creates a new batch for requests within the context of context this site + * + */ + + }, { + key: "createBatch", + value: function createBatch() { + return new odata_1.ODataBatch(this.parentUrl); + } + }, { + key: "rootWeb", + get: function get() { + return new webs_1.Web(this, "rootweb"); + } + /** + * Gets the active features for this site + * + */ + + }, { + key: "features", + get: function get() { + return new features_1.Features(this); + } + /** + * Get all custom actions on a site collection + * + */ + + }, { + key: "userCustomActions", + get: function get() { + return new usercustomactions_1.UserCustomActions(this); + } + }]); + + return Site; + }(queryable_1.QueryableInstance); + + exports.Site = Site; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var queryablesecurable_1 = __webpack_require__(21); + var lists_1 = __webpack_require__(25); + var fields_1 = __webpack_require__(33); + var navigation_1 = __webpack_require__(38); + var sitegroups_1 = __webpack_require__(23); + var contenttypes_1 = __webpack_require__(30); + var folders_1 = __webpack_require__(27); + var roles_1 = __webpack_require__(22); + var files_1 = __webpack_require__(28); + var util_1 = __webpack_require__(1); + var lists_2 = __webpack_require__(25); + var siteusers_1 = __webpack_require__(24); + var usercustomactions_1 = __webpack_require__(37); + var odata_1 = __webpack_require__(12); + var features_1 = __webpack_require__(39); + + var Webs = function (_queryable_1$Queryabl) { + _inherits(Webs, _queryable_1$Queryabl); + + function Webs(baseUrl) { + var webPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "webs"; + + _classCallCheck(this, Webs); + + return _possibleConstructorReturn(this, (Webs.__proto__ || Object.getPrototypeOf(Webs)).call(this, baseUrl, webPath)); + } + /** + * Adds a new web to the collection + * + * @param title The new web's title + * @param url The new web's relative url + * @param description The web web's description + * @param template The web's template + * @param language The language code to use for this web + * @param inheritPermissions If true permissions will be inherited from the partent web + * @param additionalSettings Will be passed as part of the web creation body + */ + + + _createClass(Webs, [{ + key: "add", + value: function add(title, url) { + var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; + var template = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "STS"; + var language = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1033; + var inheritPermissions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var additionalSettings = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {}; + + var props = util_1.Util.extend({ + Description: description, + Language: language, + Title: title, + Url: url, + UseSamePermissionsAsParentSite: inheritPermissions, + WebTemplate: template + }, additionalSettings); + var postBody = JSON.stringify({ + "parameters": util_1.Util.extend({ + "__metadata": { "type": "SP.WebCreationInformation" } + }, props) + }); + var q = new Webs(this, "add"); + return q.post({ body: postBody }).then(function (data) { + return { + data: data, + web: new Web(odata_1.extractOdataId(data).replace(/_api\/web\/?/i, "")) + }; + }); + } + }]); + + return Webs; + }(queryable_1.QueryableCollection); + + exports.Webs = Webs; + /** + * Describes a web + * + */ + + var Web = function (_queryablesecurable_) { + _inherits(Web, _queryablesecurable_); + + function Web(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/web"; + + _classCallCheck(this, Web); + + return _possibleConstructorReturn(this, (Web.__proto__ || Object.getPrototypeOf(Web)).call(this, baseUrl, path)); + } + + _createClass(Web, [{ + key: "createBatch", + + /** + * Creates a new batch for requests within the context of context this web + * + */ + value: function createBatch() { + return new odata_1.ODataBatch(this.parentUrl); + } + /** + * Get a folder by server relative url + * + * @param folderRelativeUrl the server relative path to the folder (including /sites/ if applicable) + */ + + }, { + key: "getFolderByServerRelativeUrl", + value: function getFolderByServerRelativeUrl(folderRelativeUrl) { + return new folders_1.Folder(this, "getFolderByServerRelativeUrl('" + folderRelativeUrl + "')"); + } + /** + * Get a file by server relative url + * + * @param fileRelativeUrl the server relative path to the file (including /sites/ if applicable) + */ + + }, { + key: "getFileByServerRelativeUrl", + value: function getFileByServerRelativeUrl(fileRelativeUrl) { + return new files_1.File(this, "getFileByServerRelativeUrl('" + fileRelativeUrl + "')"); + } + /** + * Get a list by server relative url (list's root folder) + * + * @param listRelativeUrl the server relative path to the list's root folder (including /sites/ if applicable) + */ + + }, { + key: "getList", + value: function getList(listRelativeUrl) { + return new lists_2.List(this, "getList('" + listRelativeUrl + "')"); + } + /** + * Updates this web intance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + + }, { + key: "update", + value: function update(properties) { + var _this3 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.Web" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + data: data, + web: _this3 + }; + }); + } + /** + * Delete this web + * + */ + + }, { + key: "delete", + value: function _delete() { + return _get(Web.prototype.__proto__ || Object.getPrototypeOf(Web.prototype), "delete", this).call(this); + } + /** + * Applies the theme specified by the contents of each of the files specified in the arguments to the site. + * + * @param colorPaletteUrl Server-relative URL of the color palette file. + * @param fontSchemeUrl Server-relative URL of the font scheme. + * @param backgroundImageUrl Server-relative URL of the background image. + * @param shareGenerated true to store the generated theme files in the root site, or false to store them in this site. + */ + + }, { + key: "applyTheme", + value: function applyTheme(colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) { + var postBody = JSON.stringify({ + backgroundImageUrl: backgroundImageUrl, + colorPaletteUrl: colorPaletteUrl, + fontSchemeUrl: fontSchemeUrl, + shareGenerated: shareGenerated + }); + var q = new Web(this, "applytheme"); + return q.post({ body: postBody }); + } + /** + * Applies the specified site definition or site template to the Web site that has no template applied to it. + * + * @param template Name of the site definition or the name of the site template + */ + + }, { + key: "applyWebTemplate", + value: function applyWebTemplate(template) { + var q = new Web(this, "applywebtemplate"); + q.concat("(@t)"); + q.query.add("@t", template); + return q.post(); + } + /** + * Returns whether the current user has the given set of permissions. + * + * @param perms The high and low permission range. + */ + + }, { + key: "doesUserHavePermissions", + value: function doesUserHavePermissions(perms) { + var q = new Web(this, "doesuserhavepermissions"); + q.concat("(@p)"); + q.query.add("@p", JSON.stringify(perms)); + return q.get(); + } + /** + * Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site. + * + * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com) + */ + + }, { + key: "ensureUser", + value: function ensureUser(loginName) { + // TODO:: this should resolve to a User + var postBody = JSON.stringify({ + logonName: loginName + }); + var q = new Web(this, "ensureuser"); + return q.post({ body: postBody }); + } + /** + * Returns a collection of site templates available for the site. + * + * @param language The LCID of the site templates to get. + * @param true to include language-neutral site templates; otherwise false + */ + + }, { + key: "availableWebTemplates", + value: function availableWebTemplates() { + var language = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1033; + var includeCrossLanugage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return new queryable_1.QueryableCollection(this, "getavailablewebtemplates(lcid=" + language + ", doincludecrosslanguage=" + includeCrossLanugage + ")"); + } + /** + * Returns the list gallery on the site. + * + * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114, + * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125 + */ + + }, { + key: "getCatalog", + value: function getCatalog(type) { + var q = new Web(this, "getcatalog(" + type + ")"); + q.select("Id"); + return q.get().then(function (data) { + return new lists_2.List(odata_1.extractOdataId(data)); + }); + } + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + + }, { + key: "getChanges", + value: function getChanges(query) { + var postBody = JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeQuery" } }, query) }); + // don't change "this" instance, make a new one + var q = new Web(this, "getchanges"); + return q.post({ body: postBody }); + } + /** + * Gets the custom list templates for the site. + * + */ + + }, { + key: "getUserById", + + /** + * Returns the user corresponding to the specified member identifier for the current site. + * + * @param id The ID of the user. + */ + value: function getUserById(id) { + return new siteusers_1.SiteUser(this, "getUserById(" + id + ")"); + } + /** + * Returns the name of the image file for the icon that is used to represent the specified file. + * + * @param filename The file name. If this parameter is empty, the server returns an empty string. + * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1. + * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName + */ + + }, { + key: "mapToIcon", + value: function mapToIcon(filename) { + var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var progId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; + + var q = new Web(this, "maptoicon(filename='" + filename + "', progid='" + progId + "', size=" + size + ")"); + return q.get(); + } + }, { + key: "webs", + get: function get() { + return new Webs(this); + } + /** + * Get the content types available in this web + * + */ + + }, { + key: "contentTypes", + get: function get() { + return new contenttypes_1.ContentTypes(this); + } + /** + * Get the lists in this web + * + */ + + }, { + key: "lists", + get: function get() { + return new lists_1.Lists(this); + } + /** + * Gets the fields in this web + * + */ + + }, { + key: "fields", + get: function get() { + return new fields_1.Fields(this); + } + /** + * Gets the active features for this web + * + */ + + }, { + key: "features", + get: function get() { + return new features_1.Features(this); + } + /** + * Gets the available fields in this web + * + */ + + }, { + key: "availablefields", + get: function get() { + return new fields_1.Fields(this, "availablefields"); + } + /** + * Get the navigation options in this web + * + */ + + }, { + key: "navigation", + get: function get() { + return new navigation_1.Navigation(this); + } + /** + * Gets the site users + * + */ + + }, { + key: "siteUsers", + get: function get() { + return new siteusers_1.SiteUsers(this); + } + /** + * Gets the site groups + * + */ + + }, { + key: "siteGroups", + get: function get() { + return new sitegroups_1.SiteGroups(this); + } + /** + * Gets the current user + */ + + }, { + key: "currentUser", + get: function get() { + return new siteusers_1.CurrentUser(this); + } + /** + * Get the folders in this web + * + */ + + }, { + key: "folders", + get: function get() { + return new folders_1.Folders(this); + } + /** + * Get all custom actions on a site + * + */ + + }, { + key: "userCustomActions", + get: function get() { + return new usercustomactions_1.UserCustomActions(this); + } + /** + * Gets the collection of RoleDefinition resources. + * + */ + + }, { + key: "roleDefinitions", + get: function get() { + return new roles_1.RoleDefinitions(this); + } + }, { + key: "customListTemplate", + get: function get() { + return new queryable_1.QueryableCollection(this, "getcustomlisttemplates"); + } + }]); + + return Web; + }(queryablesecurable_1.QueryableSecurable); + + exports.Web = Web; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var roles_1 = __webpack_require__(22); + var queryable_1 = __webpack_require__(11); + + var QueryableSecurable = function (_queryable_1$Queryabl) { + _inherits(QueryableSecurable, _queryable_1$Queryabl); + + function QueryableSecurable() { + _classCallCheck(this, QueryableSecurable); + + return _possibleConstructorReturn(this, (QueryableSecurable.__proto__ || Object.getPrototypeOf(QueryableSecurable)).apply(this, arguments)); + } + + _createClass(QueryableSecurable, [{ + key: "getUserEffectivePermissions", + + /** + * Gets the effective permissions for the user supplied + * + * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com) + */ + value: function getUserEffectivePermissions(loginName) { + var perms = new queryable_1.Queryable(this, "getUserEffectivePermissions(@user)"); + perms.query.add("@user", "'" + encodeURIComponent(loginName) + "'"); + return perms; + } + /** + * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes + * + * @param copyRoleAssignments If true the permissions are copied from the current parent scope + * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object + */ + + }, { + key: "breakRoleInheritance", + value: function breakRoleInheritance() { + var copyRoleAssignments = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var clearSubscopes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var Breaker = function (_queryable_1$Queryabl2) { + _inherits(Breaker, _queryable_1$Queryabl2); + + function Breaker(baseUrl, copy, clear) { + _classCallCheck(this, Breaker); + + return _possibleConstructorReturn(this, (Breaker.__proto__ || Object.getPrototypeOf(Breaker)).call(this, baseUrl, "breakroleinheritance(copyroleassignments=" + copy + ", clearsubscopes=" + clear + ")")); + } + + _createClass(Breaker, [{ + key: "break", + value: function _break() { + return this.post(); + } + }]); + + return Breaker; + }(queryable_1.Queryable); + + var b = new Breaker(this, copyRoleAssignments, clearSubscopes); + return b.break(); + } + /** + * Removes the local role assignments so that it re-inherit role assignments from the parent object. + * + */ + + }, { + key: "resetRoleInheritance", + value: function resetRoleInheritance() { + var Resetter = function (_queryable_1$Queryabl3) { + _inherits(Resetter, _queryable_1$Queryabl3); + + function Resetter(baseUrl) { + _classCallCheck(this, Resetter); + + return _possibleConstructorReturn(this, (Resetter.__proto__ || Object.getPrototypeOf(Resetter)).call(this, baseUrl, "resetroleinheritance")); + } + + _createClass(Resetter, [{ + key: "reset", + value: function reset() { + return this.post(); + } + }]); + + return Resetter; + }(queryable_1.Queryable); + + var r = new Resetter(this); + return r.reset(); + } + }, { + key: "roleAssignments", + + /** + * Gets the set of role assignments for this item + * + */ + get: function get() { + return new roles_1.RoleAssignments(this); + } + /** + * Gets the closest securable up the security hierarchy whose permissions are applied to this list item + * + */ + + }, { + key: "firstUniqueAncestorSecurableObject", + get: function get() { + return new queryable_1.QueryableInstance(this, "FirstUniqueAncestorSecurableObject"); + } + }]); + + return QueryableSecurable; + }(queryable_1.QueryableInstance); + + exports.QueryableSecurable = QueryableSecurable; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var sitegroups_1 = __webpack_require__(23); + var util_1 = __webpack_require__(1); + /** + * Describes a set of role assignments for the current scope + * + */ + + var RoleAssignments = function (_queryable_1$Queryabl) { + _inherits(RoleAssignments, _queryable_1$Queryabl); + + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function RoleAssignments(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "roleassignments"; + + _classCallCheck(this, RoleAssignments); + + return _possibleConstructorReturn(this, (RoleAssignments.__proto__ || Object.getPrototypeOf(RoleAssignments)).call(this, baseUrl, path)); + } + /** + * Adds a new role assignment with the specified principal and role definitions to the collection. + * + * @param principalId The ID of the user or group to assign permissions to + * @param roleDefId The ID of the role definition that defines the permissions to assign + * + */ + + + _createClass(RoleAssignments, [{ + key: "add", + value: function add(principalId, roleDefId) { + var a = new RoleAssignments(this, "addroleassignment(principalid=" + principalId + ", roledefid=" + roleDefId + ")"); + return a.post(); + } + /** + * Removes the role assignment with the specified principal and role definition from the collection + * + * @param principalId The ID of the user or group in the role assignment. + * @param roleDefId The ID of the role definition in the role assignment + * + */ + + }, { + key: "remove", + value: function remove(principalId, roleDefId) { + var a = new RoleAssignments(this, "removeroleassignment(principalid=" + principalId + ", roledefid=" + roleDefId + ")"); + return a.post(); + } + /** + * Gets the role assignment associated with the specified principal ID from the collection. + * + * @param id The id of the role assignment + */ + + }, { + key: "getById", + value: function getById(id) { + var ra = new RoleAssignment(this); + ra.concat("(" + id + ")"); + return ra; + } + }]); + + return RoleAssignments; + }(queryable_1.QueryableCollection); + + exports.RoleAssignments = RoleAssignments; + + var RoleAssignment = function (_queryable_1$Queryabl2) { + _inherits(RoleAssignment, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the RoleAssignment class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function RoleAssignment(baseUrl, path) { + _classCallCheck(this, RoleAssignment); + + return _possibleConstructorReturn(this, (RoleAssignment.__proto__ || Object.getPrototypeOf(RoleAssignment)).call(this, baseUrl, path)); + } + + _createClass(RoleAssignment, [{ + key: "delete", + + /** + * Delete this role assignment + * + */ + value: function _delete() { + return this.post({ + headers: { + "X-HTTP-Method": "DELETE" + } + }); + } + }, { + key: "groups", + get: function get() { + return new sitegroups_1.SiteGroups(this, "groups"); + } + /** + * Get the role definition bindings for this role assignment + * + */ + + }, { + key: "bindings", + get: function get() { + return new RoleDefinitionBindings(this); + } + }]); + + return RoleAssignment; + }(queryable_1.QueryableInstance); + + exports.RoleAssignment = RoleAssignment; + + var RoleDefinitions = function (_queryable_1$Queryabl3) { + _inherits(RoleDefinitions, _queryable_1$Queryabl3); + + /** + * Creates a new instance of the RoleDefinitions class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path + * + */ + function RoleDefinitions(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "roledefinitions"; + + _classCallCheck(this, RoleDefinitions); + + return _possibleConstructorReturn(this, (RoleDefinitions.__proto__ || Object.getPrototypeOf(RoleDefinitions)).call(this, baseUrl, path)); + } + /** + * Gets the role definition with the specified ID from the collection. + * + * @param id The ID of the role definition. + * + */ + + + _createClass(RoleDefinitions, [{ + key: "getById", + value: function getById(id) { + return new RoleDefinition(this, "getById(" + id + ")"); + } + /** + * Gets the role definition with the specified name. + * + * @param name The name of the role definition. + * + */ + + }, { + key: "getByName", + value: function getByName(name) { + return new RoleDefinition(this, "getbyname('" + name + "')"); + } + /** + * Gets the role definition with the specified type. + * + * @param name The name of the role definition. + * + */ + + }, { + key: "getByType", + value: function getByType(roleTypeKind) { + return new RoleDefinition(this, "getbytype(" + roleTypeKind + ")"); + } + /** + * Create a role definition + * + * @param name The new role definition's name + * @param description The new role definition's description + * @param order The order in which the role definition appears + * @param basePermissions The permissions mask for this role definition + * + */ + + }, { + key: "add", + value: function add(name, description, order, basePermissions) { + var _this4 = this; + + var postBody = JSON.stringify({ + BasePermissions: util_1.Util.extend({ __metadata: { type: "SP.BasePermissions" } }, basePermissions), + Description: description, + Name: name, + Order: order, + __metadata: { "type": "SP.RoleDefinition" } + }); + return this.post({ body: postBody }).then(function (data) { + return { + data: data, + definition: _this4.getById(data.Id) + }; + }); + } + }]); + + return RoleDefinitions; + }(queryable_1.QueryableCollection); + + exports.RoleDefinitions = RoleDefinitions; + + var RoleDefinition = function (_queryable_1$Queryabl4) { + _inherits(RoleDefinition, _queryable_1$Queryabl4); + + function RoleDefinition(baseUrl, path) { + _classCallCheck(this, RoleDefinition); + + return _possibleConstructorReturn(this, (RoleDefinition.__proto__ || Object.getPrototypeOf(RoleDefinition)).call(this, baseUrl, path)); + } + /** + * Updates this web intance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + /* tslint:disable no-string-literal */ + + + _createClass(RoleDefinition, [{ + key: "update", + value: function update(properties) { + var _this6 = this; + + if (typeof properties.hasOwnProperty("BasePermissions") !== "undefined") { + properties["BasePermissions"] = util_1.Util.extend({ __metadata: { type: "SP.BasePermissions" } }, properties["BasePermissions"]); + } + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.RoleDefinition" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + var retDef = _this6; + if (properties.hasOwnProperty("Name")) { + var parent = _this6.getParent(RoleDefinitions, _this6.parentUrl, ""); + retDef = parent.getByName(properties["Name"]); + } + return { + data: data, + definition: retDef + }; + }); + } + /* tslint:enable */ + /** + * Delete this role definition + * + */ + + }, { + key: "delete", + value: function _delete() { + return this.post({ + headers: { + "X-HTTP-Method": "DELETE" + } + }); + } + }]); + + return RoleDefinition; + }(queryable_1.QueryableInstance); + + exports.RoleDefinition = RoleDefinition; + + var RoleDefinitionBindings = function (_queryable_1$Queryabl5) { + _inherits(RoleDefinitionBindings, _queryable_1$Queryabl5); + + function RoleDefinitionBindings(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "roledefinitionbindings"; + + _classCallCheck(this, RoleDefinitionBindings); + + return _possibleConstructorReturn(this, (RoleDefinitionBindings.__proto__ || Object.getPrototypeOf(RoleDefinitionBindings)).call(this, baseUrl, path)); + } + + return RoleDefinitionBindings; + }(queryable_1.QueryableCollection); + + exports.RoleDefinitionBindings = RoleDefinitionBindings; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var siteusers_1 = __webpack_require__(24); + var util_1 = __webpack_require__(1); + /** + * Principal Type enum + * + */ + var PrincipalType; + (function (PrincipalType) { + PrincipalType[PrincipalType["None"] = 0] = "None"; + PrincipalType[PrincipalType["User"] = 1] = "User"; + PrincipalType[PrincipalType["DistributionList"] = 2] = "DistributionList"; + PrincipalType[PrincipalType["SecurityGroup"] = 4] = "SecurityGroup"; + PrincipalType[PrincipalType["SharePointGroup"] = 8] = "SharePointGroup"; + PrincipalType[PrincipalType["All"] = 15] = "All"; + })(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {})); + /** + * Describes a collection of site users + * + */ + + var SiteGroups = function (_queryable_1$Queryabl) { + _inherits(SiteGroups, _queryable_1$Queryabl); + + /** + * Creates a new instance of the SiteUsers class + * + * @param baseUrl The url or Queryable which forms the parent of this user collection + */ + function SiteGroups(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "sitegroups"; + + _classCallCheck(this, SiteGroups); + + return _possibleConstructorReturn(this, (SiteGroups.__proto__ || Object.getPrototypeOf(SiteGroups)).call(this, baseUrl, path)); + } + /** + * Adds a new group to the site collection + * + * @param props The properties to be updated + */ + + + _createClass(SiteGroups, [{ + key: "add", + value: function add(properties) { + var _this2 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ "__metadata": { "type": "SP.Group" } }, properties)); + return this.post({ body: postBody }).then(function (data) { + return { + data: data, + group: _this2.getById(data.Id) + }; + }); + } + /** + * Gets a group from the collection by name + * + * @param email The name of the group + */ + + }, { + key: "getByName", + value: function getByName(groupName) { + return new SiteGroup(this, "getByName('" + groupName + "')"); + } + /** + * Gets a group from the collection by id + * + * @param id The id of the group + */ + + }, { + key: "getById", + value: function getById(id) { + var sg = new SiteGroup(this); + sg.concat("(" + id + ")"); + return sg; + } + /** + * Removes the group with the specified member ID from the collection. + * + * @param id The id of the group to remove + */ + + }, { + key: "removeById", + value: function removeById(id) { + var g = new SiteGroups(this, "removeById('" + id + "')"); + return g.post(); + } + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user + */ + + }, { + key: "removeByLoginName", + value: function removeByLoginName(loginName) { + var g = new SiteGroups(this, "removeByLoginName('" + loginName + "')"); + return g.post(); + } + }]); + + return SiteGroups; + }(queryable_1.QueryableCollection); + + exports.SiteGroups = SiteGroups; + /** + * Describes a single group + * + */ + + var SiteGroup = function (_queryable_1$Queryabl2) { + _inherits(SiteGroup, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the Group class + * + * @param baseUrl The url or Queryable which forms the parent of this site group + * @param path Optional, passes the path to the group + */ + function SiteGroup(baseUrl, path) { + _classCallCheck(this, SiteGroup); + + return _possibleConstructorReturn(this, (SiteGroup.__proto__ || Object.getPrototypeOf(SiteGroup)).call(this, baseUrl, path)); + } + /** + * Get's the users for this group + * + */ + + + _createClass(SiteGroup, [{ + key: "update", + + /** + * Updates this group instance with the supplied properties + * + * @param properties A GroupWriteableProperties object of property names and values to update for the user + */ + /* tslint:disable no-string-literal */ + value: function update(properties) { + var _this4 = this; + + var postBody = util_1.Util.extend({ "__metadata": { "type": "SP.Group" } }, properties); + return this.post({ + body: JSON.stringify(postBody), + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + var retGroup = _this4; + if (properties.hasOwnProperty("Title")) { + retGroup = _this4.getParent(SiteGroup, _this4.parentUrl, "getByName('" + properties["Title"] + "')"); + } + return { + data: data, + group: retGroup + }; + }); + } + }, { + key: "users", + get: function get() { + return new siteusers_1.SiteUsers(this, "users"); + } + }]); + + return SiteGroup; + }(queryable_1.QueryableInstance); + + exports.SiteGroup = SiteGroup; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var sitegroups_1 = __webpack_require__(23); + var util_1 = __webpack_require__(1); + /** + * Describes a collection of all site collection users + * + */ + + var SiteUsers = function (_queryable_1$Queryabl) { + _inherits(SiteUsers, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Users class + * + * @param baseUrl The url or Queryable which forms the parent of this user collection + */ + function SiteUsers(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "siteusers"; + + _classCallCheck(this, SiteUsers); + + return _possibleConstructorReturn(this, (SiteUsers.__proto__ || Object.getPrototypeOf(SiteUsers)).call(this, baseUrl, path)); + } + /** + * Gets a user from the collection by email + * + * @param email The email of the user + */ + + + _createClass(SiteUsers, [{ + key: "getByEmail", + value: function getByEmail(email) { + return new SiteUser(this, "getByEmail('" + email + "')"); + } + /** + * Gets a user from the collection by id + * + * @param id The id of the user + */ + + }, { + key: "getById", + value: function getById(id) { + return new SiteUser(this, "getById(" + id + ")"); + } + /** + * Gets a user from the collection by login name + * + * @param loginName The email address of the user + */ + + }, { + key: "getByLoginName", + value: function getByLoginName(loginName) { + var su = new SiteUser(this); + su.concat("(@v)"); + su.query.add("@v", encodeURIComponent(loginName)); + return su; + } + /** + * Removes a user from the collection by id + * + * @param id The id of the user + */ + + }, { + key: "removeById", + value: function removeById(id) { + var o = new SiteUsers(this, "removeById(" + id + ")"); + return o.post(); + } + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user + */ + + }, { + key: "removeByLoginName", + value: function removeByLoginName(loginName) { + var o = new SiteUsers(this, "removeByLoginName(@v)"); + o.query.add("@v", encodeURIComponent(loginName)); + return o.post(); + } + /** + * Add a user to a group + * + * @param loginName The login name of the user to add to the group + * + */ + + }, { + key: "add", + value: function add(loginName) { + var _this2 = this; + + var postBody = JSON.stringify({ "__metadata": { "type": "SP.User" }, LoginName: loginName }); + return this.post({ body: postBody }).then(function () { + return _this2.getByLoginName(loginName); + }); + } + }]); + + return SiteUsers; + }(queryable_1.QueryableCollection); + + exports.SiteUsers = SiteUsers; + /** + * Describes a single user + * + */ + + var SiteUser = function (_queryable_1$Queryabl2) { + _inherits(SiteUser, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the User class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, passes the path to the user + */ + function SiteUser(baseUrl, path) { + _classCallCheck(this, SiteUser); + + return _possibleConstructorReturn(this, (SiteUser.__proto__ || Object.getPrototypeOf(SiteUser)).call(this, baseUrl, path)); + } + /** + * Get's the groups for this user. + * + */ + + + _createClass(SiteUser, [{ + key: "update", + + /** + * Updates this user instance with the supplied properties + * + * @param properties A plain object of property names and values to update for the user + */ + value: function update(properties) { + var _this4 = this; + + var postBody = util_1.Util.extend({ "__metadata": { "type": "SP.User" } }, properties); + return this.post({ + body: JSON.stringify(postBody), + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + data: data, + user: _this4 + }; + }); + } + /** + * Delete this user + * + */ + + }, { + key: "delete", + value: function _delete() { + return this.post({ + headers: { + "X-HTTP-Method": "DELETE" + } + }); + } + }, { + key: "groups", + get: function get() { + return new sitegroups_1.SiteGroups(this, "groups"); + } + }]); + + return SiteUser; + }(queryable_1.QueryableInstance); + + exports.SiteUser = SiteUser; + /** + * Represents the current user + */ + + var CurrentUser = function (_queryable_1$Queryabl3) { + _inherits(CurrentUser, _queryable_1$Queryabl3); + + function CurrentUser(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "currentuser"; + + _classCallCheck(this, CurrentUser); + + return _possibleConstructorReturn(this, (CurrentUser.__proto__ || Object.getPrototypeOf(CurrentUser)).call(this, baseUrl, path)); + } + + return CurrentUser; + }(queryable_1.QueryableInstance); + + exports.CurrentUser = CurrentUser; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var items_1 = __webpack_require__(26); + var views_1 = __webpack_require__(32); + var contenttypes_1 = __webpack_require__(30); + var fields_1 = __webpack_require__(33); + var forms_1 = __webpack_require__(35); + var subscriptions_1 = __webpack_require__(36); + var queryable_1 = __webpack_require__(11); + var queryablesecurable_1 = __webpack_require__(21); + var util_1 = __webpack_require__(1); + var usercustomactions_1 = __webpack_require__(37); + var odata_1 = __webpack_require__(12); + var exceptions_1 = __webpack_require__(15); + /** + * Describes a collection of List objects + * + */ + + var Lists = function (_queryable_1$Queryabl) { + _inherits(Lists, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Lists(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "lists"; + + _classCallCheck(this, Lists); + + return _possibleConstructorReturn(this, (Lists.__proto__ || Object.getPrototypeOf(Lists)).call(this, baseUrl, path)); + } + /** + * Gets a list from the collection by title + * + * @param title The title of the list + */ + + + _createClass(Lists, [{ + key: "getByTitle", + value: function getByTitle(title) { + return new List(this, "getByTitle('" + title + "')"); + } + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the list (GUID) + */ + + }, { + key: "getById", + value: function getById(id) { + var list = new List(this); + list.concat("('" + id + "')"); + return list; + } + /** + * Adds a new list to the collection + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body + */ + + }, { + key: "add", + value: function add(title) { + var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + var template = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100; + + var _this2 = this; + + var enableContentTypes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + + var postBody = JSON.stringify(util_1.Util.extend({ + "AllowContentTypes": enableContentTypes, + "BaseTemplate": template, + "ContentTypesEnabled": enableContentTypes, + "Description": description, + "Title": title, + "__metadata": { "type": "SP.List" } + }, additionalSettings)); + return this.post({ body: postBody }).then(function (data) { + return { data: data, list: _this2.getByTitle(title) }; + }); + } + /** + * Ensures that the specified list exists in the collection (note: this method not supported for batching) + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list + */ + + }, { + key: "ensure", + value: function ensure(title) { + var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + var template = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100; + + var _this3 = this; + + var enableContentTypes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + + if (this.hasBatch) { + throw new exceptions_1.NotSupportedInBatchException("The ensure list method"); + } + return new Promise(function (resolve, reject) { + var list = _this3.getByTitle(title); + list.get().then(function (_) { + list.update(additionalSettings).then(function (d) { + resolve({ created: false, data: d, list: list }); + }).catch(function (e) { + return reject(e); + }); + }).catch(function (_) { + _this3.add(title, description, template, enableContentTypes, additionalSettings).then(function (r) { + resolve({ created: true, data: r.data, list: _this3.getByTitle(title) }); + }).catch(function (e) { + return reject(e); + }); + }); + }); + } + /** + * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages. + */ + + }, { + key: "ensureSiteAssetsLibrary", + value: function ensureSiteAssetsLibrary() { + var q = new Lists(this, "ensuresiteassetslibrary"); + return q.post().then(function (json) { + return new List(odata_1.extractOdataId(json)); + }); + } + /** + * Gets a list that is the default location for wiki pages. + */ + + }, { + key: "ensureSitePagesLibrary", + value: function ensureSitePagesLibrary() { + var q = new Lists(this, "ensuresitepageslibrary"); + return q.post().then(function (json) { + return new List(odata_1.extractOdataId(json)); + }); + } + }]); + + return Lists; + }(queryable_1.QueryableCollection); + + exports.Lists = Lists; + /** + * Describes a single List instance + * + */ + + var List = function (_queryablesecurable_) { + _inherits(List, _queryablesecurable_); + + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function List(baseUrl, path) { + _classCallCheck(this, List); + + return _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, baseUrl, path)); + } + /** + * Gets the content types in this list + * + */ + + + _createClass(List, [{ + key: "getView", + + /** + * Gets a view by view guid id + * + */ + value: function getView(viewId) { + return new views_1.View(this, "getView('" + viewId + "')"); + } + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + /* tslint:disable no-string-literal */ + + }, { + key: "update", + value: function update(properties) { + var _this5 = this; + + var eTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "*"; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.List" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + var retList = _this5; + if (properties.hasOwnProperty("Title")) { + retList = _this5.getParent(List, _this5.parentUrl, "getByTitle('" + properties["Title"] + "')"); + } + return { + data: data, + list: retList + }; + }); + } + /* tslint:enable */ + /** + * Delete this list + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + + }, { + key: "delete", + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return this.post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + + }, { + key: "getChanges", + value: function getChanges(query) { + var postBody = JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeQuery" } }, query) }); + // don't change "this" instance of the List, make a new one + var q = new List(this, "getchanges"); + return q.post({ body: postBody }); + } + /** + * Returns a collection of items from the list based on the specified query. + * + * @param CamlQuery The Query schema of Collaborative Application Markup + * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation + * to define queries against list data. + * see: + * + * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx + * + * @param expands A URI with a $expand System Query Option indicates that Entries associated with + * the Entry or Collection of Entries identified by the Resource Path + * section of the URI must be represented inline (i.e. eagerly loaded). + * see: + * + * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx + * + * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption + */ + + }, { + key: "getItemsByCAMLQuery", + value: function getItemsByCAMLQuery(query) { + var postBody = JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.CamlQuery" } }, query) }); + // don't change "this" instance of the List, make a new one + var q = new List(this, "getitems"); + + for (var _len = arguments.length, expands = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + expands[_key - 1] = arguments[_key]; + } + + q = q.expand.apply(q, expands); + return q.post({ body: postBody }); + } + /** + * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx + */ + + }, { + key: "getListItemChangesSinceToken", + value: function getListItemChangesSinceToken(query) { + var postBody = JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeLogItemQuery" } }, query) }); + // don't change "this" instance of the List, make a new one + var q = new List(this, "getlistitemchangessincetoken"); + // note we are using a custom parser to return text as the response is an xml doc + return q.post({ body: postBody }, { + parse: function parse(r) { + return r.text(); + } + }); + } + /** + * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + + }, { + key: "recycle", + value: function recycle() { + this.append("recycle"); + return this.post().then(function (data) { + if (data.hasOwnProperty("Recycle")) { + return data.Recycle; + } else { + return data; + } + }); + } + /** + * Renders list data based on the view xml provided + */ + + }, { + key: "renderListData", + value: function renderListData(viewXml) { + // don't change "this" instance of the List, make a new one + var q = new List(this, "renderlistdata(@viewXml)"); + q.query.add("@viewXml", "'" + viewXml + "'"); + return q.post().then(function (data) { + // data will be a string, so we parse it again + data = JSON.parse(data); + if (data.hasOwnProperty("RenderListData")) { + return data.RenderListData; + } else { + return data; + } + }); + } + /** + * Gets the field values and field schema attributes for a list item. + */ + + }, { + key: "renderListFormData", + value: function renderListFormData(itemId, formId, mode) { + // don't change "this" instance of the List, make a new one + var q = new List(this, "renderlistformdata(itemid=" + itemId + ", formid='" + formId + "', mode=" + mode + ")"); + return q.post().then(function (data) { + // data will be a string, so we parse it again + data = JSON.parse(data); + if (data.hasOwnProperty("ListData")) { + return data.ListData; + } else { + return data; + } + }); + } + /** + * Reserves a list item ID for idempotent list item creation. + */ + + }, { + key: "reserveListItemId", + value: function reserveListItemId() { + // don't change "this" instance of the List, make a new one + var q = new List(this, "reservelistitemid"); + return q.post().then(function (data) { + if (data.hasOwnProperty("ReserveListItemId")) { + return data.ReserveListItemId; + } else { + return data; + } + }); + } + /** + * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items + * + */ + + }, { + key: "getListItemEntityTypeFullName", + value: function getListItemEntityTypeFullName() { + var q = new queryable_1.QueryableInstance(this); + return q.select("ListItemEntityTypeFullName").getAs().then(function (o) { + return o.ListItemEntityTypeFullName; + }); + } + }, { + key: "contentTypes", + get: function get() { + return new contenttypes_1.ContentTypes(this); + } + /** + * Gets the items in this list + * + */ + + }, { + key: "items", + get: function get() { + return new items_1.Items(this); + } + /** + * Gets the views in this list + * + */ + + }, { + key: "views", + get: function get() { + return new views_1.Views(this); + } + /** + * Gets the fields in this list + * + */ + + }, { + key: "fields", + get: function get() { + return new fields_1.Fields(this); + } + /** + * Gets the forms in this list + * + */ + + }, { + key: "forms", + get: function get() { + return new forms_1.Forms(this); + } + /** + * Gets the default view of this list + * + */ + + }, { + key: "defaultView", + get: function get() { + return new queryable_1.QueryableInstance(this, "DefaultView"); + } + /** + * Get all custom actions on a site collection + * + */ + + }, { + key: "userCustomActions", + get: function get() { + return new usercustomactions_1.UserCustomActions(this); + } + /** + * Gets the effective base permissions of this list + * + */ + + }, { + key: "effectiveBasePermissions", + get: function get() { + return new queryable_1.Queryable(this, "EffectiveBasePermissions"); + } + /** + * Gets the event receivers attached to this list + * + */ + + }, { + key: "eventReceivers", + get: function get() { + return new queryable_1.QueryableCollection(this, "EventReceivers"); + } + /** + * Gets the related fields of this list + * + */ + + }, { + key: "relatedFields", + get: function get() { + return new queryable_1.Queryable(this, "getRelatedFields"); + } + /** + * Gets the IRM settings for this list + * + */ + + }, { + key: "informationRightsManagementSettings", + get: function get() { + return new queryable_1.Queryable(this, "InformationRightsManagementSettings"); + } + /** + * Gets the webhook subscriptions of this list + * + */ + + }, { + key: "subscriptions", + get: function get() { + return new subscriptions_1.Subscriptions(this); + } + }]); + + return List; + }(queryablesecurable_1.QueryableSecurable); + + exports.List = List; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var queryablesecurable_1 = __webpack_require__(21); + var folders_1 = __webpack_require__(27); + var files_1 = __webpack_require__(28); + var contenttypes_1 = __webpack_require__(30); + var util_1 = __webpack_require__(1); + var odata_1 = __webpack_require__(12); + var attachmentfiles_1 = __webpack_require__(31); + var lists_1 = __webpack_require__(25); + /** + * Describes a collection of Item objects + * + */ + + var Items = function (_queryable_1$Queryabl) { + _inherits(Items, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Items(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "items"; + + _classCallCheck(this, Items); + + return _possibleConstructorReturn(this, (Items.__proto__ || Object.getPrototypeOf(Items)).call(this, baseUrl, path)); + } + /** + * Gets an Item by id + * + * @param id The integer id of the item to retrieve + */ + + + _createClass(Items, [{ + key: "getById", + value: function getById(id) { + var i = new Item(this); + i.concat("(" + id + ")"); + return i; + } + /** + * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6) + * + * @param skip The starting id where the page should start, use with top to specify pages + */ + + }, { + key: "skip", + value: function skip(_skip) { + this._query.add("$skiptoken", encodeURIComponent("Paged=TRUE&p_ID=" + _skip)); + return this; + } + /** + * Gets a collection designed to aid in paging through data + * + */ + + }, { + key: "getPaged", + value: function getPaged() { + return this.getAs(new PagedItemCollectionParser()); + } + /** + * Adds a new item to the collection + * + * @param properties The new items's properties + */ + + }, { + key: "add", + value: function add() { + var _this2 = this; + + var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var listItemEntityTypeFullName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + var doAdd = function doAdd(listItemEntityType) { + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": listItemEntityType } + }, properties)); + return _this2.postAs({ body: postBody }).then(function (data) { + return { + data: data, + item: _this2.getById(data.Id) + }; + }); + }; + if (!listItemEntityTypeFullName) { + var _ret = function () { + var parentList = _this2.getParent(lists_1.List); + var removeDependency = _this2.addBatchDependency(); + return { + v: parentList.getListItemEntityTypeFullName().then(function (n) { + var promise = doAdd(n); + removeDependency(); + return promise; + }) + }; + }(); + + if ((typeof _ret === "undefined" ? "undefined" : _typeof(_ret)) === "object") return _ret.v; + } else { + return doAdd(listItemEntityTypeFullName); + } + } + }]); + + return Items; + }(queryable_1.QueryableCollection); + + exports.Items = Items; + /** + * Descrines a single Item instance + * + */ + + var Item = function (_queryablesecurable_) { + _inherits(Item, _queryablesecurable_); + + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Item(baseUrl, path) { + _classCallCheck(this, Item); + + return _possibleConstructorReturn(this, (Item.__proto__ || Object.getPrototypeOf(Item)).call(this, baseUrl, path)); + } + /** + * Gets the set of attachments for this item + * + */ + + + _createClass(Item, [{ + key: "update", + + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + value: function update(properties) { + var _this4 = this; + + var eTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "*"; + + return new Promise(function (resolve, reject) { + var removeDependency = _this4.addBatchDependency(); + var parentList = _this4.getParent(queryable_1.QueryableInstance, _this4.parentUrl.substr(0, _this4.parentUrl.lastIndexOf("/"))); + parentList.select("ListItemEntityTypeFullName").getAs().then(function (d) { + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": d.ListItemEntityTypeFullName } + }, properties)); + _this4.post({ + body: postBody, + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "MERGE" + } + }, new ItemUpdatedParser()).then(function (data) { + removeDependency(); + resolve({ + data: data, + item: _this4 + }); + }); + }).catch(function (e) { + return reject(e); + }); + }); + } + /** + * Delete this item + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + + }, { + key: "delete", + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return this.post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + + }, { + key: "recycle", + value: function recycle() { + var i = new Item(this, "recycle"); + return i.post(); + } + /** + * Gets a string representation of the full URL to the WOPI frame. + * If there is no associated WOPI application, or no associated action, an empty string is returned. + * + * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview + */ + + }, { + key: "getWopiFrameUrl", + value: function getWopiFrameUrl() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + var i = new Item(this, "getWOPIFrameUrl(@action)"); + i._query.add("@action", action); + return i.post().then(function (data) { + return data.GetWOPIFrameUrl; + }); + } + /** + * Validates and sets the values of the specified collection of fields for the list item. + * + * @param formValues The fields to change and their new values. + * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false. + */ + /* tslint:disable max-line-length */ + + }, { + key: "validateUpdateListItem", + value: function validateUpdateListItem(formValues) { + var newDocumentUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var postBody = JSON.stringify({ "formValues": formValues, bNewDocumentUpdate: newDocumentUpdate }); + var item = new Item(this, "validateupdatelistitem"); + return item.post({ body: postBody }); + } + }, { + key: "attachmentFiles", + get: function get() { + return new attachmentfiles_1.AttachmentFiles(this); + } + /** + * Gets the content type for this item + * + */ + + }, { + key: "contentType", + get: function get() { + return new contenttypes_1.ContentType(this, "ContentType"); + } + /** + * Gets the effective base permissions for the item + * + */ + + }, { + key: "effectiveBasePermissions", + get: function get() { + return new queryable_1.Queryable(this, "EffectiveBasePermissions"); + } + /** + * Gets the effective base permissions for the item in a UI context + * + */ + + }, { + key: "effectiveBasePermissionsForUI", + get: function get() { + return new queryable_1.Queryable(this, "EffectiveBasePermissionsForUI"); + } + /** + * Gets the field values for this list item in their HTML representation + * + */ + + }, { + key: "fieldValuesAsHTML", + get: function get() { + return new queryable_1.QueryableInstance(this, "FieldValuesAsHTML"); + } + /** + * Gets the field values for this list item in their text representation + * + */ + + }, { + key: "fieldValuesAsText", + get: function get() { + return new queryable_1.QueryableInstance(this, "FieldValuesAsText"); + } + /** + * Gets the field values for this list item for use in editing controls + * + */ + + }, { + key: "fieldValuesForEdit", + get: function get() { + return new queryable_1.QueryableInstance(this, "FieldValuesForEdit"); + } + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + + }, { + key: "folder", + get: function get() { + return new folders_1.Folder(this, "folder"); + } + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + + }, { + key: "file", + get: function get() { + return new files_1.File(this, "file"); + } + }]); + + return Item; + }(queryablesecurable_1.QueryableSecurable); + + exports.Item = Item; + /** + * Provides paging functionality for list items + */ + + var PagedItemCollection = function () { + function PagedItemCollection(nextUrl, results) { + _classCallCheck(this, PagedItemCollection); + + this.nextUrl = nextUrl; + this.results = results; + } + /** + * If true there are more results available in the set, otherwise there are not + */ + + + _createClass(PagedItemCollection, [{ + key: "getNext", + + /** + * Gets the next set of results, or resolves to null if no results are available + */ + value: function getNext() { + if (this.hasNext) { + var items = new Items(this.nextUrl, null); + return items.getPaged(); + } + return new Promise(function (r) { + return r(null); + }); + } + }, { + key: "hasNext", + get: function get() { + return typeof this.nextUrl === "string" && this.nextUrl.length > 0; + } + }]); + + return PagedItemCollection; + }(); + + exports.PagedItemCollection = PagedItemCollection; + + var PagedItemCollectionParser = function (_odata_1$ODataParserB) { + _inherits(PagedItemCollectionParser, _odata_1$ODataParserB); + + function PagedItemCollectionParser() { + _classCallCheck(this, PagedItemCollectionParser); + + return _possibleConstructorReturn(this, (PagedItemCollectionParser.__proto__ || Object.getPrototypeOf(PagedItemCollectionParser)).apply(this, arguments)); + } + + _createClass(PagedItemCollectionParser, [{ + key: "parse", + value: function parse(r) { + var _this6 = this; + + return new Promise(function (resolve, reject) { + if (_this6.handleError(r, reject)) { + r.json().then(function (json) { + var nextUrl = json.hasOwnProperty("d") && json.d.hasOwnProperty("__next") ? json.d.__next : json["odata.nextLink"]; + resolve(new PagedItemCollection(nextUrl, _this6.parseODataJSON(json))); + }); + } + }); + } + }]); + + return PagedItemCollectionParser; + }(odata_1.ODataParserBase); + + var ItemUpdatedParser = function (_odata_1$ODataParserB2) { + _inherits(ItemUpdatedParser, _odata_1$ODataParserB2); + + function ItemUpdatedParser() { + _classCallCheck(this, ItemUpdatedParser); + + return _possibleConstructorReturn(this, (ItemUpdatedParser.__proto__ || Object.getPrototypeOf(ItemUpdatedParser)).apply(this, arguments)); + } + + _createClass(ItemUpdatedParser, [{ + key: "parse", + value: function parse(r) { + var _this8 = this; + + return new Promise(function (resolve, reject) { + if (_this8.handleError(r, reject)) { + resolve({ + "odata.etag": r.headers.get("etag") + }); + } + }); + } + }]); + + return ItemUpdatedParser; + }(odata_1.ODataParserBase); + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var files_1 = __webpack_require__(28); + /** + * Describes a collection of Folder objects + * + */ + + var Folders = function (_queryable_1$Queryabl) { + _inherits(Folders, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Folders class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Folders(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "folders"; + + _classCallCheck(this, Folders); + + return _possibleConstructorReturn(this, (Folders.__proto__ || Object.getPrototypeOf(Folders)).call(this, baseUrl, path)); + } + /** + * Gets a folder by folder name + * + */ + + + _createClass(Folders, [{ + key: "getByName", + value: function getByName(name) { + var f = new Folder(this); + f.concat("('" + name + "')"); + return f; + } + /** + * Adds a new folder to the current folder (relative) or any folder (absolute) + * + * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute. + * @returns The new Folder and the raw response. + */ + + }, { + key: "add", + value: function add(url) { + var _this2 = this; + + return new Folders(this, "add('" + url + "')").post().then(function (response) { + return { + data: response, + folder: _this2.getByName(url) + }; + }); + } + }]); + + return Folders; + }(queryable_1.QueryableCollection); + + exports.Folders = Folders; + /** + * Describes a single Folder instance + * + */ + + var Folder = function (_queryable_1$Queryabl2) { + _inherits(Folder, _queryable_1$Queryabl2); + + // + // TODO: + // Properties (https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FolderProperties) + // UniqueContentTypeOrder (setter) + // WelcomePage (setter) + // + /** + * Creates a new instance of the Folder class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function Folder(baseUrl, path) { + _classCallCheck(this, Folder); + + return _possibleConstructorReturn(this, (Folder.__proto__ || Object.getPrototypeOf(Folder)).call(this, baseUrl, path)); + } + /** + * Specifies the sequence in which content types are displayed. + * + */ + + + _createClass(Folder, [{ + key: "delete", + + /** + * Delete this folder + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return new Folder(this).post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + + }, { + key: "recycle", + value: function recycle() { + return new Folder(this, "recycle").post(); + } + }, { + key: "contentTypeOrder", + get: function get() { + return new queryable_1.QueryableCollection(this, "contentTypeOrder"); + } + /** + * Gets this folder's files + * + */ + + }, { + key: "files", + get: function get() { + return new files_1.Files(this); + } + /** + * Gets this folder's sub folders + * + */ + + }, { + key: "folders", + get: function get() { + return new Folders(this); + } + /** + * Gets this folder's list item field values + * + */ + + }, { + key: "listItemAllFields", + get: function get() { + return new queryable_1.QueryableCollection(this, "listItemAllFields"); + } + /** + * Gets the parent folder, if available + * + */ + + }, { + key: "parentFolder", + get: function get() { + return new Folder(this, "parentFolder"); + } + /** + * Gets this folder's properties + * + */ + + }, { + key: "properties", + get: function get() { + return new queryable_1.QueryableInstance(this, "properties"); + } + /** + * Gets this folder's server relative url + * + */ + + }, { + key: "serverRelativeUrl", + get: function get() { + return new queryable_1.Queryable(this, "serverRelativeUrl"); + } + /** + * Gets a value that specifies the content type order. + * + */ + + }, { + key: "uniqueContentTypeOrder", + get: function get() { + return new queryable_1.QueryableCollection(this, "uniqueContentTypeOrder"); + } + }]); + + return Folder; + }(queryable_1.QueryableInstance); + + exports.Folder = Folder; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var odata_1 = __webpack_require__(12); + var util_1 = __webpack_require__(1); + var exceptions_1 = __webpack_require__(15); + var webparts_1 = __webpack_require__(29); + /** + * Describes a collection of File objects + * + */ + + var Files = function (_queryable_1$Queryabl) { + _inherits(Files, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Files class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Files(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "files"; + + _classCallCheck(this, Files); + + return _possibleConstructorReturn(this, (Files.__proto__ || Object.getPrototypeOf(Files)).call(this, baseUrl, path)); + } + /** + * Gets a File by filename + * + * @param name The name of the file, including extension. + */ + + + _createClass(Files, [{ + key: "getByName", + value: function getByName(name) { + var f = new File(this); + f.concat("('" + name + "')"); + return f; + } + /** + * Uploads a file. + * + * @param url The folder-relative url of the file. + * @param content The file contents blob. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @returns The new File and the raw response. + */ + + }, { + key: "add", + value: function add(url, content) { + var _this2 = this; + + var shouldOverWrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + return new Files(this, "add(overwrite=" + shouldOverWrite + ",url='" + url + "')").post({ + body: content + }).then(function (response) { + return { + data: response, + file: _this2.getByName(url) + }; + }); + } + /** + * Uploads a file. + * + * @param url The folder-relative url of the file. + * @param content The Blob file content to add + * @param progress A callback function which can be used to track the progress of the upload + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + * @returns The new File and the raw response. + */ + + }, { + key: "addChunked", + value: function addChunked(url, content, progress) { + var _this3 = this; + + var shouldOverWrite = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var chunkSize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10485760; + + var adder = new Files(this, "add(overwrite=" + shouldOverWrite + ",url='" + url + "')"); + return adder.post().then(function () { + return _this3.getByName(url); + }).then(function (file) { + return file.setContentChunked(content, progress, chunkSize); + }).then(function (response) { + return { + data: response, + file: _this3.getByName(url) + }; + }); + } + /** + * Adds a ghosted file to an existing list or document library. + * + * @param fileUrl The server-relative url where you want to save the file. + * @param templateFileType The type of use to create the file. + * @returns The template file that was added and the raw response. + */ + + }, { + key: "addTemplateFile", + value: function addTemplateFile(fileUrl, templateFileType) { + var _this4 = this; + + return new Files(this, "addTemplateFile(urloffile='" + fileUrl + "',templatefiletype=" + templateFileType + ")").post().then(function (response) { + return { + data: response, + file: _this4.getByName(fileUrl) + }; + }); + } + }]); + + return Files; + }(queryable_1.QueryableCollection); + + exports.Files = Files; + /** + * Describes a single File instance + * + */ + + var File = function (_queryable_1$Queryabl2) { + _inherits(File, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function File(baseUrl, path) { + _classCallCheck(this, File); + + return _possibleConstructorReturn(this, (File.__proto__ || Object.getPrototypeOf(File)).call(this, baseUrl, path)); + } + /** + * Gets a value that specifies the list item field values for the list item corresponding to the file. + * + */ + + + _createClass(File, [{ + key: "approve", + + /** + * Approves the file submitted for content approval with the specified comment. + * Only documents in lists that are enabled for content approval can be approved. + * + * @param comment The comment for the approval. + */ + value: function approve(comment) { + return new File(this, "approve(comment='" + comment + "')").post(); + } + /** + * Stops the chunk upload session without saving the uploaded data. + * If the file doesn’t already exist in the library, the partially uploaded file will be deleted. + * Use this in response to user action (as in a request to cancel an upload) or an error or exception. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + */ + + }, { + key: "cancelUpload", + value: function cancelUpload(uploadId) { + return new File(this, "cancelUpload(uploadId=guid'" + uploadId + "')").post(); + } + /** + * Checks the file in to a document library based on the check-in type. + * + * @param comment A comment for the check-in. Its length must be <= 1023. + * @param checkinType The check-in type for the file. + */ + + }, { + key: "checkin", + value: function checkin() { + var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + var checkinType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CheckinType.Major; + + // TODO: Enforce comment length <= 1023 + return new File(this, "checkin(comment='" + comment + "',checkintype=" + checkinType + ")").post(); + } + /** + * Checks out the file from a document library. + */ + + }, { + key: "checkout", + value: function checkout() { + return new File(this, "checkout").post(); + } + /** + * Copies the file to the destination url. + * + * @param url The absolute url or server relative url of the destination file path to copy to. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? + */ + + }, { + key: "copyTo", + value: function copyTo(url) { + var shouldOverWrite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return new File(this, "copyTo(strnewurl='" + url + "',boverwrite=" + shouldOverWrite + ")").post(); + } + /** + * Delete this file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + + }, { + key: "delete", + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return new File(this).post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Denies approval for a file that was submitted for content approval. + * Only documents in lists that are enabled for content approval can be denied. + * + * @param comment The comment for the denial. + */ + + }, { + key: "deny", + value: function deny() { + var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + + return new File(this, "deny(comment='" + comment + "')").post(); + } + /** + * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view. + * An exception is thrown if the file is not an ASPX page. + * + * @param scope The WebPartsPersonalizationScope view on the Web Parts page. + */ + + }, { + key: "getLimitedWebPartManager", + value: function getLimitedWebPartManager() { + var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : WebPartsPersonalizationScope.Shared; + + return new webparts_1.LimitedWebPartManager(this, "getLimitedWebPartManager(scope=" + scope + ")"); + } + /** + * Moves the file to the specified destination url. + * + * @param url The absolute url or server relative url of the destination file path to move to. + * @param moveOperations The bitwise MoveOperations value for how to move the file. + */ + + }, { + key: "moveTo", + value: function moveTo(url) { + var moveOperations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MoveOperations.Overwrite; + + return new File(this, "moveTo(newurl='" + url + "',flags=" + moveOperations + ")").post(); + } + /** + * Submits the file for content approval with the specified comment. + * + * @param comment The comment for the published file. Its length must be <= 1023. + */ + + }, { + key: "publish", + value: function publish() { + var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + + return new File(this, "publish(comment='" + comment + "')").post(); + } + /** + * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item. + * + * @returns The GUID of the recycled file. + */ + + }, { + key: "recycle", + value: function recycle() { + return new File(this, "recycle").post(); + } + /** + * Reverts an existing checkout for the file. + * + */ + + }, { + key: "undoCheckout", + value: function undoCheckout() { + return new File(this, "undoCheckout").post(); + } + /** + * Removes the file from content approval or unpublish a major version. + * + * @param comment The comment for the unpublish operation. Its length must be <= 1023. + */ + + }, { + key: "unpublish", + value: function unpublish() { + var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + + if (comment.length > 1023) { + throw new exceptions_1.MaxCommentLengthException(); + } + return new File(this, "unpublish(comment='" + comment + "')").post(); + } + /** + * Gets the contents of the file as text + * + */ + + }, { + key: "getText", + value: function getText() { + return new File(this, "$value").get(new odata_1.TextFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + } + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + + }, { + key: "getBlob", + value: function getBlob() { + return new File(this, "$value").get(new odata_1.BlobFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + } + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + + }, { + key: "getBuffer", + value: function getBuffer() { + return new File(this, "$value").get(new odata_1.BufferFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + } + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + + }, { + key: "getJSON", + value: function getJSON() { + return new File(this, "$value").get(new odata_1.JSONFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + } + /** + * Sets the content of a file, for large files use setContentChunked + * + * @param content The file content + * + */ + + }, { + key: "setContent", + value: function setContent(content) { + var _this6 = this; + + var setter = new File(this, "$value"); + return setter.post({ + body: content, + headers: { + "X-HTTP-Method": "PUT" + } + }).then(function (_) { + return new File(_this6); + }); + } + /** + * Sets the contents of a file using a chunked upload approach + * + * @param file The file to upload + * @param progress A callback function which can be used to track the progress of the upload + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + */ + + }, { + key: "setContentChunked", + value: function setContentChunked(file, progress) { + var chunkSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10485760; + + if (typeof progress === "undefined") { + progress = function progress() { + return null; + }; + } + var self = this; + var fileSize = file.size; + var blockCount = parseInt((file.size / chunkSize).toString(), 10) + (file.size % chunkSize === 0 ? 1 : 0); + var uploadId = util_1.Util.getGUID(); + // start the chain with the first fragment + progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: "starting", totalBlocks: blockCount }); + var chain = self.startUpload(uploadId, file.slice(0, chunkSize)); + // skip the first and last blocks + + var _loop = function _loop(i) { + chain = chain.then(function (pointer) { + progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: "continue", totalBlocks: blockCount }); + return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize)); + }); + }; + + for (var i = 2; i < blockCount; i++) { + _loop(i); + } + return chain.then(function (pointer) { + progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: "finishing", totalBlocks: blockCount }); + return self.finishUpload(uploadId, pointer, file.slice(pointer)); + }).then(function (_) { + return self; + }); + } + /** + * Starts a new chunk upload session and uploads the first fragment. + * The current file content is not changed when this method completes. + * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream. + * The upload session ends either when you use the CancelUpload method or when you successfully + * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods. + * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes, + * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + + }, { + key: "startUpload", + value: function startUpload(uploadId, fragment) { + return new File(this, "startUpload(uploadId=guid'" + uploadId + "')").postAs({ body: fragment }).then(function (n) { + return parseFloat(n); + }); + } + /** + * Continues the chunk upload session with an additional fragment. + * The current file content is not changed. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + + }, { + key: "continueUpload", + value: function continueUpload(uploadId, fileOffset, fragment) { + return new File(this, "continueUpload(uploadId=guid'" + uploadId + "',fileOffset=" + fileOffset + ")").postAs({ body: fragment }).then(function (n) { + return parseFloat(n); + }); + } + /** + * Uploads the last file fragment and commits the file. The current file content is changed when this method completes. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The newly uploaded file. + */ + + }, { + key: "finishUpload", + value: function finishUpload(uploadId, fileOffset, fragment) { + return new File(this, "finishUpload(uploadId=guid'" + uploadId + "',fileOffset=" + fileOffset + ")").postAs({ body: fragment }).then(function (response) { + return { + data: response, + file: new File(response.ServerRelativeUrl) + }; + }); + } + }, { + key: "listItemAllFields", + get: function get() { + return new queryable_1.QueryableCollection(this, "listItemAllFields"); + } + /** + * Gets a collection of versions + * + */ + + }, { + key: "versions", + get: function get() { + return new Versions(this); + } + }]); + + return File; + }(queryable_1.QueryableInstance); + + exports.File = File; + /** + * Describes a collection of Version objects + * + */ + + var Versions = function (_queryable_1$Queryabl3) { + _inherits(Versions, _queryable_1$Queryabl3); + + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Versions(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "versions"; + + _classCallCheck(this, Versions); + + return _possibleConstructorReturn(this, (Versions.__proto__ || Object.getPrototypeOf(Versions)).call(this, baseUrl, path)); + } + /** + * Gets a version by id + * + * @param versionId The id of the version to retrieve + */ + + + _createClass(Versions, [{ + key: "getById", + value: function getById(versionId) { + var v = new Version(this); + v.concat("(" + versionId + ")"); + return v; + } + /** + * Deletes all the file version objects in the collection. + * + */ + + }, { + key: "deleteAll", + value: function deleteAll() { + return new Versions(this, "deleteAll").post(); + } + /** + * Deletes the specified version of the file. + * + * @param versionId The ID of the file version to delete. + */ + + }, { + key: "deleteById", + value: function deleteById(versionId) { + return new Versions(this, "deleteById(vid=" + versionId + ")").post(); + } + /** + * Deletes the file version object with the specified version label. + * + * @param label The version label of the file version to delete, for example: 1.2 + */ + + }, { + key: "deleteByLabel", + value: function deleteByLabel(label) { + return new Versions(this, "deleteByLabel(versionlabel='" + label + "')").post(); + } + /** + * Creates a new file version from the file specified by the version label. + * + * @param label The version label of the file version to restore, for example: 1.2 + */ + + }, { + key: "restoreByLabel", + value: function restoreByLabel(label) { + return new Versions(this, "restoreByLabel(versionlabel='" + label + "')").post(); + } + }]); + + return Versions; + }(queryable_1.QueryableCollection); + + exports.Versions = Versions; + /** + * Describes a single Version instance + * + */ + + var Version = function (_queryable_1$Queryabl4) { + _inherits(Version, _queryable_1$Queryabl4); + + /** + * Creates a new instance of the Version class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function Version(baseUrl, path) { + _classCallCheck(this, Version); + + return _possibleConstructorReturn(this, (Version.__proto__ || Object.getPrototypeOf(Version)).call(this, baseUrl, path)); + } + /** + * Delete a specific version of a file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + + + _createClass(Version, [{ + key: "delete", + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return this.post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + }]); + + return Version; + }(queryable_1.QueryableInstance); + + exports.Version = Version; + var CheckinType; + (function (CheckinType) { + CheckinType[CheckinType["Minor"] = 0] = "Minor"; + CheckinType[CheckinType["Major"] = 1] = "Major"; + CheckinType[CheckinType["Overwrite"] = 2] = "Overwrite"; + })(CheckinType = exports.CheckinType || (exports.CheckinType = {})); + var WebPartsPersonalizationScope; + (function (WebPartsPersonalizationScope) { + WebPartsPersonalizationScope[WebPartsPersonalizationScope["User"] = 0] = "User"; + WebPartsPersonalizationScope[WebPartsPersonalizationScope["Shared"] = 1] = "Shared"; + })(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {})); + var MoveOperations; + (function (MoveOperations) { + MoveOperations[MoveOperations["Overwrite"] = 1] = "Overwrite"; + MoveOperations[MoveOperations["AllowBrokenThickets"] = 8] = "AllowBrokenThickets"; + })(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {})); + var TemplateFileType; + (function (TemplateFileType) { + TemplateFileType[TemplateFileType["StandardPage"] = 0] = "StandardPage"; + TemplateFileType[TemplateFileType["WikiPage"] = 1] = "WikiPage"; + TemplateFileType[TemplateFileType["FormPage"] = 2] = "FormPage"; + })(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {})); + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + + var LimitedWebPartManager = function (_queryable_1$Queryabl) { + _inherits(LimitedWebPartManager, _queryable_1$Queryabl); + + /** + * Creates a new instance of the LimitedWebPartManager class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function LimitedWebPartManager(baseUrl, path) { + _classCallCheck(this, LimitedWebPartManager); + + return _possibleConstructorReturn(this, (LimitedWebPartManager.__proto__ || Object.getPrototypeOf(LimitedWebPartManager)).call(this, baseUrl, path)); + } + /** + * Gets the set of web part definitions contained by this web part manager + * + */ + + + _createClass(LimitedWebPartManager, [{ + key: "export", + + /** + * Exports a webpart definition + * + * @param id the GUID id of the definition to export + */ + value: function _export(id) { + var exporter = new LimitedWebPartManager(this, "ExportWebPart"); + return exporter.post({ + body: JSON.stringify({ webPartId: id }) + }); + } + /** + * Imports a webpart + * + * @param xml webpart definition which must be valid XML in the .dwp or .webpart format + */ + + }, { + key: "import", + value: function _import(xml) { + var importer = new LimitedWebPartManager(this, "ImportWebPart"); + return importer.post({ + body: JSON.stringify({ webPartXml: xml }) + }); + } + }, { + key: "webparts", + get: function get() { + return new WebPartDefinitions(this, "webparts"); + } + }]); + + return LimitedWebPartManager; + }(queryable_1.Queryable); + + exports.LimitedWebPartManager = LimitedWebPartManager; + + var WebPartDefinitions = function (_queryable_1$Queryabl2) { + _inherits(WebPartDefinitions, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the WebPartDefinitions class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function WebPartDefinitions(baseUrl, path) { + _classCallCheck(this, WebPartDefinitions); + + return _possibleConstructorReturn(this, (WebPartDefinitions.__proto__ || Object.getPrototypeOf(WebPartDefinitions)).call(this, baseUrl, path)); + } + /** + * Gets a web part definition from the collection by id + * + * @param id GUID id of the web part definition to get + */ + + + _createClass(WebPartDefinitions, [{ + key: "getById", + value: function getById(id) { + return new WebPartDefinition(this, "getbyid('" + id + "')"); + } + }]); + + return WebPartDefinitions; + }(queryable_1.QueryableCollection); + + exports.WebPartDefinitions = WebPartDefinitions; + + var WebPartDefinition = function (_queryable_1$Queryabl3) { + _inherits(WebPartDefinition, _queryable_1$Queryabl3); + + /** + * Creates a new instance of the WebPartDefinition class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function WebPartDefinition(baseUrl, path) { + _classCallCheck(this, WebPartDefinition); + + return _possibleConstructorReturn(this, (WebPartDefinition.__proto__ || Object.getPrototypeOf(WebPartDefinition)).call(this, baseUrl, path)); + } + /** + * Gets the webpart information associated with this definition + */ + + + _createClass(WebPartDefinition, [{ + key: "delete", + + /** + * Removes a webpart from a page, all settings will be lost + */ + value: function _delete() { + var deleter = new WebPartDefinition(this, "DeleteWebPart"); + return deleter.post(); + } + }, { + key: "webpart", + get: function get() { + return new WebPart(this); + } + }]); + + return WebPartDefinition; + }(queryable_1.QueryableInstance); + + exports.WebPartDefinition = WebPartDefinition; + + var WebPart = function (_queryable_1$Queryabl4) { + _inherits(WebPart, _queryable_1$Queryabl4); + + /** + * Creates a new instance of the WebPart class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function WebPart(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "webpart"; + + _classCallCheck(this, WebPart); + + return _possibleConstructorReturn(this, (WebPart.__proto__ || Object.getPrototypeOf(WebPart)).call(this, baseUrl, path)); + } + + return WebPart; + }(queryable_1.QueryableInstance); + + exports.WebPart = WebPart; + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var util_1 = __webpack_require__(1); + var queryable_1 = __webpack_require__(11); + /** + * Describes a collection of content types + * + */ + + var ContentTypes = function (_queryable_1$Queryabl) { + _inherits(ContentTypes, _queryable_1$Queryabl); + + /** + * Creates a new instance of the ContentTypes class + * + * @param baseUrl The url or Queryable which forms the parent of this content types collection + */ + function ContentTypes(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contenttypes"; + + _classCallCheck(this, ContentTypes); + + return _possibleConstructorReturn(this, (ContentTypes.__proto__ || Object.getPrototypeOf(ContentTypes)).call(this, baseUrl, path)); + } + /** + * Gets a ContentType by content type id + */ + + + _createClass(ContentTypes, [{ + key: "getById", + value: function getById(id) { + var ct = new ContentType(this); + ct.concat("('" + id + "')"); + return ct; + } + /** + * Adds an existing contenttype to a content type collection + * + * @param contentTypeId in the following format, for example: 0x010102 + */ + + }, { + key: "addAvailableContentType", + value: function addAvailableContentType(contentTypeId) { + var _this2 = this; + + var postBody = JSON.stringify({ + "contentTypeId": contentTypeId + }); + return new ContentTypes(this, "addAvailableContentType").postAs({ body: postBody }).then(function (data) { + return { + contentType: _this2.getById(data.id), + data: data + }; + }); + } + /** + * Adds a new content type to the collection + * + * @param id The desired content type id for the new content type (also determines the parent content type) + * @param name The name of the content type + * @param description The description of the content type + * @param group The group in which to add the content type + * @param additionalSettings Any additional settings to provide when creating the content type + * + */ + + }, { + key: "add", + value: function add(id, name) { + var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; + + var _this3 = this; + + var group = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "Custom Content Types"; + var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + + var postBody = JSON.stringify(util_1.Util.extend({ + "Description": description, + "Group": group, + "Id": { "StringValue": id }, + "Name": name, + "__metadata": { "type": "SP.ContentType" } + }, additionalSettings)); + return this.post({ body: postBody }).then(function (data) { + return { contentType: _this3.getById(data.id), data: data }; + }); + } + }]); + + return ContentTypes; + }(queryable_1.QueryableCollection); + + exports.ContentTypes = ContentTypes; + /** + * Describes a single ContentType instance + * + */ + + var ContentType = function (_queryable_1$Queryabl2) { + _inherits(ContentType, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + function ContentType(baseUrl, path) { + _classCallCheck(this, ContentType); + + return _possibleConstructorReturn(this, (ContentType.__proto__ || Object.getPrototypeOf(ContentType)).call(this, baseUrl, path)); + } + /** + * Gets the column (also known as field) references in the content type. + */ + + + _createClass(ContentType, [{ + key: "fieldLinks", + get: function get() { + return new FieldLinks(this); + } + /** + * Gets a value that specifies the collection of fields for the content type. + */ + + }, { + key: "fields", + get: function get() { + return new queryable_1.QueryableCollection(this, "fields"); + } + /** + * Gets the parent content type of the content type. + */ + + }, { + key: "parent", + get: function get() { + return new ContentType(this, "parent"); + } + /** + * Gets a value that specifies the collection of workflow associations for the content type. + */ + + }, { + key: "workflowAssociations", + get: function get() { + return new queryable_1.QueryableCollection(this, "workflowAssociations"); + } + }]); + + return ContentType; + }(queryable_1.QueryableInstance); + + exports.ContentType = ContentType; + /** + * Represents a collection of field link instances + */ + + var FieldLinks = function (_queryable_1$Queryabl3) { + _inherits(FieldLinks, _queryable_1$Queryabl3); + + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + function FieldLinks(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "fieldlinks"; + + _classCallCheck(this, FieldLinks); + + return _possibleConstructorReturn(this, (FieldLinks.__proto__ || Object.getPrototypeOf(FieldLinks)).call(this, baseUrl, path)); + } + /** + * Gets a FieldLink by GUID id + * + * @param id The GUID id of the field link + */ + + + _createClass(FieldLinks, [{ + key: "getById", + value: function getById(id) { + var fl = new FieldLink(this); + fl.concat("(guid'" + id + "')"); + return fl; + } + }]); + + return FieldLinks; + }(queryable_1.QueryableCollection); + + exports.FieldLinks = FieldLinks; + /** + * Represents a field link instance + */ + + var FieldLink = function (_queryable_1$Queryabl4) { + _inherits(FieldLink, _queryable_1$Queryabl4); + + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or Queryable which forms the parent of this content type instance + */ + function FieldLink(baseUrl, path) { + _classCallCheck(this, FieldLink); + + return _possibleConstructorReturn(this, (FieldLink.__proto__ || Object.getPrototypeOf(FieldLink)).call(this, baseUrl, path)); + } + + return FieldLink; + }(queryable_1.QueryableInstance); + + exports.FieldLink = FieldLink; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var odata_1 = __webpack_require__(12); + /** + * Describes a collection of Item objects + * + */ + + var AttachmentFiles = function (_queryable_1$Queryabl) { + _inherits(AttachmentFiles, _queryable_1$Queryabl); + + /** + * Creates a new instance of the AttachmentFiles class + * + * @param baseUrl The url or Queryable which forms the parent of this attachments collection + */ + function AttachmentFiles(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AttachmentFiles"; + + _classCallCheck(this, AttachmentFiles); + + return _possibleConstructorReturn(this, (AttachmentFiles.__proto__ || Object.getPrototypeOf(AttachmentFiles)).call(this, baseUrl, path)); + } + /** + * Gets a Attachment File by filename + * + * @param name The name of the file, including extension. + */ + + + _createClass(AttachmentFiles, [{ + key: "getByName", + value: function getByName(name) { + var f = new AttachmentFile(this); + f.concat("('" + name + "')"); + return f; + } + /** + * Adds a new attachment to the collection + * + * @param name The name of the file, including extension. + * @param content The Base64 file content. + */ + + }, { + key: "add", + value: function add(name, content) { + var _this2 = this; + + return new AttachmentFiles(this, "add(FileName='" + name + "')").post({ + body: content + }).then(function (response) { + return { + data: response, + file: _this2.getByName(name) + }; + }); + } + }]); + + return AttachmentFiles; + }(queryable_1.QueryableCollection); + + exports.AttachmentFiles = AttachmentFiles; + /** + * Describes a single attachment file instance + * + */ + + var AttachmentFile = function (_queryable_1$Queryabl2) { + _inherits(AttachmentFile, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the AttachmentFile class + * + * @param baseUrl The url or Queryable which forms the parent of this attachment file + */ + function AttachmentFile(baseUrl, path) { + _classCallCheck(this, AttachmentFile); + + return _possibleConstructorReturn(this, (AttachmentFile.__proto__ || Object.getPrototypeOf(AttachmentFile)).call(this, baseUrl, path)); + } + /** + * Gets the contents of the file as text + * + */ + + + _createClass(AttachmentFile, [{ + key: "getText", + value: function getText() { + return new AttachmentFile(this, "$value").get(new odata_1.TextFileParser()); + } + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + + }, { + key: "getBlob", + value: function getBlob() { + return new AttachmentFile(this, "$value").get(new odata_1.BlobFileParser()); + } + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + + }, { + key: "getBuffer", + value: function getBuffer() { + return new AttachmentFile(this, "$value").get(new odata_1.BufferFileParser()); + } + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + + }, { + key: "getJSON", + value: function getJSON() { + return new AttachmentFile(this, "$value").get(new odata_1.JSONFileParser()); + } + /** + * Sets the content of a file + * + * @param content The value to set for the file contents + */ + + }, { + key: "setContent", + value: function setContent(content) { + var _this4 = this; + + var setter = new AttachmentFile(this, "$value"); + return setter.post({ + body: content, + headers: { + "X-HTTP-Method": "PUT" + } + }).then(function (_) { + return new AttachmentFile(_this4); + }); + } + /** + * Delete this attachment file + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + + }, { + key: "delete", + value: function _delete() { + var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "*"; + + return this.post({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE" + } + }); + } + }]); + + return AttachmentFile; + }(queryable_1.QueryableInstance); + + exports.AttachmentFile = AttachmentFile; + +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var util_1 = __webpack_require__(1); + /** + * Describes the views available in the current context + * + */ + + var Views = function (_queryable_1$Queryabl) { + _inherits(Views, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Views class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Views(baseUrl) { + _classCallCheck(this, Views); + + return _possibleConstructorReturn(this, (Views.__proto__ || Object.getPrototypeOf(Views)).call(this, baseUrl, "views")); + } + /** + * Gets a view by guid id + * + * @param id The GUID id of the view + */ + + + _createClass(Views, [{ + key: "getById", + value: function getById(id) { + var v = new View(this); + v.concat("('" + id + "')"); + return v; + } + /** + * Gets a view by title (case-sensitive) + * + * @param title The case-sensitive title of the view + */ + + }, { + key: "getByTitle", + value: function getByTitle(title) { + return new View(this, "getByTitle('" + title + "')"); + } + /** + * Adds a new view to the collection + * + * @param title The new views's title + * @param personalView True if this is a personal view, otherwise false, default = false + * @param additionalSettings Will be passed as part of the view creation body + */ + /*tslint:disable max-line-length */ + + }, { + key: "add", + value: function add(title) { + var _this2 = this; + + var personalView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var additionalSettings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var postBody = JSON.stringify(util_1.Util.extend({ + "PersonalView": personalView, + "Title": title, + "__metadata": { "type": "SP.View" } + }, additionalSettings)); + return this.postAs({ body: postBody }).then(function (data) { + return { + data: data, + view: _this2.getById(data.Id) + }; + }); + } + }]); + + return Views; + }(queryable_1.QueryableCollection); + + exports.Views = Views; + /** + * Describes a single View instance + * + */ + + var View = function (_queryable_1$Queryabl2) { + _inherits(View, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the View class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function View(baseUrl, path) { + _classCallCheck(this, View); + + return _possibleConstructorReturn(this, (View.__proto__ || Object.getPrototypeOf(View)).call(this, baseUrl, path)); + } + + _createClass(View, [{ + key: "update", + + /** + * Updates this view intance with the supplied properties + * + * @param properties A plain object hash of values to update for the view + */ + value: function update(properties) { + var _this4 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.View" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + data: data, + view: _this4 + }; + }); + } + /** + * Delete this view + * + */ + + }, { + key: "delete", + value: function _delete() { + return this.post({ + headers: { + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Returns the list view as HTML. + * + */ + + }, { + key: "renderAsHtml", + value: function renderAsHtml() { + var q = new queryable_1.Queryable(this, "renderashtml"); + return q.get(); + } + }, { + key: "fields", + get: function get() { + return new ViewFields(this); + } + }]); + + return View; + }(queryable_1.QueryableInstance); + + exports.View = View; + + var ViewFields = function (_queryable_1$Queryabl3) { + _inherits(ViewFields, _queryable_1$Queryabl3); + + function ViewFields(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "viewfields"; + + _classCallCheck(this, ViewFields); + + return _possibleConstructorReturn(this, (ViewFields.__proto__ || Object.getPrototypeOf(ViewFields)).call(this, baseUrl, path)); + } + /** + * Gets a value that specifies the XML schema that represents the collection. + */ + + + _createClass(ViewFields, [{ + key: "getSchemaXml", + value: function getSchemaXml() { + var q = new queryable_1.Queryable(this, "schemaxml"); + return q.get(); + } + /** + * Adds the field with the specified field internal name or display name to the collection. + * + * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add. + */ + + }, { + key: "add", + value: function add(fieldTitleOrInternalName) { + var q = new ViewFields(this, "addviewfield('" + fieldTitleOrInternalName + "')"); + return q.post(); + } + /** + * Moves the field with the specified field internal name to the specified position in the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to move. + * @param index The zero-based index of the new position for the field. + */ + + }, { + key: "move", + value: function move(fieldInternalName, index) { + var q = new ViewFields(this, "moveviewfieldto"); + var postBody = JSON.stringify({ "field": fieldInternalName, "index": index }); + return q.post({ body: postBody }); + } + /** + * Removes all the fields from the collection. + */ + + }, { + key: "removeAll", + value: function removeAll() { + var q = new ViewFields(this, "removeallviewfields"); + return q.post(); + } + /** + * Removes the field with the specified field internal name from the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to remove from the view. + */ + + }, { + key: "remove", + value: function remove(fieldInternalName) { + var q = new ViewFields(this, "removeviewfield('" + fieldInternalName + "')"); + return q.post(); + } + }]); + + return ViewFields; + }(queryable_1.QueryableCollection); + + exports.ViewFields = ViewFields; + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var util_1 = __webpack_require__(1); + var Types = __webpack_require__(34); + /** + * Describes a collection of Field objects + * + */ + + var Fields = function (_queryable_1$Queryabl) { + _inherits(Fields, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Fields(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "fields"; + + _classCallCheck(this, Fields); + + return _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, baseUrl, path)); + } + /** + * Gets a field from the collection by title + * + * @param title The case-sensitive title of the field + */ + + + _createClass(Fields, [{ + key: "getByTitle", + value: function getByTitle(title) { + return new Field(this, "getByTitle('" + title + "')"); + } + /** + * Gets a field from the collection by using internal name or title + * + * @param name The case-sensitive internal name or title of the field + */ + + }, { + key: "getByInternalNameOrTitle", + value: function getByInternalNameOrTitle(name) { + return new Field(this, "getByInternalNameOrTitle('" + name + "')"); + } + /** + * Gets a list from the collection by guid id + * + * @param title The Id of the list + */ + + }, { + key: "getById", + value: function getById(id) { + var f = new Field(this); + f.concat("('" + id + "')"); + return f; + } + /** + * Creates a field based on the specified schema + */ + + }, { + key: "createFieldAsXml", + value: function createFieldAsXml(xml) { + var _this2 = this; + + var info = void 0; + if (typeof xml === "string") { + info = { SchemaXml: xml }; + } else { + info = xml; + } + var postBody = JSON.stringify({ + "parameters": util_1.Util.extend({ + "__metadata": { + "type": "SP.XmlSchemaFieldCreationInformation" + } + }, info) + }); + var q = new Fields(this, "createfieldasxml"); + return q.postAs({ body: postBody }).then(function (data) { + return { + data: data, + field: _this2.getById(data.Id) + }; + }); + } + /** + * Adds a new list to the collection + * + * @param title The new field's title + * @param fieldType The new field's type (ex: SP.FieldText) + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "add", + value: function add(title, fieldType) { + var _this3 = this; + + var properties = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var postBody = JSON.stringify(util_1.Util.extend({ + "Title": title, + "__metadata": { "type": fieldType } + }, properties)); + return this.postAs({ body: postBody }).then(function (data) { + return { + data: data, + field: _this3.getById(data.Id) + }; + }); + } + /** + * Adds a new SP.FieldText to the collection + * + * @param title The field title + * @param maxLength The maximum number of characters allowed in the value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "addText", + value: function addText(title) { + var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 255; + var properties = arguments[2]; + + var props = { + FieldTypeKind: 2, + MaxLength: maxLength + }; + return this.add(title, "SP.FieldText", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldCalculated to the collection + * + * @param title The field title. + * @param formula The formula for the field. + * @param dateFormat The date and time format that is displayed in the field. + * @param outputType Specifies the output format for the field. Represents a FieldType value. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "addCalculated", + value: function addCalculated(title, formula, dateFormat) { + var outputType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Types.FieldTypes.Text; + var properties = arguments[4]; + + var props = { + DateFormat: dateFormat, + FieldTypeKind: 17, + Formula: formula, + OutputType: outputType + }; + return this.add(title, "SP.FieldCalculated", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldDateTime to the collection + * + * @param title The field title + * @param displayFormat The format of the date and time that is displayed in the field. + * @param calendarType Specifies the calendar type of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "addDateTime", + value: function addDateTime(title) { + var displayFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Types.DateTimeFieldFormatType.DateOnly; + var calendarType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Types.CalendarType.Gregorian; + var friendlyDisplayFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var properties = arguments[4]; + + var props = { + DateTimeCalendarType: calendarType, + DisplayFormat: displayFormat, + FieldTypeKind: 4, + FriendlyDisplayFormat: friendlyDisplayFormat + }; + return this.add(title, "SP.FieldDateTime", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldNumber to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "addNumber", + value: function addNumber(title, minValue, maxValue, properties) { + var props = { FieldTypeKind: 9 }; + if (typeof minValue !== "undefined") { + props = util_1.Util.extend({ MinimumValue: minValue }, props); + } + if (typeof maxValue !== "undefined") { + props = util_1.Util.extend({ MaximumValue: maxValue }, props); + } + return this.add(title, "SP.FieldNumber", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldCurrency to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + + }, { + key: "addCurrency", + value: function addCurrency(title, minValue, maxValue) { + var currencyLocalId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1033; + var properties = arguments[4]; + + var props = { + CurrencyLocaleId: currencyLocalId, + FieldTypeKind: 10 + }; + if (typeof minValue !== "undefined") { + props = util_1.Util.extend({ MinimumValue: minValue }, props); + } + if (typeof maxValue !== "undefined") { + props = util_1.Util.extend({ MaximumValue: maxValue }, props); + } + return this.add(title, "SP.FieldCurrency", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldMultiLineText to the collection + * + * @param title The field title + * @param numberOfLines Specifies the number of lines of text to display for the field. + * @param richText Specifies whether the field supports rich formatting. + * @param restrictedMode Specifies whether the field supports a subset of rich formatting. + * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms. + * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + * + */ + + }, { + key: "addMultilineText", + value: function addMultilineText(title) { + var numberOfLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6; + var richText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var restrictedMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var appendOnly = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var allowHyperlink = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var properties = arguments[6]; + + var props = { + AllowHyperlink: allowHyperlink, + AppendOnly: appendOnly, + FieldTypeKind: 3, + NumberOfLines: numberOfLines, + RestrictedMode: restrictedMode, + RichText: richText + }; + return this.add(title, "SP.FieldMultiLineText", util_1.Util.extend(props, properties)); + } + /** + * Adds a new SP.FieldUrl to the collection + * + * @param title The field title + */ + + }, { + key: "addUrl", + value: function addUrl(title) { + var displayFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Types.UrlFieldFormatType.Hyperlink; + var properties = arguments[2]; + + var props = { + DisplayFormat: displayFormat, + FieldTypeKind: 11 + }; + return this.add(title, "SP.FieldUrl", util_1.Util.extend(props, properties)); + } + }]); + + return Fields; + }(queryable_1.QueryableCollection); + + exports.Fields = Fields; + /** + * Describes a single of Field instance + * + */ + + var Field = function (_queryable_1$Queryabl2) { + _inherits(Field, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the Field class + * + * @param baseUrl The url or Queryable which forms the parent of this field instance + */ + function Field(baseUrl, path) { + _classCallCheck(this, Field); + + return _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, baseUrl, path)); + } + /** + * Updates this field intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param fieldType The type value, required to update child field type properties + */ + + + _createClass(Field, [{ + key: "update", + value: function update(properties) { + var _this5 = this; + + var fieldType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "SP.Field"; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": fieldType } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + data: data, + field: _this5 + }; + }); + } + /** + * Delete this fields + * + */ + + }, { + key: "delete", + value: function _delete() { + return this.post({ + headers: { + "X-HTTP-Method": "DELETE" + } + }); + } + /** + * Sets the value of the ShowInDisplayForm property for this field. + */ + + }, { + key: "setShowInDisplayForm", + value: function setShowInDisplayForm(show) { + var q = new Field(this, "setshowindisplayform(" + show + ")"); + return q.post(); + } + /** + * Sets the value of the ShowInEditForm property for this field. + */ + + }, { + key: "setShowInEditForm", + value: function setShowInEditForm(show) { + var q = new Field(this, "setshowineditform(" + show + ")"); + return q.post(); + } + /** + * Sets the value of the ShowInNewForm property for this field. + */ + + }, { + key: "setShowInNewForm", + value: function setShowInNewForm(show) { + var q = new Field(this, "setshowinnewform(" + show + ")"); + return q.post(); + } + }]); + + return Field; + }(queryable_1.QueryableInstance); + + exports.Field = Field; + +/***/ }, +/* 34 */ +/***/ function(module, exports) { + + // reference: https://msdn.microsoft.com/en-us/library/office/dn600183.aspx + "use strict"; + /** + * Determines the display mode of the given control or view + */ + + var ControlMode; + (function (ControlMode) { + ControlMode[ControlMode["Display"] = 1] = "Display"; + ControlMode[ControlMode["Edit"] = 2] = "Edit"; + ControlMode[ControlMode["New"] = 3] = "New"; + })(ControlMode = exports.ControlMode || (exports.ControlMode = {})); + /** + * Specifies the type of the field. + */ + var FieldTypes; + (function (FieldTypes) { + FieldTypes[FieldTypes["Invalid"] = 0] = "Invalid"; + FieldTypes[FieldTypes["Integer"] = 1] = "Integer"; + FieldTypes[FieldTypes["Text"] = 2] = "Text"; + FieldTypes[FieldTypes["Note"] = 3] = "Note"; + FieldTypes[FieldTypes["DateTime"] = 4] = "DateTime"; + FieldTypes[FieldTypes["Counter"] = 5] = "Counter"; + FieldTypes[FieldTypes["Choice"] = 6] = "Choice"; + FieldTypes[FieldTypes["Lookup"] = 7] = "Lookup"; + FieldTypes[FieldTypes["Boolean"] = 8] = "Boolean"; + FieldTypes[FieldTypes["Number"] = 9] = "Number"; + FieldTypes[FieldTypes["Currency"] = 10] = "Currency"; + FieldTypes[FieldTypes["URL"] = 11] = "URL"; + FieldTypes[FieldTypes["Computed"] = 12] = "Computed"; + FieldTypes[FieldTypes["Threading"] = 13] = "Threading"; + FieldTypes[FieldTypes["Guid"] = 14] = "Guid"; + FieldTypes[FieldTypes["MultiChoice"] = 15] = "MultiChoice"; + FieldTypes[FieldTypes["GridChoice"] = 16] = "GridChoice"; + FieldTypes[FieldTypes["Calculated"] = 17] = "Calculated"; + FieldTypes[FieldTypes["File"] = 18] = "File"; + FieldTypes[FieldTypes["Attachments"] = 19] = "Attachments"; + FieldTypes[FieldTypes["User"] = 20] = "User"; + FieldTypes[FieldTypes["Recurrence"] = 21] = "Recurrence"; + FieldTypes[FieldTypes["CrossProjectLink"] = 22] = "CrossProjectLink"; + FieldTypes[FieldTypes["ModStat"] = 23] = "ModStat"; + FieldTypes[FieldTypes["Error"] = 24] = "Error"; + FieldTypes[FieldTypes["ContentTypeId"] = 25] = "ContentTypeId"; + FieldTypes[FieldTypes["PageSeparator"] = 26] = "PageSeparator"; + FieldTypes[FieldTypes["ThreadIndex"] = 27] = "ThreadIndex"; + FieldTypes[FieldTypes["WorkflowStatus"] = 28] = "WorkflowStatus"; + FieldTypes[FieldTypes["AllDayEvent"] = 29] = "AllDayEvent"; + FieldTypes[FieldTypes["WorkflowEventType"] = 30] = "WorkflowEventType"; + })(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {})); + var DateTimeFieldFormatType; + (function (DateTimeFieldFormatType) { + DateTimeFieldFormatType[DateTimeFieldFormatType["DateOnly"] = 0] = "DateOnly"; + DateTimeFieldFormatType[DateTimeFieldFormatType["DateTime"] = 1] = "DateTime"; + })(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {})); + /** + * Specifies the control settings while adding a field. + */ + var AddFieldOptions; + (function (AddFieldOptions) { + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection + */ + AddFieldOptions[AddFieldOptions["DefaultValue"] = 0] = "DefaultValue"; + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection. + */ + AddFieldOptions[AddFieldOptions["AddToDefaultContentType"] = 1] = "AddToDefaultContentType"; + /** + * Specify that a new field must not be added to any other content type + */ + AddFieldOptions[AddFieldOptions["AddToNoContentType"] = 2] = "AddToNoContentType"; + /** + * Specify that a new field that is added to the specified list must also be added to all content types in the site collection + */ + AddFieldOptions[AddFieldOptions["AddToAllContentTypes"] = 4] = "AddToAllContentTypes"; + /** + * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations + */ + AddFieldOptions[AddFieldOptions["AddFieldInternalNameHint"] = 8] = "AddFieldInternalNameHint"; + /** + * Specify that a new field that is added to the specified list must also be added to the default list view + */ + AddFieldOptions[AddFieldOptions["AddFieldToDefaultView"] = 16] = "AddFieldToDefaultView"; + /** + * Specify to confirm that no other field has the same display name + */ + AddFieldOptions[AddFieldOptions["AddFieldCheckDisplayName"] = 32] = "AddFieldCheckDisplayName"; + })(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {})); + var CalendarType; + (function (CalendarType) { + CalendarType[CalendarType["Gregorian"] = 1] = "Gregorian"; + CalendarType[CalendarType["Japan"] = 3] = "Japan"; + CalendarType[CalendarType["Taiwan"] = 4] = "Taiwan"; + CalendarType[CalendarType["Korea"] = 5] = "Korea"; + CalendarType[CalendarType["Hijri"] = 6] = "Hijri"; + CalendarType[CalendarType["Thai"] = 7] = "Thai"; + CalendarType[CalendarType["Hebrew"] = 8] = "Hebrew"; + CalendarType[CalendarType["GregorianMEFrench"] = 9] = "GregorianMEFrench"; + CalendarType[CalendarType["GregorianArabic"] = 10] = "GregorianArabic"; + CalendarType[CalendarType["GregorianXLITEnglish"] = 11] = "GregorianXLITEnglish"; + CalendarType[CalendarType["GregorianXLITFrench"] = 12] = "GregorianXLITFrench"; + CalendarType[CalendarType["KoreaJapanLunar"] = 14] = "KoreaJapanLunar"; + CalendarType[CalendarType["ChineseLunar"] = 15] = "ChineseLunar"; + CalendarType[CalendarType["SakaEra"] = 16] = "SakaEra"; + CalendarType[CalendarType["UmAlQura"] = 23] = "UmAlQura"; + })(CalendarType = exports.CalendarType || (exports.CalendarType = {})); + var UrlFieldFormatType; + (function (UrlFieldFormatType) { + UrlFieldFormatType[UrlFieldFormatType["Hyperlink"] = 0] = "Hyperlink"; + UrlFieldFormatType[UrlFieldFormatType["Image"] = 1] = "Image"; + })(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {})); + var PrincipalType; + (function (PrincipalType) { + PrincipalType[PrincipalType["None"] = 0] = "None"; + PrincipalType[PrincipalType["User"] = 1] = "User"; + PrincipalType[PrincipalType["DistributionList"] = 2] = "DistributionList"; + PrincipalType[PrincipalType["SecurityGroup"] = 4] = "SecurityGroup"; + PrincipalType[PrincipalType["SharePointGroup"] = 8] = "SharePointGroup"; + PrincipalType[PrincipalType["All"] = 15] = "All"; + })(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {})); + var PageType; + (function (PageType) { + PageType[PageType["Invalid"] = -1] = "Invalid"; + PageType[PageType["DefaultView"] = 0] = "DefaultView"; + PageType[PageType["NormalView"] = 1] = "NormalView"; + PageType[PageType["DialogView"] = 2] = "DialogView"; + PageType[PageType["View"] = 3] = "View"; + PageType[PageType["DisplayForm"] = 4] = "DisplayForm"; + PageType[PageType["DisplayFormDialog"] = 5] = "DisplayFormDialog"; + PageType[PageType["EditForm"] = 6] = "EditForm"; + PageType[PageType["EditFormDialog"] = 7] = "EditFormDialog"; + PageType[PageType["NewForm"] = 8] = "NewForm"; + PageType[PageType["NewFormDialog"] = 9] = "NewFormDialog"; + PageType[PageType["SolutionForm"] = 10] = "SolutionForm"; + PageType[PageType["PAGE_MAXITEMS"] = 11] = "PAGE_MAXITEMS"; + })(PageType = exports.PageType || (exports.PageType = {})); + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + /** + * Describes a collection of Field objects + * + */ + + var Forms = function (_queryable_1$Queryabl) { + _inherits(Forms, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Forms(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "forms"; + + _classCallCheck(this, Forms); + + return _possibleConstructorReturn(this, (Forms.__proto__ || Object.getPrototypeOf(Forms)).call(this, baseUrl, path)); + } + /** + * Gets a form by id + * + * @param id The guid id of the item to retrieve + */ + + + _createClass(Forms, [{ + key: "getById", + value: function getById(id) { + var i = new Form(this); + i.concat("('" + id + "')"); + return i; + } + }]); + + return Forms; + }(queryable_1.QueryableCollection); + + exports.Forms = Forms; + /** + * Describes a single of Form instance + * + */ + + var Form = function (_queryable_1$Queryabl2) { + _inherits(Form, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the Form class + * + * @param baseUrl The url or Queryable which is the parent of this form instance + */ + function Form(baseUrl, path) { + _classCallCheck(this, Form); + + return _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, baseUrl, path)); + } + + return Form; + }(queryable_1.QueryableInstance); + + exports.Form = Form; + +/***/ }, +/* 36 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + /** + * Describes a collection of webhook subscriptions + * + */ + + var Subscriptions = function (_queryable_1$Queryabl) { + _inherits(Subscriptions, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Subscriptions class + * + * @param baseUrl - The url or Queryable which forms the parent of this webhook subscriptions collection + */ + function Subscriptions(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "subscriptions"; + + _classCallCheck(this, Subscriptions); + + return _possibleConstructorReturn(this, (Subscriptions.__proto__ || Object.getPrototypeOf(Subscriptions)).call(this, baseUrl, path)); + } + /** + * Returns all the webhook subscriptions or the specified webhook subscription + * + */ + + + _createClass(Subscriptions, [{ + key: "getById", + value: function getById(subscriptionId) { + var subscription = new Subscription(this); + subscription.concat("('" + subscriptionId + "')"); + return subscription; + } + /** + * Create a new webhook subscription + * + */ + + }, { + key: "add", + value: function add(notificationUrl, expirationDate, clientState) { + var _this2 = this; + + var postBody = JSON.stringify({ + "clientState": clientState || "pnp-js-core-subscription", + "expirationDateTime": expirationDate, + "notificationUrl": notificationUrl, + "resource": this.toUrl() + }); + return this.post({ body: postBody, headers: { "Content-Type": "application/json" } }).then(function (result) { + return { data: result, subscription: _this2.getById(result.id) }; + }); + } + }]); + + return Subscriptions; + }(queryable_1.QueryableCollection); + + exports.Subscriptions = Subscriptions; + /** + * Describes a single webhook subscription instance + * + */ + + var Subscription = function (_queryable_1$Queryabl2) { + _inherits(Subscription, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the Subscription class + * + * @param baseUrl - The url or Queryable which forms the parent of this webhook subscription instance + */ + function Subscription(baseUrl, path) { + _classCallCheck(this, Subscription); + + return _possibleConstructorReturn(this, (Subscription.__proto__ || Object.getPrototypeOf(Subscription)).call(this, baseUrl, path)); + } + /** + * Update a webhook subscription + * + */ + + + _createClass(Subscription, [{ + key: "update", + value: function update(expirationDate) { + var _this4 = this; + + var postBody = JSON.stringify({ + "expirationDateTime": expirationDate + }); + return this.patch({ body: postBody, headers: { "Content-Type": "application/json" } }).then(function (data) { + return { data: data, subscription: _this4 }; + }); + } + /** + * Remove a webhook subscription + * + */ + + }, { + key: "delete", + value: function _delete() { + return _get(Subscription.prototype.__proto__ || Object.getPrototypeOf(Subscription.prototype), "delete", this).call(this); + } + }]); + + return Subscription; + }(queryable_1.QueryableInstance); + + exports.Subscription = Subscription; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var util_1 = __webpack_require__(1); + + var UserCustomActions = function (_queryable_1$Queryabl) { + _inherits(UserCustomActions, _queryable_1$Queryabl); + + function UserCustomActions(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "usercustomactions"; + + _classCallCheck(this, UserCustomActions); + + return _possibleConstructorReturn(this, (UserCustomActions.__proto__ || Object.getPrototypeOf(UserCustomActions)).call(this, baseUrl, path)); + } + /** + * Returns the custom action with the specified identifier. + * + * @param id The GUID ID of the user custom action to get. + */ + + + _createClass(UserCustomActions, [{ + key: "getById", + value: function getById(id) { + var uca = new UserCustomAction(this); + uca.concat("('" + id + "')"); + return uca; + } + /** + * Create a custom action + * + * @param creationInfo The information which defines the new custom action + * + */ + + }, { + key: "add", + value: function add(properties) { + var _this2 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { "type": "SP.UserCustomAction" } }, properties)); + return this.post({ body: postBody }).then(function (data) { + return { + action: _this2.getById(data.Id), + data: data + }; + }); + } + /** + * Deletes all custom actions in the collection. + * + */ + + }, { + key: "clear", + value: function clear() { + var a = new UserCustomActions(this, "clear"); + return a.post(); + } + }]); + + return UserCustomActions; + }(queryable_1.QueryableCollection); + + exports.UserCustomActions = UserCustomActions; + + var UserCustomAction = function (_queryable_1$Queryabl2) { + _inherits(UserCustomAction, _queryable_1$Queryabl2); + + function UserCustomAction(baseUrl, path) { + _classCallCheck(this, UserCustomAction); + + return _possibleConstructorReturn(this, (UserCustomAction.__proto__ || Object.getPrototypeOf(UserCustomAction)).call(this, baseUrl, path)); + } + + _createClass(UserCustomAction, [{ + key: "update", + value: function update(properties) { + var _this4 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.UserCustomAction" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + action: _this4, + data: data + }; + }); + } + /** + * Remove a custom action + * + */ + + }, { + key: "delete", + value: function _delete() { + return _get(UserCustomAction.prototype.__proto__ || Object.getPrototypeOf(UserCustomAction.prototype), "delete", this).call(this); + } + }]); + + return UserCustomAction; + }(queryable_1.QueryableInstance); + + exports.UserCustomAction = UserCustomAction; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var util_1 = __webpack_require__(1); + var queryable_1 = __webpack_require__(11); + /** + * Represents a collection of navigation nodes + * + */ + + var NavigationNodes = function (_queryable_1$Queryabl) { + _inherits(NavigationNodes, _queryable_1$Queryabl); + + function NavigationNodes(baseUrl, path) { + _classCallCheck(this, NavigationNodes); + + return _possibleConstructorReturn(this, (NavigationNodes.__proto__ || Object.getPrototypeOf(NavigationNodes)).call(this, baseUrl, path)); + } + /** + * Gets a navigation node by id + * + * @param id The id of the node + */ + + + _createClass(NavigationNodes, [{ + key: "getById", + value: function getById(id) { + var node = new NavigationNode(this); + node.concat("(" + id + ")"); + return node; + } + /** + * Adds a new node to the collection + * + * @param title Display name of the node + * @param url The url of the node + * @param visible If true the node is visible, otherwise it is hidden (default: true) + */ + + }, { + key: "add", + value: function add(title, url) { + var _this2 = this; + + var visible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + var postBody = JSON.stringify({ + IsVisible: visible, + Title: title, + Url: url, + "__metadata": { "type": "SP.NavigationNode" } + }); + var adder = new NavigationNodes(this); + return adder.post({ body: postBody }).then(function (data) { + return { + data: data, + node: _this2.getById(data.Id) + }; + }); + } + /** + * Moves a node to be after another node in the navigation + * + * @param nodeId Id of the node to move + * @param previousNodeId Id of the node after which we move the node specified by nodeId + */ + + }, { + key: "moveAfter", + value: function moveAfter(nodeId, previousNodeId) { + var postBody = JSON.stringify({ + nodeId: nodeId, + previousNodeId: previousNodeId + }); + var mover = new NavigationNodes(this, "MoveAfter"); + return mover.post({ body: postBody }); + } + }]); + + return NavigationNodes; + }(queryable_1.QueryableCollection); + + exports.NavigationNodes = NavigationNodes; + + var NavigationNode = function (_queryable_1$Queryabl2) { + _inherits(NavigationNode, _queryable_1$Queryabl2); + + function NavigationNode(baseUrl, path) { + _classCallCheck(this, NavigationNode); + + return _possibleConstructorReturn(this, (NavigationNode.__proto__ || Object.getPrototypeOf(NavigationNode)).call(this, baseUrl, path)); + } + /** + * Represents the child nodes of this node + */ + + + _createClass(NavigationNode, [{ + key: "update", + + /** + * Updates this node based on the supplied properties + * + * @param properties The hash of key/value pairs to update + */ + value: function update(properties) { + var _this4 = this; + + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.NavigationNode" } + }, properties)); + return this.post({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE" + } + }).then(function (data) { + return { + data: data, + node: _this4 + }; + }); + } + /** + * Deletes this node and any child nodes + */ + + }, { + key: "delete", + value: function _delete() { + return _get(NavigationNode.prototype.__proto__ || Object.getPrototypeOf(NavigationNode.prototype), "delete", this).call(this); + } + }, { + key: "children", + get: function get() { + return new NavigationNodes(this, "Children"); + } + }]); + + return NavigationNode; + }(queryable_1.QueryableInstance); + + exports.NavigationNode = NavigationNode; + /** + * Exposes the navigation components + * + */ + + var Navigation = function (_queryable_1$Queryabl3) { + _inherits(Navigation, _queryable_1$Queryabl3); + + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Navigation(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "navigation"; + + _classCallCheck(this, Navigation); + + return _possibleConstructorReturn(this, (Navigation.__proto__ || Object.getPrototypeOf(Navigation)).call(this, baseUrl, path)); + } + /** + * Gets the quicklaunch navigation for the current context + * + */ + + + _createClass(Navigation, [{ + key: "quicklaunch", + get: function get() { + return new NavigationNodes(this, "quicklaunch"); + } + /** + * Gets the top bar navigation navigation for the current context + * + */ + + }, { + key: "topNavigationBar", + get: function get() { + return new NavigationNodes(this, "topnavigationbar"); + } + }]); + + return Navigation; + }(queryable_1.Queryable); + + exports.Navigation = Navigation; + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + /** + * Describes a collection of List objects + * + */ + + var Features = function (_queryable_1$Queryabl) { + _inherits(Features, _queryable_1$Queryabl); + + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Features(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "features"; + + _classCallCheck(this, Features); + + return _possibleConstructorReturn(this, (Features.__proto__ || Object.getPrototypeOf(Features)).call(this, baseUrl, path)); + } + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the feature (GUID) + */ + + + _createClass(Features, [{ + key: "getById", + value: function getById(id) { + var feature = new Feature(this); + feature.concat("('" + id + "')"); + return feature; + } + /** + * Adds a new list to the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature activation will be forced + */ + + }, { + key: "add", + value: function add(id) { + var _this2 = this; + + var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var adder = new Features(this, "add"); + return adder.post({ + body: JSON.stringify({ + featdefScope: 0, + featureId: id, + force: force + }) + }).then(function (data) { + return { + data: data, + feature: _this2.getById(id) + }; + }); + } + /** + * Removes (deactivates) a feature from the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature deactivation will be forced + */ + + }, { + key: "remove", + value: function remove(id) { + var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var remover = new Features(this, "remove"); + return remover.post({ + body: JSON.stringify({ + featureId: id, + force: force + }) + }); + } + }]); + + return Features; + }(queryable_1.QueryableCollection); + + exports.Features = Features; + + var Feature = function (_queryable_1$Queryabl2) { + _inherits(Feature, _queryable_1$Queryabl2); + + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + */ + function Feature(baseUrl, path) { + _classCallCheck(this, Feature); + + return _possibleConstructorReturn(this, (Feature.__proto__ || Object.getPrototypeOf(Feature)).call(this, baseUrl, path)); + } + /** + * Removes (deactivates) a feature from the collection + * + * @param force If true the feature deactivation will be forced + */ + + + _createClass(Feature, [{ + key: "deactivate", + value: function deactivate() { + var _this4 = this; + + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var removeDependency = this.addBatchDependency(); + var idGet = new Feature(this).select("DefinitionId"); + return idGet.getAs().then(function (feature) { + var promise = _this4.getParent(Features, _this4.parentUrl, "").remove(feature.DefinitionId, force); + removeDependency(); + return promise; + }); + } + }]); + + return Feature; + }(queryable_1.QueryableInstance); + + exports.Feature = Feature; + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var queryable_1 = __webpack_require__(11); + var FileUtil = __webpack_require__(41); + var odata_1 = __webpack_require__(12); + + var UserProfileQuery = function (_queryable_1$Queryabl) { + _inherits(UserProfileQuery, _queryable_1$Queryabl); + + function UserProfileQuery(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/sp.userprofiles.peoplemanager"; + + _classCallCheck(this, UserProfileQuery); + + var _this = _possibleConstructorReturn(this, (UserProfileQuery.__proto__ || Object.getPrototypeOf(UserProfileQuery)).call(this, baseUrl, path)); + + _this.profileLoader = new ProfileLoader(baseUrl); + return _this; + } + /** + * The URL of the edit profile page for the current user. + */ + + + _createClass(UserProfileQuery, [{ + key: "amIFollowedBy", + + /** + * A Boolean value that indicates whether the current user's People I'm Following list is public. + * + * @param loginName The account name of the user + */ + value: function amIFollowedBy(loginName) { + var q = new UserProfileQuery(this, "amifollowedby(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Checks whether the current user is following the specified user. + * + * @param loginName The account name of the user + */ + + }, { + key: "amIFollowing", + value: function amIFollowing(loginName) { + var q = new UserProfileQuery(this, "amifollowing(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Gets tags that the user is following. + * + * @param maxCount The maximum number of tags to get. + */ + + }, { + key: "getFollowedTags", + value: function getFollowedTags() { + var maxCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20; + + var q = new UserProfileQuery(this, "getfollowedtags(" + maxCount + ")"); + return q.get(); + } + /** + * Gets the people who are following the specified user. + * + * @param loginName The account name of the user. + */ + + }, { + key: "getFollowersFor", + value: function getFollowersFor(loginName) { + var q = new UserProfileQuery(this, "getfollowersfor(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Gets the people who are following the current user. + * + */ + + }, { + key: "getPeopleFollowedBy", + + /** + * Gets the people who the specified user is following. + * + * @param loginName The account name of the user. + */ + value: function getPeopleFollowedBy(loginName) { + var q = new UserProfileQuery(this, "getpeoplefollowedby(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Gets user properties for the specified user. + * + * @param loginName The account name of the user. + */ + + }, { + key: "getPropertiesFor", + value: function getPropertiesFor(loginName) { + var q = new UserProfileQuery(this, "getpropertiesfor(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Gets the most popular tags. + * + */ + + }, { + key: "getUserProfilePropertyFor", + + /** + * Gets the specified user profile property for the specified user. + * + * @param loginName The account name of the user. + * @param propertyName The case-sensitive name of the property to get. + */ + value: function getUserProfilePropertyFor(loginName, propertyName) { + var q = new UserProfileQuery(this, "getuserprofilepropertyfor(accountname=@v, propertyname='" + propertyName + "')"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + } + /** + * Removes the specified user from the user's list of suggested people to follow. + * + * @param loginName The account name of the user. + */ + + }, { + key: "hideSuggestion", + value: function hideSuggestion(loginName) { + var q = new UserProfileQuery(this, "hidesuggestion(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.post(); + } + /** + * Checks whether the first user is following the second user. + * + * @param follower The account name of the user who might be following followee. + * @param followee The account name of the user who might be followed. + */ + + }, { + key: "isFollowing", + value: function isFollowing(follower, followee) { + var q = new UserProfileQuery(this, null); + q.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"); + q.query.add("@v", "'" + encodeURIComponent(follower) + "'"); + q.query.add("@y", "'" + encodeURIComponent(followee) + "'"); + return q.get(); + } + /** + * Uploads and sets the user profile picture + * + * @param profilePicSource Blob data representing the user's picture + */ + + }, { + key: "setMyProfilePic", + value: function setMyProfilePic(profilePicSource) { + var _this2 = this; + + return new Promise(function (resolve, reject) { + FileUtil.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) { + var request = new UserProfileQuery(_this2, "setmyprofilepicture"); + request.post({ + body: String.fromCharCode.apply(null, new Uint16Array(buffer)) + }).then(function (_) { + return resolve(); + }); + }).catch(function (e) { + return reject(e); + }); + }); + } + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) + * + * @param emails The email addresses of the users to provision sites for + */ + + }, { + key: "createPersonalSiteEnqueueBulk", + value: function createPersonalSiteEnqueueBulk() { + for (var _len = arguments.length, emails = Array(_len), _key = 0; _key < _len; _key++) { + emails[_key] = arguments[_key]; + } + + return this.profileLoader.createPersonalSiteEnqueueBulk(emails); + } + /** + * Gets the user profile of the site owner. + * + */ + + }, { + key: "createPersonalSite", + + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files. + * + * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request + */ + value: function createPersonalSite() { + var interactiveRequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + return this.profileLoader.createPersonalSite(interactiveRequest); + } + /** + * Sets the privacy settings for this profile. + * + * @param share true to make all social data public; false to make all social data private. + */ + + }, { + key: "shareAllSocialData", + value: function shareAllSocialData(share) { + return this.profileLoader.shareAllSocialData(share); + } + }, { + key: "editProfileLink", + get: function get() { + var q = new UserProfileQuery(this, "EditProfileLink"); + return q.getAs(odata_1.ODataValue()); + } + /** + * A Boolean value that indicates whether the current user's People I'm Following list is public. + */ + + }, { + key: "isMyPeopleListPublic", + get: function get() { + var q = new UserProfileQuery(this, "IsMyPeopleListPublic"); + return q.getAs(odata_1.ODataValue()); + } + }, { + key: "myFollowers", + get: function get() { + return new queryable_1.QueryableCollection(this, "getmyfollowers"); + } + /** + * Gets user properties for the current user. + * + */ + + }, { + key: "myProperties", + get: function get() { + return new UserProfileQuery(this, "getmyproperties"); + } + }, { + key: "trendingTags", + get: function get() { + var q = new UserProfileQuery(this, null); + q.concat(".gettrendingtags"); + return q.get(); + } + }, { + key: "ownerUserProfile", + get: function get() { + return this.profileLoader.ownerUserProfile; + } + /** + * Gets the user profile that corresponds to the current user. + */ + + }, { + key: "userProfile", + get: function get() { + return this.profileLoader.userProfile; + } + }]); + + return UserProfileQuery; + }(queryable_1.QueryableInstance); + + exports.UserProfileQuery = UserProfileQuery; + + var ProfileLoader = function (_queryable_1$Queryabl2) { + _inherits(ProfileLoader, _queryable_1$Queryabl2); + + function ProfileLoader(baseUrl) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_api/sp.userprofiles.profileloader.getprofileloader"; + + _classCallCheck(this, ProfileLoader); + + return _possibleConstructorReturn(this, (ProfileLoader.__proto__ || Object.getPrototypeOf(ProfileLoader)).call(this, baseUrl, path)); + } + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) + * + * @param emails The email addresses of the users to provision sites for + */ + + + _createClass(ProfileLoader, [{ + key: "createPersonalSiteEnqueueBulk", + value: function createPersonalSiteEnqueueBulk(emails) { + var q = new ProfileLoader(this, "createpersonalsiteenqueuebulk"); + var postBody = JSON.stringify({ "emailIDs": emails }); + return q.post({ + body: postBody + }); + } + /** + * Gets the user profile of the site owner. + * + */ + + }, { + key: "createPersonalSite", + + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files. + * + * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request + */ + value: function createPersonalSite() { + var interactiveRequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var q = new ProfileLoader(this, "getuserprofile/createpersonalsiteenque(" + interactiveRequest + ")\","); + return q.post(); + } + /** + * Sets the privacy settings for this profile. + * + * @param share true to make all social data public; false to make all social data private. + */ + + }, { + key: "shareAllSocialData", + value: function shareAllSocialData(share) { + var q = new ProfileLoader(this, "getuserprofile/shareallsocialdata(" + share + ")\","); + return q.post(); + } + }, { + key: "ownerUserProfile", + get: function get() { + var q = this.getParent(ProfileLoader, this.parentUrl, "_api/sp.userprofiles.profileloader.getowneruserprofile"); + return q.postAs(); + } + /** + * Gets the user profile that corresponds to the current user. + * + */ + + }, { + key: "userProfile", + get: function get() { + var q = new ProfileLoader(this, "getuserprofile"); + return q.postAs(); + } + }]); + + return ProfileLoader; + }(queryable_1.Queryable); + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + "use strict"; + /** + * Reads a blob as text + * + * @param blob The data to read + */ + + function readBlobAsText(blob) { + return readBlobAs(blob, "string"); + } + exports.readBlobAsText = readBlobAsText; + /** + * Reads a blob into an array buffer + * + * @param blob The data to read + */ + function readBlobAsArrayBuffer(blob) { + return readBlobAs(blob, "buffer"); + } + exports.readBlobAsArrayBuffer = readBlobAsArrayBuffer; + /** + * Generic method to read blob's content + * + * @param blob The data to read + * @param mode The read mode + */ + function readBlobAs(blob, mode) { + return new Promise(function (resolve, reject) { + try { + var reader = new FileReader(); + reader.onload = function (e) { + resolve(e.target.result); + }; + switch (mode) { + case "string": + reader.readAsText(blob); + break; + case "buffer": + reader.readAsArrayBuffer(blob); + break; + } + } catch (e) { + reject(e); + } + }); + } + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + function __export(m) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + } + __export(__webpack_require__(43)); + var httpclient_1 = __webpack_require__(13); + exports.HttpClient = httpclient_1.HttpClient; + var sprequestexecutorclient_1 = __webpack_require__(44); + exports.SPRequestExecutorClient = sprequestexecutorclient_1.SPRequestExecutorClient; + var nodefetchclient_1 = __webpack_require__(45); + exports.NodeFetchClient = nodefetchclient_1.NodeFetchClient; + var fetchclient_1 = __webpack_require__(5); + exports.FetchClient = fetchclient_1.FetchClient; + __export(__webpack_require__(46)); + var collections_1 = __webpack_require__(8); + exports.Dictionary = collections_1.Dictionary; + var util_1 = __webpack_require__(1); + exports.Util = util_1.Util; + __export(__webpack_require__(3)); + __export(__webpack_require__(15)); + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + function __export(m) { + for (var p in m) { + if (!exports.hasOwnProperty(p)) exports[p] = m[p]; + } + } + __export(__webpack_require__(17)); + var files_1 = __webpack_require__(28); + exports.CheckinType = files_1.CheckinType; + exports.WebPartsPersonalizationScope = files_1.WebPartsPersonalizationScope; + exports.MoveOperations = files_1.MoveOperations; + exports.TemplateFileType = files_1.TemplateFileType; + var items_1 = __webpack_require__(26); + exports.Item = items_1.Item; + exports.PagedItemCollection = items_1.PagedItemCollection; + var navigation_1 = __webpack_require__(38); + exports.NavigationNodes = navigation_1.NavigationNodes; + exports.NavigationNode = navigation_1.NavigationNode; + var lists_1 = __webpack_require__(25); + exports.List = lists_1.List; + var odata_1 = __webpack_require__(12); + exports.extractOdataId = odata_1.extractOdataId; + exports.ODataParserBase = odata_1.ODataParserBase; + exports.ODataDefaultParser = odata_1.ODataDefaultParser; + exports.ODataRaw = odata_1.ODataRaw; + exports.ODataValue = odata_1.ODataValue; + exports.ODataEntity = odata_1.ODataEntity; + exports.ODataEntityArray = odata_1.ODataEntityArray; + exports.TextFileParser = odata_1.TextFileParser; + exports.BlobFileParser = odata_1.BlobFileParser; + exports.BufferFileParser = odata_1.BufferFileParser; + exports.JSONFileParser = odata_1.JSONFileParser; + var roles_1 = __webpack_require__(22); + exports.RoleDefinitionBindings = roles_1.RoleDefinitionBindings; + var search_1 = __webpack_require__(10); + exports.Search = search_1.Search; + exports.SearchResult = search_1.SearchResult; + exports.SearchResults = search_1.SearchResults; + exports.SortDirection = search_1.SortDirection; + exports.ReorderingRuleMatchType = search_1.ReorderingRuleMatchType; + exports.QueryPropertyValueType = search_1.QueryPropertyValueType; + var searchsuggest_1 = __webpack_require__(18); + exports.SearchSuggest = searchsuggest_1.SearchSuggest; + exports.SearchSuggestResult = searchsuggest_1.SearchSuggestResult; + var site_1 = __webpack_require__(19); + exports.Site = site_1.Site; + __export(__webpack_require__(34)); + var webs_1 = __webpack_require__(20); + exports.Web = webs_1.Web; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var util_1 = __webpack_require__(1); + var exceptions_1 = __webpack_require__(15); + /** + * Makes requests using the SP.RequestExecutor library. + */ + + var SPRequestExecutorClient = function () { + function SPRequestExecutorClient() { + _classCallCheck(this, SPRequestExecutorClient); + + /** + * Converts a SharePoint REST API response to a fetch API response. + */ + this.convertToResponse = function (spResponse) { + var responseHeaders = new Headers(); + for (var h in spResponse.headers) { + if (spResponse.headers[h]) { + responseHeaders.append(h, spResponse.headers[h]); + } + } + // issue #256, Cannot have an empty string body when creating a Response with status 204 + var body = spResponse.statusCode === 204 ? null : spResponse.body; + return new Response(body, { + headers: responseHeaders, + status: spResponse.statusCode, + statusText: spResponse.statusText + }); + }; + } + /** + * Fetches a URL using the SP.RequestExecutor library. + */ + + + _createClass(SPRequestExecutorClient, [{ + key: "fetch", + value: function fetch(url, options) { + var _this = this; + + if (typeof SP === "undefined" || typeof SP.RequestExecutor === "undefined") { + throw new exceptions_1.SPRequestExecutorUndefinedException(); + } + var addinWebUrl = url.substring(0, url.indexOf("/_api")), + executor = new SP.RequestExecutor(addinWebUrl), + headers = {}, + iterator = void 0, + temp = void 0; + if (options.headers && options.headers instanceof Headers) { + iterator = options.headers.entries(); + temp = iterator.next(); + while (!temp.done) { + headers[temp.value[0]] = temp.value[1]; + temp = iterator.next(); + } + } else { + headers = options.headers; + } + return new Promise(function (resolve, reject) { + var requestOptions = { + error: function error(_error) { + reject(_this.convertToResponse(_error)); + }, + headers: headers, + method: options.method, + success: function success(response) { + resolve(_this.convertToResponse(response)); + }, + url: url + }; + if (options.body) { + requestOptions = util_1.Util.extend(requestOptions, { body: options.body }); + } else { + requestOptions = util_1.Util.extend(requestOptions, { binaryStringRequestBody: true }); + } + executor.executeAsync(requestOptions); + }); + } + }]); + + return SPRequestExecutorClient; + }(); + + exports.SPRequestExecutorClient = SPRequestExecutorClient; + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var exceptions_1 = __webpack_require__(15); + /** + * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by + * not including all of the node dependencies + */ + + var NodeFetchClient = function () { + function NodeFetchClient() { + _classCallCheck(this, NodeFetchClient); + } + + _createClass(NodeFetchClient, [{ + key: "fetch", + + /** + * Always throws an error that NodeFetchClient is not supported for use in the browser + */ + value: function fetch() { + throw new exceptions_1.NodeFetchClientUnsupportedException(); + } + }]); + + return NodeFetchClient; + }(); + + exports.NodeFetchClient = NodeFetchClient; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var cachingConfigurationProvider_1 = __webpack_require__(47); + exports.CachingConfigurationProvider = cachingConfigurationProvider_1.default; + var spListConfigurationProvider_1 = __webpack_require__(48); + exports.SPListConfigurationProvider = spListConfigurationProvider_1.default; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var storage = __webpack_require__(6); + var exceptions_1 = __webpack_require__(15); + /** + * A caching provider which can wrap other non-caching providers + * + */ + + var CachingConfigurationProvider = function () { + /** + * Creates a new caching configuration provider + * @constructor + * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration + * @param {string} cacheKey Key that will be used to store cached items to the cache + * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings. + */ + function CachingConfigurationProvider(wrappedProvider, cacheKey, cacheStore) { + _classCallCheck(this, CachingConfigurationProvider); + + this.wrappedProvider = wrappedProvider; + this.store = cacheStore ? cacheStore : this.selectPnPCache(); + this.cacheKey = "_configcache_" + cacheKey; + } + /** + * Gets the wrapped configuration providers + * + * @return {IConfigurationProvider} Wrapped configuration provider + */ + + + _createClass(CachingConfigurationProvider, [{ + key: "getWrappedProvider", + value: function getWrappedProvider() { + return this.wrappedProvider; + } + /** + * Loads the configuration values either from the cache or from the wrapped provider + * + * @return {Promise>} Promise of loaded configuration values + */ + + }, { + key: "getConfiguration", + value: function getConfiguration() { + var _this = this; + + // Cache not available, pass control to the wrapped provider + if (!this.store || !this.store.enabled) { + return this.wrappedProvider.getConfiguration(); + } + // Value is found in cache, return it directly + var cachedConfig = this.store.get(this.cacheKey); + if (cachedConfig) { + return new Promise(function (resolve) { + resolve(cachedConfig); + }); + } + // Get and cache value from the wrapped provider + var providerPromise = this.wrappedProvider.getConfiguration(); + providerPromise.then(function (providedConfig) { + _this.store.put(_this.cacheKey, providedConfig); + }); + return providerPromise; + } + }, { + key: "selectPnPCache", + value: function selectPnPCache() { + var pnpCache = new storage.PnPClientStorage(); + if (pnpCache.local && pnpCache.local.enabled) { + return pnpCache.local; + } + if (pnpCache.session && pnpCache.session.enabled) { + return pnpCache.session; + } + throw new exceptions_1.NoCacheAvailableException(); + } + }]); + + return CachingConfigurationProvider; + }(); + + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = CachingConfigurationProvider; + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var cachingConfigurationProvider_1 = __webpack_require__(47); + /** + * A configuration provider which loads configuration values from a SharePoint list + * + */ + + var SPListConfigurationProvider = function () { + /** + * Creates a new SharePoint list based configuration provider + * @constructor + * @param {string} webUrl Url of the SharePoint site, where the configuration list is located + * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = "config") + */ + function SPListConfigurationProvider(sourceWeb) { + var sourceListTitle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "config"; + + _classCallCheck(this, SPListConfigurationProvider); + + this.sourceWeb = sourceWeb; + this.sourceListTitle = sourceListTitle; + } + /** + * Gets the url of the SharePoint site, where the configuration list is located + * + * @return {string} Url address of the site + */ + + + _createClass(SPListConfigurationProvider, [{ + key: "getConfiguration", + + /** + * Loads the configuration values from the SharePoint list + * + * @return {Promise>} Promise of loaded configuration values + */ + value: function getConfiguration() { + return this.web.lists.getByTitle(this.listTitle).items.select("Title", "Value").getAs().then(function (data) { + return data.reduce(function (configuration, item) { + return Object.defineProperty(configuration, item.Title, { + configurable: false, + enumerable: false, + value: item.Value, + writable: false + }); + }, {}); + }); + } + /** + * Wraps the current provider in a cache enabled provider + * + * @return {CachingConfigurationProvider} Caching providers which wraps the current provider + */ + + }, { + key: "asCaching", + value: function asCaching() { + var cacheKey = "splist_" + this.web.toUrl() + "+" + this.listTitle; + return new cachingConfigurationProvider_1.default(this, cacheKey); + } + }, { + key: "web", + get: function get() { + return this.sourceWeb; + } + /** + * Gets the title of the SharePoint list, which contains the configuration settings + * + * @return {string} List title + */ + + }, { + key: "listTitle", + get: function get() { + return this.sourceListTitle; + } + }]); + + return SPListConfigurationProvider; + }(); + + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = SPListConfigurationProvider; + +/***/ } +/******/ ]) +}); +; +//# sourceMappingURL=pnp.js.map \ No newline at end of file diff --git a/dist/pnp.js.map b/dist/pnp.js.map new file mode 100644 index 00000000..7cd96fe7 --- /dev/null +++ b/dist/pnp.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap dce6d66a12d39ac8c093","webpack:///./lib/pnp.js","webpack:///./lib/utils/util.js","webpack:///./lib/utils/decorators.js","webpack:///./lib/utils/logging.js","webpack:///./lib/configuration/pnplibconfig.js","webpack:///./lib/net/fetchclient.js","webpack:///./lib/utils/storage.js","webpack:///./lib/configuration/configuration.js","webpack:///./lib/collections/collections.js","webpack:///./lib/sharepoint/rest.js","webpack:///./lib/sharepoint/search.js","webpack:///./lib/sharepoint/queryable.js","webpack:///./lib/sharepoint/odata.js","webpack:///./lib/net/httpclient.js","webpack:///./lib/net/digestcache.js","webpack:///./lib/utils/exceptions.js","webpack:///./lib/sharepoint/queryablerequest.js","webpack:///./lib/sharepoint/caching.js","webpack:///./lib/sharepoint/searchsuggest.js","webpack:///./lib/sharepoint/site.js","webpack:///./lib/sharepoint/webs.js","webpack:///./lib/sharepoint/queryablesecurable.js","webpack:///./lib/sharepoint/roles.js","webpack:///./lib/sharepoint/sitegroups.js","webpack:///./lib/sharepoint/siteusers.js","webpack:///./lib/sharepoint/lists.js","webpack:///./lib/sharepoint/items.js","webpack:///./lib/sharepoint/folders.js","webpack:///./lib/sharepoint/files.js","webpack:///./lib/sharepoint/webparts.js","webpack:///./lib/sharepoint/contenttypes.js","webpack:///./lib/sharepoint/attachmentfiles.js","webpack:///./lib/sharepoint/views.js","webpack:///./lib/sharepoint/fields.js","webpack:///./lib/sharepoint/types.js","webpack:///./lib/sharepoint/forms.js","webpack:///./lib/sharepoint/subscriptions.js","webpack:///./lib/sharepoint/usercustomactions.js","webpack:///./lib/sharepoint/navigation.js","webpack:///./lib/sharepoint/features.js","webpack:///./lib/sharepoint/userprofiles.js","webpack:///./lib/utils/files.js","webpack:///./lib/types/index.js","webpack:///./lib/sharepoint/index.js","webpack:///./lib/net/sprequestexecutorclient.js","webpack:///./lib/net/nodefetchclientbrowser.js","webpack:///./lib/configuration/providers/index.js","webpack:///./lib/configuration/providers/cachingConfigurationProvider.js","webpack:///./lib/configuration/providers/spListConfigurationProvider.js"],"names":["__export","m","p","exports","hasOwnProperty","util_1","require","storage_1","configuration_1","logging_1","rest_1","pnplibconfig_1","util","Util","sp","Rest","storage","PnPClientStorage","config","Settings","log","Logger","setup","setRuntimeConfig","Def","Object","defineProperty","value","default","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","d","Reflect","decorate","i","decorators_1","context","method","params","apply","name","replace","regex","RegExp","test","location","search","results","exec","decodeURIComponent","getUrlParamByName","isFalse","index","s","substring","date","interval","units","ret","Date","toLocaleString","toLowerCase","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","setTime","getTime","undefined","path","avoidCache","encodeURIComponent","toString","head","document","getElementsByTagName","e","createElement","appendChild","setAttribute","paths","filter","map","join","chars","text","Array","possible","charAt","Math","floor","random","guid","candidateFunction","array","isArray","constructor","source","noOverwrite","check","o","getOwnPropertyNames","v","reduce","t","url","isUrlAbsolute","global","_spPageContextInfo","combinePaths","webAbsoluteUrl","webServerRelativeUrl","candidateUrl","Promise","resolve","RuntimeConfig","baseUrl","indexOf","substr","deprecated","message","propertyKey","descriptor","data","level","LogLevel","Warning","args","listeners","instance","subscribe","listener","clearSubscribers","Verbose","json","JSON","stringify","entry","f","measure","activeLogLevel","_instance","LoggerImpl","count","subscribers","push","slice","subscriber","console","profile","profileEnd","ConsoleListener","msg","format","Info","warn","Error","error","FunctionListener","fetchclient_1","RuntimeConfigImpl","_headers","_defaultCachingStore","_defaultCachingTimeoutSeconds","_globalCacheDisable","_fetchClientFactory","FetchClient","_baseUrl","_spfxContext","headers","globalCacheDisable","defaultCachingStore","defaultCachingTimeoutSeconds","fetchClientFactory","spfxContext","pageContext","web","absoluteUrl","_runtimeConfig","set","options","fetch","PnPClientStorageWrapper","store","defaultTimeoutMinutes","enabled","getItem","persistable","parse","expiration","delete","expire","setItem","createPersistable","removeItem","getter","get","then","put","str","dateAdd","local","localStorage","session","sessionStorage","collections_1","_settings","Dictionary","add","hash","reject","merge","provider","getConfiguration","catch","reason","keys","values","sourceAsDictionary","getKeys","sourceAsHash","val","splice","search_1","searchsuggest_1","site_1","webs_1","userprofiles_1","exceptions_1","query","finalQuery","querytext","SearchSuggest","execute","Querytext","Search","createBatch","addInWebUrl","hostWebUrl","_cdImpl","Site","Web","factory","urlPart","UrlException","UserProfileQuery","queryable_1","formattedBody","SelectProperties","RefinementFilters","SortList","HithighlightedProperties","ReorderingRules","Properties","postBody","request","extend","post","body","SearchResults","QueryableInstance","rawResponse","response","postquery","PrimarySearchResults","formatSearchResults","PrimaryQueryResult","RelevantResults","Table","Rows","RawSearchResults","ElapsedTime","RowCount","TotalRows","TotalRowsIncludingDuplicates","rawResults","tempResults","SearchResult","Cells","rawItem","item","Key","configurable","enumerable","Value","writable","SortDirection","ReorderingRuleMatchType","QueryPropertyValueType","odata_1","queryablerequest_1","Queryable","pathPart","_url","hasBatch","_batch","addBatchDependency","_parentUrl","_query","urlStr","lastIndexOf","q","batch","AlreadyInBatchException","_useCaching","_cachingOptions","toUrl","parentUrl","parent","parser","ODataDefaultParser","getOptions","toRequestContext","pipe","postOptions","patchOptions","deleteOptions","verb","dependencyDispose","toAbsoluteUrl","toUrlAndQuery","batchDependency","cachingOptions","isBatched","isCached","requestAbsoluteUrl","requestId","getGUID","QueryableCollection","selects","expands","orderBy","ascending","asc","skip","top","httpclient_1","exceptions_2","extractOdataId","candidate","__metadata","id","ODataIdException","ODataParserBase","handleError","has","parseFloat","status","parseODataJSON","ok","ProcessHttpClientResponseException","statusText","result","ODataRawParserImpl","ODataValueParserImpl","ODataEntityParserImpl","getEntityUrl","ODataEntityArrayParserImpl","entity","uri","write","ODataRaw","ODataValue","ODataEntity","ODataEntityArray","ODataBatch","_batchId","_requests","_batchDependencies","info","toUpperCase","resolver","promise","executeImpl","client","HttpClient","batchBody","currentChangeSetId","reqInfo","absoluteRequestUrl","batchHeaders","batchOptions","_parseResponse","responses","BatchParseException","chain","header","statusRegExp","lines","split","state","line","trim","parts","parseInt","Response","TextFileParser","BlobFileParser","blob","JSONFileParser","BufferFileParser","isFunction","arrayBuffer","buffer","digestcache_1","_impl","_digestCache","DigestCache","opts","cache","credentials","Headers","mergeHeaders","append","APIUrlException","webUrl","getDigest","digest","fetchRaw","rawHeaders","retry","ctx","delay","attempts","retryCount","setTimeout","getCtxCallback","retryContext","call","temp","Request","forEach","CachedDigest","_httpClient","_digests","cachedDigest","now","GetContextWebInformation","newCachedDigest","FormDigestValue","seconds","FormDigestTimeoutSeconds","clear","defaultLog","NoCacheAvailableException","AuthUrlException","NodeFetchClientUnsupportedException","SPRequestExecutorUndefinedException","MaxCommentLengthException","NotSupportedInBatchException","operation","FunctionExpectedException","caching_1","pipeline","PipelineMethods","logStart","caching","send","logEnd","next","returnResult","requestPipelineMethod","alwaysRun","hasResult","cacheOptions","CachingOptions","setResult","CachingParserWrapper","storeName","_parser","_cacheOptions","mapQueryToQueryString","SearchSuggestResult","personalCount","preQuery","hitHighlighting","capitalize","culture","stemming","includePeople","queryRules","prefixMatch","PeopleNames","suggest","PersonalResults","Queries","usercustomactions_1","features_1","SupportedSchemaVersions","absoluteWebUrl","GetDocumentLibraries","absolutePageUrl","GetWebUrlFromPageUrl","Features","UserCustomActions","queryablesecurable_1","lists_1","fields_1","navigation_1","sitegroups_1","contenttypes_1","folders_1","roles_1","files_1","lists_2","siteusers_1","Webs","webPath","title","description","template","language","inheritPermissions","additionalSettings","props","Description","Language","Title","Url","UseSamePermissionsAsParentSite","WebTemplate","folderRelativeUrl","Folder","fileRelativeUrl","File","listRelativeUrl","List","properties","colorPaletteUrl","fontSchemeUrl","backgroundImageUrl","shareGenerated","concat","perms","loginName","logonName","includeCrossLanugage","type","select","SiteUser","filename","size","progId","ContentTypes","Lists","Fields","Navigation","SiteUsers","SiteGroups","CurrentUser","Folders","RoleDefinitions","QueryableSecurable","copyRoleAssignments","clearSubscopes","Breaker","copy","b","break","Resetter","reset","RoleAssignments","principalId","roleDefId","a","ra","RoleAssignment","RoleDefinitionBindings","RoleDefinition","roleTypeKind","order","basePermissions","BasePermissions","Name","Order","definition","getById","Id","retDef","getParent","getByName","PrincipalType","group","groupName","SiteGroup","sg","g","retGroup","email","su","LoginName","getByLoginName","user","items_1","views_1","forms_1","subscriptions_1","list","enableContentTypes","getByTitle","update","created","viewId","View","eTag","retList","expand","Recycle","viewXml","RenderListData","itemId","formId","mode","ListData","ReserveListItemId","getAs","ListItemEntityTypeFullName","Items","Views","Forms","Subscriptions","attachmentfiles_1","Item","PagedItemCollectionParser","listItemEntityTypeFullName","doAdd","listItemEntityType","postAs","parentList","removeDependency","getListItemEntityTypeFullName","n","ItemUpdatedParser","action","GetWOPIFrameUrl","formValues","newDocumentUpdate","bNewDocumentUpdate","AttachmentFiles","ContentType","PagedItemCollection","nextUrl","hasNext","items","getPaged","__next","folder","Files","webparts_1","content","shouldOverWrite","file","progress","chunkSize","adder","setContentChunked","fileUrl","templateFileType","comment","uploadId","checkinType","CheckinType","Major","scope","WebPartsPersonalizationScope","Shared","LimitedWebPartManager","moveOperations","MoveOperations","Overwrite","setter","self","fileSize","blockCount","blockNumber","currentPointer","stage","totalBlocks","startUpload","pointer","continueUpload","finishUpload","fragment","fileOffset","ServerRelativeUrl","Versions","versionId","Version","label","TemplateFileType","exporter","webPartId","xml","importer","webPartXml","WebPartDefinitions","WebPartDefinition","deleter","WebPart","ct","contentTypeId","contentType","FieldLinks","fl","FieldLink","AttachmentFile","personalView","view","ViewFields","fieldTitleOrInternalName","fieldInternalName","Types","Field","SchemaXml","field","fieldType","maxLength","FieldTypeKind","MaxLength","formula","dateFormat","outputType","FieldTypes","Text","DateFormat","Formula","OutputType","displayFormat","DateTimeFieldFormatType","DateOnly","calendarType","CalendarType","Gregorian","friendlyDisplayFormat","DateTimeCalendarType","DisplayFormat","FriendlyDisplayFormat","minValue","maxValue","MinimumValue","MaximumValue","currencyLocalId","CurrencyLocaleId","numberOfLines","richText","restrictedMode","appendOnly","allowHyperlink","AllowHyperlink","AppendOnly","NumberOfLines","RestrictedMode","RichText","UrlFieldFormatType","Hyperlink","show","ControlMode","AddFieldOptions","PageType","Form","subscriptionId","subscription","Subscription","notificationUrl","expirationDate","clientState","patch","uca","UserCustomAction","NavigationNodes","node","NavigationNode","visible","IsVisible","nodeId","previousNodeId","mover","feature","Feature","force","featdefScope","featureId","remover","idGet","remove","DefinitionId","FileUtil","profileLoader","ProfileLoader","maxCount","propertyName","follower","followee","profilePicSource","readBlobAsArrayBuffer","String","fromCharCode","Uint16Array","emails","createPersonalSiteEnqueueBulk","interactiveRequest","createPersonalSite","share","shareAllSocialData","ownerUserProfile","userProfile","readBlobAsText","readBlobAs","reader","FileReader","onload","readAsText","readAsArrayBuffer","sprequestexecutorclient_1","SPRequestExecutorClient","nodefetchclient_1","NodeFetchClient","convertToResponse","spResponse","responseHeaders","h","statusCode","SP","RequestExecutor","addinWebUrl","executor","iterator","entries","done","requestOptions","success","binaryStringRequestBody","executeAsync","cachingConfigurationProvider_1","CachingConfigurationProvider","spListConfigurationProvider_1","SPListConfigurationProvider","wrappedProvider","cacheKey","cacheStore","selectPnPCache","cachedConfig","providerPromise","providedConfig","pnpCache","sourceWeb","sourceListTitle","lists","listTitle","configuration"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA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AO,IAAT,EAA7C;AACAxB,SAAQyB,OAAR,GAAkBkzB,2BAAlB,C","file":"pnp.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})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"/assets/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap dce6d66a12d39ac8c093","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nconst util_1 = require(\"./utils/util\");\nconst storage_1 = require(\"./utils/storage\");\nconst configuration_1 = require(\"./configuration/configuration\");\nconst logging_1 = require(\"./utils/logging\");\nconst rest_1 = require(\"./sharepoint/rest\");\nconst pnplibconfig_1 = require(\"./configuration/pnplibconfig\");\n/**\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\n */\n/**\n * Utility methods\n */\nexports.util = util_1.Util;\n/**\n * Provides access to the REST interface\n */\nexports.sp = new rest_1.Rest();\n/**\n * Provides access to local and session storage\n */\nexports.storage = new storage_1.PnPClientStorage();\n/**\n * Global configuration instance to which providers can be added\n */\nexports.config = new configuration_1.Settings();\n/**\n * Global logging instance to which subscribers can be registered and messages written\n */\nexports.log = logging_1.Logger;\n/**\n * Allows for the configuration of the library\n */\nexports.setup = pnplibconfig_1.setRuntimeConfig;\n/**\n * Expose a subset of classes from the library for public consumption\n */\n__export(require(\"./types/index\"));\n// creating this class instead of directly assigning to default fixes issue #116\nlet Def = {\n /**\n * Global configuration instance to which providers can be added\n */\n config: exports.config,\n /**\n * Global logging instance to which subscribers can be registered and messages written\n */\n log: exports.log,\n /**\n * Provides access to local and session storage\n */\n setup: exports.setup,\n /**\n * Provides access to the REST interface\n */\n sp: exports.sp,\n /**\n * Provides access to local and session storage\n */\n storage: exports.storage,\n /**\n * Utility methods\n */\n util: exports.util,\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Enables use of the import pnp from syntax\n */\nexports.default = Def;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/pnp.js","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nconst decorators_1 = require(\"./decorators\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nclass Util {\n /**\n * Gets a callback function which will maintain context across async calls.\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n *\n * @param context The object that will be the 'this' value in the callback\n * @param method The method to which we will apply the context and parameters\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n */\n static getCtxCallback(context, method, ...params) {\n return function () {\n method.apply(context, params);\n };\n }\n /**\n * Tests if a url param exists\n *\n * @param name The name of the url paramter to check\n */\n static urlParamExists(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n return regex.test(location.search);\n }\n /**\n * Gets a url param value by name\n *\n * @param name The name of the paramter for which we want the value\n */\n static getUrlParamByName(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n let results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n }\n /**\n * Gets a url param by name and attempts to parse a bool value\n *\n * @param name The name of the paramter for which we want the boolean value\n */\n static getUrlParamBoolByName(name) {\n let p = this.getUrlParamByName(name);\n let isFalse = (p === \"\" || /false|0/i.test(p));\n return !isFalse;\n }\n /**\n * Inserts the string s into the string target as the index specified by index\n *\n * @param target The string into which we will insert s\n * @param index The location in target to insert s (zero based)\n * @param s The string to insert into target at position index\n */\n static stringInsert(target, index, s) {\n if (index > 0) {\n return target.substring(0, index) + s + target.substring(index, target.length);\n }\n return s + target;\n }\n /**\n * Adds a value to a date\n *\n * @param date The date to which we will add units, done in local time\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n * @param units The amount to add to date of the given interval\n *\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n */\n static dateAdd(date, interval, units) {\n let ret = new Date(date.toLocaleString()); // don't change original date\n switch (interval.toLowerCase()) {\n case \"year\":\n ret.setFullYear(ret.getFullYear() + units);\n break;\n case \"quarter\":\n ret.setMonth(ret.getMonth() + 3 * units);\n break;\n case \"month\":\n ret.setMonth(ret.getMonth() + units);\n break;\n case \"week\":\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case \"day\":\n ret.setDate(ret.getDate() + units);\n break;\n case \"hour\":\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case \"minute\":\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case \"second\":\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n ret = undefined;\n break;\n }\n return ret;\n }\n /**\n * Loads a stylesheet into the current page\n *\n * @param path The url to the stylesheet\n * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n */\n static loadStylesheet(path, avoidCache) {\n if (avoidCache) {\n path += \"?\" + encodeURIComponent((new Date()).getTime().toString());\n }\n let head = document.getElementsByTagName(\"head\");\n if (head.length > 0) {\n let e = document.createElement(\"link\");\n head[0].appendChild(e);\n e.setAttribute(\"type\", \"text/css\");\n e.setAttribute(\"rel\", \"stylesheet\");\n e.setAttribute(\"href\", path);\n }\n }\n /**\n * Combines an arbitrary set of paths ensuring that the slashes are normalized\n *\n * @param paths 0 to n path parts to combine\n */\n static combinePaths(...paths) {\n return paths\n .filter(path => typeof path !== \"undefined\" && path !== null)\n .map(path => path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"))\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n }\n /**\n * Gets a random string of chars length\n *\n * @param chars The length of the random string to generate\n */\n static getRandomString(chars) {\n let text = new Array(chars);\n let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < chars; i++) {\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text.join(\"\");\n }\n /**\n * Gets a random GUID value\n *\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n */\n /* tslint:disable no-bitwise */\n static getGUID() {\n let d = new Date().getTime();\n let guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n let r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return guid;\n }\n /* tslint:enable */\n /**\n * Determines if a given value is a function\n *\n * @param candidateFunction The thing to test for being a function\n */\n static isFunction(candidateFunction) {\n return typeof candidateFunction === \"function\";\n }\n /**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\n static isArray(array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n return array && typeof array.length === \"number\" && array.constructor === Array;\n }\n /**\n * Determines if a string is null or empty or undefined\n *\n * @param s The string to test\n */\n static stringIsNullOrEmpty(s) {\n return typeof s === \"undefined\" || s === null || s === \"\";\n }\n /**\n * Provides functionality to extend the given object by doing a shallow copy\n *\n * @param target The object to which properties will be copied\n * @param source The source object from which properties will be copied\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\n *\n */\n static extend(target, source, noOverwrite = false) {\n if (source === null || typeof source === \"undefined\") {\n return target;\n }\n // ensure we don't overwrite things we don't want overwritten\n let check = noOverwrite ? (o, i) => !(i in o) : () => true;\n return Object.getOwnPropertyNames(source)\n .filter((v) => check(target, v))\n .reduce((t, v) => {\n t[v] = source[v];\n return t;\n }, target);\n }\n /**\n * Determines if a given url is absolute\n *\n * @param url The url to check to see if it is absolute\n */\n static isUrlAbsolute(url) {\n return /^https?:\\/\\/|^\\/\\//i.test(url);\n }\n /**\n * Attempts to make the supplied relative url absolute based on the _spPageContextInfo object, if available\n *\n * @param url The relative url to make absolute\n */\n static makeUrlAbsolute(url) {\n if (Util.isUrlAbsolute(url)) {\n return url;\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, url);\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, url);\n }\n }\n else {\n return url;\n }\n }\n /**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\n static toAbsoluteUrl(candidateUrl) {\n return new Promise((resolve) => {\n if (Util.isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n if (pnplibconfig_1.RuntimeConfig.baseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.baseUrl, candidateUrl));\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n // operating in classic pages\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n // does window.location exist and have _layouts in it?\n if (typeof global.location !== \"undefined\") {\n let index = global.location.toString().toLowerCase().indexOf(\"/_layouts/\");\n if (index > 0) {\n // we are likely in the workbench in /_layouts/\n return resolve(Util.combinePaths(global.location.toString().substr(0, index), candidateUrl));\n }\n }\n return resolve(candidateUrl);\n });\n }\n}\n__decorate([\n decorators_1.deprecated(\"The Util.makeUrlAbsolute method is deprecated and will be removed from future releases. Use Util.toAbsoluteUrl instead\")\n], Util, \"makeUrlAbsolute\", null);\nexports.Util = Util;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/util.js","\"use strict\";\nconst logging_1 = require(\"./logging\");\nfunction deprecated(message) {\n return function (target, propertyKey, descriptor) {\n let method = descriptor.value;\n descriptor.value = function (...args) {\n logging_1.Logger.log({\n data: {\n descriptor: descriptor,\n propertyKey: propertyKey,\n target: target,\n },\n level: logging_1.LogLevel.Warning,\n message: message,\n });\n return method.apply(this, args);\n };\n };\n}\nexports.deprecated = deprecated;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/decorators.js","\"use strict\";\n/**\n * A set of logging levels\n *\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/**\n * Class used to subscribe ILogListener and log messages throughout an application\n *\n */\nclass Logger {\n static get activeLogLevel() {\n return Logger.instance.activeLogLevel;\n }\n static set activeLogLevel(value) {\n Logger.instance.activeLogLevel = value;\n }\n static get instance() {\n if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n Logger._instance = new LoggerImpl();\n }\n return Logger._instance;\n }\n /**\n * Adds ILogListener instances to the set of subscribed listeners\n *\n * @param listeners One or more listeners to subscribe to this log\n */\n static subscribe(...listeners) {\n listeners.map(listener => Logger.instance.subscribe(listener));\n }\n /**\n * Clears the subscribers collection, returning the collection before modifiction\n */\n static clearSubscribers() {\n return Logger.instance.clearSubscribers();\n }\n /**\n * Gets the current subscriber count\n */\n static get count() {\n return Logger.instance.count;\n }\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param message The message to write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n static write(message, level = LogLevel.Verbose) {\n Logger.instance.log({ level: level, message: message });\n }\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param json The json object to stringify and write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n static writeJSON(json, level = LogLevel.Verbose) {\n Logger.instance.log({ level: level, message: JSON.stringify(json) });\n }\n /**\n * Logs the supplied entry to the subscribed listeners\n *\n * @param entry The message to log\n */\n static log(entry) {\n Logger.instance.log(entry);\n }\n /**\n * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n *\n * @param name The name of this profile boundary\n * @param f The function to execute and track within this performance boundary\n */\n static measure(name, f) {\n return Logger.instance.measure(name, f);\n }\n}\nexports.Logger = Logger;\nclass LoggerImpl {\n constructor(activeLogLevel = LogLevel.Warning, subscribers = []) {\n this.activeLogLevel = activeLogLevel;\n this.subscribers = subscribers;\n }\n subscribe(listener) {\n this.subscribers.push(listener);\n }\n clearSubscribers() {\n let s = this.subscribers.slice(0);\n this.subscribers.length = 0;\n return s;\n }\n get count() {\n return this.subscribers.length;\n }\n write(message, level = LogLevel.Verbose) {\n this.log({ level: level, message: message });\n }\n log(entry) {\n if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n return;\n }\n this.subscribers.map(subscriber => subscriber.log(entry));\n }\n measure(name, f) {\n console.profile(name);\n try {\n return f();\n }\n finally {\n console.profileEnd();\n }\n }\n}\n/**\n * Implementation of ILogListener which logs to the browser console\n *\n */\nclass ConsoleListener {\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n log(entry) {\n let msg = this.format(entry);\n switch (entry.level) {\n case LogLevel.Verbose:\n case LogLevel.Info:\n console.log(msg);\n break;\n case LogLevel.Warning:\n console.warn(msg);\n break;\n case LogLevel.Error:\n console.error(msg);\n break;\n }\n }\n /**\n * Formats the message\n *\n * @param entry The information to format into a string\n */\n format(entry) {\n return \"Message: \" + entry.message + \" Data: \" + JSON.stringify(entry.data);\n }\n}\nexports.ConsoleListener = ConsoleListener;\n/**\n * Implementation of ILogListener which logs to the supplied function\n *\n */\nclass FunctionListener {\n /**\n * Creates a new instance of the FunctionListener class\n *\n * @constructor\n * @param method The method to which any logging data will be passed\n */\n constructor(method) {\n this.method = method;\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n log(entry) {\n this.method(entry);\n }\n}\nexports.FunctionListener = FunctionListener;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/logging.js","\"use strict\";\nconst fetchclient_1 = require(\"../net/fetchclient\");\nclass RuntimeConfigImpl {\n constructor() {\n // these are our default values for the library\n this._headers = null;\n this._defaultCachingStore = \"session\";\n this._defaultCachingTimeoutSeconds = 30;\n this._globalCacheDisable = false;\n this._fetchClientFactory = () => new fetchclient_1.FetchClient();\n this._baseUrl = null;\n this._spfxContext = null;\n }\n set(config) {\n if (config.hasOwnProperty(\"headers\")) {\n this._headers = config.headers;\n }\n if (config.hasOwnProperty(\"globalCacheDisable\")) {\n this._globalCacheDisable = config.globalCacheDisable;\n }\n if (config.hasOwnProperty(\"defaultCachingStore\")) {\n this._defaultCachingStore = config.defaultCachingStore;\n }\n if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n }\n if (config.hasOwnProperty(\"fetchClientFactory\")) {\n this._fetchClientFactory = config.fetchClientFactory;\n }\n if (config.hasOwnProperty(\"baseUrl\")) {\n this._baseUrl = config.baseUrl;\n }\n if (config.hasOwnProperty(\"spFXContext\")) {\n this._spfxContext = config.spfxContext;\n }\n }\n get headers() {\n return this._headers;\n }\n get defaultCachingStore() {\n return this._defaultCachingStore;\n }\n get defaultCachingTimeoutSeconds() {\n return this._defaultCachingTimeoutSeconds;\n }\n get globalCacheDisable() {\n return this._globalCacheDisable;\n }\n get fetchClientFactory() {\n return this._fetchClientFactory;\n }\n get baseUrl() {\n if (this._baseUrl !== null) {\n return this._baseUrl;\n }\n else if (this._spfxContext !== null) {\n return this._spfxContext.pageContext.web.absoluteUrl;\n }\n return null;\n }\n}\nexports.RuntimeConfigImpl = RuntimeConfigImpl;\nlet _runtimeConfig = new RuntimeConfigImpl();\nexports.RuntimeConfig = _runtimeConfig;\nfunction setRuntimeConfig(config) {\n _runtimeConfig.set(config);\n}\nexports.setRuntimeConfig = setRuntimeConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/pnplibconfig.js","\"use strict\";\n/**\n * Makes requests using the fetch API\n */\nclass FetchClient {\n fetch(url, options) {\n return global.fetch(url, options);\n }\n}\nexports.FetchClient = FetchClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/fetchclient.js","\"use strict\";\nconst util_1 = require(\"./util\");\n/**\n * A wrapper class to provide a consistent interface to browser based storage\n *\n */\nclass PnPClientStorageWrapper {\n /**\n * Creates a new instance of the PnPClientStorageWrapper class\n *\n * @constructor\n */\n constructor(store, defaultTimeoutMinutes) {\n this.store = store;\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? 5 : defaultTimeoutMinutes;\n this.enabled = this.test();\n }\n /**\n * Get a value from storage, or null if that value does not exist\n *\n * @param key The key whose value we want to retrieve\n */\n get(key) {\n if (!this.enabled) {\n return null;\n }\n let o = this.store.getItem(key);\n if (o == null) {\n return null;\n }\n let persistable = JSON.parse(o);\n if (new Date(persistable.expiration) <= new Date()) {\n this.delete(key);\n return null;\n }\n else {\n return persistable.value;\n }\n }\n /**\n * Adds a value to the underlying storage\n *\n * @param key The key to use when storing the provided value\n * @param o The value to store\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n put(key, o, expire) {\n if (this.enabled) {\n this.store.setItem(key, this.createPersistable(o, expire));\n }\n }\n /**\n * Deletes a value from the underlying storage\n *\n * @param key The key of the pair we want to remove from storage\n */\n delete(key) {\n if (this.enabled) {\n this.store.removeItem(key);\n }\n }\n /**\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n *\n * @param key The key to use when storing the provided value\n * @param getter A function which will upon execution provide the desired value\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n getOrPut(key, getter, expire) {\n if (!this.enabled) {\n return getter();\n }\n return new Promise((resolve) => {\n let o = this.get(key);\n if (o == null) {\n getter().then((d) => {\n this.put(key, d, expire);\n resolve(d);\n });\n }\n else {\n resolve(o);\n }\n });\n }\n /**\n * Used to determine if the wrapped storage is available currently\n */\n test() {\n let str = \"test\";\n try {\n this.store.setItem(str, str);\n this.store.removeItem(str);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n /**\n * Creates the persistable to store\n */\n createPersistable(o, expire) {\n if (typeof expire === \"undefined\") {\n expire = util_1.Util.dateAdd(new Date(), \"minute\", this.defaultTimeoutMinutes);\n }\n return JSON.stringify({ expiration: expire, value: o });\n }\n}\nexports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n/**\n * A class that will establish wrappers for both local and session storage\n */\nclass PnPClientStorage {\n /**\n * Creates a new instance of the PnPClientStorage class\n *\n * @constructor\n */\n constructor() {\n this.local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : null;\n this.session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : null;\n }\n}\nexports.PnPClientStorage = PnPClientStorage;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/storage.js","\"use strict\";\nconst collections_1 = require(\"../collections/collections\");\n/**\n * Class used to manage the current application settings\n *\n */\nclass Settings {\n /**\n * Creates a new instance of the settings class\n *\n * @constructor\n */\n constructor() {\n this._settings = new collections_1.Dictionary();\n }\n /**\n * Adds a new single setting, or overwrites a previous setting with the same key\n *\n * @param {string} key The key used to store this setting\n * @param {string} value The setting value to store\n */\n add(key, value) {\n this._settings.add(key, value);\n }\n /**\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n *\n * @param {string} key The key used to store this setting\n * @param {any} value The setting value to store\n */\n addJSON(key, value) {\n this._settings.add(key, JSON.stringify(value));\n }\n /**\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n *\n * @param {TypedHash} hash The set of values to add\n */\n apply(hash) {\n return new Promise((resolve, reject) => {\n try {\n this._settings.merge(hash);\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n }\n /**\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\n *\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\n */\n load(provider) {\n return new Promise((resolve, reject) => {\n provider.getConfiguration().then((value) => {\n this._settings.merge(value);\n resolve();\n }).catch((reason) => {\n reject(reason);\n });\n });\n }\n /**\n * Gets a value from the configuration\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {string} string value from the configuration\n */\n get(key) {\n return this._settings.get(key);\n }\n /**\n * Gets a JSON value, rehydrating the stored string to the original object\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {any} object from the configuration\n */\n getJSON(key) {\n let o = this.get(key);\n if (typeof o === \"undefined\" || o === null) {\n return o;\n }\n return JSON.parse(o);\n }\n}\nexports.Settings = Settings;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/configuration.js","\"use strict\";\n/**\n * Generic dictionary\n */\nclass Dictionary {\n /**\n * Creates a new instance of the Dictionary class\n *\n * @constructor\n */\n constructor(keys = [], values = []) {\n this.keys = keys;\n this.values = values;\n }\n /**\n * Gets a value from the collection using the specified key\n *\n * @param key The key whose value we want to return, returns null if the key does not exist\n */\n get(key) {\n let index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n return this.values[index];\n }\n /**\n * Adds the supplied key and value to the dictionary\n *\n * @param key The key to add\n * @param o The value to add\n */\n add(key, o) {\n let index = this.keys.indexOf(key);\n if (index > -1) {\n this.values[index] = o;\n }\n else {\n this.keys.push(key);\n this.values.push(o);\n }\n }\n /**\n * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n */\n merge(source) {\n if (\"getKeys\" in source) {\n let sourceAsDictionary = source;\n sourceAsDictionary.getKeys().map(key => {\n this.add(key, sourceAsDictionary.get(key));\n });\n }\n else {\n let sourceAsHash = source;\n for (let key in sourceAsHash) {\n if (sourceAsHash.hasOwnProperty(key)) {\n this.add(key, sourceAsHash[key]);\n }\n }\n }\n }\n /**\n * Removes a value from the dictionary\n *\n * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n */\n remove(key) {\n let index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n let val = this.values[index];\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return val;\n }\n /**\n * Returns all the keys currently in the dictionary as an array\n */\n getKeys() {\n return this.keys;\n }\n /**\n * Returns all the values currently in the dictionary as an array\n */\n getValues() {\n return this.values;\n }\n /**\n * Clears the current dictionary\n */\n clear() {\n this.keys = [];\n this.values = [];\n }\n /**\n * Gets a count of the items currently in the dictionary\n */\n count() {\n return this.keys.length;\n }\n}\nexports.Dictionary = Dictionary;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/collections/collections.js","\"use strict\";\nconst search_1 = require(\"./search\");\nconst searchsuggest_1 = require(\"./searchsuggest\");\nconst site_1 = require(\"./site\");\nconst webs_1 = require(\"./webs\");\nconst util_1 = require(\"../utils/util\");\nconst userprofiles_1 = require(\"./userprofiles\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Root of the SharePoint REST module\n */\nclass Rest {\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n searchSuggest(query) {\n let finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new searchsuggest_1.SearchSuggest(\"\").execute(finalQuery);\n }\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n search(query) {\n let finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new search_1.Search(\"\").execute(finalQuery);\n }\n /**\n * Begins a site collection scoped REST request\n *\n */\n get site() {\n return new site_1.Site(\"\");\n }\n /**\n * Begins a web scoped REST request\n *\n */\n get web() {\n return new webs_1.Web(\"\");\n }\n /**\n * Access to user profile methods\n *\n */\n get profiles() {\n return new userprofiles_1.UserProfileQuery(\"\");\n }\n /**\n * Creates a new batch object for use with the Queryable.addToBatch method\n *\n */\n createBatch() {\n return this.web.createBatch();\n }\n /**\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n crossDomainSite(addInWebUrl, hostWebUrl) {\n return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n }\n /**\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n crossDomainWeb(addInWebUrl, hostWebUrl) {\n return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n }\n /**\n * Implements the creation of cross domain REST urls\n *\n * @param factory The constructor of the object to create Site | Web\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n * @param urlPart String part to append to the url \"site\" | \"web\"\n */\n _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart) {\n if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n }\n if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n }\n let url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n let instance = new factory(url, urlPart);\n instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n return instance;\n }\n}\nexports.Rest = Rest;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/rest.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes the search API\n *\n */\nclass Search extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Search class\n *\n * @param baseUrl The url for the search context\n * @param query The SearchQuery object to execute\n */\n constructor(baseUrl, path = \"_api/search/postquery\") {\n super(baseUrl, path);\n }\n /**\n * .......\n * @returns Promise\n */\n execute(query) {\n let formattedBody;\n formattedBody = query;\n if (formattedBody.SelectProperties) {\n formattedBody.SelectProperties = { results: query.SelectProperties };\n }\n if (formattedBody.RefinementFilters) {\n formattedBody.RefinementFilters = { results: query.RefinementFilters };\n }\n if (formattedBody.SortList) {\n formattedBody.SortList = { results: query.SortList };\n }\n if (formattedBody.HithighlightedProperties) {\n formattedBody.HithighlightedProperties = { results: query.HithighlightedProperties };\n }\n if (formattedBody.ReorderingRules) {\n formattedBody.ReorderingRules = { results: query.ReorderingRules };\n }\n if (formattedBody.Properties) {\n formattedBody.Properties = { results: query.Properties };\n }\n let postBody = JSON.stringify({\n request: util_1.Util.extend({\n \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" },\n }, formattedBody),\n });\n return this.post({ body: postBody }).then((data) => new SearchResults(data));\n }\n}\nexports.Search = Search;\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nclass SearchResults {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n constructor(rawResponse) {\n let response = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n this.PrimarySearchResults = this.formatSearchResults(response.PrimaryQueryResult.RelevantResults.Table.Rows);\n this.RawSearchResults = response;\n this.ElapsedTime = response.ElapsedTime;\n this.RowCount = response.PrimaryQueryResult.RelevantResults.RowCount;\n this.TotalRows = response.PrimaryQueryResult.RelevantResults.TotalRows;\n this.TotalRowsIncludingDuplicates = response.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n }\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n formatSearchResults(rawResults) {\n let results = new Array(), tempResults = rawResults.results ? rawResults.results : rawResults;\n for (let i of tempResults) {\n results.push(new SearchResult(i.Cells));\n }\n return results;\n }\n}\nexports.SearchResults = SearchResults;\n/**\n * Describes the SearchResult class\n */\nclass SearchResult {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n constructor(rawItem) {\n let item = rawItem.results ? rawItem.results : rawItem;\n for (let i of item) {\n Object.defineProperty(this, i.Key, {\n configurable: false,\n enumerable: false,\n value: i.Value,\n writable: false,\n });\n }\n }\n}\nexports.SearchResult = SearchResult;\n/**\n * defines the SortDirection enum\n */\nvar SortDirection;\n(function (SortDirection) {\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n/**\n * defines the ReorderingRuleMatchType enum\n */\nvar ReorderingRuleMatchType;\n(function (ReorderingRuleMatchType) {\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n/**\n * Specifies the type value for the property\n */\nvar QueryPropertyValueType;\n(function (QueryPropertyValueType) {\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/search.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst collections_1 = require(\"../collections/collections\");\nconst odata_1 = require(\"./odata\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst queryablerequest_1 = require(\"./queryablerequest\");\n/**\n * Queryable Base Class\n *\n */\nclass Queryable {\n /**\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n *\n * @param pathPart The string to concatonate to the url\n */\n concat(pathPart) {\n this._url += pathPart;\n }\n /**\n * Appends the given string and normalizes \"/\" chars\n *\n * @param pathPart The string to append\n */\n append(pathPart) {\n this._url = util_1.Util.combinePaths(this._url, pathPart);\n }\n /**\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n addBatchDependency() {\n if (this.hasBatch) {\n return this._batch.addBatchDependency();\n }\n return () => null;\n }\n /**\n * Indicates if the current query has a batch associated\n *\n */\n get hasBatch() {\n return this._batch !== null;\n }\n /**\n * Gets the parent url used when creating this instance\n *\n */\n get parentUrl() {\n return this._parentUrl;\n }\n /**\n * Provides access to the query builder for this url\n *\n */\n get query() {\n return this._query;\n }\n /**\n * Creates a new instance of the Queryable class\n *\n * @constructor\n * @param baseUrl A string or Queryable that should form the base part of the url\n *\n */\n constructor(baseUrl, path) {\n this._query = new collections_1.Dictionary();\n this._batch = null;\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n let urlStr = baseUrl;\n if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n this._parentUrl = urlStr;\n this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n let index = urlStr.lastIndexOf(\"/\");\n this._parentUrl = urlStr.slice(0, index);\n path = util_1.Util.combinePaths(urlStr.slice(index), path);\n this._url = util_1.Util.combinePaths(this._parentUrl, path);\n }\n else {\n // .../items(19)\n let index = urlStr.lastIndexOf(\"(\");\n this._parentUrl = urlStr.slice(0, index);\n this._url = util_1.Util.combinePaths(urlStr, path);\n }\n }\n else {\n let q = baseUrl;\n this._parentUrl = q._url;\n let target = q._query.get(\"@target\");\n if (target !== null) {\n this._query.add(\"@target\", target);\n }\n this._url = util_1.Util.combinePaths(this._parentUrl, path);\n }\n }\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n inBatch(batch) {\n if (this._batch !== null) {\n throw new exceptions_1.AlreadyInBatchException();\n }\n this._batch = batch;\n return this;\n }\n /**\n * Enables caching for this request\n *\n * @param options Defines the options used when caching this request\n */\n usingCaching(options) {\n if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n this._useCaching = true;\n this._cachingOptions = options;\n }\n return this;\n }\n /**\n * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n *\n */\n toUrl() {\n return this._url;\n }\n /**\n * Gets the full url with query information\n *\n */\n toUrlAndQuery() {\n let url = this.toUrl();\n if (this._query.count() > 0) {\n url += `?${this._query.getKeys().map(key => `${key}=${this._query.get(key)}`).join(\"&\")}`;\n }\n return url;\n }\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n getParent(factory, baseUrl = this.parentUrl, path) {\n let parent = new factory(baseUrl, path);\n let target = this.query.get(\"@target\");\n if (target !== null) {\n parent.query.add(\"@target\", target);\n }\n return parent;\n }\n /**\n * Executes the currently built request\n *\n * @param parser Allows you to specify a parser to handle the result\n * @param getOptions The options used for this request\n */\n get(parser = new odata_1.ODataDefaultParser(), getOptions = {}) {\n return this.toRequestContext(\"GET\", getOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n getAs(parser = new odata_1.ODataDefaultParser(), getOptions = {}) {\n return this.toRequestContext(\"GET\", getOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n post(postOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"POST\", postOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n postAs(postOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"POST\", postOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n patch(patchOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"PATCH\", patchOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n delete(deleteOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"DELETE\", deleteOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n toRequestContext(verb, options = {}, parser) {\n let dependencyDispose = this.hasBatch ? this.addBatchDependency() : () => { return; };\n return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(url => {\n // build our request context\n let context = {\n batch: this._batch,\n batchDependency: dependencyDispose,\n cachingOptions: this._cachingOptions,\n isBatched: this.hasBatch,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n requestAbsoluteUrl: url,\n requestId: util_1.Util.getGUID(),\n verb: verb,\n };\n return context;\n });\n }\n}\nexports.Queryable = Queryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nclass QueryableCollection extends Queryable {\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n filter(filter) {\n this._query.add(\"$filter\", filter);\n return this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n select(...selects) {\n this._query.add(\"$select\", selects.join(\",\"));\n return this;\n }\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n expand(...expands) {\n this._query.add(\"$expand\", expands.join(\",\"));\n return this;\n }\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n orderBy(orderBy, ascending = true) {\n let keys = this._query.getKeys();\n let query = [];\n let asc = ascending ? \" asc\" : \" desc\";\n for (let i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(`${orderBy}${asc}`);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n }\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n skip(skip) {\n this._query.add(\"$skip\", skip.toString());\n return this;\n }\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n top(top) {\n this._query.add(\"$top\", top.toString());\n return this;\n }\n}\nexports.QueryableCollection = QueryableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nclass QueryableInstance extends Queryable {\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n select(...selects) {\n this._query.add(\"$select\", selects.join(\",\"));\n return this;\n }\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n expand(...expands) {\n this._query.add(\"$expand\", expands.join(\",\"));\n return this;\n }\n}\nexports.QueryableInstance = QueryableInstance;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryable.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst logging_1 = require(\"../utils/logging\");\nconst httpclient_1 = require(\"../net/httpclient\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst exceptions_2 = require(\"../utils/exceptions\");\nfunction extractOdataId(candidate) {\n if (candidate.hasOwnProperty(\"odata.id\")) {\n return candidate[\"odata.id\"];\n }\n else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n return candidate.__metadata.id;\n }\n else {\n throw new exceptions_1.ODataIdException(candidate);\n }\n}\nexports.extractOdataId = extractOdataId;\nclass ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\n resolve({});\n }\n else {\n r.json().then(json => resolve(this.parseODataJSON(json)));\n }\n }\n });\n }\n handleError(r, reject) {\n if (!r.ok) {\n r.json().then(json => {\n reject(new exceptions_2.ProcessHttpClientResponseException(r.status, r.statusText, json));\n });\n }\n return r.ok;\n }\n parseODataJSON(json) {\n let result = json;\n if (json.hasOwnProperty(\"d\")) {\n if (json.d.hasOwnProperty(\"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (json.hasOwnProperty(\"value\")) {\n result = json.value;\n }\n return result;\n }\n}\nexports.ODataParserBase = ODataParserBase;\nclass ODataDefaultParser extends ODataParserBase {\n}\nexports.ODataDefaultParser = ODataDefaultParser;\nclass ODataRawParserImpl {\n parse(r) {\n return r.json();\n }\n}\nexports.ODataRawParserImpl = ODataRawParserImpl;\nclass ODataValueParserImpl extends ODataParserBase {\n parse(r) {\n return super.parse(r).then(d => d);\n }\n}\nclass ODataEntityParserImpl extends ODataParserBase {\n constructor(factory) {\n super();\n this.factory = factory;\n }\n parse(r) {\n return super.parse(r).then(d => {\n let o = new this.factory(getEntityUrl(d), null);\n return util_1.Util.extend(o, d);\n });\n }\n}\nclass ODataEntityArrayParserImpl extends ODataParserBase {\n constructor(factory) {\n super();\n this.factory = factory;\n }\n parse(r) {\n return super.parse(r).then((d) => {\n return d.map(v => {\n let o = new this.factory(getEntityUrl(v), null);\n return util_1.Util.extend(o, v);\n });\n });\n }\n}\nfunction getEntityUrl(entity) {\n if (entity.hasOwnProperty(\"odata.editLink\")) {\n // we are dealign with minimal metadata (default)\n return util_1.Util.combinePaths(\"_api\", entity[\"odata.editLink\"]);\n }\n else if (entity.hasOwnProperty(\"__metadata\")) {\n // we are dealing with verbose, which has an absolute uri\n return entity.__metadata.uri;\n }\n else {\n // we are likely dealing with nometadata, so don't error but we won't be able to\n // chain off these objects\n logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n return \"\";\n }\n}\nexports.ODataRaw = new ODataRawParserImpl();\nfunction ODataValue() {\n return new ODataValueParserImpl();\n}\nexports.ODataValue = ODataValue;\nfunction ODataEntity(factory) {\n return new ODataEntityParserImpl(factory);\n}\nexports.ODataEntity = ODataEntity;\nfunction ODataEntityArray(factory) {\n return new ODataEntityArrayParserImpl(factory);\n}\nexports.ODataEntityArray = ODataEntityArray;\n/**\n * Manages a batch of OData operations\n */\nclass ODataBatch {\n constructor(baseUrl, _batchId = util_1.Util.getGUID()) {\n this.baseUrl = baseUrl;\n this._batchId = _batchId;\n this._requests = [];\n this._batchDependencies = Promise.resolve();\n }\n /**\n * Adds a request to a batch (not designed for public use)\n *\n * @param url The full url of the request\n * @param method The http method GET, POST, etc\n * @param options Any options to include in the request\n * @param parser The parser that will hadle the results of the request\n */\n add(url, method, options, parser) {\n let info = {\n method: method.toUpperCase(),\n options: options,\n parser: parser,\n reject: null,\n resolve: null,\n url: url,\n };\n let p = new Promise((resolve, reject) => {\n info.resolve = resolve;\n info.reject = reject;\n });\n this._requests.push(info);\n return p;\n }\n /**\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n * MUST be cleared using the returned resolve delegate to allow batches to run\n */\n addBatchDependency() {\n let resolver;\n let promise = new Promise((resolve) => {\n resolver = resolve;\n });\n this._batchDependencies = this._batchDependencies.then(() => promise);\n return resolver;\n }\n /**\n * Execute the current batch and resolve the associated promises\n *\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\n */\n execute() {\n return this._batchDependencies.then(() => this.executeImpl());\n }\n executeImpl() {\n logging_1.Logger.write(`Executing batch with ${this._requests.length} requests.`, logging_1.LogLevel.Info);\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this._requests.length < 1) {\n logging_1.Logger.write(`Resolving empty batch.`, logging_1.LogLevel.Info);\n return Promise.resolve();\n }\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n let client = new httpclient_1.HttpClient();\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return util_1.Util.toAbsoluteUrl(this.baseUrl).then(absoluteRequestUrl => {\n // build all the requests, send them, pipe results in order to parsers\n let batchBody = [];\n let currentChangeSetId = \"\";\n this._requests.map((reqInfo) => {\n if (reqInfo.method === \"GET\") {\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n batchBody.push(`--batch_${this._batchId}\\n`);\n }\n else {\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = util_1.Util.getGUID();\n batchBody.push(`--batch_${this._batchId}\\n`);\n batchBody.push(`Content-Type: multipart/mixed; boundary=\"changeset_${currentChangeSetId}\"\\n\\n`);\n }\n batchBody.push(`--changeset_${currentChangeSetId}\\n`);\n }\n // common batch part prefix\n batchBody.push(`Content-Type: application/http\\n`);\n batchBody.push(`Content-Transfer-Encoding: binary\\n\\n`);\n let headers = {\n \"Accept\": \"application/json;\",\n };\n // this is the url of the individual request within the batch\n let url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n logging_1.Logger.write(`Adding request ${reqInfo.method} ${url} to batch.`, logging_1.LogLevel.Verbose);\n if (reqInfo.method !== \"GET\") {\n let method = reqInfo.method;\n if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n method = reqInfo.options.headers[\"X-HTTP-Method\"];\n delete reqInfo.options.headers[\"X-HTTP-Method\"];\n }\n batchBody.push(`${method} ${url} HTTP/1.1\\n`);\n headers = util_1.Util.extend(headers, { \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\" });\n }\n else {\n batchBody.push(`${reqInfo.method} ${url} HTTP/1.1\\n`);\n }\n if (typeof pnplibconfig_1.RuntimeConfig.headers !== \"undefined\") {\n headers = util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.headers);\n }\n if (reqInfo.options && reqInfo.options.headers) {\n headers = util_1.Util.extend(headers, reqInfo.options.headers);\n }\n for (let name in headers) {\n if (headers.hasOwnProperty(name)) {\n batchBody.push(`${name}: ${headers[name]}\\n`);\n }\n }\n batchBody.push(\"\\n\");\n if (reqInfo.options.body) {\n batchBody.push(`${reqInfo.options.body}\\n\\n`);\n }\n });\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n batchBody.push(`--batch_${this._batchId}--\\n`);\n let batchHeaders = {\n \"Content-Type\": `multipart/mixed; boundary=batch_${this._batchId}`,\n };\n let batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": batchHeaders,\n };\n logging_1.Logger.write(\"Sending batch request.\", logging_1.LogLevel.Info);\n return client.post(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(r => r.text())\n .then(this._parseResponse)\n .then((responses) => {\n if (responses.length !== this._requests.length) {\n throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n logging_1.Logger.write(\"Resolving batched requests.\", logging_1.LogLevel.Info);\n return responses.reduce((chain, response, index) => {\n let request = this._requests[index];\n logging_1.Logger.write(`Resolving request ${request.method} ${request.url}.`, logging_1.LogLevel.Verbose);\n return chain.then(_ => request.parser.parse(response).then(request.resolve).catch(request.reject));\n }, Promise.resolve());\n });\n });\n }\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n _parseResponse(body) {\n return new Promise((resolve, reject) => {\n let responses = [];\n let header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n let statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n let lines = body.split(\"\\n\");\n let state = \"batch\";\n let status;\n let statusText;\n for (let i = 0; i < lines.length; ++i) {\n let line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n }\n else {\n if (line.trim() !== \"\") {\n throw new exceptions_1.BatchParseException(`Invalid response, line ${i}`);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n let parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw new exceptions_1.BatchParseException(`Invalid status, line ${i}`);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n }\n}\nexports.ODataBatch = ODataBatch;\nclass TextFileParser {\n parse(r) {\n return r.text();\n }\n}\nexports.TextFileParser = TextFileParser;\nclass BlobFileParser {\n parse(r) {\n return r.blob();\n }\n}\nexports.BlobFileParser = BlobFileParser;\nclass JSONFileParser {\n parse(r) {\n return r.json();\n }\n}\nexports.JSONFileParser = JSONFileParser;\nclass BufferFileParser {\n parse(r) {\n if (util_1.Util.isFunction(r.arrayBuffer)) {\n return r.arrayBuffer();\n }\n return r.buffer();\n }\n}\nexports.BufferFileParser = BufferFileParser;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/odata.js","\"use strict\";\nconst digestcache_1 = require(\"./digestcache\");\nconst util_1 = require(\"../utils/util\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nclass HttpClient {\n constructor() {\n this._impl = pnplibconfig_1.RuntimeConfig.fetchClientFactory();\n this._digestCache = new digestcache_1.DigestCache(this);\n }\n fetch(url, options = {}) {\n let opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n let headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n this.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.headers);\n // second we add the local options so we can overwrite the globals\n this.mergeHeaders(headers, options.headers);\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:2.0.1\");\n }\n opts = util_1.Util.extend(opts, { headers: headers });\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n if (!headers.has(\"X-RequestDigest\")) {\n let index = url.indexOf(\"_api/\");\n if (index < 0) {\n throw new exceptions_1.APIUrlException();\n }\n let webUrl = url.substr(0, index);\n return this._digestCache.getDigest(webUrl)\n .then((digest) => {\n headers.append(\"X-RequestDigest\", digest);\n return this.fetchRaw(url, opts);\n });\n }\n }\n return this.fetchRaw(url, opts);\n }\n fetchRaw(url, options = {}) {\n // here we need to normalize the headers\n let rawHeaders = new Headers();\n this.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n let retry = (ctx) => {\n this._impl.fetch(url, options).then((response) => ctx.resolve(response)).catch((response) => {\n // grab our current delay\n let delay = ctx.delay;\n // Check if request was throttled - http status code 429\n // Check is request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(this, retry, ctx), delay);\n });\n };\n return new Promise((resolve, reject) => {\n let retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(this, retryContext);\n });\n }\n get(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n }\n post(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n }\n patch(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n }\n delete(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n }\n mergeHeaders(target, source) {\n if (typeof source !== \"undefined\" && source !== null) {\n let temp = new Request(\"\", { headers: source });\n temp.headers.forEach((value, name) => {\n target.append(name, value);\n });\n }\n }\n}\nexports.HttpClient = HttpClient;\n;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/httpclient.js","\"use strict\";\nconst collections_1 = require(\"../collections/collections\");\nconst util_1 = require(\"../utils/util\");\nconst odata_1 = require(\"../sharepoint/odata\");\nclass CachedDigest {\n}\nexports.CachedDigest = CachedDigest;\nclass DigestCache {\n constructor(_httpClient, _digests = new collections_1.Dictionary()) {\n this._httpClient = _httpClient;\n this._digests = _digests;\n }\n getDigest(webUrl) {\n let cachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== null) {\n let now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n let url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-type\": \"application/json;odata=verbose;charset=utf-8\",\n },\n method: \"POST\",\n }).then((response) => {\n let parser = new odata_1.ODataDefaultParser();\n return parser.parse(response).then((d) => d.GetContextWebInformation);\n }).then((data) => {\n let newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n let seconds = data.FormDigestTimeoutSeconds;\n let expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n this._digests.add(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n }\n clear() {\n this._digests.clear();\n }\n}\nexports.DigestCache = DigestCache;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/digestcache.js","\"use strict\";\nconst logging_1 = require(\"../utils/logging\");\nfunction defaultLog(error) {\n logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: `[${error.name}]::${error.message}` });\n}\n/**\n * Represents an exception with an HttpClient request\n *\n */\nclass ProcessHttpClientResponseException extends Error {\n constructor(status, statusText, data) {\n super(`Error making HttpClient request in queryable: [${status}] ${statusText}`);\n this.status = status;\n this.statusText = statusText;\n this.data = data;\n this.name = \"ProcessHttpClientResponseException\";\n logging_1.Logger.log({ data: this.data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\nclass NoCacheAvailableException extends Error {\n constructor(msg = \"Cannot create a caching configuration provider since cache is not available.\") {\n super(msg);\n this.name = \"NoCacheAvailableException\";\n defaultLog(this);\n }\n}\nexports.NoCacheAvailableException = NoCacheAvailableException;\nclass APIUrlException extends Error {\n constructor(msg = \"Unable to determine API url.\") {\n super(msg);\n this.name = \"APIUrlException\";\n defaultLog(this);\n }\n}\nexports.APIUrlException = APIUrlException;\nclass AuthUrlException extends Error {\n constructor(data, msg = \"Auth URL Endpoint could not be determined from data. Data logged.\") {\n super(msg);\n this.name = \"APIUrlException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.AuthUrlException = AuthUrlException;\nclass NodeFetchClientUnsupportedException extends Error {\n constructor(msg = \"Using NodeFetchClient in the browser is not supported.\") {\n super(msg);\n this.name = \"NodeFetchClientUnsupportedException\";\n defaultLog(this);\n }\n}\nexports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\nclass SPRequestExecutorUndefinedException extends Error {\n constructor() {\n let msg = [\n \"SP.RequestExecutor is undefined. \",\n \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\",\n ].join(\" \");\n super(msg);\n this.name = \"SPRequestExecutorUndefinedException\";\n defaultLog(this);\n }\n}\nexports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\nclass MaxCommentLengthException extends Error {\n constructor(msg = \"The maximum comment length is 1023 characters.\") {\n super(msg);\n this.name = \"MaxCommentLengthException\";\n defaultLog(this);\n }\n}\nexports.MaxCommentLengthException = MaxCommentLengthException;\nclass NotSupportedInBatchException extends Error {\n constructor(operation = \"This operation\") {\n super(`${operation} is not supported as part of a batch.`);\n this.name = \"NotSupportedInBatchException\";\n defaultLog(this);\n }\n}\nexports.NotSupportedInBatchException = NotSupportedInBatchException;\nclass ODataIdException extends Error {\n constructor(data, msg = \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\") {\n super(msg);\n this.name = \"ODataIdException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.ODataIdException = ODataIdException;\nclass BatchParseException extends Error {\n constructor(msg) {\n super(msg);\n this.name = \"BatchParseException\";\n defaultLog(this);\n }\n}\nexports.BatchParseException = BatchParseException;\nclass AlreadyInBatchException extends Error {\n constructor(msg = \"This query is already part of a batch.\") {\n super(msg);\n this.name = \"AlreadyInBatchException\";\n defaultLog(this);\n }\n}\nexports.AlreadyInBatchException = AlreadyInBatchException;\nclass FunctionExpectedException extends Error {\n constructor(msg = \"This query is already part of a batch.\") {\n super(msg);\n this.name = \"FunctionExpectedException\";\n defaultLog(this);\n }\n}\nexports.FunctionExpectedException = FunctionExpectedException;\nclass UrlException extends Error {\n constructor(msg) {\n super(msg);\n this.name = \"UrlException\";\n defaultLog(this);\n }\n}\nexports.UrlException = UrlException;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/exceptions.js","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nconst caching_1 = require(\"./caching\");\nconst httpclient_1 = require(\"../net/httpclient\");\nconst logging_1 = require(\"../utils/logging\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Processes a given context through the request pipeline\n *\n * @param context The request context we are processing\n */\nfunction pipe(context) {\n // this is the beginning of the extensible pipeline in future versions\n let pipeline = [\n PipelineMethods.logStart,\n PipelineMethods.caching,\n PipelineMethods.send,\n PipelineMethods.logEnd,\n ];\n return pipeline.reduce((chain, next) => chain.then(c => next(c)), Promise.resolve(context))\n .then(ctx => PipelineMethods.returnResult(ctx))\n .catch((e) => {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: `Error in request pipeline: ${e.message}`,\n });\n throw e;\n });\n}\nexports.pipe = pipe;\n/**\n * decorator factory applied to methods in the pipeline to control behavior\n */\nfunction requestPipelineMethod(alwaysRun = false) {\n return function (target, propertyKey, descriptor) {\n let method = descriptor.value;\n descriptor.value = function (...args) {\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\n if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n logging_1.Logger.write(`[${args[0].requestId}] (${(new Date()).getTime()}) Skipping request pipeline method ${propertyKey}, existing result in pipeline.`, logging_1.LogLevel.Verbose);\n return Promise.resolve(args[0]);\n }\n // apply the tagged method\n logging_1.Logger.write(`[${args[0].requestId}] (${(new Date()).getTime()}) Calling request pipeline method ${propertyKey}.`, logging_1.LogLevel.Verbose);\n return method.apply(target, args);\n };\n };\n}\n/**\n * Contains the methods used within the request pipeline\n */\nclass PipelineMethods {\n /**\n * Logs the start of the request\n */\n static logStart(context) {\n return new Promise(resolve => {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Beginning ${context.verb} request to ${context.requestAbsoluteUrl}`,\n });\n resolve(context);\n });\n }\n /**\n * Handles caching of the request\n */\n static caching(context) {\n return new Promise(resolve => {\n // handle caching, if applicable\n if (context.verb === \"GET\" && context.isCached) {\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Caching is enabled for request, checking cache...`, logging_1.LogLevel.Info);\n let cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n if (typeof context.cachingOptions !== \"undefined\") {\n cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n }\n // we may not have a valid store, i.e. on node\n if (cacheOptions.store !== null) {\n // check if we have the data in cache and if so resolve the promise and return\n let data = cacheOptions.store.get(cacheOptions.key);\n if (data !== null) {\n // ensure we clear any help batch dependency we are resolving from the cache\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Value returned from cache.`,\n });\n context.batchDependency();\n return PipelineMethods.setResult(context, data).then(ctx => resolve(ctx));\n }\n }\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Value not found in cache.`, logging_1.LogLevel.Info);\n // if we don't then wrap the supplied parser in the caching parser wrapper\n // and send things on their way\n context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n }\n return resolve(context);\n });\n }\n /**\n * Sends the request\n */\n static send(context) {\n return new Promise((resolve, reject) => {\n // send or batch the request\n if (context.isBatched) {\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n let p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n context.batchDependency();\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Batching request.`, logging_1.LogLevel.Info);\n resolve(p.then(result => PipelineMethods.setResult(context, result)));\n }\n else {\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Sending request.`, logging_1.LogLevel.Info);\n // we are not part of a batch, so proceed as normal\n let client = new httpclient_1.HttpClient();\n let opts = util_1.Util.extend(context.options, { method: context.verb });\n client.fetch(context.requestAbsoluteUrl, opts)\n .then(response => context.parser.parse(response))\n .then(result => PipelineMethods.setResult(context, result))\n .then(ctx => resolve(ctx))\n .catch(e => reject(e));\n }\n });\n }\n /**\n * Logs the end of the request\n */\n static logEnd(context) {\n return new Promise(resolve => {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Completing ${context.verb} request to ${context.requestAbsoluteUrl}`,\n });\n resolve(context);\n });\n }\n /**\n * At the end of the pipeline resolves the request's result\n */\n static returnResult(context) {\n logging_1.Logger.log({\n data: context.result,\n level: logging_1.LogLevel.Verbose,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Returning, see data property for value.`,\n });\n return Promise.resolve(context.result);\n }\n /**\n * Sets the result on the context\n */\n static setResult(context, value) {\n return new Promise((resolve) => {\n context.result = value;\n context.hasResult = true;\n resolve(context);\n });\n }\n}\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"logStart\", null);\n__decorate([\n requestPipelineMethod()\n], PipelineMethods, \"caching\", null);\n__decorate([\n requestPipelineMethod()\n], PipelineMethods, \"send\", null);\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"logEnd\", null);\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"returnResult\", null);\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryablerequest.js","\"use strict\";\nconst storage_1 = require(\"../utils/storage\");\nconst util_1 = require(\"../utils/util\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nclass CachingOptions {\n constructor(key) {\n this.key = key;\n this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n }\n get store() {\n if (this.storeName === \"local\") {\n return CachingOptions.storage.local;\n }\n else {\n return CachingOptions.storage.session;\n }\n }\n}\nCachingOptions.storage = new storage_1.PnPClientStorage();\nexports.CachingOptions = CachingOptions;\nclass CachingParserWrapper {\n constructor(_parser, _cacheOptions) {\n this._parser = _parser;\n this._cacheOptions = _cacheOptions;\n }\n parse(response) {\n // add this to the cache based on the options\n return this._parser.parse(response).then(data => {\n if (this._cacheOptions.store !== null) {\n this._cacheOptions.store.put(this._cacheOptions.key, data, this._cacheOptions.expiration);\n }\n return data;\n });\n }\n}\nexports.CachingParserWrapper = CachingParserWrapper;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/caching.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nclass SearchSuggest extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"_api/search/suggest\") {\n super(baseUrl, path);\n }\n execute(query) {\n this.mapQueryToQueryString(query);\n return this.get().then(response => new SearchSuggestResult(response));\n }\n mapQueryToQueryString(query) {\n this.query.add(\"querytext\", `'${query.querytext}'`);\n if (query.hasOwnProperty(\"count\")) {\n this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n }\n if (query.hasOwnProperty(\"personalCount\")) {\n this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n }\n if (query.hasOwnProperty(\"preQuery\")) {\n this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n }\n if (query.hasOwnProperty(\"hitHighlighting\")) {\n this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n }\n if (query.hasOwnProperty(\"capitalize\")) {\n this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n }\n if (query.hasOwnProperty(\"culture\")) {\n this.query.add(\"culture\", query.culture.toString());\n }\n if (query.hasOwnProperty(\"stemming\")) {\n this.query.add(\"enablestemming\", query.stemming.toString());\n }\n if (query.hasOwnProperty(\"includePeople\")) {\n this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n }\n if (query.hasOwnProperty(\"queryRules\")) {\n this.query.add(\"enablequeryrules\", query.queryRules.toString());\n }\n if (query.hasOwnProperty(\"prefixMatch\")) {\n this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n }\n }\n}\nexports.SearchSuggest = SearchSuggest;\nclass SearchSuggestResult {\n constructor(json) {\n if (json.hasOwnProperty(\"suggest\")) {\n // verbose\n this.PeopleNames = json.suggest.PeopleNames.results;\n this.PersonalResults = json.suggest.PersonalResults.results;\n this.Queries = json.suggest.Queries.results;\n }\n else {\n this.PeopleNames = json.PeopleNames;\n this.PersonalResults = json.PersonalResults;\n this.Queries = json.Queries;\n }\n }\n}\nexports.SearchSuggestResult = SearchSuggestResult;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/searchsuggest.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst webs_1 = require(\"./webs\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst features_1 = require(\"./features\");\n/**\n * Describes a site collection\n *\n */\nclass Site extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"_api/site\") {\n super(baseUrl, path);\n }\n /**\n * Gets the root web of the site collection\n *\n */\n get rootWeb() {\n return new webs_1.Web(this, \"rootweb\");\n }\n /**\n * Gets the active features for this site\n *\n */\n get features() {\n return new features_1.Features(this);\n }\n /**\n * Get all custom actions on a site collection\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the context information for the site.\n */\n getContextInfo() {\n let q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.post().then(data => {\n if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n let info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n getDocumentLibraries(absoluteWebUrl) {\n let q = new queryable_1.Queryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(data => {\n if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the site URL from a page URL.\n *\n * @param absolutePageUrl The absolute url of the page\n */\n getWebUrlFromPageUrl(absolutePageUrl) {\n let q = new queryable_1.Queryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n return q.get().then(data => {\n if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Creates a new batch for requests within the context of context this site\n *\n */\n createBatch() {\n return new odata_1.ODataBatch(this.parentUrl);\n }\n}\nexports.Site = Site;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/site.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst lists_1 = require(\"./lists\");\nconst fields_1 = require(\"./fields\");\nconst navigation_1 = require(\"./navigation\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst folders_1 = require(\"./folders\");\nconst roles_1 = require(\"./roles\");\nconst files_1 = require(\"./files\");\nconst util_1 = require(\"../utils/util\");\nconst lists_2 = require(\"./lists\");\nconst siteusers_1 = require(\"./siteusers\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst features_1 = require(\"./features\");\nclass Webs extends queryable_1.QueryableCollection {\n constructor(baseUrl, webPath = \"webs\") {\n super(baseUrl, webPath);\n }\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The web web's description\n * @param template The web's template\n * @param language The language code to use for this web\n * @param inheritPermissions If true permissions will be inherited from the partent web\n * @param additionalSettings Will be passed as part of the web creation body\n */\n add(title, url, description = \"\", template = \"STS\", language = 1033, inheritPermissions = true, additionalSettings = {}) {\n let props = util_1.Util.extend({\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n }, additionalSettings);\n let postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n let q = new Webs(this, \"add\");\n return q.post({ body: postBody }).then((data) => {\n return {\n data: data,\n web: new Web(odata_1.extractOdataId(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n }\n}\nexports.Webs = Webs;\n/**\n * Describes a web\n *\n */\nclass Web extends queryablesecurable_1.QueryableSecurable {\n constructor(baseUrl, path = \"_api/web\") {\n super(baseUrl, path);\n }\n get webs() {\n return new Webs(this);\n }\n /**\n * Get the content types available in this web\n *\n */\n get contentTypes() {\n return new contenttypes_1.ContentTypes(this);\n }\n /**\n * Get the lists in this web\n *\n */\n get lists() {\n return new lists_1.Lists(this);\n }\n /**\n * Gets the fields in this web\n *\n */\n get fields() {\n return new fields_1.Fields(this);\n }\n /**\n * Gets the active features for this web\n *\n */\n get features() {\n return new features_1.Features(this);\n }\n /**\n * Gets the available fields in this web\n *\n */\n get availablefields() {\n return new fields_1.Fields(this, \"availablefields\");\n }\n /**\n * Get the navigation options in this web\n *\n */\n get navigation() {\n return new navigation_1.Navigation(this);\n }\n /**\n * Gets the site users\n *\n */\n get siteUsers() {\n return new siteusers_1.SiteUsers(this);\n }\n /**\n * Gets the site groups\n *\n */\n get siteGroups() {\n return new sitegroups_1.SiteGroups(this);\n }\n /**\n * Gets the current user\n */\n get currentUser() {\n return new siteusers_1.CurrentUser(this);\n }\n /**\n * Get the folders in this web\n *\n */\n get folders() {\n return new folders_1.Folders(this);\n }\n /**\n * Get all custom actions on a site\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the collection of RoleDefinition resources.\n *\n */\n get roleDefinitions() {\n return new roles_1.RoleDefinitions(this);\n }\n /**\n * Creates a new batch for requests within the context of context this web\n *\n */\n createBatch() {\n return new odata_1.ODataBatch(this.parentUrl);\n }\n /**\n * Get a folder by server relative url\n *\n * @param folderRelativeUrl the server relative path to the folder (including /sites/ if applicable)\n */\n getFolderByServerRelativeUrl(folderRelativeUrl) {\n return new folders_1.Folder(this, `getFolderByServerRelativeUrl('${folderRelativeUrl}')`);\n }\n /**\n * Get a file by server relative url\n *\n * @param fileRelativeUrl the server relative path to the file (including /sites/ if applicable)\n */\n getFileByServerRelativeUrl(fileRelativeUrl) {\n return new files_1.File(this, `getFileByServerRelativeUrl('${fileRelativeUrl}')`);\n }\n /**\n * Get a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl the server relative path to the list's root folder (including /sites/ if applicable)\n */\n getList(listRelativeUrl) {\n return new lists_2.List(this, `getList('${listRelativeUrl}')`);\n }\n /**\n * Updates this web intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n web: this,\n };\n });\n }\n /**\n * Delete this web\n *\n */\n delete() {\n return super.delete();\n }\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site.\n *\n * @param colorPaletteUrl Server-relative URL of the color palette file.\n * @param fontSchemeUrl Server-relative URL of the font scheme.\n * @param backgroundImageUrl Server-relative URL of the background image.\n * @param shareGenerated true to store the generated theme files in the root site, or false to store them in this site.\n */\n applyTheme(colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n let postBody = JSON.stringify({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n let q = new Web(this, \"applytheme\");\n return q.post({ body: postBody });\n }\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it.\n *\n * @param template Name of the site definition or the name of the site template\n */\n applyWebTemplate(template) {\n let q = new Web(this, \"applywebtemplate\");\n q.concat(`(@t)`);\n q.query.add(\"@t\", template);\n return q.post();\n }\n /**\n * Returns whether the current user has the given set of permissions.\n *\n * @param perms The high and low permission range.\n */\n doesUserHavePermissions(perms) {\n let q = new Web(this, \"doesuserhavepermissions\");\n q.concat(`(@p)`);\n q.query.add(\"@p\", JSON.stringify(perms));\n return q.get();\n }\n /**\n * Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n ensureUser(loginName) {\n // TODO:: this should resolve to a User\n let postBody = JSON.stringify({\n logonName: loginName,\n });\n let q = new Web(this, \"ensureuser\");\n return q.post({ body: postBody });\n }\n /**\n * Returns a collection of site templates available for the site.\n *\n * @param language The LCID of the site templates to get.\n * @param true to include language-neutral site templates; otherwise false\n */\n availableWebTemplates(language = 1033, includeCrossLanugage = true) {\n return new queryable_1.QueryableCollection(this, `getavailablewebtemplates(lcid=${language}, doincludecrosslanguage=${includeCrossLanugage})`);\n }\n /**\n * Returns the list gallery on the site.\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n getCatalog(type) {\n let q = new Web(this, `getcatalog(${type})`);\n q.select(\"Id\");\n return q.get().then((data) => {\n return new lists_2.List(odata_1.extractOdataId(data));\n });\n }\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n getChanges(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n // don't change \"this\" instance, make a new one\n let q = new Web(this, \"getchanges\");\n return q.post({ body: postBody });\n }\n /**\n * Gets the custom list templates for the site.\n *\n */\n get customListTemplate() {\n return new queryable_1.QueryableCollection(this, \"getcustomlisttemplates\");\n }\n /**\n * Returns the user corresponding to the specified member identifier for the current site.\n *\n * @param id The ID of the user.\n */\n getUserById(id) {\n return new siteusers_1.SiteUser(this, `getUserById(${id})`);\n }\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file.\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string.\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1.\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n mapToIcon(filename, size = 0, progId = \"\") {\n let q = new Web(this, `maptoicon(filename='${filename}', progid='${progId}', size=${size})`);\n return q.get();\n }\n}\nexports.Web = Web;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/webs.js","\"use strict\";\nconst roles_1 = require(\"./roles\");\nconst queryable_1 = require(\"./queryable\");\nclass QueryableSecurable extends queryable_1.QueryableInstance {\n /**\n * Gets the set of role assignments for this item\n *\n */\n get roleAssignments() {\n return new roles_1.RoleAssignments(this);\n }\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n get firstUniqueAncestorSecurableObject() {\n return new queryable_1.QueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n }\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n getUserEffectivePermissions(loginName) {\n let perms = new queryable_1.Queryable(this, \"getUserEffectivePermissions(@user)\");\n perms.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return perms;\n }\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n breakRoleInheritance(copyRoleAssignments = false, clearSubscopes = false) {\n class Breaker extends queryable_1.Queryable {\n constructor(baseUrl, copy, clear) {\n super(baseUrl, `breakroleinheritance(copyroleassignments=${copy}, clearsubscopes=${clear})`);\n }\n break() {\n return this.post();\n }\n }\n let b = new Breaker(this, copyRoleAssignments, clearSubscopes);\n return b.break();\n }\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n resetRoleInheritance() {\n class Resetter extends queryable_1.Queryable {\n constructor(baseUrl) {\n super(baseUrl, \"resetroleinheritance\");\n }\n reset() {\n return this.post();\n }\n }\n let r = new Resetter(this);\n return r.reset();\n }\n}\nexports.QueryableSecurable = QueryableSecurable;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryablesecurable.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes a set of role assignments for the current scope\n *\n */\nclass RoleAssignments extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"roleassignments\") {\n super(baseUrl, path);\n }\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection.\n *\n * @param principalId The ID of the user or group to assign permissions to\n * @param roleDefId The ID of the role definition that defines the permissions to assign\n *\n */\n add(principalId, roleDefId) {\n let a = new RoleAssignments(this, `addroleassignment(principalid=${principalId}, roledefid=${roleDefId})`);\n return a.post();\n }\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The ID of the user or group in the role assignment.\n * @param roleDefId The ID of the role definition in the role assignment\n *\n */\n remove(principalId, roleDefId) {\n let a = new RoleAssignments(this, `removeroleassignment(principalid=${principalId}, roledefid=${roleDefId})`);\n return a.post();\n }\n /**\n * Gets the role assignment associated with the specified principal ID from the collection.\n *\n * @param id The id of the role assignment\n */\n getById(id) {\n let ra = new RoleAssignment(this);\n ra.concat(`(${id})`);\n return ra;\n }\n}\nexports.RoleAssignments = RoleAssignments;\nclass RoleAssignment extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the RoleAssignment class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n get groups() {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n }\n /**\n * Get the role definition bindings for this role assignment\n *\n */\n get bindings() {\n return new RoleDefinitionBindings(this);\n }\n /**\n * Delete this role assignment\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.RoleAssignment = RoleAssignment;\nclass RoleDefinitions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the RoleDefinitions class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path\n *\n */\n constructor(baseUrl, path = \"roledefinitions\") {\n super(baseUrl, path);\n }\n /**\n * Gets the role definition with the specified ID from the collection.\n *\n * @param id The ID of the role definition.\n *\n */\n getById(id) {\n return new RoleDefinition(this, `getById(${id})`);\n }\n /**\n * Gets the role definition with the specified name.\n *\n * @param name The name of the role definition.\n *\n */\n getByName(name) {\n return new RoleDefinition(this, `getbyname('${name}')`);\n }\n /**\n * Gets the role definition with the specified type.\n *\n * @param name The name of the role definition.\n *\n */\n getByType(roleTypeKind) {\n return new RoleDefinition(this, `getbytype(${roleTypeKind})`);\n }\n /**\n * Create a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n add(name, description, order, basePermissions) {\n let postBody = JSON.stringify({\n BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n return this.post({ body: postBody }).then((data) => {\n return {\n data: data,\n definition: this.getById(data.Id),\n };\n });\n }\n}\nexports.RoleDefinitions = RoleDefinitions;\nclass RoleDefinition extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Updates this web intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n /* tslint:disable no-string-literal */\n update(properties) {\n if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n }\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RoleDefinition\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retDef = this;\n if (properties.hasOwnProperty(\"Name\")) {\n let parent = this.getParent(RoleDefinitions, this.parentUrl, \"\");\n retDef = parent.getByName(properties[\"Name\"]);\n }\n return {\n data: data,\n definition: retDef,\n };\n });\n }\n /* tslint:enable */\n /**\n * Delete this role definition\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.RoleDefinition = RoleDefinition;\nclass RoleDefinitionBindings extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"roledefinitionbindings\") {\n super(baseUrl, path);\n }\n}\nexports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/roles.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst siteusers_1 = require(\"./siteusers\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Principal Type enum\n *\n */\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n/**\n * Describes a collection of site users\n *\n */\nclass SiteGroups extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the SiteUsers class\n *\n * @param baseUrl The url or Queryable which forms the parent of this user collection\n */\n constructor(baseUrl, path = \"sitegroups\") {\n super(baseUrl, path);\n }\n /**\n * Adds a new group to the site collection\n *\n * @param props The properties to be updated\n */\n add(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n return this.post({ body: postBody }).then((data) => {\n return {\n data: data,\n group: this.getById(data.Id),\n };\n });\n }\n /**\n * Gets a group from the collection by name\n *\n * @param email The name of the group\n */\n getByName(groupName) {\n return new SiteGroup(this, `getByName('${groupName}')`);\n }\n /**\n * Gets a group from the collection by id\n *\n * @param id The id of the group\n */\n getById(id) {\n let sg = new SiteGroup(this);\n sg.concat(`(${id})`);\n return sg;\n }\n /**\n * Removes the group with the specified member ID from the collection.\n *\n * @param id The id of the group to remove\n */\n removeById(id) {\n let g = new SiteGroups(this, `removeById('${id}')`);\n return g.post();\n }\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user\n */\n removeByLoginName(loginName) {\n let g = new SiteGroups(this, `removeByLoginName('${loginName}')`);\n return g.post();\n }\n}\nexports.SiteGroups = SiteGroups;\n/**\n * Describes a single group\n *\n */\nclass SiteGroup extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Group class\n *\n * @param baseUrl The url or Queryable which forms the parent of this site group\n * @param path Optional, passes the path to the group\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Get's the users for this group\n *\n */\n get users() {\n return new siteusers_1.SiteUsers(this, \"users\");\n }\n /**\n * Updates this group instance with the supplied properties\n *\n * @param properties A GroupWriteableProperties object of property names and values to update for the user\n */\n /* tslint:disable no-string-literal */\n update(properties) {\n let postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n return this.post({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retGroup = this;\n if (properties.hasOwnProperty(\"Title\")) {\n retGroup = this.getParent(SiteGroup, this.parentUrl, `getByName('${properties[\"Title\"]}')`);\n }\n return {\n data: data,\n group: retGroup,\n };\n });\n }\n}\nexports.SiteGroup = SiteGroup;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/sitegroups.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of all site collection users\n *\n */\nclass SiteUsers extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Users class\n *\n * @param baseUrl The url or Queryable which forms the parent of this user collection\n */\n constructor(baseUrl, path = \"siteusers\") {\n super(baseUrl, path);\n }\n /**\n * Gets a user from the collection by email\n *\n * @param email The email of the user\n */\n getByEmail(email) {\n return new SiteUser(this, `getByEmail('${email}')`);\n }\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user\n */\n getById(id) {\n return new SiteUser(this, `getById(${id})`);\n }\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The email address of the user\n */\n getByLoginName(loginName) {\n let su = new SiteUser(this);\n su.concat(\"(@v)\");\n su.query.add(\"@v\", encodeURIComponent(loginName));\n return su;\n }\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user\n */\n removeById(id) {\n let o = new SiteUsers(this, `removeById(${id})`);\n return o.post();\n }\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user\n */\n removeByLoginName(loginName) {\n let o = new SiteUsers(this, `removeByLoginName(@v)`);\n o.query.add(\"@v\", encodeURIComponent(loginName));\n return o.post();\n }\n /**\n * Add a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n add(loginName) {\n let postBody = JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName });\n return this.post({ body: postBody }).then(() => this.getByLoginName(loginName));\n }\n}\nexports.SiteUsers = SiteUsers;\n/**\n * Describes a single user\n *\n */\nclass SiteUser extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the User class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, passes the path to the user\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Get's the groups for this user.\n *\n */\n get groups() {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n }\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n update(properties) {\n let postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n return this.post({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n user: this,\n };\n });\n }\n /**\n * Delete this user\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.SiteUser = SiteUser;\n/**\n * Represents the current user\n */\nclass CurrentUser extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"currentuser\") {\n super(baseUrl, path);\n }\n}\nexports.CurrentUser = CurrentUser;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/siteusers.js","\"use strict\";\nconst items_1 = require(\"./items\");\nconst views_1 = require(\"./views\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst fields_1 = require(\"./fields\");\nconst forms_1 = require(\"./forms\");\nconst subscriptions_1 = require(\"./subscriptions\");\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst util_1 = require(\"../utils/util\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Describes a collection of List objects\n *\n */\nclass Lists extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"lists\") {\n super(baseUrl, path);\n }\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n getByTitle(title) {\n return new List(this, `getByTitle('${title}')`);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n getById(id) {\n let list = new List(this);\n list.concat(`('${id}')`);\n return list;\n }\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n add(title, description = \"\", template = 100, enableContentTypes = false, additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings));\n return this.post({ body: postBody }).then((data) => {\n return { data: data, list: this.getByTitle(title) };\n });\n }\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n ensure(title, description = \"\", template = 100, enableContentTypes = false, additionalSettings = {}) {\n if (this.hasBatch) {\n throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n }\n return new Promise((resolve, reject) => {\n let list = this.getByTitle(title);\n list.get().then(_ => {\n list.update(additionalSettings).then(d => {\n resolve({ created: false, data: d, list: list });\n }).catch(e => reject(e));\n }).catch(_ => {\n this.add(title, description, template, enableContentTypes, additionalSettings).then((r) => {\n resolve({ created: true, data: r.data, list: this.getByTitle(title) });\n }).catch((e) => reject(e));\n });\n });\n }\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n ensureSiteAssetsLibrary() {\n let q = new Lists(this, \"ensuresiteassetslibrary\");\n return q.post().then((json) => {\n return new List(odata_1.extractOdataId(json));\n });\n }\n /**\n * Gets a list that is the default location for wiki pages.\n */\n ensureSitePagesLibrary() {\n let q = new Lists(this, \"ensuresitepageslibrary\");\n return q.post().then((json) => {\n return new List(odata_1.extractOdataId(json));\n });\n }\n}\nexports.Lists = Lists;\n/**\n * Describes a single List instance\n *\n */\nclass List extends queryablesecurable_1.QueryableSecurable {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the content types in this list\n *\n */\n get contentTypes() {\n return new contenttypes_1.ContentTypes(this);\n }\n /**\n * Gets the items in this list\n *\n */\n get items() {\n return new items_1.Items(this);\n }\n /**\n * Gets the views in this list\n *\n */\n get views() {\n return new views_1.Views(this);\n }\n /**\n * Gets the fields in this list\n *\n */\n get fields() {\n return new fields_1.Fields(this);\n }\n /**\n * Gets the forms in this list\n *\n */\n get forms() {\n return new forms_1.Forms(this);\n }\n /**\n * Gets the default view of this list\n *\n */\n get defaultView() {\n return new queryable_1.QueryableInstance(this, \"DefaultView\");\n }\n /**\n * Get all custom actions on a site collection\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the effective base permissions of this list\n *\n */\n get effectiveBasePermissions() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n }\n /**\n * Gets the event receivers attached to this list\n *\n */\n get eventReceivers() {\n return new queryable_1.QueryableCollection(this, \"EventReceivers\");\n }\n /**\n * Gets the related fields of this list\n *\n */\n get relatedFields() {\n return new queryable_1.Queryable(this, \"getRelatedFields\");\n }\n /**\n * Gets the IRM settings for this list\n *\n */\n get informationRightsManagementSettings() {\n return new queryable_1.Queryable(this, \"InformationRightsManagementSettings\");\n }\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n get subscriptions() {\n return new subscriptions_1.Subscriptions(this);\n }\n /**\n * Gets a view by view guid id\n *\n */\n getView(viewId) {\n return new views_1.View(this, `getView('${viewId}')`);\n }\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n update(properties, eTag = \"*\") {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retList = this;\n if (properties.hasOwnProperty(\"Title\")) {\n retList = this.getParent(List, this.parentUrl, `getByTitle('${properties[\"Title\"]}')`);\n }\n return {\n data: data,\n list: retList,\n };\n });\n }\n /* tslint:enable */\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n getChanges(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getchanges\");\n return q.post({ body: postBody });\n }\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n getItemsByCAMLQuery(query, ...expands) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getitems\");\n q = q.expand.apply(q, expands);\n return q.post({ body: postBody });\n }\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n getListItemChangesSinceToken(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getlistitemchangessincetoken\");\n // note we are using a custom parser to return text as the response is an xml doc\n return q.post({ body: postBody }, { parse(r) { return r.text(); } });\n }\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n this.append(\"recycle\");\n return this.post().then(data => {\n if (data.hasOwnProperty(\"Recycle\")) {\n return data.Recycle;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Renders list data based on the view xml provided\n */\n renderListData(viewXml) {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"renderlistdata(@viewXml)\");\n q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n return q.post().then(data => {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"RenderListData\")) {\n return data.RenderListData;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n renderListFormData(itemId, formId, mode) {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode=\" + mode + \")\");\n return q.post().then(data => {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"ListData\")) {\n return data.ListData;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n reserveListItemId() {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"reservelistitemid\");\n return q.post().then(data => {\n if (data.hasOwnProperty(\"ReserveListItemId\")) {\n return data.ReserveListItemId;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items\n *\n */\n getListItemEntityTypeFullName() {\n let q = new queryable_1.QueryableInstance(this);\n return q.select(\"ListItemEntityTypeFullName\").getAs().then(o => o.ListItemEntityTypeFullName);\n }\n}\nexports.List = List;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/lists.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst folders_1 = require(\"./folders\");\nconst files_1 = require(\"./files\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst util_1 = require(\"../utils/util\");\nconst odata_1 = require(\"./odata\");\nconst attachmentfiles_1 = require(\"./attachmentfiles\");\nconst lists_1 = require(\"./lists\");\n/**\n * Describes a collection of Item objects\n *\n */\nclass Items extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"items\") {\n super(baseUrl, path);\n }\n /**\n * Gets an Item by id\n *\n * @param id The integer id of the item to retrieve\n */\n getById(id) {\n let i = new Item(this);\n i.concat(`(${id})`);\n return i;\n }\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n */\n skip(skip) {\n this._query.add(\"$skiptoken\", encodeURIComponent(`Paged=TRUE&p_ID=${skip}`));\n return this;\n }\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n getPaged() {\n return this.getAs(new PagedItemCollectionParser());\n }\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n */\n add(properties = {}, listItemEntityTypeFullName = null) {\n let doAdd = (listItemEntityType) => {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n item: this.getById(data.Id),\n };\n });\n };\n if (!listItemEntityTypeFullName) {\n let parentList = this.getParent(lists_1.List);\n let removeDependency = this.addBatchDependency();\n return parentList.getListItemEntityTypeFullName().then(n => {\n let promise = doAdd(n);\n removeDependency();\n return promise;\n });\n }\n else {\n return doAdd(listItemEntityTypeFullName);\n }\n }\n}\nexports.Items = Items;\n/**\n * Descrines a single Item instance\n *\n */\nclass Item extends queryablesecurable_1.QueryableSecurable {\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the set of attachments for this item\n *\n */\n get attachmentFiles() {\n return new attachmentfiles_1.AttachmentFiles(this);\n }\n /**\n * Gets the content type for this item\n *\n */\n get contentType() {\n return new contenttypes_1.ContentType(this, \"ContentType\");\n }\n /**\n * Gets the effective base permissions for the item\n *\n */\n get effectiveBasePermissions() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n }\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n get effectiveBasePermissionsForUI() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissionsForUI\");\n }\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n get fieldValuesAsHTML() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesAsHTML\");\n }\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n get fieldValuesAsText() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesAsText\");\n }\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n get fieldValuesForEdit() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesForEdit\");\n }\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get folder() {\n return new folders_1.Folder(this, \"folder\");\n }\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get file() {\n return new files_1.File(this, \"file\");\n }\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n update(properties, eTag = \"*\") {\n return new Promise((resolve, reject) => {\n let removeDependency = this.addBatchDependency();\n let parentList = this.getParent(queryable_1.QueryableInstance, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\")));\n parentList.select(\"ListItemEntityTypeFullName\").getAs().then((d) => {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": d.ListItemEntityTypeFullName },\n }, properties));\n this.post({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then((data) => {\n removeDependency();\n resolve({\n data: data,\n item: this,\n });\n });\n }).catch(e => reject(e));\n });\n }\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n let i = new Item(this, \"recycle\");\n return i.post();\n }\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n getWopiFrameUrl(action = 0) {\n let i = new Item(this, \"getWOPIFrameUrl(@action)\");\n i._query.add(\"@action\", action);\n return i.post().then((data) => {\n return data.GetWOPIFrameUrl;\n });\n }\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n /* tslint:disable max-line-length */\n validateUpdateListItem(formValues, newDocumentUpdate = false) {\n let postBody = JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate });\n let item = new Item(this, \"validateupdatelistitem\");\n return item.post({ body: postBody });\n }\n}\nexports.Item = Item;\n/**\n * Provides paging functionality for list items\n */\nclass PagedItemCollection {\n constructor(nextUrl, results) {\n this.nextUrl = nextUrl;\n this.results = results;\n }\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n get hasNext() {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n }\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n getNext() {\n if (this.hasNext) {\n let items = new Items(this.nextUrl, null);\n return items.getPaged();\n }\n return new Promise(r => r(null));\n }\n}\nexports.PagedItemCollection = PagedItemCollection;\nclass PagedItemCollectionParser extends odata_1.ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n r.json().then(json => {\n let nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n resolve(new PagedItemCollection(nextUrl, this.parseODataJSON(json)));\n });\n }\n });\n }\n}\nclass ItemUpdatedParser extends odata_1.ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/items.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst files_1 = require(\"./files\");\n/**\n * Describes a collection of Folder objects\n *\n */\nclass Folders extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Folders class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"folders\") {\n super(baseUrl, path);\n }\n /**\n * Gets a folder by folder name\n *\n */\n getByName(name) {\n let f = new Folder(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n add(url) {\n return new Folders(this, `add('${url}')`).post().then((response) => {\n return {\n data: response,\n folder: this.getByName(url),\n };\n });\n }\n}\nexports.Folders = Folders;\n/**\n * Describes a single Folder instance\n *\n */\nclass Folder extends queryable_1.QueryableInstance {\n //\n // TODO:\n // Properties (https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FolderProperties)\n // UniqueContentTypeOrder (setter)\n // WelcomePage (setter)\n //\n /**\n * Creates a new instance of the Folder class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n get contentTypeOrder() {\n return new queryable_1.QueryableCollection(this, \"contentTypeOrder\");\n }\n /**\n * Gets this folder's files\n *\n */\n get files() {\n return new files_1.Files(this);\n }\n /**\n * Gets this folder's sub folders\n *\n */\n get folders() {\n return new Folders(this);\n }\n /**\n * Gets this folder's list item field values\n *\n */\n get listItemAllFields() {\n return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n }\n /**\n * Gets the parent folder, if available\n *\n */\n get parentFolder() {\n return new Folder(this, \"parentFolder\");\n }\n /**\n * Gets this folder's properties\n *\n */\n get properties() {\n return new queryable_1.QueryableInstance(this, \"properties\");\n }\n /**\n * Gets this folder's server relative url\n *\n */\n get serverRelativeUrl() {\n return new queryable_1.Queryable(this, \"serverRelativeUrl\");\n }\n /**\n * Gets a value that specifies the content type order.\n *\n */\n get uniqueContentTypeOrder() {\n return new queryable_1.QueryableCollection(this, \"uniqueContentTypeOrder\");\n }\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return new Folder(this).post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n return new Folder(this, \"recycle\").post();\n }\n}\nexports.Folder = Folder;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/folders.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst odata_1 = require(\"./odata\");\nconst util_1 = require(\"../utils/util\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst webparts_1 = require(\"./webparts\");\n/**\n * Describes a collection of File objects\n *\n */\nclass Files extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Files class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"files\") {\n super(baseUrl, path);\n }\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n getByName(name) {\n let f = new File(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Uploads a file.\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n add(url, content, shouldOverWrite = true) {\n return new Files(this, `add(overwrite=${shouldOverWrite},url='${url}')`)\n .post({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(url),\n };\n });\n }\n /**\n * Uploads a file.\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n addChunked(url, content, progress, shouldOverWrite = true, chunkSize = 10485760) {\n let adder = new Files(this, `add(overwrite=${shouldOverWrite},url='${url}')`);\n return adder.post().then(() => this.getByName(url)).then(file => file.setContentChunked(content, progress, chunkSize)).then((response) => {\n return {\n data: response,\n file: this.getByName(url),\n };\n });\n }\n /**\n * Adds a ghosted file to an existing list or document library.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n addTemplateFile(fileUrl, templateFileType) {\n return new Files(this, `addTemplateFile(urloffile='${fileUrl}',templatefiletype=${templateFileType})`)\n .post().then((response) => {\n return {\n data: response,\n file: this.getByName(fileUrl),\n };\n });\n }\n}\nexports.Files = Files;\n/**\n * Describes a single File instance\n *\n */\nclass File extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n get listItemAllFields() {\n return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n }\n /**\n * Gets a collection of versions\n *\n */\n get versions() {\n return new Versions(this);\n }\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n approve(comment) {\n return new File(this, `approve(comment='${comment}')`).post();\n }\n /**\n * Stops the chunk upload session without saving the uploaded data.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n cancelUpload(uploadId) {\n return new File(this, `cancelUpload(uploadId=guid'${uploadId}')`).post();\n }\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n checkin(comment = \"\", checkinType = CheckinType.Major) {\n // TODO: Enforce comment length <= 1023\n return new File(this, `checkin(comment='${comment}',checkintype=${checkinType})`).post();\n }\n /**\n * Checks out the file from a document library.\n */\n checkout() {\n return new File(this, \"checkout\").post();\n }\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n copyTo(url, shouldOverWrite = true) {\n return new File(this, `copyTo(strnewurl='${url}',boverwrite=${shouldOverWrite})`).post();\n }\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return new File(this).post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n deny(comment = \"\") {\n return new File(this, `deny(comment='${comment}')`).post();\n }\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n getLimitedWebPartManager(scope = WebPartsPersonalizationScope.Shared) {\n return new webparts_1.LimitedWebPartManager(this, `getLimitedWebPartManager(scope=${scope})`);\n }\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n moveTo(url, moveOperations = MoveOperations.Overwrite) {\n return new File(this, `moveTo(newurl='${url}',flags=${moveOperations})`).post();\n }\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n publish(comment = \"\") {\n return new File(this, `publish(comment='${comment}')`).post();\n }\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n recycle() {\n return new File(this, \"recycle\").post();\n }\n /**\n * Reverts an existing checkout for the file.\n *\n */\n undoCheckout() {\n return new File(this, \"undoCheckout\").post();\n }\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n unpublish(comment = \"\") {\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return new File(this, `unpublish(comment='${comment}')`).post();\n }\n /**\n * Gets the contents of the file as text\n *\n */\n getText() {\n return new File(this, \"$value\").get(new odata_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n getBlob() {\n return new File(this, \"$value\").get(new odata_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getBuffer() {\n return new File(this, \"$value\").get(new odata_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getJSON() {\n return new File(this, \"$value\").get(new odata_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Sets the content of a file, for large files use setContentChunked\n *\n * @param content The file content\n *\n */\n setContent(content) {\n let setter = new File(this, \"$value\");\n return setter.post({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new File(this));\n }\n /**\n * Sets the contents of a file using a chunked upload approach\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n setContentChunked(file, progress, chunkSize = 10485760) {\n if (typeof progress === \"undefined\") {\n progress = () => null;\n }\n let self = this;\n let fileSize = file.size;\n let blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n let uploadId = util_1.Util.getGUID();\n // start the chain with the first fragment\n progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n let chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n // skip the first and last blocks\n for (let i = 2; i < blockCount; i++) {\n chain = chain.then(pointer => {\n progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n }\n return chain.then(pointer => {\n progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return self.finishUpload(uploadId, pointer, file.slice(pointer));\n }).then(_ => {\n return self;\n });\n }\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n startUpload(uploadId, fragment) {\n return new File(this, `startUpload(uploadId=guid'${uploadId}')`).postAs({ body: fragment }).then(n => parseFloat(n));\n }\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n continueUpload(uploadId, fileOffset, fragment) {\n return new File(this, `continueUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`).postAs({ body: fragment }).then(n => parseFloat(n));\n }\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n finishUpload(uploadId, fileOffset, fragment) {\n return new File(this, `finishUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`)\n .postAs({ body: fragment }).then((response) => {\n return {\n data: response,\n file: new File(response.ServerRelativeUrl),\n };\n });\n }\n}\nexports.File = File;\n/**\n * Describes a collection of Version objects\n *\n */\nclass Versions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"versions\") {\n super(baseUrl, path);\n }\n /**\n * Gets a version by id\n *\n * @param versionId The id of the version to retrieve\n */\n getById(versionId) {\n let v = new Version(this);\n v.concat(`(${versionId})`);\n return v;\n }\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n deleteAll() {\n return new Versions(this, \"deleteAll\").post();\n }\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n deleteById(versionId) {\n return new Versions(this, `deleteById(vid=${versionId})`).post();\n }\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n deleteByLabel(label) {\n return new Versions(this, `deleteByLabel(versionlabel='${label}')`).post();\n }\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n restoreByLabel(label) {\n return new Versions(this, `restoreByLabel(versionlabel='${label}')`).post();\n }\n}\nexports.Versions = Versions;\n/**\n * Describes a single Version instance\n *\n */\nclass Version extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Version class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.Version = Version;\nvar CheckinType;\n(function (CheckinType) {\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\nvar WebPartsPersonalizationScope;\n(function (WebPartsPersonalizationScope) {\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\nvar MoveOperations;\n(function (MoveOperations) {\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\nvar TemplateFileType;\n(function (TemplateFileType) {\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/files.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nclass LimitedWebPartManager extends queryable_1.Queryable {\n /**\n * Creates a new instance of the LimitedWebPartManager class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n get webparts() {\n return new WebPartDefinitions(this, \"webparts\");\n }\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n export(id) {\n let exporter = new LimitedWebPartManager(this, \"ExportWebPart\");\n return exporter.post({\n body: JSON.stringify({ webPartId: id }),\n });\n }\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n import(xml) {\n let importer = new LimitedWebPartManager(this, \"ImportWebPart\");\n return importer.post({\n body: JSON.stringify({ webPartXml: xml }),\n });\n }\n}\nexports.LimitedWebPartManager = LimitedWebPartManager;\nclass WebPartDefinitions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the WebPartDefinitions class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id GUID id of the web part definition to get\n */\n getById(id) {\n return new WebPartDefinition(this, `getbyid('${id}')`);\n }\n}\nexports.WebPartDefinitions = WebPartDefinitions;\nclass WebPartDefinition extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the WebPartDefinition class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the webpart information associated with this definition\n */\n get webpart() {\n return new WebPart(this);\n }\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n delete() {\n let deleter = new WebPartDefinition(this, \"DeleteWebPart\");\n return deleter.post();\n }\n}\nexports.WebPartDefinition = WebPartDefinition;\nclass WebPart extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the WebPart class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path = \"webpart\") {\n super(baseUrl, path);\n }\n}\nexports.WebPart = WebPart;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/webparts.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of content types\n *\n */\nclass ContentTypes extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the ContentTypes class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content types collection\n */\n constructor(baseUrl, path = \"contenttypes\") {\n super(baseUrl, path);\n }\n /**\n * Gets a ContentType by content type id\n */\n getById(id) {\n let ct = new ContentType(this);\n ct.concat(`('${id}')`);\n return ct;\n }\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n addAvailableContentType(contentTypeId) {\n let postBody = JSON.stringify({\n \"contentTypeId\": contentTypeId,\n });\n return new ContentTypes(this, `addAvailableContentType`).postAs({ body: postBody }).then((data) => {\n return {\n contentType: this.getById(data.id),\n data: data,\n };\n });\n }\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n add(id, name, description = \"\", group = \"Custom Content Types\", additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n \"__metadata\": { \"type\": \"SP.ContentType\" },\n }, additionalSettings));\n return this.post({ body: postBody }).then((data) => {\n return { contentType: this.getById(data.id), data: data };\n });\n }\n}\nexports.ContentTypes = ContentTypes;\n/**\n * Describes a single ContentType instance\n *\n */\nclass ContentType extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the column (also known as field) references in the content type.\n */\n get fieldLinks() {\n return new FieldLinks(this);\n }\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n get fields() {\n return new queryable_1.QueryableCollection(this, \"fields\");\n }\n /**\n * Gets the parent content type of the content type.\n */\n get parent() {\n return new ContentType(this, \"parent\");\n }\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n get workflowAssociations() {\n return new queryable_1.QueryableCollection(this, \"workflowAssociations\");\n }\n}\nexports.ContentType = ContentType;\n/**\n * Represents a collection of field link instances\n */\nclass FieldLinks extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path = \"fieldlinks\") {\n super(baseUrl, path);\n }\n /**\n * Gets a FieldLink by GUID id\n *\n * @param id The GUID id of the field link\n */\n getById(id) {\n let fl = new FieldLink(this);\n fl.concat(`(guid'${id}')`);\n return fl;\n }\n}\nexports.FieldLinks = FieldLinks;\n/**\n * Represents a field link instance\n */\nclass FieldLink extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n}\nexports.FieldLink = FieldLink;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/contenttypes.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst odata_1 = require(\"./odata\");\n/**\n * Describes a collection of Item objects\n *\n */\nclass AttachmentFiles extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the AttachmentFiles class\n *\n * @param baseUrl The url or Queryable which forms the parent of this attachments collection\n */\n constructor(baseUrl, path = \"AttachmentFiles\") {\n super(baseUrl, path);\n }\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n getByName(name) {\n let f = new AttachmentFile(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Adds a new attachment to the collection\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n add(name, content) {\n return new AttachmentFiles(this, `add(FileName='${name}')`)\n .post({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(name),\n };\n });\n }\n}\nexports.AttachmentFiles = AttachmentFiles;\n/**\n * Describes a single attachment file instance\n *\n */\nclass AttachmentFile extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the AttachmentFile class\n *\n * @param baseUrl The url or Queryable which forms the parent of this attachment file\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the contents of the file as text\n *\n */\n getText() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.TextFileParser());\n }\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n getBlob() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.BlobFileParser());\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getBuffer() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.BufferFileParser());\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getJSON() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.JSONFileParser());\n }\n /**\n * Sets the content of a file\n *\n * @param content The value to set for the file contents\n */\n setContent(content) {\n let setter = new AttachmentFile(this, \"$value\");\n return setter.post({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new AttachmentFile(this));\n }\n /**\n * Delete this attachment file\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.AttachmentFile = AttachmentFile;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/attachmentfiles.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes the views available in the current context\n *\n */\nclass Views extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Views class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl) {\n super(baseUrl, \"views\");\n }\n /**\n * Gets a view by guid id\n *\n * @param id The GUID id of the view\n */\n getById(id) {\n let v = new View(this);\n v.concat(`('${id}')`);\n return v;\n }\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n getByTitle(title) {\n return new View(this, `getByTitle('${title}')`);\n }\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n /*tslint:disable max-line-length */\n add(title, personalView = false, additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"PersonalView\": personalView,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.View\" },\n }, additionalSettings));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n view: this.getById(data.Id),\n };\n });\n }\n}\nexports.Views = Views;\n/**\n * Describes a single View instance\n *\n */\nclass View extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the View class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n get fields() {\n return new ViewFields(this);\n }\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.View\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n view: this,\n };\n });\n }\n /**\n * Delete this view\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Returns the list view as HTML.\n *\n */\n renderAsHtml() {\n let q = new queryable_1.Queryable(this, \"renderashtml\");\n return q.get();\n }\n}\nexports.View = View;\nclass ViewFields extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"viewfields\") {\n super(baseUrl, path);\n }\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n getSchemaXml() {\n let q = new queryable_1.Queryable(this, \"schemaxml\");\n return q.get();\n }\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n add(fieldTitleOrInternalName) {\n let q = new ViewFields(this, `addviewfield('${fieldTitleOrInternalName}')`);\n return q.post();\n }\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n move(fieldInternalName, index) {\n let q = new ViewFields(this, \"moveviewfieldto\");\n let postBody = JSON.stringify({ \"field\": fieldInternalName, \"index\": index });\n return q.post({ body: postBody });\n }\n /**\n * Removes all the fields from the collection.\n */\n removeAll() {\n let q = new ViewFields(this, \"removeallviewfields\");\n return q.post();\n }\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n remove(fieldInternalName) {\n let q = new ViewFields(this, `removeviewfield('${fieldInternalName}')`);\n return q.post();\n }\n}\nexports.ViewFields = ViewFields;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/views.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\nconst Types = require(\"./types\");\n/**\n * Describes a collection of Field objects\n *\n */\nclass Fields extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"fields\") {\n super(baseUrl, path);\n }\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n getByTitle(title) {\n return new Field(this, `getByTitle('${title}')`);\n }\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n getByInternalNameOrTitle(name) {\n return new Field(this, `getByInternalNameOrTitle('${name}')`);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param title The Id of the list\n */\n getById(id) {\n let f = new Field(this);\n f.concat(`('${id}')`);\n return f;\n }\n /**\n * Creates a field based on the specified schema\n */\n createFieldAsXml(xml) {\n let info;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n }\n else {\n info = xml;\n }\n let postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": {\n \"type\": \"SP.XmlSchemaFieldCreationInformation\",\n },\n }, info),\n });\n let q = new Fields(this, \"createfieldasxml\");\n return q.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n /**\n * Adds a new list to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n add(title, fieldType, properties = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"Title\": title,\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addText(title, maxLength = 255, properties) {\n let props = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addCalculated(title, formula, dateFormat, outputType = Types.FieldTypes.Text, properties) {\n let props = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addDateTime(title, displayFormat = Types.DateTimeFieldFormatType.DateOnly, calendarType = Types.CalendarType.Gregorian, friendlyDisplayFormat = 0, properties) {\n let props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addNumber(title, minValue, maxValue, properties) {\n let props = { FieldTypeKind: 9 };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addCurrency(title, minValue, maxValue, currencyLocalId = 1033, properties) {\n let props = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n addMultilineText(title, numberOfLines = 6, richText = true, restrictedMode = false, appendOnly = false, allowHyperlink = true, properties) {\n let props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n addUrl(title, displayFormat = Types.UrlFieldFormatType.Hyperlink, properties) {\n let props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n }\n}\nexports.Fields = Fields;\n/**\n * Describes a single of Field instance\n *\n */\nclass Field extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Field class\n *\n * @param baseUrl The url or Queryable which forms the parent of this field instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n update(properties, fieldType = \"SP.Field\") {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n field: this,\n };\n });\n }\n /**\n * Delete this fields\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n setShowInDisplayForm(show) {\n let q = new Field(this, `setshowindisplayform(${show})`);\n return q.post();\n }\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n setShowInEditForm(show) {\n let q = new Field(this, `setshowineditform(${show})`);\n return q.post();\n }\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n setShowInNewForm(show) {\n let q = new Field(this, `setshowinnewform(${show})`);\n return q.post();\n }\n}\nexports.Field = Field;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/fields.js","// reference: https://msdn.microsoft.com/en-us/library/office/dn600183.aspx\n\"use strict\";\n/**\n * Determines the display mode of the given control or view\n */\nvar ControlMode;\n(function (ControlMode) {\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n/**\n * Specifies the type of the field.\n */\nvar FieldTypes;\n(function (FieldTypes) {\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\nvar DateTimeFieldFormatType;\n(function (DateTimeFieldFormatType) {\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n/**\n * Specifies the control settings while adding a field.\n */\nvar AddFieldOptions;\n(function (AddFieldOptions) {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n /**\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\n */\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\nvar CalendarType;\n(function (CalendarType) {\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\nvar UrlFieldFormatType;\n(function (UrlFieldFormatType) {\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\nvar PageType;\n(function (PageType) {\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n PageType[PageType[\"View\"] = 3] = \"View\";\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n})(PageType = exports.PageType || (exports.PageType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/types.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of Field objects\n *\n */\nclass Forms extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"forms\") {\n super(baseUrl, path);\n }\n /**\n * Gets a form by id\n *\n * @param id The guid id of the item to retrieve\n */\n getById(id) {\n let i = new Form(this);\n i.concat(`('${id}')`);\n return i;\n }\n}\nexports.Forms = Forms;\n/**\n * Describes a single of Form instance\n *\n */\nclass Form extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Form class\n *\n * @param baseUrl The url or Queryable which is the parent of this form instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n}\nexports.Form = Form;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/forms.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of webhook subscriptions\n *\n */\nclass Subscriptions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Subscriptions class\n *\n * @param baseUrl - The url or Queryable which forms the parent of this webhook subscriptions collection\n */\n constructor(baseUrl, path = \"subscriptions\") {\n super(baseUrl, path);\n }\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n */\n getById(subscriptionId) {\n let subscription = new Subscription(this);\n subscription.concat(`('${subscriptionId}')`);\n return subscription;\n }\n /**\n * Create a new webhook subscription\n *\n */\n add(notificationUrl, expirationDate, clientState) {\n let postBody = JSON.stringify({\n \"clientState\": clientState || \"pnp-js-core-subscription\",\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n });\n return this.post({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(result => {\n return { data: result, subscription: this.getById(result.id) };\n });\n }\n}\nexports.Subscriptions = Subscriptions;\n/**\n * Describes a single webhook subscription instance\n *\n */\nclass Subscription extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Subscription class\n *\n * @param baseUrl - The url or Queryable which forms the parent of this webhook subscription instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Update a webhook subscription\n *\n */\n update(expirationDate) {\n let postBody = JSON.stringify({\n \"expirationDateTime\": expirationDate,\n });\n return this.patch({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(data => {\n return { data: data, subscription: this };\n });\n }\n /**\n * Remove a webhook subscription\n *\n */\n delete() {\n return super.delete();\n }\n}\nexports.Subscription = Subscription;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/subscriptions.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\nclass UserCustomActions extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"usercustomactions\") {\n super(baseUrl, path);\n }\n /**\n * Returns the custom action with the specified identifier.\n *\n * @param id The GUID ID of the user custom action to get.\n */\n getById(id) {\n let uca = new UserCustomAction(this);\n uca.concat(`('${id}')`);\n return uca;\n }\n /**\n * Create a custom action\n *\n * @param creationInfo The information which defines the new custom action\n *\n */\n add(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n return this.post({ body: postBody }).then((data) => {\n return {\n action: this.getById(data.Id),\n data: data,\n };\n });\n }\n /**\n * Deletes all custom actions in the collection.\n *\n */\n clear() {\n let a = new UserCustomActions(this, \"clear\");\n return a.post();\n }\n}\nexports.UserCustomActions = UserCustomActions;\nclass UserCustomAction extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.UserCustomAction\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n action: this,\n data: data,\n };\n });\n }\n /**\n * Remove a custom action\n *\n */\n delete() {\n return super.delete();\n }\n}\nexports.UserCustomAction = UserCustomAction;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/usercustomactions.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst queryable_1 = require(\"./queryable\");\n/**\n * Represents a collection of navigation nodes\n *\n */\nclass NavigationNodes extends queryable_1.QueryableCollection {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a navigation node by id\n *\n * @param id The id of the node\n */\n getById(id) {\n let node = new NavigationNode(this);\n node.concat(`(${id})`);\n return node;\n }\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n add(title, url, visible = true) {\n let postBody = JSON.stringify({\n IsVisible: visible,\n Title: title,\n Url: url,\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n });\n let adder = new NavigationNodes(this);\n return adder.post({ body: postBody }).then((data) => {\n return {\n data: data,\n node: this.getById(data.Id),\n };\n });\n }\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n moveAfter(nodeId, previousNodeId) {\n let postBody = JSON.stringify({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n let mover = new NavigationNodes(this, \"MoveAfter\");\n return mover.post({ body: postBody });\n }\n}\nexports.NavigationNodes = NavigationNodes;\nclass NavigationNode extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Represents the child nodes of this node\n */\n get children() {\n return new NavigationNodes(this, \"Children\");\n }\n /**\n * Updates this node based on the supplied properties\n *\n * @param properties The hash of key/value pairs to update\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n node: this,\n };\n });\n }\n /**\n * Deletes this node and any child nodes\n */\n delete() {\n return super.delete();\n }\n}\nexports.NavigationNode = NavigationNode;\n/**\n * Exposes the navigation components\n *\n */\nclass Navigation extends queryable_1.Queryable {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"navigation\") {\n super(baseUrl, path);\n }\n /**\n * Gets the quicklaunch navigation for the current context\n *\n */\n get quicklaunch() {\n return new NavigationNodes(this, \"quicklaunch\");\n }\n /**\n * Gets the top bar navigation navigation for the current context\n *\n */\n get topNavigationBar() {\n return new NavigationNodes(this, \"topnavigationbar\");\n }\n}\nexports.Navigation = Navigation;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/navigation.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of List objects\n *\n */\nclass Features extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"features\") {\n super(baseUrl, path);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the feature (GUID)\n */\n getById(id) {\n let feature = new Feature(this);\n feature.concat(`('${id}')`);\n return feature;\n }\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n add(id, force = false) {\n let adder = new Features(this, \"add\");\n return adder.post({\n body: JSON.stringify({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(data => {\n return {\n data: data,\n feature: this.getById(id),\n };\n });\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n remove(id, force = false) {\n let remover = new Features(this, \"remove\");\n return remover.post({\n body: JSON.stringify({\n featureId: id,\n force: force,\n }),\n });\n }\n}\nexports.Features = Features;\nclass Feature extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n deactivate(force = false) {\n let removeDependency = this.addBatchDependency();\n let idGet = new Feature(this).select(\"DefinitionId\");\n return idGet.getAs().then(feature => {\n let promise = this.getParent(Features, this.parentUrl, \"\").remove(feature.DefinitionId, force);\n removeDependency();\n return promise;\n });\n }\n}\nexports.Feature = Feature;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/features.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst FileUtil = require(\"../utils/files\");\nconst odata_1 = require(\"./odata\");\nclass UserProfileQuery extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"_api/sp.userprofiles.peoplemanager\") {\n super(baseUrl, path);\n this.profileLoader = new ProfileLoader(baseUrl);\n }\n /**\n * The URL of the edit profile page for the current user.\n */\n get editProfileLink() {\n let q = new UserProfileQuery(this, \"EditProfileLink\");\n return q.getAs(odata_1.ODataValue());\n }\n /**\n * A Boolean value that indicates whether the current user's People I'm Following list is public.\n */\n get isMyPeopleListPublic() {\n let q = new UserProfileQuery(this, \"IsMyPeopleListPublic\");\n return q.getAs(odata_1.ODataValue());\n }\n /**\n * A Boolean value that indicates whether the current user's People I'm Following list is public.\n *\n * @param loginName The account name of the user\n */\n amIFollowedBy(loginName) {\n let q = new UserProfileQuery(this, \"amifollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Checks whether the current user is following the specified user.\n *\n * @param loginName The account name of the user\n */\n amIFollowing(loginName) {\n let q = new UserProfileQuery(this, \"amifollowing(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets tags that the user is following.\n *\n * @param maxCount The maximum number of tags to get.\n */\n getFollowedTags(maxCount = 20) {\n let q = new UserProfileQuery(this, \"getfollowedtags(\" + maxCount + \")\");\n return q.get();\n }\n /**\n * Gets the people who are following the specified user.\n *\n * @param loginName The account name of the user.\n */\n getFollowersFor(loginName) {\n let q = new UserProfileQuery(this, \"getfollowersfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets the people who are following the current user.\n *\n */\n get myFollowers() {\n return new queryable_1.QueryableCollection(this, \"getmyfollowers\");\n }\n /**\n * Gets user properties for the current user.\n *\n */\n get myProperties() {\n return new UserProfileQuery(this, \"getmyproperties\");\n }\n /**\n * Gets the people who the specified user is following.\n *\n * @param loginName The account name of the user.\n */\n getPeopleFollowedBy(loginName) {\n let q = new UserProfileQuery(this, \"getpeoplefollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n getPropertiesFor(loginName) {\n let q = new UserProfileQuery(this, \"getpropertiesfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets the most popular tags.\n *\n */\n get trendingTags() {\n let q = new UserProfileQuery(this, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n }\n /**\n * Gets the specified user profile property for the specified user.\n *\n * @param loginName The account name of the user.\n * @param propertyName The case-sensitive name of the property to get.\n */\n getUserProfilePropertyFor(loginName, propertyName) {\n let q = new UserProfileQuery(this, `getuserprofilepropertyfor(accountname=@v, propertyname='${propertyName}')`);\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Removes the specified user from the user's list of suggested people to follow.\n *\n * @param loginName The account name of the user.\n */\n hideSuggestion(loginName) {\n let q = new UserProfileQuery(this, \"hidesuggestion(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.post();\n }\n /**\n * Checks whether the first user is following the second user.\n *\n * @param follower The account name of the user who might be following followee.\n * @param followee The account name of the user who might be followed.\n */\n isFollowing(follower, followee) {\n let q = new UserProfileQuery(this, null);\n q.concat(`.isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)`);\n q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n return q.get();\n }\n /**\n * Uploads and sets the user profile picture\n *\n * @param profilePicSource Blob data representing the user's picture\n */\n setMyProfilePic(profilePicSource) {\n return new Promise((resolve, reject) => {\n FileUtil.readBlobAsArrayBuffer(profilePicSource).then((buffer) => {\n let request = new UserProfileQuery(this, \"setmyprofilepicture\");\n request.post({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(_ => resolve());\n }).catch(e => reject(e));\n });\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n createPersonalSiteEnqueueBulk(...emails) {\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n }\n /**\n * Gets the user profile of the site owner.\n *\n */\n get ownerUserProfile() {\n return this.profileLoader.ownerUserProfile;\n }\n /**\n * Gets the user profile that corresponds to the current user.\n */\n get userProfile() {\n return this.profileLoader.userProfile;\n }\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n */\n createPersonalSite(interactiveRequest = false) {\n return this.profileLoader.createPersonalSite(interactiveRequest);\n }\n /**\n * Sets the privacy settings for this profile.\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n shareAllSocialData(share) {\n return this.profileLoader.shareAllSocialData(share);\n }\n}\nexports.UserProfileQuery = UserProfileQuery;\nclass ProfileLoader extends queryable_1.Queryable {\n constructor(baseUrl, path = \"_api/sp.userprofiles.profileloader.getprofileloader\") {\n super(baseUrl, path);\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n createPersonalSiteEnqueueBulk(emails) {\n let q = new ProfileLoader(this, \"createpersonalsiteenqueuebulk\");\n let postBody = JSON.stringify({ \"emailIDs\": emails });\n return q.post({\n body: postBody,\n });\n }\n /**\n * Gets the user profile of the site owner.\n *\n */\n get ownerUserProfile() {\n let q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n return q.postAs();\n }\n /**\n * Gets the user profile that corresponds to the current user.\n *\n */\n get userProfile() {\n let q = new ProfileLoader(this, \"getuserprofile\");\n return q.postAs();\n }\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n */\n createPersonalSite(interactiveRequest = false) {\n let q = new ProfileLoader(this, `getuserprofile/createpersonalsiteenque(${interactiveRequest})\",`);\n return q.post();\n }\n /**\n * Sets the privacy settings for this profile.\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n shareAllSocialData(share) {\n let q = new ProfileLoader(this, `getuserprofile/shareallsocialdata(${share})\",`);\n return q.post();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/userprofiles.js","\"use strict\";\n/**\n * Reads a blob as text\n *\n * @param blob The data to read\n */\nfunction readBlobAsText(blob) {\n return readBlobAs(blob, \"string\");\n}\nexports.readBlobAsText = readBlobAsText;\n/**\n * Reads a blob into an array buffer\n *\n * @param blob The data to read\n */\nfunction readBlobAsArrayBuffer(blob) {\n return readBlobAs(blob, \"buffer\");\n}\nexports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n/**\n * Generic method to read blob's content\n *\n * @param blob The data to read\n * @param mode The read mode\n */\nfunction readBlobAs(blob, mode) {\n return new Promise((resolve, reject) => {\n try {\n let reader = new FileReader();\n reader.onload = (e) => {\n resolve(e.target.result);\n };\n switch (mode) {\n case \"string\":\n reader.readAsText(blob);\n break;\n case \"buffer\":\n reader.readAsArrayBuffer(blob);\n break;\n }\n }\n catch (e) {\n reject(e);\n }\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/files.js","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\n__export(require(\"../sharepoint/index\"));\nvar httpclient_1 = require(\"../net/httpclient\");\nexports.HttpClient = httpclient_1.HttpClient;\nvar sprequestexecutorclient_1 = require(\"../net/sprequestexecutorclient\");\nexports.SPRequestExecutorClient = sprequestexecutorclient_1.SPRequestExecutorClient;\nvar nodefetchclient_1 = require(\"../net/nodefetchclient\");\nexports.NodeFetchClient = nodefetchclient_1.NodeFetchClient;\nvar fetchclient_1 = require(\"../net/fetchclient\");\nexports.FetchClient = fetchclient_1.FetchClient;\n__export(require(\"../configuration/providers/index\"));\nvar collections_1 = require(\"../collections/collections\");\nexports.Dictionary = collections_1.Dictionary;\nvar util_1 = require(\"../utils/util\");\nexports.Util = util_1.Util;\n__export(require(\"../utils/logging\"));\n__export(require(\"../utils/exceptions\"));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/types/index.js","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\n__export(require(\"./caching\"));\nvar files_1 = require(\"./files\");\nexports.CheckinType = files_1.CheckinType;\nexports.WebPartsPersonalizationScope = files_1.WebPartsPersonalizationScope;\nexports.MoveOperations = files_1.MoveOperations;\nexports.TemplateFileType = files_1.TemplateFileType;\nvar items_1 = require(\"./items\");\nexports.Item = items_1.Item;\nexports.PagedItemCollection = items_1.PagedItemCollection;\nvar navigation_1 = require(\"./navigation\");\nexports.NavigationNodes = navigation_1.NavigationNodes;\nexports.NavigationNode = navigation_1.NavigationNode;\nvar lists_1 = require(\"./lists\");\nexports.List = lists_1.List;\nvar odata_1 = require(\"./odata\");\nexports.extractOdataId = odata_1.extractOdataId;\nexports.ODataParserBase = odata_1.ODataParserBase;\nexports.ODataDefaultParser = odata_1.ODataDefaultParser;\nexports.ODataRaw = odata_1.ODataRaw;\nexports.ODataValue = odata_1.ODataValue;\nexports.ODataEntity = odata_1.ODataEntity;\nexports.ODataEntityArray = odata_1.ODataEntityArray;\nexports.TextFileParser = odata_1.TextFileParser;\nexports.BlobFileParser = odata_1.BlobFileParser;\nexports.BufferFileParser = odata_1.BufferFileParser;\nexports.JSONFileParser = odata_1.JSONFileParser;\nvar roles_1 = require(\"./roles\");\nexports.RoleDefinitionBindings = roles_1.RoleDefinitionBindings;\nvar search_1 = require(\"./search\");\nexports.Search = search_1.Search;\nexports.SearchResult = search_1.SearchResult;\nexports.SearchResults = search_1.SearchResults;\nexports.SortDirection = search_1.SortDirection;\nexports.ReorderingRuleMatchType = search_1.ReorderingRuleMatchType;\nexports.QueryPropertyValueType = search_1.QueryPropertyValueType;\nvar searchsuggest_1 = require(\"./searchsuggest\");\nexports.SearchSuggest = searchsuggest_1.SearchSuggest;\nexports.SearchSuggestResult = searchsuggest_1.SearchSuggestResult;\nvar site_1 = require(\"./site\");\nexports.Site = site_1.Site;\n__export(require(\"./types\"));\nvar webs_1 = require(\"./webs\");\nexports.Web = webs_1.Web;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/index.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Makes requests using the SP.RequestExecutor library.\n */\nclass SPRequestExecutorClient {\n constructor() {\n /**\n * Converts a SharePoint REST API response to a fetch API response.\n */\n this.convertToResponse = (spResponse) => {\n let responseHeaders = new Headers();\n for (let h in spResponse.headers) {\n if (spResponse.headers[h]) {\n responseHeaders.append(h, spResponse.headers[h]);\n }\n }\n // issue #256, Cannot have an empty string body when creating a Response with status 204\n let body = spResponse.statusCode === 204 ? null : spResponse.body;\n return new Response(body, {\n headers: responseHeaders,\n status: spResponse.statusCode,\n statusText: spResponse.statusText,\n });\n };\n }\n /**\n * Fetches a URL using the SP.RequestExecutor library.\n */\n fetch(url, options) {\n if (typeof SP === \"undefined\" || typeof SP.RequestExecutor === \"undefined\") {\n throw new exceptions_1.SPRequestExecutorUndefinedException();\n }\n let addinWebUrl = url.substring(0, url.indexOf(\"/_api\")), executor = new SP.RequestExecutor(addinWebUrl), headers = {}, iterator, temp;\n if (options.headers && options.headers instanceof Headers) {\n iterator = options.headers.entries();\n temp = iterator.next();\n while (!temp.done) {\n headers[temp.value[0]] = temp.value[1];\n temp = iterator.next();\n }\n }\n else {\n headers = options.headers;\n }\n return new Promise((resolve, reject) => {\n let requestOptions = {\n error: (error) => {\n reject(this.convertToResponse(error));\n },\n headers: headers,\n method: options.method,\n success: (response) => {\n resolve(this.convertToResponse(response));\n },\n url: url,\n };\n if (options.body) {\n requestOptions = util_1.Util.extend(requestOptions, { body: options.body });\n }\n else {\n requestOptions = util_1.Util.extend(requestOptions, { binaryStringRequestBody: true });\n }\n executor.executeAsync(requestOptions);\n });\n }\n}\nexports.SPRequestExecutorClient = SPRequestExecutorClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/sprequestexecutorclient.js","\"use strict\";\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by\n * not including all of the node dependencies\n */\nclass NodeFetchClient {\n /**\n * Always throws an error that NodeFetchClient is not supported for use in the browser\n */\n fetch() {\n throw new exceptions_1.NodeFetchClientUnsupportedException();\n }\n}\nexports.NodeFetchClient = NodeFetchClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/nodefetchclientbrowser.js","\"use strict\";\nvar cachingConfigurationProvider_1 = require(\"./cachingConfigurationProvider\");\nexports.CachingConfigurationProvider = cachingConfigurationProvider_1.default;\nvar spListConfigurationProvider_1 = require(\"./spListConfigurationProvider\");\nexports.SPListConfigurationProvider = spListConfigurationProvider_1.default;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/index.js","\"use strict\";\nconst storage = require(\"../../utils/storage\");\nconst exceptions_1 = require(\"../../utils/exceptions\");\n/**\n * A caching provider which can wrap other non-caching providers\n *\n */\nclass CachingConfigurationProvider {\n /**\n * Creates a new caching configuration provider\n * @constructor\n * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration\n * @param {string} cacheKey Key that will be used to store cached items to the cache\n * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings.\n */\n constructor(wrappedProvider, cacheKey, cacheStore) {\n this.wrappedProvider = wrappedProvider;\n this.store = (cacheStore) ? cacheStore : this.selectPnPCache();\n this.cacheKey = `_configcache_${cacheKey}`;\n }\n /**\n * Gets the wrapped configuration providers\n *\n * @return {IConfigurationProvider} Wrapped configuration provider\n */\n getWrappedProvider() {\n return this.wrappedProvider;\n }\n /**\n * Loads the configuration values either from the cache or from the wrapped provider\n *\n * @return {Promise>} Promise of loaded configuration values\n */\n getConfiguration() {\n // Cache not available, pass control to the wrapped provider\n if ((!this.store) || (!this.store.enabled)) {\n return this.wrappedProvider.getConfiguration();\n }\n // Value is found in cache, return it directly\n let cachedConfig = this.store.get(this.cacheKey);\n if (cachedConfig) {\n return new Promise((resolve) => {\n resolve(cachedConfig);\n });\n }\n // Get and cache value from the wrapped provider\n let providerPromise = this.wrappedProvider.getConfiguration();\n providerPromise.then((providedConfig) => {\n this.store.put(this.cacheKey, providedConfig);\n });\n return providerPromise;\n }\n selectPnPCache() {\n let pnpCache = new storage.PnPClientStorage();\n if ((pnpCache.local) && (pnpCache.local.enabled)) {\n return pnpCache.local;\n }\n if ((pnpCache.session) && (pnpCache.session.enabled)) {\n return pnpCache.session;\n }\n throw new exceptions_1.NoCacheAvailableException();\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = CachingConfigurationProvider;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/cachingConfigurationProvider.js","\"use strict\";\nconst cachingConfigurationProvider_1 = require(\"./cachingConfigurationProvider\");\n/**\n * A configuration provider which loads configuration values from a SharePoint list\n *\n */\nclass SPListConfigurationProvider {\n /**\n * Creates a new SharePoint list based configuration provider\n * @constructor\n * @param {string} webUrl Url of the SharePoint site, where the configuration list is located\n * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = \"config\")\n */\n constructor(sourceWeb, sourceListTitle = \"config\") {\n this.sourceWeb = sourceWeb;\n this.sourceListTitle = sourceListTitle;\n }\n /**\n * Gets the url of the SharePoint site, where the configuration list is located\n *\n * @return {string} Url address of the site\n */\n get web() {\n return this.sourceWeb;\n }\n /**\n * Gets the title of the SharePoint list, which contains the configuration settings\n *\n * @return {string} List title\n */\n get listTitle() {\n return this.sourceListTitle;\n }\n /**\n * Loads the configuration values from the SharePoint list\n *\n * @return {Promise>} Promise of loaded configuration values\n */\n getConfiguration() {\n return this.web.lists.getByTitle(this.listTitle).items.select(\"Title\", \"Value\")\n .getAs().then((data) => {\n return data.reduce((configuration, item) => {\n return Object.defineProperty(configuration, item.Title, {\n configurable: false,\n enumerable: false,\n value: item.Value,\n writable: false,\n });\n }, {});\n });\n }\n /**\n * Wraps the current provider in a cache enabled provider\n *\n * @return {CachingConfigurationProvider} Caching providers which wraps the current provider\n */\n asCaching() {\n let cacheKey = `splist_${this.web.toUrl()}+${this.listTitle}`;\n return new cachingConfigurationProvider_1.default(this, cacheKey);\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = SPListConfigurationProvider;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/spListConfigurationProvider.js"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/pnp.min.js b/dist/pnp.min.js new file mode 100644 index 00000000..e1b119be --- /dev/null +++ b/dist/pnp.min.js @@ -0,0 +1,6 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.$pnp=t():e.$pnp=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/assets/",t(0)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var o=n(1),i=n(6),a=n(7),u=n(3),s=n(9),l=n(4);t.util=o.Util,t.sp=new s.Rest,t.storage=new i.PnPClientStorage,t.config=new a.Settings,t.log=u.Logger,t.setup=l.setRuntimeConfig,r(n(42));var c={config:t.config,log:t.log,setup:t.setup,sp:t.sp,storage:t.storage,util:t.util};Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},function(e,t,n){(function(e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n=0;s--)(o=e[s])&&(u=(a<3?o(u):a>3?o(t,n,u):o(t,n))||u);return a>3&&u&&Object.defineProperty(t,n,u),u},u=n(2),s=n(4),l=function(){function t(){r(this,t)}return o(t,null,[{key:"getCtxCallback",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o0?e.substring(0,t)+n+e.substring(t,e.length):n+e}},{key:"dateAdd",value:function(e,t,n){var r=new Date(e.toLocaleString());switch(t.toLowerCase()){case"year":r.setFullYear(r.getFullYear()+n);break;case"quarter":r.setMonth(r.getMonth()+3*n);break;case"month":r.setMonth(r.getMonth()+n);break;case"week":r.setDate(r.getDate()+7*n);break;case"day":r.setDate(r.getDate()+n);break;case"hour":r.setTime(r.getTime()+36e5*n);break;case"minute":r.setTime(r.getTime()+6e4*n);break;case"second":r.setTime(r.getTime()+1e3*n);break;default:r=void 0}return r}},{key:"loadStylesheet",value:function(e,t){t&&(e+="?"+encodeURIComponent((new Date).getTime().toString()));var n=document.getElementsByTagName("head");if(n.length>0){var r=document.createElement("link");n[0].appendChild(r),r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.setAttribute("href",e)}}},{key:"combinePaths",value:function(){for(var e=arguments.length,t=Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];if(null===t||"undefined"==typeof t)return e;var r=n?function(e,t){return!(t in e)}:function(){return!0};return Object.getOwnPropertyNames(t).filter(function(t){return r(e,t)}).reduce(function(e,n){return e[n]=t[n],e},e)}},{key:"isUrlAbsolute",value:function(e){return/^https?:\/\/|^\/\//i.test(e)}},{key:"makeUrlAbsolute",value:function(n){return t.isUrlAbsolute(n)?n:"undefined"==typeof e._spPageContextInfo?n:e._spPageContextInfo.hasOwnProperty("webAbsoluteUrl")?t.combinePaths(e._spPageContextInfo.webAbsoluteUrl,n):e._spPageContextInfo.hasOwnProperty("webServerRelativeUrl")?t.combinePaths(e._spPageContextInfo.webServerRelativeUrl,n):void 0}},{key:"toAbsoluteUrl",value:function(n){return new Promise(function(r){if(t.isUrlAbsolute(n))return r(n);if(null!==s.RuntimeConfig.baseUrl)return r(t.combinePaths(s.RuntimeConfig.baseUrl,n));if("undefined"!=typeof e._spPageContextInfo){if(e._spPageContextInfo.hasOwnProperty("webAbsoluteUrl"))return r(t.combinePaths(e._spPageContextInfo.webAbsoluteUrl,n));if(e._spPageContextInfo.hasOwnProperty("webServerRelativeUrl"))return r(t.combinePaths(e._spPageContextInfo.webServerRelativeUrl,n))}if("undefined"!=typeof e.location){var o=e.location.toString().toLowerCase().indexOf("/_layouts/");if(o>0)return r(t.combinePaths(e.location.toString().substr(0,o),n))}return r(n)})}}]),t}();a([u.deprecated("The Util.makeUrlAbsolute method is deprecated and will be removed from future releases. Use Util.toAbsoluteUrl instead")],l,"makeUrlAbsolute",null),t.Util=l}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return function(t,n,r){var i=r.value;r.value=function(){o.Logger.log({data:{descriptor:r,propertyKey:n,target:t},level:o.LogLevel.Warning,message:e});for(var a=arguments.length,u=Array(a),s=0;s1&&void 0!==arguments[1]?arguments[1]:r.Verbose;e.instance.log({level:n,message:t})}},{key:"writeJSON",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Verbose;e.instance.log({level:n,message:JSON.stringify(t)})}},{key:"log",value:function(t){e.instance.log(t)}},{key:"measure",value:function(t,n){return e.instance.measure(t,n)}},{key:"activeLogLevel",get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t}},{key:"instance",get:function(){return"undefined"!=typeof e._instance&&null!==e._instance||(e._instance=new a),e._instance}},{key:"count",get:function(){return e.instance.count}}]),e}();t.Logger=i;var a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.Warning,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n(this,e),this.activeLogLevel=t,this.subscribers=o}return o(e,[{key:"subscribe",value:function(e){this.subscribers.push(e)}},{key:"clearSubscribers",value:function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e}},{key:"write",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Verbose;this.log({level:t,message:e})}},{key:"log",value:function(e){"undefined"==typeof e||e.level0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n(this,e),this.keys=t,this.values=r}return r(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return t<0?null:this.values[t]}},{key:"add",value:function(e,t){var n=this.keys.indexOf(e);n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t))}},{key:"merge",value:function(e){var t=this;if("getKeys"in e)!function(){var n=e;n.getKeys().map(function(e){t.add(e,n.get(e))})}();else{var n=e;for(var r in n)n.hasOwnProperty(r)&&this.add(r,n[r])}}},{key:"remove",value:function(e){var t=this.keys.indexOf(e);if(t<0)return null;var n=this.values[t];return this.keys.splice(t,1),this.values.splice(t,1),n}},{key:"getKeys",value:function(){return this.keys}},{key:"getValues",value:function(){return this.values}},{key:"clear",value:function(){this.keys=[],this.values=[]}},{key:"count",value:function(){return this.keys.length}}]),e}();t.Dictionary=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"_api/search/postquery";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"execute",value:function(e){var t=void 0;t=e,t.SelectProperties&&(t.SelectProperties={results:e.SelectProperties}),t.RefinementFilters&&(t.RefinementFilters={results:e.RefinementFilters}),t.SortList&&(t.SortList={results:e.SortList}),t.HithighlightedProperties&&(t.HithighlightedProperties={results:e.HithighlightedProperties}),t.ReorderingRules&&(t.ReorderingRules={results:e.ReorderingRules}),t.Properties&&(t.Properties={results:e.Properties});var n=JSON.stringify({request:s.Util.extend({__metadata:{type:"Microsoft.Office.Server.Search.REST.SearchRequest"}},t)});return this.post({body:n}).then(function(e){return new c(e)})}}]),t}(u.QueryableInstance);t.Search=l;var c=function(){function e(t){r(this,e);var n=t.postquery?t.postquery:t;this.PrimarySearchResults=this.formatSearchResults(n.PrimaryQueryResult.RelevantResults.Table.Rows),this.RawSearchResults=n,this.ElapsedTime=n.ElapsedTime,this.RowCount=n.PrimaryQueryResult.RelevantResults.RowCount,this.TotalRows=n.PrimaryQueryResult.RelevantResults.TotalRows,this.TotalRowsIncludingDuplicates=n.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates}return a(e,[{key:"formatSearchResults",value:function(e){var t=new Array,n=e.results?e.results:e,r=!0,o=!1,i=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;t.push(new f(s.Cells))}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return t}}]),e}();t.SearchResults=c;var f=function e(t){r(this,e);var n=t.results?t.results:t,o=!0,i=!1,a=void 0;try{for(var u,s=n[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var l=u.value;Object.defineProperty(this,l.Key,{configurable:!1,enumerable:!1,value:l.Value,writable:!1})}}catch(e){i=!0,a=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw a}}};t.SearchResult=f;var h;!function(e){e[e.Ascending=0]="Ascending",e[e.Descending=1]="Descending",e[e.FQLFormula=2]="FQLFormula"}(h=t.SortDirection||(t.SortDirection={}));var p;!function(e){e[e.ResultContainsKeyword=0]="ResultContainsKeyword",e[e.TitleContainsKeyword=1]="TitleContainsKeyword",e[e.TitleMatchesKeyword=2]="TitleMatchesKeyword",e[e.UrlStartsWith=3]="UrlStartsWith",e[e.UrlExactlyMatches=4]="UrlExactlyMatches",e[e.ContentTypeIs=5]="ContentTypeIs",e[e.FileExtensionMatches=6]="FileExtensionMatches",e[e.ResultHasTag=7]="ResultHasTag",e[e.ManualCondition=8]="ManualCondition"}(p=t.ReorderingRuleMatchType||(t.ReorderingRuleMatchType={}));var y;!function(e){e[e.None=0]="None",e[e.StringType=1]="StringType",e[e.Int32TYpe=2]="Int32TYpe",e[e.BooleanType=3]="BooleanType",e[e.StringArrayType=4]="StringArrayType",e[e.UnSupportedType=5]="UnSupportedType"}(y=t.QueryPropertyValueType||(t.QueryPropertyValueType={}))},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;nr.lastIndexOf("(")){var o=r.lastIndexOf("/");this._parentUrl=r.slice(0,o),n=u.Util.combinePaths(r.slice(o),n),this._url=u.Util.combinePaths(this._parentUrl,n)}else{var a=r.lastIndexOf("(");this._parentUrl=r.slice(0,a),this._url=u.Util.combinePaths(r,n)}}else{var l=t;this._parentUrl=l._url;var c=l._query.get("@target");null!==c&&this._query.add("@target",c),this._url=u.Util.combinePaths(this._parentUrl,n)}}return a(e,[{key:"concat",value:function(e){this._url+=e}},{key:"append",value:function(e){this._url=u.Util.combinePaths(this._url,e)}},{key:"addBatchDependency",value:function(){return this.hasBatch?this._batch.addBatchDependency():function(){return null}}},{key:"hasBatch",get:function(){return null!==this._batch}},{key:"parentUrl",get:function(){return this._parentUrl}},{key:"query",get:function(){return this._query}}]),a(e,[{key:"inBatch",value:function(e){if(null!==this._batch)throw new f.AlreadyInBatchException;return this._batch=e,this}},{key:"usingCaching",value:function(e){return c.RuntimeConfig.globalCacheDisable||(this._useCaching=!0,this._cachingOptions=e),this}},{key:"toUrl",value:function(){return this._url}},{key:"toUrlAndQuery",value:function(){var e=this,t=this.toUrl();return this._query.count()>0&&(t+="?"+this._query.getKeys().map(function(t){return t+"="+e._query.get(t)}).join("&")),t}},{key:"getParent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parentUrl,n=arguments[2],r=new e(t,n),o=this.query.get("@target");return null!==o&&r.query.add("@target",o),r}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.ODataDefaultParser,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.toRequestContext("GET",t,e).then(function(e){return h.pipe(e)})}},{key:"getAs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new l.ODataDefaultParser,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.toRequestContext("GET",t,e).then(function(e){return h.pipe(e)})}},{key:"post",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.ODataDefaultParser;return this.toRequestContext("POST",e,t).then(function(e){return h.pipe(e)})}},{key:"postAs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.ODataDefaultParser;return this.toRequestContext("POST",e,t).then(function(e){return h.pipe(e)})}},{key:"patch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.ODataDefaultParser;return this.toRequestContext("PATCH",e,t).then(function(e){return h.pipe(e)})}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new l.ODataDefaultParser;return this.toRequestContext("DELETE",e,t).then(function(e){return h.pipe(e)})}},{key:"toRequestContext",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2],o=this.hasBatch?this.addBatchDependency():function(){};return u.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function(i){var a={batch:t._batch,batchDependency:o,cachingOptions:t._cachingOptions,isBatched:t.hasBatch,isCached:t._useCaching,options:n,parser:r,requestAbsoluteUrl:i,requestId:u.Util.getGUID(),verb:e};return a})}}]),e}();t.Queryable=p;var y=function(e){function t(){return i(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"filter",value:function(e){return this._query.add("$filter",e),this}},{key:"select",value:function(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1])||arguments[1],n=this._query.getKeys(),r=[],o=t?" asc":" desc",i=0;i1&&void 0!==arguments[1]?arguments[1]:p.Util.getGUID();i(this,e),this.baseUrl=t,this._batchId=n,this._requests=[],this._batchDependencies=Promise.resolve()}return h(e,[{key:"add",value:function(e,t,n,r){var o={method:t.toUpperCase(),options:n,parser:r,reject:null,resolve:null,url:e},i=new Promise(function(e,t){o.resolve=e,o.reject=t});return this._requests.push(o),i}},{key:"addBatchDependency",value:function(){var e=void 0,t=new Promise(function(t){e=t});return this._batchDependencies=this._batchDependencies.then(function(){return t}),e}},{key:"execute",value:function(){var e=this;return this._batchDependencies.then(function(){return e.executeImpl()})}},{key:"executeImpl",value:function(){var e=this;if(y.Logger.write("Executing batch with "+this._requests.length+" requests.",y.LogLevel.Info),this._requests.length<1)return y.Logger.write("Resolving empty batch.",y.LogLevel.Info),Promise.resolve(); +var t=new d.HttpClient;return p.Util.toAbsoluteUrl(this.baseUrl).then(function(n){var r=[],o="";e._requests.map(function(t){"GET"===t.method?(o.length>0&&(r.push("--changeset_"+o+"--\n\n"),o=""),r.push("--batch_"+e._batchId+"\n")):(o.length<1&&(o=p.Util.getGUID(),r.push("--batch_"+e._batchId+"\n"),r.push('Content-Type: multipart/mixed; boundary="changeset_'+o+'"\n\n')),r.push("--changeset_"+o+"\n")),r.push("Content-Type: application/http\n"),r.push("Content-Transfer-Encoding: binary\n\n");var i={Accept:"application/json;"},a=p.Util.isUrlAbsolute(t.url)?t.url:p.Util.combinePaths(n,t.url);if(y.Logger.write("Adding request "+t.method+" "+a+" to batch.",y.LogLevel.Verbose),"GET"!==t.method){var u=t.method;t.hasOwnProperty("options")&&t.options.hasOwnProperty("headers")&&"undefined"!=typeof t.options.headers["X-HTTP-Method"]&&(u=t.options.headers["X-HTTP-Method"],delete t.options.headers["X-HTTP-Method"]),r.push(u+" "+a+" HTTP/1.1\n"),i=p.Util.extend(i,{"Content-Type":"application/json;odata=verbose;charset=utf-8"})}else r.push(t.method+" "+a+" HTTP/1.1\n");"undefined"!=typeof v.RuntimeConfig.headers&&(i=p.Util.extend(i,v.RuntimeConfig.headers)),t.options&&t.options.headers&&(i=p.Util.extend(i,t.options.headers));for(var s in i)i.hasOwnProperty(s)&&r.push(s+": "+i[s]+"\n");r.push("\n"),t.options.body&&r.push(t.options.body+"\n\n")}),o.length>0&&(r.push("--changeset_"+o+"--\n\n"),o=""),r.push("--batch_"+e._batchId+"--\n");var i={"Content-Type":"multipart/mixed; boundary=batch_"+e._batchId},a={body:r.join(""),headers:i};return y.Logger.write("Sending batch request.",y.LogLevel.Info),t.post(p.Util.combinePaths(n,"/_api/$batch"),a).then(function(e){return e.text()}).then(e._parseResponse).then(function(t){if(t.length!==e._requests.length)throw new g.BatchParseException("Could not properly parse responses to match requests in batch.");return y.Logger.write("Resolving batched requests.",y.LogLevel.Info),t.reduce(function(t,n,r){var o=e._requests[r];return y.Logger.write("Resolving request "+o.method+" "+o.url+".",y.LogLevel.Verbose),t.then(function(e){return o.parser.parse(n).then(o.resolve).catch(o.reject)})},Promise.resolve())})})}},{key:"_parseResponse",value:function(e){return new Promise(function(t,n){for(var r=[],o="--batchresponse_",i=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),a=e.split("\n"),u="batch",s=void 0,l=void 0,c=0;c1&&void 0!==arguments[1]?arguments[1]:{},r=a.Util.extend(n,{cache:"no-cache",credentials:"same-origin"},!0),o=new Headers;if(this.mergeHeaders(o,u.RuntimeConfig.headers),this.mergeHeaders(o,n.headers),o.has("Accept")||o.append("Accept","application/json"),o.has("Content-Type")||o.append("Content-Type","application/json;odata=verbose;charset=utf-8"),o.has("X-ClientService-ClientTag")||o.append("X-ClientService-ClientTag","PnPCoreJS:2.0.1"),r=a.Util.extend(r,{headers:o}),r.method&&"GET"!==r.method.toUpperCase()&&!o.has("X-RequestDigest")){var i=e.indexOf("_api/");if(i<0)throw new s.APIUrlException;var l=e.substr(0,i);return this._digestCache.getDigest(l).then(function(n){return o.append("X-RequestDigest",n),t.fetchRaw(e,r)})}return this.fetchRaw(e,r)}},{key:"fetchRaw",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Headers;this.mergeHeaders(r,n.headers),n=a.Util.extend(n,{headers:r});var o=function r(o){t._impl.fetch(e,n).then(function(e){return o.resolve(e)}).catch(function(e){var n=o.delay;429!==e.status&&503!==e.status&&o.reject(e),o.delay*=2,o.attempts++,o.retryCount<=o.attempts&&o.reject(e),setTimeout(a.Util.getCtxCallback(t,r,o),n)})};return new Promise(function(e,n){var r={attempts:0,delay:100,reject:n,resolve:e,retryCount:7};o.call(t,r)})}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.Util.extend(t,{method:"GET"});return this.fetch(e,n)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.Util.extend(t,{method:"POST"});return this.fetch(e,n)}},{key:"patch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.Util.extend(t,{method:"PATCH"});return this.fetch(e,n)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.Util.extend(t,{method:"DELETE"});return this.fetch(e,n)}},{key:"mergeHeaders",value:function(e,t){if("undefined"!=typeof t&&null!==t){var n=new Request("",{headers:t});n.headers.forEach(function(t,n){e.append(n,t)})}}}]),e}();t.HttpClient=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:new i.Dictionary;r(this,e),this._httpClient=t,this._digests=n}return o(e,[{key:"getDigest",value:function(e){var t=this,n=this._digests.get(e);if(null!==n){var r=new Date;if(r0&&void 0!==arguments[0]?arguments[0]:"Cannot create a caching configuration provider since cache is not available.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="NoCacheAvailableException",a(n),n}return i(t,e),t}(Error);t.NoCacheAvailableException=l;var c=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unable to determine API url.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="APIUrlException",a(n),n}return i(t,e),t}(Error);t.APIUrlException=c;var f=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auth URL Endpoint could not be determined from data. Data logged.";r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i.name="APIUrlException",u.Logger.log({data:e,level:u.LogLevel.Error,message:i.message}),i}return i(t,e),t}(Error);t.AuthUrlException=f;var h=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Using NodeFetchClient in the browser is not supported.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="NodeFetchClientUnsupportedException",a(n),n}return i(t,e),t}(Error);t.NodeFetchClientUnsupportedException=h;var p=function(e){function t(){r(this,t);var e=["SP.RequestExecutor is undefined. ","Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library."].join(" "),n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="SPRequestExecutorUndefinedException",a(n),n}return i(t,e),t}(Error);t.SPRequestExecutorUndefinedException=p;var y=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The maximum comment length is 1023 characters.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="MaxCommentLengthException",a(n),n}return i(t,e),t}(Error);t.MaxCommentLengthException=y;var d=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"This operation";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+" is not supported as part of a batch."));return n.name="NotSupportedInBatchException",a(n),n}return i(t,e),t}(Error);t.NotSupportedInBatchException=d;var v=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.";r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i.name="ODataIdException",u.Logger.log({data:e,level:u.LogLevel.Error,message:i.message}),i}return i(t,e),t}(Error);t.ODataIdException=v;var g=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="BatchParseException",a(n),n}return i(t,e),t}(Error);t.BatchParseException=g;var b=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"This query is already part of a batch.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="AlreadyInBatchException",a(n),n}return i(t,e),t}(Error);t.AlreadyInBatchException=b;var w=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"This query is already part of a batch.";r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="FunctionExpectedException",a(n),n}return i(t,e),t}(Error);t.FunctionExpectedException=w;var m=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name="UrlException",a(n),n}return i(t,e),t}(Error);t.UrlException=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=[p.logStart,p.caching,p.send,p.logEnd];return t.reduce(function(e,t){return e.then(function(e){return t(e)})},Promise.resolve(e)).then(function(e){return p.returnResult(e)}).catch(function(e){throw f.Logger.log({data:e,level:f.LogLevel.Error,message:"Error in request pipeline: "+e.message}),e})}function i(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,n,r){var o=r.value;r.value=function(){for(var r=arguments.length,i=Array(r),a=0;a0&&i[0].hasOwnProperty("hasResult")&&i[0].hasResult?(f.Logger.write("["+i[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",f.LogLevel.Verbose),Promise.resolve(i[0])):(f.Logger.write("["+i[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",f.LogLevel.Verbose),o.apply(t,i))}}}var a=function(){function e(e,t){for(var n=0;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},l=n(17),c=n(13),f=n(3),h=n(1);t.pipe=o;var p=function(){function e(){r(this,e)}return a(e,null,[{key:"logStart",value:function(e){return new Promise(function(t){f.Logger.log({data:f.Logger.activeLogLevel===f.LogLevel.Info?{}:e,level:f.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.verb+" request to "+e.requestAbsoluteUrl}),t(e)})}},{key:"caching",value:function(t){return new Promise(function(n){if("GET"===t.verb&&t.isCached){f.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",f.LogLevel.Info);var r=new l.CachingOptions(t.requestAbsoluteUrl.toLowerCase());if("undefined"!=typeof t.cachingOptions&&(r=h.Util.extend(r,t.cachingOptions)),null!==r.store){var o=r.store.get(r.key);if(null!==o)return f.Logger.log({data:f.Logger.activeLogLevel===f.LogLevel.Info?{}:o,level:f.LogLevel.Info,message:"["+t.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),t.batchDependency(),e.setResult(t,o).then(function(e){return n(e)})}f.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",f.LogLevel.Info),t.parser=new l.CachingParserWrapper(t.parser,r)}return n(t)})}},{key:"send",value:function(t){return new Promise(function(n,r){if(t.isBatched){var o=t.batch.add(t.requestAbsoluteUrl,t.verb,t.options,t.parser);t.batchDependency(),f.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Batching request.",f.LogLevel.Info),n(o.then(function(n){return e.setResult(t,n)}))}else{f.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Sending request.",f.LogLevel.Info);var i=new c.HttpClient,a=h.Util.extend(t.options,{method:t.verb});i.fetch(t.requestAbsoluteUrl,a).then(function(e){return t.parser.parse(e)}).then(function(n){return e.setResult(t,n)}).then(function(e){return n(e)}).catch(function(e){return r(e)})}})}},{key:"logEnd",value:function(e){return new Promise(function(t){f.Logger.log({data:f.Logger.activeLogLevel===f.LogLevel.Info?{}:e,level:f.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.verb+" request to "+e.requestAbsoluteUrl}),t(e)})}},{key:"returnResult",value:function(e){return f.Logger.log({data:e.result,level:f.LogLevel.Verbose,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning, see data property for value."}),Promise.resolve(e.result)}},{key:"setResult",value:function(e,t){return new Promise(function(n){e.result=t,e.hasResult=!0,n(e)})}}]),e}();s([i(!0)],p,"logStart",null),s([i()],p,"caching",null),s([i()],p,"send",null),s([i(!0)],p,"logEnd",null),s([i(!0)],p,"returnResult",null)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"_api/search/suggest";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"execute",value:function(e){return this.mapQueryToQueryString(e),this.get().then(function(e){return new l(e)})}},{key:"mapQueryToQueryString",value:function(e){this.query.add("querytext","'"+e.querytext+"'"),e.hasOwnProperty("count")&&this.query.add("inumberofquerysuggestions",e.count.toString()),e.hasOwnProperty("personalCount")&&this.query.add("inumberofresultsuggestions",e.personalCount.toString()),e.hasOwnProperty("preQuery")&&this.query.add("fprequerysuggestions",e.preQuery.toString()),e.hasOwnProperty("hitHighlighting")&&this.query.add("fhithighlighting",e.hitHighlighting.toString()),e.hasOwnProperty("capitalize")&&this.query.add("fcapitalizefirstletters",e.capitalize.toString()),e.hasOwnProperty("culture")&&this.query.add("culture",e.culture.toString()),e.hasOwnProperty("stemming")&&this.query.add("enablestemming",e.stemming.toString()),e.hasOwnProperty("includePeople")&&this.query.add("showpeoplenamesuggestions",e.includePeople.toString()),e.hasOwnProperty("queryRules")&&this.query.add("enablequeryrules",e.queryRules.toString()),e.hasOwnProperty("prefixMatch")&&this.query.add("fprefixmatchallterms",e.prefixMatch.toString())}}]),t}(u.QueryableInstance);t.SearchSuggest=s;var l=function e(t){r(this,e),t.hasOwnProperty("suggest")?(this.PeopleNames=t.suggest.PeopleNames.results,this.PersonalResults=t.suggest.PersonalResults.results,this.Queries=t.suggest.Queries.results):(this.PeopleNames=t.PeopleNames,this.PersonalResults=t.PersonalResults,this.Queries=t.Queries)};t.SearchSuggestResult=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"_api/site";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getContextInfo",value:function(){var e=new t(this.parentUrl,"_api/contextinfo");return e.post().then(function(e){if(e.hasOwnProperty("GetContextWebInformation")){var t=e.GetContextWebInformation;return t.SupportedSchemaVersions=t.SupportedSchemaVersions.results,t}return e})}},{key:"getDocumentLibraries",value:function(e){var t=new u.Queryable("","_api/sp.web.getdocumentlibraries(@v)");return t.query.add("@v","'"+e+"'"),t.get().then(function(e){return e.hasOwnProperty("GetDocumentLibraries")?e.GetDocumentLibraries:e})}},{key:"getWebUrlFromPageUrl",value:function(e){var t=new u.Queryable("","_api/sp.web.getweburlfrompageurl(@v)");return t.query.add("@v","'"+e+"'"),t.get().then(function(e){return e.hasOwnProperty("GetWebUrlFromPageUrl")?e.GetWebUrlFromPageUrl:e})}},{key:"createBatch",value:function(){return new c.ODataBatch(this.parentUrl)}},{key:"rootWeb",get:function(){return new s.Web(this,"rootweb")}},{key:"features",get:function(){return new f.Features(this)}},{key:"userCustomActions",get:function(){return new l.UserCustomActions(this)}}]),t}(u.QueryableInstance);t.Site=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"webs";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"add",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"STS",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1033,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=b.Util.extend({Description:r,Language:i,Title:e,Url:n,UseSamePermissionsAsParentSite:a,WebTemplate:o},u),l=JSON.stringify({parameters:b.Util.extend({__metadata:{type:"SP.WebCreationInformation"}},s)}),c=new t(this,"add");return c.post({body:l}).then(function(e){return{data:e,web:new T(P.extractOdataId(e).replace(/_api\/web\/?/i,""))}})}}]),t}(s.QueryableCollection);t.Webs=k;var T=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_api/web";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"createBatch",value:function(){return new P.ODataBatch(this.parentUrl)}},{key:"getFolderByServerRelativeUrl",value:function(e){return new d.Folder(this,"getFolderByServerRelativeUrl('"+e+"')")}},{key:"getFileByServerRelativeUrl",value:function(e){return new g.File(this,"getFileByServerRelativeUrl('"+e+"')")}},{key:"getList",value:function(e){return new w.List(this,"getList('"+e+"')")}},{key:"update",value:function(e){var t=this,n=JSON.stringify(b.Util.extend({__metadata:{type:"SP.Web"}},e));return this.post({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,web:t}})}},{key:"delete",value:function(){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"delete",this).call(this)}},{key:"applyTheme",value:function(e,n,r,o){var i=JSON.stringify({backgroundImageUrl:r,colorPaletteUrl:e,fontSchemeUrl:n,shareGenerated:o}),a=new t(this,"applytheme");return a.post({body:i})}},{key:"applyWebTemplate",value:function(e){var n=new t(this,"applywebtemplate");return n.concat("(@t)"),n.query.add("@t",e),n.post()}},{key:"doesUserHavePermissions",value:function(e){var n=new t(this,"doesuserhavepermissions");return n.concat("(@p)"),n.query.add("@p",JSON.stringify(e)),n.get()}},{key:"ensureUser",value:function(e){var n=JSON.stringify({logonName:e}),r=new t(this,"ensureuser");return r.post({body:n})}},{key:"availableWebTemplates",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1033,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new s.QueryableCollection(this,"getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")")}},{key:"getCatalog",value:function(e){var n=new t(this,"getcatalog("+e+")");return n.select("Id"),n.get().then(function(e){return new w.List(P.extractOdataId(e))})}},{key:"getChanges",value:function(e){var n=JSON.stringify({query:b.Util.extend({__metadata:{type:"SP.ChangeQuery"}},e)}),r=new t(this,"getchanges");return r.post({body:n})}},{key:"getUserById",value:function(e){return new m.SiteUser(this,"getUserById("+e+")")}},{key:"mapToIcon",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=new t(this,"maptoicon(filename='"+e+"', progid='"+r+"', size="+n+")");return o.get()}},{key:"webs",get:function(){return new k(this)}},{key:"contentTypes",get:function(){return new y.ContentTypes(this)}},{key:"lists",get:function(){return new c.Lists(this)}},{key:"fields",get:function(){return new f.Fields(this)}},{key:"features",get:function(){return new O.Features(this)}},{key:"availablefields",get:function(){return new f.Fields(this,"availablefields")}},{key:"navigation",get:function(){return new h.Navigation(this)}},{key:"siteUsers",get:function(){return new m.SiteUsers(this)}},{key:"siteGroups",get:function(){return new p.SiteGroups(this)}},{key:"currentUser",get:function(){return new m.CurrentUser(this)}},{key:"folders",get:function(){return new d.Folders(this)}},{key:"userCustomActions",get:function(){return new _.UserCustomActions(this)}},{key:"roleDefinitions",get:function(){return new v.RoleDefinitions(this)}},{key:"customListTemplate",get:function(){return new s.QueryableCollection(this,"getcustomlisttemplates")}}]),t}(l.QueryableSecurable);t.Web=T},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e){function t(e,n,i){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"breakroleinheritance(copyroleassignments="+n+", clearsubscopes="+i+")"))}return i(t,e),a(t,[{key:"break",value:function(){return this.post()}}]),t}(s.Queryable),u=new n(this,e,t);return u.break()}},{key:"resetRoleInheritance",value:function(){var e=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"resetroleinheritance"))}return i(t,e),a(t,[{key:"reset",value:function(){return this.post()}}]),t}(s.Queryable),t=new e(this);return t.reset()}},{key:"roleAssignments",get:function(){return new u.RoleAssignments(this)}},{key:"firstUniqueAncestorSecurableObject",get:function(){return new s.QueryableInstance(this,"FirstUniqueAncestorSecurableObject")}}]),t}(s.QueryableInstance);t.QueryableSecurable=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"roleassignments";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"add",value:function(e,n){var r=new t(this,"addroleassignment(principalid="+e+", roledefid="+n+")");return r.post()}},{key:"remove",value:function(e,n){ +var r=new t(this,"removeroleassignment(principalid="+e+", roledefid="+n+")");return r.post()}},{key:"getById",value:function(e){var t=new f(this);return t.concat("("+e+")"),t}}]),t}(u.QueryableCollection);t.RoleAssignments=c;var f=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"delete",value:function(){return this.post({headers:{"X-HTTP-Method":"DELETE"}})}},{key:"groups",get:function(){return new s.SiteGroups(this,"groups")}},{key:"bindings",get:function(){return new y(this)}}]),t}(u.QueryableInstance);t.RoleAssignment=f;var h=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"roledefinitions";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){return new p(this,"getById("+e+")")}},{key:"getByName",value:function(e){return new p(this,"getbyname('"+e+"')")}},{key:"getByType",value:function(e){return new p(this,"getbytype("+e+")")}},{key:"add",value:function(e,t,n,r){var o=this,i=JSON.stringify({BasePermissions:l.Util.extend({__metadata:{type:"SP.BasePermissions"}},r),Description:t,Name:e,Order:n,__metadata:{type:"SP.RoleDefinition"}});return this.post({body:i}).then(function(e){return{data:e,definition:o.getById(e.Id)}})}}]),t}(u.QueryableCollection);t.RoleDefinitions=h;var p=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"update",value:function(e){var t=this;"undefined"!=typeof e.hasOwnProperty("BasePermissions")&&(e.BasePermissions=l.Util.extend({__metadata:{type:"SP.BasePermissions"}},e.BasePermissions));var n=JSON.stringify(l.Util.extend({__metadata:{type:"SP.RoleDefinition"}},e));return this.post({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(n){var r=t;if(e.hasOwnProperty("Name")){var o=t.getParent(h,t.parentUrl,"");r=o.getByName(e.Name)}return{data:n,definition:r}})}},{key:"delete",value:function(){return this.post({headers:{"X-HTTP-Method":"DELETE"}})}}]),t}(u.QueryableInstance);t.RoleDefinition=p;var y=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"roledefinitionbindings";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),t}(u.QueryableCollection);t.RoleDefinitionBindings=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a,u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"sitegroups";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"add",value:function(e){var t=this,n=JSON.stringify(c.Util.extend({__metadata:{type:"SP.Group"}},e));return this.post({body:n}).then(function(e){return{data:e,group:t.getById(e.Id)}})}},{key:"getByName",value:function(e){return new h(this,"getByName('"+e+"')")}},{key:"getById",value:function(e){var t=new h(this);return t.concat("("+e+")"),t}},{key:"removeById",value:function(e){var n=new t(this,"removeById('"+e+"')");return n.post()}},{key:"removeByLoginName",value:function(e){var n=new t(this,"removeByLoginName('"+e+"')");return n.post()}}]),t}(s.QueryableCollection);t.SiteGroups=f;var h=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"update",value:function(e){var n=this,r=c.Util.extend({__metadata:{type:"SP.Group"}},e);return this.post({body:JSON.stringify(r),headers:{"X-HTTP-Method":"MERGE"}}).then(function(r){var o=n;return e.hasOwnProperty("Title")&&(o=n.getParent(t,n.parentUrl,"getByName('"+e.Title+"')")),{data:r,group:o}})}},{key:"users",get:function(){return new l.SiteUsers(this,"users")}}]),t}(s.QueryableInstance);t.SiteGroup=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"siteusers";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByEmail",value:function(e){return new f(this,"getByEmail('"+e+"')")}},{key:"getById",value:function(e){return new f(this,"getById("+e+")")}},{key:"getByLoginName",value:function(e){var t=new f(this);return t.concat("(@v)"),t.query.add("@v",encodeURIComponent(e)),t}},{key:"removeById",value:function(e){var n=new t(this,"removeById("+e+")");return n.post()}},{key:"removeByLoginName",value:function(e){var n=new t(this,"removeByLoginName(@v)");return n.query.add("@v",encodeURIComponent(e)),n.post()}},{key:"add",value:function(e){var t=this,n=JSON.stringify({__metadata:{type:"SP.User"},LoginName:e});return this.post({body:n}).then(function(){return t.getByLoginName(e)})}}]),t}(u.QueryableCollection);t.SiteUsers=c;var f=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"update",value:function(e){var t=this,n=l.Util.extend({__metadata:{type:"SP.User"}},e);return this.post({body:JSON.stringify(n),headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,user:t}})}},{key:"delete",value:function(){return this.post({headers:{"X-HTTP-Method":"DELETE"}})}},{key:"groups",get:function(){return new s.SiteGroups(this,"groups")}}]),t}(u.QueryableInstance);t.SiteUser=f;var h=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"currentuser";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),t}(u.QueryableInstance);t.CurrentUser=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"lists";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByTitle",value:function(e){return new m(this,"getByTitle('"+e+"')")}},{key:"getById",value:function(e){var t=new m(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=JSON.stringify(d.Util.extend({AllowContentTypes:o,BaseTemplate:n,ContentTypesEnabled:o,Description:t,Title:e,__metadata:{type:"SP.List"}},i));return this.post({body:a}).then(function(t){return{data:t,list:r.getByTitle(e)}})}},{key:"ensure",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(this.hasBatch)throw new b.NotSupportedInBatchException("The ensure list method");return new Promise(function(a,u){var s=r.getByTitle(e);s.get().then(function(e){s.update(i).then(function(e){a({created:!1,data:e,list:s})}).catch(function(e){return u(e)})}).catch(function(s){r.add(e,t,n,o,i).then(function(t){a({created:!0,data:t.data,list:r.getByTitle(e)})}).catch(function(e){return u(e)})})})}},{key:"ensureSiteAssetsLibrary",value:function(){var e=new t(this,"ensuresiteassetslibrary");return e.post().then(function(e){return new m(g.extractOdataId(e))})}},{key:"ensureSitePagesLibrary",value:function(){var e=new t(this,"ensuresitepageslibrary");return e.post().then(function(e){return new m(g.extractOdataId(e))})}}]),t}(p.QueryableCollection);t.Lists=w;var m=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getView",value:function(e){return new s.View(this,"getView('"+e+"')")}},{key:"update",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",o=JSON.stringify(d.Util.extend({__metadata:{type:"SP.List"}},e));return this.post({body:o,headers:{"IF-Match":r,"X-HTTP-Method":"MERGE"}}).then(function(r){var o=n;return e.hasOwnProperty("Title")&&(o=n.getParent(t,n.parentUrl,"getByTitle('"+e.Title+"')")),{data:r,list:o}})}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return this.post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}},{key:"getChanges",value:function(e){var n=JSON.stringify({query:d.Util.extend({__metadata:{type:"SP.ChangeQuery"}},e)}),r=new t(this,"getchanges");return r.post({body:n})}},{key:"getItemsByCAMLQuery",value:function(e){for(var n=JSON.stringify({query:d.Util.extend({__metadata:{type:"SP.CamlQuery"}},e)}),r=new t(this,"getitems"),o=arguments.length,i=Array(o>1?o-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:"items";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"getById",value:function(e){var t=new b(this);return t.concat("("+e+")"),t}},{key:"skip",value:function(e){return this._query.add("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+e)),this}},{key:"getPaged",value:function(){return this.getAs(new m)}},{key:"add",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(n){var r=JSON.stringify(p.Util.extend({__metadata:{type:n}},t));return e.postAs({body:r}).then(function(t){return{data:t,item:e.getById(t.Id)}})};if(n)return r(n);var o=function(){var t=e.getParent(v.List),n=e.addBatchDependency();return{v:t.getListItemEntityTypeFullName().then(function(e){var t=r(e);return n(),t})}}();return"object"===("undefined"==typeof o?"undefined":a(o))?o.v:void 0}}]),t}(s.QueryableCollection);t.Items=g;var b=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"update",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";return new Promise(function(r,o){var i=t.addBatchDependency(),a=t.getParent(s.QueryableInstance,t.parentUrl.substr(0,t.parentUrl.lastIndexOf("/")));a.select("ListItemEntityTypeFullName").getAs().then(function(o){var a=JSON.stringify(p.Util.extend({__metadata:{type:o.ListItemEntityTypeFullName}},e));t.post({body:a,headers:{"IF-Match":n,"X-HTTP-Method":"MERGE"}},new _).then(function(e){i(),r({data:e,item:t})})}).catch(function(e){return o(e)})})}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return this.post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}},{key:"recycle",value:function(){var e=new t(this,"recycle");return e.post()}},{key:"getWopiFrameUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=new t(this,"getWOPIFrameUrl(@action)");return n._query.add("@action",e),n.post().then(function(e){return e.GetWOPIFrameUrl})}},{key:"validateUpdateListItem",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=JSON.stringify({formValues:e,bNewDocumentUpdate:n}),o=new t(this,"validateupdatelistitem");return o.post({body:r})}},{key:"attachmentFiles",get:function(){return new d.AttachmentFiles(this)}},{key:"contentType",get:function(){return new h.ContentType(this,"ContentType")}},{key:"effectiveBasePermissions",get:function(){return new s.Queryable(this,"EffectiveBasePermissions")}},{key:"effectiveBasePermissionsForUI",get:function(){return new s.Queryable(this,"EffectiveBasePermissionsForUI")}},{key:"fieldValuesAsHTML",get:function(){return new s.QueryableInstance(this,"FieldValuesAsHTML")}},{key:"fieldValuesAsText",get:function(){return new s.QueryableInstance(this,"FieldValuesAsText")}},{key:"fieldValuesForEdit",get:function(){return new s.QueryableInstance(this,"FieldValuesForEdit")}},{key:"folder",get:function(){return new c.Folder(this,"folder")}},{key:"file",get:function(){return new f.File(this,"file")}}]),t}(l.QueryableSecurable);t.Item=b;var w=function(){function e(t,n){r(this,e),this.nextUrl=t,this.results=n}return u(e,[{key:"getNext",value:function(){if(this.hasNext){var e=new g(this.nextUrl,null);return e.getPaged()}return new Promise(function(e){return e(null)})}},{key:"hasNext",get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0}}]),e}();t.PagedItemCollection=w;var m=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"parse",value:function(e){var t=this;return new Promise(function(n,r){t.handleError(e,r)&&e.json().then(function(e){var r=e.hasOwnProperty("d")&&e.d.hasOwnProperty("__next")?e.d.__next:e["odata.nextLink"];n(new w(r,t.parseODataJSON(e)))})})}}]),t}(y.ODataParserBase),_=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"parse",value:function(e){var t=this;return new Promise(function(n,r){t.handleError(e,r)&&n({"odata.etag":e.headers.get("etag")})})}}]),t}(y.ODataParserBase)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"folders";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByName",value:function(e){var t=new c(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e){var n=this;return new t(this,"add('"+e+"')").post().then(function(t){return{data:t,folder:n.getByName(e)}})}}]),t}(u.QueryableCollection);t.Folders=l;var c=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return new t(this).post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}},{key:"recycle",value:function(){return new t(this,"recycle").post()}},{key:"contentTypeOrder",get:function(){return new u.QueryableCollection(this,"contentTypeOrder")}},{key:"files",get:function(){return new s.Files(this)}},{key:"folders",get:function(){return new l(this)}},{key:"listItemAllFields",get:function(){return new u.QueryableCollection(this,"listItemAllFields")}},{key:"parentFolder",get:function(){return new t(this,"parentFolder")}},{key:"properties",get:function(){return new u.QueryableInstance(this,"properties")}},{key:"serverRelativeUrl",get:function(){return new u.Queryable(this,"serverRelativeUrl")}},{key:"uniqueContentTypeOrder",get:function(){return new u.QueryableCollection(this,"uniqueContentTypeOrder")}}]),t}(u.QueryableInstance);t.Folder=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"files";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByName",value:function(e){var t=new p(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e,n){var r=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new t(this,"add(overwrite="+o+",url='"+e+"')").post({body:n}).then(function(t){return{data:t,file:r.getByName(e)}})}},{key:"addChunked",value:function(e,n,r){var o=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10485760,u=new t(this,"add(overwrite="+i+",url='"+e+"')");return u.post().then(function(){return o.getByName(e)}).then(function(e){return e.setContentChunked(n,r,a)}).then(function(t){return{data:t,file:o.getByName(e)}})}},{key:"addTemplateFile",value:function(e,n){var r=this;return new t(this,"addTemplateFile(urloffile='"+e+"',templatefiletype="+n+")").post().then(function(t){return{data:t,file:r.getByName(e)}})}}]),t}(u.QueryableCollection);t.Files=h;var p=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"approve",value:function(e){return new t(this,"approve(comment='"+e+"')").post()}},{key:"cancelUpload",value:function(e){return new t(this,"cancelUpload(uploadId=guid'"+e+"')").post()}},{key:"checkin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.Major;return new t(this,"checkin(comment='"+e+"',checkintype="+n+")").post()}},{key:"checkout",value:function(){return new t(this,"checkout").post()}},{key:"copyTo",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new t(this,"copyTo(strnewurl='"+e+"',boverwrite="+n+")").post()}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return new t(this).post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}},{key:"deny",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new t(this,"deny(comment='"+e+"')").post()}},{key:"getLimitedWebPartManager",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.Shared;return new f.LimitedWebPartManager(this,"getLimitedWebPartManager(scope="+e+")")}},{key:"moveTo",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.Overwrite;return new t(this,"moveTo(newurl='"+e+"',flags="+n+")").post()}},{key:"publish",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new t(this,"publish(comment='"+e+"')").post()}},{key:"recycle",value:function(){return new t(this,"recycle").post()}},{key:"undoCheckout",value:function(){return new t(this,"undoCheckout").post()}},{key:"unpublish",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e.length>1023)throw new c.MaxCommentLengthException;return new t(this,"unpublish(comment='"+e+"')").post()}},{key:"getText",value:function(){return new t(this,"$value").get(new s.TextFileParser,{headers:{binaryStringResponseBody:"true"}})}},{key:"getBlob",value:function(){return new t(this,"$value").get(new s.BlobFileParser,{headers:{binaryStringResponseBody:"true"}})}},{key:"getBuffer",value:function(){return new t(this,"$value").get(new s.BufferFileParser,{headers:{binaryStringResponseBody:"true"}})}},{key:"getJSON",value:function(){return new t(this,"$value").get(new s.JSONFileParser,{headers:{binaryStringResponseBody:"true"}})}},{key:"setContent",value:function(e){var n=this,r=new t(this,"$value");return r.post({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(n)})}},{key:"setContentChunked",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10485760;"undefined"==typeof t&&(t=function(){return null});var r=this,o=e.size,i=parseInt((e.size/n).toString(),10)+(e.size%n===0?1:0),a=l.Util.getGUID();t({blockNumber:1,chunkSize:n,currentPointer:0,fileSize:o,stage:"starting",totalBlocks:i});for(var u=r.startUpload(a,e.slice(0,n)),s=function(s){u=u.then(function(u){return t({blockNumber:s,chunkSize:n,currentPointer:u,fileSize:o,stage:"continue",totalBlocks:i}),r.continueUpload(a,u,e.slice(u,u+n))})},c=2;c1&&void 0!==arguments[1]?arguments[1]:"versions";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){var t=new d(this);return t.concat("("+e+")"),t}},{key:"deleteAll",value:function(){return new t(this,"deleteAll").post()}},{key:"deleteById",value:function(e){return new t(this,"deleteById(vid="+e+")").post()}},{key:"deleteByLabel",value:function(e){return new t(this,"deleteByLabel(versionlabel='"+e+"')").post()}},{key:"restoreByLabel",value:function(e){return new t(this,"restoreByLabel(versionlabel='"+e+"')").post()}}]),t}(u.QueryableCollection);t.Versions=y;var d=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return this.post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}}]),t}(u.QueryableInstance);t.Version=d;var v;!function(e){e[e.Minor=0]="Minor",e[e.Major=1]="Major",e[e.Overwrite=2]="Overwrite"}(v=t.CheckinType||(t.CheckinType={}));var g;!function(e){e[e.User=0]="User",e[e.Shared=1]="Shared"}(g=t.WebPartsPersonalizationScope||(t.WebPartsPersonalizationScope={}));var b;!function(e){e[e.Overwrite=1]="Overwrite",e[e.AllowBrokenThickets=8]="AllowBrokenThickets"}(b=t.MoveOperations||(t.MoveOperations={}));var w;!function(e){e[e.StandardPage=0]="StandardPage",e[e.WikiPage=1]="WikiPage",e[e.FormPage=2]="FormPage"}(w=t.TemplateFileType||(t.TemplateFileType={}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"webpart";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),t}(u.QueryableInstance);t.WebPart=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{ +constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"contenttypes";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){var t=new c(this);return t.concat("('"+e+"')"),t}},{key:"addAvailableContentType",value:function(e){var n=this,r=JSON.stringify({contentTypeId:e});return new t(this,"addAvailableContentType").postAs({body:r}).then(function(e){return{contentType:n.getById(e.id),data:e}})}},{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Custom Content Types",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=JSON.stringify(u.Util.extend({Description:n,Group:o,Id:{StringValue:e},Name:t,__metadata:{type:"SP.ContentType"}},i));return this.post({body:a}).then(function(e){return{contentType:r.getById(e.id),data:e}})}}]),t}(s.QueryableCollection);t.ContentTypes=l;var c=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"fieldLinks",get:function(){return new f(this)}},{key:"fields",get:function(){return new s.QueryableCollection(this,"fields")}},{key:"parent",get:function(){return new t(this,"parent")}},{key:"workflowAssociations",get:function(){return new s.QueryableCollection(this,"workflowAssociations")}}]),t}(s.QueryableInstance);t.ContentType=c;var f=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fieldlinks";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){var t=new h(this);return t.concat("(guid'"+e+"')"),t}}]),t}(s.QueryableCollection);t.FieldLinks=f;var h=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),t}(s.QueryableInstance);t.FieldLink=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"AttachmentFiles";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByName",value:function(e){var t=new c(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e,n){var r=this;return new t(this,"add(FileName='"+e+"')").post({body:n}).then(function(t){return{data:t,file:r.getByName(e)}})}}]),t}(u.QueryableCollection);t.AttachmentFiles=l;var c=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getText",value:function(){return new t(this,"$value").get(new s.TextFileParser)}},{key:"getBlob",value:function(){return new t(this,"$value").get(new s.BlobFileParser)}},{key:"getBuffer",value:function(){return new t(this,"$value").get(new s.BufferFileParser)}},{key:"getJSON",value:function(){return new t(this,"$value").get(new s.JSONFileParser)}},{key:"setContent",value:function(e){var n=this,r=new t(this,"$value");return r.post({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(n)})}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";return this.post({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})}}]),t}(u.QueryableInstance);t.AttachmentFile=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=JSON.stringify(s.Util.extend({PersonalView:n,Title:e,__metadata:{type:"SP.View"}},r));return this.postAs({body:o}).then(function(e){return{data:e,view:t.getById(e.Id)}})}}]),t}(u.QueryableCollection);t.Views=l;var c=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"update",value:function(e){var t=this,n=JSON.stringify(s.Util.extend({__metadata:{type:"SP.View"}},e));return this.post({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,view:t}})}},{key:"delete",value:function(){return this.post({headers:{"X-HTTP-Method":"DELETE"}})}},{key:"renderAsHtml",value:function(){var e=new u.Queryable(this,"renderashtml");return e.get()}},{key:"fields",get:function(){return new f(this)}}]),t}(u.QueryableInstance);t.View=c;var f=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"viewfields";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getSchemaXml",value:function(){var e=new u.Queryable(this,"schemaxml");return e.get()}},{key:"add",value:function(e){var n=new t(this,"addviewfield('"+e+"')");return n.post()}},{key:"move",value:function(e,n){var r=new t(this,"moveviewfieldto"),o=JSON.stringify({field:e,index:n});return r.post({body:o})}},{key:"removeAll",value:function(){var e=new t(this,"removeallviewfields");return e.post()}},{key:"remove",value:function(e){var n=new t(this,"removeviewfield('"+e+"')");return n.post()}}]),t}(u.QueryableCollection);t.ViewFields=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"fields";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getByTitle",value:function(e){return new f(this,"getByTitle('"+e+"')")}},{key:"getByInternalNameOrTitle",value:function(e){return new f(this,"getByInternalNameOrTitle('"+e+"')")}},{key:"getById",value:function(e){var t=new f(this);return t.concat("('"+e+"')"),t}},{key:"createFieldAsXml",value:function(e){var n=this,r=void 0;r="string"==typeof e?{SchemaXml:e}:e;var o=JSON.stringify({parameters:s.Util.extend({__metadata:{type:"SP.XmlSchemaFieldCreationInformation"}},r)}),i=new t(this,"createfieldasxml");return i.postAs({body:o}).then(function(e){return{data:e,field:n.getById(e.Id)}})}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=JSON.stringify(s.Util.extend({Title:e,__metadata:{type:t}},r));return this.postAs({body:o}).then(function(e){return{data:e,field:n.getById(e.Id)}})}},{key:"addText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255,n=arguments[2],r={FieldTypeKind:2,MaxLength:t};return this.add(e,"SP.FieldText",s.Util.extend(r,n))}},{key:"addCalculated",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.FieldTypes.Text,o=arguments[4],i={DateFormat:n,FieldTypeKind:17,Formula:t,OutputType:r};return this.add(e,"SP.FieldCalculated",s.Util.extend(i,o))}},{key:"addDateTime",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.DateTimeFieldFormatType.DateOnly,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.CalendarType.Gregorian,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments[4],i={DateTimeCalendarType:n,DisplayFormat:t,FieldTypeKind:4,FriendlyDisplayFormat:r};return this.add(e,"SP.FieldDateTime",s.Util.extend(i,o))}},{key:"addNumber",value:function(e,t,n,r){var o={FieldTypeKind:9};return"undefined"!=typeof t&&(o=s.Util.extend({MinimumValue:t},o)),"undefined"!=typeof n&&(o=s.Util.extend({MaximumValue:n},o)),this.add(e,"SP.FieldNumber",s.Util.extend(o,r))}},{key:"addCurrency",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1033,o=arguments[4],i={CurrencyLocaleId:r,FieldTypeKind:10};return"undefined"!=typeof t&&(i=s.Util.extend({MinimumValue:t},i)),"undefined"!=typeof n&&(i=s.Util.extend({MaximumValue:n},i)),this.add(e,"SP.FieldCurrency",s.Util.extend(i,o))}},{key:"addMultilineText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=arguments[6],u={AllowHyperlink:i,AppendOnly:o,FieldTypeKind:3,NumberOfLines:t,RestrictedMode:r,RichText:n};return this.add(e,"SP.FieldMultiLineText",s.Util.extend(u,a))}},{key:"addUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.UrlFieldFormatType.Hyperlink,n=arguments[2],r={DisplayFormat:t,FieldTypeKind:11};return this.add(e,"SP.FieldUrl",s.Util.extend(r,n))}}]),t}(u.QueryableCollection);t.Fields=c;var f=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"update",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"SP.Field",r=JSON.stringify(s.Util.extend({__metadata:{type:n}},e));return this.post({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,field:t}})}},{key:"delete",value:function(){return this.post({headers:{"X-HTTP-Method":"DELETE"}})}},{key:"setShowInDisplayForm",value:function(e){var n=new t(this,"setshowindisplayform("+e+")");return n.post()}},{key:"setShowInEditForm",value:function(e){var n=new t(this,"setshowineditform("+e+")");return n.post()}},{key:"setShowInNewForm",value:function(e){var n=new t(this,"setshowinnewform("+e+")");return n.post()}}]),t}(u.QueryableInstance);t.Field=f},function(e,t){"use strict";var n;!function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(n=t.ControlMode||(t.ControlMode={}));var r;!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(r=t.FieldTypes||(t.FieldTypes={}));var o;!function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(o=t.DateTimeFieldFormatType||(t.DateTimeFieldFormatType={}));var i;!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(i=t.AddFieldOptions||(t.AddFieldOptions={}));var a;!function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(a=t.CalendarType||(t.CalendarType={}));var u;!function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(u=t.UrlFieldFormatType||(t.UrlFieldFormatType={}));var s;!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(s=t.PrincipalType||(t.PrincipalType={}));var l;!function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(l=t.PageType||(t.PageType={}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"forms";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){var t=new l(this);return t.concat("('"+e+"')"),t}}]),t}(u.QueryableCollection);t.Forms=s;var l=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),t}(u.QueryableInstance);t.Form=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"subscriptions";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"getById",value:function(e){var t=new c(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e,t,n){var r=this,o=JSON.stringify({clientState:n||"pnp-js-core-subscription",expirationDateTime:t,notificationUrl:e,resource:this.toUrl()});return this.post({body:o,headers:{"Content-Type":"application/json"}}).then(function(e){return{data:e,subscription:r.getById(e.id)}})}}]),t}(s.QueryableCollection);t.Subscriptions=l;var c=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"update",value:function(e){var t=this,n=JSON.stringify({expirationDateTime:e});return this.patch({body:n,headers:{"Content-Type":"application/json"}}).then(function(e){return{data:e,subscription:t}})}},{key:"delete",value:function(){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"delete",this).call(this)}}]),t}(s.QueryableInstance);t.Subscription=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"usercustomactions";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"getById",value:function(e){var t=new f(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e){var t=this,n=JSON.stringify(l.Util.extend({__metadata:{type:"SP.UserCustomAction"}},e));return this.post({body:n}).then(function(e){return{action:t.getById(e.Id),data:e}})}},{key:"clear",value:function(){var e=new t(this,"clear");return e.post()}}]),t}(s.QueryableCollection);t.UserCustomActions=c;var f=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"update",value:function(e){var t=this,n=JSON.stringify(l.Util.extend({__metadata:{type:"SP.UserCustomAction"}},e));return this.post({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{action:t,data:e}})}},{key:"delete",value:function(){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"delete",this).call(this)}}]),t}(s.QueryableInstance);t.UserCustomAction=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},u=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2],i=JSON.stringify({IsVisible:o,Title:e,Url:n,__metadata:{type:"SP.NavigationNode"}}),a=new t(this);return a.post({body:i}).then(function(e){return{data:e,node:r.getById(e.Id)}})}},{key:"moveAfter",value:function(e,n){var r=JSON.stringify({nodeId:e,previousNodeId:n}),o=new t(this,"MoveAfter");return o.post({body:r})}}]),t}(l.QueryableCollection);t.NavigationNodes=c;var f=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"update",value:function(e){var t=this,n=JSON.stringify(s.Util.extend({__metadata:{type:"SP.NavigationNode"}},e));return this.post({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,node:t}})}},{key:"delete",value:function(){return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"delete",this).call(this)}},{key:"children",get:function(){return new c(this,"Children")}}]),t}(l.QueryableInstance);t.NavigationNode=f;var h=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"navigation";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),u(t,[{key:"quicklaunch",get:function(){return new c(this,"quicklaunch")}},{key:"topNavigationBar",get:function(){return new c(this,"topnavigationbar")}}]),t}(l.Queryable);t.Navigation=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"features";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"getById",value:function(e){var t=new l(this);return t.concat("('"+e+"')"),t}},{key:"add",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=new t(this,"add");return o.post({body:JSON.stringify({featdefScope:0,featureId:e,force:r})}).then(function(t){return{data:t,feature:n.getById(e)}})}},{key:"remove",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new t(this,"remove");return r.post({body:JSON.stringify({featureId:e,force:n})})}}]),t}(u.QueryableCollection);t.Features=s;var l=function(e){function t(e,n){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"deactivate",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.addBatchDependency(),o=new t(this).select("DefinitionId");return o.getAs().then(function(t){var o=e.getParent(s,e.parentUrl,"").remove(t.DefinitionId,n);return r(),o})}}]),t}(u.QueryableInstance);t.Feature=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"_api/sp.userprofiles.peoplemanager";r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.profileLoader=new f(e),i}return i(t,e),a(t,[{key:"amIFollowedBy",value:function(e){var n=new t(this,"amifollowedby(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()}},{key:"amIFollowing",value:function(e){var n=new t(this,"amifollowing(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()}},{key:"getFollowedTags",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,n=new t(this,"getfollowedtags("+e+")");return n.get()}},{key:"getFollowersFor",value:function(e){var n=new t(this,"getfollowersfor(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()}},{key:"getPeopleFollowedBy",value:function(e){var n=new t(this,"getpeoplefollowedby(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()}},{key:"getPropertiesFor",value:function(e){var n=new t(this,"getpropertiesfor(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()}},{key:"getUserProfilePropertyFor",value:function(e,n){var r=new t(this,"getuserprofilepropertyfor(accountname=@v, propertyname='"+n+"')");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()}},{key:"hideSuggestion",value:function(e){var n=new t(this,"hidesuggestion(@v)");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.post()}},{key:"isFollowing",value:function(e,n){var r=new t(this,null);return r.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.query.add("@y","'"+encodeURIComponent(n)+"'"),r.get()}},{key:"setMyProfilePic",value:function(e){var n=this;return new Promise(function(r,o){s.readBlobAsArrayBuffer(e).then(function(e){var o=new t(n,"setmyprofilepicture");o.post({body:String.fromCharCode.apply(null,new Uint16Array(e))}).then(function(e){return r()})}).catch(function(e){return o(e)})})}},{key:"createPersonalSiteEnqueueBulk",value:function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.profileLoader.createPersonalSite(e)}},{key:"shareAllSocialData",value:function(e){return this.profileLoader.shareAllSocialData(e)}},{key:"editProfileLink",get:function(){var e=new t(this,"EditProfileLink");return e.getAs(l.ODataValue())}},{key:"isMyPeopleListPublic",get:function(){var e=new t(this,"IsMyPeopleListPublic");return e.getAs(l.ODataValue())}},{key:"myFollowers",get:function(){return new u.QueryableCollection(this,"getmyfollowers")}},{key:"myProperties",get:function(){return new t(this,"getmyproperties")}},{key:"trendingTags",get:function(){var e=new t(this,null);return e.concat(".gettrendingtags"),e.get()}},{key:"ownerUserProfile",get:function(){return this.profileLoader.ownerUserProfile}},{key:"userProfile",get:function(){return this.profileLoader.userProfile}}]),t}(u.QueryableInstance);t.UserProfileQuery=c;var f=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_api/sp.userprofiles.profileloader.getprofileloader";return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return i(t,e),a(t,[{key:"createPersonalSiteEnqueueBulk",value:function(e){var n=new t(this,"createpersonalsiteenqueuebulk"),r=JSON.stringify({emailIDs:e});return n.post({body:r})}},{key:"createPersonalSite",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new t(this,"getuserprofile/createpersonalsiteenque("+e+')",');return n.post()}},{key:"shareAllSocialData",value:function(e){var n=new t(this,"getuserprofile/shareallsocialdata("+e+')",');return n.post()}},{key:"ownerUserProfile",get:function(){var e=this.getParent(t,this.parentUrl,"_api/sp.userprofiles.profileloader.getowneruserprofile");return e.postAs()}},{key:"userProfile",get:function(){var e=new t(this,"getuserprofile");return e.postAs()}}]),t}(u.Queryable)},function(e,t){"use strict";function n(e){return o(e,"string")}function r(e){return o(e,"buffer")}function o(e,t){return new Promise(function(n,r){try{var o=new FileReader;switch(o.onload=function(e){n(e.target.result)},t){case"string":o.readAsText(e);break;case"buffer":o.readAsArrayBuffer(e)}}catch(e){r(e)}})}t.readBlobAsText=n,t.readBlobAsArrayBuffer=r},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(43));var o=n(13);t.HttpClient=o.HttpClient;var i=n(44);t.SPRequestExecutorClient=i.SPRequestExecutorClient;var a=n(45);t.NodeFetchClient=a.NodeFetchClient;var u=n(5);t.FetchClient=u.FetchClient,r(n(46));var s=n(8);t.Dictionary=s.Dictionary;var l=n(1);t.Util=l.Util, +r(n(3)),r(n(15))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(17));var o=n(28);t.CheckinType=o.CheckinType,t.WebPartsPersonalizationScope=o.WebPartsPersonalizationScope,t.MoveOperations=o.MoveOperations,t.TemplateFileType=o.TemplateFileType;var i=n(26);t.Item=i.Item,t.PagedItemCollection=i.PagedItemCollection;var a=n(38);t.NavigationNodes=a.NavigationNodes,t.NavigationNode=a.NavigationNode;var u=n(25);t.List=u.List;var s=n(12);t.extractOdataId=s.extractOdataId,t.ODataParserBase=s.ODataParserBase,t.ODataDefaultParser=s.ODataDefaultParser,t.ODataRaw=s.ODataRaw,t.ODataValue=s.ODataValue,t.ODataEntity=s.ODataEntity,t.ODataEntityArray=s.ODataEntityArray,t.TextFileParser=s.TextFileParser,t.BlobFileParser=s.BlobFileParser,t.BufferFileParser=s.BufferFileParser,t.JSONFileParser=s.JSONFileParser;var l=n(22);t.RoleDefinitionBindings=l.RoleDefinitionBindings;var c=n(10);t.Search=c.Search,t.SearchResult=c.SearchResult,t.SearchResults=c.SearchResults,t.SortDirection=c.SortDirection,t.ReorderingRuleMatchType=c.ReorderingRuleMatchType,t.QueryPropertyValueType=c.QueryPropertyValueType;var f=n(18);t.SearchSuggest=f.SearchSuggest,t.SearchSuggestResult=f.SearchSuggestResult;var h=n(19);t.Site=h.Site,r(n(34));var p=n(20);t.Web=p.Web},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"config";r(this,e),this.sourceWeb=t,this.sourceListTitle=n}return o(e,[{key:"getConfiguration",value:function(){return this.web.lists.getByTitle(this.listTitle).items.select("Title","Value").getAs().then(function(e){return e.reduce(function(e,t){return Object.defineProperty(e,t.Title,{configurable:!1,enumerable:!1,value:t.Value,writable:!1})},{})})}},{key:"asCaching",value:function(){var e="splist_"+this.web.toUrl()+"+"+this.listTitle;return new i.default(this,e)}},{key:"web",get:function(){return this.sourceWeb}},{key:"listTitle",get:function(){return this.sourceListTitle}}]),e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}])}); +//# sourceMappingURL=pnp.min.js.map \ No newline at end of file diff --git a/dist/pnp.min.js.map b/dist/pnp.min.js.map new file mode 100644 index 00000000..4116ed52 --- /dev/null +++ b/dist/pnp.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///pnp.min.js","webpack:///webpack/bootstrap 8accb6b83b158f948fc5","webpack:///./lib/pnp.js","webpack:///./lib/utils/util.js","webpack:///./lib/utils/decorators.js","webpack:///./lib/utils/logging.js","webpack:///./lib/configuration/pnplibconfig.js","webpack:///./lib/net/fetchclient.js","webpack:///./lib/utils/storage.js","webpack:///./lib/configuration/configuration.js","webpack:///./lib/collections/collections.js","webpack:///./lib/sharepoint/rest.js","webpack:///./lib/sharepoint/search.js","webpack:///./lib/sharepoint/queryable.js","webpack:///./lib/sharepoint/odata.js","webpack:///./lib/net/httpclient.js","webpack:///./lib/net/digestcache.js","webpack:///./lib/utils/exceptions.js","webpack:///./lib/sharepoint/queryablerequest.js","webpack:///./lib/sharepoint/caching.js","webpack:///./lib/sharepoint/searchsuggest.js","webpack:///./lib/sharepoint/site.js","webpack:///./lib/sharepoint/webs.js","webpack:///./lib/sharepoint/queryablesecurable.js","webpack:///./lib/sharepoint/roles.js","webpack:///./lib/sharepoint/sitegroups.js","webpack:///./lib/sharepoint/siteusers.js","webpack:///./lib/sharepoint/lists.js","webpack:///./lib/sharepoint/items.js","webpack:///./lib/sharepoint/folders.js","webpack:///./lib/sharepoint/files.js","webpack:///./lib/sharepoint/webparts.js","webpack:///./lib/sharepoint/contenttypes.js","webpack:///./lib/sharepoint/attachmentfiles.js","webpack:///./lib/sharepoint/views.js","webpack:///./lib/sharepoint/fields.js","webpack:///./lib/sharepoint/types.js","webpack:///./lib/sharepoint/forms.js","webpack:///./lib/sharepoint/subscriptions.js","webpack:///./lib/sharepoint/usercustomactions.js","webpack:///./lib/sharepoint/navigation.js","webpack:///./lib/sharepoint/features.js","webpack:///./lib/sharepoint/userprofiles.js","webpack:///./lib/utils/files.js","webpack:///./lib/types/index.js","webpack:///./lib/sharepoint/index.js","webpack:///./lib/net/sprequestexecutorclient.js","webpack:///./lib/net/nodefetchclientbrowser.js","webpack:///./lib/configuration/providers/index.js","webpack:///./lib/configuration/providers/cachingConfigurationProvider.js","webpack:///./lib/configuration/providers/spListConfigurationProvider.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__export","hasOwnProperty","util_1","storage_1","configuration_1","logging_1","rest_1","pnplibconfig_1","util","Util","sp","Rest","storage","PnPClientStorage","config","Settings","log","Logger","setup","setRuntimeConfig","Def","Object","defineProperty","value","default","global","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_typeof","Symbol","iterator","obj","constructor","__decorate","decorators","desc","d","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","decorators_1","context","method","_len","params","Array","_key","apply","name","replace","regex","RegExp","test","location","search","results","exec","decodeURIComponent","getUrlParamByName","isFalse","index","s","substring","date","interval","units","ret","Date","toLocaleString","toLowerCase","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","setTime","getTime","undefined","path","avoidCache","encodeURIComponent","toString","head","document","getElementsByTagName","e","createElement","appendChild","setAttribute","_len2","paths","_key2","filter","map","join","chars","text","possible","charAt","Math","floor","random","guid","candidateFunction","array","isArray","source","noOverwrite","check","o","getOwnPropertyNames","v","reduce","t","url","isUrlAbsolute","_spPageContextInfo","combinePaths","webAbsoluteUrl","webServerRelativeUrl","candidateUrl","Promise","resolve","RuntimeConfig","baseUrl","indexOf","substr","deprecated","message","propertyKey","data","level","LogLevel","Warning","args","listeners","listener","subscribe","clearSubscribers","Verbose","json","JSON","stringify","entry","f","measure","get","activeLogLevel","set","_instance","LoggerImpl","count","subscribers","push","slice","subscriber","console","profile","profileEnd","ConsoleListener","msg","format","Info","warn","Error","error","FunctionListener","_runtimeConfig","fetchclient_1","RuntimeConfigImpl","_headers","_defaultCachingStore","_defaultCachingTimeoutSeconds","_globalCacheDisable","_fetchClientFactory","FetchClient","_baseUrl","_spfxContext","headers","globalCacheDisable","defaultCachingStore","defaultCachingTimeoutSeconds","fetchClientFactory","spfxContext","pageContext","web","absoluteUrl","options","fetch","PnPClientStorageWrapper","store","defaultTimeoutMinutes","enabled","getItem","persistable","parse","expiration","delete","expire","setItem","createPersistable","removeItem","getter","_this","then","put","str","dateAdd","local","localStorage","session","sessionStorage","collections_1","_settings","Dictionary","add","hash","reject","merge","provider","_this2","getConfiguration","catch","reason","keys","values","sourceAsDictionary","getKeys","sourceAsHash","val","splice","search_1","searchsuggest_1","site_1","webs_1","userprofiles_1","exceptions_1","query","finalQuery","querytext","SearchSuggest","execute","Querytext","Search","createBatch","addInWebUrl","hostWebUrl","_cdImpl","Site","Web","urlPart","UrlException","UserProfileQuery","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","setPrototypeOf","__proto__","queryable_1","_queryable_1$Queryabl","getPrototypeOf","formattedBody","SelectProperties","RefinementFilters","SortList","HithighlightedProperties","ReorderingRules","Properties","postBody","request","extend","__metadata","type","post","body","SearchResults","QueryableInstance","rawResponse","response","postquery","PrimarySearchResults","formatSearchResults","PrimaryQueryResult","RelevantResults","Table","Rows","RawSearchResults","ElapsedTime","RowCount","TotalRows","TotalRowsIncludingDuplicates","rawResults","tempResults","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","SearchResult","Cells","err","return","rawItem","item","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","Key","Value","SortDirection","ReorderingRuleMatchType","QueryPropertyValueType","odata_1","queryablerequest_1","Queryable","_query","_batch","urlStr","lastIndexOf","_parentUrl","_url","q","pathPart","hasBatch","addBatchDependency","batch","AlreadyInBatchException","_useCaching","_cachingOptions","toUrl","parentUrl","parent","parser","ODataDefaultParser","getOptions","toRequestContext","pipe","postOptions","patchOptions","deleteOptions","verb","dependencyDispose","toAbsoluteUrl","toUrlAndQuery","batchDependency","cachingOptions","isBatched","isCached","requestAbsoluteUrl","requestId","getGUID","QueryableCollection","_Queryable","selects","expands","orderBy","ascending","asc","skip","top","_Queryable2","_len3","_key3","_len4","_key4","extractOdataId","candidate","ODataIdException","getEntityUrl","entity","uri","write","ODataValue","ODataValueParserImpl","ODataEntity","ODataEntityParserImpl","ODataEntityArray","ODataEntityArrayParserImpl","_get","object","property","receiver","Function","httpclient_1","exceptions_2","ODataParserBase","handleError","has","parseFloat","status","parseODataJSON","ok","ProcessHttpClientResponseException","statusText","result","_ODataParserBase","ODataRawParserImpl","_ODataParserBase2","_ODataParserBase3","_this4","_this5","_ODataParserBase4","_this6","_this7","ODataRaw","ODataBatch","_batchId","_requests","_batchDependencies","info","toUpperCase","resolver","promise","_this8","executeImpl","_this9","client","HttpClient","absoluteRequestUrl","batchBody","currentChangeSetId","reqInfo","Accept","Content-Type","batchHeaders","batchOptions","_parseResponse","responses","BatchParseException","chain","_","header","statusRegExp","lines","split","state","line","trim","parts","parseInt","Response","TextFileParser","BlobFileParser","blob","JSONFileParser","BufferFileParser","isFunction","arrayBuffer","buffer","digestcache_1","_impl","_digestCache","DigestCache","opts","cache","credentials","Headers","mergeHeaders","append","APIUrlException","webUrl","getDigest","digest","fetchRaw","rawHeaders","retry","ctx","delay","attempts","retryCount","setTimeout","getCtxCallback","retryContext","temp","Request","forEach","CachedDigest","_httpClient","_digests","cachedDigest","now","Content-type","GetContextWebInformation","newCachedDigest","FormDigestValue","seconds","FormDigestTimeoutSeconds","clear","defaultLog","_Error","NoCacheAvailableException","_Error2","_Error3","_this3","AuthUrlException","_Error4","NodeFetchClientUnsupportedException","_Error5","SPRequestExecutorUndefinedException","_Error6","MaxCommentLengthException","_Error7","NotSupportedInBatchException","_Error8","operation","_Error9","_Error10","_this10","_Error11","_this11","FunctionExpectedException","_Error12","_this12","_Error13","_this13","pipeline","PipelineMethods","logStart","caching","send","logEnd","returnResult","requestPipelineMethod","alwaysRun","hasResult","caching_1","cacheOptions","CachingOptions","setResult","CachingParserWrapper","storeName","_parser","_cacheOptions","mapQueryToQueryString","SearchSuggestResult","personalCount","preQuery","hitHighlighting","capitalize","culture","stemming","includePeople","queryRules","prefixMatch","PeopleNames","suggest","PersonalResults","Queries","usercustomactions_1","features_1","SupportedSchemaVersions","absoluteWebUrl","GetDocumentLibraries","absolutePageUrl","GetWebUrlFromPageUrl","Features","UserCustomActions","queryablesecurable_1","lists_1","fields_1","navigation_1","sitegroups_1","contenttypes_1","folders_1","roles_1","files_1","lists_2","siteusers_1","Webs","webPath","title","description","template","language","inheritPermissions","additionalSettings","Description","Language","Title","Url","UseSamePermissionsAsParentSite","WebTemplate","parameters","_queryablesecurable_","folderRelativeUrl","Folder","fileRelativeUrl","File","listRelativeUrl","List","properties","X-HTTP-Method","colorPaletteUrl","fontSchemeUrl","backgroundImageUrl","shareGenerated","concat","perms","loginName","logonName","includeCrossLanugage","select","SiteUser","filename","size","progId","ContentTypes","Lists","Fields","Navigation","SiteUsers","SiteGroups","CurrentUser","Folders","RoleDefinitions","QueryableSecurable","copyRoleAssignments","clearSubscopes","Breaker","_queryable_1$Queryabl2","copy","b","break","Resetter","_queryable_1$Queryabl3","reset","RoleAssignments","principalId","roleDefId","a","ra","RoleAssignment","RoleDefinitionBindings","RoleDefinition","roleTypeKind","order","basePermissions","BasePermissions","Name","Order","definition","getById","Id","_queryable_1$Queryabl4","retDef","getParent","getByName","_queryable_1$Queryabl5","PrincipalType","group","groupName","SiteGroup","sg","g","retGroup","email","su","LoginName","getByLoginName","user","items_1","views_1","forms_1","subscriptions_1","list","enableContentTypes","AllowContentTypes","BaseTemplate","ContentTypesEnabled","getByTitle","update","created","viewId","View","eTag","IF-Match","retList","expand","Recycle","viewXml","RenderListData","itemId","formId","mode","ListData","ReserveListItemId","getAs","ListItemEntityTypeFullName","Items","Views","Forms","Subscriptions","attachmentfiles_1","Item","PagedItemCollectionParser","listItemEntityTypeFullName","doAdd","listItemEntityType","postAs","_ret","parentList","removeDependency","getListItemEntityTypeFullName","n","ItemUpdatedParser","action","GetWOPIFrameUrl","formValues","newDocumentUpdate","bNewDocumentUpdate","AttachmentFiles","ContentType","PagedItemCollection","nextUrl","hasNext","items","getPaged","_odata_1$ODataParserB","__next","_odata_1$ODataParserB2","odata.etag","folder","Files","webparts_1","content","shouldOverWrite","file","progress","chunkSize","adder","setContentChunked","fileUrl","templateFileType","comment","uploadId","checkinType","CheckinType","Major","scope","WebPartsPersonalizationScope","Shared","LimitedWebPartManager","moveOperations","MoveOperations","Overwrite","binaryStringResponseBody","setter","fileSize","blockCount","blockNumber","currentPointer","stage","totalBlocks","startUpload","_loop","pointer","continueUpload","finishUpload","fragment","fileOffset","ServerRelativeUrl","Versions","versionId","Version","label","TemplateFileType","exporter","webPartId","xml","importer","webPartXml","WebPartDefinitions","WebPartDefinition","deleter","WebPart","ct","contentTypeId","contentType","Group","StringValue","FieldLinks","fl","FieldLink","AttachmentFile","personalView","PersonalView","view","ViewFields","fieldTitleOrInternalName","fieldInternalName","field","Types","Field","SchemaXml","fieldType","maxLength","FieldTypeKind","MaxLength","formula","dateFormat","outputType","FieldTypes","Text","DateFormat","Formula","OutputType","displayFormat","DateTimeFieldFormatType","DateOnly","calendarType","CalendarType","Gregorian","friendlyDisplayFormat","DateTimeCalendarType","DisplayFormat","FriendlyDisplayFormat","minValue","maxValue","MinimumValue","MaximumValue","currencyLocalId","CurrencyLocaleId","numberOfLines","richText","restrictedMode","appendOnly","allowHyperlink","AllowHyperlink","AppendOnly","NumberOfLines","RestrictedMode","RichText","UrlFieldFormatType","Hyperlink","show","ControlMode","AddFieldOptions","PageType","Form","subscriptionId","subscription","Subscription","notificationUrl","expirationDate","clientState","expirationDateTime","resource","patch","uca","UserCustomAction","NavigationNodes","node","NavigationNode","visible","IsVisible","nodeId","previousNodeId","mover","feature","Feature","force","featdefScope","featureId","remover","idGet","remove","DefinitionId","FileUtil","profileLoader","ProfileLoader","maxCount","propertyName","follower","followee","profilePicSource","readBlobAsArrayBuffer","String","fromCharCode","Uint16Array","emails","createPersonalSiteEnqueueBulk","interactiveRequest","createPersonalSite","share","shareAllSocialData","ownerUserProfile","userProfile","emailIDs","readBlobAsText","readBlobAs","reader","FileReader","onload","readAsText","readAsArrayBuffer","sprequestexecutorclient_1","SPRequestExecutorClient","nodefetchclient_1","NodeFetchClient","convertToResponse","spResponse","responseHeaders","h","statusCode","SP","RequestExecutor","addinWebUrl","executor","entries","requestOptions","success","binaryStringRequestBody","executeAsync","cachingConfigurationProvider_1","CachingConfigurationProvider","spListConfigurationProvider_1","SPListConfigurationProvider","wrappedProvider","cacheKey","cacheStore","selectPnPCache","cachedConfig","providerPromise","providedConfig","pnpCache","sourceWeb","sourceListTitle","lists","listTitle","configuration"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,KAAAD,IAEAD,EAAA,KAAAC,KACCK,KAAA,WACD,MCQgB,UAAUC,GCd1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,WAGAR,EAAA,KDwBM,SAASL,EAAQD,EAASM,GE9DhC,YACA,SAASS,GAASH,GACd,IAAK,GAAIE,KAAKF,GAAQZ,EAAQgB,eAAeF,KAAId,EAAQc,GAAKF,EAAEE,IAEpE,GAA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AiJ,MAA9HD,IAAYV,EAAiBH,EAAYe,UAAWF,GAAiBC,GAAaX,EAAiBH,EAAac,GAAqBd,MkDnnT3hBg5B,EAAiCr7B,EAAQ,IAKzCw7B,ElDwnT6B,WkDjnT/B,QAAAA,GAAYS,GAAuC,GAA5BC,GAA4Bp4B,UAAAlB,OAAA,GAAA6D,SAAA3C,UAAA,GAAAA,UAAA,GAAV,QAAU3B,GAAArC,KAAA07B,GAC/C17B,KAAKm8B,UAAYA,EACjBn8B,KAAKo8B,gBAAkBA,ElDurT1B,MAlDA35B,GAAai5B,IACTv4B,IAAK,mBAOLjB,MAAO,WkDrnTR,MAAOlC,MAAKuN,IAAI8uB,MAAMlQ,WAAWnsB,KAAKs8B,WAAWrN,MAAMlH,OAAO,QAAS,SAClEqF,QAAQ1e,KAAK,SAAC1E,GACf,MAAOA,GAAKlB,OAAO,SAACyzB,EAAepnB,GAC/B,MAAOnT,QAAOC,eAAes6B,EAAepnB,EAAKqR,OAC7CvjB,cAAc,EACdD,YAAY,EACZd,MAAOiT,EAAKO,MACZxS,UAAU,clDioTrBC,IAAK,YACLjB,MAAO,WkDvnTR,GAAI05B,aAAqB57B,KAAKuN,IAAIwJ,QAA9B,IAAyC/W,KAAKs8B,SAClD,OAAO,IAAIf,GAA+Bp5B,QAAQnC,KAAM47B,MlD2nTvDz4B,IAAK,MACL6H,IAAK,WkD/pTN,MAAOhL,MAAKm8B,alDyqTXh5B,IAAK,YACL6H,IAAK,WkDlqTN,MAAOhL,MAAKo8B,oBlDuqTRV,IkDzoTZ15B,QAAOC,eAAerC,EAAS,cAAgBsC,OAAO,IACtDtC,EAAQuC,QAAUu5B","file":"pnp.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})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","/**\n * sp-pnp-js v2.0.1 - A JavaScript library for SharePoint development.\n * MIT (https://github.com/SharePoint/PnP-JS-Core/blob/master/LICENSE)\n * Copyright (c) 2016 Microsoft\n * docs: http://officedev.github.io/PnP-JS-Core\n * source: https://github.com/SharePoint/PnP-JS-Core\n * bugs: https://github.com/SharePoint/PnP-JS-Core/issues\n */\n(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})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/assets/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tfunction __export(m) {\n\t for (var p in m) {\n\t if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t }\n\t}\n\tvar util_1 = __webpack_require__(1);\n\tvar storage_1 = __webpack_require__(6);\n\tvar configuration_1 = __webpack_require__(7);\n\tvar logging_1 = __webpack_require__(3);\n\tvar rest_1 = __webpack_require__(9);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\t/**\n\t * Root class of the Patterns and Practices namespace, provides an entry point to the library\n\t */\n\t/**\n\t * Utility methods\n\t */\n\texports.util = util_1.Util;\n\t/**\n\t * Provides access to the REST interface\n\t */\n\texports.sp = new rest_1.Rest();\n\t/**\n\t * Provides access to local and session storage\n\t */\n\texports.storage = new storage_1.PnPClientStorage();\n\t/**\n\t * Global configuration instance to which providers can be added\n\t */\n\texports.config = new configuration_1.Settings();\n\t/**\n\t * Global logging instance to which subscribers can be registered and messages written\n\t */\n\texports.log = logging_1.Logger;\n\t/**\n\t * Allows for the configuration of the library\n\t */\n\texports.setup = pnplibconfig_1.setRuntimeConfig;\n\t/**\n\t * Expose a subset of classes from the library for public consumption\n\t */\n\t__export(__webpack_require__(42));\n\t// creating this class instead of directly assigning to default fixes issue #116\n\tvar Def = {\n\t /**\n\t * Global configuration instance to which providers can be added\n\t */\n\t config: exports.config,\n\t /**\n\t * Global logging instance to which subscribers can be registered and messages written\n\t */\n\t log: exports.log,\n\t /**\n\t * Provides access to local and session storage\n\t */\n\t setup: exports.setup,\n\t /**\n\t * Provides access to the REST interface\n\t */\n\t sp: exports.sp,\n\t /**\n\t * Provides access to local and session storage\n\t */\n\t storage: exports.storage,\n\t /**\n\t * Utility methods\n\t */\n\t util: exports.util\n\t};\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\t/**\n\t * Enables use of the import pnp from syntax\n\t */\n\texports.default = Def;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n\t var c = arguments.length,\n\t r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n\t d;\n\t if ((typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n\t if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n\t }return c > 3 && r && Object.defineProperty(target, key, r), r;\n\t};\n\tvar decorators_1 = __webpack_require__(2);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\t\n\tvar Util = function () {\n\t function Util() {\n\t _classCallCheck(this, Util);\n\t }\n\t\n\t _createClass(Util, null, [{\n\t key: \"getCtxCallback\",\n\t\n\t /**\n\t * Gets a callback function which will maintain context across async calls.\n\t * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n\t *\n\t * @param context The object that will be the 'this' value in the callback\n\t * @param method The method to which we will apply the context and parameters\n\t * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n\t */\n\t value: function getCtxCallback(context, method) {\n\t for (var _len = arguments.length, params = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t params[_key - 2] = arguments[_key];\n\t }\n\t\n\t return function () {\n\t method.apply(context, params);\n\t };\n\t }\n\t /**\n\t * Tests if a url param exists\n\t *\n\t * @param name The name of the url paramter to check\n\t */\n\t\n\t }, {\n\t key: \"urlParamExists\",\n\t value: function urlParamExists(name) {\n\t name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n\t var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n\t return regex.test(location.search);\n\t }\n\t /**\n\t * Gets a url param value by name\n\t *\n\t * @param name The name of the paramter for which we want the value\n\t */\n\t\n\t }, {\n\t key: \"getUrlParamByName\",\n\t value: function getUrlParamByName(name) {\n\t name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n\t var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n\t var results = regex.exec(location.search);\n\t return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n\t }\n\t /**\n\t * Gets a url param by name and attempts to parse a bool value\n\t *\n\t * @param name The name of the paramter for which we want the boolean value\n\t */\n\t\n\t }, {\n\t key: \"getUrlParamBoolByName\",\n\t value: function getUrlParamBoolByName(name) {\n\t var p = this.getUrlParamByName(name);\n\t var isFalse = p === \"\" || /false|0/i.test(p);\n\t return !isFalse;\n\t }\n\t /**\n\t * Inserts the string s into the string target as the index specified by index\n\t *\n\t * @param target The string into which we will insert s\n\t * @param index The location in target to insert s (zero based)\n\t * @param s The string to insert into target at position index\n\t */\n\t\n\t }, {\n\t key: \"stringInsert\",\n\t value: function stringInsert(target, index, s) {\n\t if (index > 0) {\n\t return target.substring(0, index) + s + target.substring(index, target.length);\n\t }\n\t return s + target;\n\t }\n\t /**\n\t * Adds a value to a date\n\t *\n\t * @param date The date to which we will add units, done in local time\n\t * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n\t * @param units The amount to add to date of the given interval\n\t *\n\t * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n\t */\n\t\n\t }, {\n\t key: \"dateAdd\",\n\t value: function dateAdd(date, interval, units) {\n\t var ret = new Date(date.toLocaleString()); // don't change original date\n\t switch (interval.toLowerCase()) {\n\t case \"year\":\n\t ret.setFullYear(ret.getFullYear() + units);\n\t break;\n\t case \"quarter\":\n\t ret.setMonth(ret.getMonth() + 3 * units);\n\t break;\n\t case \"month\":\n\t ret.setMonth(ret.getMonth() + units);\n\t break;\n\t case \"week\":\n\t ret.setDate(ret.getDate() + 7 * units);\n\t break;\n\t case \"day\":\n\t ret.setDate(ret.getDate() + units);\n\t break;\n\t case \"hour\":\n\t ret.setTime(ret.getTime() + units * 3600000);\n\t break;\n\t case \"minute\":\n\t ret.setTime(ret.getTime() + units * 60000);\n\t break;\n\t case \"second\":\n\t ret.setTime(ret.getTime() + units * 1000);\n\t break;\n\t default:\n\t ret = undefined;\n\t break;\n\t }\n\t return ret;\n\t }\n\t /**\n\t * Loads a stylesheet into the current page\n\t *\n\t * @param path The url to the stylesheet\n\t * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n\t */\n\t\n\t }, {\n\t key: \"loadStylesheet\",\n\t value: function loadStylesheet(path, avoidCache) {\n\t if (avoidCache) {\n\t path += \"?\" + encodeURIComponent(new Date().getTime().toString());\n\t }\n\t var head = document.getElementsByTagName(\"head\");\n\t if (head.length > 0) {\n\t var e = document.createElement(\"link\");\n\t head[0].appendChild(e);\n\t e.setAttribute(\"type\", \"text/css\");\n\t e.setAttribute(\"rel\", \"stylesheet\");\n\t e.setAttribute(\"href\", path);\n\t }\n\t }\n\t /**\n\t * Combines an arbitrary set of paths ensuring that the slashes are normalized\n\t *\n\t * @param paths 0 to n path parts to combine\n\t */\n\t\n\t }, {\n\t key: \"combinePaths\",\n\t value: function combinePaths() {\n\t for (var _len2 = arguments.length, paths = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t paths[_key2] = arguments[_key2];\n\t }\n\t\n\t return paths.filter(function (path) {\n\t return typeof path !== \"undefined\" && path !== null;\n\t }).map(function (path) {\n\t return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\");\n\t }).join(\"/\").replace(/\\\\/g, \"/\");\n\t }\n\t /**\n\t * Gets a random string of chars length\n\t *\n\t * @param chars The length of the random string to generate\n\t */\n\t\n\t }, {\n\t key: \"getRandomString\",\n\t value: function getRandomString(chars) {\n\t var text = new Array(chars);\n\t var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t for (var i = 0; i < chars; i++) {\n\t text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n\t }\n\t return text.join(\"\");\n\t }\n\t /**\n\t * Gets a random GUID value\n\t *\n\t * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n\t */\n\t /* tslint:disable no-bitwise */\n\t\n\t }, {\n\t key: \"getGUID\",\n\t value: function getGUID() {\n\t var d = new Date().getTime();\n\t var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n\t var r = (d + Math.random() * 16) % 16 | 0;\n\t d = Math.floor(d / 16);\n\t return (c === \"x\" ? r : r & 0x3 | 0x8).toString(16);\n\t });\n\t return guid;\n\t }\n\t /* tslint:enable */\n\t /**\n\t * Determines if a given value is a function\n\t *\n\t * @param candidateFunction The thing to test for being a function\n\t */\n\t\n\t }, {\n\t key: \"isFunction\",\n\t value: function isFunction(candidateFunction) {\n\t return typeof candidateFunction === \"function\";\n\t }\n\t /**\n\t * @returns whether the provided parameter is a JavaScript Array or not.\n\t */\n\t\n\t }, {\n\t key: \"isArray\",\n\t value: function isArray(array) {\n\t if (Array.isArray) {\n\t return Array.isArray(array);\n\t }\n\t return array && typeof array.length === \"number\" && array.constructor === Array;\n\t }\n\t /**\n\t * Determines if a string is null or empty or undefined\n\t *\n\t * @param s The string to test\n\t */\n\t\n\t }, {\n\t key: \"stringIsNullOrEmpty\",\n\t value: function stringIsNullOrEmpty(s) {\n\t return typeof s === \"undefined\" || s === null || s === \"\";\n\t }\n\t /**\n\t * Provides functionality to extend the given object by doing a shallow copy\n\t *\n\t * @param target The object to which properties will be copied\n\t * @param source The source object from which properties will be copied\n\t * @param noOverwrite If true existing properties on the target are not overwritten from the source\n\t *\n\t */\n\t\n\t }, {\n\t key: \"extend\",\n\t value: function extend(target, source) {\n\t var noOverwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\n\t if (source === null || typeof source === \"undefined\") {\n\t return target;\n\t }\n\t // ensure we don't overwrite things we don't want overwritten\n\t var check = noOverwrite ? function (o, i) {\n\t return !(i in o);\n\t } : function () {\n\t return true;\n\t };\n\t return Object.getOwnPropertyNames(source).filter(function (v) {\n\t return check(target, v);\n\t }).reduce(function (t, v) {\n\t t[v] = source[v];\n\t return t;\n\t }, target);\n\t }\n\t /**\n\t * Determines if a given url is absolute\n\t *\n\t * @param url The url to check to see if it is absolute\n\t */\n\t\n\t }, {\n\t key: \"isUrlAbsolute\",\n\t value: function isUrlAbsolute(url) {\n\t return (/^https?:\\/\\/|^\\/\\//i.test(url)\n\t );\n\t }\n\t /**\n\t * Attempts to make the supplied relative url absolute based on the _spPageContextInfo object, if available\n\t *\n\t * @param url The relative url to make absolute\n\t */\n\t\n\t }, {\n\t key: \"makeUrlAbsolute\",\n\t value: function makeUrlAbsolute(url) {\n\t if (Util.isUrlAbsolute(url)) {\n\t return url;\n\t }\n\t if (typeof global._spPageContextInfo !== \"undefined\") {\n\t if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n\t return Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, url);\n\t } else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n\t return Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, url);\n\t }\n\t } else {\n\t return url;\n\t }\n\t }\n\t /**\n\t * Ensures that a given url is absolute for the current web based on context\n\t *\n\t * @param candidateUrl The url to make absolute\n\t *\n\t */\n\t\n\t }, {\n\t key: \"toAbsoluteUrl\",\n\t value: function toAbsoluteUrl(candidateUrl) {\n\t return new Promise(function (resolve) {\n\t if (Util.isUrlAbsolute(candidateUrl)) {\n\t // if we are already absolute, then just return the url\n\t return resolve(candidateUrl);\n\t }\n\t if (pnplibconfig_1.RuntimeConfig.baseUrl !== null) {\n\t // base url specified either with baseUrl of spfxContext config property\n\t return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.baseUrl, candidateUrl));\n\t }\n\t if (typeof global._spPageContextInfo !== \"undefined\") {\n\t // operating in classic pages\n\t if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n\t return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n\t } else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n\t return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n\t }\n\t }\n\t // does window.location exist and have _layouts in it?\n\t if (typeof global.location !== \"undefined\") {\n\t var index = global.location.toString().toLowerCase().indexOf(\"/_layouts/\");\n\t if (index > 0) {\n\t // we are likely in the workbench in /_layouts/\n\t return resolve(Util.combinePaths(global.location.toString().substr(0, index), candidateUrl));\n\t }\n\t }\n\t return resolve(candidateUrl);\n\t });\n\t }\n\t }]);\n\t\n\t return Util;\n\t}();\n\t\n\t__decorate([decorators_1.deprecated(\"The Util.makeUrlAbsolute method is deprecated and will be removed from future releases. Use Util.toAbsoluteUrl instead\")], Util, \"makeUrlAbsolute\", null);\n\texports.Util = Util;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar logging_1 = __webpack_require__(3);\n\tfunction deprecated(message) {\n\t return function (target, propertyKey, descriptor) {\n\t var method = descriptor.value;\n\t descriptor.value = function () {\n\t logging_1.Logger.log({\n\t data: {\n\t descriptor: descriptor,\n\t propertyKey: propertyKey,\n\t target: target\n\t },\n\t level: logging_1.LogLevel.Warning,\n\t message: message\n\t });\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return method.apply(this, args);\n\t };\n\t };\n\t}\n\texports.deprecated = deprecated;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * A set of logging levels\n\t *\n\t */\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar LogLevel;\n\t(function (LogLevel) {\n\t LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n\t LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n\t LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n\t LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n\t LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n\t})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n\t/**\n\t * Class used to subscribe ILogListener and log messages throughout an application\n\t *\n\t */\n\t\n\tvar Logger = function () {\n\t function Logger() {\n\t _classCallCheck(this, Logger);\n\t }\n\t\n\t _createClass(Logger, null, [{\n\t key: \"subscribe\",\n\t\n\t /**\n\t * Adds ILogListener instances to the set of subscribed listeners\n\t *\n\t * @param listeners One or more listeners to subscribe to this log\n\t */\n\t value: function subscribe() {\n\t for (var _len = arguments.length, listeners = Array(_len), _key = 0; _key < _len; _key++) {\n\t listeners[_key] = arguments[_key];\n\t }\n\t\n\t listeners.map(function (listener) {\n\t return Logger.instance.subscribe(listener);\n\t });\n\t }\n\t /**\n\t * Clears the subscribers collection, returning the collection before modifiction\n\t */\n\t\n\t }, {\n\t key: \"clearSubscribers\",\n\t value: function clearSubscribers() {\n\t return Logger.instance.clearSubscribers();\n\t }\n\t /**\n\t * Gets the current subscriber count\n\t */\n\t\n\t }, {\n\t key: \"write\",\n\t\n\t /**\n\t * Writes the supplied string to the subscribed listeners\n\t *\n\t * @param message The message to write\n\t * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n\t */\n\t value: function write(message) {\n\t var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose;\n\t\n\t Logger.instance.log({ level: level, message: message });\n\t }\n\t /**\n\t * Writes the supplied string to the subscribed listeners\n\t *\n\t * @param json The json object to stringify and write\n\t * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n\t */\n\t\n\t }, {\n\t key: \"writeJSON\",\n\t value: function writeJSON(json) {\n\t var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose;\n\t\n\t Logger.instance.log({ level: level, message: JSON.stringify(json) });\n\t }\n\t /**\n\t * Logs the supplied entry to the subscribed listeners\n\t *\n\t * @param entry The message to log\n\t */\n\t\n\t }, {\n\t key: \"log\",\n\t value: function log(entry) {\n\t Logger.instance.log(entry);\n\t }\n\t /**\n\t * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n\t *\n\t * @param name The name of this profile boundary\n\t * @param f The function to execute and track within this performance boundary\n\t */\n\t\n\t }, {\n\t key: \"measure\",\n\t value: function measure(name, f) {\n\t return Logger.instance.measure(name, f);\n\t }\n\t }, {\n\t key: \"activeLogLevel\",\n\t get: function get() {\n\t return Logger.instance.activeLogLevel;\n\t },\n\t set: function set(value) {\n\t Logger.instance.activeLogLevel = value;\n\t }\n\t }, {\n\t key: \"instance\",\n\t get: function get() {\n\t if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n\t Logger._instance = new LoggerImpl();\n\t }\n\t return Logger._instance;\n\t }\n\t }, {\n\t key: \"count\",\n\t get: function get() {\n\t return Logger.instance.count;\n\t }\n\t }]);\n\t\n\t return Logger;\n\t}();\n\t\n\texports.Logger = Logger;\n\t\n\tvar LoggerImpl = function () {\n\t function LoggerImpl() {\n\t var activeLogLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LogLevel.Warning;\n\t var subscribers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\n\t _classCallCheck(this, LoggerImpl);\n\t\n\t this.activeLogLevel = activeLogLevel;\n\t this.subscribers = subscribers;\n\t }\n\t\n\t _createClass(LoggerImpl, [{\n\t key: \"subscribe\",\n\t value: function subscribe(listener) {\n\t this.subscribers.push(listener);\n\t }\n\t }, {\n\t key: \"clearSubscribers\",\n\t value: function clearSubscribers() {\n\t var s = this.subscribers.slice(0);\n\t this.subscribers.length = 0;\n\t return s;\n\t }\n\t }, {\n\t key: \"write\",\n\t value: function write(message) {\n\t var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogLevel.Verbose;\n\t\n\t this.log({ level: level, message: message });\n\t }\n\t }, {\n\t key: \"log\",\n\t value: function log(entry) {\n\t if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n\t return;\n\t }\n\t this.subscribers.map(function (subscriber) {\n\t return subscriber.log(entry);\n\t });\n\t }\n\t }, {\n\t key: \"measure\",\n\t value: function measure(name, f) {\n\t console.profile(name);\n\t try {\n\t return f();\n\t } finally {\n\t console.profileEnd();\n\t }\n\t }\n\t }, {\n\t key: \"count\",\n\t get: function get() {\n\t return this.subscribers.length;\n\t }\n\t }]);\n\t\n\t return LoggerImpl;\n\t}();\n\t/**\n\t * Implementation of ILogListener which logs to the browser console\n\t *\n\t */\n\t\n\t\n\tvar ConsoleListener = function () {\n\t function ConsoleListener() {\n\t _classCallCheck(this, ConsoleListener);\n\t }\n\t\n\t _createClass(ConsoleListener, [{\n\t key: \"log\",\n\t\n\t /**\n\t * Any associated data that a given logging listener may choose to log or ignore\n\t *\n\t * @param entry The information to be logged\n\t */\n\t value: function log(entry) {\n\t var msg = this.format(entry);\n\t switch (entry.level) {\n\t case LogLevel.Verbose:\n\t case LogLevel.Info:\n\t console.log(msg);\n\t break;\n\t case LogLevel.Warning:\n\t console.warn(msg);\n\t break;\n\t case LogLevel.Error:\n\t console.error(msg);\n\t break;\n\t }\n\t }\n\t /**\n\t * Formats the message\n\t *\n\t * @param entry The information to format into a string\n\t */\n\t\n\t }, {\n\t key: \"format\",\n\t value: function format(entry) {\n\t return \"Message: \" + entry.message + \" Data: \" + JSON.stringify(entry.data);\n\t }\n\t }]);\n\t\n\t return ConsoleListener;\n\t}();\n\t\n\texports.ConsoleListener = ConsoleListener;\n\t/**\n\t * Implementation of ILogListener which logs to the supplied function\n\t *\n\t */\n\t\n\tvar FunctionListener = function () {\n\t /**\n\t * Creates a new instance of the FunctionListener class\n\t *\n\t * @constructor\n\t * @param method The method to which any logging data will be passed\n\t */\n\t function FunctionListener(method) {\n\t _classCallCheck(this, FunctionListener);\n\t\n\t this.method = method;\n\t }\n\t /**\n\t * Any associated data that a given logging listener may choose to log or ignore\n\t *\n\t * @param entry The information to be logged\n\t */\n\t\n\t\n\t _createClass(FunctionListener, [{\n\t key: \"log\",\n\t value: function log(entry) {\n\t this.method(entry);\n\t }\n\t }]);\n\t\n\t return FunctionListener;\n\t}();\n\t\n\texports.FunctionListener = FunctionListener;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar fetchclient_1 = __webpack_require__(5);\n\t\n\tvar RuntimeConfigImpl = function () {\n\t function RuntimeConfigImpl() {\n\t _classCallCheck(this, RuntimeConfigImpl);\n\t\n\t // these are our default values for the library\n\t this._headers = null;\n\t this._defaultCachingStore = \"session\";\n\t this._defaultCachingTimeoutSeconds = 30;\n\t this._globalCacheDisable = false;\n\t this._fetchClientFactory = function () {\n\t return new fetchclient_1.FetchClient();\n\t };\n\t this._baseUrl = null;\n\t this._spfxContext = null;\n\t }\n\t\n\t _createClass(RuntimeConfigImpl, [{\n\t key: \"set\",\n\t value: function set(config) {\n\t if (config.hasOwnProperty(\"headers\")) {\n\t this._headers = config.headers;\n\t }\n\t if (config.hasOwnProperty(\"globalCacheDisable\")) {\n\t this._globalCacheDisable = config.globalCacheDisable;\n\t }\n\t if (config.hasOwnProperty(\"defaultCachingStore\")) {\n\t this._defaultCachingStore = config.defaultCachingStore;\n\t }\n\t if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n\t this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n\t }\n\t if (config.hasOwnProperty(\"fetchClientFactory\")) {\n\t this._fetchClientFactory = config.fetchClientFactory;\n\t }\n\t if (config.hasOwnProperty(\"baseUrl\")) {\n\t this._baseUrl = config.baseUrl;\n\t }\n\t if (config.hasOwnProperty(\"spFXContext\")) {\n\t this._spfxContext = config.spfxContext;\n\t }\n\t }\n\t }, {\n\t key: \"headers\",\n\t get: function get() {\n\t return this._headers;\n\t }\n\t }, {\n\t key: \"defaultCachingStore\",\n\t get: function get() {\n\t return this._defaultCachingStore;\n\t }\n\t }, {\n\t key: \"defaultCachingTimeoutSeconds\",\n\t get: function get() {\n\t return this._defaultCachingTimeoutSeconds;\n\t }\n\t }, {\n\t key: \"globalCacheDisable\",\n\t get: function get() {\n\t return this._globalCacheDisable;\n\t }\n\t }, {\n\t key: \"fetchClientFactory\",\n\t get: function get() {\n\t return this._fetchClientFactory;\n\t }\n\t }, {\n\t key: \"baseUrl\",\n\t get: function get() {\n\t if (this._baseUrl !== null) {\n\t return this._baseUrl;\n\t } else if (this._spfxContext !== null) {\n\t return this._spfxContext.pageContext.web.absoluteUrl;\n\t }\n\t return null;\n\t }\n\t }]);\n\t\n\t return RuntimeConfigImpl;\n\t}();\n\t\n\texports.RuntimeConfigImpl = RuntimeConfigImpl;\n\tvar _runtimeConfig = new RuntimeConfigImpl();\n\texports.RuntimeConfig = _runtimeConfig;\n\tfunction setRuntimeConfig(config) {\n\t _runtimeConfig.set(config);\n\t}\n\texports.setRuntimeConfig = setRuntimeConfig;\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\"use strict\";\n\t/**\n\t * Makes requests using the fetch API\n\t */\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar FetchClient = function () {\n\t function FetchClient() {\n\t _classCallCheck(this, FetchClient);\n\t }\n\t\n\t _createClass(FetchClient, [{\n\t key: \"fetch\",\n\t value: function fetch(url, options) {\n\t return global.fetch(url, options);\n\t }\n\t }]);\n\t\n\t return FetchClient;\n\t}();\n\t\n\texports.FetchClient = FetchClient;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * A wrapper class to provide a consistent interface to browser based storage\n\t *\n\t */\n\t\n\tvar PnPClientStorageWrapper = function () {\n\t /**\n\t * Creates a new instance of the PnPClientStorageWrapper class\n\t *\n\t * @constructor\n\t */\n\t function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\n\t _classCallCheck(this, PnPClientStorageWrapper);\n\t\n\t this.store = store;\n\t this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n\t this.defaultTimeoutMinutes = defaultTimeoutMinutes === void 0 ? 5 : defaultTimeoutMinutes;\n\t this.enabled = this.test();\n\t }\n\t /**\n\t * Get a value from storage, or null if that value does not exist\n\t *\n\t * @param key The key whose value we want to retrieve\n\t */\n\t\n\t\n\t _createClass(PnPClientStorageWrapper, [{\n\t key: \"get\",\n\t value: function get(key) {\n\t if (!this.enabled) {\n\t return null;\n\t }\n\t var o = this.store.getItem(key);\n\t if (o == null) {\n\t return null;\n\t }\n\t var persistable = JSON.parse(o);\n\t if (new Date(persistable.expiration) <= new Date()) {\n\t this.delete(key);\n\t return null;\n\t } else {\n\t return persistable.value;\n\t }\n\t }\n\t /**\n\t * Adds a value to the underlying storage\n\t *\n\t * @param key The key to use when storing the provided value\n\t * @param o The value to store\n\t * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n\t */\n\t\n\t }, {\n\t key: \"put\",\n\t value: function put(key, o, expire) {\n\t if (this.enabled) {\n\t this.store.setItem(key, this.createPersistable(o, expire));\n\t }\n\t }\n\t /**\n\t * Deletes a value from the underlying storage\n\t *\n\t * @param key The key of the pair we want to remove from storage\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete(key) {\n\t if (this.enabled) {\n\t this.store.removeItem(key);\n\t }\n\t }\n\t /**\n\t * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n\t *\n\t * @param key The key to use when storing the provided value\n\t * @param getter A function which will upon execution provide the desired value\n\t * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n\t */\n\t\n\t }, {\n\t key: \"getOrPut\",\n\t value: function getOrPut(key, getter, expire) {\n\t var _this = this;\n\t\n\t if (!this.enabled) {\n\t return getter();\n\t }\n\t return new Promise(function (resolve) {\n\t var o = _this.get(key);\n\t if (o == null) {\n\t getter().then(function (d) {\n\t _this.put(key, d, expire);\n\t resolve(d);\n\t });\n\t } else {\n\t resolve(o);\n\t }\n\t });\n\t }\n\t /**\n\t * Used to determine if the wrapped storage is available currently\n\t */\n\t\n\t }, {\n\t key: \"test\",\n\t value: function test() {\n\t var str = \"test\";\n\t try {\n\t this.store.setItem(str, str);\n\t this.store.removeItem(str);\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t }\n\t /**\n\t * Creates the persistable to store\n\t */\n\t\n\t }, {\n\t key: \"createPersistable\",\n\t value: function createPersistable(o, expire) {\n\t if (typeof expire === \"undefined\") {\n\t expire = util_1.Util.dateAdd(new Date(), \"minute\", this.defaultTimeoutMinutes);\n\t }\n\t return JSON.stringify({ expiration: expire, value: o });\n\t }\n\t }]);\n\t\n\t return PnPClientStorageWrapper;\n\t}();\n\t\n\texports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n\t/**\n\t * A class that will establish wrappers for both local and session storage\n\t */\n\t\n\tvar PnPClientStorage =\n\t/**\n\t * Creates a new instance of the PnPClientStorage class\n\t *\n\t * @constructor\n\t */\n\tfunction PnPClientStorage() {\n\t _classCallCheck(this, PnPClientStorage);\n\t\n\t this.local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : null;\n\t this.session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : null;\n\t};\n\t\n\texports.PnPClientStorage = PnPClientStorage;\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar collections_1 = __webpack_require__(8);\n\t/**\n\t * Class used to manage the current application settings\n\t *\n\t */\n\t\n\tvar Settings = function () {\n\t /**\n\t * Creates a new instance of the settings class\n\t *\n\t * @constructor\n\t */\n\t function Settings() {\n\t _classCallCheck(this, Settings);\n\t\n\t this._settings = new collections_1.Dictionary();\n\t }\n\t /**\n\t * Adds a new single setting, or overwrites a previous setting with the same key\n\t *\n\t * @param {string} key The key used to store this setting\n\t * @param {string} value The setting value to store\n\t */\n\t\n\t\n\t _createClass(Settings, [{\n\t key: \"add\",\n\t value: function add(key, value) {\n\t this._settings.add(key, value);\n\t }\n\t /**\n\t * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n\t *\n\t * @param {string} key The key used to store this setting\n\t * @param {any} value The setting value to store\n\t */\n\t\n\t }, {\n\t key: \"addJSON\",\n\t value: function addJSON(key, value) {\n\t this._settings.add(key, JSON.stringify(value));\n\t }\n\t /**\n\t * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n\t *\n\t * @param {TypedHash} hash The set of values to add\n\t */\n\t\n\t }, {\n\t key: \"apply\",\n\t value: function apply(hash) {\n\t var _this = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t try {\n\t _this._settings.merge(hash);\n\t resolve();\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t }\n\t /**\n\t * Loads configuration settings into the collection from the supplied provider and returns a Promise\n\t *\n\t * @param {IConfigurationProvider} provider The provider from which we will load the settings\n\t */\n\t\n\t }, {\n\t key: \"load\",\n\t value: function load(provider) {\n\t var _this2 = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t provider.getConfiguration().then(function (value) {\n\t _this2._settings.merge(value);\n\t resolve();\n\t }).catch(function (reason) {\n\t reject(reason);\n\t });\n\t });\n\t }\n\t /**\n\t * Gets a value from the configuration\n\t *\n\t * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n\t * @return {string} string value from the configuration\n\t */\n\t\n\t }, {\n\t key: \"get\",\n\t value: function get(key) {\n\t return this._settings.get(key);\n\t }\n\t /**\n\t * Gets a JSON value, rehydrating the stored string to the original object\n\t *\n\t * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n\t * @return {any} object from the configuration\n\t */\n\t\n\t }, {\n\t key: \"getJSON\",\n\t value: function getJSON(key) {\n\t var o = this.get(key);\n\t if (typeof o === \"undefined\" || o === null) {\n\t return o;\n\t }\n\t return JSON.parse(o);\n\t }\n\t }]);\n\t\n\t return Settings;\n\t}();\n\t\n\texports.Settings = Settings;\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * Generic dictionary\n\t */\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Dictionary = function () {\n\t /**\n\t * Creates a new instance of the Dictionary class\n\t *\n\t * @constructor\n\t */\n\t function Dictionary() {\n\t var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\n\t _classCallCheck(this, Dictionary);\n\t\n\t this.keys = keys;\n\t this.values = values;\n\t }\n\t /**\n\t * Gets a value from the collection using the specified key\n\t *\n\t * @param key The key whose value we want to return, returns null if the key does not exist\n\t */\n\t\n\t\n\t _createClass(Dictionary, [{\n\t key: \"get\",\n\t value: function get(key) {\n\t var index = this.keys.indexOf(key);\n\t if (index < 0) {\n\t return null;\n\t }\n\t return this.values[index];\n\t }\n\t /**\n\t * Adds the supplied key and value to the dictionary\n\t *\n\t * @param key The key to add\n\t * @param o The value to add\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(key, o) {\n\t var index = this.keys.indexOf(key);\n\t if (index > -1) {\n\t this.values[index] = o;\n\t } else {\n\t this.keys.push(key);\n\t this.values.push(o);\n\t }\n\t }\n\t /**\n\t * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n\t */\n\t\n\t }, {\n\t key: \"merge\",\n\t value: function merge(source) {\n\t var _this = this;\n\t\n\t if (\"getKeys\" in source) {\n\t (function () {\n\t var sourceAsDictionary = source;\n\t sourceAsDictionary.getKeys().map(function (key) {\n\t _this.add(key, sourceAsDictionary.get(key));\n\t });\n\t })();\n\t } else {\n\t var sourceAsHash = source;\n\t for (var key in sourceAsHash) {\n\t if (sourceAsHash.hasOwnProperty(key)) {\n\t this.add(key, sourceAsHash[key]);\n\t }\n\t }\n\t }\n\t }\n\t /**\n\t * Removes a value from the dictionary\n\t *\n\t * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n\t */\n\t\n\t }, {\n\t key: \"remove\",\n\t value: function remove(key) {\n\t var index = this.keys.indexOf(key);\n\t if (index < 0) {\n\t return null;\n\t }\n\t var val = this.values[index];\n\t this.keys.splice(index, 1);\n\t this.values.splice(index, 1);\n\t return val;\n\t }\n\t /**\n\t * Returns all the keys currently in the dictionary as an array\n\t */\n\t\n\t }, {\n\t key: \"getKeys\",\n\t value: function getKeys() {\n\t return this.keys;\n\t }\n\t /**\n\t * Returns all the values currently in the dictionary as an array\n\t */\n\t\n\t }, {\n\t key: \"getValues\",\n\t value: function getValues() {\n\t return this.values;\n\t }\n\t /**\n\t * Clears the current dictionary\n\t */\n\t\n\t }, {\n\t key: \"clear\",\n\t value: function clear() {\n\t this.keys = [];\n\t this.values = [];\n\t }\n\t /**\n\t * Gets a count of the items currently in the dictionary\n\t */\n\t\n\t }, {\n\t key: \"count\",\n\t value: function count() {\n\t return this.keys.length;\n\t }\n\t }]);\n\t\n\t return Dictionary;\n\t}();\n\t\n\texports.Dictionary = Dictionary;\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar search_1 = __webpack_require__(10);\n\tvar searchsuggest_1 = __webpack_require__(18);\n\tvar site_1 = __webpack_require__(19);\n\tvar webs_1 = __webpack_require__(20);\n\tvar util_1 = __webpack_require__(1);\n\tvar userprofiles_1 = __webpack_require__(40);\n\tvar exceptions_1 = __webpack_require__(15);\n\t/**\n\t * Root of the SharePoint REST module\n\t */\n\t\n\tvar Rest = function () {\n\t function Rest() {\n\t _classCallCheck(this, Rest);\n\t }\n\t\n\t _createClass(Rest, [{\n\t key: \"searchSuggest\",\n\t\n\t /**\n\t * Executes a search against this web context\n\t *\n\t * @param query The SearchQuery definition\n\t */\n\t value: function searchSuggest(query) {\n\t var finalQuery = void 0;\n\t if (typeof query === \"string\") {\n\t finalQuery = { querytext: query };\n\t } else {\n\t finalQuery = query;\n\t }\n\t return new searchsuggest_1.SearchSuggest(\"\").execute(finalQuery);\n\t }\n\t /**\n\t * Executes a search against this web context\n\t *\n\t * @param query The SearchQuery definition\n\t */\n\t\n\t }, {\n\t key: \"search\",\n\t value: function search(query) {\n\t var finalQuery = void 0;\n\t if (typeof query === \"string\") {\n\t finalQuery = { Querytext: query };\n\t } else {\n\t finalQuery = query;\n\t }\n\t return new search_1.Search(\"\").execute(finalQuery);\n\t }\n\t /**\n\t * Begins a site collection scoped REST request\n\t *\n\t */\n\t\n\t }, {\n\t key: \"createBatch\",\n\t\n\t /**\n\t * Creates a new batch object for use with the Queryable.addToBatch method\n\t *\n\t */\n\t value: function createBatch() {\n\t return this.web.createBatch();\n\t }\n\t /**\n\t * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n\t *\n\t * @param addInWebUrl The absolute url of the add-in web\n\t * @param hostWebUrl The absolute url of the host web\n\t */\n\t\n\t }, {\n\t key: \"crossDomainSite\",\n\t value: function crossDomainSite(addInWebUrl, hostWebUrl) {\n\t return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n\t }\n\t /**\n\t * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n\t *\n\t * @param addInWebUrl The absolute url of the add-in web\n\t * @param hostWebUrl The absolute url of the host web\n\t */\n\t\n\t }, {\n\t key: \"crossDomainWeb\",\n\t value: function crossDomainWeb(addInWebUrl, hostWebUrl) {\n\t return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n\t }\n\t /**\n\t * Implements the creation of cross domain REST urls\n\t *\n\t * @param factory The constructor of the object to create Site | Web\n\t * @param addInWebUrl The absolute url of the add-in web\n\t * @param hostWebUrl The absolute url of the host web\n\t * @param urlPart String part to append to the url \"site\" | \"web\"\n\t */\n\t\n\t }, {\n\t key: \"_cdImpl\",\n\t value: function _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart) {\n\t if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n\t throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n\t }\n\t if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n\t throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n\t }\n\t var url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n\t var instance = new factory(url, urlPart);\n\t instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n\t return instance;\n\t }\n\t }, {\n\t key: \"site\",\n\t get: function get() {\n\t return new site_1.Site(\"\");\n\t }\n\t /**\n\t * Begins a web scoped REST request\n\t *\n\t */\n\t\n\t }, {\n\t key: \"web\",\n\t get: function get() {\n\t return new webs_1.Web(\"\");\n\t }\n\t /**\n\t * Access to user profile methods\n\t *\n\t */\n\t\n\t }, {\n\t key: \"profiles\",\n\t get: function get() {\n\t return new userprofiles_1.UserProfileQuery(\"\");\n\t }\n\t }]);\n\t\n\t return Rest;\n\t}();\n\t\n\texports.Rest = Rest;\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Describes the search API\n\t *\n\t */\n\t\n\tvar Search = function (_queryable_1$Queryabl) {\n\t _inherits(Search, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Search class\n\t *\n\t * @param baseUrl The url for the search context\n\t * @param query The SearchQuery object to execute\n\t */\n\t function Search(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/search/postquery\";\n\t\n\t _classCallCheck(this, Search);\n\t\n\t return _possibleConstructorReturn(this, (Search.__proto__ || Object.getPrototypeOf(Search)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * .......\n\t * @returns Promise\n\t */\n\t\n\t\n\t _createClass(Search, [{\n\t key: \"execute\",\n\t value: function execute(query) {\n\t var formattedBody = void 0;\n\t formattedBody = query;\n\t if (formattedBody.SelectProperties) {\n\t formattedBody.SelectProperties = { results: query.SelectProperties };\n\t }\n\t if (formattedBody.RefinementFilters) {\n\t formattedBody.RefinementFilters = { results: query.RefinementFilters };\n\t }\n\t if (formattedBody.SortList) {\n\t formattedBody.SortList = { results: query.SortList };\n\t }\n\t if (formattedBody.HithighlightedProperties) {\n\t formattedBody.HithighlightedProperties = { results: query.HithighlightedProperties };\n\t }\n\t if (formattedBody.ReorderingRules) {\n\t formattedBody.ReorderingRules = { results: query.ReorderingRules };\n\t }\n\t if (formattedBody.Properties) {\n\t formattedBody.Properties = { results: query.Properties };\n\t }\n\t var postBody = JSON.stringify({\n\t request: util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" }\n\t }, formattedBody)\n\t });\n\t return this.post({ body: postBody }).then(function (data) {\n\t return new SearchResults(data);\n\t });\n\t }\n\t }]);\n\t\n\t return Search;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Search = Search;\n\t/**\n\t * Describes the SearchResults class, which returns the formatted and raw version of the query response\n\t */\n\t\n\tvar SearchResults = function () {\n\t /**\n\t * Creates a new instance of the SearchResult class\n\t *\n\t */\n\t function SearchResults(rawResponse) {\n\t _classCallCheck(this, SearchResults);\n\t\n\t var response = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n\t this.PrimarySearchResults = this.formatSearchResults(response.PrimaryQueryResult.RelevantResults.Table.Rows);\n\t this.RawSearchResults = response;\n\t this.ElapsedTime = response.ElapsedTime;\n\t this.RowCount = response.PrimaryQueryResult.RelevantResults.RowCount;\n\t this.TotalRows = response.PrimaryQueryResult.RelevantResults.TotalRows;\n\t this.TotalRowsIncludingDuplicates = response.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n\t }\n\t /**\n\t * Formats a search results array\n\t *\n\t * @param rawResults The array to process\n\t */\n\t\n\t\n\t _createClass(SearchResults, [{\n\t key: \"formatSearchResults\",\n\t value: function formatSearchResults(rawResults) {\n\t var results = new Array(),\n\t tempResults = rawResults.results ? rawResults.results : rawResults;\n\t var _iteratorNormalCompletion = true;\n\t var _didIteratorError = false;\n\t var _iteratorError = undefined;\n\t\n\t try {\n\t for (var _iterator = tempResults[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t var i = _step.value;\n\t\n\t results.push(new SearchResult(i.Cells));\n\t }\n\t } catch (err) {\n\t _didIteratorError = true;\n\t _iteratorError = err;\n\t } finally {\n\t try {\n\t if (!_iteratorNormalCompletion && _iterator.return) {\n\t _iterator.return();\n\t }\n\t } finally {\n\t if (_didIteratorError) {\n\t throw _iteratorError;\n\t }\n\t }\n\t }\n\t\n\t return results;\n\t }\n\t }]);\n\t\n\t return SearchResults;\n\t}();\n\t\n\texports.SearchResults = SearchResults;\n\t/**\n\t * Describes the SearchResult class\n\t */\n\t\n\tvar SearchResult =\n\t/**\n\t * Creates a new instance of the SearchResult class\n\t *\n\t */\n\tfunction SearchResult(rawItem) {\n\t _classCallCheck(this, SearchResult);\n\t\n\t var item = rawItem.results ? rawItem.results : rawItem;\n\t var _iteratorNormalCompletion2 = true;\n\t var _didIteratorError2 = false;\n\t var _iteratorError2 = undefined;\n\t\n\t try {\n\t for (var _iterator2 = item[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t var i = _step2.value;\n\t\n\t Object.defineProperty(this, i.Key, {\n\t configurable: false,\n\t enumerable: false,\n\t value: i.Value,\n\t writable: false\n\t });\n\t }\n\t } catch (err) {\n\t _didIteratorError2 = true;\n\t _iteratorError2 = err;\n\t } finally {\n\t try {\n\t if (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t _iterator2.return();\n\t }\n\t } finally {\n\t if (_didIteratorError2) {\n\t throw _iteratorError2;\n\t }\n\t }\n\t }\n\t};\n\t\n\texports.SearchResult = SearchResult;\n\t/**\n\t * defines the SortDirection enum\n\t */\n\tvar SortDirection;\n\t(function (SortDirection) {\n\t SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n\t SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n\t SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n\t})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n\t/**\n\t * defines the ReorderingRuleMatchType enum\n\t */\n\tvar ReorderingRuleMatchType;\n\t(function (ReorderingRuleMatchType) {\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n\t ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n\t})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n\t/**\n\t * Specifies the type value for the property\n\t */\n\tvar QueryPropertyValueType;\n\t(function (QueryPropertyValueType) {\n\t QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n\t QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n\t QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n\t QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n\t QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n\t QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n\t})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar util_1 = __webpack_require__(1);\n\tvar collections_1 = __webpack_require__(8);\n\tvar odata_1 = __webpack_require__(12);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\tvar exceptions_1 = __webpack_require__(15);\n\tvar queryablerequest_1 = __webpack_require__(16);\n\t/**\n\t * Queryable Base Class\n\t *\n\t */\n\t\n\tvar Queryable = function () {\n\t _createClass(Queryable, [{\n\t key: \"concat\",\n\t\n\t /**\n\t * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n\t *\n\t * @param pathPart The string to concatonate to the url\n\t */\n\t value: function concat(pathPart) {\n\t this._url += pathPart;\n\t }\n\t /**\n\t * Appends the given string and normalizes \"/\" chars\n\t *\n\t * @param pathPart The string to append\n\t */\n\t\n\t }, {\n\t key: \"append\",\n\t value: function append(pathPart) {\n\t this._url = util_1.Util.combinePaths(this._url, pathPart);\n\t }\n\t /**\n\t * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n\t */\n\t\n\t }, {\n\t key: \"addBatchDependency\",\n\t value: function addBatchDependency() {\n\t if (this.hasBatch) {\n\t return this._batch.addBatchDependency();\n\t }\n\t return function () {\n\t return null;\n\t };\n\t }\n\t /**\n\t * Indicates if the current query has a batch associated\n\t *\n\t */\n\t\n\t }, {\n\t key: \"hasBatch\",\n\t get: function get() {\n\t return this._batch !== null;\n\t }\n\t /**\n\t * Gets the parent url used when creating this instance\n\t *\n\t */\n\t\n\t }, {\n\t key: \"parentUrl\",\n\t get: function get() {\n\t return this._parentUrl;\n\t }\n\t /**\n\t * Provides access to the query builder for this url\n\t *\n\t */\n\t\n\t }, {\n\t key: \"query\",\n\t get: function get() {\n\t return this._query;\n\t }\n\t /**\n\t * Creates a new instance of the Queryable class\n\t *\n\t * @constructor\n\t * @param baseUrl A string or Queryable that should form the base part of the url\n\t *\n\t */\n\t\n\t }]);\n\t\n\t function Queryable(baseUrl, path) {\n\t _classCallCheck(this, Queryable);\n\t\n\t this._query = new collections_1.Dictionary();\n\t this._batch = null;\n\t if (typeof baseUrl === \"string\") {\n\t // we need to do some extra parsing to get the parent url correct if we are\n\t // being created from just a string.\n\t var urlStr = baseUrl;\n\t if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n\t this._parentUrl = urlStr;\n\t this._url = util_1.Util.combinePaths(urlStr, path);\n\t } else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n\t // .../items(19)/fields\n\t var index = urlStr.lastIndexOf(\"/\");\n\t this._parentUrl = urlStr.slice(0, index);\n\t path = util_1.Util.combinePaths(urlStr.slice(index), path);\n\t this._url = util_1.Util.combinePaths(this._parentUrl, path);\n\t } else {\n\t // .../items(19)\n\t var _index = urlStr.lastIndexOf(\"(\");\n\t this._parentUrl = urlStr.slice(0, _index);\n\t this._url = util_1.Util.combinePaths(urlStr, path);\n\t }\n\t } else {\n\t var q = baseUrl;\n\t this._parentUrl = q._url;\n\t var target = q._query.get(\"@target\");\n\t if (target !== null) {\n\t this._query.add(\"@target\", target);\n\t }\n\t this._url = util_1.Util.combinePaths(this._parentUrl, path);\n\t }\n\t }\n\t /**\n\t * Adds this query to the supplied batch\n\t *\n\t * @example\n\t * ```\n\t *\n\t * let b = pnp.sp.createBatch();\n\t * pnp.sp.web.inBatch(b).get().then(...);\n\t * b.execute().then(...)\n\t * ```\n\t */\n\t\n\t\n\t _createClass(Queryable, [{\n\t key: \"inBatch\",\n\t value: function inBatch(batch) {\n\t if (this._batch !== null) {\n\t throw new exceptions_1.AlreadyInBatchException();\n\t }\n\t this._batch = batch;\n\t return this;\n\t }\n\t /**\n\t * Enables caching for this request\n\t *\n\t * @param options Defines the options used when caching this request\n\t */\n\t\n\t }, {\n\t key: \"usingCaching\",\n\t value: function usingCaching(options) {\n\t if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n\t this._useCaching = true;\n\t this._cachingOptions = options;\n\t }\n\t return this;\n\t }\n\t /**\n\t * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n\t *\n\t */\n\t\n\t }, {\n\t key: \"toUrl\",\n\t value: function toUrl() {\n\t return this._url;\n\t }\n\t /**\n\t * Gets the full url with query information\n\t *\n\t */\n\t\n\t }, {\n\t key: \"toUrlAndQuery\",\n\t value: function toUrlAndQuery() {\n\t var _this = this;\n\t\n\t var url = this.toUrl();\n\t if (this._query.count() > 0) {\n\t url += \"?\" + this._query.getKeys().map(function (key) {\n\t return key + \"=\" + _this._query.get(key);\n\t }).join(\"&\");\n\t }\n\t return url;\n\t }\n\t /**\n\t * Gets a parent for this instance as specified\n\t *\n\t * @param factory The contructor for the class to create\n\t */\n\t\n\t }, {\n\t key: \"getParent\",\n\t value: function getParent(factory) {\n\t var baseUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.parentUrl;\n\t var path = arguments[2];\n\t\n\t var parent = new factory(baseUrl, path);\n\t var target = this.query.get(\"@target\");\n\t if (target !== null) {\n\t parent.query.add(\"@target\", target);\n\t }\n\t return parent;\n\t }\n\t /**\n\t * Executes the currently built request\n\t *\n\t * @param parser Allows you to specify a parser to handle the result\n\t * @param getOptions The options used for this request\n\t */\n\t\n\t }, {\n\t key: \"get\",\n\t value: function get() {\n\t var parser = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new odata_1.ODataDefaultParser();\n\t var getOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t return this.toRequestContext(\"GET\", getOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"getAs\",\n\t value: function getAs() {\n\t var parser = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new odata_1.ODataDefaultParser();\n\t var getOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t return this.toRequestContext(\"GET\", getOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"post\",\n\t value: function post() {\n\t var postOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser();\n\t\n\t return this.toRequestContext(\"POST\", postOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"postAs\",\n\t value: function postAs() {\n\t var postOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser();\n\t\n\t return this.toRequestContext(\"POST\", postOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"patch\",\n\t value: function patch() {\n\t var patchOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser();\n\t\n\t return this.toRequestContext(\"PATCH\", patchOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t var deleteOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new odata_1.ODataDefaultParser();\n\t\n\t return this.toRequestContext(\"DELETE\", deleteOptions, parser).then(function (context) {\n\t return queryablerequest_1.pipe(context);\n\t });\n\t }\n\t }, {\n\t key: \"toRequestContext\",\n\t value: function toRequestContext(verb) {\n\t var _this2 = this;\n\t\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t var parser = arguments[2];\n\t\n\t var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () {\n\t return;\n\t };\n\t return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\n\t // build our request context\n\t var context = {\n\t batch: _this2._batch,\n\t batchDependency: dependencyDispose,\n\t cachingOptions: _this2._cachingOptions,\n\t isBatched: _this2.hasBatch,\n\t isCached: _this2._useCaching,\n\t options: options,\n\t parser: parser,\n\t requestAbsoluteUrl: url,\n\t requestId: util_1.Util.getGUID(),\n\t verb: verb\n\t };\n\t return context;\n\t });\n\t }\n\t }]);\n\t\n\t return Queryable;\n\t}();\n\t\n\texports.Queryable = Queryable;\n\t/**\n\t * Represents a REST collection which can be filtered, paged, and selected\n\t *\n\t */\n\t\n\tvar QueryableCollection = function (_Queryable) {\n\t _inherits(QueryableCollection, _Queryable);\n\t\n\t function QueryableCollection() {\n\t _classCallCheck(this, QueryableCollection);\n\t\n\t return _possibleConstructorReturn(this, (QueryableCollection.__proto__ || Object.getPrototypeOf(QueryableCollection)).apply(this, arguments));\n\t }\n\t\n\t _createClass(QueryableCollection, [{\n\t key: \"filter\",\n\t\n\t /**\n\t * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n\t *\n\t * @param filter The string representing the filter query\n\t */\n\t value: function filter(_filter) {\n\t this._query.add(\"$filter\", _filter);\n\t return this;\n\t }\n\t /**\n\t * Choose which fields to return\n\t *\n\t * @param selects One or more fields to return\n\t */\n\t\n\t }, {\n\t key: \"select\",\n\t value: function select() {\n\t for (var _len = arguments.length, selects = Array(_len), _key = 0; _key < _len; _key++) {\n\t selects[_key] = arguments[_key];\n\t }\n\t\n\t this._query.add(\"$select\", selects.join(\",\"));\n\t return this;\n\t }\n\t /**\n\t * Expands fields such as lookups to get additional data\n\t *\n\t * @param expands The Fields for which to expand the values\n\t */\n\t\n\t }, {\n\t key: \"expand\",\n\t value: function expand() {\n\t for (var _len2 = arguments.length, expands = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t expands[_key2] = arguments[_key2];\n\t }\n\t\n\t this._query.add(\"$expand\", expands.join(\",\"));\n\t return this;\n\t }\n\t /**\n\t * Orders based on the supplied fields ascending\n\t *\n\t * @param orderby The name of the field to sort on\n\t * @param ascending If false DESC is appended, otherwise ASC (default)\n\t */\n\t\n\t }, {\n\t key: \"orderBy\",\n\t value: function orderBy(_orderBy) {\n\t var ascending = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\t\n\t var keys = this._query.getKeys();\n\t var query = [];\n\t var asc = ascending ? \" asc\" : \" desc\";\n\t for (var i = 0; i < keys.length; i++) {\n\t if (keys[i] === \"$orderby\") {\n\t query.push(this._query.get(\"$orderby\"));\n\t break;\n\t }\n\t }\n\t query.push(\"\" + _orderBy + asc);\n\t this._query.add(\"$orderby\", query.join(\",\"));\n\t return this;\n\t }\n\t /**\n\t * Skips the specified number of items\n\t *\n\t * @param skip The number of items to skip\n\t */\n\t\n\t }, {\n\t key: \"skip\",\n\t value: function skip(_skip) {\n\t this._query.add(\"$skip\", _skip.toString());\n\t return this;\n\t }\n\t /**\n\t * Limits the query to only return the specified number of items\n\t *\n\t * @param top The query row limit\n\t */\n\t\n\t }, {\n\t key: \"top\",\n\t value: function top(_top) {\n\t this._query.add(\"$top\", _top.toString());\n\t return this;\n\t }\n\t }]);\n\t\n\t return QueryableCollection;\n\t}(Queryable);\n\t\n\texports.QueryableCollection = QueryableCollection;\n\t/**\n\t * Represents an instance that can be selected\n\t *\n\t */\n\t\n\tvar QueryableInstance = function (_Queryable2) {\n\t _inherits(QueryableInstance, _Queryable2);\n\t\n\t function QueryableInstance() {\n\t _classCallCheck(this, QueryableInstance);\n\t\n\t return _possibleConstructorReturn(this, (QueryableInstance.__proto__ || Object.getPrototypeOf(QueryableInstance)).apply(this, arguments));\n\t }\n\t\n\t _createClass(QueryableInstance, [{\n\t key: \"select\",\n\t\n\t /**\n\t * Choose which fields to return\n\t *\n\t * @param selects One or more fields to return\n\t */\n\t value: function select() {\n\t for (var _len3 = arguments.length, selects = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t selects[_key3] = arguments[_key3];\n\t }\n\t\n\t this._query.add(\"$select\", selects.join(\",\"));\n\t return this;\n\t }\n\t /**\n\t * Expands fields such as lookups to get additional data\n\t *\n\t * @param expands The Fields for which to expand the values\n\t */\n\t\n\t }, {\n\t key: \"expand\",\n\t value: function expand() {\n\t for (var _len4 = arguments.length, expands = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t expands[_key4] = arguments[_key4];\n\t }\n\t\n\t this._query.add(\"$expand\", expands.join(\",\"));\n\t return this;\n\t }\n\t }]);\n\t\n\t return QueryableInstance;\n\t}(Queryable);\n\t\n\texports.QueryableInstance = QueryableInstance;\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar util_1 = __webpack_require__(1);\n\tvar logging_1 = __webpack_require__(3);\n\tvar httpclient_1 = __webpack_require__(13);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\tvar exceptions_1 = __webpack_require__(15);\n\tvar exceptions_2 = __webpack_require__(15);\n\tfunction extractOdataId(candidate) {\n\t if (candidate.hasOwnProperty(\"odata.id\")) {\n\t return candidate[\"odata.id\"];\n\t } else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n\t return candidate.__metadata.id;\n\t } else {\n\t throw new exceptions_1.ODataIdException(candidate);\n\t }\n\t}\n\texports.extractOdataId = extractOdataId;\n\t\n\tvar ODataParserBase = function () {\n\t function ODataParserBase() {\n\t _classCallCheck(this, ODataParserBase);\n\t }\n\t\n\t _createClass(ODataParserBase, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t var _this = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t if (_this.handleError(r, reject)) {\n\t if (r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0 || r.status === 204) {\n\t resolve({});\n\t } else {\n\t r.json().then(function (json) {\n\t return resolve(_this.parseODataJSON(json));\n\t });\n\t }\n\t }\n\t });\n\t }\n\t }, {\n\t key: \"handleError\",\n\t value: function handleError(r, reject) {\n\t if (!r.ok) {\n\t r.json().then(function (json) {\n\t reject(new exceptions_2.ProcessHttpClientResponseException(r.status, r.statusText, json));\n\t });\n\t }\n\t return r.ok;\n\t }\n\t }, {\n\t key: \"parseODataJSON\",\n\t value: function parseODataJSON(json) {\n\t var result = json;\n\t if (json.hasOwnProperty(\"d\")) {\n\t if (json.d.hasOwnProperty(\"results\")) {\n\t result = json.d.results;\n\t } else {\n\t result = json.d;\n\t }\n\t } else if (json.hasOwnProperty(\"value\")) {\n\t result = json.value;\n\t }\n\t return result;\n\t }\n\t }]);\n\t\n\t return ODataParserBase;\n\t}();\n\t\n\texports.ODataParserBase = ODataParserBase;\n\t\n\tvar ODataDefaultParser = function (_ODataParserBase) {\n\t _inherits(ODataDefaultParser, _ODataParserBase);\n\t\n\t function ODataDefaultParser() {\n\t _classCallCheck(this, ODataDefaultParser);\n\t\n\t return _possibleConstructorReturn(this, (ODataDefaultParser.__proto__ || Object.getPrototypeOf(ODataDefaultParser)).apply(this, arguments));\n\t }\n\t\n\t return ODataDefaultParser;\n\t}(ODataParserBase);\n\t\n\texports.ODataDefaultParser = ODataDefaultParser;\n\t\n\tvar ODataRawParserImpl = function () {\n\t function ODataRawParserImpl() {\n\t _classCallCheck(this, ODataRawParserImpl);\n\t }\n\t\n\t _createClass(ODataRawParserImpl, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t return r.json();\n\t }\n\t }]);\n\t\n\t return ODataRawParserImpl;\n\t}();\n\t\n\texports.ODataRawParserImpl = ODataRawParserImpl;\n\t\n\tvar ODataValueParserImpl = function (_ODataParserBase2) {\n\t _inherits(ODataValueParserImpl, _ODataParserBase2);\n\t\n\t function ODataValueParserImpl() {\n\t _classCallCheck(this, ODataValueParserImpl);\n\t\n\t return _possibleConstructorReturn(this, (ODataValueParserImpl.__proto__ || Object.getPrototypeOf(ODataValueParserImpl)).apply(this, arguments));\n\t }\n\t\n\t _createClass(ODataValueParserImpl, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t return _get(ODataValueParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataValueParserImpl.prototype), \"parse\", this).call(this, r).then(function (d) {\n\t return d;\n\t });\n\t }\n\t }]);\n\t\n\t return ODataValueParserImpl;\n\t}(ODataParserBase);\n\t\n\tvar ODataEntityParserImpl = function (_ODataParserBase3) {\n\t _inherits(ODataEntityParserImpl, _ODataParserBase3);\n\t\n\t function ODataEntityParserImpl(factory) {\n\t _classCallCheck(this, ODataEntityParserImpl);\n\t\n\t var _this4 = _possibleConstructorReturn(this, (ODataEntityParserImpl.__proto__ || Object.getPrototypeOf(ODataEntityParserImpl)).call(this));\n\t\n\t _this4.factory = factory;\n\t return _this4;\n\t }\n\t\n\t _createClass(ODataEntityParserImpl, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t var _this5 = this;\n\t\n\t return _get(ODataEntityParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataEntityParserImpl.prototype), \"parse\", this).call(this, r).then(function (d) {\n\t var o = new _this5.factory(getEntityUrl(d), null);\n\t return util_1.Util.extend(o, d);\n\t });\n\t }\n\t }]);\n\t\n\t return ODataEntityParserImpl;\n\t}(ODataParserBase);\n\t\n\tvar ODataEntityArrayParserImpl = function (_ODataParserBase4) {\n\t _inherits(ODataEntityArrayParserImpl, _ODataParserBase4);\n\t\n\t function ODataEntityArrayParserImpl(factory) {\n\t _classCallCheck(this, ODataEntityArrayParserImpl);\n\t\n\t var _this6 = _possibleConstructorReturn(this, (ODataEntityArrayParserImpl.__proto__ || Object.getPrototypeOf(ODataEntityArrayParserImpl)).call(this));\n\t\n\t _this6.factory = factory;\n\t return _this6;\n\t }\n\t\n\t _createClass(ODataEntityArrayParserImpl, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t var _this7 = this;\n\t\n\t return _get(ODataEntityArrayParserImpl.prototype.__proto__ || Object.getPrototypeOf(ODataEntityArrayParserImpl.prototype), \"parse\", this).call(this, r).then(function (d) {\n\t return d.map(function (v) {\n\t var o = new _this7.factory(getEntityUrl(v), null);\n\t return util_1.Util.extend(o, v);\n\t });\n\t });\n\t }\n\t }]);\n\t\n\t return ODataEntityArrayParserImpl;\n\t}(ODataParserBase);\n\t\n\tfunction getEntityUrl(entity) {\n\t if (entity.hasOwnProperty(\"odata.editLink\")) {\n\t // we are dealign with minimal metadata (default)\n\t return util_1.Util.combinePaths(\"_api\", entity[\"odata.editLink\"]);\n\t } else if (entity.hasOwnProperty(\"__metadata\")) {\n\t // we are dealing with verbose, which has an absolute uri\n\t return entity.__metadata.uri;\n\t } else {\n\t // we are likely dealing with nometadata, so don't error but we won't be able to\n\t // chain off these objects\n\t logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n\t return \"\";\n\t }\n\t}\n\texports.ODataRaw = new ODataRawParserImpl();\n\tfunction ODataValue() {\n\t return new ODataValueParserImpl();\n\t}\n\texports.ODataValue = ODataValue;\n\tfunction ODataEntity(factory) {\n\t return new ODataEntityParserImpl(factory);\n\t}\n\texports.ODataEntity = ODataEntity;\n\tfunction ODataEntityArray(factory) {\n\t return new ODataEntityArrayParserImpl(factory);\n\t}\n\texports.ODataEntityArray = ODataEntityArray;\n\t/**\n\t * Manages a batch of OData operations\n\t */\n\t\n\tvar ODataBatch = function () {\n\t function ODataBatch(baseUrl) {\n\t var _batchId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : util_1.Util.getGUID();\n\t\n\t _classCallCheck(this, ODataBatch);\n\t\n\t this.baseUrl = baseUrl;\n\t this._batchId = _batchId;\n\t this._requests = [];\n\t this._batchDependencies = Promise.resolve();\n\t }\n\t /**\n\t * Adds a request to a batch (not designed for public use)\n\t *\n\t * @param url The full url of the request\n\t * @param method The http method GET, POST, etc\n\t * @param options Any options to include in the request\n\t * @param parser The parser that will hadle the results of the request\n\t */\n\t\n\t\n\t _createClass(ODataBatch, [{\n\t key: \"add\",\n\t value: function add(url, method, options, parser) {\n\t var info = {\n\t method: method.toUpperCase(),\n\t options: options,\n\t parser: parser,\n\t reject: null,\n\t resolve: null,\n\t url: url\n\t };\n\t var p = new Promise(function (resolve, reject) {\n\t info.resolve = resolve;\n\t info.reject = reject;\n\t });\n\t this._requests.push(info);\n\t return p;\n\t }\n\t /**\n\t * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n\t * MUST be cleared using the returned resolve delegate to allow batches to run\n\t */\n\t\n\t }, {\n\t key: \"addBatchDependency\",\n\t value: function addBatchDependency() {\n\t var resolver = void 0;\n\t var promise = new Promise(function (resolve) {\n\t resolver = resolve;\n\t });\n\t this._batchDependencies = this._batchDependencies.then(function () {\n\t return promise;\n\t });\n\t return resolver;\n\t }\n\t /**\n\t * Execute the current batch and resolve the associated promises\n\t *\n\t * @returns A promise which will be resolved once all of the batch's child promises have resolved\n\t */\n\t\n\t }, {\n\t key: \"execute\",\n\t value: function execute() {\n\t var _this8 = this;\n\t\n\t return this._batchDependencies.then(function () {\n\t return _this8.executeImpl();\n\t });\n\t }\n\t }, {\n\t key: \"executeImpl\",\n\t value: function executeImpl() {\n\t var _this9 = this;\n\t\n\t logging_1.Logger.write(\"Executing batch with \" + this._requests.length + \" requests.\", logging_1.LogLevel.Info);\n\t // if we don't have any requests, don't bother sending anything\n\t // this could be due to caching further upstream, or just an empty batch\n\t if (this._requests.length < 1) {\n\t logging_1.Logger.write(\"Resolving empty batch.\", logging_1.LogLevel.Info);\n\t return Promise.resolve();\n\t }\n\t // creating the client here allows the url to be populated for nodejs client as well as potentially\n\t // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n\t // below to be correct\n\t var client = new httpclient_1.HttpClient();\n\t // due to timing we need to get the absolute url here so we can use it for all the individual requests\n\t // and for sending the entire batch\n\t return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\n\t // build all the requests, send them, pipe results in order to parsers\n\t var batchBody = [];\n\t var currentChangeSetId = \"\";\n\t _this9._requests.map(function (reqInfo) {\n\t if (reqInfo.method === \"GET\") {\n\t if (currentChangeSetId.length > 0) {\n\t // end an existing change set\n\t batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n\t currentChangeSetId = \"\";\n\t }\n\t batchBody.push(\"--batch_\" + _this9._batchId + \"\\n\");\n\t } else {\n\t if (currentChangeSetId.length < 1) {\n\t // start new change set\n\t currentChangeSetId = util_1.Util.getGUID();\n\t batchBody.push(\"--batch_\" + _this9._batchId + \"\\n\");\n\t batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\n\t }\n\t batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\n\t }\n\t // common batch part prefix\n\t batchBody.push(\"Content-Type: application/http\\n\");\n\t batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\n\t var headers = {\n\t \"Accept\": \"application/json;\"\n\t };\n\t // this is the url of the individual request within the batch\n\t var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n\t logging_1.Logger.write(\"Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", logging_1.LogLevel.Verbose);\n\t if (reqInfo.method !== \"GET\") {\n\t var method = reqInfo.method;\n\t if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n\t method = reqInfo.options.headers[\"X-HTTP-Method\"];\n\t delete reqInfo.options.headers[\"X-HTTP-Method\"];\n\t }\n\t batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\n\t headers = util_1.Util.extend(headers, { \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\" });\n\t } else {\n\t batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\n\t }\n\t if (typeof pnplibconfig_1.RuntimeConfig.headers !== \"undefined\") {\n\t headers = util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.headers);\n\t }\n\t if (reqInfo.options && reqInfo.options.headers) {\n\t headers = util_1.Util.extend(headers, reqInfo.options.headers);\n\t }\n\t for (var name in headers) {\n\t if (headers.hasOwnProperty(name)) {\n\t batchBody.push(name + \": \" + headers[name] + \"\\n\");\n\t }\n\t }\n\t batchBody.push(\"\\n\");\n\t if (reqInfo.options.body) {\n\t batchBody.push(reqInfo.options.body + \"\\n\\n\");\n\t }\n\t });\n\t if (currentChangeSetId.length > 0) {\n\t // Close the changeset\n\t batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n\t currentChangeSetId = \"\";\n\t }\n\t batchBody.push(\"--batch_\" + _this9._batchId + \"--\\n\");\n\t var batchHeaders = {\n\t \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this9._batchId\n\t };\n\t var batchOptions = {\n\t \"body\": batchBody.join(\"\"),\n\t \"headers\": batchHeaders\n\t };\n\t logging_1.Logger.write(\"Sending batch request.\", logging_1.LogLevel.Info);\n\t return client.post(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions).then(function (r) {\n\t return r.text();\n\t }).then(_this9._parseResponse).then(function (responses) {\n\t if (responses.length !== _this9._requests.length) {\n\t throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n\t }\n\t logging_1.Logger.write(\"Resolving batched requests.\", logging_1.LogLevel.Info);\n\t return responses.reduce(function (chain, response, index) {\n\t var request = _this9._requests[index];\n\t logging_1.Logger.write(\"Resolving request \" + request.method + \" \" + request.url + \".\", logging_1.LogLevel.Verbose);\n\t return chain.then(function (_) {\n\t return request.parser.parse(response).then(request.resolve).catch(request.reject);\n\t });\n\t }, Promise.resolve());\n\t });\n\t });\n\t }\n\t /**\n\t * Parses the response from a batch request into an array of Response instances\n\t *\n\t * @param body Text body of the response from the batch request\n\t */\n\t\n\t }, {\n\t key: \"_parseResponse\",\n\t value: function _parseResponse(body) {\n\t return new Promise(function (resolve, reject) {\n\t var responses = [];\n\t var header = \"--batchresponse_\";\n\t // Ex. \"HTTP/1.1 500 Internal Server Error\"\n\t var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n\t var lines = body.split(\"\\n\");\n\t var state = \"batch\";\n\t var status = void 0;\n\t var statusText = void 0;\n\t for (var i = 0; i < lines.length; ++i) {\n\t var line = lines[i];\n\t switch (state) {\n\t case \"batch\":\n\t if (line.substr(0, header.length) === header) {\n\t state = \"batchHeaders\";\n\t } else {\n\t if (line.trim() !== \"\") {\n\t throw new exceptions_1.BatchParseException(\"Invalid response, line \" + i);\n\t }\n\t }\n\t break;\n\t case \"batchHeaders\":\n\t if (line.trim() === \"\") {\n\t state = \"status\";\n\t }\n\t break;\n\t case \"status\":\n\t var parts = statusRegExp.exec(line);\n\t if (parts.length !== 3) {\n\t throw new exceptions_1.BatchParseException(\"Invalid status, line \" + i);\n\t }\n\t status = parseInt(parts[1], 10);\n\t statusText = parts[2];\n\t state = \"statusHeaders\";\n\t break;\n\t case \"statusHeaders\":\n\t if (line.trim() === \"\") {\n\t state = \"body\";\n\t }\n\t break;\n\t case \"body\":\n\t responses.push(status === 204 ? new Response() : new Response(line, { status: status, statusText: statusText }));\n\t state = \"batch\";\n\t break;\n\t }\n\t }\n\t if (state !== \"status\") {\n\t reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n\t }\n\t resolve(responses);\n\t });\n\t }\n\t }]);\n\t\n\t return ODataBatch;\n\t}();\n\t\n\texports.ODataBatch = ODataBatch;\n\t\n\tvar TextFileParser = function () {\n\t function TextFileParser() {\n\t _classCallCheck(this, TextFileParser);\n\t }\n\t\n\t _createClass(TextFileParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t return r.text();\n\t }\n\t }]);\n\t\n\t return TextFileParser;\n\t}();\n\t\n\texports.TextFileParser = TextFileParser;\n\t\n\tvar BlobFileParser = function () {\n\t function BlobFileParser() {\n\t _classCallCheck(this, BlobFileParser);\n\t }\n\t\n\t _createClass(BlobFileParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t return r.blob();\n\t }\n\t }]);\n\t\n\t return BlobFileParser;\n\t}();\n\t\n\texports.BlobFileParser = BlobFileParser;\n\t\n\tvar JSONFileParser = function () {\n\t function JSONFileParser() {\n\t _classCallCheck(this, JSONFileParser);\n\t }\n\t\n\t _createClass(JSONFileParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t return r.json();\n\t }\n\t }]);\n\t\n\t return JSONFileParser;\n\t}();\n\t\n\texports.JSONFileParser = JSONFileParser;\n\t\n\tvar BufferFileParser = function () {\n\t function BufferFileParser() {\n\t _classCallCheck(this, BufferFileParser);\n\t }\n\t\n\t _createClass(BufferFileParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t if (util_1.Util.isFunction(r.arrayBuffer)) {\n\t return r.arrayBuffer();\n\t }\n\t return r.buffer();\n\t }\n\t }]);\n\t\n\t return BufferFileParser;\n\t}();\n\t\n\texports.BufferFileParser = BufferFileParser;\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar digestcache_1 = __webpack_require__(14);\n\tvar util_1 = __webpack_require__(1);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\tvar exceptions_1 = __webpack_require__(15);\n\t\n\tvar HttpClient = function () {\n\t function HttpClient() {\n\t _classCallCheck(this, HttpClient);\n\t\n\t this._impl = pnplibconfig_1.RuntimeConfig.fetchClientFactory();\n\t this._digestCache = new digestcache_1.DigestCache(this);\n\t }\n\t\n\t _createClass(HttpClient, [{\n\t key: \"fetch\",\n\t value: function fetch(url) {\n\t var _this = this;\n\t\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t var opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n\t var headers = new Headers();\n\t // first we add the global headers so they can be overwritten by any passed in locally to this call\n\t this.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.headers);\n\t // second we add the local options so we can overwrite the globals\n\t this.mergeHeaders(headers, options.headers);\n\t // lastly we apply any default headers we need that may not exist\n\t if (!headers.has(\"Accept\")) {\n\t headers.append(\"Accept\", \"application/json\");\n\t }\n\t if (!headers.has(\"Content-Type\")) {\n\t headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n\t }\n\t if (!headers.has(\"X-ClientService-ClientTag\")) {\n\t headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:2.0.1\");\n\t }\n\t opts = util_1.Util.extend(opts, { headers: headers });\n\t if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n\t if (!headers.has(\"X-RequestDigest\")) {\n\t var index = url.indexOf(\"_api/\");\n\t if (index < 0) {\n\t throw new exceptions_1.APIUrlException();\n\t }\n\t var webUrl = url.substr(0, index);\n\t return this._digestCache.getDigest(webUrl).then(function (digest) {\n\t headers.append(\"X-RequestDigest\", digest);\n\t return _this.fetchRaw(url, opts);\n\t });\n\t }\n\t }\n\t return this.fetchRaw(url, opts);\n\t }\n\t }, {\n\t key: \"fetchRaw\",\n\t value: function fetchRaw(url) {\n\t var _this2 = this;\n\t\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t // here we need to normalize the headers\n\t var rawHeaders = new Headers();\n\t this.mergeHeaders(rawHeaders, options.headers);\n\t options = util_1.Util.extend(options, { headers: rawHeaders });\n\t var retry = function retry(ctx) {\n\t _this2._impl.fetch(url, options).then(function (response) {\n\t return ctx.resolve(response);\n\t }).catch(function (response) {\n\t // grab our current delay\n\t var delay = ctx.delay;\n\t // Check if request was throttled - http status code 429\n\t // Check is request failed due to server unavailable - http status code 503\n\t if (response.status !== 429 && response.status !== 503) {\n\t ctx.reject(response);\n\t }\n\t // Increment our counters.\n\t ctx.delay *= 2;\n\t ctx.attempts++;\n\t // If we have exceeded the retry count, reject.\n\t if (ctx.retryCount <= ctx.attempts) {\n\t ctx.reject(response);\n\t }\n\t // Set our retry timeout for {delay} milliseconds.\n\t setTimeout(util_1.Util.getCtxCallback(_this2, retry, ctx), delay);\n\t });\n\t };\n\t return new Promise(function (resolve, reject) {\n\t var retryContext = {\n\t attempts: 0,\n\t delay: 100,\n\t reject: reject,\n\t resolve: resolve,\n\t retryCount: 7\n\t };\n\t retry.call(_this2, retryContext);\n\t });\n\t }\n\t }, {\n\t key: \"get\",\n\t value: function get(url) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t var opts = util_1.Util.extend(options, { method: \"GET\" });\n\t return this.fetch(url, opts);\n\t }\n\t }, {\n\t key: \"post\",\n\t value: function post(url) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t var opts = util_1.Util.extend(options, { method: \"POST\" });\n\t return this.fetch(url, opts);\n\t }\n\t }, {\n\t key: \"patch\",\n\t value: function patch(url) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n\t return this.fetch(url, opts);\n\t }\n\t }, {\n\t key: \"delete\",\n\t value: function _delete(url) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n\t return this.fetch(url, opts);\n\t }\n\t }, {\n\t key: \"mergeHeaders\",\n\t value: function mergeHeaders(target, source) {\n\t if (typeof source !== \"undefined\" && source !== null) {\n\t var temp = new Request(\"\", { headers: source });\n\t temp.headers.forEach(function (value, name) {\n\t target.append(name, value);\n\t });\n\t }\n\t }\n\t }]);\n\t\n\t return HttpClient;\n\t}();\n\t\n\texports.HttpClient = HttpClient;\n\t;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar collections_1 = __webpack_require__(8);\n\tvar util_1 = __webpack_require__(1);\n\tvar odata_1 = __webpack_require__(12);\n\t\n\tvar CachedDigest = function CachedDigest() {\n\t _classCallCheck(this, CachedDigest);\n\t};\n\t\n\texports.CachedDigest = CachedDigest;\n\t\n\tvar DigestCache = function () {\n\t function DigestCache(_httpClient) {\n\t var _digests = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new collections_1.Dictionary();\n\t\n\t _classCallCheck(this, DigestCache);\n\t\n\t this._httpClient = _httpClient;\n\t this._digests = _digests;\n\t }\n\t\n\t _createClass(DigestCache, [{\n\t key: \"getDigest\",\n\t value: function getDigest(webUrl) {\n\t var _this = this;\n\t\n\t var cachedDigest = this._digests.get(webUrl);\n\t if (cachedDigest !== null) {\n\t var now = new Date();\n\t if (now < cachedDigest.expiration) {\n\t return Promise.resolve(cachedDigest.value);\n\t }\n\t }\n\t var url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n\t return this._httpClient.fetchRaw(url, {\n\t cache: \"no-cache\",\n\t credentials: \"same-origin\",\n\t headers: {\n\t \"Accept\": \"application/json;odata=verbose\",\n\t \"Content-type\": \"application/json;odata=verbose;charset=utf-8\"\n\t },\n\t method: \"POST\"\n\t }).then(function (response) {\n\t var parser = new odata_1.ODataDefaultParser();\n\t return parser.parse(response).then(function (d) {\n\t return d.GetContextWebInformation;\n\t });\n\t }).then(function (data) {\n\t var newCachedDigest = new CachedDigest();\n\t newCachedDigest.value = data.FormDigestValue;\n\t var seconds = data.FormDigestTimeoutSeconds;\n\t var expiration = new Date();\n\t expiration.setTime(expiration.getTime() + 1000 * seconds);\n\t newCachedDigest.expiration = expiration;\n\t _this._digests.add(webUrl, newCachedDigest);\n\t return newCachedDigest.value;\n\t });\n\t }\n\t }, {\n\t key: \"clear\",\n\t value: function clear() {\n\t this._digests.clear();\n\t }\n\t }]);\n\t\n\t return DigestCache;\n\t}();\n\t\n\texports.DigestCache = DigestCache;\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar logging_1 = __webpack_require__(3);\n\tfunction defaultLog(error) {\n\t logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: \"[\" + error.name + \"]::\" + error.message });\n\t}\n\t/**\n\t * Represents an exception with an HttpClient request\n\t *\n\t */\n\t\n\tvar ProcessHttpClientResponseException = function (_Error) {\n\t _inherits(ProcessHttpClientResponseException, _Error);\n\t\n\t function ProcessHttpClientResponseException(status, statusText, data) {\n\t _classCallCheck(this, ProcessHttpClientResponseException);\n\t\n\t var _this = _possibleConstructorReturn(this, (ProcessHttpClientResponseException.__proto__ || Object.getPrototypeOf(ProcessHttpClientResponseException)).call(this, \"Error making HttpClient request in queryable: [\" + status + \"] \" + statusText));\n\t\n\t _this.status = status;\n\t _this.statusText = statusText;\n\t _this.data = data;\n\t _this.name = \"ProcessHttpClientResponseException\";\n\t logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message });\n\t return _this;\n\t }\n\t\n\t return ProcessHttpClientResponseException;\n\t}(Error);\n\t\n\texports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\n\t\n\tvar NoCacheAvailableException = function (_Error2) {\n\t _inherits(NoCacheAvailableException, _Error2);\n\t\n\t function NoCacheAvailableException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"Cannot create a caching configuration provider since cache is not available.\";\n\t\n\t _classCallCheck(this, NoCacheAvailableException);\n\t\n\t var _this2 = _possibleConstructorReturn(this, (NoCacheAvailableException.__proto__ || Object.getPrototypeOf(NoCacheAvailableException)).call(this, msg));\n\t\n\t _this2.name = \"NoCacheAvailableException\";\n\t defaultLog(_this2);\n\t return _this2;\n\t }\n\t\n\t return NoCacheAvailableException;\n\t}(Error);\n\t\n\texports.NoCacheAvailableException = NoCacheAvailableException;\n\t\n\tvar APIUrlException = function (_Error3) {\n\t _inherits(APIUrlException, _Error3);\n\t\n\t function APIUrlException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"Unable to determine API url.\";\n\t\n\t _classCallCheck(this, APIUrlException);\n\t\n\t var _this3 = _possibleConstructorReturn(this, (APIUrlException.__proto__ || Object.getPrototypeOf(APIUrlException)).call(this, msg));\n\t\n\t _this3.name = \"APIUrlException\";\n\t defaultLog(_this3);\n\t return _this3;\n\t }\n\t\n\t return APIUrlException;\n\t}(Error);\n\t\n\texports.APIUrlException = APIUrlException;\n\t\n\tvar AuthUrlException = function (_Error4) {\n\t _inherits(AuthUrlException, _Error4);\n\t\n\t function AuthUrlException(data) {\n\t var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"Auth URL Endpoint could not be determined from data. Data logged.\";\n\t\n\t _classCallCheck(this, AuthUrlException);\n\t\n\t var _this4 = _possibleConstructorReturn(this, (AuthUrlException.__proto__ || Object.getPrototypeOf(AuthUrlException)).call(this, msg));\n\t\n\t _this4.name = \"APIUrlException\";\n\t logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this4.message });\n\t return _this4;\n\t }\n\t\n\t return AuthUrlException;\n\t}(Error);\n\t\n\texports.AuthUrlException = AuthUrlException;\n\t\n\tvar NodeFetchClientUnsupportedException = function (_Error5) {\n\t _inherits(NodeFetchClientUnsupportedException, _Error5);\n\t\n\t function NodeFetchClientUnsupportedException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"Using NodeFetchClient in the browser is not supported.\";\n\t\n\t _classCallCheck(this, NodeFetchClientUnsupportedException);\n\t\n\t var _this5 = _possibleConstructorReturn(this, (NodeFetchClientUnsupportedException.__proto__ || Object.getPrototypeOf(NodeFetchClientUnsupportedException)).call(this, msg));\n\t\n\t _this5.name = \"NodeFetchClientUnsupportedException\";\n\t defaultLog(_this5);\n\t return _this5;\n\t }\n\t\n\t return NodeFetchClientUnsupportedException;\n\t}(Error);\n\t\n\texports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\n\t\n\tvar SPRequestExecutorUndefinedException = function (_Error6) {\n\t _inherits(SPRequestExecutorUndefinedException, _Error6);\n\t\n\t function SPRequestExecutorUndefinedException() {\n\t _classCallCheck(this, SPRequestExecutorUndefinedException);\n\t\n\t var msg = [\"SP.RequestExecutor is undefined. \", \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\"].join(\" \");\n\t\n\t var _this6 = _possibleConstructorReturn(this, (SPRequestExecutorUndefinedException.__proto__ || Object.getPrototypeOf(SPRequestExecutorUndefinedException)).call(this, msg));\n\t\n\t _this6.name = \"SPRequestExecutorUndefinedException\";\n\t defaultLog(_this6);\n\t return _this6;\n\t }\n\t\n\t return SPRequestExecutorUndefinedException;\n\t}(Error);\n\t\n\texports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\n\t\n\tvar MaxCommentLengthException = function (_Error7) {\n\t _inherits(MaxCommentLengthException, _Error7);\n\t\n\t function MaxCommentLengthException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"The maximum comment length is 1023 characters.\";\n\t\n\t _classCallCheck(this, MaxCommentLengthException);\n\t\n\t var _this7 = _possibleConstructorReturn(this, (MaxCommentLengthException.__proto__ || Object.getPrototypeOf(MaxCommentLengthException)).call(this, msg));\n\t\n\t _this7.name = \"MaxCommentLengthException\";\n\t defaultLog(_this7);\n\t return _this7;\n\t }\n\t\n\t return MaxCommentLengthException;\n\t}(Error);\n\t\n\texports.MaxCommentLengthException = MaxCommentLengthException;\n\t\n\tvar NotSupportedInBatchException = function (_Error8) {\n\t _inherits(NotSupportedInBatchException, _Error8);\n\t\n\t function NotSupportedInBatchException() {\n\t var operation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"This operation\";\n\t\n\t _classCallCheck(this, NotSupportedInBatchException);\n\t\n\t var _this8 = _possibleConstructorReturn(this, (NotSupportedInBatchException.__proto__ || Object.getPrototypeOf(NotSupportedInBatchException)).call(this, operation + \" is not supported as part of a batch.\"));\n\t\n\t _this8.name = \"NotSupportedInBatchException\";\n\t defaultLog(_this8);\n\t return _this8;\n\t }\n\t\n\t return NotSupportedInBatchException;\n\t}(Error);\n\t\n\texports.NotSupportedInBatchException = NotSupportedInBatchException;\n\t\n\tvar ODataIdException = function (_Error9) {\n\t _inherits(ODataIdException, _Error9);\n\t\n\t function ODataIdException(data) {\n\t var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\";\n\t\n\t _classCallCheck(this, ODataIdException);\n\t\n\t var _this9 = _possibleConstructorReturn(this, (ODataIdException.__proto__ || Object.getPrototypeOf(ODataIdException)).call(this, msg));\n\t\n\t _this9.name = \"ODataIdException\";\n\t logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this9.message });\n\t return _this9;\n\t }\n\t\n\t return ODataIdException;\n\t}(Error);\n\t\n\texports.ODataIdException = ODataIdException;\n\t\n\tvar BatchParseException = function (_Error10) {\n\t _inherits(BatchParseException, _Error10);\n\t\n\t function BatchParseException(msg) {\n\t _classCallCheck(this, BatchParseException);\n\t\n\t var _this10 = _possibleConstructorReturn(this, (BatchParseException.__proto__ || Object.getPrototypeOf(BatchParseException)).call(this, msg));\n\t\n\t _this10.name = \"BatchParseException\";\n\t defaultLog(_this10);\n\t return _this10;\n\t }\n\t\n\t return BatchParseException;\n\t}(Error);\n\t\n\texports.BatchParseException = BatchParseException;\n\t\n\tvar AlreadyInBatchException = function (_Error11) {\n\t _inherits(AlreadyInBatchException, _Error11);\n\t\n\t function AlreadyInBatchException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"This query is already part of a batch.\";\n\t\n\t _classCallCheck(this, AlreadyInBatchException);\n\t\n\t var _this11 = _possibleConstructorReturn(this, (AlreadyInBatchException.__proto__ || Object.getPrototypeOf(AlreadyInBatchException)).call(this, msg));\n\t\n\t _this11.name = \"AlreadyInBatchException\";\n\t defaultLog(_this11);\n\t return _this11;\n\t }\n\t\n\t return AlreadyInBatchException;\n\t}(Error);\n\t\n\texports.AlreadyInBatchException = AlreadyInBatchException;\n\t\n\tvar FunctionExpectedException = function (_Error12) {\n\t _inherits(FunctionExpectedException, _Error12);\n\t\n\t function FunctionExpectedException() {\n\t var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"This query is already part of a batch.\";\n\t\n\t _classCallCheck(this, FunctionExpectedException);\n\t\n\t var _this12 = _possibleConstructorReturn(this, (FunctionExpectedException.__proto__ || Object.getPrototypeOf(FunctionExpectedException)).call(this, msg));\n\t\n\t _this12.name = \"FunctionExpectedException\";\n\t defaultLog(_this12);\n\t return _this12;\n\t }\n\t\n\t return FunctionExpectedException;\n\t}(Error);\n\t\n\texports.FunctionExpectedException = FunctionExpectedException;\n\t\n\tvar UrlException = function (_Error13) {\n\t _inherits(UrlException, _Error13);\n\t\n\t function UrlException(msg) {\n\t _classCallCheck(this, UrlException);\n\t\n\t var _this13 = _possibleConstructorReturn(this, (UrlException.__proto__ || Object.getPrototypeOf(UrlException)).call(this, msg));\n\t\n\t _this13.name = \"UrlException\";\n\t defaultLog(_this13);\n\t return _this13;\n\t }\n\t\n\t return UrlException;\n\t}(Error);\n\t\n\texports.UrlException = UrlException;\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n\t var c = arguments.length,\n\t r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n\t d;\n\t if ((typeof Reflect === \"undefined\" ? \"undefined\" : _typeof(Reflect)) === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n\t if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n\t }return c > 3 && r && Object.defineProperty(target, key, r), r;\n\t};\n\tvar caching_1 = __webpack_require__(17);\n\tvar httpclient_1 = __webpack_require__(13);\n\tvar logging_1 = __webpack_require__(3);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Processes a given context through the request pipeline\n\t *\n\t * @param context The request context we are processing\n\t */\n\tfunction pipe(context) {\n\t // this is the beginning of the extensible pipeline in future versions\n\t var pipeline = [PipelineMethods.logStart, PipelineMethods.caching, PipelineMethods.send, PipelineMethods.logEnd];\n\t return pipeline.reduce(function (chain, next) {\n\t return chain.then(function (c) {\n\t return next(c);\n\t });\n\t }, Promise.resolve(context)).then(function (ctx) {\n\t return PipelineMethods.returnResult(ctx);\n\t }).catch(function (e) {\n\t logging_1.Logger.log({\n\t data: e,\n\t level: logging_1.LogLevel.Error,\n\t message: \"Error in request pipeline: \" + e.message\n\t });\n\t throw e;\n\t });\n\t}\n\texports.pipe = pipe;\n\t/**\n\t * decorator factory applied to methods in the pipeline to control behavior\n\t */\n\tfunction requestPipelineMethod() {\n\t var alwaysRun = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t\n\t return function (target, propertyKey, descriptor) {\n\t var method = descriptor.value;\n\t descriptor.value = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t // if we have a result already in the pipeline, pass it along and don't call the tagged method\n\t if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n\t logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + new Date().getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", logging_1.LogLevel.Verbose);\n\t return Promise.resolve(args[0]);\n\t }\n\t // apply the tagged method\n\t logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + new Date().getTime() + \") Calling request pipeline method \" + propertyKey + \".\", logging_1.LogLevel.Verbose);\n\t return method.apply(target, args);\n\t };\n\t };\n\t}\n\t/**\n\t * Contains the methods used within the request pipeline\n\t */\n\t\n\tvar PipelineMethods = function () {\n\t function PipelineMethods() {\n\t _classCallCheck(this, PipelineMethods);\n\t }\n\t\n\t _createClass(PipelineMethods, null, [{\n\t key: \"logStart\",\n\t\n\t /**\n\t * Logs the start of the request\n\t */\n\t value: function logStart(context) {\n\t return new Promise(function (resolve) {\n\t logging_1.Logger.log({\n\t data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n\t level: logging_1.LogLevel.Info,\n\t message: \"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Beginning \" + context.verb + \" request to \" + context.requestAbsoluteUrl\n\t });\n\t resolve(context);\n\t });\n\t }\n\t /**\n\t * Handles caching of the request\n\t */\n\t\n\t }, {\n\t key: \"caching\",\n\t value: function caching(context) {\n\t return new Promise(function (resolve) {\n\t // handle caching, if applicable\n\t if (context.verb === \"GET\" && context.isCached) {\n\t logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Caching is enabled for request, checking cache...\", logging_1.LogLevel.Info);\n\t var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n\t if (typeof context.cachingOptions !== \"undefined\") {\n\t cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n\t }\n\t // we may not have a valid store, i.e. on node\n\t if (cacheOptions.store !== null) {\n\t // check if we have the data in cache and if so resolve the promise and return\n\t var data = cacheOptions.store.get(cacheOptions.key);\n\t if (data !== null) {\n\t // ensure we clear any help batch dependency we are resolving from the cache\n\t logging_1.Logger.log({\n\t data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n\t level: logging_1.LogLevel.Info,\n\t message: \"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Value returned from cache.\"\n\t });\n\t context.batchDependency();\n\t return PipelineMethods.setResult(context, data).then(function (ctx) {\n\t return resolve(ctx);\n\t });\n\t }\n\t }\n\t logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Value not found in cache.\", logging_1.LogLevel.Info);\n\t // if we don't then wrap the supplied parser in the caching parser wrapper\n\t // and send things on their way\n\t context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n\t }\n\t return resolve(context);\n\t });\n\t }\n\t /**\n\t * Sends the request\n\t */\n\t\n\t }, {\n\t key: \"send\",\n\t value: function send(context) {\n\t return new Promise(function (resolve, reject) {\n\t // send or batch the request\n\t if (context.isBatched) {\n\t // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n\t var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n\t // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n\t context.batchDependency();\n\t logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Batching request.\", logging_1.LogLevel.Info);\n\t resolve(p.then(function (result) {\n\t return PipelineMethods.setResult(context, result);\n\t }));\n\t } else {\n\t logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Sending request.\", logging_1.LogLevel.Info);\n\t // we are not part of a batch, so proceed as normal\n\t var client = new httpclient_1.HttpClient();\n\t var opts = util_1.Util.extend(context.options, { method: context.verb });\n\t client.fetch(context.requestAbsoluteUrl, opts).then(function (response) {\n\t return context.parser.parse(response);\n\t }).then(function (result) {\n\t return PipelineMethods.setResult(context, result);\n\t }).then(function (ctx) {\n\t return resolve(ctx);\n\t }).catch(function (e) {\n\t return reject(e);\n\t });\n\t }\n\t });\n\t }\n\t /**\n\t * Logs the end of the request\n\t */\n\t\n\t }, {\n\t key: \"logEnd\",\n\t value: function logEnd(context) {\n\t return new Promise(function (resolve) {\n\t logging_1.Logger.log({\n\t data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n\t level: logging_1.LogLevel.Info,\n\t message: \"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Completing \" + context.verb + \" request to \" + context.requestAbsoluteUrl\n\t });\n\t resolve(context);\n\t });\n\t }\n\t /**\n\t * At the end of the pipeline resolves the request's result\n\t */\n\t\n\t }, {\n\t key: \"returnResult\",\n\t value: function returnResult(context) {\n\t logging_1.Logger.log({\n\t data: context.result,\n\t level: logging_1.LogLevel.Verbose,\n\t message: \"[\" + context.requestId + \"] (\" + new Date().getTime() + \") Returning, see data property for value.\"\n\t });\n\t return Promise.resolve(context.result);\n\t }\n\t /**\n\t * Sets the result on the context\n\t */\n\t\n\t }, {\n\t key: \"setResult\",\n\t value: function setResult(context, value) {\n\t return new Promise(function (resolve) {\n\t context.result = value;\n\t context.hasResult = true;\n\t resolve(context);\n\t });\n\t }\n\t }]);\n\t\n\t return PipelineMethods;\n\t}();\n\t\n\t__decorate([requestPipelineMethod(true)], PipelineMethods, \"logStart\", null);\n\t__decorate([requestPipelineMethod()], PipelineMethods, \"caching\", null);\n\t__decorate([requestPipelineMethod()], PipelineMethods, \"send\", null);\n\t__decorate([requestPipelineMethod(true)], PipelineMethods, \"logEnd\", null);\n\t__decorate([requestPipelineMethod(true)], PipelineMethods, \"returnResult\", null);\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar storage_1 = __webpack_require__(6);\n\tvar util_1 = __webpack_require__(1);\n\tvar pnplibconfig_1 = __webpack_require__(4);\n\t\n\tvar CachingOptions = function () {\n\t function CachingOptions(key) {\n\t _classCallCheck(this, CachingOptions);\n\t\n\t this.key = key;\n\t this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n\t this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n\t }\n\t\n\t _createClass(CachingOptions, [{\n\t key: \"store\",\n\t get: function get() {\n\t if (this.storeName === \"local\") {\n\t return CachingOptions.storage.local;\n\t } else {\n\t return CachingOptions.storage.session;\n\t }\n\t }\n\t }]);\n\t\n\t return CachingOptions;\n\t}();\n\t\n\tCachingOptions.storage = new storage_1.PnPClientStorage();\n\texports.CachingOptions = CachingOptions;\n\t\n\tvar CachingParserWrapper = function () {\n\t function CachingParserWrapper(_parser, _cacheOptions) {\n\t _classCallCheck(this, CachingParserWrapper);\n\t\n\t this._parser = _parser;\n\t this._cacheOptions = _cacheOptions;\n\t }\n\t\n\t _createClass(CachingParserWrapper, [{\n\t key: \"parse\",\n\t value: function parse(response) {\n\t var _this = this;\n\t\n\t // add this to the cache based on the options\n\t return this._parser.parse(response).then(function (data) {\n\t if (_this._cacheOptions.store !== null) {\n\t _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration);\n\t }\n\t return data;\n\t });\n\t }\n\t }]);\n\t\n\t return CachingParserWrapper;\n\t}();\n\t\n\texports.CachingParserWrapper = CachingParserWrapper;\n\n/***/ },\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\t\n\tvar SearchSuggest = function (_queryable_1$Queryabl) {\n\t _inherits(SearchSuggest, _queryable_1$Queryabl);\n\t\n\t function SearchSuggest(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/search/suggest\";\n\t\n\t _classCallCheck(this, SearchSuggest);\n\t\n\t return _possibleConstructorReturn(this, (SearchSuggest.__proto__ || Object.getPrototypeOf(SearchSuggest)).call(this, baseUrl, path));\n\t }\n\t\n\t _createClass(SearchSuggest, [{\n\t key: \"execute\",\n\t value: function execute(query) {\n\t this.mapQueryToQueryString(query);\n\t return this.get().then(function (response) {\n\t return new SearchSuggestResult(response);\n\t });\n\t }\n\t }, {\n\t key: \"mapQueryToQueryString\",\n\t value: function mapQueryToQueryString(query) {\n\t this.query.add(\"querytext\", \"'\" + query.querytext + \"'\");\n\t if (query.hasOwnProperty(\"count\")) {\n\t this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n\t }\n\t if (query.hasOwnProperty(\"personalCount\")) {\n\t this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n\t }\n\t if (query.hasOwnProperty(\"preQuery\")) {\n\t this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n\t }\n\t if (query.hasOwnProperty(\"hitHighlighting\")) {\n\t this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n\t }\n\t if (query.hasOwnProperty(\"capitalize\")) {\n\t this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n\t }\n\t if (query.hasOwnProperty(\"culture\")) {\n\t this.query.add(\"culture\", query.culture.toString());\n\t }\n\t if (query.hasOwnProperty(\"stemming\")) {\n\t this.query.add(\"enablestemming\", query.stemming.toString());\n\t }\n\t if (query.hasOwnProperty(\"includePeople\")) {\n\t this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n\t }\n\t if (query.hasOwnProperty(\"queryRules\")) {\n\t this.query.add(\"enablequeryrules\", query.queryRules.toString());\n\t }\n\t if (query.hasOwnProperty(\"prefixMatch\")) {\n\t this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n\t }\n\t }\n\t }]);\n\t\n\t return SearchSuggest;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.SearchSuggest = SearchSuggest;\n\t\n\tvar SearchSuggestResult = function SearchSuggestResult(json) {\n\t _classCallCheck(this, SearchSuggestResult);\n\t\n\t if (json.hasOwnProperty(\"suggest\")) {\n\t // verbose\n\t this.PeopleNames = json.suggest.PeopleNames.results;\n\t this.PersonalResults = json.suggest.PersonalResults.results;\n\t this.Queries = json.suggest.Queries.results;\n\t } else {\n\t this.PeopleNames = json.PeopleNames;\n\t this.PersonalResults = json.PersonalResults;\n\t this.Queries = json.Queries;\n\t }\n\t};\n\t\n\texports.SearchSuggestResult = SearchSuggestResult;\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar webs_1 = __webpack_require__(20);\n\tvar usercustomactions_1 = __webpack_require__(37);\n\tvar odata_1 = __webpack_require__(12);\n\tvar features_1 = __webpack_require__(39);\n\t/**\n\t * Describes a site collection\n\t *\n\t */\n\t\n\tvar Site = function (_queryable_1$Queryabl) {\n\t _inherits(Site, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the RoleAssignments class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Site(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/site\";\n\t\n\t _classCallCheck(this, Site);\n\t\n\t return _possibleConstructorReturn(this, (Site.__proto__ || Object.getPrototypeOf(Site)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the root web of the site collection\n\t *\n\t */\n\t\n\t\n\t _createClass(Site, [{\n\t key: \"getContextInfo\",\n\t\n\t /**\n\t * Gets the context information for the site.\n\t */\n\t value: function getContextInfo() {\n\t var q = new Site(this.parentUrl, \"_api/contextinfo\");\n\t return q.post().then(function (data) {\n\t if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n\t var info = data.GetContextWebInformation;\n\t info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n\t return info;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Gets the document libraries on a site. Static method. (SharePoint Online only)\n\t *\n\t * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n\t */\n\t\n\t }, {\n\t key: \"getDocumentLibraries\",\n\t value: function getDocumentLibraries(absoluteWebUrl) {\n\t var q = new queryable_1.Queryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n\t q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n\t return q.get().then(function (data) {\n\t if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n\t return data.GetDocumentLibraries;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Gets the site URL from a page URL.\n\t *\n\t * @param absolutePageUrl The absolute url of the page\n\t */\n\t\n\t }, {\n\t key: \"getWebUrlFromPageUrl\",\n\t value: function getWebUrlFromPageUrl(absolutePageUrl) {\n\t var q = new queryable_1.Queryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n\t q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n\t return q.get().then(function (data) {\n\t if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n\t return data.GetWebUrlFromPageUrl;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Creates a new batch for requests within the context of context this site\n\t *\n\t */\n\t\n\t }, {\n\t key: \"createBatch\",\n\t value: function createBatch() {\n\t return new odata_1.ODataBatch(this.parentUrl);\n\t }\n\t }, {\n\t key: \"rootWeb\",\n\t get: function get() {\n\t return new webs_1.Web(this, \"rootweb\");\n\t }\n\t /**\n\t * Gets the active features for this site\n\t *\n\t */\n\t\n\t }, {\n\t key: \"features\",\n\t get: function get() {\n\t return new features_1.Features(this);\n\t }\n\t /**\n\t * Get all custom actions on a site collection\n\t *\n\t */\n\t\n\t }, {\n\t key: \"userCustomActions\",\n\t get: function get() {\n\t return new usercustomactions_1.UserCustomActions(this);\n\t }\n\t }]);\n\t\n\t return Site;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Site = Site;\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar queryablesecurable_1 = __webpack_require__(21);\n\tvar lists_1 = __webpack_require__(25);\n\tvar fields_1 = __webpack_require__(33);\n\tvar navigation_1 = __webpack_require__(38);\n\tvar sitegroups_1 = __webpack_require__(23);\n\tvar contenttypes_1 = __webpack_require__(30);\n\tvar folders_1 = __webpack_require__(27);\n\tvar roles_1 = __webpack_require__(22);\n\tvar files_1 = __webpack_require__(28);\n\tvar util_1 = __webpack_require__(1);\n\tvar lists_2 = __webpack_require__(25);\n\tvar siteusers_1 = __webpack_require__(24);\n\tvar usercustomactions_1 = __webpack_require__(37);\n\tvar odata_1 = __webpack_require__(12);\n\tvar features_1 = __webpack_require__(39);\n\t\n\tvar Webs = function (_queryable_1$Queryabl) {\n\t _inherits(Webs, _queryable_1$Queryabl);\n\t\n\t function Webs(baseUrl) {\n\t var webPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"webs\";\n\t\n\t _classCallCheck(this, Webs);\n\t\n\t return _possibleConstructorReturn(this, (Webs.__proto__ || Object.getPrototypeOf(Webs)).call(this, baseUrl, webPath));\n\t }\n\t /**\n\t * Adds a new web to the collection\n\t *\n\t * @param title The new web's title\n\t * @param url The new web's relative url\n\t * @param description The web web's description\n\t * @param template The web's template\n\t * @param language The language code to use for this web\n\t * @param inheritPermissions If true permissions will be inherited from the partent web\n\t * @param additionalSettings Will be passed as part of the web creation body\n\t */\n\t\n\t\n\t _createClass(Webs, [{\n\t key: \"add\",\n\t value: function add(title, url) {\n\t var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n\t var template = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"STS\";\n\t var language = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1033;\n\t var inheritPermissions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n\t var additionalSettings = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};\n\t\n\t var props = util_1.Util.extend({\n\t Description: description,\n\t Language: language,\n\t Title: title,\n\t Url: url,\n\t UseSamePermissionsAsParentSite: inheritPermissions,\n\t WebTemplate: template\n\t }, additionalSettings);\n\t var postBody = JSON.stringify({\n\t \"parameters\": util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.WebCreationInformation\" }\n\t }, props)\n\t });\n\t var q = new Webs(this, \"add\");\n\t return q.post({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t web: new Web(odata_1.extractOdataId(data).replace(/_api\\/web\\/?/i, \"\"))\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return Webs;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Webs = Webs;\n\t/**\n\t * Describes a web\n\t *\n\t */\n\t\n\tvar Web = function (_queryablesecurable_) {\n\t _inherits(Web, _queryablesecurable_);\n\t\n\t function Web(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/web\";\n\t\n\t _classCallCheck(this, Web);\n\t\n\t return _possibleConstructorReturn(this, (Web.__proto__ || Object.getPrototypeOf(Web)).call(this, baseUrl, path));\n\t }\n\t\n\t _createClass(Web, [{\n\t key: \"createBatch\",\n\t\n\t /**\n\t * Creates a new batch for requests within the context of context this web\n\t *\n\t */\n\t value: function createBatch() {\n\t return new odata_1.ODataBatch(this.parentUrl);\n\t }\n\t /**\n\t * Get a folder by server relative url\n\t *\n\t * @param folderRelativeUrl the server relative path to the folder (including /sites/ if applicable)\n\t */\n\t\n\t }, {\n\t key: \"getFolderByServerRelativeUrl\",\n\t value: function getFolderByServerRelativeUrl(folderRelativeUrl) {\n\t return new folders_1.Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\n\t }\n\t /**\n\t * Get a file by server relative url\n\t *\n\t * @param fileRelativeUrl the server relative path to the file (including /sites/ if applicable)\n\t */\n\t\n\t }, {\n\t key: \"getFileByServerRelativeUrl\",\n\t value: function getFileByServerRelativeUrl(fileRelativeUrl) {\n\t return new files_1.File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\n\t }\n\t /**\n\t * Get a list by server relative url (list's root folder)\n\t *\n\t * @param listRelativeUrl the server relative path to the list's root folder (including /sites/ if applicable)\n\t */\n\t\n\t }, {\n\t key: \"getList\",\n\t value: function getList(listRelativeUrl) {\n\t return new lists_2.List(this, \"getList('\" + listRelativeUrl + \"')\");\n\t }\n\t /**\n\t * Updates this web intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the web\n\t */\n\t\n\t }, {\n\t key: \"update\",\n\t value: function update(properties) {\n\t var _this3 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.Web\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t web: _this3\n\t };\n\t });\n\t }\n\t /**\n\t * Delete this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return _get(Web.prototype.__proto__ || Object.getPrototypeOf(Web.prototype), \"delete\", this).call(this);\n\t }\n\t /**\n\t * Applies the theme specified by the contents of each of the files specified in the arguments to the site.\n\t *\n\t * @param colorPaletteUrl Server-relative URL of the color palette file.\n\t * @param fontSchemeUrl Server-relative URL of the font scheme.\n\t * @param backgroundImageUrl Server-relative URL of the background image.\n\t * @param shareGenerated true to store the generated theme files in the root site, or false to store them in this site.\n\t */\n\t\n\t }, {\n\t key: \"applyTheme\",\n\t value: function applyTheme(colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n\t var postBody = JSON.stringify({\n\t backgroundImageUrl: backgroundImageUrl,\n\t colorPaletteUrl: colorPaletteUrl,\n\t fontSchemeUrl: fontSchemeUrl,\n\t shareGenerated: shareGenerated\n\t });\n\t var q = new Web(this, \"applytheme\");\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * Applies the specified site definition or site template to the Web site that has no template applied to it.\n\t *\n\t * @param template Name of the site definition or the name of the site template\n\t */\n\t\n\t }, {\n\t key: \"applyWebTemplate\",\n\t value: function applyWebTemplate(template) {\n\t var q = new Web(this, \"applywebtemplate\");\n\t q.concat(\"(@t)\");\n\t q.query.add(\"@t\", template);\n\t return q.post();\n\t }\n\t /**\n\t * Returns whether the current user has the given set of permissions.\n\t *\n\t * @param perms The high and low permission range.\n\t */\n\t\n\t }, {\n\t key: \"doesUserHavePermissions\",\n\t value: function doesUserHavePermissions(perms) {\n\t var q = new Web(this, \"doesuserhavepermissions\");\n\t q.concat(\"(@p)\");\n\t q.query.add(\"@p\", JSON.stringify(perms));\n\t return q.get();\n\t }\n\t /**\n\t * Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site.\n\t *\n\t * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n\t */\n\t\n\t }, {\n\t key: \"ensureUser\",\n\t value: function ensureUser(loginName) {\n\t // TODO:: this should resolve to a User\n\t var postBody = JSON.stringify({\n\t logonName: loginName\n\t });\n\t var q = new Web(this, \"ensureuser\");\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * Returns a collection of site templates available for the site.\n\t *\n\t * @param language The LCID of the site templates to get.\n\t * @param true to include language-neutral site templates; otherwise false\n\t */\n\t\n\t }, {\n\t key: \"availableWebTemplates\",\n\t value: function availableWebTemplates() {\n\t var language = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1033;\n\t var includeCrossLanugage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\t\n\t return new queryable_1.QueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\n\t }\n\t /**\n\t * Returns the list gallery on the site.\n\t *\n\t * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n\t * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n\t */\n\t\n\t }, {\n\t key: \"getCatalog\",\n\t value: function getCatalog(type) {\n\t var q = new Web(this, \"getcatalog(\" + type + \")\");\n\t q.select(\"Id\");\n\t return q.get().then(function (data) {\n\t return new lists_2.List(odata_1.extractOdataId(data));\n\t });\n\t }\n\t /**\n\t * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n\t */\n\t\n\t }, {\n\t key: \"getChanges\",\n\t value: function getChanges(query) {\n\t var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n\t // don't change \"this\" instance, make a new one\n\t var q = new Web(this, \"getchanges\");\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * Gets the custom list templates for the site.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getUserById\",\n\t\n\t /**\n\t * Returns the user corresponding to the specified member identifier for the current site.\n\t *\n\t * @param id The ID of the user.\n\t */\n\t value: function getUserById(id) {\n\t return new siteusers_1.SiteUser(this, \"getUserById(\" + id + \")\");\n\t }\n\t /**\n\t * Returns the name of the image file for the icon that is used to represent the specified file.\n\t *\n\t * @param filename The file name. If this parameter is empty, the server returns an empty string.\n\t * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1.\n\t * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n\t */\n\t\n\t }, {\n\t key: \"mapToIcon\",\n\t value: function mapToIcon(filename) {\n\t var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\t var progId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n\t\n\t var q = new Web(this, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\");\n\t return q.get();\n\t }\n\t }, {\n\t key: \"webs\",\n\t get: function get() {\n\t return new Webs(this);\n\t }\n\t /**\n\t * Get the content types available in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"contentTypes\",\n\t get: function get() {\n\t return new contenttypes_1.ContentTypes(this);\n\t }\n\t /**\n\t * Get the lists in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"lists\",\n\t get: function get() {\n\t return new lists_1.Lists(this);\n\t }\n\t /**\n\t * Gets the fields in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"fields\",\n\t get: function get() {\n\t return new fields_1.Fields(this);\n\t }\n\t /**\n\t * Gets the active features for this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"features\",\n\t get: function get() {\n\t return new features_1.Features(this);\n\t }\n\t /**\n\t * Gets the available fields in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"availablefields\",\n\t get: function get() {\n\t return new fields_1.Fields(this, \"availablefields\");\n\t }\n\t /**\n\t * Get the navigation options in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"navigation\",\n\t get: function get() {\n\t return new navigation_1.Navigation(this);\n\t }\n\t /**\n\t * Gets the site users\n\t *\n\t */\n\t\n\t }, {\n\t key: \"siteUsers\",\n\t get: function get() {\n\t return new siteusers_1.SiteUsers(this);\n\t }\n\t /**\n\t * Gets the site groups\n\t *\n\t */\n\t\n\t }, {\n\t key: \"siteGroups\",\n\t get: function get() {\n\t return new sitegroups_1.SiteGroups(this);\n\t }\n\t /**\n\t * Gets the current user\n\t */\n\t\n\t }, {\n\t key: \"currentUser\",\n\t get: function get() {\n\t return new siteusers_1.CurrentUser(this);\n\t }\n\t /**\n\t * Get the folders in this web\n\t *\n\t */\n\t\n\t }, {\n\t key: \"folders\",\n\t get: function get() {\n\t return new folders_1.Folders(this);\n\t }\n\t /**\n\t * Get all custom actions on a site\n\t *\n\t */\n\t\n\t }, {\n\t key: \"userCustomActions\",\n\t get: function get() {\n\t return new usercustomactions_1.UserCustomActions(this);\n\t }\n\t /**\n\t * Gets the collection of RoleDefinition resources.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"roleDefinitions\",\n\t get: function get() {\n\t return new roles_1.RoleDefinitions(this);\n\t }\n\t }, {\n\t key: \"customListTemplate\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"getcustomlisttemplates\");\n\t }\n\t }]);\n\t\n\t return Web;\n\t}(queryablesecurable_1.QueryableSecurable);\n\t\n\texports.Web = Web;\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar roles_1 = __webpack_require__(22);\n\tvar queryable_1 = __webpack_require__(11);\n\t\n\tvar QueryableSecurable = function (_queryable_1$Queryabl) {\n\t _inherits(QueryableSecurable, _queryable_1$Queryabl);\n\t\n\t function QueryableSecurable() {\n\t _classCallCheck(this, QueryableSecurable);\n\t\n\t return _possibleConstructorReturn(this, (QueryableSecurable.__proto__ || Object.getPrototypeOf(QueryableSecurable)).apply(this, arguments));\n\t }\n\t\n\t _createClass(QueryableSecurable, [{\n\t key: \"getUserEffectivePermissions\",\n\t\n\t /**\n\t * Gets the effective permissions for the user supplied\n\t *\n\t * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n\t */\n\t value: function getUserEffectivePermissions(loginName) {\n\t var perms = new queryable_1.Queryable(this, \"getUserEffectivePermissions(@user)\");\n\t perms.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return perms;\n\t }\n\t /**\n\t * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n\t *\n\t * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n\t * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n\t */\n\t\n\t }, {\n\t key: \"breakRoleInheritance\",\n\t value: function breakRoleInheritance() {\n\t var copyRoleAssignments = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t var clearSubscopes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\n\t var Breaker = function (_queryable_1$Queryabl2) {\n\t _inherits(Breaker, _queryable_1$Queryabl2);\n\t\n\t function Breaker(baseUrl, copy, clear) {\n\t _classCallCheck(this, Breaker);\n\t\n\t return _possibleConstructorReturn(this, (Breaker.__proto__ || Object.getPrototypeOf(Breaker)).call(this, baseUrl, \"breakroleinheritance(copyroleassignments=\" + copy + \", clearsubscopes=\" + clear + \")\"));\n\t }\n\t\n\t _createClass(Breaker, [{\n\t key: \"break\",\n\t value: function _break() {\n\t return this.post();\n\t }\n\t }]);\n\t\n\t return Breaker;\n\t }(queryable_1.Queryable);\n\t\n\t var b = new Breaker(this, copyRoleAssignments, clearSubscopes);\n\t return b.break();\n\t }\n\t /**\n\t * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"resetRoleInheritance\",\n\t value: function resetRoleInheritance() {\n\t var Resetter = function (_queryable_1$Queryabl3) {\n\t _inherits(Resetter, _queryable_1$Queryabl3);\n\t\n\t function Resetter(baseUrl) {\n\t _classCallCheck(this, Resetter);\n\t\n\t return _possibleConstructorReturn(this, (Resetter.__proto__ || Object.getPrototypeOf(Resetter)).call(this, baseUrl, \"resetroleinheritance\"));\n\t }\n\t\n\t _createClass(Resetter, [{\n\t key: \"reset\",\n\t value: function reset() {\n\t return this.post();\n\t }\n\t }]);\n\t\n\t return Resetter;\n\t }(queryable_1.Queryable);\n\t\n\t var r = new Resetter(this);\n\t return r.reset();\n\t }\n\t }, {\n\t key: \"roleAssignments\",\n\t\n\t /**\n\t * Gets the set of role assignments for this item\n\t *\n\t */\n\t get: function get() {\n\t return new roles_1.RoleAssignments(this);\n\t }\n\t /**\n\t * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n\t *\n\t */\n\t\n\t }, {\n\t key: \"firstUniqueAncestorSecurableObject\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n\t }\n\t }]);\n\t\n\t return QueryableSecurable;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.QueryableSecurable = QueryableSecurable;\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar sitegroups_1 = __webpack_require__(23);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Describes a set of role assignments for the current scope\n\t *\n\t */\n\t\n\tvar RoleAssignments = function (_queryable_1$Queryabl) {\n\t _inherits(RoleAssignments, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the RoleAssignments class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function RoleAssignments(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"roleassignments\";\n\t\n\t _classCallCheck(this, RoleAssignments);\n\t\n\t return _possibleConstructorReturn(this, (RoleAssignments.__proto__ || Object.getPrototypeOf(RoleAssignments)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Adds a new role assignment with the specified principal and role definitions to the collection.\n\t *\n\t * @param principalId The ID of the user or group to assign permissions to\n\t * @param roleDefId The ID of the role definition that defines the permissions to assign\n\t *\n\t */\n\t\n\t\n\t _createClass(RoleAssignments, [{\n\t key: \"add\",\n\t value: function add(principalId, roleDefId) {\n\t var a = new RoleAssignments(this, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\");\n\t return a.post();\n\t }\n\t /**\n\t * Removes the role assignment with the specified principal and role definition from the collection\n\t *\n\t * @param principalId The ID of the user or group in the role assignment.\n\t * @param roleDefId The ID of the role definition in the role assignment\n\t *\n\t */\n\t\n\t }, {\n\t key: \"remove\",\n\t value: function remove(principalId, roleDefId) {\n\t var a = new RoleAssignments(this, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\");\n\t return a.post();\n\t }\n\t /**\n\t * Gets the role assignment associated with the specified principal ID from the collection.\n\t *\n\t * @param id The id of the role assignment\n\t */\n\t\n\t }, {\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var ra = new RoleAssignment(this);\n\t ra.concat(\"(\" + id + \")\");\n\t return ra;\n\t }\n\t }]);\n\t\n\t return RoleAssignments;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.RoleAssignments = RoleAssignments;\n\t\n\tvar RoleAssignment = function (_queryable_1$Queryabl2) {\n\t _inherits(RoleAssignment, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the RoleAssignment class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function RoleAssignment(baseUrl, path) {\n\t _classCallCheck(this, RoleAssignment);\n\t\n\t return _possibleConstructorReturn(this, (RoleAssignment.__proto__ || Object.getPrototypeOf(RoleAssignment)).call(this, baseUrl, path));\n\t }\n\t\n\t _createClass(RoleAssignment, [{\n\t key: \"delete\",\n\t\n\t /**\n\t * Delete this role assignment\n\t *\n\t */\n\t value: function _delete() {\n\t return this.post({\n\t headers: {\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t }, {\n\t key: \"groups\",\n\t get: function get() {\n\t return new sitegroups_1.SiteGroups(this, \"groups\");\n\t }\n\t /**\n\t * Get the role definition bindings for this role assignment\n\t *\n\t */\n\t\n\t }, {\n\t key: \"bindings\",\n\t get: function get() {\n\t return new RoleDefinitionBindings(this);\n\t }\n\t }]);\n\t\n\t return RoleAssignment;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.RoleAssignment = RoleAssignment;\n\t\n\tvar RoleDefinitions = function (_queryable_1$Queryabl3) {\n\t _inherits(RoleDefinitions, _queryable_1$Queryabl3);\n\t\n\t /**\n\t * Creates a new instance of the RoleDefinitions class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path\n\t *\n\t */\n\t function RoleDefinitions(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"roledefinitions\";\n\t\n\t _classCallCheck(this, RoleDefinitions);\n\t\n\t return _possibleConstructorReturn(this, (RoleDefinitions.__proto__ || Object.getPrototypeOf(RoleDefinitions)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the role definition with the specified ID from the collection.\n\t *\n\t * @param id The ID of the role definition.\n\t *\n\t */\n\t\n\t\n\t _createClass(RoleDefinitions, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t return new RoleDefinition(this, \"getById(\" + id + \")\");\n\t }\n\t /**\n\t * Gets the role definition with the specified name.\n\t *\n\t * @param name The name of the role definition.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getByName\",\n\t value: function getByName(name) {\n\t return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\n\t }\n\t /**\n\t * Gets the role definition with the specified type.\n\t *\n\t * @param name The name of the role definition.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getByType\",\n\t value: function getByType(roleTypeKind) {\n\t return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\n\t }\n\t /**\n\t * Create a role definition\n\t *\n\t * @param name The new role definition's name\n\t * @param description The new role definition's description\n\t * @param order The order in which the role definition appears\n\t * @param basePermissions The permissions mask for this role definition\n\t *\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(name, description, order, basePermissions) {\n\t var _this4 = this;\n\t\n\t var postBody = JSON.stringify({\n\t BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n\t Description: description,\n\t Name: name,\n\t Order: order,\n\t __metadata: { \"type\": \"SP.RoleDefinition\" }\n\t });\n\t return this.post({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t definition: _this4.getById(data.Id)\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return RoleDefinitions;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.RoleDefinitions = RoleDefinitions;\n\t\n\tvar RoleDefinition = function (_queryable_1$Queryabl4) {\n\t _inherits(RoleDefinition, _queryable_1$Queryabl4);\n\t\n\t function RoleDefinition(baseUrl, path) {\n\t _classCallCheck(this, RoleDefinition);\n\t\n\t return _possibleConstructorReturn(this, (RoleDefinition.__proto__ || Object.getPrototypeOf(RoleDefinition)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Updates this web intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the web\n\t */\n\t /* tslint:disable no-string-literal */\n\t\n\t\n\t _createClass(RoleDefinition, [{\n\t key: \"update\",\n\t value: function update(properties) {\n\t var _this6 = this;\n\t\n\t if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n\t properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n\t }\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.RoleDefinition\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t var retDef = _this6;\n\t if (properties.hasOwnProperty(\"Name\")) {\n\t var parent = _this6.getParent(RoleDefinitions, _this6.parentUrl, \"\");\n\t retDef = parent.getByName(properties[\"Name\"]);\n\t }\n\t return {\n\t data: data,\n\t definition: retDef\n\t };\n\t });\n\t }\n\t /* tslint:enable */\n\t /**\n\t * Delete this role definition\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return this.post({\n\t headers: {\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return RoleDefinition;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.RoleDefinition = RoleDefinition;\n\t\n\tvar RoleDefinitionBindings = function (_queryable_1$Queryabl5) {\n\t _inherits(RoleDefinitionBindings, _queryable_1$Queryabl5);\n\t\n\t function RoleDefinitionBindings(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"roledefinitionbindings\";\n\t\n\t _classCallCheck(this, RoleDefinitionBindings);\n\t\n\t return _possibleConstructorReturn(this, (RoleDefinitionBindings.__proto__ || Object.getPrototypeOf(RoleDefinitionBindings)).call(this, baseUrl, path));\n\t }\n\t\n\t return RoleDefinitionBindings;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar siteusers_1 = __webpack_require__(24);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Principal Type enum\n\t *\n\t */\n\tvar PrincipalType;\n\t(function (PrincipalType) {\n\t PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n\t PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n\t PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n\t PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n\t PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n\t PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n\t})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n\t/**\n\t * Describes a collection of site users\n\t *\n\t */\n\t\n\tvar SiteGroups = function (_queryable_1$Queryabl) {\n\t _inherits(SiteGroups, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the SiteUsers class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this user collection\n\t */\n\t function SiteGroups(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"sitegroups\";\n\t\n\t _classCallCheck(this, SiteGroups);\n\t\n\t return _possibleConstructorReturn(this, (SiteGroups.__proto__ || Object.getPrototypeOf(SiteGroups)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Adds a new group to the site collection\n\t *\n\t * @param props The properties to be updated\n\t */\n\t\n\t\n\t _createClass(SiteGroups, [{\n\t key: \"add\",\n\t value: function add(properties) {\n\t var _this2 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n\t return this.post({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t group: _this2.getById(data.Id)\n\t };\n\t });\n\t }\n\t /**\n\t * Gets a group from the collection by name\n\t *\n\t * @param email The name of the group\n\t */\n\t\n\t }, {\n\t key: \"getByName\",\n\t value: function getByName(groupName) {\n\t return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\n\t }\n\t /**\n\t * Gets a group from the collection by id\n\t *\n\t * @param id The id of the group\n\t */\n\t\n\t }, {\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var sg = new SiteGroup(this);\n\t sg.concat(\"(\" + id + \")\");\n\t return sg;\n\t }\n\t /**\n\t * Removes the group with the specified member ID from the collection.\n\t *\n\t * @param id The id of the group to remove\n\t */\n\t\n\t }, {\n\t key: \"removeById\",\n\t value: function removeById(id) {\n\t var g = new SiteGroups(this, \"removeById('\" + id + \"')\");\n\t return g.post();\n\t }\n\t /**\n\t * Removes a user from the collection by login name\n\t *\n\t * @param loginName The login name of the user\n\t */\n\t\n\t }, {\n\t key: \"removeByLoginName\",\n\t value: function removeByLoginName(loginName) {\n\t var g = new SiteGroups(this, \"removeByLoginName('\" + loginName + \"')\");\n\t return g.post();\n\t }\n\t }]);\n\t\n\t return SiteGroups;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.SiteGroups = SiteGroups;\n\t/**\n\t * Describes a single group\n\t *\n\t */\n\t\n\tvar SiteGroup = function (_queryable_1$Queryabl2) {\n\t _inherits(SiteGroup, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the Group class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this site group\n\t * @param path Optional, passes the path to the group\n\t */\n\t function SiteGroup(baseUrl, path) {\n\t _classCallCheck(this, SiteGroup);\n\t\n\t return _possibleConstructorReturn(this, (SiteGroup.__proto__ || Object.getPrototypeOf(SiteGroup)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Get's the users for this group\n\t *\n\t */\n\t\n\t\n\t _createClass(SiteGroup, [{\n\t key: \"update\",\n\t\n\t /**\n\t * Updates this group instance with the supplied properties\n\t *\n\t * @param properties A GroupWriteableProperties object of property names and values to update for the user\n\t */\n\t /* tslint:disable no-string-literal */\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n\t return this.post({\n\t body: JSON.stringify(postBody),\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t var retGroup = _this4;\n\t if (properties.hasOwnProperty(\"Title\")) {\n\t retGroup = _this4.getParent(SiteGroup, _this4.parentUrl, \"getByName('\" + properties[\"Title\"] + \"')\");\n\t }\n\t return {\n\t data: data,\n\t group: retGroup\n\t };\n\t });\n\t }\n\t }, {\n\t key: \"users\",\n\t get: function get() {\n\t return new siteusers_1.SiteUsers(this, \"users\");\n\t }\n\t }]);\n\t\n\t return SiteGroup;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.SiteGroup = SiteGroup;\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar sitegroups_1 = __webpack_require__(23);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Describes a collection of all site collection users\n\t *\n\t */\n\t\n\tvar SiteUsers = function (_queryable_1$Queryabl) {\n\t _inherits(SiteUsers, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Users class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this user collection\n\t */\n\t function SiteUsers(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"siteusers\";\n\t\n\t _classCallCheck(this, SiteUsers);\n\t\n\t return _possibleConstructorReturn(this, (SiteUsers.__proto__ || Object.getPrototypeOf(SiteUsers)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a user from the collection by email\n\t *\n\t * @param email The email of the user\n\t */\n\t\n\t\n\t _createClass(SiteUsers, [{\n\t key: \"getByEmail\",\n\t value: function getByEmail(email) {\n\t return new SiteUser(this, \"getByEmail('\" + email + \"')\");\n\t }\n\t /**\n\t * Gets a user from the collection by id\n\t *\n\t * @param id The id of the user\n\t */\n\t\n\t }, {\n\t key: \"getById\",\n\t value: function getById(id) {\n\t return new SiteUser(this, \"getById(\" + id + \")\");\n\t }\n\t /**\n\t * Gets a user from the collection by login name\n\t *\n\t * @param loginName The email address of the user\n\t */\n\t\n\t }, {\n\t key: \"getByLoginName\",\n\t value: function getByLoginName(loginName) {\n\t var su = new SiteUser(this);\n\t su.concat(\"(@v)\");\n\t su.query.add(\"@v\", encodeURIComponent(loginName));\n\t return su;\n\t }\n\t /**\n\t * Removes a user from the collection by id\n\t *\n\t * @param id The id of the user\n\t */\n\t\n\t }, {\n\t key: \"removeById\",\n\t value: function removeById(id) {\n\t var o = new SiteUsers(this, \"removeById(\" + id + \")\");\n\t return o.post();\n\t }\n\t /**\n\t * Removes a user from the collection by login name\n\t *\n\t * @param loginName The login name of the user\n\t */\n\t\n\t }, {\n\t key: \"removeByLoginName\",\n\t value: function removeByLoginName(loginName) {\n\t var o = new SiteUsers(this, \"removeByLoginName(@v)\");\n\t o.query.add(\"@v\", encodeURIComponent(loginName));\n\t return o.post();\n\t }\n\t /**\n\t * Add a user to a group\n\t *\n\t * @param loginName The login name of the user to add to the group\n\t *\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(loginName) {\n\t var _this2 = this;\n\t\n\t var postBody = JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName });\n\t return this.post({ body: postBody }).then(function () {\n\t return _this2.getByLoginName(loginName);\n\t });\n\t }\n\t }]);\n\t\n\t return SiteUsers;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.SiteUsers = SiteUsers;\n\t/**\n\t * Describes a single user\n\t *\n\t */\n\t\n\tvar SiteUser = function (_queryable_1$Queryabl2) {\n\t _inherits(SiteUser, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the User class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, passes the path to the user\n\t */\n\t function SiteUser(baseUrl, path) {\n\t _classCallCheck(this, SiteUser);\n\t\n\t return _possibleConstructorReturn(this, (SiteUser.__proto__ || Object.getPrototypeOf(SiteUser)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Get's the groups for this user.\n\t *\n\t */\n\t\n\t\n\t _createClass(SiteUser, [{\n\t key: \"update\",\n\t\n\t /**\n\t * Updates this user instance with the supplied properties\n\t *\n\t * @param properties A plain object of property names and values to update for the user\n\t */\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n\t return this.post({\n\t body: JSON.stringify(postBody),\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t user: _this4\n\t };\n\t });\n\t }\n\t /**\n\t * Delete this user\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return this.post({\n\t headers: {\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t }, {\n\t key: \"groups\",\n\t get: function get() {\n\t return new sitegroups_1.SiteGroups(this, \"groups\");\n\t }\n\t }]);\n\t\n\t return SiteUser;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.SiteUser = SiteUser;\n\t/**\n\t * Represents the current user\n\t */\n\t\n\tvar CurrentUser = function (_queryable_1$Queryabl3) {\n\t _inherits(CurrentUser, _queryable_1$Queryabl3);\n\t\n\t function CurrentUser(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"currentuser\";\n\t\n\t _classCallCheck(this, CurrentUser);\n\t\n\t return _possibleConstructorReturn(this, (CurrentUser.__proto__ || Object.getPrototypeOf(CurrentUser)).call(this, baseUrl, path));\n\t }\n\t\n\t return CurrentUser;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.CurrentUser = CurrentUser;\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar items_1 = __webpack_require__(26);\n\tvar views_1 = __webpack_require__(32);\n\tvar contenttypes_1 = __webpack_require__(30);\n\tvar fields_1 = __webpack_require__(33);\n\tvar forms_1 = __webpack_require__(35);\n\tvar subscriptions_1 = __webpack_require__(36);\n\tvar queryable_1 = __webpack_require__(11);\n\tvar queryablesecurable_1 = __webpack_require__(21);\n\tvar util_1 = __webpack_require__(1);\n\tvar usercustomactions_1 = __webpack_require__(37);\n\tvar odata_1 = __webpack_require__(12);\n\tvar exceptions_1 = __webpack_require__(15);\n\t/**\n\t * Describes a collection of List objects\n\t *\n\t */\n\t\n\tvar Lists = function (_queryable_1$Queryabl) {\n\t _inherits(Lists, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Lists class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Lists(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"lists\";\n\t\n\t _classCallCheck(this, Lists);\n\t\n\t return _possibleConstructorReturn(this, (Lists.__proto__ || Object.getPrototypeOf(Lists)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a list from the collection by title\n\t *\n\t * @param title The title of the list\n\t */\n\t\n\t\n\t _createClass(Lists, [{\n\t key: \"getByTitle\",\n\t value: function getByTitle(title) {\n\t return new List(this, \"getByTitle('\" + title + \"')\");\n\t }\n\t /**\n\t * Gets a list from the collection by guid id\n\t *\n\t * @param id The Id of the list (GUID)\n\t */\n\t\n\t }, {\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var list = new List(this);\n\t list.concat(\"('\" + id + \"')\");\n\t return list;\n\t }\n\t /**\n\t * Adds a new list to the collection\n\t *\n\t * @param title The new list's title\n\t * @param description The new list's description\n\t * @param template The list template value\n\t * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n\t * @param additionalSettings Will be passed as part of the list creation body\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(title) {\n\t var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n\t var template = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\t\n\t var _this2 = this;\n\t\n\t var enableContentTypes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\t var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"AllowContentTypes\": enableContentTypes,\n\t \"BaseTemplate\": template,\n\t \"ContentTypesEnabled\": enableContentTypes,\n\t \"Description\": description,\n\t \"Title\": title,\n\t \"__metadata\": { \"type\": \"SP.List\" }\n\t }, additionalSettings));\n\t return this.post({ body: postBody }).then(function (data) {\n\t return { data: data, list: _this2.getByTitle(title) };\n\t });\n\t }\n\t /**\n\t * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n\t *\n\t * @param title The new list's title\n\t * @param description The new list's description\n\t * @param template The list template value\n\t * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n\t * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n\t */\n\t\n\t }, {\n\t key: \"ensure\",\n\t value: function ensure(title) {\n\t var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n\t var template = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\t\n\t var _this3 = this;\n\t\n\t var enableContentTypes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\t var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\t\n\t if (this.hasBatch) {\n\t throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n\t }\n\t return new Promise(function (resolve, reject) {\n\t var list = _this3.getByTitle(title);\n\t list.get().then(function (_) {\n\t list.update(additionalSettings).then(function (d) {\n\t resolve({ created: false, data: d, list: list });\n\t }).catch(function (e) {\n\t return reject(e);\n\t });\n\t }).catch(function (_) {\n\t _this3.add(title, description, template, enableContentTypes, additionalSettings).then(function (r) {\n\t resolve({ created: true, data: r.data, list: _this3.getByTitle(title) });\n\t }).catch(function (e) {\n\t return reject(e);\n\t });\n\t });\n\t });\n\t }\n\t /**\n\t * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n\t */\n\t\n\t }, {\n\t key: \"ensureSiteAssetsLibrary\",\n\t value: function ensureSiteAssetsLibrary() {\n\t var q = new Lists(this, \"ensuresiteassetslibrary\");\n\t return q.post().then(function (json) {\n\t return new List(odata_1.extractOdataId(json));\n\t });\n\t }\n\t /**\n\t * Gets a list that is the default location for wiki pages.\n\t */\n\t\n\t }, {\n\t key: \"ensureSitePagesLibrary\",\n\t value: function ensureSitePagesLibrary() {\n\t var q = new Lists(this, \"ensuresitepageslibrary\");\n\t return q.post().then(function (json) {\n\t return new List(odata_1.extractOdataId(json));\n\t });\n\t }\n\t }]);\n\t\n\t return Lists;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Lists = Lists;\n\t/**\n\t * Describes a single List instance\n\t *\n\t */\n\t\n\tvar List = function (_queryablesecurable_) {\n\t _inherits(List, _queryablesecurable_);\n\t\n\t /**\n\t * Creates a new instance of the Lists class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function List(baseUrl, path) {\n\t _classCallCheck(this, List);\n\t\n\t return _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the content types in this list\n\t *\n\t */\n\t\n\t\n\t _createClass(List, [{\n\t key: \"getView\",\n\t\n\t /**\n\t * Gets a view by view guid id\n\t *\n\t */\n\t value: function getView(viewId) {\n\t return new views_1.View(this, \"getView('\" + viewId + \"')\");\n\t }\n\t /**\n\t * Updates this list intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the list\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t /* tslint:disable no-string-literal */\n\t\n\t }, {\n\t key: \"update\",\n\t value: function update(properties) {\n\t var _this5 = this;\n\t\n\t var eTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"*\";\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.List\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t var retList = _this5;\n\t if (properties.hasOwnProperty(\"Title\")) {\n\t retList = _this5.getParent(List, _this5.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\n\t }\n\t return {\n\t data: data,\n\t list: retList\n\t };\n\t });\n\t }\n\t /* tslint:enable */\n\t /**\n\t * Delete this list\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return this.post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n\t */\n\t\n\t }, {\n\t key: \"getChanges\",\n\t value: function getChanges(query) {\n\t var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"getchanges\");\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * Returns a collection of items from the list based on the specified query.\n\t *\n\t * @param CamlQuery The Query schema of Collaborative Application Markup\n\t * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n\t * to define queries against list data.\n\t * see:\n\t *\n\t * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n\t *\n\t * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n\t * the Entry or Collection of Entries identified by the Resource Path\n\t * section of the URI must be represented inline (i.e. eagerly loaded).\n\t * see:\n\t *\n\t * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n\t *\n\t * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n\t */\n\t\n\t }, {\n\t key: \"getItemsByCAMLQuery\",\n\t value: function getItemsByCAMLQuery(query) {\n\t var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) });\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"getitems\");\n\t\n\t for (var _len = arguments.length, expands = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t expands[_key - 1] = arguments[_key];\n\t }\n\t\n\t q = q.expand.apply(q, expands);\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n\t */\n\t\n\t }, {\n\t key: \"getListItemChangesSinceToken\",\n\t value: function getListItemChangesSinceToken(query) {\n\t var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) });\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"getlistitemchangessincetoken\");\n\t // note we are using a custom parser to return text as the response is an xml doc\n\t return q.post({ body: postBody }, {\n\t parse: function parse(r) {\n\t return r.text();\n\t }\n\t });\n\t }\n\t /**\n\t * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n\t */\n\t\n\t }, {\n\t key: \"recycle\",\n\t value: function recycle() {\n\t this.append(\"recycle\");\n\t return this.post().then(function (data) {\n\t if (data.hasOwnProperty(\"Recycle\")) {\n\t return data.Recycle;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Renders list data based on the view xml provided\n\t */\n\t\n\t }, {\n\t key: \"renderListData\",\n\t value: function renderListData(viewXml) {\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"renderlistdata(@viewXml)\");\n\t q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n\t return q.post().then(function (data) {\n\t // data will be a string, so we parse it again\n\t data = JSON.parse(data);\n\t if (data.hasOwnProperty(\"RenderListData\")) {\n\t return data.RenderListData;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Gets the field values and field schema attributes for a list item.\n\t */\n\t\n\t }, {\n\t key: \"renderListFormData\",\n\t value: function renderListFormData(itemId, formId, mode) {\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode=\" + mode + \")\");\n\t return q.post().then(function (data) {\n\t // data will be a string, so we parse it again\n\t data = JSON.parse(data);\n\t if (data.hasOwnProperty(\"ListData\")) {\n\t return data.ListData;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Reserves a list item ID for idempotent list item creation.\n\t */\n\t\n\t }, {\n\t key: \"reserveListItemId\",\n\t value: function reserveListItemId() {\n\t // don't change \"this\" instance of the List, make a new one\n\t var q = new List(this, \"reservelistitemid\");\n\t return q.post().then(function (data) {\n\t if (data.hasOwnProperty(\"ReserveListItemId\")) {\n\t return data.ReserveListItemId;\n\t } else {\n\t return data;\n\t }\n\t });\n\t }\n\t /**\n\t * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getListItemEntityTypeFullName\",\n\t value: function getListItemEntityTypeFullName() {\n\t var q = new queryable_1.QueryableInstance(this);\n\t return q.select(\"ListItemEntityTypeFullName\").getAs().then(function (o) {\n\t return o.ListItemEntityTypeFullName;\n\t });\n\t }\n\t }, {\n\t key: \"contentTypes\",\n\t get: function get() {\n\t return new contenttypes_1.ContentTypes(this);\n\t }\n\t /**\n\t * Gets the items in this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"items\",\n\t get: function get() {\n\t return new items_1.Items(this);\n\t }\n\t /**\n\t * Gets the views in this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"views\",\n\t get: function get() {\n\t return new views_1.Views(this);\n\t }\n\t /**\n\t * Gets the fields in this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"fields\",\n\t get: function get() {\n\t return new fields_1.Fields(this);\n\t }\n\t /**\n\t * Gets the forms in this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"forms\",\n\t get: function get() {\n\t return new forms_1.Forms(this);\n\t }\n\t /**\n\t * Gets the default view of this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"defaultView\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"DefaultView\");\n\t }\n\t /**\n\t * Get all custom actions on a site collection\n\t *\n\t */\n\t\n\t }, {\n\t key: \"userCustomActions\",\n\t get: function get() {\n\t return new usercustomactions_1.UserCustomActions(this);\n\t }\n\t /**\n\t * Gets the effective base permissions of this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"effectiveBasePermissions\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n\t }\n\t /**\n\t * Gets the event receivers attached to this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"eventReceivers\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"EventReceivers\");\n\t }\n\t /**\n\t * Gets the related fields of this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"relatedFields\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"getRelatedFields\");\n\t }\n\t /**\n\t * Gets the IRM settings for this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"informationRightsManagementSettings\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"InformationRightsManagementSettings\");\n\t }\n\t /**\n\t * Gets the webhook subscriptions of this list\n\t *\n\t */\n\t\n\t }, {\n\t key: \"subscriptions\",\n\t get: function get() {\n\t return new subscriptions_1.Subscriptions(this);\n\t }\n\t }]);\n\t\n\t return List;\n\t}(queryablesecurable_1.QueryableSecurable);\n\t\n\texports.List = List;\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar queryablesecurable_1 = __webpack_require__(21);\n\tvar folders_1 = __webpack_require__(27);\n\tvar files_1 = __webpack_require__(28);\n\tvar contenttypes_1 = __webpack_require__(30);\n\tvar util_1 = __webpack_require__(1);\n\tvar odata_1 = __webpack_require__(12);\n\tvar attachmentfiles_1 = __webpack_require__(31);\n\tvar lists_1 = __webpack_require__(25);\n\t/**\n\t * Describes a collection of Item objects\n\t *\n\t */\n\t\n\tvar Items = function (_queryable_1$Queryabl) {\n\t _inherits(Items, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Items class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Items(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"items\";\n\t\n\t _classCallCheck(this, Items);\n\t\n\t return _possibleConstructorReturn(this, (Items.__proto__ || Object.getPrototypeOf(Items)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets an Item by id\n\t *\n\t * @param id The integer id of the item to retrieve\n\t */\n\t\n\t\n\t _createClass(Items, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var i = new Item(this);\n\t i.concat(\"(\" + id + \")\");\n\t return i;\n\t }\n\t /**\n\t * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n\t *\n\t * @param skip The starting id where the page should start, use with top to specify pages\n\t */\n\t\n\t }, {\n\t key: \"skip\",\n\t value: function skip(_skip) {\n\t this._query.add(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + _skip));\n\t return this;\n\t }\n\t /**\n\t * Gets a collection designed to aid in paging through data\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getPaged\",\n\t value: function getPaged() {\n\t return this.getAs(new PagedItemCollectionParser());\n\t }\n\t /**\n\t * Adds a new item to the collection\n\t *\n\t * @param properties The new items's properties\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add() {\n\t var _this2 = this;\n\t\n\t var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t var listItemEntityTypeFullName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\t\n\t var doAdd = function doAdd(listItemEntityType) {\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": listItemEntityType }\n\t }, properties));\n\t return _this2.postAs({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t item: _this2.getById(data.Id)\n\t };\n\t });\n\t };\n\t if (!listItemEntityTypeFullName) {\n\t var _ret = function () {\n\t var parentList = _this2.getParent(lists_1.List);\n\t var removeDependency = _this2.addBatchDependency();\n\t return {\n\t v: parentList.getListItemEntityTypeFullName().then(function (n) {\n\t var promise = doAdd(n);\n\t removeDependency();\n\t return promise;\n\t })\n\t };\n\t }();\n\t\n\t if ((typeof _ret === \"undefined\" ? \"undefined\" : _typeof(_ret)) === \"object\") return _ret.v;\n\t } else {\n\t return doAdd(listItemEntityTypeFullName);\n\t }\n\t }\n\t }]);\n\t\n\t return Items;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Items = Items;\n\t/**\n\t * Descrines a single Item instance\n\t *\n\t */\n\t\n\tvar Item = function (_queryablesecurable_) {\n\t _inherits(Item, _queryablesecurable_);\n\t\n\t /**\n\t * Creates a new instance of the Items class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Item(baseUrl, path) {\n\t _classCallCheck(this, Item);\n\t\n\t return _possibleConstructorReturn(this, (Item.__proto__ || Object.getPrototypeOf(Item)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the set of attachments for this item\n\t *\n\t */\n\t\n\t\n\t _createClass(Item, [{\n\t key: \"update\",\n\t\n\t /**\n\t * Updates this list intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the list\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var eTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"*\";\n\t\n\t return new Promise(function (resolve, reject) {\n\t var removeDependency = _this4.addBatchDependency();\n\t var parentList = _this4.getParent(queryable_1.QueryableInstance, _this4.parentUrl.substr(0, _this4.parentUrl.lastIndexOf(\"/\")));\n\t parentList.select(\"ListItemEntityTypeFullName\").getAs().then(function (d) {\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": d.ListItemEntityTypeFullName }\n\t }, properties));\n\t _this4.post({\n\t body: postBody,\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }, new ItemUpdatedParser()).then(function (data) {\n\t removeDependency();\n\t resolve({\n\t data: data,\n\t item: _this4\n\t });\n\t });\n\t }).catch(function (e) {\n\t return reject(e);\n\t });\n\t });\n\t }\n\t /**\n\t * Delete this item\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return this.post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n\t */\n\t\n\t }, {\n\t key: \"recycle\",\n\t value: function recycle() {\n\t var i = new Item(this, \"recycle\");\n\t return i.post();\n\t }\n\t /**\n\t * Gets a string representation of the full URL to the WOPI frame.\n\t * If there is no associated WOPI application, or no associated action, an empty string is returned.\n\t *\n\t * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n\t */\n\t\n\t }, {\n\t key: \"getWopiFrameUrl\",\n\t value: function getWopiFrameUrl() {\n\t var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\t\n\t var i = new Item(this, \"getWOPIFrameUrl(@action)\");\n\t i._query.add(\"@action\", action);\n\t return i.post().then(function (data) {\n\t return data.GetWOPIFrameUrl;\n\t });\n\t }\n\t /**\n\t * Validates and sets the values of the specified collection of fields for the list item.\n\t *\n\t * @param formValues The fields to change and their new values.\n\t * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n\t */\n\t /* tslint:disable max-line-length */\n\t\n\t }, {\n\t key: \"validateUpdateListItem\",\n\t value: function validateUpdateListItem(formValues) {\n\t var newDocumentUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\n\t var postBody = JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate });\n\t var item = new Item(this, \"validateupdatelistitem\");\n\t return item.post({ body: postBody });\n\t }\n\t }, {\n\t key: \"attachmentFiles\",\n\t get: function get() {\n\t return new attachmentfiles_1.AttachmentFiles(this);\n\t }\n\t /**\n\t * Gets the content type for this item\n\t *\n\t */\n\t\n\t }, {\n\t key: \"contentType\",\n\t get: function get() {\n\t return new contenttypes_1.ContentType(this, \"ContentType\");\n\t }\n\t /**\n\t * Gets the effective base permissions for the item\n\t *\n\t */\n\t\n\t }, {\n\t key: \"effectiveBasePermissions\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n\t }\n\t /**\n\t * Gets the effective base permissions for the item in a UI context\n\t *\n\t */\n\t\n\t }, {\n\t key: \"effectiveBasePermissionsForUI\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"EffectiveBasePermissionsForUI\");\n\t }\n\t /**\n\t * Gets the field values for this list item in their HTML representation\n\t *\n\t */\n\t\n\t }, {\n\t key: \"fieldValuesAsHTML\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"FieldValuesAsHTML\");\n\t }\n\t /**\n\t * Gets the field values for this list item in their text representation\n\t *\n\t */\n\t\n\t }, {\n\t key: \"fieldValuesAsText\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"FieldValuesAsText\");\n\t }\n\t /**\n\t * Gets the field values for this list item for use in editing controls\n\t *\n\t */\n\t\n\t }, {\n\t key: \"fieldValuesForEdit\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"FieldValuesForEdit\");\n\t }\n\t /**\n\t * Gets the folder associated with this list item (if this item represents a folder)\n\t *\n\t */\n\t\n\t }, {\n\t key: \"folder\",\n\t get: function get() {\n\t return new folders_1.Folder(this, \"folder\");\n\t }\n\t /**\n\t * Gets the folder associated with this list item (if this item represents a folder)\n\t *\n\t */\n\t\n\t }, {\n\t key: \"file\",\n\t get: function get() {\n\t return new files_1.File(this, \"file\");\n\t }\n\t }]);\n\t\n\t return Item;\n\t}(queryablesecurable_1.QueryableSecurable);\n\t\n\texports.Item = Item;\n\t/**\n\t * Provides paging functionality for list items\n\t */\n\t\n\tvar PagedItemCollection = function () {\n\t function PagedItemCollection(nextUrl, results) {\n\t _classCallCheck(this, PagedItemCollection);\n\t\n\t this.nextUrl = nextUrl;\n\t this.results = results;\n\t }\n\t /**\n\t * If true there are more results available in the set, otherwise there are not\n\t */\n\t\n\t\n\t _createClass(PagedItemCollection, [{\n\t key: \"getNext\",\n\t\n\t /**\n\t * Gets the next set of results, or resolves to null if no results are available\n\t */\n\t value: function getNext() {\n\t if (this.hasNext) {\n\t var items = new Items(this.nextUrl, null);\n\t return items.getPaged();\n\t }\n\t return new Promise(function (r) {\n\t return r(null);\n\t });\n\t }\n\t }, {\n\t key: \"hasNext\",\n\t get: function get() {\n\t return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n\t }\n\t }]);\n\t\n\t return PagedItemCollection;\n\t}();\n\t\n\texports.PagedItemCollection = PagedItemCollection;\n\t\n\tvar PagedItemCollectionParser = function (_odata_1$ODataParserB) {\n\t _inherits(PagedItemCollectionParser, _odata_1$ODataParserB);\n\t\n\t function PagedItemCollectionParser() {\n\t _classCallCheck(this, PagedItemCollectionParser);\n\t\n\t return _possibleConstructorReturn(this, (PagedItemCollectionParser.__proto__ || Object.getPrototypeOf(PagedItemCollectionParser)).apply(this, arguments));\n\t }\n\t\n\t _createClass(PagedItemCollectionParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t var _this6 = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t if (_this6.handleError(r, reject)) {\n\t r.json().then(function (json) {\n\t var nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n\t resolve(new PagedItemCollection(nextUrl, _this6.parseODataJSON(json)));\n\t });\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return PagedItemCollectionParser;\n\t}(odata_1.ODataParserBase);\n\t\n\tvar ItemUpdatedParser = function (_odata_1$ODataParserB2) {\n\t _inherits(ItemUpdatedParser, _odata_1$ODataParserB2);\n\t\n\t function ItemUpdatedParser() {\n\t _classCallCheck(this, ItemUpdatedParser);\n\t\n\t return _possibleConstructorReturn(this, (ItemUpdatedParser.__proto__ || Object.getPrototypeOf(ItemUpdatedParser)).apply(this, arguments));\n\t }\n\t\n\t _createClass(ItemUpdatedParser, [{\n\t key: \"parse\",\n\t value: function parse(r) {\n\t var _this8 = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t if (_this8.handleError(r, reject)) {\n\t resolve({\n\t \"odata.etag\": r.headers.get(\"etag\")\n\t });\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return ItemUpdatedParser;\n\t}(odata_1.ODataParserBase);\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar files_1 = __webpack_require__(28);\n\t/**\n\t * Describes a collection of Folder objects\n\t *\n\t */\n\t\n\tvar Folders = function (_queryable_1$Queryabl) {\n\t _inherits(Folders, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Folders class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Folders(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"folders\";\n\t\n\t _classCallCheck(this, Folders);\n\t\n\t return _possibleConstructorReturn(this, (Folders.__proto__ || Object.getPrototypeOf(Folders)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a folder by folder name\n\t *\n\t */\n\t\n\t\n\t _createClass(Folders, [{\n\t key: \"getByName\",\n\t value: function getByName(name) {\n\t var f = new Folder(this);\n\t f.concat(\"('\" + name + \"')\");\n\t return f;\n\t }\n\t /**\n\t * Adds a new folder to the current folder (relative) or any folder (absolute)\n\t *\n\t * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n\t * @returns The new Folder and the raw response.\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(url) {\n\t var _this2 = this;\n\t\n\t return new Folders(this, \"add('\" + url + \"')\").post().then(function (response) {\n\t return {\n\t data: response,\n\t folder: _this2.getByName(url)\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return Folders;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Folders = Folders;\n\t/**\n\t * Describes a single Folder instance\n\t *\n\t */\n\t\n\tvar Folder = function (_queryable_1$Queryabl2) {\n\t _inherits(Folder, _queryable_1$Queryabl2);\n\t\n\t //\n\t // TODO:\n\t // Properties (https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FolderProperties)\n\t // UniqueContentTypeOrder (setter)\n\t // WelcomePage (setter)\n\t //\n\t /**\n\t * Creates a new instance of the Folder class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function Folder(baseUrl, path) {\n\t _classCallCheck(this, Folder);\n\t\n\t return _possibleConstructorReturn(this, (Folder.__proto__ || Object.getPrototypeOf(Folder)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Specifies the sequence in which content types are displayed.\n\t *\n\t */\n\t\n\t\n\t _createClass(Folder, [{\n\t key: \"delete\",\n\t\n\t /**\n\t * Delete this folder\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return new Folder(this).post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n\t */\n\t\n\t }, {\n\t key: \"recycle\",\n\t value: function recycle() {\n\t return new Folder(this, \"recycle\").post();\n\t }\n\t }, {\n\t key: \"contentTypeOrder\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"contentTypeOrder\");\n\t }\n\t /**\n\t * Gets this folder's files\n\t *\n\t */\n\t\n\t }, {\n\t key: \"files\",\n\t get: function get() {\n\t return new files_1.Files(this);\n\t }\n\t /**\n\t * Gets this folder's sub folders\n\t *\n\t */\n\t\n\t }, {\n\t key: \"folders\",\n\t get: function get() {\n\t return new Folders(this);\n\t }\n\t /**\n\t * Gets this folder's list item field values\n\t *\n\t */\n\t\n\t }, {\n\t key: \"listItemAllFields\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n\t }\n\t /**\n\t * Gets the parent folder, if available\n\t *\n\t */\n\t\n\t }, {\n\t key: \"parentFolder\",\n\t get: function get() {\n\t return new Folder(this, \"parentFolder\");\n\t }\n\t /**\n\t * Gets this folder's properties\n\t *\n\t */\n\t\n\t }, {\n\t key: \"properties\",\n\t get: function get() {\n\t return new queryable_1.QueryableInstance(this, \"properties\");\n\t }\n\t /**\n\t * Gets this folder's server relative url\n\t *\n\t */\n\t\n\t }, {\n\t key: \"serverRelativeUrl\",\n\t get: function get() {\n\t return new queryable_1.Queryable(this, \"serverRelativeUrl\");\n\t }\n\t /**\n\t * Gets a value that specifies the content type order.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"uniqueContentTypeOrder\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"uniqueContentTypeOrder\");\n\t }\n\t }]);\n\t\n\t return Folder;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Folder = Folder;\n\n/***/ },\n/* 28 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar odata_1 = __webpack_require__(12);\n\tvar util_1 = __webpack_require__(1);\n\tvar exceptions_1 = __webpack_require__(15);\n\tvar webparts_1 = __webpack_require__(29);\n\t/**\n\t * Describes a collection of File objects\n\t *\n\t */\n\t\n\tvar Files = function (_queryable_1$Queryabl) {\n\t _inherits(Files, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Files class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Files(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"files\";\n\t\n\t _classCallCheck(this, Files);\n\t\n\t return _possibleConstructorReturn(this, (Files.__proto__ || Object.getPrototypeOf(Files)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a File by filename\n\t *\n\t * @param name The name of the file, including extension.\n\t */\n\t\n\t\n\t _createClass(Files, [{\n\t key: \"getByName\",\n\t value: function getByName(name) {\n\t var f = new File(this);\n\t f.concat(\"('\" + name + \"')\");\n\t return f;\n\t }\n\t /**\n\t * Uploads a file.\n\t *\n\t * @param url The folder-relative url of the file.\n\t * @param content The file contents blob.\n\t * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n\t * @returns The new File and the raw response.\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(url, content) {\n\t var _this2 = this;\n\t\n\t var shouldOverWrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t\n\t return new Files(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\").post({\n\t body: content\n\t }).then(function (response) {\n\t return {\n\t data: response,\n\t file: _this2.getByName(url)\n\t };\n\t });\n\t }\n\t /**\n\t * Uploads a file.\n\t *\n\t * @param url The folder-relative url of the file.\n\t * @param content The Blob file content to add\n\t * @param progress A callback function which can be used to track the progress of the upload\n\t * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n\t * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n\t * @returns The new File and the raw response.\n\t */\n\t\n\t }, {\n\t key: \"addChunked\",\n\t value: function addChunked(url, content, progress) {\n\t var _this3 = this;\n\t\n\t var shouldOverWrite = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\t var chunkSize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10485760;\n\t\n\t var adder = new Files(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\");\n\t return adder.post().then(function () {\n\t return _this3.getByName(url);\n\t }).then(function (file) {\n\t return file.setContentChunked(content, progress, chunkSize);\n\t }).then(function (response) {\n\t return {\n\t data: response,\n\t file: _this3.getByName(url)\n\t };\n\t });\n\t }\n\t /**\n\t * Adds a ghosted file to an existing list or document library.\n\t *\n\t * @param fileUrl The server-relative url where you want to save the file.\n\t * @param templateFileType The type of use to create the file.\n\t * @returns The template file that was added and the raw response.\n\t */\n\t\n\t }, {\n\t key: \"addTemplateFile\",\n\t value: function addTemplateFile(fileUrl, templateFileType) {\n\t var _this4 = this;\n\t\n\t return new Files(this, \"addTemplateFile(urloffile='\" + fileUrl + \"',templatefiletype=\" + templateFileType + \")\").post().then(function (response) {\n\t return {\n\t data: response,\n\t file: _this4.getByName(fileUrl)\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return Files;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Files = Files;\n\t/**\n\t * Describes a single File instance\n\t *\n\t */\n\t\n\tvar File = function (_queryable_1$Queryabl2) {\n\t _inherits(File, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the File class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function File(baseUrl, path) {\n\t _classCallCheck(this, File);\n\t\n\t return _possibleConstructorReturn(this, (File.__proto__ || Object.getPrototypeOf(File)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a value that specifies the list item field values for the list item corresponding to the file.\n\t *\n\t */\n\t\n\t\n\t _createClass(File, [{\n\t key: \"approve\",\n\t\n\t /**\n\t * Approves the file submitted for content approval with the specified comment.\n\t * Only documents in lists that are enabled for content approval can be approved.\n\t *\n\t * @param comment The comment for the approval.\n\t */\n\t value: function approve(comment) {\n\t return new File(this, \"approve(comment='\" + comment + \"')\").post();\n\t }\n\t /**\n\t * Stops the chunk upload session without saving the uploaded data.\n\t * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n\t * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n\t * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n\t * This method is currently available only on Office 365.\n\t *\n\t * @param uploadId The unique identifier of the upload session.\n\t */\n\t\n\t }, {\n\t key: \"cancelUpload\",\n\t value: function cancelUpload(uploadId) {\n\t return new File(this, \"cancelUpload(uploadId=guid'\" + uploadId + \"')\").post();\n\t }\n\t /**\n\t * Checks the file in to a document library based on the check-in type.\n\t *\n\t * @param comment A comment for the check-in. Its length must be <= 1023.\n\t * @param checkinType The check-in type for the file.\n\t */\n\t\n\t }, {\n\t key: \"checkin\",\n\t value: function checkin() {\n\t var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n\t var checkinType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CheckinType.Major;\n\t\n\t // TODO: Enforce comment length <= 1023\n\t return new File(this, \"checkin(comment='\" + comment + \"',checkintype=\" + checkinType + \")\").post();\n\t }\n\t /**\n\t * Checks out the file from a document library.\n\t */\n\t\n\t }, {\n\t key: \"checkout\",\n\t value: function checkout() {\n\t return new File(this, \"checkout\").post();\n\t }\n\t /**\n\t * Copies the file to the destination url.\n\t *\n\t * @param url The absolute url or server relative url of the destination file path to copy to.\n\t * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n\t */\n\t\n\t }, {\n\t key: \"copyTo\",\n\t value: function copyTo(url) {\n\t var shouldOverWrite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\t\n\t return new File(this, \"copyTo(strnewurl='\" + url + \"',boverwrite=\" + shouldOverWrite + \")\").post();\n\t }\n\t /**\n\t * Delete this file.\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return new File(this).post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Denies approval for a file that was submitted for content approval.\n\t * Only documents in lists that are enabled for content approval can be denied.\n\t *\n\t * @param comment The comment for the denial.\n\t */\n\t\n\t }, {\n\t key: \"deny\",\n\t value: function deny() {\n\t var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n\t\n\t return new File(this, \"deny(comment='\" + comment + \"')\").post();\n\t }\n\t /**\n\t * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n\t * An exception is thrown if the file is not an ASPX page.\n\t *\n\t * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n\t */\n\t\n\t }, {\n\t key: \"getLimitedWebPartManager\",\n\t value: function getLimitedWebPartManager() {\n\t var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : WebPartsPersonalizationScope.Shared;\n\t\n\t return new webparts_1.LimitedWebPartManager(this, \"getLimitedWebPartManager(scope=\" + scope + \")\");\n\t }\n\t /**\n\t * Moves the file to the specified destination url.\n\t *\n\t * @param url The absolute url or server relative url of the destination file path to move to.\n\t * @param moveOperations The bitwise MoveOperations value for how to move the file.\n\t */\n\t\n\t }, {\n\t key: \"moveTo\",\n\t value: function moveTo(url) {\n\t var moveOperations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MoveOperations.Overwrite;\n\t\n\t return new File(this, \"moveTo(newurl='\" + url + \"',flags=\" + moveOperations + \")\").post();\n\t }\n\t /**\n\t * Submits the file for content approval with the specified comment.\n\t *\n\t * @param comment The comment for the published file. Its length must be <= 1023.\n\t */\n\t\n\t }, {\n\t key: \"publish\",\n\t value: function publish() {\n\t var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n\t\n\t return new File(this, \"publish(comment='\" + comment + \"')\").post();\n\t }\n\t /**\n\t * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n\t *\n\t * @returns The GUID of the recycled file.\n\t */\n\t\n\t }, {\n\t key: \"recycle\",\n\t value: function recycle() {\n\t return new File(this, \"recycle\").post();\n\t }\n\t /**\n\t * Reverts an existing checkout for the file.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"undoCheckout\",\n\t value: function undoCheckout() {\n\t return new File(this, \"undoCheckout\").post();\n\t }\n\t /**\n\t * Removes the file from content approval or unpublish a major version.\n\t *\n\t * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n\t */\n\t\n\t }, {\n\t key: \"unpublish\",\n\t value: function unpublish() {\n\t var comment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n\t\n\t if (comment.length > 1023) {\n\t throw new exceptions_1.MaxCommentLengthException();\n\t }\n\t return new File(this, \"unpublish(comment='\" + comment + \"')\").post();\n\t }\n\t /**\n\t * Gets the contents of the file as text\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getText\",\n\t value: function getText() {\n\t return new File(this, \"$value\").get(new odata_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n\t }\n\t /**\n\t * Gets the contents of the file as a blob, does not work in Node.js\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getBlob\",\n\t value: function getBlob() {\n\t return new File(this, \"$value\").get(new odata_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n\t }\n\t /**\n\t * Gets the contents of a file as an ArrayBuffer, works in Node.js\n\t */\n\t\n\t }, {\n\t key: \"getBuffer\",\n\t value: function getBuffer() {\n\t return new File(this, \"$value\").get(new odata_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n\t }\n\t /**\n\t * Gets the contents of a file as an ArrayBuffer, works in Node.js\n\t */\n\t\n\t }, {\n\t key: \"getJSON\",\n\t value: function getJSON() {\n\t return new File(this, \"$value\").get(new odata_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n\t }\n\t /**\n\t * Sets the content of a file, for large files use setContentChunked\n\t *\n\t * @param content The file content\n\t *\n\t */\n\t\n\t }, {\n\t key: \"setContent\",\n\t value: function setContent(content) {\n\t var _this6 = this;\n\t\n\t var setter = new File(this, \"$value\");\n\t return setter.post({\n\t body: content,\n\t headers: {\n\t \"X-HTTP-Method\": \"PUT\"\n\t }\n\t }).then(function (_) {\n\t return new File(_this6);\n\t });\n\t }\n\t /**\n\t * Sets the contents of a file using a chunked upload approach\n\t *\n\t * @param file The file to upload\n\t * @param progress A callback function which can be used to track the progress of the upload\n\t * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n\t */\n\t\n\t }, {\n\t key: \"setContentChunked\",\n\t value: function setContentChunked(file, progress) {\n\t var chunkSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10485760;\n\t\n\t if (typeof progress === \"undefined\") {\n\t progress = function progress() {\n\t return null;\n\t };\n\t }\n\t var self = this;\n\t var fileSize = file.size;\n\t var blockCount = parseInt((file.size / chunkSize).toString(), 10) + (file.size % chunkSize === 0 ? 1 : 0);\n\t var uploadId = util_1.Util.getGUID();\n\t // start the chain with the first fragment\n\t progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n\t var chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n\t // skip the first and last blocks\n\t\n\t var _loop = function _loop(i) {\n\t chain = chain.then(function (pointer) {\n\t progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n\t return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n\t });\n\t };\n\t\n\t for (var i = 2; i < blockCount; i++) {\n\t _loop(i);\n\t }\n\t return chain.then(function (pointer) {\n\t progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n\t return self.finishUpload(uploadId, pointer, file.slice(pointer));\n\t }).then(function (_) {\n\t return self;\n\t });\n\t }\n\t /**\n\t * Starts a new chunk upload session and uploads the first fragment.\n\t * The current file content is not changed when this method completes.\n\t * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n\t * The upload session ends either when you use the CancelUpload method or when you successfully\n\t * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n\t * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n\t * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n\t * This method is currently available only on Office 365.\n\t *\n\t * @param uploadId The unique identifier of the upload session.\n\t * @param fragment The file contents.\n\t * @returns The size of the total uploaded data in bytes.\n\t */\n\t\n\t }, {\n\t key: \"startUpload\",\n\t value: function startUpload(uploadId, fragment) {\n\t return new File(this, \"startUpload(uploadId=guid'\" + uploadId + \"')\").postAs({ body: fragment }).then(function (n) {\n\t return parseFloat(n);\n\t });\n\t }\n\t /**\n\t * Continues the chunk upload session with an additional fragment.\n\t * The current file content is not changed.\n\t * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n\t * This method is currently available only on Office 365.\n\t *\n\t * @param uploadId The unique identifier of the upload session.\n\t * @param fileOffset The size of the offset into the file where the fragment starts.\n\t * @param fragment The file contents.\n\t * @returns The size of the total uploaded data in bytes.\n\t */\n\t\n\t }, {\n\t key: \"continueUpload\",\n\t value: function continueUpload(uploadId, fileOffset, fragment) {\n\t return new File(this, \"continueUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\").postAs({ body: fragment }).then(function (n) {\n\t return parseFloat(n);\n\t });\n\t }\n\t /**\n\t * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n\t * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n\t * This method is currently available only on Office 365.\n\t *\n\t * @param uploadId The unique identifier of the upload session.\n\t * @param fileOffset The size of the offset into the file where the fragment starts.\n\t * @param fragment The file contents.\n\t * @returns The newly uploaded file.\n\t */\n\t\n\t }, {\n\t key: \"finishUpload\",\n\t value: function finishUpload(uploadId, fileOffset, fragment) {\n\t return new File(this, \"finishUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\").postAs({ body: fragment }).then(function (response) {\n\t return {\n\t data: response,\n\t file: new File(response.ServerRelativeUrl)\n\t };\n\t });\n\t }\n\t }, {\n\t key: \"listItemAllFields\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n\t }\n\t /**\n\t * Gets a collection of versions\n\t *\n\t */\n\t\n\t }, {\n\t key: \"versions\",\n\t get: function get() {\n\t return new Versions(this);\n\t }\n\t }]);\n\t\n\t return File;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.File = File;\n\t/**\n\t * Describes a collection of Version objects\n\t *\n\t */\n\t\n\tvar Versions = function (_queryable_1$Queryabl3) {\n\t _inherits(Versions, _queryable_1$Queryabl3);\n\t\n\t /**\n\t * Creates a new instance of the File class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Versions(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"versions\";\n\t\n\t _classCallCheck(this, Versions);\n\t\n\t return _possibleConstructorReturn(this, (Versions.__proto__ || Object.getPrototypeOf(Versions)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a version by id\n\t *\n\t * @param versionId The id of the version to retrieve\n\t */\n\t\n\t\n\t _createClass(Versions, [{\n\t key: \"getById\",\n\t value: function getById(versionId) {\n\t var v = new Version(this);\n\t v.concat(\"(\" + versionId + \")\");\n\t return v;\n\t }\n\t /**\n\t * Deletes all the file version objects in the collection.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"deleteAll\",\n\t value: function deleteAll() {\n\t return new Versions(this, \"deleteAll\").post();\n\t }\n\t /**\n\t * Deletes the specified version of the file.\n\t *\n\t * @param versionId The ID of the file version to delete.\n\t */\n\t\n\t }, {\n\t key: \"deleteById\",\n\t value: function deleteById(versionId) {\n\t return new Versions(this, \"deleteById(vid=\" + versionId + \")\").post();\n\t }\n\t /**\n\t * Deletes the file version object with the specified version label.\n\t *\n\t * @param label The version label of the file version to delete, for example: 1.2\n\t */\n\t\n\t }, {\n\t key: \"deleteByLabel\",\n\t value: function deleteByLabel(label) {\n\t return new Versions(this, \"deleteByLabel(versionlabel='\" + label + \"')\").post();\n\t }\n\t /**\n\t * Creates a new file version from the file specified by the version label.\n\t *\n\t * @param label The version label of the file version to restore, for example: 1.2\n\t */\n\t\n\t }, {\n\t key: \"restoreByLabel\",\n\t value: function restoreByLabel(label) {\n\t return new Versions(this, \"restoreByLabel(versionlabel='\" + label + \"')\").post();\n\t }\n\t }]);\n\t\n\t return Versions;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Versions = Versions;\n\t/**\n\t * Describes a single Version instance\n\t *\n\t */\n\t\n\tvar Version = function (_queryable_1$Queryabl4) {\n\t _inherits(Version, _queryable_1$Queryabl4);\n\t\n\t /**\n\t * Creates a new instance of the Version class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function Version(baseUrl, path) {\n\t _classCallCheck(this, Version);\n\t\n\t return _possibleConstructorReturn(this, (Version.__proto__ || Object.getPrototypeOf(Version)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Delete a specific version of a file.\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t\n\t\n\t _createClass(Version, [{\n\t key: \"delete\",\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return this.post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return Version;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Version = Version;\n\tvar CheckinType;\n\t(function (CheckinType) {\n\t CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n\t CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n\t CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n\t})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\n\tvar WebPartsPersonalizationScope;\n\t(function (WebPartsPersonalizationScope) {\n\t WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n\t WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n\t})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\n\tvar MoveOperations;\n\t(function (MoveOperations) {\n\t MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n\t MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n\t})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\n\tvar TemplateFileType;\n\t(function (TemplateFileType) {\n\t TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n\t TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n\t TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n\t})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\t\n\tvar LimitedWebPartManager = function (_queryable_1$Queryabl) {\n\t _inherits(LimitedWebPartManager, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the LimitedWebPartManager class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function LimitedWebPartManager(baseUrl, path) {\n\t _classCallCheck(this, LimitedWebPartManager);\n\t\n\t return _possibleConstructorReturn(this, (LimitedWebPartManager.__proto__ || Object.getPrototypeOf(LimitedWebPartManager)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the set of web part definitions contained by this web part manager\n\t *\n\t */\n\t\n\t\n\t _createClass(LimitedWebPartManager, [{\n\t key: \"export\",\n\t\n\t /**\n\t * Exports a webpart definition\n\t *\n\t * @param id the GUID id of the definition to export\n\t */\n\t value: function _export(id) {\n\t var exporter = new LimitedWebPartManager(this, \"ExportWebPart\");\n\t return exporter.post({\n\t body: JSON.stringify({ webPartId: id })\n\t });\n\t }\n\t /**\n\t * Imports a webpart\n\t *\n\t * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n\t */\n\t\n\t }, {\n\t key: \"import\",\n\t value: function _import(xml) {\n\t var importer = new LimitedWebPartManager(this, \"ImportWebPart\");\n\t return importer.post({\n\t body: JSON.stringify({ webPartXml: xml })\n\t });\n\t }\n\t }, {\n\t key: \"webparts\",\n\t get: function get() {\n\t return new WebPartDefinitions(this, \"webparts\");\n\t }\n\t }]);\n\t\n\t return LimitedWebPartManager;\n\t}(queryable_1.Queryable);\n\t\n\texports.LimitedWebPartManager = LimitedWebPartManager;\n\t\n\tvar WebPartDefinitions = function (_queryable_1$Queryabl2) {\n\t _inherits(WebPartDefinitions, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the WebPartDefinitions class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function WebPartDefinitions(baseUrl, path) {\n\t _classCallCheck(this, WebPartDefinitions);\n\t\n\t return _possibleConstructorReturn(this, (WebPartDefinitions.__proto__ || Object.getPrototypeOf(WebPartDefinitions)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a web part definition from the collection by id\n\t *\n\t * @param id GUID id of the web part definition to get\n\t */\n\t\n\t\n\t _createClass(WebPartDefinitions, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t return new WebPartDefinition(this, \"getbyid('\" + id + \"')\");\n\t }\n\t }]);\n\t\n\t return WebPartDefinitions;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.WebPartDefinitions = WebPartDefinitions;\n\t\n\tvar WebPartDefinition = function (_queryable_1$Queryabl3) {\n\t _inherits(WebPartDefinition, _queryable_1$Queryabl3);\n\t\n\t /**\n\t * Creates a new instance of the WebPartDefinition class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function WebPartDefinition(baseUrl, path) {\n\t _classCallCheck(this, WebPartDefinition);\n\t\n\t return _possibleConstructorReturn(this, (WebPartDefinition.__proto__ || Object.getPrototypeOf(WebPartDefinition)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the webpart information associated with this definition\n\t */\n\t\n\t\n\t _createClass(WebPartDefinition, [{\n\t key: \"delete\",\n\t\n\t /**\n\t * Removes a webpart from a page, all settings will be lost\n\t */\n\t value: function _delete() {\n\t var deleter = new WebPartDefinition(this, \"DeleteWebPart\");\n\t return deleter.post();\n\t }\n\t }, {\n\t key: \"webpart\",\n\t get: function get() {\n\t return new WebPart(this);\n\t }\n\t }]);\n\t\n\t return WebPartDefinition;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.WebPartDefinition = WebPartDefinition;\n\t\n\tvar WebPart = function (_queryable_1$Queryabl4) {\n\t _inherits(WebPart, _queryable_1$Queryabl4);\n\t\n\t /**\n\t * Creates a new instance of the WebPart class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t * @param path Optional, if supplied will be appended to the supplied baseUrl\n\t */\n\t function WebPart(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"webpart\";\n\t\n\t _classCallCheck(this, WebPart);\n\t\n\t return _possibleConstructorReturn(this, (WebPart.__proto__ || Object.getPrototypeOf(WebPart)).call(this, baseUrl, path));\n\t }\n\t\n\t return WebPart;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.WebPart = WebPart;\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar util_1 = __webpack_require__(1);\n\tvar queryable_1 = __webpack_require__(11);\n\t/**\n\t * Describes a collection of content types\n\t *\n\t */\n\t\n\tvar ContentTypes = function (_queryable_1$Queryabl) {\n\t _inherits(ContentTypes, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the ContentTypes class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this content types collection\n\t */\n\t function ContentTypes(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"contenttypes\";\n\t\n\t _classCallCheck(this, ContentTypes);\n\t\n\t return _possibleConstructorReturn(this, (ContentTypes.__proto__ || Object.getPrototypeOf(ContentTypes)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a ContentType by content type id\n\t */\n\t\n\t\n\t _createClass(ContentTypes, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var ct = new ContentType(this);\n\t ct.concat(\"('\" + id + \"')\");\n\t return ct;\n\t }\n\t /**\n\t * Adds an existing contenttype to a content type collection\n\t *\n\t * @param contentTypeId in the following format, for example: 0x010102\n\t */\n\t\n\t }, {\n\t key: \"addAvailableContentType\",\n\t value: function addAvailableContentType(contentTypeId) {\n\t var _this2 = this;\n\t\n\t var postBody = JSON.stringify({\n\t \"contentTypeId\": contentTypeId\n\t });\n\t return new ContentTypes(this, \"addAvailableContentType\").postAs({ body: postBody }).then(function (data) {\n\t return {\n\t contentType: _this2.getById(data.id),\n\t data: data\n\t };\n\t });\n\t }\n\t /**\n\t * Adds a new content type to the collection\n\t *\n\t * @param id The desired content type id for the new content type (also determines the parent content type)\n\t * @param name The name of the content type\n\t * @param description The description of the content type\n\t * @param group The group in which to add the content type\n\t * @param additionalSettings Any additional settings to provide when creating the content type\n\t *\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(id, name) {\n\t var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"\";\n\t\n\t var _this3 = this;\n\t\n\t var group = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \"Custom Content Types\";\n\t var additionalSettings = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"Description\": description,\n\t \"Group\": group,\n\t \"Id\": { \"StringValue\": id },\n\t \"Name\": name,\n\t \"__metadata\": { \"type\": \"SP.ContentType\" }\n\t }, additionalSettings));\n\t return this.post({ body: postBody }).then(function (data) {\n\t return { contentType: _this3.getById(data.id), data: data };\n\t });\n\t }\n\t }]);\n\t\n\t return ContentTypes;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.ContentTypes = ContentTypes;\n\t/**\n\t * Describes a single ContentType instance\n\t *\n\t */\n\t\n\tvar ContentType = function (_queryable_1$Queryabl2) {\n\t _inherits(ContentType, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the ContentType class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this content type instance\n\t */\n\t function ContentType(baseUrl, path) {\n\t _classCallCheck(this, ContentType);\n\t\n\t return _possibleConstructorReturn(this, (ContentType.__proto__ || Object.getPrototypeOf(ContentType)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the column (also known as field) references in the content type.\n\t */\n\t\n\t\n\t _createClass(ContentType, [{\n\t key: \"fieldLinks\",\n\t get: function get() {\n\t return new FieldLinks(this);\n\t }\n\t /**\n\t * Gets a value that specifies the collection of fields for the content type.\n\t */\n\t\n\t }, {\n\t key: \"fields\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"fields\");\n\t }\n\t /**\n\t * Gets the parent content type of the content type.\n\t */\n\t\n\t }, {\n\t key: \"parent\",\n\t get: function get() {\n\t return new ContentType(this, \"parent\");\n\t }\n\t /**\n\t * Gets a value that specifies the collection of workflow associations for the content type.\n\t */\n\t\n\t }, {\n\t key: \"workflowAssociations\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"workflowAssociations\");\n\t }\n\t }]);\n\t\n\t return ContentType;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.ContentType = ContentType;\n\t/**\n\t * Represents a collection of field link instances\n\t */\n\t\n\tvar FieldLinks = function (_queryable_1$Queryabl3) {\n\t _inherits(FieldLinks, _queryable_1$Queryabl3);\n\t\n\t /**\n\t * Creates a new instance of the ContentType class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this content type instance\n\t */\n\t function FieldLinks(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"fieldlinks\";\n\t\n\t _classCallCheck(this, FieldLinks);\n\t\n\t return _possibleConstructorReturn(this, (FieldLinks.__proto__ || Object.getPrototypeOf(FieldLinks)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a FieldLink by GUID id\n\t *\n\t * @param id The GUID id of the field link\n\t */\n\t\n\t\n\t _createClass(FieldLinks, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var fl = new FieldLink(this);\n\t fl.concat(\"(guid'\" + id + \"')\");\n\t return fl;\n\t }\n\t }]);\n\t\n\t return FieldLinks;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.FieldLinks = FieldLinks;\n\t/**\n\t * Represents a field link instance\n\t */\n\t\n\tvar FieldLink = function (_queryable_1$Queryabl4) {\n\t _inherits(FieldLink, _queryable_1$Queryabl4);\n\t\n\t /**\n\t * Creates a new instance of the ContentType class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this content type instance\n\t */\n\t function FieldLink(baseUrl, path) {\n\t _classCallCheck(this, FieldLink);\n\t\n\t return _possibleConstructorReturn(this, (FieldLink.__proto__ || Object.getPrototypeOf(FieldLink)).call(this, baseUrl, path));\n\t }\n\t\n\t return FieldLink;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.FieldLink = FieldLink;\n\n/***/ },\n/* 31 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar odata_1 = __webpack_require__(12);\n\t/**\n\t * Describes a collection of Item objects\n\t *\n\t */\n\t\n\tvar AttachmentFiles = function (_queryable_1$Queryabl) {\n\t _inherits(AttachmentFiles, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the AttachmentFiles class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this attachments collection\n\t */\n\t function AttachmentFiles(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"AttachmentFiles\";\n\t\n\t _classCallCheck(this, AttachmentFiles);\n\t\n\t return _possibleConstructorReturn(this, (AttachmentFiles.__proto__ || Object.getPrototypeOf(AttachmentFiles)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a Attachment File by filename\n\t *\n\t * @param name The name of the file, including extension.\n\t */\n\t\n\t\n\t _createClass(AttachmentFiles, [{\n\t key: \"getByName\",\n\t value: function getByName(name) {\n\t var f = new AttachmentFile(this);\n\t f.concat(\"('\" + name + \"')\");\n\t return f;\n\t }\n\t /**\n\t * Adds a new attachment to the collection\n\t *\n\t * @param name The name of the file, including extension.\n\t * @param content The Base64 file content.\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(name, content) {\n\t var _this2 = this;\n\t\n\t return new AttachmentFiles(this, \"add(FileName='\" + name + \"')\").post({\n\t body: content\n\t }).then(function (response) {\n\t return {\n\t data: response,\n\t file: _this2.getByName(name)\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return AttachmentFiles;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.AttachmentFiles = AttachmentFiles;\n\t/**\n\t * Describes a single attachment file instance\n\t *\n\t */\n\t\n\tvar AttachmentFile = function (_queryable_1$Queryabl2) {\n\t _inherits(AttachmentFile, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the AttachmentFile class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this attachment file\n\t */\n\t function AttachmentFile(baseUrl, path) {\n\t _classCallCheck(this, AttachmentFile);\n\t\n\t return _possibleConstructorReturn(this, (AttachmentFile.__proto__ || Object.getPrototypeOf(AttachmentFile)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the contents of the file as text\n\t *\n\t */\n\t\n\t\n\t _createClass(AttachmentFile, [{\n\t key: \"getText\",\n\t value: function getText() {\n\t return new AttachmentFile(this, \"$value\").get(new odata_1.TextFileParser());\n\t }\n\t /**\n\t * Gets the contents of the file as a blob, does not work in Node.js\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getBlob\",\n\t value: function getBlob() {\n\t return new AttachmentFile(this, \"$value\").get(new odata_1.BlobFileParser());\n\t }\n\t /**\n\t * Gets the contents of a file as an ArrayBuffer, works in Node.js\n\t */\n\t\n\t }, {\n\t key: \"getBuffer\",\n\t value: function getBuffer() {\n\t return new AttachmentFile(this, \"$value\").get(new odata_1.BufferFileParser());\n\t }\n\t /**\n\t * Gets the contents of a file as an ArrayBuffer, works in Node.js\n\t */\n\t\n\t }, {\n\t key: \"getJSON\",\n\t value: function getJSON() {\n\t return new AttachmentFile(this, \"$value\").get(new odata_1.JSONFileParser());\n\t }\n\t /**\n\t * Sets the content of a file\n\t *\n\t * @param content The value to set for the file contents\n\t */\n\t\n\t }, {\n\t key: \"setContent\",\n\t value: function setContent(content) {\n\t var _this4 = this;\n\t\n\t var setter = new AttachmentFile(this, \"$value\");\n\t return setter.post({\n\t body: content,\n\t headers: {\n\t \"X-HTTP-Method\": \"PUT\"\n\t }\n\t }).then(function (_) {\n\t return new AttachmentFile(_this4);\n\t });\n\t }\n\t /**\n\t * Delete this attachment file\n\t *\n\t * @param eTag Value used in the IF-Match header, by default \"*\"\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t var eTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"*\";\n\t\n\t return this.post({\n\t headers: {\n\t \"IF-Match\": eTag,\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t }]);\n\t\n\t return AttachmentFile;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.AttachmentFile = AttachmentFile;\n\n/***/ },\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar util_1 = __webpack_require__(1);\n\t/**\n\t * Describes the views available in the current context\n\t *\n\t */\n\t\n\tvar Views = function (_queryable_1$Queryabl) {\n\t _inherits(Views, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Views class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Views(baseUrl) {\n\t _classCallCheck(this, Views);\n\t\n\t return _possibleConstructorReturn(this, (Views.__proto__ || Object.getPrototypeOf(Views)).call(this, baseUrl, \"views\"));\n\t }\n\t /**\n\t * Gets a view by guid id\n\t *\n\t * @param id The GUID id of the view\n\t */\n\t\n\t\n\t _createClass(Views, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var v = new View(this);\n\t v.concat(\"('\" + id + \"')\");\n\t return v;\n\t }\n\t /**\n\t * Gets a view by title (case-sensitive)\n\t *\n\t * @param title The case-sensitive title of the view\n\t */\n\t\n\t }, {\n\t key: \"getByTitle\",\n\t value: function getByTitle(title) {\n\t return new View(this, \"getByTitle('\" + title + \"')\");\n\t }\n\t /**\n\t * Adds a new view to the collection\n\t *\n\t * @param title The new views's title\n\t * @param personalView True if this is a personal view, otherwise false, default = false\n\t * @param additionalSettings Will be passed as part of the view creation body\n\t */\n\t /*tslint:disable max-line-length */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(title) {\n\t var _this2 = this;\n\t\n\t var personalView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t var additionalSettings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"PersonalView\": personalView,\n\t \"Title\": title,\n\t \"__metadata\": { \"type\": \"SP.View\" }\n\t }, additionalSettings));\n\t return this.postAs({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t view: _this2.getById(data.Id)\n\t };\n\t });\n\t }\n\t }]);\n\t\n\t return Views;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Views = Views;\n\t/**\n\t * Describes a single View instance\n\t *\n\t */\n\t\n\tvar View = function (_queryable_1$Queryabl2) {\n\t _inherits(View, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the View class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function View(baseUrl, path) {\n\t _classCallCheck(this, View);\n\t\n\t return _possibleConstructorReturn(this, (View.__proto__ || Object.getPrototypeOf(View)).call(this, baseUrl, path));\n\t }\n\t\n\t _createClass(View, [{\n\t key: \"update\",\n\t\n\t /**\n\t * Updates this view intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the view\n\t */\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.View\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t view: _this4\n\t };\n\t });\n\t }\n\t /**\n\t * Delete this view\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return this.post({\n\t headers: {\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Returns the list view as HTML.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"renderAsHtml\",\n\t value: function renderAsHtml() {\n\t var q = new queryable_1.Queryable(this, \"renderashtml\");\n\t return q.get();\n\t }\n\t }, {\n\t key: \"fields\",\n\t get: function get() {\n\t return new ViewFields(this);\n\t }\n\t }]);\n\t\n\t return View;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.View = View;\n\t\n\tvar ViewFields = function (_queryable_1$Queryabl3) {\n\t _inherits(ViewFields, _queryable_1$Queryabl3);\n\t\n\t function ViewFields(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"viewfields\";\n\t\n\t _classCallCheck(this, ViewFields);\n\t\n\t return _possibleConstructorReturn(this, (ViewFields.__proto__ || Object.getPrototypeOf(ViewFields)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a value that specifies the XML schema that represents the collection.\n\t */\n\t\n\t\n\t _createClass(ViewFields, [{\n\t key: \"getSchemaXml\",\n\t value: function getSchemaXml() {\n\t var q = new queryable_1.Queryable(this, \"schemaxml\");\n\t return q.get();\n\t }\n\t /**\n\t * Adds the field with the specified field internal name or display name to the collection.\n\t *\n\t * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(fieldTitleOrInternalName) {\n\t var q = new ViewFields(this, \"addviewfield('\" + fieldTitleOrInternalName + \"')\");\n\t return q.post();\n\t }\n\t /**\n\t * Moves the field with the specified field internal name to the specified position in the collection.\n\t *\n\t * @param fieldInternalName The case-sensitive internal name of the field to move.\n\t * @param index The zero-based index of the new position for the field.\n\t */\n\t\n\t }, {\n\t key: \"move\",\n\t value: function move(fieldInternalName, index) {\n\t var q = new ViewFields(this, \"moveviewfieldto\");\n\t var postBody = JSON.stringify({ \"field\": fieldInternalName, \"index\": index });\n\t return q.post({ body: postBody });\n\t }\n\t /**\n\t * Removes all the fields from the collection.\n\t */\n\t\n\t }, {\n\t key: \"removeAll\",\n\t value: function removeAll() {\n\t var q = new ViewFields(this, \"removeallviewfields\");\n\t return q.post();\n\t }\n\t /**\n\t * Removes the field with the specified field internal name from the collection.\n\t *\n\t * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n\t */\n\t\n\t }, {\n\t key: \"remove\",\n\t value: function remove(fieldInternalName) {\n\t var q = new ViewFields(this, \"removeviewfield('\" + fieldInternalName + \"')\");\n\t return q.post();\n\t }\n\t }]);\n\t\n\t return ViewFields;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.ViewFields = ViewFields;\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar util_1 = __webpack_require__(1);\n\tvar Types = __webpack_require__(34);\n\t/**\n\t * Describes a collection of Field objects\n\t *\n\t */\n\t\n\tvar Fields = function (_queryable_1$Queryabl) {\n\t _inherits(Fields, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Fields class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Fields(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"fields\";\n\t\n\t _classCallCheck(this, Fields);\n\t\n\t return _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a field from the collection by title\n\t *\n\t * @param title The case-sensitive title of the field\n\t */\n\t\n\t\n\t _createClass(Fields, [{\n\t key: \"getByTitle\",\n\t value: function getByTitle(title) {\n\t return new Field(this, \"getByTitle('\" + title + \"')\");\n\t }\n\t /**\n\t * Gets a field from the collection by using internal name or title\n\t *\n\t * @param name The case-sensitive internal name or title of the field\n\t */\n\t\n\t }, {\n\t key: \"getByInternalNameOrTitle\",\n\t value: function getByInternalNameOrTitle(name) {\n\t return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\n\t }\n\t /**\n\t * Gets a list from the collection by guid id\n\t *\n\t * @param title The Id of the list\n\t */\n\t\n\t }, {\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var f = new Field(this);\n\t f.concat(\"('\" + id + \"')\");\n\t return f;\n\t }\n\t /**\n\t * Creates a field based on the specified schema\n\t */\n\t\n\t }, {\n\t key: \"createFieldAsXml\",\n\t value: function createFieldAsXml(xml) {\n\t var _this2 = this;\n\t\n\t var info = void 0;\n\t if (typeof xml === \"string\") {\n\t info = { SchemaXml: xml };\n\t } else {\n\t info = xml;\n\t }\n\t var postBody = JSON.stringify({\n\t \"parameters\": util_1.Util.extend({\n\t \"__metadata\": {\n\t \"type\": \"SP.XmlSchemaFieldCreationInformation\"\n\t }\n\t }, info)\n\t });\n\t var q = new Fields(this, \"createfieldasxml\");\n\t return q.postAs({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t field: _this2.getById(data.Id)\n\t };\n\t });\n\t }\n\t /**\n\t * Adds a new list to the collection\n\t *\n\t * @param title The new field's title\n\t * @param fieldType The new field's type (ex: SP.FieldText)\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(title, fieldType) {\n\t var _this3 = this;\n\t\n\t var properties = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"Title\": title,\n\t \"__metadata\": { \"type\": fieldType }\n\t }, properties));\n\t return this.postAs({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t field: _this3.getById(data.Id)\n\t };\n\t });\n\t }\n\t /**\n\t * Adds a new SP.FieldText to the collection\n\t *\n\t * @param title The field title\n\t * @param maxLength The maximum number of characters allowed in the value of the field.\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"addText\",\n\t value: function addText(title) {\n\t var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 255;\n\t var properties = arguments[2];\n\t\n\t var props = {\n\t FieldTypeKind: 2,\n\t MaxLength: maxLength\n\t };\n\t return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldCalculated to the collection\n\t *\n\t * @param title The field title.\n\t * @param formula The formula for the field.\n\t * @param dateFormat The date and time format that is displayed in the field.\n\t * @param outputType Specifies the output format for the field. Represents a FieldType value.\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"addCalculated\",\n\t value: function addCalculated(title, formula, dateFormat) {\n\t var outputType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Types.FieldTypes.Text;\n\t var properties = arguments[4];\n\t\n\t var props = {\n\t DateFormat: dateFormat,\n\t FieldTypeKind: 17,\n\t Formula: formula,\n\t OutputType: outputType\n\t };\n\t return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldDateTime to the collection\n\t *\n\t * @param title The field title\n\t * @param displayFormat The format of the date and time that is displayed in the field.\n\t * @param calendarType Specifies the calendar type of the field.\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"addDateTime\",\n\t value: function addDateTime(title) {\n\t var displayFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Types.DateTimeFieldFormatType.DateOnly;\n\t var calendarType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Types.CalendarType.Gregorian;\n\t var friendlyDisplayFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\t var properties = arguments[4];\n\t\n\t var props = {\n\t DateTimeCalendarType: calendarType,\n\t DisplayFormat: displayFormat,\n\t FieldTypeKind: 4,\n\t FriendlyDisplayFormat: friendlyDisplayFormat\n\t };\n\t return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldNumber to the collection\n\t *\n\t * @param title The field title\n\t * @param minValue The field's minimum value\n\t * @param maxValue The field's maximum value\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"addNumber\",\n\t value: function addNumber(title, minValue, maxValue, properties) {\n\t var props = { FieldTypeKind: 9 };\n\t if (typeof minValue !== \"undefined\") {\n\t props = util_1.Util.extend({ MinimumValue: minValue }, props);\n\t }\n\t if (typeof maxValue !== \"undefined\") {\n\t props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n\t }\n\t return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldCurrency to the collection\n\t *\n\t * @param title The field title\n\t * @param minValue The field's minimum value\n\t * @param maxValue The field's maximum value\n\t * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t */\n\t\n\t }, {\n\t key: \"addCurrency\",\n\t value: function addCurrency(title, minValue, maxValue) {\n\t var currencyLocalId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1033;\n\t var properties = arguments[4];\n\t\n\t var props = {\n\t CurrencyLocaleId: currencyLocalId,\n\t FieldTypeKind: 10\n\t };\n\t if (typeof minValue !== \"undefined\") {\n\t props = util_1.Util.extend({ MinimumValue: minValue }, props);\n\t }\n\t if (typeof maxValue !== \"undefined\") {\n\t props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n\t }\n\t return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldMultiLineText to the collection\n\t *\n\t * @param title The field title\n\t * @param numberOfLines Specifies the number of lines of text to display for the field.\n\t * @param richText Specifies whether the field supports rich formatting.\n\t * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n\t * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n\t * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n\t * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n\t *\n\t */\n\t\n\t }, {\n\t key: \"addMultilineText\",\n\t value: function addMultilineText(title) {\n\t var numberOfLines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;\n\t var richText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t var restrictedMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\t var appendOnly = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\t var allowHyperlink = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n\t var properties = arguments[6];\n\t\n\t var props = {\n\t AllowHyperlink: allowHyperlink,\n\t AppendOnly: appendOnly,\n\t FieldTypeKind: 3,\n\t NumberOfLines: numberOfLines,\n\t RestrictedMode: restrictedMode,\n\t RichText: richText\n\t };\n\t return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n\t }\n\t /**\n\t * Adds a new SP.FieldUrl to the collection\n\t *\n\t * @param title The field title\n\t */\n\t\n\t }, {\n\t key: \"addUrl\",\n\t value: function addUrl(title) {\n\t var displayFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Types.UrlFieldFormatType.Hyperlink;\n\t var properties = arguments[2];\n\t\n\t var props = {\n\t DisplayFormat: displayFormat,\n\t FieldTypeKind: 11\n\t };\n\t return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n\t }\n\t }]);\n\t\n\t return Fields;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Fields = Fields;\n\t/**\n\t * Describes a single of Field instance\n\t *\n\t */\n\t\n\tvar Field = function (_queryable_1$Queryabl2) {\n\t _inherits(Field, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the Field class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this field instance\n\t */\n\t function Field(baseUrl, path) {\n\t _classCallCheck(this, Field);\n\t\n\t return _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Updates this field intance with the supplied properties\n\t *\n\t * @param properties A plain object hash of values to update for the list\n\t * @param fieldType The type value, required to update child field type properties\n\t */\n\t\n\t\n\t _createClass(Field, [{\n\t key: \"update\",\n\t value: function update(properties) {\n\t var _this5 = this;\n\t\n\t var fieldType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"SP.Field\";\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": fieldType }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t field: _this5\n\t };\n\t });\n\t }\n\t /**\n\t * Delete this fields\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return this.post({\n\t headers: {\n\t \"X-HTTP-Method\": \"DELETE\"\n\t }\n\t });\n\t }\n\t /**\n\t * Sets the value of the ShowInDisplayForm property for this field.\n\t */\n\t\n\t }, {\n\t key: \"setShowInDisplayForm\",\n\t value: function setShowInDisplayForm(show) {\n\t var q = new Field(this, \"setshowindisplayform(\" + show + \")\");\n\t return q.post();\n\t }\n\t /**\n\t * Sets the value of the ShowInEditForm property for this field.\n\t */\n\t\n\t }, {\n\t key: \"setShowInEditForm\",\n\t value: function setShowInEditForm(show) {\n\t var q = new Field(this, \"setshowineditform(\" + show + \")\");\n\t return q.post();\n\t }\n\t /**\n\t * Sets the value of the ShowInNewForm property for this field.\n\t */\n\t\n\t }, {\n\t key: \"setShowInNewForm\",\n\t value: function setShowInNewForm(show) {\n\t var q = new Field(this, \"setshowinnewform(\" + show + \")\");\n\t return q.post();\n\t }\n\t }]);\n\t\n\t return Field;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Field = Field;\n\n/***/ },\n/* 34 */\n/***/ function(module, exports) {\n\n\t// reference: https://msdn.microsoft.com/en-us/library/office/dn600183.aspx\n\t\"use strict\";\n\t/**\n\t * Determines the display mode of the given control or view\n\t */\n\t\n\tvar ControlMode;\n\t(function (ControlMode) {\n\t ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n\t ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n\t ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n\t})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n\t/**\n\t * Specifies the type of the field.\n\t */\n\tvar FieldTypes;\n\t(function (FieldTypes) {\n\t FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n\t FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n\t FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n\t FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n\t FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n\t FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n\t FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n\t FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n\t FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n\t FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n\t FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n\t FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n\t FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n\t FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n\t FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n\t FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n\t FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n\t FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n\t FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n\t FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n\t FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n\t FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n\t FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n\t FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n\t FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n\t FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n\t FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n\t FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n\t FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n\t FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n\t FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n\t})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\n\tvar DateTimeFieldFormatType;\n\t(function (DateTimeFieldFormatType) {\n\t DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n\t DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n\t})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n\t/**\n\t * Specifies the control settings while adding a field.\n\t */\n\tvar AddFieldOptions;\n\t(function (AddFieldOptions) {\n\t /**\n\t * Specify that a new field added to the list must also be added to the default content type in the site collection\n\t */\n\t AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n\t /**\n\t * Specify that a new field added to the list must also be added to the default content type in the site collection.\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n\t /**\n\t * Specify that a new field must not be added to any other content type\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n\t /**\n\t * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n\t /**\n\t * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n\t /**\n\t * Specify that a new field that is added to the specified list must also be added to the default list view\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n\t /**\n\t * Specify to confirm that no other field has the same display name\n\t */\n\t AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n\t})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\n\tvar CalendarType;\n\t(function (CalendarType) {\n\t CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n\t CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n\t CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n\t CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n\t CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n\t CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n\t CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n\t CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n\t CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n\t CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n\t CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n\t CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n\t CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n\t CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n\t CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n\t})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\n\tvar UrlFieldFormatType;\n\t(function (UrlFieldFormatType) {\n\t UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n\t UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n\t})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\n\tvar PrincipalType;\n\t(function (PrincipalType) {\n\t PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n\t PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n\t PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n\t PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n\t PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n\t PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n\t})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n\tvar PageType;\n\t(function (PageType) {\n\t PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n\t PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n\t PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n\t PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n\t PageType[PageType[\"View\"] = 3] = \"View\";\n\t PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n\t PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n\t PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n\t PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n\t PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n\t PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n\t PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n\t PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n\t})(PageType = exports.PageType || (exports.PageType = {}));\n\n/***/ },\n/* 35 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\t/**\n\t * Describes a collection of Field objects\n\t *\n\t */\n\t\n\tvar Forms = function (_queryable_1$Queryabl) {\n\t _inherits(Forms, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Fields class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Forms(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"forms\";\n\t\n\t _classCallCheck(this, Forms);\n\t\n\t return _possibleConstructorReturn(this, (Forms.__proto__ || Object.getPrototypeOf(Forms)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a form by id\n\t *\n\t * @param id The guid id of the item to retrieve\n\t */\n\t\n\t\n\t _createClass(Forms, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var i = new Form(this);\n\t i.concat(\"('\" + id + \"')\");\n\t return i;\n\t }\n\t }]);\n\t\n\t return Forms;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Forms = Forms;\n\t/**\n\t * Describes a single of Form instance\n\t *\n\t */\n\t\n\tvar Form = function (_queryable_1$Queryabl2) {\n\t _inherits(Form, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the Form class\n\t *\n\t * @param baseUrl The url or Queryable which is the parent of this form instance\n\t */\n\t function Form(baseUrl, path) {\n\t _classCallCheck(this, Form);\n\t\n\t return _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, baseUrl, path));\n\t }\n\t\n\t return Form;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Form = Form;\n\n/***/ },\n/* 36 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\t/**\n\t * Describes a collection of webhook subscriptions\n\t *\n\t */\n\t\n\tvar Subscriptions = function (_queryable_1$Queryabl) {\n\t _inherits(Subscriptions, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Subscriptions class\n\t *\n\t * @param baseUrl - The url or Queryable which forms the parent of this webhook subscriptions collection\n\t */\n\t function Subscriptions(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"subscriptions\";\n\t\n\t _classCallCheck(this, Subscriptions);\n\t\n\t return _possibleConstructorReturn(this, (Subscriptions.__proto__ || Object.getPrototypeOf(Subscriptions)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Returns all the webhook subscriptions or the specified webhook subscription\n\t *\n\t */\n\t\n\t\n\t _createClass(Subscriptions, [{\n\t key: \"getById\",\n\t value: function getById(subscriptionId) {\n\t var subscription = new Subscription(this);\n\t subscription.concat(\"('\" + subscriptionId + \"')\");\n\t return subscription;\n\t }\n\t /**\n\t * Create a new webhook subscription\n\t *\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(notificationUrl, expirationDate, clientState) {\n\t var _this2 = this;\n\t\n\t var postBody = JSON.stringify({\n\t \"clientState\": clientState || \"pnp-js-core-subscription\",\n\t \"expirationDateTime\": expirationDate,\n\t \"notificationUrl\": notificationUrl,\n\t \"resource\": this.toUrl()\n\t });\n\t return this.post({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\n\t return { data: result, subscription: _this2.getById(result.id) };\n\t });\n\t }\n\t }]);\n\t\n\t return Subscriptions;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Subscriptions = Subscriptions;\n\t/**\n\t * Describes a single webhook subscription instance\n\t *\n\t */\n\t\n\tvar Subscription = function (_queryable_1$Queryabl2) {\n\t _inherits(Subscription, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the Subscription class\n\t *\n\t * @param baseUrl - The url or Queryable which forms the parent of this webhook subscription instance\n\t */\n\t function Subscription(baseUrl, path) {\n\t _classCallCheck(this, Subscription);\n\t\n\t return _possibleConstructorReturn(this, (Subscription.__proto__ || Object.getPrototypeOf(Subscription)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Update a webhook subscription\n\t *\n\t */\n\t\n\t\n\t _createClass(Subscription, [{\n\t key: \"update\",\n\t value: function update(expirationDate) {\n\t var _this4 = this;\n\t\n\t var postBody = JSON.stringify({\n\t \"expirationDateTime\": expirationDate\n\t });\n\t return this.patch({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\n\t return { data: data, subscription: _this4 };\n\t });\n\t }\n\t /**\n\t * Remove a webhook subscription\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return _get(Subscription.prototype.__proto__ || Object.getPrototypeOf(Subscription.prototype), \"delete\", this).call(this);\n\t }\n\t }]);\n\t\n\t return Subscription;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Subscription = Subscription;\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar util_1 = __webpack_require__(1);\n\t\n\tvar UserCustomActions = function (_queryable_1$Queryabl) {\n\t _inherits(UserCustomActions, _queryable_1$Queryabl);\n\t\n\t function UserCustomActions(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"usercustomactions\";\n\t\n\t _classCallCheck(this, UserCustomActions);\n\t\n\t return _possibleConstructorReturn(this, (UserCustomActions.__proto__ || Object.getPrototypeOf(UserCustomActions)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Returns the custom action with the specified identifier.\n\t *\n\t * @param id The GUID ID of the user custom action to get.\n\t */\n\t\n\t\n\t _createClass(UserCustomActions, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var uca = new UserCustomAction(this);\n\t uca.concat(\"('\" + id + \"')\");\n\t return uca;\n\t }\n\t /**\n\t * Create a custom action\n\t *\n\t * @param creationInfo The information which defines the new custom action\n\t *\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(properties) {\n\t var _this2 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n\t return this.post({ body: postBody }).then(function (data) {\n\t return {\n\t action: _this2.getById(data.Id),\n\t data: data\n\t };\n\t });\n\t }\n\t /**\n\t * Deletes all custom actions in the collection.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"clear\",\n\t value: function clear() {\n\t var a = new UserCustomActions(this, \"clear\");\n\t return a.post();\n\t }\n\t }]);\n\t\n\t return UserCustomActions;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.UserCustomActions = UserCustomActions;\n\t\n\tvar UserCustomAction = function (_queryable_1$Queryabl2) {\n\t _inherits(UserCustomAction, _queryable_1$Queryabl2);\n\t\n\t function UserCustomAction(baseUrl, path) {\n\t _classCallCheck(this, UserCustomAction);\n\t\n\t return _possibleConstructorReturn(this, (UserCustomAction.__proto__ || Object.getPrototypeOf(UserCustomAction)).call(this, baseUrl, path));\n\t }\n\t\n\t _createClass(UserCustomAction, [{\n\t key: \"update\",\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.UserCustomAction\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t action: _this4,\n\t data: data\n\t };\n\t });\n\t }\n\t /**\n\t * Remove a custom action\n\t *\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return _get(UserCustomAction.prototype.__proto__ || Object.getPrototypeOf(UserCustomAction.prototype), \"delete\", this).call(this);\n\t }\n\t }]);\n\t\n\t return UserCustomAction;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.UserCustomAction = UserCustomAction;\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar util_1 = __webpack_require__(1);\n\tvar queryable_1 = __webpack_require__(11);\n\t/**\n\t * Represents a collection of navigation nodes\n\t *\n\t */\n\t\n\tvar NavigationNodes = function (_queryable_1$Queryabl) {\n\t _inherits(NavigationNodes, _queryable_1$Queryabl);\n\t\n\t function NavigationNodes(baseUrl, path) {\n\t _classCallCheck(this, NavigationNodes);\n\t\n\t return _possibleConstructorReturn(this, (NavigationNodes.__proto__ || Object.getPrototypeOf(NavigationNodes)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a navigation node by id\n\t *\n\t * @param id The id of the node\n\t */\n\t\n\t\n\t _createClass(NavigationNodes, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var node = new NavigationNode(this);\n\t node.concat(\"(\" + id + \")\");\n\t return node;\n\t }\n\t /**\n\t * Adds a new node to the collection\n\t *\n\t * @param title Display name of the node\n\t * @param url The url of the node\n\t * @param visible If true the node is visible, otherwise it is hidden (default: true)\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(title, url) {\n\t var _this2 = this;\n\t\n\t var visible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t\n\t var postBody = JSON.stringify({\n\t IsVisible: visible,\n\t Title: title,\n\t Url: url,\n\t \"__metadata\": { \"type\": \"SP.NavigationNode\" }\n\t });\n\t var adder = new NavigationNodes(this);\n\t return adder.post({ body: postBody }).then(function (data) {\n\t return {\n\t data: data,\n\t node: _this2.getById(data.Id)\n\t };\n\t });\n\t }\n\t /**\n\t * Moves a node to be after another node in the navigation\n\t *\n\t * @param nodeId Id of the node to move\n\t * @param previousNodeId Id of the node after which we move the node specified by nodeId\n\t */\n\t\n\t }, {\n\t key: \"moveAfter\",\n\t value: function moveAfter(nodeId, previousNodeId) {\n\t var postBody = JSON.stringify({\n\t nodeId: nodeId,\n\t previousNodeId: previousNodeId\n\t });\n\t var mover = new NavigationNodes(this, \"MoveAfter\");\n\t return mover.post({ body: postBody });\n\t }\n\t }]);\n\t\n\t return NavigationNodes;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.NavigationNodes = NavigationNodes;\n\t\n\tvar NavigationNode = function (_queryable_1$Queryabl2) {\n\t _inherits(NavigationNode, _queryable_1$Queryabl2);\n\t\n\t function NavigationNode(baseUrl, path) {\n\t _classCallCheck(this, NavigationNode);\n\t\n\t return _possibleConstructorReturn(this, (NavigationNode.__proto__ || Object.getPrototypeOf(NavigationNode)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Represents the child nodes of this node\n\t */\n\t\n\t\n\t _createClass(NavigationNode, [{\n\t key: \"update\",\n\t\n\t /**\n\t * Updates this node based on the supplied properties\n\t *\n\t * @param properties The hash of key/value pairs to update\n\t */\n\t value: function update(properties) {\n\t var _this4 = this;\n\t\n\t var postBody = JSON.stringify(util_1.Util.extend({\n\t \"__metadata\": { \"type\": \"SP.NavigationNode\" }\n\t }, properties));\n\t return this.post({\n\t body: postBody,\n\t headers: {\n\t \"X-HTTP-Method\": \"MERGE\"\n\t }\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t node: _this4\n\t };\n\t });\n\t }\n\t /**\n\t * Deletes this node and any child nodes\n\t */\n\t\n\t }, {\n\t key: \"delete\",\n\t value: function _delete() {\n\t return _get(NavigationNode.prototype.__proto__ || Object.getPrototypeOf(NavigationNode.prototype), \"delete\", this).call(this);\n\t }\n\t }, {\n\t key: \"children\",\n\t get: function get() {\n\t return new NavigationNodes(this, \"Children\");\n\t }\n\t }]);\n\t\n\t return NavigationNode;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.NavigationNode = NavigationNode;\n\t/**\n\t * Exposes the navigation components\n\t *\n\t */\n\t\n\tvar Navigation = function (_queryable_1$Queryabl3) {\n\t _inherits(Navigation, _queryable_1$Queryabl3);\n\t\n\t /**\n\t * Creates a new instance of the Lists class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Navigation(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"navigation\";\n\t\n\t _classCallCheck(this, Navigation);\n\t\n\t return _possibleConstructorReturn(this, (Navigation.__proto__ || Object.getPrototypeOf(Navigation)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets the quicklaunch navigation for the current context\n\t *\n\t */\n\t\n\t\n\t _createClass(Navigation, [{\n\t key: \"quicklaunch\",\n\t get: function get() {\n\t return new NavigationNodes(this, \"quicklaunch\");\n\t }\n\t /**\n\t * Gets the top bar navigation navigation for the current context\n\t *\n\t */\n\t\n\t }, {\n\t key: \"topNavigationBar\",\n\t get: function get() {\n\t return new NavigationNodes(this, \"topnavigationbar\");\n\t }\n\t }]);\n\t\n\t return Navigation;\n\t}(queryable_1.Queryable);\n\t\n\texports.Navigation = Navigation;\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\t/**\n\t * Describes a collection of List objects\n\t *\n\t */\n\t\n\tvar Features = function (_queryable_1$Queryabl) {\n\t _inherits(Features, _queryable_1$Queryabl);\n\t\n\t /**\n\t * Creates a new instance of the Lists class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Features(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"features\";\n\t\n\t _classCallCheck(this, Features);\n\t\n\t return _possibleConstructorReturn(this, (Features.__proto__ || Object.getPrototypeOf(Features)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Gets a list from the collection by guid id\n\t *\n\t * @param id The Id of the feature (GUID)\n\t */\n\t\n\t\n\t _createClass(Features, [{\n\t key: \"getById\",\n\t value: function getById(id) {\n\t var feature = new Feature(this);\n\t feature.concat(\"('\" + id + \"')\");\n\t return feature;\n\t }\n\t /**\n\t * Adds a new list to the collection\n\t *\n\t * @param id The Id of the feature (GUID)\n\t * @param force If true the feature activation will be forced\n\t */\n\t\n\t }, {\n\t key: \"add\",\n\t value: function add(id) {\n\t var _this2 = this;\n\t\n\t var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\n\t var adder = new Features(this, \"add\");\n\t return adder.post({\n\t body: JSON.stringify({\n\t featdefScope: 0,\n\t featureId: id,\n\t force: force\n\t })\n\t }).then(function (data) {\n\t return {\n\t data: data,\n\t feature: _this2.getById(id)\n\t };\n\t });\n\t }\n\t /**\n\t * Removes (deactivates) a feature from the collection\n\t *\n\t * @param id The Id of the feature (GUID)\n\t * @param force If true the feature deactivation will be forced\n\t */\n\t\n\t }, {\n\t key: \"remove\",\n\t value: function remove(id) {\n\t var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\n\t var remover = new Features(this, \"remove\");\n\t return remover.post({\n\t body: JSON.stringify({\n\t featureId: id,\n\t force: force\n\t })\n\t });\n\t }\n\t }]);\n\t\n\t return Features;\n\t}(queryable_1.QueryableCollection);\n\t\n\texports.Features = Features;\n\t\n\tvar Feature = function (_queryable_1$Queryabl2) {\n\t _inherits(Feature, _queryable_1$Queryabl2);\n\t\n\t /**\n\t * Creates a new instance of the Lists class\n\t *\n\t * @param baseUrl The url or Queryable which forms the parent of this fields collection\n\t */\n\t function Feature(baseUrl, path) {\n\t _classCallCheck(this, Feature);\n\t\n\t return _possibleConstructorReturn(this, (Feature.__proto__ || Object.getPrototypeOf(Feature)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Removes (deactivates) a feature from the collection\n\t *\n\t * @param force If true the feature deactivation will be forced\n\t */\n\t\n\t\n\t _createClass(Feature, [{\n\t key: \"deactivate\",\n\t value: function deactivate() {\n\t var _this4 = this;\n\t\n\t var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t\n\t var removeDependency = this.addBatchDependency();\n\t var idGet = new Feature(this).select(\"DefinitionId\");\n\t return idGet.getAs().then(function (feature) {\n\t var promise = _this4.getParent(Features, _this4.parentUrl, \"\").remove(feature.DefinitionId, force);\n\t removeDependency();\n\t return promise;\n\t });\n\t }\n\t }]);\n\t\n\t return Feature;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.Feature = Feature;\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar queryable_1 = __webpack_require__(11);\n\tvar FileUtil = __webpack_require__(41);\n\tvar odata_1 = __webpack_require__(12);\n\t\n\tvar UserProfileQuery = function (_queryable_1$Queryabl) {\n\t _inherits(UserProfileQuery, _queryable_1$Queryabl);\n\t\n\t function UserProfileQuery(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/sp.userprofiles.peoplemanager\";\n\t\n\t _classCallCheck(this, UserProfileQuery);\n\t\n\t var _this = _possibleConstructorReturn(this, (UserProfileQuery.__proto__ || Object.getPrototypeOf(UserProfileQuery)).call(this, baseUrl, path));\n\t\n\t _this.profileLoader = new ProfileLoader(baseUrl);\n\t return _this;\n\t }\n\t /**\n\t * The URL of the edit profile page for the current user.\n\t */\n\t\n\t\n\t _createClass(UserProfileQuery, [{\n\t key: \"amIFollowedBy\",\n\t\n\t /**\n\t * A Boolean value that indicates whether the current user's People I'm Following list is public.\n\t *\n\t * @param loginName The account name of the user\n\t */\n\t value: function amIFollowedBy(loginName) {\n\t var q = new UserProfileQuery(this, \"amifollowedby(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Checks whether the current user is following the specified user.\n\t *\n\t * @param loginName The account name of the user\n\t */\n\t\n\t }, {\n\t key: \"amIFollowing\",\n\t value: function amIFollowing(loginName) {\n\t var q = new UserProfileQuery(this, \"amifollowing(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Gets tags that the user is following.\n\t *\n\t * @param maxCount The maximum number of tags to get.\n\t */\n\t\n\t }, {\n\t key: \"getFollowedTags\",\n\t value: function getFollowedTags() {\n\t var maxCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20;\n\t\n\t var q = new UserProfileQuery(this, \"getfollowedtags(\" + maxCount + \")\");\n\t return q.get();\n\t }\n\t /**\n\t * Gets the people who are following the specified user.\n\t *\n\t * @param loginName The account name of the user.\n\t */\n\t\n\t }, {\n\t key: \"getFollowersFor\",\n\t value: function getFollowersFor(loginName) {\n\t var q = new UserProfileQuery(this, \"getfollowersfor(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Gets the people who are following the current user.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getPeopleFollowedBy\",\n\t\n\t /**\n\t * Gets the people who the specified user is following.\n\t *\n\t * @param loginName The account name of the user.\n\t */\n\t value: function getPeopleFollowedBy(loginName) {\n\t var q = new UserProfileQuery(this, \"getpeoplefollowedby(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Gets user properties for the specified user.\n\t *\n\t * @param loginName The account name of the user.\n\t */\n\t\n\t }, {\n\t key: \"getPropertiesFor\",\n\t value: function getPropertiesFor(loginName) {\n\t var q = new UserProfileQuery(this, \"getpropertiesfor(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Gets the most popular tags.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"getUserProfilePropertyFor\",\n\t\n\t /**\n\t * Gets the specified user profile property for the specified user.\n\t *\n\t * @param loginName The account name of the user.\n\t * @param propertyName The case-sensitive name of the property to get.\n\t */\n\t value: function getUserProfilePropertyFor(loginName, propertyName) {\n\t var q = new UserProfileQuery(this, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Removes the specified user from the user's list of suggested people to follow.\n\t *\n\t * @param loginName The account name of the user.\n\t */\n\t\n\t }, {\n\t key: \"hideSuggestion\",\n\t value: function hideSuggestion(loginName) {\n\t var q = new UserProfileQuery(this, \"hidesuggestion(@v)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n\t return q.post();\n\t }\n\t /**\n\t * Checks whether the first user is following the second user.\n\t *\n\t * @param follower The account name of the user who might be following followee.\n\t * @param followee The account name of the user who might be followed.\n\t */\n\t\n\t }, {\n\t key: \"isFollowing\",\n\t value: function isFollowing(follower, followee) {\n\t var q = new UserProfileQuery(this, null);\n\t q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\n\t q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n\t q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n\t return q.get();\n\t }\n\t /**\n\t * Uploads and sets the user profile picture\n\t *\n\t * @param profilePicSource Blob data representing the user's picture\n\t */\n\t\n\t }, {\n\t key: \"setMyProfilePic\",\n\t value: function setMyProfilePic(profilePicSource) {\n\t var _this2 = this;\n\t\n\t return new Promise(function (resolve, reject) {\n\t FileUtil.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) {\n\t var request = new UserProfileQuery(_this2, \"setmyprofilepicture\");\n\t request.post({\n\t body: String.fromCharCode.apply(null, new Uint16Array(buffer))\n\t }).then(function (_) {\n\t return resolve();\n\t });\n\t }).catch(function (e) {\n\t return reject(e);\n\t });\n\t });\n\t }\n\t /**\n\t * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n\t *\n\t * @param emails The email addresses of the users to provision sites for\n\t */\n\t\n\t }, {\n\t key: \"createPersonalSiteEnqueueBulk\",\n\t value: function createPersonalSiteEnqueueBulk() {\n\t for (var _len = arguments.length, emails = Array(_len), _key = 0; _key < _len; _key++) {\n\t emails[_key] = arguments[_key];\n\t }\n\t\n\t return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n\t }\n\t /**\n\t * Gets the user profile of the site owner.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"createPersonalSite\",\n\t\n\t /**\n\t * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n\t *\n\t * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n\t */\n\t value: function createPersonalSite() {\n\t var interactiveRequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t\n\t return this.profileLoader.createPersonalSite(interactiveRequest);\n\t }\n\t /**\n\t * Sets the privacy settings for this profile.\n\t *\n\t * @param share true to make all social data public; false to make all social data private.\n\t */\n\t\n\t }, {\n\t key: \"shareAllSocialData\",\n\t value: function shareAllSocialData(share) {\n\t return this.profileLoader.shareAllSocialData(share);\n\t }\n\t }, {\n\t key: \"editProfileLink\",\n\t get: function get() {\n\t var q = new UserProfileQuery(this, \"EditProfileLink\");\n\t return q.getAs(odata_1.ODataValue());\n\t }\n\t /**\n\t * A Boolean value that indicates whether the current user's People I'm Following list is public.\n\t */\n\t\n\t }, {\n\t key: \"isMyPeopleListPublic\",\n\t get: function get() {\n\t var q = new UserProfileQuery(this, \"IsMyPeopleListPublic\");\n\t return q.getAs(odata_1.ODataValue());\n\t }\n\t }, {\n\t key: \"myFollowers\",\n\t get: function get() {\n\t return new queryable_1.QueryableCollection(this, \"getmyfollowers\");\n\t }\n\t /**\n\t * Gets user properties for the current user.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"myProperties\",\n\t get: function get() {\n\t return new UserProfileQuery(this, \"getmyproperties\");\n\t }\n\t }, {\n\t key: \"trendingTags\",\n\t get: function get() {\n\t var q = new UserProfileQuery(this, null);\n\t q.concat(\".gettrendingtags\");\n\t return q.get();\n\t }\n\t }, {\n\t key: \"ownerUserProfile\",\n\t get: function get() {\n\t return this.profileLoader.ownerUserProfile;\n\t }\n\t /**\n\t * Gets the user profile that corresponds to the current user.\n\t */\n\t\n\t }, {\n\t key: \"userProfile\",\n\t get: function get() {\n\t return this.profileLoader.userProfile;\n\t }\n\t }]);\n\t\n\t return UserProfileQuery;\n\t}(queryable_1.QueryableInstance);\n\t\n\texports.UserProfileQuery = UserProfileQuery;\n\t\n\tvar ProfileLoader = function (_queryable_1$Queryabl2) {\n\t _inherits(ProfileLoader, _queryable_1$Queryabl2);\n\t\n\t function ProfileLoader(baseUrl) {\n\t var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"_api/sp.userprofiles.profileloader.getprofileloader\";\n\t\n\t _classCallCheck(this, ProfileLoader);\n\t\n\t return _possibleConstructorReturn(this, (ProfileLoader.__proto__ || Object.getPrototypeOf(ProfileLoader)).call(this, baseUrl, path));\n\t }\n\t /**\n\t * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n\t *\n\t * @param emails The email addresses of the users to provision sites for\n\t */\n\t\n\t\n\t _createClass(ProfileLoader, [{\n\t key: \"createPersonalSiteEnqueueBulk\",\n\t value: function createPersonalSiteEnqueueBulk(emails) {\n\t var q = new ProfileLoader(this, \"createpersonalsiteenqueuebulk\");\n\t var postBody = JSON.stringify({ \"emailIDs\": emails });\n\t return q.post({\n\t body: postBody\n\t });\n\t }\n\t /**\n\t * Gets the user profile of the site owner.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"createPersonalSite\",\n\t\n\t /**\n\t * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n\t *\n\t * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n\t */\n\t value: function createPersonalSite() {\n\t var interactiveRequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\t\n\t var q = new ProfileLoader(this, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\\\",\");\n\t return q.post();\n\t }\n\t /**\n\t * Sets the privacy settings for this profile.\n\t *\n\t * @param share true to make all social data public; false to make all social data private.\n\t */\n\t\n\t }, {\n\t key: \"shareAllSocialData\",\n\t value: function shareAllSocialData(share) {\n\t var q = new ProfileLoader(this, \"getuserprofile/shareallsocialdata(\" + share + \")\\\",\");\n\t return q.post();\n\t }\n\t }, {\n\t key: \"ownerUserProfile\",\n\t get: function get() {\n\t var q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n\t return q.postAs();\n\t }\n\t /**\n\t * Gets the user profile that corresponds to the current user.\n\t *\n\t */\n\t\n\t }, {\n\t key: \"userProfile\",\n\t get: function get() {\n\t var q = new ProfileLoader(this, \"getuserprofile\");\n\t return q.postAs();\n\t }\n\t }]);\n\t\n\t return ProfileLoader;\n\t}(queryable_1.Queryable);\n\n/***/ },\n/* 41 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/**\n\t * Reads a blob as text\n\t *\n\t * @param blob The data to read\n\t */\n\t\n\tfunction readBlobAsText(blob) {\n\t return readBlobAs(blob, \"string\");\n\t}\n\texports.readBlobAsText = readBlobAsText;\n\t/**\n\t * Reads a blob into an array buffer\n\t *\n\t * @param blob The data to read\n\t */\n\tfunction readBlobAsArrayBuffer(blob) {\n\t return readBlobAs(blob, \"buffer\");\n\t}\n\texports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n\t/**\n\t * Generic method to read blob's content\n\t *\n\t * @param blob The data to read\n\t * @param mode The read mode\n\t */\n\tfunction readBlobAs(blob, mode) {\n\t return new Promise(function (resolve, reject) {\n\t try {\n\t var reader = new FileReader();\n\t reader.onload = function (e) {\n\t resolve(e.target.result);\n\t };\n\t switch (mode) {\n\t case \"string\":\n\t reader.readAsText(blob);\n\t break;\n\t case \"buffer\":\n\t reader.readAsArrayBuffer(blob);\n\t break;\n\t }\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t}\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tfunction __export(m) {\n\t for (var p in m) {\n\t if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t }\n\t}\n\t__export(__webpack_require__(43));\n\tvar httpclient_1 = __webpack_require__(13);\n\texports.HttpClient = httpclient_1.HttpClient;\n\tvar sprequestexecutorclient_1 = __webpack_require__(44);\n\texports.SPRequestExecutorClient = sprequestexecutorclient_1.SPRequestExecutorClient;\n\tvar nodefetchclient_1 = __webpack_require__(45);\n\texports.NodeFetchClient = nodefetchclient_1.NodeFetchClient;\n\tvar fetchclient_1 = __webpack_require__(5);\n\texports.FetchClient = fetchclient_1.FetchClient;\n\t__export(__webpack_require__(46));\n\tvar collections_1 = __webpack_require__(8);\n\texports.Dictionary = collections_1.Dictionary;\n\tvar util_1 = __webpack_require__(1);\n\texports.Util = util_1.Util;\n\t__export(__webpack_require__(3));\n\t__export(__webpack_require__(15));\n\n/***/ },\n/* 43 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tfunction __export(m) {\n\t for (var p in m) {\n\t if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t }\n\t}\n\t__export(__webpack_require__(17));\n\tvar files_1 = __webpack_require__(28);\n\texports.CheckinType = files_1.CheckinType;\n\texports.WebPartsPersonalizationScope = files_1.WebPartsPersonalizationScope;\n\texports.MoveOperations = files_1.MoveOperations;\n\texports.TemplateFileType = files_1.TemplateFileType;\n\tvar items_1 = __webpack_require__(26);\n\texports.Item = items_1.Item;\n\texports.PagedItemCollection = items_1.PagedItemCollection;\n\tvar navigation_1 = __webpack_require__(38);\n\texports.NavigationNodes = navigation_1.NavigationNodes;\n\texports.NavigationNode = navigation_1.NavigationNode;\n\tvar lists_1 = __webpack_require__(25);\n\texports.List = lists_1.List;\n\tvar odata_1 = __webpack_require__(12);\n\texports.extractOdataId = odata_1.extractOdataId;\n\texports.ODataParserBase = odata_1.ODataParserBase;\n\texports.ODataDefaultParser = odata_1.ODataDefaultParser;\n\texports.ODataRaw = odata_1.ODataRaw;\n\texports.ODataValue = odata_1.ODataValue;\n\texports.ODataEntity = odata_1.ODataEntity;\n\texports.ODataEntityArray = odata_1.ODataEntityArray;\n\texports.TextFileParser = odata_1.TextFileParser;\n\texports.BlobFileParser = odata_1.BlobFileParser;\n\texports.BufferFileParser = odata_1.BufferFileParser;\n\texports.JSONFileParser = odata_1.JSONFileParser;\n\tvar roles_1 = __webpack_require__(22);\n\texports.RoleDefinitionBindings = roles_1.RoleDefinitionBindings;\n\tvar search_1 = __webpack_require__(10);\n\texports.Search = search_1.Search;\n\texports.SearchResult = search_1.SearchResult;\n\texports.SearchResults = search_1.SearchResults;\n\texports.SortDirection = search_1.SortDirection;\n\texports.ReorderingRuleMatchType = search_1.ReorderingRuleMatchType;\n\texports.QueryPropertyValueType = search_1.QueryPropertyValueType;\n\tvar searchsuggest_1 = __webpack_require__(18);\n\texports.SearchSuggest = searchsuggest_1.SearchSuggest;\n\texports.SearchSuggestResult = searchsuggest_1.SearchSuggestResult;\n\tvar site_1 = __webpack_require__(19);\n\texports.Site = site_1.Site;\n\t__export(__webpack_require__(34));\n\tvar webs_1 = __webpack_require__(20);\n\texports.Web = webs_1.Web;\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar util_1 = __webpack_require__(1);\n\tvar exceptions_1 = __webpack_require__(15);\n\t/**\n\t * Makes requests using the SP.RequestExecutor library.\n\t */\n\t\n\tvar SPRequestExecutorClient = function () {\n\t function SPRequestExecutorClient() {\n\t _classCallCheck(this, SPRequestExecutorClient);\n\t\n\t /**\n\t * Converts a SharePoint REST API response to a fetch API response.\n\t */\n\t this.convertToResponse = function (spResponse) {\n\t var responseHeaders = new Headers();\n\t for (var h in spResponse.headers) {\n\t if (spResponse.headers[h]) {\n\t responseHeaders.append(h, spResponse.headers[h]);\n\t }\n\t }\n\t // issue #256, Cannot have an empty string body when creating a Response with status 204\n\t var body = spResponse.statusCode === 204 ? null : spResponse.body;\n\t return new Response(body, {\n\t headers: responseHeaders,\n\t status: spResponse.statusCode,\n\t statusText: spResponse.statusText\n\t });\n\t };\n\t }\n\t /**\n\t * Fetches a URL using the SP.RequestExecutor library.\n\t */\n\t\n\t\n\t _createClass(SPRequestExecutorClient, [{\n\t key: \"fetch\",\n\t value: function fetch(url, options) {\n\t var _this = this;\n\t\n\t if (typeof SP === \"undefined\" || typeof SP.RequestExecutor === \"undefined\") {\n\t throw new exceptions_1.SPRequestExecutorUndefinedException();\n\t }\n\t var addinWebUrl = url.substring(0, url.indexOf(\"/_api\")),\n\t executor = new SP.RequestExecutor(addinWebUrl),\n\t headers = {},\n\t iterator = void 0,\n\t temp = void 0;\n\t if (options.headers && options.headers instanceof Headers) {\n\t iterator = options.headers.entries();\n\t temp = iterator.next();\n\t while (!temp.done) {\n\t headers[temp.value[0]] = temp.value[1];\n\t temp = iterator.next();\n\t }\n\t } else {\n\t headers = options.headers;\n\t }\n\t return new Promise(function (resolve, reject) {\n\t var requestOptions = {\n\t error: function error(_error) {\n\t reject(_this.convertToResponse(_error));\n\t },\n\t headers: headers,\n\t method: options.method,\n\t success: function success(response) {\n\t resolve(_this.convertToResponse(response));\n\t },\n\t url: url\n\t };\n\t if (options.body) {\n\t requestOptions = util_1.Util.extend(requestOptions, { body: options.body });\n\t } else {\n\t requestOptions = util_1.Util.extend(requestOptions, { binaryStringRequestBody: true });\n\t }\n\t executor.executeAsync(requestOptions);\n\t });\n\t }\n\t }]);\n\t\n\t return SPRequestExecutorClient;\n\t}();\n\t\n\texports.SPRequestExecutorClient = SPRequestExecutorClient;\n\n/***/ },\n/* 45 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar exceptions_1 = __webpack_require__(15);\n\t/**\n\t * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by\n\t * not including all of the node dependencies\n\t */\n\t\n\tvar NodeFetchClient = function () {\n\t function NodeFetchClient() {\n\t _classCallCheck(this, NodeFetchClient);\n\t }\n\t\n\t _createClass(NodeFetchClient, [{\n\t key: \"fetch\",\n\t\n\t /**\n\t * Always throws an error that NodeFetchClient is not supported for use in the browser\n\t */\n\t value: function fetch() {\n\t throw new exceptions_1.NodeFetchClientUnsupportedException();\n\t }\n\t }]);\n\t\n\t return NodeFetchClient;\n\t}();\n\t\n\texports.NodeFetchClient = NodeFetchClient;\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar cachingConfigurationProvider_1 = __webpack_require__(47);\n\texports.CachingConfigurationProvider = cachingConfigurationProvider_1.default;\n\tvar spListConfigurationProvider_1 = __webpack_require__(48);\n\texports.SPListConfigurationProvider = spListConfigurationProvider_1.default;\n\n/***/ },\n/* 47 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar storage = __webpack_require__(6);\n\tvar exceptions_1 = __webpack_require__(15);\n\t/**\n\t * A caching provider which can wrap other non-caching providers\n\t *\n\t */\n\t\n\tvar CachingConfigurationProvider = function () {\n\t /**\n\t * Creates a new caching configuration provider\n\t * @constructor\n\t * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration\n\t * @param {string} cacheKey Key that will be used to store cached items to the cache\n\t * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings.\n\t */\n\t function CachingConfigurationProvider(wrappedProvider, cacheKey, cacheStore) {\n\t _classCallCheck(this, CachingConfigurationProvider);\n\t\n\t this.wrappedProvider = wrappedProvider;\n\t this.store = cacheStore ? cacheStore : this.selectPnPCache();\n\t this.cacheKey = \"_configcache_\" + cacheKey;\n\t }\n\t /**\n\t * Gets the wrapped configuration providers\n\t *\n\t * @return {IConfigurationProvider} Wrapped configuration provider\n\t */\n\t\n\t\n\t _createClass(CachingConfigurationProvider, [{\n\t key: \"getWrappedProvider\",\n\t value: function getWrappedProvider() {\n\t return this.wrappedProvider;\n\t }\n\t /**\n\t * Loads the configuration values either from the cache or from the wrapped provider\n\t *\n\t * @return {Promise>} Promise of loaded configuration values\n\t */\n\t\n\t }, {\n\t key: \"getConfiguration\",\n\t value: function getConfiguration() {\n\t var _this = this;\n\t\n\t // Cache not available, pass control to the wrapped provider\n\t if (!this.store || !this.store.enabled) {\n\t return this.wrappedProvider.getConfiguration();\n\t }\n\t // Value is found in cache, return it directly\n\t var cachedConfig = this.store.get(this.cacheKey);\n\t if (cachedConfig) {\n\t return new Promise(function (resolve) {\n\t resolve(cachedConfig);\n\t });\n\t }\n\t // Get and cache value from the wrapped provider\n\t var providerPromise = this.wrappedProvider.getConfiguration();\n\t providerPromise.then(function (providedConfig) {\n\t _this.store.put(_this.cacheKey, providedConfig);\n\t });\n\t return providerPromise;\n\t }\n\t }, {\n\t key: \"selectPnPCache\",\n\t value: function selectPnPCache() {\n\t var pnpCache = new storage.PnPClientStorage();\n\t if (pnpCache.local && pnpCache.local.enabled) {\n\t return pnpCache.local;\n\t }\n\t if (pnpCache.session && pnpCache.session.enabled) {\n\t return pnpCache.session;\n\t }\n\t throw new exceptions_1.NoCacheAvailableException();\n\t }\n\t }]);\n\t\n\t return CachingConfigurationProvider;\n\t}();\n\t\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = CachingConfigurationProvider;\n\n/***/ },\n/* 48 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar cachingConfigurationProvider_1 = __webpack_require__(47);\n\t/**\n\t * A configuration provider which loads configuration values from a SharePoint list\n\t *\n\t */\n\t\n\tvar SPListConfigurationProvider = function () {\n\t /**\n\t * Creates a new SharePoint list based configuration provider\n\t * @constructor\n\t * @param {string} webUrl Url of the SharePoint site, where the configuration list is located\n\t * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = \"config\")\n\t */\n\t function SPListConfigurationProvider(sourceWeb) {\n\t var sourceListTitle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"config\";\n\t\n\t _classCallCheck(this, SPListConfigurationProvider);\n\t\n\t this.sourceWeb = sourceWeb;\n\t this.sourceListTitle = sourceListTitle;\n\t }\n\t /**\n\t * Gets the url of the SharePoint site, where the configuration list is located\n\t *\n\t * @return {string} Url address of the site\n\t */\n\t\n\t\n\t _createClass(SPListConfigurationProvider, [{\n\t key: \"getConfiguration\",\n\t\n\t /**\n\t * Loads the configuration values from the SharePoint list\n\t *\n\t * @return {Promise>} Promise of loaded configuration values\n\t */\n\t value: function getConfiguration() {\n\t return this.web.lists.getByTitle(this.listTitle).items.select(\"Title\", \"Value\").getAs().then(function (data) {\n\t return data.reduce(function (configuration, item) {\n\t return Object.defineProperty(configuration, item.Title, {\n\t configurable: false,\n\t enumerable: false,\n\t value: item.Value,\n\t writable: false\n\t });\n\t }, {});\n\t });\n\t }\n\t /**\n\t * Wraps the current provider in a cache enabled provider\n\t *\n\t * @return {CachingConfigurationProvider} Caching providers which wraps the current provider\n\t */\n\t\n\t }, {\n\t key: \"asCaching\",\n\t value: function asCaching() {\n\t var cacheKey = \"splist_\" + this.web.toUrl() + \"+\" + this.listTitle;\n\t return new cachingConfigurationProvider_1.default(this, cacheKey);\n\t }\n\t }, {\n\t key: \"web\",\n\t get: function get() {\n\t return this.sourceWeb;\n\t }\n\t /**\n\t * Gets the title of the SharePoint list, which contains the configuration settings\n\t *\n\t * @return {string} List title\n\t */\n\t\n\t }, {\n\t key: \"listTitle\",\n\t get: function get() {\n\t return this.sourceListTitle;\n\t }\n\t }]);\n\t\n\t return SPListConfigurationProvider;\n\t}();\n\t\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = SPListConfigurationProvider;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// pnp.min.js"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"/assets/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8accb6b83b158f948fc5","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nconst util_1 = require(\"./utils/util\");\nconst storage_1 = require(\"./utils/storage\");\nconst configuration_1 = require(\"./configuration/configuration\");\nconst logging_1 = require(\"./utils/logging\");\nconst rest_1 = require(\"./sharepoint/rest\");\nconst pnplibconfig_1 = require(\"./configuration/pnplibconfig\");\n/**\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\n */\n/**\n * Utility methods\n */\nexports.util = util_1.Util;\n/**\n * Provides access to the REST interface\n */\nexports.sp = new rest_1.Rest();\n/**\n * Provides access to local and session storage\n */\nexports.storage = new storage_1.PnPClientStorage();\n/**\n * Global configuration instance to which providers can be added\n */\nexports.config = new configuration_1.Settings();\n/**\n * Global logging instance to which subscribers can be registered and messages written\n */\nexports.log = logging_1.Logger;\n/**\n * Allows for the configuration of the library\n */\nexports.setup = pnplibconfig_1.setRuntimeConfig;\n/**\n * Expose a subset of classes from the library for public consumption\n */\n__export(require(\"./types/index\"));\n// creating this class instead of directly assigning to default fixes issue #116\nlet Def = {\n /**\n * Global configuration instance to which providers can be added\n */\n config: exports.config,\n /**\n * Global logging instance to which subscribers can be registered and messages written\n */\n log: exports.log,\n /**\n * Provides access to local and session storage\n */\n setup: exports.setup,\n /**\n * Provides access to the REST interface\n */\n sp: exports.sp,\n /**\n * Provides access to local and session storage\n */\n storage: exports.storage,\n /**\n * Utility methods\n */\n util: exports.util,\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Enables use of the import pnp from syntax\n */\nexports.default = Def;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/pnp.js","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nconst decorators_1 = require(\"./decorators\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nclass Util {\n /**\n * Gets a callback function which will maintain context across async calls.\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n *\n * @param context The object that will be the 'this' value in the callback\n * @param method The method to which we will apply the context and parameters\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n */\n static getCtxCallback(context, method, ...params) {\n return function () {\n method.apply(context, params);\n };\n }\n /**\n * Tests if a url param exists\n *\n * @param name The name of the url paramter to check\n */\n static urlParamExists(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n return regex.test(location.search);\n }\n /**\n * Gets a url param value by name\n *\n * @param name The name of the paramter for which we want the value\n */\n static getUrlParamByName(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n let regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n let results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n }\n /**\n * Gets a url param by name and attempts to parse a bool value\n *\n * @param name The name of the paramter for which we want the boolean value\n */\n static getUrlParamBoolByName(name) {\n let p = this.getUrlParamByName(name);\n let isFalse = (p === \"\" || /false|0/i.test(p));\n return !isFalse;\n }\n /**\n * Inserts the string s into the string target as the index specified by index\n *\n * @param target The string into which we will insert s\n * @param index The location in target to insert s (zero based)\n * @param s The string to insert into target at position index\n */\n static stringInsert(target, index, s) {\n if (index > 0) {\n return target.substring(0, index) + s + target.substring(index, target.length);\n }\n return s + target;\n }\n /**\n * Adds a value to a date\n *\n * @param date The date to which we will add units, done in local time\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n * @param units The amount to add to date of the given interval\n *\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n */\n static dateAdd(date, interval, units) {\n let ret = new Date(date.toLocaleString()); // don't change original date\n switch (interval.toLowerCase()) {\n case \"year\":\n ret.setFullYear(ret.getFullYear() + units);\n break;\n case \"quarter\":\n ret.setMonth(ret.getMonth() + 3 * units);\n break;\n case \"month\":\n ret.setMonth(ret.getMonth() + units);\n break;\n case \"week\":\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case \"day\":\n ret.setDate(ret.getDate() + units);\n break;\n case \"hour\":\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case \"minute\":\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case \"second\":\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n ret = undefined;\n break;\n }\n return ret;\n }\n /**\n * Loads a stylesheet into the current page\n *\n * @param path The url to the stylesheet\n * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n */\n static loadStylesheet(path, avoidCache) {\n if (avoidCache) {\n path += \"?\" + encodeURIComponent((new Date()).getTime().toString());\n }\n let head = document.getElementsByTagName(\"head\");\n if (head.length > 0) {\n let e = document.createElement(\"link\");\n head[0].appendChild(e);\n e.setAttribute(\"type\", \"text/css\");\n e.setAttribute(\"rel\", \"stylesheet\");\n e.setAttribute(\"href\", path);\n }\n }\n /**\n * Combines an arbitrary set of paths ensuring that the slashes are normalized\n *\n * @param paths 0 to n path parts to combine\n */\n static combinePaths(...paths) {\n return paths\n .filter(path => typeof path !== \"undefined\" && path !== null)\n .map(path => path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"))\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n }\n /**\n * Gets a random string of chars length\n *\n * @param chars The length of the random string to generate\n */\n static getRandomString(chars) {\n let text = new Array(chars);\n let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < chars; i++) {\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text.join(\"\");\n }\n /**\n * Gets a random GUID value\n *\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n */\n /* tslint:disable no-bitwise */\n static getGUID() {\n let d = new Date().getTime();\n let guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n let r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return guid;\n }\n /* tslint:enable */\n /**\n * Determines if a given value is a function\n *\n * @param candidateFunction The thing to test for being a function\n */\n static isFunction(candidateFunction) {\n return typeof candidateFunction === \"function\";\n }\n /**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\n static isArray(array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n return array && typeof array.length === \"number\" && array.constructor === Array;\n }\n /**\n * Determines if a string is null or empty or undefined\n *\n * @param s The string to test\n */\n static stringIsNullOrEmpty(s) {\n return typeof s === \"undefined\" || s === null || s === \"\";\n }\n /**\n * Provides functionality to extend the given object by doing a shallow copy\n *\n * @param target The object to which properties will be copied\n * @param source The source object from which properties will be copied\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\n *\n */\n static extend(target, source, noOverwrite = false) {\n if (source === null || typeof source === \"undefined\") {\n return target;\n }\n // ensure we don't overwrite things we don't want overwritten\n let check = noOverwrite ? (o, i) => !(i in o) : () => true;\n return Object.getOwnPropertyNames(source)\n .filter((v) => check(target, v))\n .reduce((t, v) => {\n t[v] = source[v];\n return t;\n }, target);\n }\n /**\n * Determines if a given url is absolute\n *\n * @param url The url to check to see if it is absolute\n */\n static isUrlAbsolute(url) {\n return /^https?:\\/\\/|^\\/\\//i.test(url);\n }\n /**\n * Attempts to make the supplied relative url absolute based on the _spPageContextInfo object, if available\n *\n * @param url The relative url to make absolute\n */\n static makeUrlAbsolute(url) {\n if (Util.isUrlAbsolute(url)) {\n return url;\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, url);\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, url);\n }\n }\n else {\n return url;\n }\n }\n /**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\n static toAbsoluteUrl(candidateUrl) {\n return new Promise((resolve) => {\n if (Util.isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n if (pnplibconfig_1.RuntimeConfig.baseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.baseUrl, candidateUrl));\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n // operating in classic pages\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n // does window.location exist and have _layouts in it?\n if (typeof global.location !== \"undefined\") {\n let index = global.location.toString().toLowerCase().indexOf(\"/_layouts/\");\n if (index > 0) {\n // we are likely in the workbench in /_layouts/\n return resolve(Util.combinePaths(global.location.toString().substr(0, index), candidateUrl));\n }\n }\n return resolve(candidateUrl);\n });\n }\n}\n__decorate([\n decorators_1.deprecated(\"The Util.makeUrlAbsolute method is deprecated and will be removed from future releases. Use Util.toAbsoluteUrl instead\")\n], Util, \"makeUrlAbsolute\", null);\nexports.Util = Util;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/util.js","\"use strict\";\nconst logging_1 = require(\"./logging\");\nfunction deprecated(message) {\n return function (target, propertyKey, descriptor) {\n let method = descriptor.value;\n descriptor.value = function (...args) {\n logging_1.Logger.log({\n data: {\n descriptor: descriptor,\n propertyKey: propertyKey,\n target: target,\n },\n level: logging_1.LogLevel.Warning,\n message: message,\n });\n return method.apply(this, args);\n };\n };\n}\nexports.deprecated = deprecated;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/decorators.js","\"use strict\";\n/**\n * A set of logging levels\n *\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/**\n * Class used to subscribe ILogListener and log messages throughout an application\n *\n */\nclass Logger {\n static get activeLogLevel() {\n return Logger.instance.activeLogLevel;\n }\n static set activeLogLevel(value) {\n Logger.instance.activeLogLevel = value;\n }\n static get instance() {\n if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n Logger._instance = new LoggerImpl();\n }\n return Logger._instance;\n }\n /**\n * Adds ILogListener instances to the set of subscribed listeners\n *\n * @param listeners One or more listeners to subscribe to this log\n */\n static subscribe(...listeners) {\n listeners.map(listener => Logger.instance.subscribe(listener));\n }\n /**\n * Clears the subscribers collection, returning the collection before modifiction\n */\n static clearSubscribers() {\n return Logger.instance.clearSubscribers();\n }\n /**\n * Gets the current subscriber count\n */\n static get count() {\n return Logger.instance.count;\n }\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param message The message to write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n static write(message, level = LogLevel.Verbose) {\n Logger.instance.log({ level: level, message: message });\n }\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param json The json object to stringify and write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n static writeJSON(json, level = LogLevel.Verbose) {\n Logger.instance.log({ level: level, message: JSON.stringify(json) });\n }\n /**\n * Logs the supplied entry to the subscribed listeners\n *\n * @param entry The message to log\n */\n static log(entry) {\n Logger.instance.log(entry);\n }\n /**\n * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n *\n * @param name The name of this profile boundary\n * @param f The function to execute and track within this performance boundary\n */\n static measure(name, f) {\n return Logger.instance.measure(name, f);\n }\n}\nexports.Logger = Logger;\nclass LoggerImpl {\n constructor(activeLogLevel = LogLevel.Warning, subscribers = []) {\n this.activeLogLevel = activeLogLevel;\n this.subscribers = subscribers;\n }\n subscribe(listener) {\n this.subscribers.push(listener);\n }\n clearSubscribers() {\n let s = this.subscribers.slice(0);\n this.subscribers.length = 0;\n return s;\n }\n get count() {\n return this.subscribers.length;\n }\n write(message, level = LogLevel.Verbose) {\n this.log({ level: level, message: message });\n }\n log(entry) {\n if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n return;\n }\n this.subscribers.map(subscriber => subscriber.log(entry));\n }\n measure(name, f) {\n console.profile(name);\n try {\n return f();\n }\n finally {\n console.profileEnd();\n }\n }\n}\n/**\n * Implementation of ILogListener which logs to the browser console\n *\n */\nclass ConsoleListener {\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n log(entry) {\n let msg = this.format(entry);\n switch (entry.level) {\n case LogLevel.Verbose:\n case LogLevel.Info:\n console.log(msg);\n break;\n case LogLevel.Warning:\n console.warn(msg);\n break;\n case LogLevel.Error:\n console.error(msg);\n break;\n }\n }\n /**\n * Formats the message\n *\n * @param entry The information to format into a string\n */\n format(entry) {\n return \"Message: \" + entry.message + \" Data: \" + JSON.stringify(entry.data);\n }\n}\nexports.ConsoleListener = ConsoleListener;\n/**\n * Implementation of ILogListener which logs to the supplied function\n *\n */\nclass FunctionListener {\n /**\n * Creates a new instance of the FunctionListener class\n *\n * @constructor\n * @param method The method to which any logging data will be passed\n */\n constructor(method) {\n this.method = method;\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n log(entry) {\n this.method(entry);\n }\n}\nexports.FunctionListener = FunctionListener;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/logging.js","\"use strict\";\nconst fetchclient_1 = require(\"../net/fetchclient\");\nclass RuntimeConfigImpl {\n constructor() {\n // these are our default values for the library\n this._headers = null;\n this._defaultCachingStore = \"session\";\n this._defaultCachingTimeoutSeconds = 30;\n this._globalCacheDisable = false;\n this._fetchClientFactory = () => new fetchclient_1.FetchClient();\n this._baseUrl = null;\n this._spfxContext = null;\n }\n set(config) {\n if (config.hasOwnProperty(\"headers\")) {\n this._headers = config.headers;\n }\n if (config.hasOwnProperty(\"globalCacheDisable\")) {\n this._globalCacheDisable = config.globalCacheDisable;\n }\n if (config.hasOwnProperty(\"defaultCachingStore\")) {\n this._defaultCachingStore = config.defaultCachingStore;\n }\n if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n }\n if (config.hasOwnProperty(\"fetchClientFactory\")) {\n this._fetchClientFactory = config.fetchClientFactory;\n }\n if (config.hasOwnProperty(\"baseUrl\")) {\n this._baseUrl = config.baseUrl;\n }\n if (config.hasOwnProperty(\"spFXContext\")) {\n this._spfxContext = config.spfxContext;\n }\n }\n get headers() {\n return this._headers;\n }\n get defaultCachingStore() {\n return this._defaultCachingStore;\n }\n get defaultCachingTimeoutSeconds() {\n return this._defaultCachingTimeoutSeconds;\n }\n get globalCacheDisable() {\n return this._globalCacheDisable;\n }\n get fetchClientFactory() {\n return this._fetchClientFactory;\n }\n get baseUrl() {\n if (this._baseUrl !== null) {\n return this._baseUrl;\n }\n else if (this._spfxContext !== null) {\n return this._spfxContext.pageContext.web.absoluteUrl;\n }\n return null;\n }\n}\nexports.RuntimeConfigImpl = RuntimeConfigImpl;\nlet _runtimeConfig = new RuntimeConfigImpl();\nexports.RuntimeConfig = _runtimeConfig;\nfunction setRuntimeConfig(config) {\n _runtimeConfig.set(config);\n}\nexports.setRuntimeConfig = setRuntimeConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/pnplibconfig.js","\"use strict\";\n/**\n * Makes requests using the fetch API\n */\nclass FetchClient {\n fetch(url, options) {\n return global.fetch(url, options);\n }\n}\nexports.FetchClient = FetchClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/fetchclient.js","\"use strict\";\nconst util_1 = require(\"./util\");\n/**\n * A wrapper class to provide a consistent interface to browser based storage\n *\n */\nclass PnPClientStorageWrapper {\n /**\n * Creates a new instance of the PnPClientStorageWrapper class\n *\n * @constructor\n */\n constructor(store, defaultTimeoutMinutes) {\n this.store = store;\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? 5 : defaultTimeoutMinutes;\n this.enabled = this.test();\n }\n /**\n * Get a value from storage, or null if that value does not exist\n *\n * @param key The key whose value we want to retrieve\n */\n get(key) {\n if (!this.enabled) {\n return null;\n }\n let o = this.store.getItem(key);\n if (o == null) {\n return null;\n }\n let persistable = JSON.parse(o);\n if (new Date(persistable.expiration) <= new Date()) {\n this.delete(key);\n return null;\n }\n else {\n return persistable.value;\n }\n }\n /**\n * Adds a value to the underlying storage\n *\n * @param key The key to use when storing the provided value\n * @param o The value to store\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n put(key, o, expire) {\n if (this.enabled) {\n this.store.setItem(key, this.createPersistable(o, expire));\n }\n }\n /**\n * Deletes a value from the underlying storage\n *\n * @param key The key of the pair we want to remove from storage\n */\n delete(key) {\n if (this.enabled) {\n this.store.removeItem(key);\n }\n }\n /**\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n *\n * @param key The key to use when storing the provided value\n * @param getter A function which will upon execution provide the desired value\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n getOrPut(key, getter, expire) {\n if (!this.enabled) {\n return getter();\n }\n return new Promise((resolve) => {\n let o = this.get(key);\n if (o == null) {\n getter().then((d) => {\n this.put(key, d, expire);\n resolve(d);\n });\n }\n else {\n resolve(o);\n }\n });\n }\n /**\n * Used to determine if the wrapped storage is available currently\n */\n test() {\n let str = \"test\";\n try {\n this.store.setItem(str, str);\n this.store.removeItem(str);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n /**\n * Creates the persistable to store\n */\n createPersistable(o, expire) {\n if (typeof expire === \"undefined\") {\n expire = util_1.Util.dateAdd(new Date(), \"minute\", this.defaultTimeoutMinutes);\n }\n return JSON.stringify({ expiration: expire, value: o });\n }\n}\nexports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n/**\n * A class that will establish wrappers for both local and session storage\n */\nclass PnPClientStorage {\n /**\n * Creates a new instance of the PnPClientStorage class\n *\n * @constructor\n */\n constructor() {\n this.local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : null;\n this.session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : null;\n }\n}\nexports.PnPClientStorage = PnPClientStorage;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/storage.js","\"use strict\";\nconst collections_1 = require(\"../collections/collections\");\n/**\n * Class used to manage the current application settings\n *\n */\nclass Settings {\n /**\n * Creates a new instance of the settings class\n *\n * @constructor\n */\n constructor() {\n this._settings = new collections_1.Dictionary();\n }\n /**\n * Adds a new single setting, or overwrites a previous setting with the same key\n *\n * @param {string} key The key used to store this setting\n * @param {string} value The setting value to store\n */\n add(key, value) {\n this._settings.add(key, value);\n }\n /**\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n *\n * @param {string} key The key used to store this setting\n * @param {any} value The setting value to store\n */\n addJSON(key, value) {\n this._settings.add(key, JSON.stringify(value));\n }\n /**\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n *\n * @param {TypedHash} hash The set of values to add\n */\n apply(hash) {\n return new Promise((resolve, reject) => {\n try {\n this._settings.merge(hash);\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n }\n /**\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\n *\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\n */\n load(provider) {\n return new Promise((resolve, reject) => {\n provider.getConfiguration().then((value) => {\n this._settings.merge(value);\n resolve();\n }).catch((reason) => {\n reject(reason);\n });\n });\n }\n /**\n * Gets a value from the configuration\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {string} string value from the configuration\n */\n get(key) {\n return this._settings.get(key);\n }\n /**\n * Gets a JSON value, rehydrating the stored string to the original object\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {any} object from the configuration\n */\n getJSON(key) {\n let o = this.get(key);\n if (typeof o === \"undefined\" || o === null) {\n return o;\n }\n return JSON.parse(o);\n }\n}\nexports.Settings = Settings;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/configuration.js","\"use strict\";\n/**\n * Generic dictionary\n */\nclass Dictionary {\n /**\n * Creates a new instance of the Dictionary class\n *\n * @constructor\n */\n constructor(keys = [], values = []) {\n this.keys = keys;\n this.values = values;\n }\n /**\n * Gets a value from the collection using the specified key\n *\n * @param key The key whose value we want to return, returns null if the key does not exist\n */\n get(key) {\n let index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n return this.values[index];\n }\n /**\n * Adds the supplied key and value to the dictionary\n *\n * @param key The key to add\n * @param o The value to add\n */\n add(key, o) {\n let index = this.keys.indexOf(key);\n if (index > -1) {\n this.values[index] = o;\n }\n else {\n this.keys.push(key);\n this.values.push(o);\n }\n }\n /**\n * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n */\n merge(source) {\n if (\"getKeys\" in source) {\n let sourceAsDictionary = source;\n sourceAsDictionary.getKeys().map(key => {\n this.add(key, sourceAsDictionary.get(key));\n });\n }\n else {\n let sourceAsHash = source;\n for (let key in sourceAsHash) {\n if (sourceAsHash.hasOwnProperty(key)) {\n this.add(key, sourceAsHash[key]);\n }\n }\n }\n }\n /**\n * Removes a value from the dictionary\n *\n * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n */\n remove(key) {\n let index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n let val = this.values[index];\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return val;\n }\n /**\n * Returns all the keys currently in the dictionary as an array\n */\n getKeys() {\n return this.keys;\n }\n /**\n * Returns all the values currently in the dictionary as an array\n */\n getValues() {\n return this.values;\n }\n /**\n * Clears the current dictionary\n */\n clear() {\n this.keys = [];\n this.values = [];\n }\n /**\n * Gets a count of the items currently in the dictionary\n */\n count() {\n return this.keys.length;\n }\n}\nexports.Dictionary = Dictionary;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/collections/collections.js","\"use strict\";\nconst search_1 = require(\"./search\");\nconst searchsuggest_1 = require(\"./searchsuggest\");\nconst site_1 = require(\"./site\");\nconst webs_1 = require(\"./webs\");\nconst util_1 = require(\"../utils/util\");\nconst userprofiles_1 = require(\"./userprofiles\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Root of the SharePoint REST module\n */\nclass Rest {\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n searchSuggest(query) {\n let finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new searchsuggest_1.SearchSuggest(\"\").execute(finalQuery);\n }\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n search(query) {\n let finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new search_1.Search(\"\").execute(finalQuery);\n }\n /**\n * Begins a site collection scoped REST request\n *\n */\n get site() {\n return new site_1.Site(\"\");\n }\n /**\n * Begins a web scoped REST request\n *\n */\n get web() {\n return new webs_1.Web(\"\");\n }\n /**\n * Access to user profile methods\n *\n */\n get profiles() {\n return new userprofiles_1.UserProfileQuery(\"\");\n }\n /**\n * Creates a new batch object for use with the Queryable.addToBatch method\n *\n */\n createBatch() {\n return this.web.createBatch();\n }\n /**\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n crossDomainSite(addInWebUrl, hostWebUrl) {\n return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n }\n /**\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n crossDomainWeb(addInWebUrl, hostWebUrl) {\n return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n }\n /**\n * Implements the creation of cross domain REST urls\n *\n * @param factory The constructor of the object to create Site | Web\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n * @param urlPart String part to append to the url \"site\" | \"web\"\n */\n _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart) {\n if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n }\n if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n }\n let url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n let instance = new factory(url, urlPart);\n instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n return instance;\n }\n}\nexports.Rest = Rest;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/rest.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes the search API\n *\n */\nclass Search extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Search class\n *\n * @param baseUrl The url for the search context\n * @param query The SearchQuery object to execute\n */\n constructor(baseUrl, path = \"_api/search/postquery\") {\n super(baseUrl, path);\n }\n /**\n * .......\n * @returns Promise\n */\n execute(query) {\n let formattedBody;\n formattedBody = query;\n if (formattedBody.SelectProperties) {\n formattedBody.SelectProperties = { results: query.SelectProperties };\n }\n if (formattedBody.RefinementFilters) {\n formattedBody.RefinementFilters = { results: query.RefinementFilters };\n }\n if (formattedBody.SortList) {\n formattedBody.SortList = { results: query.SortList };\n }\n if (formattedBody.HithighlightedProperties) {\n formattedBody.HithighlightedProperties = { results: query.HithighlightedProperties };\n }\n if (formattedBody.ReorderingRules) {\n formattedBody.ReorderingRules = { results: query.ReorderingRules };\n }\n if (formattedBody.Properties) {\n formattedBody.Properties = { results: query.Properties };\n }\n let postBody = JSON.stringify({\n request: util_1.Util.extend({\n \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" },\n }, formattedBody),\n });\n return this.post({ body: postBody }).then((data) => new SearchResults(data));\n }\n}\nexports.Search = Search;\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nclass SearchResults {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n constructor(rawResponse) {\n let response = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n this.PrimarySearchResults = this.formatSearchResults(response.PrimaryQueryResult.RelevantResults.Table.Rows);\n this.RawSearchResults = response;\n this.ElapsedTime = response.ElapsedTime;\n this.RowCount = response.PrimaryQueryResult.RelevantResults.RowCount;\n this.TotalRows = response.PrimaryQueryResult.RelevantResults.TotalRows;\n this.TotalRowsIncludingDuplicates = response.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n }\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n formatSearchResults(rawResults) {\n let results = new Array(), tempResults = rawResults.results ? rawResults.results : rawResults;\n for (let i of tempResults) {\n results.push(new SearchResult(i.Cells));\n }\n return results;\n }\n}\nexports.SearchResults = SearchResults;\n/**\n * Describes the SearchResult class\n */\nclass SearchResult {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n constructor(rawItem) {\n let item = rawItem.results ? rawItem.results : rawItem;\n for (let i of item) {\n Object.defineProperty(this, i.Key, {\n configurable: false,\n enumerable: false,\n value: i.Value,\n writable: false,\n });\n }\n }\n}\nexports.SearchResult = SearchResult;\n/**\n * defines the SortDirection enum\n */\nvar SortDirection;\n(function (SortDirection) {\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n/**\n * defines the ReorderingRuleMatchType enum\n */\nvar ReorderingRuleMatchType;\n(function (ReorderingRuleMatchType) {\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n/**\n * Specifies the type value for the property\n */\nvar QueryPropertyValueType;\n(function (QueryPropertyValueType) {\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/search.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst collections_1 = require(\"../collections/collections\");\nconst odata_1 = require(\"./odata\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst queryablerequest_1 = require(\"./queryablerequest\");\n/**\n * Queryable Base Class\n *\n */\nclass Queryable {\n /**\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n *\n * @param pathPart The string to concatonate to the url\n */\n concat(pathPart) {\n this._url += pathPart;\n }\n /**\n * Appends the given string and normalizes \"/\" chars\n *\n * @param pathPart The string to append\n */\n append(pathPart) {\n this._url = util_1.Util.combinePaths(this._url, pathPart);\n }\n /**\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n addBatchDependency() {\n if (this.hasBatch) {\n return this._batch.addBatchDependency();\n }\n return () => null;\n }\n /**\n * Indicates if the current query has a batch associated\n *\n */\n get hasBatch() {\n return this._batch !== null;\n }\n /**\n * Gets the parent url used when creating this instance\n *\n */\n get parentUrl() {\n return this._parentUrl;\n }\n /**\n * Provides access to the query builder for this url\n *\n */\n get query() {\n return this._query;\n }\n /**\n * Creates a new instance of the Queryable class\n *\n * @constructor\n * @param baseUrl A string or Queryable that should form the base part of the url\n *\n */\n constructor(baseUrl, path) {\n this._query = new collections_1.Dictionary();\n this._batch = null;\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n let urlStr = baseUrl;\n if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n this._parentUrl = urlStr;\n this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n let index = urlStr.lastIndexOf(\"/\");\n this._parentUrl = urlStr.slice(0, index);\n path = util_1.Util.combinePaths(urlStr.slice(index), path);\n this._url = util_1.Util.combinePaths(this._parentUrl, path);\n }\n else {\n // .../items(19)\n let index = urlStr.lastIndexOf(\"(\");\n this._parentUrl = urlStr.slice(0, index);\n this._url = util_1.Util.combinePaths(urlStr, path);\n }\n }\n else {\n let q = baseUrl;\n this._parentUrl = q._url;\n let target = q._query.get(\"@target\");\n if (target !== null) {\n this._query.add(\"@target\", target);\n }\n this._url = util_1.Util.combinePaths(this._parentUrl, path);\n }\n }\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n inBatch(batch) {\n if (this._batch !== null) {\n throw new exceptions_1.AlreadyInBatchException();\n }\n this._batch = batch;\n return this;\n }\n /**\n * Enables caching for this request\n *\n * @param options Defines the options used when caching this request\n */\n usingCaching(options) {\n if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n this._useCaching = true;\n this._cachingOptions = options;\n }\n return this;\n }\n /**\n * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n *\n */\n toUrl() {\n return this._url;\n }\n /**\n * Gets the full url with query information\n *\n */\n toUrlAndQuery() {\n let url = this.toUrl();\n if (this._query.count() > 0) {\n url += `?${this._query.getKeys().map(key => `${key}=${this._query.get(key)}`).join(\"&\")}`;\n }\n return url;\n }\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n getParent(factory, baseUrl = this.parentUrl, path) {\n let parent = new factory(baseUrl, path);\n let target = this.query.get(\"@target\");\n if (target !== null) {\n parent.query.add(\"@target\", target);\n }\n return parent;\n }\n /**\n * Executes the currently built request\n *\n * @param parser Allows you to specify a parser to handle the result\n * @param getOptions The options used for this request\n */\n get(parser = new odata_1.ODataDefaultParser(), getOptions = {}) {\n return this.toRequestContext(\"GET\", getOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n getAs(parser = new odata_1.ODataDefaultParser(), getOptions = {}) {\n return this.toRequestContext(\"GET\", getOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n post(postOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"POST\", postOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n postAs(postOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"POST\", postOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n patch(patchOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"PATCH\", patchOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n delete(deleteOptions = {}, parser = new odata_1.ODataDefaultParser()) {\n return this.toRequestContext(\"DELETE\", deleteOptions, parser).then(context => queryablerequest_1.pipe(context));\n }\n toRequestContext(verb, options = {}, parser) {\n let dependencyDispose = this.hasBatch ? this.addBatchDependency() : () => { return; };\n return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(url => {\n // build our request context\n let context = {\n batch: this._batch,\n batchDependency: dependencyDispose,\n cachingOptions: this._cachingOptions,\n isBatched: this.hasBatch,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n requestAbsoluteUrl: url,\n requestId: util_1.Util.getGUID(),\n verb: verb,\n };\n return context;\n });\n }\n}\nexports.Queryable = Queryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nclass QueryableCollection extends Queryable {\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n filter(filter) {\n this._query.add(\"$filter\", filter);\n return this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n select(...selects) {\n this._query.add(\"$select\", selects.join(\",\"));\n return this;\n }\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n expand(...expands) {\n this._query.add(\"$expand\", expands.join(\",\"));\n return this;\n }\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n orderBy(orderBy, ascending = true) {\n let keys = this._query.getKeys();\n let query = [];\n let asc = ascending ? \" asc\" : \" desc\";\n for (let i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(`${orderBy}${asc}`);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n }\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n skip(skip) {\n this._query.add(\"$skip\", skip.toString());\n return this;\n }\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n top(top) {\n this._query.add(\"$top\", top.toString());\n return this;\n }\n}\nexports.QueryableCollection = QueryableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nclass QueryableInstance extends Queryable {\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n select(...selects) {\n this._query.add(\"$select\", selects.join(\",\"));\n return this;\n }\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n expand(...expands) {\n this._query.add(\"$expand\", expands.join(\",\"));\n return this;\n }\n}\nexports.QueryableInstance = QueryableInstance;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryable.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst logging_1 = require(\"../utils/logging\");\nconst httpclient_1 = require(\"../net/httpclient\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst exceptions_2 = require(\"../utils/exceptions\");\nfunction extractOdataId(candidate) {\n if (candidate.hasOwnProperty(\"odata.id\")) {\n return candidate[\"odata.id\"];\n }\n else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n return candidate.__metadata.id;\n }\n else {\n throw new exceptions_1.ODataIdException(candidate);\n }\n}\nexports.extractOdataId = extractOdataId;\nclass ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\n resolve({});\n }\n else {\n r.json().then(json => resolve(this.parseODataJSON(json)));\n }\n }\n });\n }\n handleError(r, reject) {\n if (!r.ok) {\n r.json().then(json => {\n reject(new exceptions_2.ProcessHttpClientResponseException(r.status, r.statusText, json));\n });\n }\n return r.ok;\n }\n parseODataJSON(json) {\n let result = json;\n if (json.hasOwnProperty(\"d\")) {\n if (json.d.hasOwnProperty(\"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (json.hasOwnProperty(\"value\")) {\n result = json.value;\n }\n return result;\n }\n}\nexports.ODataParserBase = ODataParserBase;\nclass ODataDefaultParser extends ODataParserBase {\n}\nexports.ODataDefaultParser = ODataDefaultParser;\nclass ODataRawParserImpl {\n parse(r) {\n return r.json();\n }\n}\nexports.ODataRawParserImpl = ODataRawParserImpl;\nclass ODataValueParserImpl extends ODataParserBase {\n parse(r) {\n return super.parse(r).then(d => d);\n }\n}\nclass ODataEntityParserImpl extends ODataParserBase {\n constructor(factory) {\n super();\n this.factory = factory;\n }\n parse(r) {\n return super.parse(r).then(d => {\n let o = new this.factory(getEntityUrl(d), null);\n return util_1.Util.extend(o, d);\n });\n }\n}\nclass ODataEntityArrayParserImpl extends ODataParserBase {\n constructor(factory) {\n super();\n this.factory = factory;\n }\n parse(r) {\n return super.parse(r).then((d) => {\n return d.map(v => {\n let o = new this.factory(getEntityUrl(v), null);\n return util_1.Util.extend(o, v);\n });\n });\n }\n}\nfunction getEntityUrl(entity) {\n if (entity.hasOwnProperty(\"odata.editLink\")) {\n // we are dealign with minimal metadata (default)\n return util_1.Util.combinePaths(\"_api\", entity[\"odata.editLink\"]);\n }\n else if (entity.hasOwnProperty(\"__metadata\")) {\n // we are dealing with verbose, which has an absolute uri\n return entity.__metadata.uri;\n }\n else {\n // we are likely dealing with nometadata, so don't error but we won't be able to\n // chain off these objects\n logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n return \"\";\n }\n}\nexports.ODataRaw = new ODataRawParserImpl();\nfunction ODataValue() {\n return new ODataValueParserImpl();\n}\nexports.ODataValue = ODataValue;\nfunction ODataEntity(factory) {\n return new ODataEntityParserImpl(factory);\n}\nexports.ODataEntity = ODataEntity;\nfunction ODataEntityArray(factory) {\n return new ODataEntityArrayParserImpl(factory);\n}\nexports.ODataEntityArray = ODataEntityArray;\n/**\n * Manages a batch of OData operations\n */\nclass ODataBatch {\n constructor(baseUrl, _batchId = util_1.Util.getGUID()) {\n this.baseUrl = baseUrl;\n this._batchId = _batchId;\n this._requests = [];\n this._batchDependencies = Promise.resolve();\n }\n /**\n * Adds a request to a batch (not designed for public use)\n *\n * @param url The full url of the request\n * @param method The http method GET, POST, etc\n * @param options Any options to include in the request\n * @param parser The parser that will hadle the results of the request\n */\n add(url, method, options, parser) {\n let info = {\n method: method.toUpperCase(),\n options: options,\n parser: parser,\n reject: null,\n resolve: null,\n url: url,\n };\n let p = new Promise((resolve, reject) => {\n info.resolve = resolve;\n info.reject = reject;\n });\n this._requests.push(info);\n return p;\n }\n /**\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n * MUST be cleared using the returned resolve delegate to allow batches to run\n */\n addBatchDependency() {\n let resolver;\n let promise = new Promise((resolve) => {\n resolver = resolve;\n });\n this._batchDependencies = this._batchDependencies.then(() => promise);\n return resolver;\n }\n /**\n * Execute the current batch and resolve the associated promises\n *\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\n */\n execute() {\n return this._batchDependencies.then(() => this.executeImpl());\n }\n executeImpl() {\n logging_1.Logger.write(`Executing batch with ${this._requests.length} requests.`, logging_1.LogLevel.Info);\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this._requests.length < 1) {\n logging_1.Logger.write(`Resolving empty batch.`, logging_1.LogLevel.Info);\n return Promise.resolve();\n }\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n let client = new httpclient_1.HttpClient();\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return util_1.Util.toAbsoluteUrl(this.baseUrl).then(absoluteRequestUrl => {\n // build all the requests, send them, pipe results in order to parsers\n let batchBody = [];\n let currentChangeSetId = \"\";\n this._requests.map((reqInfo) => {\n if (reqInfo.method === \"GET\") {\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n batchBody.push(`--batch_${this._batchId}\\n`);\n }\n else {\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = util_1.Util.getGUID();\n batchBody.push(`--batch_${this._batchId}\\n`);\n batchBody.push(`Content-Type: multipart/mixed; boundary=\"changeset_${currentChangeSetId}\"\\n\\n`);\n }\n batchBody.push(`--changeset_${currentChangeSetId}\\n`);\n }\n // common batch part prefix\n batchBody.push(`Content-Type: application/http\\n`);\n batchBody.push(`Content-Transfer-Encoding: binary\\n\\n`);\n let headers = {\n \"Accept\": \"application/json;\",\n };\n // this is the url of the individual request within the batch\n let url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n logging_1.Logger.write(`Adding request ${reqInfo.method} ${url} to batch.`, logging_1.LogLevel.Verbose);\n if (reqInfo.method !== \"GET\") {\n let method = reqInfo.method;\n if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n method = reqInfo.options.headers[\"X-HTTP-Method\"];\n delete reqInfo.options.headers[\"X-HTTP-Method\"];\n }\n batchBody.push(`${method} ${url} HTTP/1.1\\n`);\n headers = util_1.Util.extend(headers, { \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\" });\n }\n else {\n batchBody.push(`${reqInfo.method} ${url} HTTP/1.1\\n`);\n }\n if (typeof pnplibconfig_1.RuntimeConfig.headers !== \"undefined\") {\n headers = util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.headers);\n }\n if (reqInfo.options && reqInfo.options.headers) {\n headers = util_1.Util.extend(headers, reqInfo.options.headers);\n }\n for (let name in headers) {\n if (headers.hasOwnProperty(name)) {\n batchBody.push(`${name}: ${headers[name]}\\n`);\n }\n }\n batchBody.push(\"\\n\");\n if (reqInfo.options.body) {\n batchBody.push(`${reqInfo.options.body}\\n\\n`);\n }\n });\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(`--changeset_${currentChangeSetId}--\\n\\n`);\n currentChangeSetId = \"\";\n }\n batchBody.push(`--batch_${this._batchId}--\\n`);\n let batchHeaders = {\n \"Content-Type\": `multipart/mixed; boundary=batch_${this._batchId}`,\n };\n let batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": batchHeaders,\n };\n logging_1.Logger.write(\"Sending batch request.\", logging_1.LogLevel.Info);\n return client.post(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(r => r.text())\n .then(this._parseResponse)\n .then((responses) => {\n if (responses.length !== this._requests.length) {\n throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n logging_1.Logger.write(\"Resolving batched requests.\", logging_1.LogLevel.Info);\n return responses.reduce((chain, response, index) => {\n let request = this._requests[index];\n logging_1.Logger.write(`Resolving request ${request.method} ${request.url}.`, logging_1.LogLevel.Verbose);\n return chain.then(_ => request.parser.parse(response).then(request.resolve).catch(request.reject));\n }, Promise.resolve());\n });\n });\n }\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n _parseResponse(body) {\n return new Promise((resolve, reject) => {\n let responses = [];\n let header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n let statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n let lines = body.split(\"\\n\");\n let state = \"batch\";\n let status;\n let statusText;\n for (let i = 0; i < lines.length; ++i) {\n let line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n }\n else {\n if (line.trim() !== \"\") {\n throw new exceptions_1.BatchParseException(`Invalid response, line ${i}`);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n let parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw new exceptions_1.BatchParseException(`Invalid status, line ${i}`);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n }\n}\nexports.ODataBatch = ODataBatch;\nclass TextFileParser {\n parse(r) {\n return r.text();\n }\n}\nexports.TextFileParser = TextFileParser;\nclass BlobFileParser {\n parse(r) {\n return r.blob();\n }\n}\nexports.BlobFileParser = BlobFileParser;\nclass JSONFileParser {\n parse(r) {\n return r.json();\n }\n}\nexports.JSONFileParser = JSONFileParser;\nclass BufferFileParser {\n parse(r) {\n if (util_1.Util.isFunction(r.arrayBuffer)) {\n return r.arrayBuffer();\n }\n return r.buffer();\n }\n}\nexports.BufferFileParser = BufferFileParser;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/odata.js","\"use strict\";\nconst digestcache_1 = require(\"./digestcache\");\nconst util_1 = require(\"../utils/util\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nclass HttpClient {\n constructor() {\n this._impl = pnplibconfig_1.RuntimeConfig.fetchClientFactory();\n this._digestCache = new digestcache_1.DigestCache(this);\n }\n fetch(url, options = {}) {\n let opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n let headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n this.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.headers);\n // second we add the local options so we can overwrite the globals\n this.mergeHeaders(headers, options.headers);\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:2.0.1\");\n }\n opts = util_1.Util.extend(opts, { headers: headers });\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n if (!headers.has(\"X-RequestDigest\")) {\n let index = url.indexOf(\"_api/\");\n if (index < 0) {\n throw new exceptions_1.APIUrlException();\n }\n let webUrl = url.substr(0, index);\n return this._digestCache.getDigest(webUrl)\n .then((digest) => {\n headers.append(\"X-RequestDigest\", digest);\n return this.fetchRaw(url, opts);\n });\n }\n }\n return this.fetchRaw(url, opts);\n }\n fetchRaw(url, options = {}) {\n // here we need to normalize the headers\n let rawHeaders = new Headers();\n this.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n let retry = (ctx) => {\n this._impl.fetch(url, options).then((response) => ctx.resolve(response)).catch((response) => {\n // grab our current delay\n let delay = ctx.delay;\n // Check if request was throttled - http status code 429\n // Check is request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(this, retry, ctx), delay);\n });\n };\n return new Promise((resolve, reject) => {\n let retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(this, retryContext);\n });\n }\n get(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n }\n post(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n }\n patch(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n }\n delete(url, options = {}) {\n let opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n }\n mergeHeaders(target, source) {\n if (typeof source !== \"undefined\" && source !== null) {\n let temp = new Request(\"\", { headers: source });\n temp.headers.forEach((value, name) => {\n target.append(name, value);\n });\n }\n }\n}\nexports.HttpClient = HttpClient;\n;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/httpclient.js","\"use strict\";\nconst collections_1 = require(\"../collections/collections\");\nconst util_1 = require(\"../utils/util\");\nconst odata_1 = require(\"../sharepoint/odata\");\nclass CachedDigest {\n}\nexports.CachedDigest = CachedDigest;\nclass DigestCache {\n constructor(_httpClient, _digests = new collections_1.Dictionary()) {\n this._httpClient = _httpClient;\n this._digests = _digests;\n }\n getDigest(webUrl) {\n let cachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== null) {\n let now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n let url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-type\": \"application/json;odata=verbose;charset=utf-8\",\n },\n method: \"POST\",\n }).then((response) => {\n let parser = new odata_1.ODataDefaultParser();\n return parser.parse(response).then((d) => d.GetContextWebInformation);\n }).then((data) => {\n let newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n let seconds = data.FormDigestTimeoutSeconds;\n let expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n this._digests.add(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n }\n clear() {\n this._digests.clear();\n }\n}\nexports.DigestCache = DigestCache;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/digestcache.js","\"use strict\";\nconst logging_1 = require(\"../utils/logging\");\nfunction defaultLog(error) {\n logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: `[${error.name}]::${error.message}` });\n}\n/**\n * Represents an exception with an HttpClient request\n *\n */\nclass ProcessHttpClientResponseException extends Error {\n constructor(status, statusText, data) {\n super(`Error making HttpClient request in queryable: [${status}] ${statusText}`);\n this.status = status;\n this.statusText = statusText;\n this.data = data;\n this.name = \"ProcessHttpClientResponseException\";\n logging_1.Logger.log({ data: this.data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\nclass NoCacheAvailableException extends Error {\n constructor(msg = \"Cannot create a caching configuration provider since cache is not available.\") {\n super(msg);\n this.name = \"NoCacheAvailableException\";\n defaultLog(this);\n }\n}\nexports.NoCacheAvailableException = NoCacheAvailableException;\nclass APIUrlException extends Error {\n constructor(msg = \"Unable to determine API url.\") {\n super(msg);\n this.name = \"APIUrlException\";\n defaultLog(this);\n }\n}\nexports.APIUrlException = APIUrlException;\nclass AuthUrlException extends Error {\n constructor(data, msg = \"Auth URL Endpoint could not be determined from data. Data logged.\") {\n super(msg);\n this.name = \"APIUrlException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.AuthUrlException = AuthUrlException;\nclass NodeFetchClientUnsupportedException extends Error {\n constructor(msg = \"Using NodeFetchClient in the browser is not supported.\") {\n super(msg);\n this.name = \"NodeFetchClientUnsupportedException\";\n defaultLog(this);\n }\n}\nexports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\nclass SPRequestExecutorUndefinedException extends Error {\n constructor() {\n let msg = [\n \"SP.RequestExecutor is undefined. \",\n \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\",\n ].join(\" \");\n super(msg);\n this.name = \"SPRequestExecutorUndefinedException\";\n defaultLog(this);\n }\n}\nexports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\nclass MaxCommentLengthException extends Error {\n constructor(msg = \"The maximum comment length is 1023 characters.\") {\n super(msg);\n this.name = \"MaxCommentLengthException\";\n defaultLog(this);\n }\n}\nexports.MaxCommentLengthException = MaxCommentLengthException;\nclass NotSupportedInBatchException extends Error {\n constructor(operation = \"This operation\") {\n super(`${operation} is not supported as part of a batch.`);\n this.name = \"NotSupportedInBatchException\";\n defaultLog(this);\n }\n}\nexports.NotSupportedInBatchException = NotSupportedInBatchException;\nclass ODataIdException extends Error {\n constructor(data, msg = \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\") {\n super(msg);\n this.name = \"ODataIdException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: this.message });\n }\n}\nexports.ODataIdException = ODataIdException;\nclass BatchParseException extends Error {\n constructor(msg) {\n super(msg);\n this.name = \"BatchParseException\";\n defaultLog(this);\n }\n}\nexports.BatchParseException = BatchParseException;\nclass AlreadyInBatchException extends Error {\n constructor(msg = \"This query is already part of a batch.\") {\n super(msg);\n this.name = \"AlreadyInBatchException\";\n defaultLog(this);\n }\n}\nexports.AlreadyInBatchException = AlreadyInBatchException;\nclass FunctionExpectedException extends Error {\n constructor(msg = \"This query is already part of a batch.\") {\n super(msg);\n this.name = \"FunctionExpectedException\";\n defaultLog(this);\n }\n}\nexports.FunctionExpectedException = FunctionExpectedException;\nclass UrlException extends Error {\n constructor(msg) {\n super(msg);\n this.name = \"UrlException\";\n defaultLog(this);\n }\n}\nexports.UrlException = UrlException;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/exceptions.js","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nconst caching_1 = require(\"./caching\");\nconst httpclient_1 = require(\"../net/httpclient\");\nconst logging_1 = require(\"../utils/logging\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Processes a given context through the request pipeline\n *\n * @param context The request context we are processing\n */\nfunction pipe(context) {\n // this is the beginning of the extensible pipeline in future versions\n let pipeline = [\n PipelineMethods.logStart,\n PipelineMethods.caching,\n PipelineMethods.send,\n PipelineMethods.logEnd,\n ];\n return pipeline.reduce((chain, next) => chain.then(c => next(c)), Promise.resolve(context))\n .then(ctx => PipelineMethods.returnResult(ctx))\n .catch((e) => {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: `Error in request pipeline: ${e.message}`,\n });\n throw e;\n });\n}\nexports.pipe = pipe;\n/**\n * decorator factory applied to methods in the pipeline to control behavior\n */\nfunction requestPipelineMethod(alwaysRun = false) {\n return function (target, propertyKey, descriptor) {\n let method = descriptor.value;\n descriptor.value = function (...args) {\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\n if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n logging_1.Logger.write(`[${args[0].requestId}] (${(new Date()).getTime()}) Skipping request pipeline method ${propertyKey}, existing result in pipeline.`, logging_1.LogLevel.Verbose);\n return Promise.resolve(args[0]);\n }\n // apply the tagged method\n logging_1.Logger.write(`[${args[0].requestId}] (${(new Date()).getTime()}) Calling request pipeline method ${propertyKey}.`, logging_1.LogLevel.Verbose);\n return method.apply(target, args);\n };\n };\n}\n/**\n * Contains the methods used within the request pipeline\n */\nclass PipelineMethods {\n /**\n * Logs the start of the request\n */\n static logStart(context) {\n return new Promise(resolve => {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Beginning ${context.verb} request to ${context.requestAbsoluteUrl}`,\n });\n resolve(context);\n });\n }\n /**\n * Handles caching of the request\n */\n static caching(context) {\n return new Promise(resolve => {\n // handle caching, if applicable\n if (context.verb === \"GET\" && context.isCached) {\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Caching is enabled for request, checking cache...`, logging_1.LogLevel.Info);\n let cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n if (typeof context.cachingOptions !== \"undefined\") {\n cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n }\n // we may not have a valid store, i.e. on node\n if (cacheOptions.store !== null) {\n // check if we have the data in cache and if so resolve the promise and return\n let data = cacheOptions.store.get(cacheOptions.key);\n if (data !== null) {\n // ensure we clear any help batch dependency we are resolving from the cache\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Value returned from cache.`,\n });\n context.batchDependency();\n return PipelineMethods.setResult(context, data).then(ctx => resolve(ctx));\n }\n }\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Value not found in cache.`, logging_1.LogLevel.Info);\n // if we don't then wrap the supplied parser in the caching parser wrapper\n // and send things on their way\n context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n }\n return resolve(context);\n });\n }\n /**\n * Sends the request\n */\n static send(context) {\n return new Promise((resolve, reject) => {\n // send or batch the request\n if (context.isBatched) {\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n let p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n context.batchDependency();\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Batching request.`, logging_1.LogLevel.Info);\n resolve(p.then(result => PipelineMethods.setResult(context, result)));\n }\n else {\n logging_1.Logger.write(`[${context.requestId}] (${(new Date()).getTime()}) Sending request.`, logging_1.LogLevel.Info);\n // we are not part of a batch, so proceed as normal\n let client = new httpclient_1.HttpClient();\n let opts = util_1.Util.extend(context.options, { method: context.verb });\n client.fetch(context.requestAbsoluteUrl, opts)\n .then(response => context.parser.parse(response))\n .then(result => PipelineMethods.setResult(context, result))\n .then(ctx => resolve(ctx))\n .catch(e => reject(e));\n }\n });\n }\n /**\n * Logs the end of the request\n */\n static logEnd(context) {\n return new Promise(resolve => {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Completing ${context.verb} request to ${context.requestAbsoluteUrl}`,\n });\n resolve(context);\n });\n }\n /**\n * At the end of the pipeline resolves the request's result\n */\n static returnResult(context) {\n logging_1.Logger.log({\n data: context.result,\n level: logging_1.LogLevel.Verbose,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Returning, see data property for value.`,\n });\n return Promise.resolve(context.result);\n }\n /**\n * Sets the result on the context\n */\n static setResult(context, value) {\n return new Promise((resolve) => {\n context.result = value;\n context.hasResult = true;\n resolve(context);\n });\n }\n}\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"logStart\", null);\n__decorate([\n requestPipelineMethod()\n], PipelineMethods, \"caching\", null);\n__decorate([\n requestPipelineMethod()\n], PipelineMethods, \"send\", null);\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"logEnd\", null);\n__decorate([\n requestPipelineMethod(true)\n], PipelineMethods, \"returnResult\", null);\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryablerequest.js","\"use strict\";\nconst storage_1 = require(\"../utils/storage\");\nconst util_1 = require(\"../utils/util\");\nconst pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nclass CachingOptions {\n constructor(key) {\n this.key = key;\n this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n }\n get store() {\n if (this.storeName === \"local\") {\n return CachingOptions.storage.local;\n }\n else {\n return CachingOptions.storage.session;\n }\n }\n}\nCachingOptions.storage = new storage_1.PnPClientStorage();\nexports.CachingOptions = CachingOptions;\nclass CachingParserWrapper {\n constructor(_parser, _cacheOptions) {\n this._parser = _parser;\n this._cacheOptions = _cacheOptions;\n }\n parse(response) {\n // add this to the cache based on the options\n return this._parser.parse(response).then(data => {\n if (this._cacheOptions.store !== null) {\n this._cacheOptions.store.put(this._cacheOptions.key, data, this._cacheOptions.expiration);\n }\n return data;\n });\n }\n}\nexports.CachingParserWrapper = CachingParserWrapper;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/caching.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nclass SearchSuggest extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"_api/search/suggest\") {\n super(baseUrl, path);\n }\n execute(query) {\n this.mapQueryToQueryString(query);\n return this.get().then(response => new SearchSuggestResult(response));\n }\n mapQueryToQueryString(query) {\n this.query.add(\"querytext\", `'${query.querytext}'`);\n if (query.hasOwnProperty(\"count\")) {\n this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n }\n if (query.hasOwnProperty(\"personalCount\")) {\n this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n }\n if (query.hasOwnProperty(\"preQuery\")) {\n this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n }\n if (query.hasOwnProperty(\"hitHighlighting\")) {\n this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n }\n if (query.hasOwnProperty(\"capitalize\")) {\n this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n }\n if (query.hasOwnProperty(\"culture\")) {\n this.query.add(\"culture\", query.culture.toString());\n }\n if (query.hasOwnProperty(\"stemming\")) {\n this.query.add(\"enablestemming\", query.stemming.toString());\n }\n if (query.hasOwnProperty(\"includePeople\")) {\n this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n }\n if (query.hasOwnProperty(\"queryRules\")) {\n this.query.add(\"enablequeryrules\", query.queryRules.toString());\n }\n if (query.hasOwnProperty(\"prefixMatch\")) {\n this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n }\n }\n}\nexports.SearchSuggest = SearchSuggest;\nclass SearchSuggestResult {\n constructor(json) {\n if (json.hasOwnProperty(\"suggest\")) {\n // verbose\n this.PeopleNames = json.suggest.PeopleNames.results;\n this.PersonalResults = json.suggest.PersonalResults.results;\n this.Queries = json.suggest.Queries.results;\n }\n else {\n this.PeopleNames = json.PeopleNames;\n this.PersonalResults = json.PersonalResults;\n this.Queries = json.Queries;\n }\n }\n}\nexports.SearchSuggestResult = SearchSuggestResult;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/searchsuggest.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst webs_1 = require(\"./webs\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst features_1 = require(\"./features\");\n/**\n * Describes a site collection\n *\n */\nclass Site extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"_api/site\") {\n super(baseUrl, path);\n }\n /**\n * Gets the root web of the site collection\n *\n */\n get rootWeb() {\n return new webs_1.Web(this, \"rootweb\");\n }\n /**\n * Gets the active features for this site\n *\n */\n get features() {\n return new features_1.Features(this);\n }\n /**\n * Get all custom actions on a site collection\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the context information for the site.\n */\n getContextInfo() {\n let q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.post().then(data => {\n if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n let info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n getDocumentLibraries(absoluteWebUrl) {\n let q = new queryable_1.Queryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(data => {\n if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the site URL from a page URL.\n *\n * @param absolutePageUrl The absolute url of the page\n */\n getWebUrlFromPageUrl(absolutePageUrl) {\n let q = new queryable_1.Queryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n return q.get().then(data => {\n if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Creates a new batch for requests within the context of context this site\n *\n */\n createBatch() {\n return new odata_1.ODataBatch(this.parentUrl);\n }\n}\nexports.Site = Site;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/site.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst lists_1 = require(\"./lists\");\nconst fields_1 = require(\"./fields\");\nconst navigation_1 = require(\"./navigation\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst folders_1 = require(\"./folders\");\nconst roles_1 = require(\"./roles\");\nconst files_1 = require(\"./files\");\nconst util_1 = require(\"../utils/util\");\nconst lists_2 = require(\"./lists\");\nconst siteusers_1 = require(\"./siteusers\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst features_1 = require(\"./features\");\nclass Webs extends queryable_1.QueryableCollection {\n constructor(baseUrl, webPath = \"webs\") {\n super(baseUrl, webPath);\n }\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The web web's description\n * @param template The web's template\n * @param language The language code to use for this web\n * @param inheritPermissions If true permissions will be inherited from the partent web\n * @param additionalSettings Will be passed as part of the web creation body\n */\n add(title, url, description = \"\", template = \"STS\", language = 1033, inheritPermissions = true, additionalSettings = {}) {\n let props = util_1.Util.extend({\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n }, additionalSettings);\n let postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n let q = new Webs(this, \"add\");\n return q.post({ body: postBody }).then((data) => {\n return {\n data: data,\n web: new Web(odata_1.extractOdataId(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n }\n}\nexports.Webs = Webs;\n/**\n * Describes a web\n *\n */\nclass Web extends queryablesecurable_1.QueryableSecurable {\n constructor(baseUrl, path = \"_api/web\") {\n super(baseUrl, path);\n }\n get webs() {\n return new Webs(this);\n }\n /**\n * Get the content types available in this web\n *\n */\n get contentTypes() {\n return new contenttypes_1.ContentTypes(this);\n }\n /**\n * Get the lists in this web\n *\n */\n get lists() {\n return new lists_1.Lists(this);\n }\n /**\n * Gets the fields in this web\n *\n */\n get fields() {\n return new fields_1.Fields(this);\n }\n /**\n * Gets the active features for this web\n *\n */\n get features() {\n return new features_1.Features(this);\n }\n /**\n * Gets the available fields in this web\n *\n */\n get availablefields() {\n return new fields_1.Fields(this, \"availablefields\");\n }\n /**\n * Get the navigation options in this web\n *\n */\n get navigation() {\n return new navigation_1.Navigation(this);\n }\n /**\n * Gets the site users\n *\n */\n get siteUsers() {\n return new siteusers_1.SiteUsers(this);\n }\n /**\n * Gets the site groups\n *\n */\n get siteGroups() {\n return new sitegroups_1.SiteGroups(this);\n }\n /**\n * Gets the current user\n */\n get currentUser() {\n return new siteusers_1.CurrentUser(this);\n }\n /**\n * Get the folders in this web\n *\n */\n get folders() {\n return new folders_1.Folders(this);\n }\n /**\n * Get all custom actions on a site\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the collection of RoleDefinition resources.\n *\n */\n get roleDefinitions() {\n return new roles_1.RoleDefinitions(this);\n }\n /**\n * Creates a new batch for requests within the context of context this web\n *\n */\n createBatch() {\n return new odata_1.ODataBatch(this.parentUrl);\n }\n /**\n * Get a folder by server relative url\n *\n * @param folderRelativeUrl the server relative path to the folder (including /sites/ if applicable)\n */\n getFolderByServerRelativeUrl(folderRelativeUrl) {\n return new folders_1.Folder(this, `getFolderByServerRelativeUrl('${folderRelativeUrl}')`);\n }\n /**\n * Get a file by server relative url\n *\n * @param fileRelativeUrl the server relative path to the file (including /sites/ if applicable)\n */\n getFileByServerRelativeUrl(fileRelativeUrl) {\n return new files_1.File(this, `getFileByServerRelativeUrl('${fileRelativeUrl}')`);\n }\n /**\n * Get a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl the server relative path to the list's root folder (including /sites/ if applicable)\n */\n getList(listRelativeUrl) {\n return new lists_2.List(this, `getList('${listRelativeUrl}')`);\n }\n /**\n * Updates this web intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n web: this,\n };\n });\n }\n /**\n * Delete this web\n *\n */\n delete() {\n return super.delete();\n }\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site.\n *\n * @param colorPaletteUrl Server-relative URL of the color palette file.\n * @param fontSchemeUrl Server-relative URL of the font scheme.\n * @param backgroundImageUrl Server-relative URL of the background image.\n * @param shareGenerated true to store the generated theme files in the root site, or false to store them in this site.\n */\n applyTheme(colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n let postBody = JSON.stringify({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n let q = new Web(this, \"applytheme\");\n return q.post({ body: postBody });\n }\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it.\n *\n * @param template Name of the site definition or the name of the site template\n */\n applyWebTemplate(template) {\n let q = new Web(this, \"applywebtemplate\");\n q.concat(`(@t)`);\n q.query.add(\"@t\", template);\n return q.post();\n }\n /**\n * Returns whether the current user has the given set of permissions.\n *\n * @param perms The high and low permission range.\n */\n doesUserHavePermissions(perms) {\n let q = new Web(this, \"doesuserhavepermissions\");\n q.concat(`(@p)`);\n q.query.add(\"@p\", JSON.stringify(perms));\n return q.get();\n }\n /**\n * Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n ensureUser(loginName) {\n // TODO:: this should resolve to a User\n let postBody = JSON.stringify({\n logonName: loginName,\n });\n let q = new Web(this, \"ensureuser\");\n return q.post({ body: postBody });\n }\n /**\n * Returns a collection of site templates available for the site.\n *\n * @param language The LCID of the site templates to get.\n * @param true to include language-neutral site templates; otherwise false\n */\n availableWebTemplates(language = 1033, includeCrossLanugage = true) {\n return new queryable_1.QueryableCollection(this, `getavailablewebtemplates(lcid=${language}, doincludecrosslanguage=${includeCrossLanugage})`);\n }\n /**\n * Returns the list gallery on the site.\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n getCatalog(type) {\n let q = new Web(this, `getcatalog(${type})`);\n q.select(\"Id\");\n return q.get().then((data) => {\n return new lists_2.List(odata_1.extractOdataId(data));\n });\n }\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n getChanges(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n // don't change \"this\" instance, make a new one\n let q = new Web(this, \"getchanges\");\n return q.post({ body: postBody });\n }\n /**\n * Gets the custom list templates for the site.\n *\n */\n get customListTemplate() {\n return new queryable_1.QueryableCollection(this, \"getcustomlisttemplates\");\n }\n /**\n * Returns the user corresponding to the specified member identifier for the current site.\n *\n * @param id The ID of the user.\n */\n getUserById(id) {\n return new siteusers_1.SiteUser(this, `getUserById(${id})`);\n }\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file.\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string.\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1.\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n mapToIcon(filename, size = 0, progId = \"\") {\n let q = new Web(this, `maptoicon(filename='${filename}', progid='${progId}', size=${size})`);\n return q.get();\n }\n}\nexports.Web = Web;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/webs.js","\"use strict\";\nconst roles_1 = require(\"./roles\");\nconst queryable_1 = require(\"./queryable\");\nclass QueryableSecurable extends queryable_1.QueryableInstance {\n /**\n * Gets the set of role assignments for this item\n *\n */\n get roleAssignments() {\n return new roles_1.RoleAssignments(this);\n }\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n get firstUniqueAncestorSecurableObject() {\n return new queryable_1.QueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n }\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n getUserEffectivePermissions(loginName) {\n let perms = new queryable_1.Queryable(this, \"getUserEffectivePermissions(@user)\");\n perms.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return perms;\n }\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n breakRoleInheritance(copyRoleAssignments = false, clearSubscopes = false) {\n class Breaker extends queryable_1.Queryable {\n constructor(baseUrl, copy, clear) {\n super(baseUrl, `breakroleinheritance(copyroleassignments=${copy}, clearsubscopes=${clear})`);\n }\n break() {\n return this.post();\n }\n }\n let b = new Breaker(this, copyRoleAssignments, clearSubscopes);\n return b.break();\n }\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n resetRoleInheritance() {\n class Resetter extends queryable_1.Queryable {\n constructor(baseUrl) {\n super(baseUrl, \"resetroleinheritance\");\n }\n reset() {\n return this.post();\n }\n }\n let r = new Resetter(this);\n return r.reset();\n }\n}\nexports.QueryableSecurable = QueryableSecurable;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/queryablesecurable.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes a set of role assignments for the current scope\n *\n */\nclass RoleAssignments extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"roleassignments\") {\n super(baseUrl, path);\n }\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection.\n *\n * @param principalId The ID of the user or group to assign permissions to\n * @param roleDefId The ID of the role definition that defines the permissions to assign\n *\n */\n add(principalId, roleDefId) {\n let a = new RoleAssignments(this, `addroleassignment(principalid=${principalId}, roledefid=${roleDefId})`);\n return a.post();\n }\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The ID of the user or group in the role assignment.\n * @param roleDefId The ID of the role definition in the role assignment\n *\n */\n remove(principalId, roleDefId) {\n let a = new RoleAssignments(this, `removeroleassignment(principalid=${principalId}, roledefid=${roleDefId})`);\n return a.post();\n }\n /**\n * Gets the role assignment associated with the specified principal ID from the collection.\n *\n * @param id The id of the role assignment\n */\n getById(id) {\n let ra = new RoleAssignment(this);\n ra.concat(`(${id})`);\n return ra;\n }\n}\nexports.RoleAssignments = RoleAssignments;\nclass RoleAssignment extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the RoleAssignment class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n get groups() {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n }\n /**\n * Get the role definition bindings for this role assignment\n *\n */\n get bindings() {\n return new RoleDefinitionBindings(this);\n }\n /**\n * Delete this role assignment\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.RoleAssignment = RoleAssignment;\nclass RoleDefinitions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the RoleDefinitions class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path\n *\n */\n constructor(baseUrl, path = \"roledefinitions\") {\n super(baseUrl, path);\n }\n /**\n * Gets the role definition with the specified ID from the collection.\n *\n * @param id The ID of the role definition.\n *\n */\n getById(id) {\n return new RoleDefinition(this, `getById(${id})`);\n }\n /**\n * Gets the role definition with the specified name.\n *\n * @param name The name of the role definition.\n *\n */\n getByName(name) {\n return new RoleDefinition(this, `getbyname('${name}')`);\n }\n /**\n * Gets the role definition with the specified type.\n *\n * @param name The name of the role definition.\n *\n */\n getByType(roleTypeKind) {\n return new RoleDefinition(this, `getbytype(${roleTypeKind})`);\n }\n /**\n * Create a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n add(name, description, order, basePermissions) {\n let postBody = JSON.stringify({\n BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n return this.post({ body: postBody }).then((data) => {\n return {\n data: data,\n definition: this.getById(data.Id),\n };\n });\n }\n}\nexports.RoleDefinitions = RoleDefinitions;\nclass RoleDefinition extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Updates this web intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n /* tslint:disable no-string-literal */\n update(properties) {\n if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n }\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RoleDefinition\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retDef = this;\n if (properties.hasOwnProperty(\"Name\")) {\n let parent = this.getParent(RoleDefinitions, this.parentUrl, \"\");\n retDef = parent.getByName(properties[\"Name\"]);\n }\n return {\n data: data,\n definition: retDef,\n };\n });\n }\n /* tslint:enable */\n /**\n * Delete this role definition\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.RoleDefinition = RoleDefinition;\nclass RoleDefinitionBindings extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"roledefinitionbindings\") {\n super(baseUrl, path);\n }\n}\nexports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/roles.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst siteusers_1 = require(\"./siteusers\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Principal Type enum\n *\n */\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n/**\n * Describes a collection of site users\n *\n */\nclass SiteGroups extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the SiteUsers class\n *\n * @param baseUrl The url or Queryable which forms the parent of this user collection\n */\n constructor(baseUrl, path = \"sitegroups\") {\n super(baseUrl, path);\n }\n /**\n * Adds a new group to the site collection\n *\n * @param props The properties to be updated\n */\n add(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n return this.post({ body: postBody }).then((data) => {\n return {\n data: data,\n group: this.getById(data.Id),\n };\n });\n }\n /**\n * Gets a group from the collection by name\n *\n * @param email The name of the group\n */\n getByName(groupName) {\n return new SiteGroup(this, `getByName('${groupName}')`);\n }\n /**\n * Gets a group from the collection by id\n *\n * @param id The id of the group\n */\n getById(id) {\n let sg = new SiteGroup(this);\n sg.concat(`(${id})`);\n return sg;\n }\n /**\n * Removes the group with the specified member ID from the collection.\n *\n * @param id The id of the group to remove\n */\n removeById(id) {\n let g = new SiteGroups(this, `removeById('${id}')`);\n return g.post();\n }\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user\n */\n removeByLoginName(loginName) {\n let g = new SiteGroups(this, `removeByLoginName('${loginName}')`);\n return g.post();\n }\n}\nexports.SiteGroups = SiteGroups;\n/**\n * Describes a single group\n *\n */\nclass SiteGroup extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Group class\n *\n * @param baseUrl The url or Queryable which forms the parent of this site group\n * @param path Optional, passes the path to the group\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Get's the users for this group\n *\n */\n get users() {\n return new siteusers_1.SiteUsers(this, \"users\");\n }\n /**\n * Updates this group instance with the supplied properties\n *\n * @param properties A GroupWriteableProperties object of property names and values to update for the user\n */\n /* tslint:disable no-string-literal */\n update(properties) {\n let postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n return this.post({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retGroup = this;\n if (properties.hasOwnProperty(\"Title\")) {\n retGroup = this.getParent(SiteGroup, this.parentUrl, `getByName('${properties[\"Title\"]}')`);\n }\n return {\n data: data,\n group: retGroup,\n };\n });\n }\n}\nexports.SiteGroup = SiteGroup;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/sitegroups.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst sitegroups_1 = require(\"./sitegroups\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of all site collection users\n *\n */\nclass SiteUsers extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Users class\n *\n * @param baseUrl The url or Queryable which forms the parent of this user collection\n */\n constructor(baseUrl, path = \"siteusers\") {\n super(baseUrl, path);\n }\n /**\n * Gets a user from the collection by email\n *\n * @param email The email of the user\n */\n getByEmail(email) {\n return new SiteUser(this, `getByEmail('${email}')`);\n }\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user\n */\n getById(id) {\n return new SiteUser(this, `getById(${id})`);\n }\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The email address of the user\n */\n getByLoginName(loginName) {\n let su = new SiteUser(this);\n su.concat(\"(@v)\");\n su.query.add(\"@v\", encodeURIComponent(loginName));\n return su;\n }\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user\n */\n removeById(id) {\n let o = new SiteUsers(this, `removeById(${id})`);\n return o.post();\n }\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user\n */\n removeByLoginName(loginName) {\n let o = new SiteUsers(this, `removeByLoginName(@v)`);\n o.query.add(\"@v\", encodeURIComponent(loginName));\n return o.post();\n }\n /**\n * Add a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n add(loginName) {\n let postBody = JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName });\n return this.post({ body: postBody }).then(() => this.getByLoginName(loginName));\n }\n}\nexports.SiteUsers = SiteUsers;\n/**\n * Describes a single user\n *\n */\nclass SiteUser extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the User class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, passes the path to the user\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Get's the groups for this user.\n *\n */\n get groups() {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n }\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n update(properties) {\n let postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n return this.post({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n user: this,\n };\n });\n }\n /**\n * Delete this user\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.SiteUser = SiteUser;\n/**\n * Represents the current user\n */\nclass CurrentUser extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"currentuser\") {\n super(baseUrl, path);\n }\n}\nexports.CurrentUser = CurrentUser;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/siteusers.js","\"use strict\";\nconst items_1 = require(\"./items\");\nconst views_1 = require(\"./views\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst fields_1 = require(\"./fields\");\nconst forms_1 = require(\"./forms\");\nconst subscriptions_1 = require(\"./subscriptions\");\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst util_1 = require(\"../utils/util\");\nconst usercustomactions_1 = require(\"./usercustomactions\");\nconst odata_1 = require(\"./odata\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Describes a collection of List objects\n *\n */\nclass Lists extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"lists\") {\n super(baseUrl, path);\n }\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n getByTitle(title) {\n return new List(this, `getByTitle('${title}')`);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n getById(id) {\n let list = new List(this);\n list.concat(`('${id}')`);\n return list;\n }\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n add(title, description = \"\", template = 100, enableContentTypes = false, additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings));\n return this.post({ body: postBody }).then((data) => {\n return { data: data, list: this.getByTitle(title) };\n });\n }\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n ensure(title, description = \"\", template = 100, enableContentTypes = false, additionalSettings = {}) {\n if (this.hasBatch) {\n throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n }\n return new Promise((resolve, reject) => {\n let list = this.getByTitle(title);\n list.get().then(_ => {\n list.update(additionalSettings).then(d => {\n resolve({ created: false, data: d, list: list });\n }).catch(e => reject(e));\n }).catch(_ => {\n this.add(title, description, template, enableContentTypes, additionalSettings).then((r) => {\n resolve({ created: true, data: r.data, list: this.getByTitle(title) });\n }).catch((e) => reject(e));\n });\n });\n }\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n ensureSiteAssetsLibrary() {\n let q = new Lists(this, \"ensuresiteassetslibrary\");\n return q.post().then((json) => {\n return new List(odata_1.extractOdataId(json));\n });\n }\n /**\n * Gets a list that is the default location for wiki pages.\n */\n ensureSitePagesLibrary() {\n let q = new Lists(this, \"ensuresitepageslibrary\");\n return q.post().then((json) => {\n return new List(odata_1.extractOdataId(json));\n });\n }\n}\nexports.Lists = Lists;\n/**\n * Describes a single List instance\n *\n */\nclass List extends queryablesecurable_1.QueryableSecurable {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the content types in this list\n *\n */\n get contentTypes() {\n return new contenttypes_1.ContentTypes(this);\n }\n /**\n * Gets the items in this list\n *\n */\n get items() {\n return new items_1.Items(this);\n }\n /**\n * Gets the views in this list\n *\n */\n get views() {\n return new views_1.Views(this);\n }\n /**\n * Gets the fields in this list\n *\n */\n get fields() {\n return new fields_1.Fields(this);\n }\n /**\n * Gets the forms in this list\n *\n */\n get forms() {\n return new forms_1.Forms(this);\n }\n /**\n * Gets the default view of this list\n *\n */\n get defaultView() {\n return new queryable_1.QueryableInstance(this, \"DefaultView\");\n }\n /**\n * Get all custom actions on a site collection\n *\n */\n get userCustomActions() {\n return new usercustomactions_1.UserCustomActions(this);\n }\n /**\n * Gets the effective base permissions of this list\n *\n */\n get effectiveBasePermissions() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n }\n /**\n * Gets the event receivers attached to this list\n *\n */\n get eventReceivers() {\n return new queryable_1.QueryableCollection(this, \"EventReceivers\");\n }\n /**\n * Gets the related fields of this list\n *\n */\n get relatedFields() {\n return new queryable_1.Queryable(this, \"getRelatedFields\");\n }\n /**\n * Gets the IRM settings for this list\n *\n */\n get informationRightsManagementSettings() {\n return new queryable_1.Queryable(this, \"InformationRightsManagementSettings\");\n }\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n get subscriptions() {\n return new subscriptions_1.Subscriptions(this);\n }\n /**\n * Gets a view by view guid id\n *\n */\n getView(viewId) {\n return new views_1.View(this, `getView('${viewId}')`);\n }\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n update(properties, eTag = \"*\") {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n let retList = this;\n if (properties.hasOwnProperty(\"Title\")) {\n retList = this.getParent(List, this.parentUrl, `getByTitle('${properties[\"Title\"]}')`);\n }\n return {\n data: data,\n list: retList,\n };\n });\n }\n /* tslint:enable */\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n getChanges(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getchanges\");\n return q.post({ body: postBody });\n }\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n getItemsByCAMLQuery(query, ...expands) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getitems\");\n q = q.expand.apply(q, expands);\n return q.post({ body: postBody });\n }\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n getListItemChangesSinceToken(query) {\n let postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) });\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"getlistitemchangessincetoken\");\n // note we are using a custom parser to return text as the response is an xml doc\n return q.post({ body: postBody }, { parse(r) { return r.text(); } });\n }\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n this.append(\"recycle\");\n return this.post().then(data => {\n if (data.hasOwnProperty(\"Recycle\")) {\n return data.Recycle;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Renders list data based on the view xml provided\n */\n renderListData(viewXml) {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"renderlistdata(@viewXml)\");\n q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n return q.post().then(data => {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"RenderListData\")) {\n return data.RenderListData;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n renderListFormData(itemId, formId, mode) {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode=\" + mode + \")\");\n return q.post().then(data => {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"ListData\")) {\n return data.ListData;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n reserveListItemId() {\n // don't change \"this\" instance of the List, make a new one\n let q = new List(this, \"reservelistitemid\");\n return q.post().then(data => {\n if (data.hasOwnProperty(\"ReserveListItemId\")) {\n return data.ReserveListItemId;\n }\n else {\n return data;\n }\n });\n }\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items\n *\n */\n getListItemEntityTypeFullName() {\n let q = new queryable_1.QueryableInstance(this);\n return q.select(\"ListItemEntityTypeFullName\").getAs().then(o => o.ListItemEntityTypeFullName);\n }\n}\nexports.List = List;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/lists.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst queryablesecurable_1 = require(\"./queryablesecurable\");\nconst folders_1 = require(\"./folders\");\nconst files_1 = require(\"./files\");\nconst contenttypes_1 = require(\"./contenttypes\");\nconst util_1 = require(\"../utils/util\");\nconst odata_1 = require(\"./odata\");\nconst attachmentfiles_1 = require(\"./attachmentfiles\");\nconst lists_1 = require(\"./lists\");\n/**\n * Describes a collection of Item objects\n *\n */\nclass Items extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"items\") {\n super(baseUrl, path);\n }\n /**\n * Gets an Item by id\n *\n * @param id The integer id of the item to retrieve\n */\n getById(id) {\n let i = new Item(this);\n i.concat(`(${id})`);\n return i;\n }\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n */\n skip(skip) {\n this._query.add(\"$skiptoken\", encodeURIComponent(`Paged=TRUE&p_ID=${skip}`));\n return this;\n }\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n getPaged() {\n return this.getAs(new PagedItemCollectionParser());\n }\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n */\n add(properties = {}, listItemEntityTypeFullName = null) {\n let doAdd = (listItemEntityType) => {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n item: this.getById(data.Id),\n };\n });\n };\n if (!listItemEntityTypeFullName) {\n let parentList = this.getParent(lists_1.List);\n let removeDependency = this.addBatchDependency();\n return parentList.getListItemEntityTypeFullName().then(n => {\n let promise = doAdd(n);\n removeDependency();\n return promise;\n });\n }\n else {\n return doAdd(listItemEntityTypeFullName);\n }\n }\n}\nexports.Items = Items;\n/**\n * Descrines a single Item instance\n *\n */\nclass Item extends queryablesecurable_1.QueryableSecurable {\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the set of attachments for this item\n *\n */\n get attachmentFiles() {\n return new attachmentfiles_1.AttachmentFiles(this);\n }\n /**\n * Gets the content type for this item\n *\n */\n get contentType() {\n return new contenttypes_1.ContentType(this, \"ContentType\");\n }\n /**\n * Gets the effective base permissions for the item\n *\n */\n get effectiveBasePermissions() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissions\");\n }\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n get effectiveBasePermissionsForUI() {\n return new queryable_1.Queryable(this, \"EffectiveBasePermissionsForUI\");\n }\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n get fieldValuesAsHTML() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesAsHTML\");\n }\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n get fieldValuesAsText() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesAsText\");\n }\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n get fieldValuesForEdit() {\n return new queryable_1.QueryableInstance(this, \"FieldValuesForEdit\");\n }\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get folder() {\n return new folders_1.Folder(this, \"folder\");\n }\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get file() {\n return new files_1.File(this, \"file\");\n }\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n update(properties, eTag = \"*\") {\n return new Promise((resolve, reject) => {\n let removeDependency = this.addBatchDependency();\n let parentList = this.getParent(queryable_1.QueryableInstance, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\")));\n parentList.select(\"ListItemEntityTypeFullName\").getAs().then((d) => {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": d.ListItemEntityTypeFullName },\n }, properties));\n this.post({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then((data) => {\n removeDependency();\n resolve({\n data: data,\n item: this,\n });\n });\n }).catch(e => reject(e));\n });\n }\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n let i = new Item(this, \"recycle\");\n return i.post();\n }\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n getWopiFrameUrl(action = 0) {\n let i = new Item(this, \"getWOPIFrameUrl(@action)\");\n i._query.add(\"@action\", action);\n return i.post().then((data) => {\n return data.GetWOPIFrameUrl;\n });\n }\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n /* tslint:disable max-line-length */\n validateUpdateListItem(formValues, newDocumentUpdate = false) {\n let postBody = JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate });\n let item = new Item(this, \"validateupdatelistitem\");\n return item.post({ body: postBody });\n }\n}\nexports.Item = Item;\n/**\n * Provides paging functionality for list items\n */\nclass PagedItemCollection {\n constructor(nextUrl, results) {\n this.nextUrl = nextUrl;\n this.results = results;\n }\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n get hasNext() {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n }\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n getNext() {\n if (this.hasNext) {\n let items = new Items(this.nextUrl, null);\n return items.getPaged();\n }\n return new Promise(r => r(null));\n }\n}\nexports.PagedItemCollection = PagedItemCollection;\nclass PagedItemCollectionParser extends odata_1.ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n r.json().then(json => {\n let nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n resolve(new PagedItemCollection(nextUrl, this.parseODataJSON(json)));\n });\n }\n });\n }\n}\nclass ItemUpdatedParser extends odata_1.ODataParserBase {\n parse(r) {\n return new Promise((resolve, reject) => {\n if (this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/items.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst files_1 = require(\"./files\");\n/**\n * Describes a collection of Folder objects\n *\n */\nclass Folders extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Folders class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"folders\") {\n super(baseUrl, path);\n }\n /**\n * Gets a folder by folder name\n *\n */\n getByName(name) {\n let f = new Folder(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n add(url) {\n return new Folders(this, `add('${url}')`).post().then((response) => {\n return {\n data: response,\n folder: this.getByName(url),\n };\n });\n }\n}\nexports.Folders = Folders;\n/**\n * Describes a single Folder instance\n *\n */\nclass Folder extends queryable_1.QueryableInstance {\n //\n // TODO:\n // Properties (https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FolderProperties)\n // UniqueContentTypeOrder (setter)\n // WelcomePage (setter)\n //\n /**\n * Creates a new instance of the Folder class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n get contentTypeOrder() {\n return new queryable_1.QueryableCollection(this, \"contentTypeOrder\");\n }\n /**\n * Gets this folder's files\n *\n */\n get files() {\n return new files_1.Files(this);\n }\n /**\n * Gets this folder's sub folders\n *\n */\n get folders() {\n return new Folders(this);\n }\n /**\n * Gets this folder's list item field values\n *\n */\n get listItemAllFields() {\n return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n }\n /**\n * Gets the parent folder, if available\n *\n */\n get parentFolder() {\n return new Folder(this, \"parentFolder\");\n }\n /**\n * Gets this folder's properties\n *\n */\n get properties() {\n return new queryable_1.QueryableInstance(this, \"properties\");\n }\n /**\n * Gets this folder's server relative url\n *\n */\n get serverRelativeUrl() {\n return new queryable_1.Queryable(this, \"serverRelativeUrl\");\n }\n /**\n * Gets a value that specifies the content type order.\n *\n */\n get uniqueContentTypeOrder() {\n return new queryable_1.QueryableCollection(this, \"uniqueContentTypeOrder\");\n }\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return new Folder(this).post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n recycle() {\n return new Folder(this, \"recycle\").post();\n }\n}\nexports.Folder = Folder;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/folders.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst odata_1 = require(\"./odata\");\nconst util_1 = require(\"../utils/util\");\nconst exceptions_1 = require(\"../utils/exceptions\");\nconst webparts_1 = require(\"./webparts\");\n/**\n * Describes a collection of File objects\n *\n */\nclass Files extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Files class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"files\") {\n super(baseUrl, path);\n }\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n getByName(name) {\n let f = new File(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Uploads a file.\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n add(url, content, shouldOverWrite = true) {\n return new Files(this, `add(overwrite=${shouldOverWrite},url='${url}')`)\n .post({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(url),\n };\n });\n }\n /**\n * Uploads a file.\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n addChunked(url, content, progress, shouldOverWrite = true, chunkSize = 10485760) {\n let adder = new Files(this, `add(overwrite=${shouldOverWrite},url='${url}')`);\n return adder.post().then(() => this.getByName(url)).then(file => file.setContentChunked(content, progress, chunkSize)).then((response) => {\n return {\n data: response,\n file: this.getByName(url),\n };\n });\n }\n /**\n * Adds a ghosted file to an existing list or document library.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n addTemplateFile(fileUrl, templateFileType) {\n return new Files(this, `addTemplateFile(urloffile='${fileUrl}',templatefiletype=${templateFileType})`)\n .post().then((response) => {\n return {\n data: response,\n file: this.getByName(fileUrl),\n };\n });\n }\n}\nexports.Files = Files;\n/**\n * Describes a single File instance\n *\n */\nclass File extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n get listItemAllFields() {\n return new queryable_1.QueryableCollection(this, \"listItemAllFields\");\n }\n /**\n * Gets a collection of versions\n *\n */\n get versions() {\n return new Versions(this);\n }\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n approve(comment) {\n return new File(this, `approve(comment='${comment}')`).post();\n }\n /**\n * Stops the chunk upload session without saving the uploaded data.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n cancelUpload(uploadId) {\n return new File(this, `cancelUpload(uploadId=guid'${uploadId}')`).post();\n }\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n checkin(comment = \"\", checkinType = CheckinType.Major) {\n // TODO: Enforce comment length <= 1023\n return new File(this, `checkin(comment='${comment}',checkintype=${checkinType})`).post();\n }\n /**\n * Checks out the file from a document library.\n */\n checkout() {\n return new File(this, \"checkout\").post();\n }\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n copyTo(url, shouldOverWrite = true) {\n return new File(this, `copyTo(strnewurl='${url}',boverwrite=${shouldOverWrite})`).post();\n }\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return new File(this).post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n deny(comment = \"\") {\n return new File(this, `deny(comment='${comment}')`).post();\n }\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n getLimitedWebPartManager(scope = WebPartsPersonalizationScope.Shared) {\n return new webparts_1.LimitedWebPartManager(this, `getLimitedWebPartManager(scope=${scope})`);\n }\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n moveTo(url, moveOperations = MoveOperations.Overwrite) {\n return new File(this, `moveTo(newurl='${url}',flags=${moveOperations})`).post();\n }\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n publish(comment = \"\") {\n return new File(this, `publish(comment='${comment}')`).post();\n }\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n recycle() {\n return new File(this, \"recycle\").post();\n }\n /**\n * Reverts an existing checkout for the file.\n *\n */\n undoCheckout() {\n return new File(this, \"undoCheckout\").post();\n }\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n unpublish(comment = \"\") {\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return new File(this, `unpublish(comment='${comment}')`).post();\n }\n /**\n * Gets the contents of the file as text\n *\n */\n getText() {\n return new File(this, \"$value\").get(new odata_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n getBlob() {\n return new File(this, \"$value\").get(new odata_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getBuffer() {\n return new File(this, \"$value\").get(new odata_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getJSON() {\n return new File(this, \"$value\").get(new odata_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n }\n /**\n * Sets the content of a file, for large files use setContentChunked\n *\n * @param content The file content\n *\n */\n setContent(content) {\n let setter = new File(this, \"$value\");\n return setter.post({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new File(this));\n }\n /**\n * Sets the contents of a file using a chunked upload approach\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n setContentChunked(file, progress, chunkSize = 10485760) {\n if (typeof progress === \"undefined\") {\n progress = () => null;\n }\n let self = this;\n let fileSize = file.size;\n let blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n let uploadId = util_1.Util.getGUID();\n // start the chain with the first fragment\n progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n let chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n // skip the first and last blocks\n for (let i = 2; i < blockCount; i++) {\n chain = chain.then(pointer => {\n progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n }\n return chain.then(pointer => {\n progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return self.finishUpload(uploadId, pointer, file.slice(pointer));\n }).then(_ => {\n return self;\n });\n }\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n startUpload(uploadId, fragment) {\n return new File(this, `startUpload(uploadId=guid'${uploadId}')`).postAs({ body: fragment }).then(n => parseFloat(n));\n }\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n continueUpload(uploadId, fileOffset, fragment) {\n return new File(this, `continueUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`).postAs({ body: fragment }).then(n => parseFloat(n));\n }\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n finishUpload(uploadId, fileOffset, fragment) {\n return new File(this, `finishUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`)\n .postAs({ body: fragment }).then((response) => {\n return {\n data: response,\n file: new File(response.ServerRelativeUrl),\n };\n });\n }\n}\nexports.File = File;\n/**\n * Describes a collection of Version objects\n *\n */\nclass Versions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"versions\") {\n super(baseUrl, path);\n }\n /**\n * Gets a version by id\n *\n * @param versionId The id of the version to retrieve\n */\n getById(versionId) {\n let v = new Version(this);\n v.concat(`(${versionId})`);\n return v;\n }\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n deleteAll() {\n return new Versions(this, \"deleteAll\").post();\n }\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n deleteById(versionId) {\n return new Versions(this, `deleteById(vid=${versionId})`).post();\n }\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n deleteByLabel(label) {\n return new Versions(this, `deleteByLabel(versionlabel='${label}')`).post();\n }\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n restoreByLabel(label) {\n return new Versions(this, `restoreByLabel(versionlabel='${label}')`).post();\n }\n}\nexports.Versions = Versions;\n/**\n * Describes a single Version instance\n *\n */\nclass Version extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Version class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.Version = Version;\nvar CheckinType;\n(function (CheckinType) {\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\nvar WebPartsPersonalizationScope;\n(function (WebPartsPersonalizationScope) {\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\nvar MoveOperations;\n(function (MoveOperations) {\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\nvar TemplateFileType;\n(function (TemplateFileType) {\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/files.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nclass LimitedWebPartManager extends queryable_1.Queryable {\n /**\n * Creates a new instance of the LimitedWebPartManager class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n get webparts() {\n return new WebPartDefinitions(this, \"webparts\");\n }\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n export(id) {\n let exporter = new LimitedWebPartManager(this, \"ExportWebPart\");\n return exporter.post({\n body: JSON.stringify({ webPartId: id }),\n });\n }\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n import(xml) {\n let importer = new LimitedWebPartManager(this, \"ImportWebPart\");\n return importer.post({\n body: JSON.stringify({ webPartXml: xml }),\n });\n }\n}\nexports.LimitedWebPartManager = LimitedWebPartManager;\nclass WebPartDefinitions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the WebPartDefinitions class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id GUID id of the web part definition to get\n */\n getById(id) {\n return new WebPartDefinition(this, `getbyid('${id}')`);\n }\n}\nexports.WebPartDefinitions = WebPartDefinitions;\nclass WebPartDefinition extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the WebPartDefinition class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the webpart information associated with this definition\n */\n get webpart() {\n return new WebPart(this);\n }\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n delete() {\n let deleter = new WebPartDefinition(this, \"DeleteWebPart\");\n return deleter.post();\n }\n}\nexports.WebPartDefinition = WebPartDefinition;\nclass WebPart extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the WebPart class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n constructor(baseUrl, path = \"webpart\") {\n super(baseUrl, path);\n }\n}\nexports.WebPart = WebPart;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/webparts.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of content types\n *\n */\nclass ContentTypes extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the ContentTypes class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content types collection\n */\n constructor(baseUrl, path = \"contenttypes\") {\n super(baseUrl, path);\n }\n /**\n * Gets a ContentType by content type id\n */\n getById(id) {\n let ct = new ContentType(this);\n ct.concat(`('${id}')`);\n return ct;\n }\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n addAvailableContentType(contentTypeId) {\n let postBody = JSON.stringify({\n \"contentTypeId\": contentTypeId,\n });\n return new ContentTypes(this, `addAvailableContentType`).postAs({ body: postBody }).then((data) => {\n return {\n contentType: this.getById(data.id),\n data: data,\n };\n });\n }\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n add(id, name, description = \"\", group = \"Custom Content Types\", additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n \"__metadata\": { \"type\": \"SP.ContentType\" },\n }, additionalSettings));\n return this.post({ body: postBody }).then((data) => {\n return { contentType: this.getById(data.id), data: data };\n });\n }\n}\nexports.ContentTypes = ContentTypes;\n/**\n * Describes a single ContentType instance\n *\n */\nclass ContentType extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the column (also known as field) references in the content type.\n */\n get fieldLinks() {\n return new FieldLinks(this);\n }\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n get fields() {\n return new queryable_1.QueryableCollection(this, \"fields\");\n }\n /**\n * Gets the parent content type of the content type.\n */\n get parent() {\n return new ContentType(this, \"parent\");\n }\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n get workflowAssociations() {\n return new queryable_1.QueryableCollection(this, \"workflowAssociations\");\n }\n}\nexports.ContentType = ContentType;\n/**\n * Represents a collection of field link instances\n */\nclass FieldLinks extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path = \"fieldlinks\") {\n super(baseUrl, path);\n }\n /**\n * Gets a FieldLink by GUID id\n *\n * @param id The GUID id of the field link\n */\n getById(id) {\n let fl = new FieldLink(this);\n fl.concat(`(guid'${id}')`);\n return fl;\n }\n}\nexports.FieldLinks = FieldLinks;\n/**\n * Represents a field link instance\n */\nclass FieldLink extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or Queryable which forms the parent of this content type instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n}\nexports.FieldLink = FieldLink;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/contenttypes.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst odata_1 = require(\"./odata\");\n/**\n * Describes a collection of Item objects\n *\n */\nclass AttachmentFiles extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the AttachmentFiles class\n *\n * @param baseUrl The url or Queryable which forms the parent of this attachments collection\n */\n constructor(baseUrl, path = \"AttachmentFiles\") {\n super(baseUrl, path);\n }\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n getByName(name) {\n let f = new AttachmentFile(this);\n f.concat(`('${name}')`);\n return f;\n }\n /**\n * Adds a new attachment to the collection\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n add(name, content) {\n return new AttachmentFiles(this, `add(FileName='${name}')`)\n .post({\n body: content,\n }).then((response) => {\n return {\n data: response,\n file: this.getByName(name),\n };\n });\n }\n}\nexports.AttachmentFiles = AttachmentFiles;\n/**\n * Describes a single attachment file instance\n *\n */\nclass AttachmentFile extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the AttachmentFile class\n *\n * @param baseUrl The url or Queryable which forms the parent of this attachment file\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets the contents of the file as text\n *\n */\n getText() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.TextFileParser());\n }\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n getBlob() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.BlobFileParser());\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getBuffer() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.BufferFileParser());\n }\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n getJSON() {\n return new AttachmentFile(this, \"$value\").get(new odata_1.JSONFileParser());\n }\n /**\n * Sets the content of a file\n *\n * @param content The value to set for the file contents\n */\n setContent(content) {\n let setter = new AttachmentFile(this, \"$value\");\n return setter.post({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(_ => new AttachmentFile(this));\n }\n /**\n * Delete this attachment file\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n delete(eTag = \"*\") {\n return this.post({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n}\nexports.AttachmentFile = AttachmentFile;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/attachmentfiles.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\n/**\n * Describes the views available in the current context\n *\n */\nclass Views extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Views class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl) {\n super(baseUrl, \"views\");\n }\n /**\n * Gets a view by guid id\n *\n * @param id The GUID id of the view\n */\n getById(id) {\n let v = new View(this);\n v.concat(`('${id}')`);\n return v;\n }\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n getByTitle(title) {\n return new View(this, `getByTitle('${title}')`);\n }\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n /*tslint:disable max-line-length */\n add(title, personalView = false, additionalSettings = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"PersonalView\": personalView,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.View\" },\n }, additionalSettings));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n view: this.getById(data.Id),\n };\n });\n }\n}\nexports.Views = Views;\n/**\n * Describes a single View instance\n *\n */\nclass View extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the View class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n get fields() {\n return new ViewFields(this);\n }\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.View\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n view: this,\n };\n });\n }\n /**\n * Delete this view\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Returns the list view as HTML.\n *\n */\n renderAsHtml() {\n let q = new queryable_1.Queryable(this, \"renderashtml\");\n return q.get();\n }\n}\nexports.View = View;\nclass ViewFields extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"viewfields\") {\n super(baseUrl, path);\n }\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n getSchemaXml() {\n let q = new queryable_1.Queryable(this, \"schemaxml\");\n return q.get();\n }\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n add(fieldTitleOrInternalName) {\n let q = new ViewFields(this, `addviewfield('${fieldTitleOrInternalName}')`);\n return q.post();\n }\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n move(fieldInternalName, index) {\n let q = new ViewFields(this, \"moveviewfieldto\");\n let postBody = JSON.stringify({ \"field\": fieldInternalName, \"index\": index });\n return q.post({ body: postBody });\n }\n /**\n * Removes all the fields from the collection.\n */\n removeAll() {\n let q = new ViewFields(this, \"removeallviewfields\");\n return q.post();\n }\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n remove(fieldInternalName) {\n let q = new ViewFields(this, `removeviewfield('${fieldInternalName}')`);\n return q.post();\n }\n}\nexports.ViewFields = ViewFields;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/views.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\nconst Types = require(\"./types\");\n/**\n * Describes a collection of Field objects\n *\n */\nclass Fields extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"fields\") {\n super(baseUrl, path);\n }\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n getByTitle(title) {\n return new Field(this, `getByTitle('${title}')`);\n }\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n getByInternalNameOrTitle(name) {\n return new Field(this, `getByInternalNameOrTitle('${name}')`);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param title The Id of the list\n */\n getById(id) {\n let f = new Field(this);\n f.concat(`('${id}')`);\n return f;\n }\n /**\n * Creates a field based on the specified schema\n */\n createFieldAsXml(xml) {\n let info;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n }\n else {\n info = xml;\n }\n let postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": {\n \"type\": \"SP.XmlSchemaFieldCreationInformation\",\n },\n }, info),\n });\n let q = new Fields(this, \"createfieldasxml\");\n return q.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n /**\n * Adds a new list to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n add(title, fieldType, properties = {}) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"Title\": title,\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.postAs({ body: postBody }).then((data) => {\n return {\n data: data,\n field: this.getById(data.Id),\n };\n });\n }\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addText(title, maxLength = 255, properties) {\n let props = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addCalculated(title, formula, dateFormat, outputType = Types.FieldTypes.Text, properties) {\n let props = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addDateTime(title, displayFormat = Types.DateTimeFieldFormatType.DateOnly, calendarType = Types.CalendarType.Gregorian, friendlyDisplayFormat = 0, properties) {\n let props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addNumber(title, minValue, maxValue, properties) {\n let props = { FieldTypeKind: 9 };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n addCurrency(title, minValue, maxValue, currencyLocalId = 1033, properties) {\n let props = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n addMultilineText(title, numberOfLines = 6, richText = true, restrictedMode = false, appendOnly = false, allowHyperlink = true, properties) {\n let props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n }\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n addUrl(title, displayFormat = Types.UrlFieldFormatType.Hyperlink, properties) {\n let props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n }\n}\nexports.Fields = Fields;\n/**\n * Describes a single of Field instance\n *\n */\nclass Field extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Field class\n *\n * @param baseUrl The url or Queryable which forms the parent of this field instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n update(properties, fieldType = \"SP.Field\") {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n field: this,\n };\n });\n }\n /**\n * Delete this fields\n *\n */\n delete() {\n return this.post({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n }\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n setShowInDisplayForm(show) {\n let q = new Field(this, `setshowindisplayform(${show})`);\n return q.post();\n }\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n setShowInEditForm(show) {\n let q = new Field(this, `setshowineditform(${show})`);\n return q.post();\n }\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n setShowInNewForm(show) {\n let q = new Field(this, `setshowinnewform(${show})`);\n return q.post();\n }\n}\nexports.Field = Field;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/fields.js","// reference: https://msdn.microsoft.com/en-us/library/office/dn600183.aspx\n\"use strict\";\n/**\n * Determines the display mode of the given control or view\n */\nvar ControlMode;\n(function (ControlMode) {\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n/**\n * Specifies the type of the field.\n */\nvar FieldTypes;\n(function (FieldTypes) {\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\nvar DateTimeFieldFormatType;\n(function (DateTimeFieldFormatType) {\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n/**\n * Specifies the control settings while adding a field.\n */\nvar AddFieldOptions;\n(function (AddFieldOptions) {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n /**\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\n */\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\nvar CalendarType;\n(function (CalendarType) {\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\nvar UrlFieldFormatType;\n(function (UrlFieldFormatType) {\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\nvar PageType;\n(function (PageType) {\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n PageType[PageType[\"View\"] = 3] = \"View\";\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n})(PageType = exports.PageType || (exports.PageType = {}));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/types.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of Field objects\n *\n */\nclass Forms extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"forms\") {\n super(baseUrl, path);\n }\n /**\n * Gets a form by id\n *\n * @param id The guid id of the item to retrieve\n */\n getById(id) {\n let i = new Form(this);\n i.concat(`('${id}')`);\n return i;\n }\n}\nexports.Forms = Forms;\n/**\n * Describes a single of Form instance\n *\n */\nclass Form extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Form class\n *\n * @param baseUrl The url or Queryable which is the parent of this form instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n}\nexports.Form = Form;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/forms.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of webhook subscriptions\n *\n */\nclass Subscriptions extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Subscriptions class\n *\n * @param baseUrl - The url or Queryable which forms the parent of this webhook subscriptions collection\n */\n constructor(baseUrl, path = \"subscriptions\") {\n super(baseUrl, path);\n }\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n */\n getById(subscriptionId) {\n let subscription = new Subscription(this);\n subscription.concat(`('${subscriptionId}')`);\n return subscription;\n }\n /**\n * Create a new webhook subscription\n *\n */\n add(notificationUrl, expirationDate, clientState) {\n let postBody = JSON.stringify({\n \"clientState\": clientState || \"pnp-js-core-subscription\",\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n });\n return this.post({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(result => {\n return { data: result, subscription: this.getById(result.id) };\n });\n }\n}\nexports.Subscriptions = Subscriptions;\n/**\n * Describes a single webhook subscription instance\n *\n */\nclass Subscription extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Subscription class\n *\n * @param baseUrl - The url or Queryable which forms the parent of this webhook subscription instance\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Update a webhook subscription\n *\n */\n update(expirationDate) {\n let postBody = JSON.stringify({\n \"expirationDateTime\": expirationDate,\n });\n return this.patch({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(data => {\n return { data: data, subscription: this };\n });\n }\n /**\n * Remove a webhook subscription\n *\n */\n delete() {\n return super.delete();\n }\n}\nexports.Subscription = Subscription;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/subscriptions.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst util_1 = require(\"../utils/util\");\nclass UserCustomActions extends queryable_1.QueryableCollection {\n constructor(baseUrl, path = \"usercustomactions\") {\n super(baseUrl, path);\n }\n /**\n * Returns the custom action with the specified identifier.\n *\n * @param id The GUID ID of the user custom action to get.\n */\n getById(id) {\n let uca = new UserCustomAction(this);\n uca.concat(`('${id}')`);\n return uca;\n }\n /**\n * Create a custom action\n *\n * @param creationInfo The information which defines the new custom action\n *\n */\n add(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n return this.post({ body: postBody }).then((data) => {\n return {\n action: this.getById(data.Id),\n data: data,\n };\n });\n }\n /**\n * Deletes all custom actions in the collection.\n *\n */\n clear() {\n let a = new UserCustomActions(this, \"clear\");\n return a.post();\n }\n}\nexports.UserCustomActions = UserCustomActions;\nclass UserCustomAction extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.UserCustomAction\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n action: this,\n data: data,\n };\n });\n }\n /**\n * Remove a custom action\n *\n */\n delete() {\n return super.delete();\n }\n}\nexports.UserCustomAction = UserCustomAction;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/usercustomactions.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst queryable_1 = require(\"./queryable\");\n/**\n * Represents a collection of navigation nodes\n *\n */\nclass NavigationNodes extends queryable_1.QueryableCollection {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Gets a navigation node by id\n *\n * @param id The id of the node\n */\n getById(id) {\n let node = new NavigationNode(this);\n node.concat(`(${id})`);\n return node;\n }\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n add(title, url, visible = true) {\n let postBody = JSON.stringify({\n IsVisible: visible,\n Title: title,\n Url: url,\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n });\n let adder = new NavigationNodes(this);\n return adder.post({ body: postBody }).then((data) => {\n return {\n data: data,\n node: this.getById(data.Id),\n };\n });\n }\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n moveAfter(nodeId, previousNodeId) {\n let postBody = JSON.stringify({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n let mover = new NavigationNodes(this, \"MoveAfter\");\n return mover.post({ body: postBody });\n }\n}\nexports.NavigationNodes = NavigationNodes;\nclass NavigationNode extends queryable_1.QueryableInstance {\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Represents the child nodes of this node\n */\n get children() {\n return new NavigationNodes(this, \"Children\");\n }\n /**\n * Updates this node based on the supplied properties\n *\n * @param properties The hash of key/value pairs to update\n */\n update(properties) {\n let postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n return this.post({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then((data) => {\n return {\n data: data,\n node: this,\n };\n });\n }\n /**\n * Deletes this node and any child nodes\n */\n delete() {\n return super.delete();\n }\n}\nexports.NavigationNode = NavigationNode;\n/**\n * Exposes the navigation components\n *\n */\nclass Navigation extends queryable_1.Queryable {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"navigation\") {\n super(baseUrl, path);\n }\n /**\n * Gets the quicklaunch navigation for the current context\n *\n */\n get quicklaunch() {\n return new NavigationNodes(this, \"quicklaunch\");\n }\n /**\n * Gets the top bar navigation navigation for the current context\n *\n */\n get topNavigationBar() {\n return new NavigationNodes(this, \"topnavigationbar\");\n }\n}\nexports.Navigation = Navigation;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/navigation.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\n/**\n * Describes a collection of List objects\n *\n */\nclass Features extends queryable_1.QueryableCollection {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path = \"features\") {\n super(baseUrl, path);\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the feature (GUID)\n */\n getById(id) {\n let feature = new Feature(this);\n feature.concat(`('${id}')`);\n return feature;\n }\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n add(id, force = false) {\n let adder = new Features(this, \"add\");\n return adder.post({\n body: JSON.stringify({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(data => {\n return {\n data: data,\n feature: this.getById(id),\n };\n });\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n remove(id, force = false) {\n let remover = new Features(this, \"remove\");\n return remover.post({\n body: JSON.stringify({\n featureId: id,\n force: force,\n }),\n });\n }\n}\nexports.Features = Features;\nclass Feature extends queryable_1.QueryableInstance {\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n */\n constructor(baseUrl, path) {\n super(baseUrl, path);\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n deactivate(force = false) {\n let removeDependency = this.addBatchDependency();\n let idGet = new Feature(this).select(\"DefinitionId\");\n return idGet.getAs().then(feature => {\n let promise = this.getParent(Features, this.parentUrl, \"\").remove(feature.DefinitionId, force);\n removeDependency();\n return promise;\n });\n }\n}\nexports.Feature = Feature;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/features.js","\"use strict\";\nconst queryable_1 = require(\"./queryable\");\nconst FileUtil = require(\"../utils/files\");\nconst odata_1 = require(\"./odata\");\nclass UserProfileQuery extends queryable_1.QueryableInstance {\n constructor(baseUrl, path = \"_api/sp.userprofiles.peoplemanager\") {\n super(baseUrl, path);\n this.profileLoader = new ProfileLoader(baseUrl);\n }\n /**\n * The URL of the edit profile page for the current user.\n */\n get editProfileLink() {\n let q = new UserProfileQuery(this, \"EditProfileLink\");\n return q.getAs(odata_1.ODataValue());\n }\n /**\n * A Boolean value that indicates whether the current user's People I'm Following list is public.\n */\n get isMyPeopleListPublic() {\n let q = new UserProfileQuery(this, \"IsMyPeopleListPublic\");\n return q.getAs(odata_1.ODataValue());\n }\n /**\n * A Boolean value that indicates whether the current user's People I'm Following list is public.\n *\n * @param loginName The account name of the user\n */\n amIFollowedBy(loginName) {\n let q = new UserProfileQuery(this, \"amifollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Checks whether the current user is following the specified user.\n *\n * @param loginName The account name of the user\n */\n amIFollowing(loginName) {\n let q = new UserProfileQuery(this, \"amifollowing(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets tags that the user is following.\n *\n * @param maxCount The maximum number of tags to get.\n */\n getFollowedTags(maxCount = 20) {\n let q = new UserProfileQuery(this, \"getfollowedtags(\" + maxCount + \")\");\n return q.get();\n }\n /**\n * Gets the people who are following the specified user.\n *\n * @param loginName The account name of the user.\n */\n getFollowersFor(loginName) {\n let q = new UserProfileQuery(this, \"getfollowersfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets the people who are following the current user.\n *\n */\n get myFollowers() {\n return new queryable_1.QueryableCollection(this, \"getmyfollowers\");\n }\n /**\n * Gets user properties for the current user.\n *\n */\n get myProperties() {\n return new UserProfileQuery(this, \"getmyproperties\");\n }\n /**\n * Gets the people who the specified user is following.\n *\n * @param loginName The account name of the user.\n */\n getPeopleFollowedBy(loginName) {\n let q = new UserProfileQuery(this, \"getpeoplefollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n getPropertiesFor(loginName) {\n let q = new UserProfileQuery(this, \"getpropertiesfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Gets the most popular tags.\n *\n */\n get trendingTags() {\n let q = new UserProfileQuery(this, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n }\n /**\n * Gets the specified user profile property for the specified user.\n *\n * @param loginName The account name of the user.\n * @param propertyName The case-sensitive name of the property to get.\n */\n getUserProfilePropertyFor(loginName, propertyName) {\n let q = new UserProfileQuery(this, `getuserprofilepropertyfor(accountname=@v, propertyname='${propertyName}')`);\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n }\n /**\n * Removes the specified user from the user's list of suggested people to follow.\n *\n * @param loginName The account name of the user.\n */\n hideSuggestion(loginName) {\n let q = new UserProfileQuery(this, \"hidesuggestion(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.post();\n }\n /**\n * Checks whether the first user is following the second user.\n *\n * @param follower The account name of the user who might be following followee.\n * @param followee The account name of the user who might be followed.\n */\n isFollowing(follower, followee) {\n let q = new UserProfileQuery(this, null);\n q.concat(`.isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)`);\n q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n return q.get();\n }\n /**\n * Uploads and sets the user profile picture\n *\n * @param profilePicSource Blob data representing the user's picture\n */\n setMyProfilePic(profilePicSource) {\n return new Promise((resolve, reject) => {\n FileUtil.readBlobAsArrayBuffer(profilePicSource).then((buffer) => {\n let request = new UserProfileQuery(this, \"setmyprofilepicture\");\n request.post({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(_ => resolve());\n }).catch(e => reject(e));\n });\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n createPersonalSiteEnqueueBulk(...emails) {\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n }\n /**\n * Gets the user profile of the site owner.\n *\n */\n get ownerUserProfile() {\n return this.profileLoader.ownerUserProfile;\n }\n /**\n * Gets the user profile that corresponds to the current user.\n */\n get userProfile() {\n return this.profileLoader.userProfile;\n }\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n */\n createPersonalSite(interactiveRequest = false) {\n return this.profileLoader.createPersonalSite(interactiveRequest);\n }\n /**\n * Sets the privacy settings for this profile.\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n shareAllSocialData(share) {\n return this.profileLoader.shareAllSocialData(share);\n }\n}\nexports.UserProfileQuery = UserProfileQuery;\nclass ProfileLoader extends queryable_1.Queryable {\n constructor(baseUrl, path = \"_api/sp.userprofiles.profileloader.getprofileloader\") {\n super(baseUrl, path);\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n createPersonalSiteEnqueueBulk(emails) {\n let q = new ProfileLoader(this, \"createpersonalsiteenqueuebulk\");\n let postBody = JSON.stringify({ \"emailIDs\": emails });\n return q.post({\n body: postBody,\n });\n }\n /**\n * Gets the user profile of the site owner.\n *\n */\n get ownerUserProfile() {\n let q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n return q.postAs();\n }\n /**\n * Gets the user profile that corresponds to the current user.\n *\n */\n get userProfile() {\n let q = new ProfileLoader(this, \"getuserprofile\");\n return q.postAs();\n }\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false if non-interactively (client) initiated request\n */\n createPersonalSite(interactiveRequest = false) {\n let q = new ProfileLoader(this, `getuserprofile/createpersonalsiteenque(${interactiveRequest})\",`);\n return q.post();\n }\n /**\n * Sets the privacy settings for this profile.\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n shareAllSocialData(share) {\n let q = new ProfileLoader(this, `getuserprofile/shareallsocialdata(${share})\",`);\n return q.post();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/userprofiles.js","\"use strict\";\n/**\n * Reads a blob as text\n *\n * @param blob The data to read\n */\nfunction readBlobAsText(blob) {\n return readBlobAs(blob, \"string\");\n}\nexports.readBlobAsText = readBlobAsText;\n/**\n * Reads a blob into an array buffer\n *\n * @param blob The data to read\n */\nfunction readBlobAsArrayBuffer(blob) {\n return readBlobAs(blob, \"buffer\");\n}\nexports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n/**\n * Generic method to read blob's content\n *\n * @param blob The data to read\n * @param mode The read mode\n */\nfunction readBlobAs(blob, mode) {\n return new Promise((resolve, reject) => {\n try {\n let reader = new FileReader();\n reader.onload = (e) => {\n resolve(e.target.result);\n };\n switch (mode) {\n case \"string\":\n reader.readAsText(blob);\n break;\n case \"buffer\":\n reader.readAsArrayBuffer(blob);\n break;\n }\n }\n catch (e) {\n reject(e);\n }\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./lib/utils/files.js","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\n__export(require(\"../sharepoint/index\"));\nvar httpclient_1 = require(\"../net/httpclient\");\nexports.HttpClient = httpclient_1.HttpClient;\nvar sprequestexecutorclient_1 = require(\"../net/sprequestexecutorclient\");\nexports.SPRequestExecutorClient = sprequestexecutorclient_1.SPRequestExecutorClient;\nvar nodefetchclient_1 = require(\"../net/nodefetchclient\");\nexports.NodeFetchClient = nodefetchclient_1.NodeFetchClient;\nvar fetchclient_1 = require(\"../net/fetchclient\");\nexports.FetchClient = fetchclient_1.FetchClient;\n__export(require(\"../configuration/providers/index\"));\nvar collections_1 = require(\"../collections/collections\");\nexports.Dictionary = collections_1.Dictionary;\nvar util_1 = require(\"../utils/util\");\nexports.Util = util_1.Util;\n__export(require(\"../utils/logging\"));\n__export(require(\"../utils/exceptions\"));\n\n\n\n// WEBPACK FOOTER //\n// ./lib/types/index.js","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\n__export(require(\"./caching\"));\nvar files_1 = require(\"./files\");\nexports.CheckinType = files_1.CheckinType;\nexports.WebPartsPersonalizationScope = files_1.WebPartsPersonalizationScope;\nexports.MoveOperations = files_1.MoveOperations;\nexports.TemplateFileType = files_1.TemplateFileType;\nvar items_1 = require(\"./items\");\nexports.Item = items_1.Item;\nexports.PagedItemCollection = items_1.PagedItemCollection;\nvar navigation_1 = require(\"./navigation\");\nexports.NavigationNodes = navigation_1.NavigationNodes;\nexports.NavigationNode = navigation_1.NavigationNode;\nvar lists_1 = require(\"./lists\");\nexports.List = lists_1.List;\nvar odata_1 = require(\"./odata\");\nexports.extractOdataId = odata_1.extractOdataId;\nexports.ODataParserBase = odata_1.ODataParserBase;\nexports.ODataDefaultParser = odata_1.ODataDefaultParser;\nexports.ODataRaw = odata_1.ODataRaw;\nexports.ODataValue = odata_1.ODataValue;\nexports.ODataEntity = odata_1.ODataEntity;\nexports.ODataEntityArray = odata_1.ODataEntityArray;\nexports.TextFileParser = odata_1.TextFileParser;\nexports.BlobFileParser = odata_1.BlobFileParser;\nexports.BufferFileParser = odata_1.BufferFileParser;\nexports.JSONFileParser = odata_1.JSONFileParser;\nvar roles_1 = require(\"./roles\");\nexports.RoleDefinitionBindings = roles_1.RoleDefinitionBindings;\nvar search_1 = require(\"./search\");\nexports.Search = search_1.Search;\nexports.SearchResult = search_1.SearchResult;\nexports.SearchResults = search_1.SearchResults;\nexports.SortDirection = search_1.SortDirection;\nexports.ReorderingRuleMatchType = search_1.ReorderingRuleMatchType;\nexports.QueryPropertyValueType = search_1.QueryPropertyValueType;\nvar searchsuggest_1 = require(\"./searchsuggest\");\nexports.SearchSuggest = searchsuggest_1.SearchSuggest;\nexports.SearchSuggestResult = searchsuggest_1.SearchSuggestResult;\nvar site_1 = require(\"./site\");\nexports.Site = site_1.Site;\n__export(require(\"./types\"));\nvar webs_1 = require(\"./webs\");\nexports.Web = webs_1.Web;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/sharepoint/index.js","\"use strict\";\nconst util_1 = require(\"../utils/util\");\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Makes requests using the SP.RequestExecutor library.\n */\nclass SPRequestExecutorClient {\n constructor() {\n /**\n * Converts a SharePoint REST API response to a fetch API response.\n */\n this.convertToResponse = (spResponse) => {\n let responseHeaders = new Headers();\n for (let h in spResponse.headers) {\n if (spResponse.headers[h]) {\n responseHeaders.append(h, spResponse.headers[h]);\n }\n }\n // issue #256, Cannot have an empty string body when creating a Response with status 204\n let body = spResponse.statusCode === 204 ? null : spResponse.body;\n return new Response(body, {\n headers: responseHeaders,\n status: spResponse.statusCode,\n statusText: spResponse.statusText,\n });\n };\n }\n /**\n * Fetches a URL using the SP.RequestExecutor library.\n */\n fetch(url, options) {\n if (typeof SP === \"undefined\" || typeof SP.RequestExecutor === \"undefined\") {\n throw new exceptions_1.SPRequestExecutorUndefinedException();\n }\n let addinWebUrl = url.substring(0, url.indexOf(\"/_api\")), executor = new SP.RequestExecutor(addinWebUrl), headers = {}, iterator, temp;\n if (options.headers && options.headers instanceof Headers) {\n iterator = options.headers.entries();\n temp = iterator.next();\n while (!temp.done) {\n headers[temp.value[0]] = temp.value[1];\n temp = iterator.next();\n }\n }\n else {\n headers = options.headers;\n }\n return new Promise((resolve, reject) => {\n let requestOptions = {\n error: (error) => {\n reject(this.convertToResponse(error));\n },\n headers: headers,\n method: options.method,\n success: (response) => {\n resolve(this.convertToResponse(response));\n },\n url: url,\n };\n if (options.body) {\n requestOptions = util_1.Util.extend(requestOptions, { body: options.body });\n }\n else {\n requestOptions = util_1.Util.extend(requestOptions, { binaryStringRequestBody: true });\n }\n executor.executeAsync(requestOptions);\n });\n }\n}\nexports.SPRequestExecutorClient = SPRequestExecutorClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/sprequestexecutorclient.js","\"use strict\";\nconst exceptions_1 = require(\"../utils/exceptions\");\n/**\n * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by\n * not including all of the node dependencies\n */\nclass NodeFetchClient {\n /**\n * Always throws an error that NodeFetchClient is not supported for use in the browser\n */\n fetch() {\n throw new exceptions_1.NodeFetchClientUnsupportedException();\n }\n}\nexports.NodeFetchClient = NodeFetchClient;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/net/nodefetchclientbrowser.js","\"use strict\";\nvar cachingConfigurationProvider_1 = require(\"./cachingConfigurationProvider\");\nexports.CachingConfigurationProvider = cachingConfigurationProvider_1.default;\nvar spListConfigurationProvider_1 = require(\"./spListConfigurationProvider\");\nexports.SPListConfigurationProvider = spListConfigurationProvider_1.default;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/index.js","\"use strict\";\nconst storage = require(\"../../utils/storage\");\nconst exceptions_1 = require(\"../../utils/exceptions\");\n/**\n * A caching provider which can wrap other non-caching providers\n *\n */\nclass CachingConfigurationProvider {\n /**\n * Creates a new caching configuration provider\n * @constructor\n * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration\n * @param {string} cacheKey Key that will be used to store cached items to the cache\n * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings.\n */\n constructor(wrappedProvider, cacheKey, cacheStore) {\n this.wrappedProvider = wrappedProvider;\n this.store = (cacheStore) ? cacheStore : this.selectPnPCache();\n this.cacheKey = `_configcache_${cacheKey}`;\n }\n /**\n * Gets the wrapped configuration providers\n *\n * @return {IConfigurationProvider} Wrapped configuration provider\n */\n getWrappedProvider() {\n return this.wrappedProvider;\n }\n /**\n * Loads the configuration values either from the cache or from the wrapped provider\n *\n * @return {Promise>} Promise of loaded configuration values\n */\n getConfiguration() {\n // Cache not available, pass control to the wrapped provider\n if ((!this.store) || (!this.store.enabled)) {\n return this.wrappedProvider.getConfiguration();\n }\n // Value is found in cache, return it directly\n let cachedConfig = this.store.get(this.cacheKey);\n if (cachedConfig) {\n return new Promise((resolve) => {\n resolve(cachedConfig);\n });\n }\n // Get and cache value from the wrapped provider\n let providerPromise = this.wrappedProvider.getConfiguration();\n providerPromise.then((providedConfig) => {\n this.store.put(this.cacheKey, providedConfig);\n });\n return providerPromise;\n }\n selectPnPCache() {\n let pnpCache = new storage.PnPClientStorage();\n if ((pnpCache.local) && (pnpCache.local.enabled)) {\n return pnpCache.local;\n }\n if ((pnpCache.session) && (pnpCache.session.enabled)) {\n return pnpCache.session;\n }\n throw new exceptions_1.NoCacheAvailableException();\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = CachingConfigurationProvider;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/cachingConfigurationProvider.js","\"use strict\";\nconst cachingConfigurationProvider_1 = require(\"./cachingConfigurationProvider\");\n/**\n * A configuration provider which loads configuration values from a SharePoint list\n *\n */\nclass SPListConfigurationProvider {\n /**\n * Creates a new SharePoint list based configuration provider\n * @constructor\n * @param {string} webUrl Url of the SharePoint site, where the configuration list is located\n * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = \"config\")\n */\n constructor(sourceWeb, sourceListTitle = \"config\") {\n this.sourceWeb = sourceWeb;\n this.sourceListTitle = sourceListTitle;\n }\n /**\n * Gets the url of the SharePoint site, where the configuration list is located\n *\n * @return {string} Url address of the site\n */\n get web() {\n return this.sourceWeb;\n }\n /**\n * Gets the title of the SharePoint list, which contains the configuration settings\n *\n * @return {string} List title\n */\n get listTitle() {\n return this.sourceListTitle;\n }\n /**\n * Loads the configuration values from the SharePoint list\n *\n * @return {Promise>} Promise of loaded configuration values\n */\n getConfiguration() {\n return this.web.lists.getByTitle(this.listTitle).items.select(\"Title\", \"Value\")\n .getAs().then((data) => {\n return data.reduce((configuration, item) => {\n return Object.defineProperty(configuration, item.Title, {\n configurable: false,\n enumerable: false,\n value: item.Value,\n writable: false,\n });\n }, {});\n });\n }\n /**\n * Wraps the current provider in a cache enabled provider\n *\n * @return {CachingConfigurationProvider} Caching providers which wraps the current provider\n */\n asCaching() {\n let cacheKey = `splist_${this.web.toUrl()}+${this.listTitle}`;\n return new cachingConfigurationProvider_1.default(this, cacheKey);\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = SPListConfigurationProvider;\n\n\n\n// WEBPACK FOOTER //\n// ./lib/configuration/providers/spListConfigurationProvider.js"],"sourceRoot":""} \ No newline at end of file