Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/graph-js-sdk-web.js
Original file line number Diff line number Diff line change
Expand Up @@ -2239,8 +2239,8 @@ exports.cleanHeader = function(header, shouldStripCookie){

},{}],13:[function(require,module,exports){
module.exports={
"name": "msgraph-sdk-javascript",
"version": "0.3.1",
"name": "@microsoft/microsoft-graph-client",
"version": "0.3.2",
"description": "Microsoft Graph Client Library",
"main": "lib/src/index.js",
"typings": "lib/src/index",
Expand Down
16 changes: 8 additions & 8 deletions lib/src/GraphRequest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export declare class GraphRequest {
count(count: boolean): GraphRequest;
responseType(responseType: string): GraphRequest;
private addCsvQueryParamater(propertyName, propertyValue, additionalProperties);
delete(callback?: GraphRequestCallback): Promise<any> | void;
patch(content: any, callback?: GraphRequestCallback): Promise<any> | void;
post(content: any, callback?: GraphRequestCallback): Promise<any> | void;
put(content: any, callback?: GraphRequestCallback): Promise<any> | void;
create(content: any, callback?: GraphRequestCallback): Promise<any> | void;
update(content: any, callback?: GraphRequestCallback): Promise<any> | void;
del(callback?: GraphRequestCallback): Promise<any> | void;
get(callback?: GraphRequestCallback): Promise<any> | void;
delete(callback?: GraphRequestCallback): Promise<any>;
patch(content: any, callback?: GraphRequestCallback): Promise<any>;
post(content: any, callback?: GraphRequestCallback): Promise<any>;
put(content: any, callback?: GraphRequestCallback): Promise<any>;
create(content: any, callback?: GraphRequestCallback): Promise<any>;
update(content: any, callback?: GraphRequestCallback): Promise<any>;
del(callback?: GraphRequestCallback): Promise<any>;
get(callback?: GraphRequestCallback): Promise<any>;
private routeResponseToPromise(requestBuilder);
private routeResponseToCallback(requestBuilder, callback);
private sendRequestAndRouteResponse(requestBuilder, callback?);
Expand Down
18 changes: 9 additions & 9 deletions src/GraphRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ export class GraphRequest {
}


delete(callback?:GraphRequestCallback):Promise<any>|void {
delete(callback?:GraphRequestCallback):Promise<any> {
let url = this.buildFullUrl();
return this.sendRequestAndRouteResponse(request.del(url), callback)
}

patch(content:any, callback?:GraphRequestCallback):Promise<any>|void {
patch(content:any, callback?:GraphRequestCallback):Promise<any> {
let url = this.buildFullUrl();

return this.sendRequestAndRouteResponse(
Expand All @@ -211,7 +211,7 @@ export class GraphRequest {
);
}

post(content:any, callback?:GraphRequestCallback):Promise<any>|void {
post(content:any, callback?:GraphRequestCallback):Promise<any> {
let url = this.buildFullUrl();
return this.sendRequestAndRouteResponse(
request
Expand All @@ -221,7 +221,7 @@ export class GraphRequest {
);
}

put(content:any, callback?:GraphRequestCallback):Promise<any>|void {
put(content:any, callback?:GraphRequestCallback):Promise<any> {
let url = this.buildFullUrl();
return this.sendRequestAndRouteResponse(
request
Expand All @@ -234,20 +234,20 @@ export class GraphRequest {

// request aliases
// alias for post
create(content:any, callback?:GraphRequestCallback):Promise<any>|void {
create(content:any, callback?:GraphRequestCallback):Promise<any> {
return this.post(content, callback);
}

// alias for patch
update(content:any, callback?:GraphRequestCallback):Promise<any>|void {
update(content:any, callback?:GraphRequestCallback):Promise<any> {
return this.patch(content, callback);
}

del(callback?:GraphRequestCallback):Promise<any>|void {
del(callback?:GraphRequestCallback):Promise<any> {
return this.delete(callback);
}

get(callback?:GraphRequestCallback):Promise<any>|void {
get(callback?:GraphRequestCallback):Promise<any> {
let url = this.buildFullUrl();
return this.sendRequestAndRouteResponse(
request
Expand Down Expand Up @@ -288,7 +288,7 @@ export class GraphRequest {
* Help method that's called from the final actions( .get(), .post(), etc.) that after making the request either invokes
* routeResponseToCallback() or routeResponseToPromise()
*/
private sendRequestAndRouteResponse(requestBuilder:request.SuperAgentRequest, callback?:GraphRequestCallback):Promise<any>|void {
private sendRequestAndRouteResponse(requestBuilder:request.SuperAgentRequest, callback?:GraphRequestCallback):Promise<any> {
// return a promise when Promises are supported and no callback was provided
if (callback == null && typeof Promise !== "undefined") {
return this.routeResponseToPromise(requestBuilder);
Expand Down