{"version":3,"file":"graph.js","sources":["../../../../packages/graph/src/config/graphlibconfig.ts","../../../../packages/graph/src/net/graphhttpclient.ts","../../../../packages/graph/src/types.ts","../../../../packages/graph/src/graphqueryable.ts","../../../../packages/graph/src/members.ts","../../../../packages/graph/src/calendars.ts","../../../../packages/graph/src/attachments.ts","../../../../packages/graph/src/conversations.ts","../../../../packages/graph/src/plans.ts","../../../../packages/graph/src/photos.ts","../../../../packages/graph/src/teams.ts","../../../../packages/graph/src/groups.ts","../../../../packages/graph/src/onenote.ts","../../../../packages/graph/src/me.ts","../../../../packages/graph/src/users.ts","../../../../packages/graph/src/rest.ts","../../../../packages/graph/src/batch.ts"],"sourcesContent":["import { LibraryConfiguration, TypedHash, RuntimeConfig, HttpClientImpl, AdalClient } from \"@pnp/common\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\n\nexport interface GraphConfigurationPart {\n graph?: {\n /**\n * Any headers to apply to all requests\n */\n headers?: TypedHash;\n\n /**\n * Defines a factory method used to create fetch clients\n */\n fetchClientFactory?: () => HttpClientImpl;\n };\n}\n\nexport interface GraphConfiguration extends LibraryConfiguration, GraphConfigurationPart { }\n\nexport function setup(config: GraphConfiguration): void {\n RuntimeConfig.extend(config);\n}\n\nexport class NoGraphClientAvailableException extends Error {\n\n constructor(msg = \"There is no Graph Client available, either set one using configuraiton or provide a valid SPFx Context using setup.\") {\n super(msg);\n this.name = \"NoGraphClientAvailableException\";\n Logger.log({ data: null, level: LogLevel.Error, message: this.message });\n }\n}\n\nexport class GraphRuntimeConfigImpl {\n\n public get headers(): TypedHash {\n\n const graphPart = RuntimeConfig.get(\"graph\");\n if (graphPart !== null && typeof graphPart !== \"undefined\" && typeof graphPart.headers !== \"undefined\") {\n return graphPart.headers;\n }\n\n return {};\n }\n\n public get fetchClientFactory(): () => HttpClientImpl {\n\n const graphPart = RuntimeConfig.get(\"graph\");\n // use a configured factory firt\n if (graphPart !== null && typeof graphPart.fetchClientFactory !== \"undefined\") {\n return graphPart.fetchClientFactory;\n }\n\n // then try and use spfx context if available\n if (typeof RuntimeConfig.spfxContext !== \"undefined\") {\n return () => AdalClient.fromSPFxContext(RuntimeConfig.spfxContext);\n }\n\n throw new NoGraphClientAvailableException();\n }\n}\n\nexport let GraphRuntimeConfig = new GraphRuntimeConfigImpl();\n","import {\n extend,\n RequestClient,\n mergeHeaders,\n FetchOptions,\n HttpClientImpl,\n getCtxCallback,\n} from \"@pnp/common\";\nimport { GraphRuntimeConfig } from \"../config/graphlibconfig\";\n\nexport class GraphHttpClient implements RequestClient {\n\n private _impl: HttpClientImpl;\n\n constructor() {\n\n this._impl = GraphRuntimeConfig.fetchClientFactory();\n }\n\n public fetch(url: string, options: FetchOptions = {}): Promise {\n\n const headers = new Headers();\n\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n mergeHeaders(headers, GraphRuntimeConfig.headers);\n\n // second we add the local options so we can overwrite the globals\n mergeHeaders(headers, options.headers);\n\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json\");\n }\n\n const opts = extend(options, { headers: headers });\n\n return this.fetchRaw(url, opts);\n }\n\n public fetchRaw(url: string, options: FetchOptions = {}): Promise {\n\n // here we need to normalize the headers\n const rawHeaders = new Headers();\n mergeHeaders(rawHeaders, options.headers);\n options = extend(options, { headers: rawHeaders });\n\n const retry = (ctx: RetryContext): void => {\n\n this._impl.fetch(url, options).then((response) => ctx.resolve(response)).catch((response) => {\n\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n\n // grab our current delay\n const delay = ctx.delay;\n\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(getCtxCallback(this, retry, ctx), delay);\n });\n };\n\n return new Promise((resolve, reject) => {\n\n const retryContext: RetryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n\n retry.call(this, retryContext);\n });\n }\n\n public get(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n }\n\n public post(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n }\n\n public patch(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n }\n\n public delete(url: string, options: FetchOptions = {}): Promise {\n const opts = extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n }\n}\n\ninterface RetryContext {\n attempts: number;\n delay: number;\n reject: (reason?: any) => void;\n resolve: (value?: Response | PromiseLike) => void;\n retryCount: number;\n}\n","export class GraphEndpoints {\n\n public static Beta = \"beta\";\n public static V1 = \"v1.0\";\n\n /**\n * \n * @param url The url to set the endpoint \n */\n public static ensure(url: string, endpoint: string): string {\n const all = [GraphEndpoints.Beta, GraphEndpoints.V1];\n let regex = new RegExp(endpoint, \"i\");\n const replaces = all.filter(s => !regex.test(s)).map(s => s.replace(\".\", \"\\\\.\"));\n regex = new RegExp(`/?(${replaces.join(\"|\")})/`, \"ig\");\n return url.replace(regex, `/${endpoint}/`);\n }\n}\n\n/**\n * Defines the properties for a Team\n * \n * TODO:: remove this once typings are present in graph types package\n */\nexport interface TeamProperties {\n\n memberSettings?: {\n \"allowCreateUpdateChannels\"?: boolean;\n \"allowDeleteChannels\"?: boolean;\n \"allowAddRemoveApps\"?: boolean;\n \"allowCreateUpdateRemoveTabs\"?: boolean;\n \"allowCreateUpdateRemoveConnectors\"?: boolean;\n };\n\n guestSettings?: {\n \"allowCreateUpdateChannels\"?: boolean;\n \"allowDeleteChannels\"?: boolean;\n };\n\n messagingSettings?: {\n \"allowUserEditMessages\"?: boolean;\n \"allowUserDeleteMessages\"?: boolean;\n \"allowOwnerDeleteMessages\"?: boolean;\n \"allowTeamMentions\"?: boolean;\n \"allowChannelMentions\"?: boolean;\n };\n\n funSettings?: {\n \"allowGiphy\"?: boolean;\n \"giphyContentRating\"?: \"strict\" | string,\n \"allowStickersAndMemes\"?: boolean;\n \"allowCustomMemes\"?: boolean;\n };\n}\n","import {\n combinePaths,\n extend,\n isUrlAbsolute,\n FetchOptions,\n getGUID,\n} from \"@pnp/common\";\nimport {\n ODataParser,\n ODataQueryable,\n RequestContext,\n} from \"@pnp/odata\";\nimport { GraphHttpClient } from \"./net/graphhttpclient\";\nimport { GraphBatch } from \"./batch\";\nimport { GraphEndpoints } from \"./types\";\n\n\nexport interface GraphQueryableConstructor {\n new(baseUrl: string | GraphQueryable, path?: string): T;\n}\n\n/**\n * Queryable Base Class\n *\n */\nexport class GraphQueryable extends ODataQueryable {\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: string | GraphQueryable, path?: string) {\n super();\n\n if (typeof baseUrl === \"string\") {\n\n const urlStr = baseUrl as string;\n this._parentUrl = urlStr;\n this._url = combinePaths(urlStr, path);\n } else {\n this.extend(baseUrl as GraphQueryable, path);\n }\n }\n\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new queryable\n */\n public as(factory: GraphQueryableConstructor): T {\n const o = new factory(this._url, null);\n return extend(o, this, true);\n }\n\n /**\n * Gets the full url with query information\n *\n */\n public toUrlAndQuery(): string {\n\n let url = this.toUrl();\n\n if (!isUrlAbsolute(url)) {\n url = combinePaths(\"https://graph.microsoft.com\", url);\n }\n\n return url + `?${this._query.getKeys().map(key => `${key}=${this._query.get(key)}`).join(\"&\")}`;\n }\n\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n protected getParent(\n factory: GraphQueryableConstructor,\n baseUrl: string | GraphQueryable = this.parentUrl,\n path?: string): T {\n\n return new factory(baseUrl, path);\n }\n\n /**\n * Clones this queryable into a new queryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n protected clone(factory: GraphQueryableConstructor, additionalPath?: string, includeBatch = true): T {\n\n let clone = new factory(this, additionalPath);\n clone.configure(this._options);\n\n // TODO:: include batching info in clone\n if (includeBatch) {\n clone = clone.inBatch(this._batch);\n }\n\n return clone;\n }\n\n protected setEndpoint(endpoint: string): this {\n\n this._url = GraphEndpoints.ensure(this._url, endpoint);\n return this;\n }\n\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n protected toRequestContext(\n verb: string,\n options: FetchOptions = {},\n parser: ODataParser,\n pipeline: Array<(c: RequestContext) => Promise>>): Promise> {\n\n // TODO:: add batch support\n return Promise.resolve({\n batch: this.batch,\n batchDependency: () => void (0),\n cachingOptions: this._cachingOptions,\n clientFactory: () => new GraphHttpClient(),\n isBatched: this.hasBatch,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: this.toUrlAndQuery(),\n requestId: getGUID(),\n verb: verb,\n });\n }\n}\n\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nexport class GraphQueryableCollection extends GraphQueryable {\n\n /**\n *\n * @param filter The string representing the filter query\n */\n public filter(filter: string): this {\n this._query.add(\"$filter\", filter);\n return this;\n }\n\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n public select(...selects: string[]): this {\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n }\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 public expand(...expands: string[]): this {\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n }\n\n /**\n * Orders based on the supplied fields\n *\n * @param orderby The name of the field on which to sort\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n public orderBy(orderBy: string, ascending = true): this {\n const query = this._query.getKeys().filter(k => k === \"$orderby\").map(k => this._query.get(k));\n query.push(`${orderBy} ${ascending ? \"asc\" : \"desc\"}`);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n }\n\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n public top(top: number): this {\n this._query.add(\"$top\", top.toString());\n return this;\n }\n\n /**\n * Skips a set number of items in the return set\n *\n * @param num Number of items to skip\n */\n public skip(num: number): this {\n this._query.add(\"$top\", num.toString());\n return this;\n }\n\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n public skipToken(token: string): this {\n this._query.add(\"$skiptoken\", token);\n return this;\n }\n\n /**\n * \tRetrieves the total count of matching resources\n */\n public get count(): this {\n this._query.add(\"$count\", \"true\");\n return this;\n }\n}\n\nexport class GraphQueryableSearchableCollection extends GraphQueryableCollection {\n\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n public search(query: string): this {\n this._query.add(\"$search\", query);\n return this;\n }\n}\n\n/**\n * Represents an instance that can be selected\n *\n */\nexport class GraphQueryableInstance extends GraphQueryable {\n\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n public select(...selects: string[]): this {\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n }\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 public expand(...expands: string[]): this {\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n }\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\n\nexport class Members extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"members\") {\n super(baseUrl, path);\n }\n\n /**\n * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through\n * the members navigation property. You can add users or other groups.\n * Important: You can add only users to Office 365 groups.\n * \n * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id})\n */\n public add(id: string): Promise {\n\n return this.clone(Members, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n }\n\n /**\n * Gets a member of the group by id\n * \n * @param id Group member's id\n */\n public getById(id: string): Member {\n return new Member(this, id);\n }\n}\n\nexport class Member extends GraphQueryableInstance {\n\n}\n\nexport class Owners extends Members {\n constructor(baseUrl: string | GraphQueryable, path = \"owners\") {\n super(baseUrl, path);\n }\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\nimport { TypedHash } from \"@pnp/common\";\nimport { Event as IEvent } from \"@microsoft/microsoft-graph-types\";\n// import { Attachments } from \"./attachments\";\n\nexport class Calendars extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"calendars\") {\n super(baseUrl, path);\n }\n}\n\nexport class Calendar extends GraphQueryableInstance {\n\n public get events(): Events {\n return new Events(this);\n }\n}\n\nexport class Events extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"events\") {\n super(baseUrl, path);\n }\n\n public getById(id: string): Event {\n return new Event(this, id);\n }\n\n /**\n * Adds a new event to the collection\n * \n * @param properties The set of properties used to create the event\n */\n public add(properties: Event): Promise {\n\n return this.postCore({\n body: JSON.stringify(properties),\n }).then(r => {\n return {\n data: r,\n event: this.getById(r.id),\n };\n });\n }\n}\n\nexport interface EventAddResult {\n data: IEvent;\n event: Event;\n}\n\nexport class Event extends GraphQueryableInstance {\n\n // TODO:: when supported\n // /**\n // * Gets the collection of attachments for this event\n // */\n // public get attachments(): Attachments {\n // return new Attachments(this);\n // }\n\n /**\n * Update the properties of an event object\n * \n * @param properties Set of properties of this event to update\n */\n public update(properties: TypedHash): Promise {\n\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n }\n\n /**\n * Deletes this event\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n}\n\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\nimport { Attachment as IAttachment } from \"@microsoft/microsoft-graph-types\";\n\nexport class Attachments extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"attachments\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a member of the group by id\n * \n * @param id Attachment id\n */\n public getById(id: string): Attachment {\n return new Attachment(this, id);\n }\n\n /**\n * Add attachment to this collection\n * \n * @param name Name given to the attachment file\n * @param bytes File content\n */\n public addFile(name: string, bytes: string | Blob): Promise {\n\n return this.postCore({\n body: JSON.stringify({\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\n contentBytes: bytes,\n name: name,\n }),\n });\n }\n}\n\nexport class Attachment extends GraphQueryableInstance {\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\nimport { TypedHash } from \"@pnp/common\";\nimport { Attachments } from \"./attachments\";\n\nimport { ConversationThread as IConversationThread, Post as IPost, Recipient as IRecipient } from \"@microsoft/microsoft-graph-types\";\n\n/**\n * Information used to forward a post\n */\nexport interface PostForwardInfo {\n comment?: string;\n toRecipients: IRecipient[];\n}\n\nexport class Conversations extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"conversations\") {\n super(baseUrl, path);\n }\n\n /**\n * Create a new conversation by including a thread and a post.\n * \n * @param properties Properties used to create the new conversation\n */\n public add(properties: TypedHash): Promise {\n\n return this.postCore({\n body: JSON.stringify(properties),\n });\n }\n\n /**\n * Gets a conversation from this collection by id\n * \n * @param id Group member's id\n */\n public getById(id: string): Conversation {\n return new Conversation(this, id);\n }\n}\n\nexport class Threads extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"threads\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a thread from this collection by id\n * \n * @param id Group member's id\n */\n public getById(id: string): Thread {\n return new Thread(this, id);\n }\n\n /**\n * Adds a new thread to this collection\n * \n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n public add(properties: IConversationThread): Promise<{ id: string }> {\n\n return this.postCore({\n body: JSON.stringify(properties),\n });\n }\n}\n\nexport class Posts extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"posts\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a thread from this collection by id\n * \n * @param id Group member's id\n */\n public getById(id: string): Post {\n return new Post(this, id);\n }\n\n /**\n * Adds a new thread to this collection\n * \n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n public add(properties: IPost): Promise<{ id: string }> {\n\n return this.postCore({\n body: JSON.stringify(properties),\n });\n }\n}\n\nexport class Conversation extends GraphQueryableInstance {\n\n /**\n * Get all the threads in a group conversation.\n */\n public get threads(): Threads {\n return new Threads(this);\n }\n\n /**\n * Updates this conversation\n */\n public update(properties: TypedHash): Promise {\n\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n }\n\n /**\n * Deletes this member from the group\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n}\n\nexport class Thread extends GraphQueryableInstance {\n\n /**\n * Get all the threads in a group conversation.\n */\n public get posts(): Posts {\n return new Posts(this);\n }\n\n /**\n * Reply to a thread in a group conversation and add a new post to it\n * \n * @param post Contents of the post \n */\n public reply(post: IPost): Promise {\n\n return this.clone(Thread, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n }\n\n /**\n * Deletes this member from the group\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n}\n\nexport class Post extends GraphQueryableInstance {\n\n public get attachments(): Attachments {\n return new Attachments(this);\n }\n\n /**\n * Deletes this post\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n\n /**\n * Forward a post to a recipient\n */\n public forward(info: PostForwardInfo): Promise {\n return this.clone(Post, \"forward\").postCore({\n body: JSON.stringify(info),\n });\n }\n\n /**\n * Reply to a thread in a group conversation and add a new post to it\n * \n * @param post Contents of the post \n */\n public reply(post: IPost): Promise {\n\n return this.clone(Post, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n }\n}\n\nexport class Senders extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path?: string) {\n super(baseUrl, path);\n }\n\n /**\n * Add a new user or group to this senders collection\n * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n public add(id: string): Promise {\n\n return this.clone(Senders, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n }\n\n /**\n * Removes the entity from the collection\n * \n * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n public remove(id: string): Promise {\n\n const remover = this.clone(Senders, \"$ref\");\n remover.query.add(\"$id\", id);\n return remover.deleteCore();\n }\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\n\nexport class Plans extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"planner/plans\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a plan from this collection by id\n * \n * @param id Plan's id\n */\n public getById(id: string): Plan {\n return new Plan(this, id);\n }\n}\n\nexport class Plan extends GraphQueryableInstance {\n\n\n}\n","import { GraphQueryable, GraphQueryableInstance } from \"./graphqueryable\";\nimport { BlobParser, BufferParser } from \"@pnp/odata\";\n\nexport class Photo extends GraphQueryableInstance {\n\n constructor(baseUrl: string | GraphQueryable, path = \"photo\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets the image bytes as a blob (browser)\n */\n public getBlob(): Promise {\n return this.clone(Photo, \"$value\", false).get(new BlobParser());\n }\n\n /**\n * Gets the image file byets as a Buffer (node.js)\n */\n public getBuffer(): Promise {\n return this.clone(Photo, \"$value\", false).get(new BufferParser());\n }\n\n /**\n * Sets the file bytes\n * \n * @param content Image file contents, max 4 MB\n */\n public setContent(content: ArrayBuffer | Blob): Promise {\n\n return this.clone(Photo, \"$value\", false).patchCore({\n body: content,\n });\n }\n}\n","import {\n graph,\n} from \"./rest\";\n\nimport {\n Group,\n GroupType,\n GroupAddResult,\n} from \"./groups\";\n\nimport {\n GraphQueryable,\n GraphQueryableInstance,\n} from \"./graphqueryable\";\n\nimport {\n GraphEndpoints,\n TeamProperties,\n} from \"./types\";\n\nimport {\n ODataParser,\n ODataDefaultParser,\n} from \"@pnp/odata\";\n\nimport {\n FetchOptions,\n} from \"@pnp/common\";\n\nexport class Teams {\n\n /**\n * Creates a new team and associated Group with the given information\n */\n public create(name: string, description = \"\", teamProperties: TeamProperties = {}): Promise {\n\n const groupProps = description && description.length > 0 ? { description: description } : {};\n\n return graph.groups.add(name, name, GroupType.Office365, groupProps).then((gar: GroupAddResult) => {\n return gar.group.createTeam(teamProperties).then(data => {\n return {\n data: data,\n group: gar.group,\n team: new Team(gar.group),\n };\n });\n });\n }\n}\n\n/**\n * Represents a Microsoft Team\n */\nexport class Team extends GraphQueryableInstance {\n\n constructor(baseUrl: string | GraphQueryable, path = \"team\") {\n super(baseUrl, path);\n }\n\n /**\n * Updates this team instance's properties\n * \n * @param properties The set of properties to update\n */\n // TODO:: update properties to be typed once type is available in graph-types\n public update(properties: TeamProperties): Promise {\n\n return this.clone(Team, \"\").setEndpoint(GraphEndpoints.Beta).patchCore({\n body: JSON.stringify(properties),\n }).then(data => {\n return {\n data: data,\n team: this,\n };\n });\n }\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 public get(parser: ODataParser = new ODataDefaultParser(), options: FetchOptions = {}): Promise {\n return this.clone(Team, \"\").setEndpoint(GraphEndpoints.Beta).getCore(parser, options);\n }\n}\n\nexport interface TeamUpdateResult {\n data: any;\n team: Team;\n}\n\nexport interface TeamCreateResult {\n data: any;\n group: Group;\n team: Team;\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\nimport { Members, Owners } from \"./members\";\nimport { extend, TypedHash } from \"@pnp/common\";\nimport { Calendar, Events } from \"./calendars\";\nimport { Conversations, Senders } from \"./conversations\";\nimport { Event as IEvent } from \"@microsoft/microsoft-graph-types\";\nimport { Plans } from \"./plans\";\nimport { Photo } from \"./photos\";\nimport { Team } from \"./teams\";\nimport { GraphEndpoints, TeamProperties } from \"./types\";\n\nexport enum GroupType {\n /**\n * Office 365 (aka unified group)\n */\n Office365,\n /**\n * Dynamic membership\n */\n Dynamic,\n /**\n * Security\n */\n Security,\n}\n\n/**\n * Describes a collection of Field objects\n *\n */\nexport class Groups extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"groups\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a group from the collection using the specified id\n * \n * @param id Id of the group to get from this collection\n */\n public getById(id: string): Group {\n return new Group(this, id);\n }\n\n /**\n * Create a new group as specified in the request body.\n * \n * @param name Name to display in the address book for the group\n * @param mailNickname Mail alias for the group\n * @param groupType Type of group being created\n * @param additionalProperties A plain object collection of additional properties you want to set on the new group\n */\n public add(name: string, mailNickname: string, groupType: GroupType, additionalProperties: TypedHash = {}): Promise {\n\n let postBody = extend({\n displayName: name,\n mailEnabled: groupType === GroupType.Office365,\n mailNickname: mailNickname,\n securityEnabled: groupType !== GroupType.Office365,\n }, additionalProperties);\n\n // include a group type if required\n if (groupType !== GroupType.Security) {\n\n postBody = extend(postBody, {\n groupTypes: groupType === GroupType.Office365 ? [\"Unified\"] : [\"DynamicMembership\"],\n });\n }\n\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(r => {\n return {\n data: r,\n group: this.getById(r.id),\n };\n });\n }\n}\n\n/**\n * Represents a group entity\n */\nexport class Group extends GraphQueryableInstance {\n\n /**\n * The calendar associated with this group\n */\n public get calendar(): Calendar {\n return new Calendar(this, \"calendar\");\n }\n\n /**\n * Retrieve a list of event objects\n */\n public get events(): Events {\n return new Events(this);\n }\n\n /**\n * Gets the collection of owners for this group\n */\n public get owners(): Owners {\n return new Owners(this);\n }\n\n /**\n * The collection of plans for this group\n */\n public get plans(): Plans {\n return new Plans(this);\n }\n\n /**\n * Gets the collection of members for this group\n */\n public get members(): Members {\n return new Members(this);\n }\n\n /**\n * Gets the conversations collection for this group\n */\n public get conversations(): Conversations {\n return new Conversations(this);\n }\n\n /**\n * Gets the collection of accepted senders for this group\n */\n public get acceptedSenders(): Senders {\n return new Senders(this, \"acceptedsenders\");\n }\n\n /**\n * Gets the collection of rejected senders for this group\n */\n public get rejectedSenders(): Senders {\n return new Senders(this, \"rejectedsenders\");\n }\n\n /**\n * The photo associated with the group\n */\n public get photo(): Photo {\n return new Photo(this);\n }\n\n /**\n * Gets the team associated with this group, if it exists\n */\n public get team(): Team {\n return new Team(this);\n }\n\n /**\n * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n public addFavorite(): Promise {\n return this.clone(Group, \"addFavorite\").postCore();\n }\n\n /**\n * Creates a Microsoft Team associated with this group\n * \n * @param properties Initial properties for the new Team\n */\n public createTeam(properties: TeamProperties): Promise {\n\n return this.clone(Group, \"team\").setEndpoint(GraphEndpoints.Beta).putCore({\n body: JSON.stringify(properties),\n });\n }\n\n /**\n * Return all the groups that the specified group is a member of. The check is transitive\n * \n * @param securityEnabledOnly \n */\n public getMemberGroups(securityEnabledOnly = false): Promise<{ value: string[] }> {\n\n return this.clone(Group, \"getMemberGroups\").postCore({\n body: JSON.stringify({\n securityEnabledOnly: securityEnabledOnly,\n }),\n });\n }\n\n /**\n * Deletes this group\n */\n public delete(): Promise {\n return this.deleteCore();\n }\n\n /**\n * Update the properties of a group object\n * \n * @param properties Set of properties of this group to update\n */\n public update(properties: TypedHash): Promise {\n\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n }\n\n /**\n * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n public removeFavorite(): Promise {\n\n return this.clone(Group, \"removeFavorite\").postCore();\n }\n\n /**\n * Reset the unseenCount of all the posts that the current user has not seen since their last visit\n */\n public resetUnseenCount(): Promise {\n return this.clone(Group, \"resetUnseenCount\").postCore();\n }\n\n /**\n * Calling this method will enable the current user to receive email notifications for this group,\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n public subscribeByMail(): Promise {\n return this.clone(Group, \"subscribeByMail\").postCore();\n }\n\n /**\n * Calling this method will prevent the current user from receiving email notifications for this group\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n public unsubscribeByMail(): Promise {\n return this.clone(Group, \"unsubscribeByMail\").postCore();\n }\n\n /**\n * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group\n * \n * @param start Start date and time of the time range\n * @param end End date and time of the time range\n */\n public getCalendarView(start: Date, end: Date): Promise {\n\n const view = this.clone(Group, \"calendarView\");\n view.query.add(\"startDateTime\", start.toISOString());\n view.query.add(\"endDateTime\", end.toISOString());\n return view.get();\n }\n}\n\nexport interface GroupAddResult {\n group: Group;\n data: any;\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\n\nexport interface OneNoteMethods {\n notebooks: Notebooks;\n sections: Sections;\n pages: Pages;\n}\n\n/**\n * Represents a onenote entity\n */\nexport class OneNote extends GraphQueryableInstance implements OneNoteMethods {\n\n constructor(baseUrl: string | GraphQueryable, path = \"onenote\") {\n super(baseUrl, path);\n }\n\n public get notebooks(): Notebooks {\n return new Notebooks(this);\n }\n\n public get sections(): Sections {\n return new Sections(this);\n }\n\n public get pages(): Pages {\n return new Pages(this);\n }\n}\n\n/**\n * Describes a collection of Notebook objects\n *\n */\nexport class Notebooks extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"notebooks\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a notebook instance by id\n * \n * @param id Notebook id\n */\n public getById(id: string): Notebook {\n return new Notebook(this, id);\n }\n\n /**\n * Create a new notebook as specified in the request body.\n * \n * @param displayName Notebook display name\n */\n public add(displayName: string): Promise {\n\n const postBody = {\n displayName: displayName,\n };\n\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(r => {\n return {\n data: r,\n notebook: this.getById(r.id),\n };\n });\n }\n}\n\n/**\n * Describes a notebook instance\n *\n */\nexport class Notebook extends GraphQueryableInstance {\n constructor(baseUrl: string | GraphQueryable, path?: string) {\n super(baseUrl, path);\n }\n\n public get sections(): Sections {\n return new Sections(this);\n }\n}\n\n/**\n * Describes a collection of Sections objects\n *\n */\nexport class Sections extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"sections\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a section instance by id\n * \n * @param id Section id\n */\n public getById(id: string): Section {\n return new Section(this, id);\n }\n\n /**\n * Adds a new section\n * \n * @param displayName New section display name\n */\n public add(displayName: string): Promise {\n\n const postBody = {\n displayName: displayName,\n };\n\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(r => {\n return {\n data: r,\n section: this.getById(r.id),\n };\n });\n }\n}\n\n/**\n * Describes a sections instance\n *\n */\nexport class Section extends GraphQueryableInstance {\n constructor(baseUrl: string | GraphQueryable, path?: string) {\n super(baseUrl, path);\n }\n}\n\n/**\n * Describes a collection of Pages objects\n *\n */\nexport class Pages extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"pages\") {\n super(baseUrl, path);\n }\n}\n\nexport interface NotebookAddResult {\n data: any;\n notebook: Notebook;\n}\n\nexport interface SectionAddResult {\n data: any;\n section: Section;\n}\n","import { GraphQueryable, GraphQueryableInstance } from \"./graphqueryable\";\nimport { OneNote, OneNoteMethods } from \"./onenote\";\n\nexport class Me extends GraphQueryableInstance {\n\n constructor(baseUrl: string | GraphQueryable, path = \"me\") {\n super(baseUrl, path);\n }\n\n /**\n * The onenote associated with me\n */\n public get onenote(): OneNoteMethods {\n return new OneNote(this);\n }\n}\n","import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from \"./graphqueryable\";\n\n/**\n * Describes a collection of Users objects\n *\n */\nexport class Users extends GraphQueryableCollection {\n\n constructor(baseUrl: string | GraphQueryable, path = \"users\") {\n super(baseUrl, path);\n }\n\n /**\n * Gets a user from the collection using the specified id\n * \n * @param id Id of the user to get from this collection\n */\n public getById(id: string): User {\n return new User(this, id);\n }\n}\n\n/**\n * Represents a user entity\n */\nexport class User extends GraphQueryableInstance {}\n","import { GraphQueryable } from \"./graphqueryable\";\nimport {\n setup as _setup,\n GraphConfiguration,\n} from \"./config/graphlibconfig\";\n\nimport { Groups } from \"./groups\";\nimport { Me } from \"./me\";\nimport { Teams } from \"./teams\";\nimport { Users } from \"./users\";\n\nexport class GraphRest extends GraphQueryable {\n\n constructor(baseUrl: string | GraphQueryable, path?: string) {\n super(baseUrl, path);\n }\n\n public get groups(): Groups {\n return new Groups(this);\n }\n\n public get teams(): Teams {\n return new Teams();\n }\n\n public get me(): Me {\n return new Me(this);\n }\n\n public get users(): Users {\n return new Users(this);\n }\n\n public setup(config: GraphConfiguration) {\n _setup(config);\n }\n}\n\nexport let graph = new GraphRest(\"v1.0\");\n","import { ODataBatch } from \"@pnp/odata\";\nimport { Logger, LogLevel } from \"@pnp/logging\";\nimport { beta, objectDefinedNotNull, extend } from \"@pnp/common\";\nimport { GraphRuntimeConfig } from \"./config/graphlibconfig\";\nimport { GraphHttpClient } from \"./net/graphhttpclient\";\n\ninterface GraphBatchRequestFragment {\n id: string;\n method: string;\n url: string;\n headers?: string[][] | {\n [key: string]: string;\n };\n body?: any;\n}\n\ninterface GraphBatchRequest {\n requests: GraphBatchRequestFragment[];\n}\n\ninterface GraphBatchResponseFragment {\n id: string;\n status: number;\n method: string;\n url: string;\n headers?: string[][] | {\n [key: string]: string;\n };\n body?: any;\n}\n\ninterface GraphBatchResponse {\n responses: GraphBatchResponseFragment[];\n nextLink?: string;\n}\n\nexport class GraphBatchParseException extends Error {\n\n constructor(msg: string) {\n super(msg);\n this.name = \"GraphBatchParseException\";\n Logger.log({ data: {}, level: LogLevel.Error, message: `[${this.name}]::${this.message}` });\n }\n}\n\nexport class GraphBatch extends ODataBatch {\n\n constructor(private batchUrl = \"https://graph.microsoft.com/beta/$batch\") {\n super();\n }\n\n @beta(\"Graph batching functionality is in beta.\")\n protected executeImpl(): Promise {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Executing batch with ${this.requests.length} requests.`, LogLevel.Info);\n\n const client = new GraphHttpClient();\n\n const batchRequest: GraphBatchRequest = {\n requests: this.formatRequests(),\n };\n\n const batchOptions = {\n \"body\": JSON.stringify(batchRequest),\n \"headers\": {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n \"method\": \"POST\",\n };\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Sending batch request.`, LogLevel.Info);\n\n // let nextLinkFlag = false;\n\n return client.fetch(this.batchUrl, batchOptions)\n .then(r => r.json())\n .then(this._parseResponse)\n .then((parsedResponse: { nextLink: string, responses: Response[] }) => {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Resolving batched requests.`, LogLevel.Info);\n\n return parsedResponse.responses.reduce((chain, response, index) => {\n\n const request = this.requests[index];\n\n if (objectDefinedNotNull(request)) {\n\n Logger.write(`[${this.batchId}] (${(new Date()).getTime()}) Resolving batched request ${request.method} ${request.url}.`, LogLevel.Verbose);\n\n return chain.then(_ => request.parser.parse(response).then(request.resolve).catch(request.reject));\n\n } else {\n\n // do we have a next url? if no this is an error\n if (parsedResponse.nextLink) {\n throw new GraphBatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n\n // nextLinkFlag = true;\n // keep the chain moving, but don't add anything for this request yet\n // here we need to process the next link - so what do we do?\n // need to append a .then()\n // TODO::\n return chain;\n }\n\n }, Promise.resolve());\n });\n }\n\n private formatRequests(): GraphBatchRequestFragment[] {\n\n return this.requests.map((reqInfo, index) => {\n\n let requestFragment: GraphBatchRequestFragment = {\n id: `${++index}`,\n method: reqInfo.method,\n url: reqInfo.url,\n };\n\n let headers = {};\n\n // merge global config headers\n if (typeof GraphRuntimeConfig.headers !== \"undefined\" && GraphRuntimeConfig.headers !== null) {\n\n headers = extend(headers, GraphRuntimeConfig.headers);\n }\n\n if (typeof reqInfo.options !== \"undefined\") {\n\n // merge per request headers\n if (typeof reqInfo.options.headers !== \"undefined\" && reqInfo.options.headers !== null) {\n headers = extend(headers, reqInfo.options.headers);\n }\n\n // add a request body\n if (typeof reqInfo.options.body !== \"undefined\" && reqInfo.options.body !== null) {\n\n requestFragment = extend(requestFragment, {\n body: reqInfo.options.body,\n });\n }\n }\n\n requestFragment = extend(requestFragment, {\n headers: headers,\n });\n\n return requestFragment;\n });\n }\n\n private _parseResponse(graphResponse: GraphBatchResponse): Promise<{ nextLink: string, responses: Response[] }> {\n\n return new Promise((resolve) => {\n\n const parsedResponses: Response[] = new Array(this.requests.length).fill(null);\n\n for (let i = 0; i < graphResponse.responses.length; ++i) {\n\n const response = graphResponse.responses[i];\n // we create the request id by adding 1 to the index, so we place the response by subtracting one to match\n // the array of requests and make it easier to map them by index\n const responseId = parseInt(response.id, 10) - 1;\n\n if (response.status === 204) {\n\n parsedResponses[responseId] = new Response();\n } else {\n\n parsedResponses[responseId] = new Response(null, {\n headers: response.headers,\n status: response.status,\n });\n }\n }\n\n resolve({\n nextLink: graphResponse.nextLink,\n responses: parsedResponses,\n });\n });\n }\n}\n\n"],"names":["_setup","tslib_1.__decorate"],"mappings":";;;;;eAmBsB,MAA0B;IAC5C,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,qCAA6C,SAAQ,KAAK;IAEtD,YAAY,GAAG,GAAG,qHAAqH;QACnI,KAAK,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,iBAAkB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KAC5E;CACJ;AAED;IAEI,IAAW,OAAO;QAEd,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7C,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