-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from gunjandatta/gdatta
Major Updates for SPFx Support
- Loading branch information
Showing
52 changed files
with
1,843 additions
and
2,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,73 @@ | ||
import * as SP from "../intellisense/graph"; | ||
import { IBaseExecution } from "gd-sprest-def/lib/base"; | ||
import { Graph as GraphCore } from "gd-sprest-def/lib/microsoft"; | ||
import { IGraph as IGraphCore, IGraphToken } from "../intellisense/graph"; | ||
import { ITargetInfo } from "../utils"; | ||
|
||
/** | ||
* Graph | ||
* @hidden | ||
*/ | ||
export const Graph: IGraph; | ||
|
||
/** | ||
* Graph Properties | ||
*/ | ||
export interface IGraphProperties { | ||
/** The access token. Defaults to the Graph.Token value if not set. */ | ||
accessToken?: string; | ||
|
||
/** The cloud environment. Defaults to the Graph.Cloud or commercial environment if not set. */ | ||
cloud?: string; | ||
|
||
/** The data to be sent in the body of the request. */ | ||
data?: string; | ||
|
||
/** The request type GET or POST. */ | ||
requestType?: string; | ||
|
||
/** The url of the graph api request. */ | ||
url: string; | ||
|
||
/** The version of the graph api to use. */ | ||
version?: string; | ||
} | ||
|
||
/** | ||
* Graph EndPoints | ||
*/ | ||
export interface IGraphCustom extends IGraphCore { | ||
me(): IBaseExecution<GraphCore.user>; | ||
group(id: string): IBaseExecution<GraphCore.group>; | ||
groups(): IBaseExecution<GraphCore.groupCollections>; | ||
list(siteId: string, id: string): IBaseExecution<GraphCore.list>; | ||
lists(siteId: string): IBaseExecution<GraphCore.listCollections>; | ||
site(id: string): IBaseExecution<GraphCore.site>; | ||
sites(): IBaseExecution<GraphCore.siteCollections>; | ||
user(id: string): IBaseExecution<GraphCore.user>; | ||
users(): IBaseExecution<GraphCore.userCollections>; | ||
} | ||
|
||
/** | ||
* Graph | ||
* @hidden | ||
*/ | ||
export interface IGraph { | ||
/** | ||
* Creates an instance of the graph library. | ||
* @param accessToken - The access token for the graph api request. | ||
* @param version - The version of the graph to target. | ||
* @param props - The graph request information. | ||
*/ | ||
(accessToken: string, version?: string): SP.IGraph; | ||
(props?: IGraphProperties): IGraphCustom; | ||
|
||
/** The default cloud environment to use for the requests. */ | ||
Cloud: string; | ||
|
||
/** The default token to use for the requests. */ | ||
Token: string; | ||
|
||
/** The default version to use for the requests. */ | ||
Version: string; | ||
|
||
/** | ||
* Method to get the access token from a classic page. | ||
* @param resource - The graph api endpoint. | ||
*/ | ||
getAccessToken(): Promise<SP.IGraphToken>; | ||
getAccessToken(resource?: string): IBaseExecution<IGraphToken>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.