Skip to content

Commit 2008cef

Browse files
1. Authentication provider callback can now accept null also. 2. Add Search functionality
1 parent 60c1f8c commit 2008cef

File tree

9 files changed

+18
-9
lines changed

9 files changed

+18
-9
lines changed

lib/graph-js-sdk-core.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/graph-js-sdk-web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/GraphRequest.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export declare class GraphRequest {
2525
select(properties: string | string[]): GraphRequest;
2626
expand(properties: string | string[]): GraphRequest;
2727
orderby(properties: string | string[]): GraphRequest;
28+
search(searchStr: string): GraphRequest;
2829
filter(filterStr: string): GraphRequest;
2930
top(n: number): GraphRequest;
3031
skip(n: number): GraphRequest;

lib/src/GraphRequest.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/GraphRequest.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/common.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export declare const GRAPH_BASE_URL = "https://graph.microsoft.com/";
77
* @NOTE: This should be kept up to date with the version used in package.json.
88
* If you are changing this please ensure you are also changing it in package.json.
99
*/
10-
export declare const PACKAGE_VERSION = "1.2.0";
10+
export declare const PACKAGE_VERSION = "1.3.0";
1111
/**
1212
* @interface
1313
* Signature that defines callback for an authentication provider
1414
* @callback - The anonymous callback function
1515
*/
1616
export interface AuthProviderCallback {
17-
(error: any, accessToken: string): void;
17+
(error: any, accessToken: string | null): void;
1818
}
1919
/**
2020
* @interface {@link https://github.com/bitinn/node-fetch/#options}

lib/src/common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GraphRequest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ export class GraphRequest {
163163
return this;
164164
}
165165

166+
search(searchStr: string): GraphRequest {
167+
this.addCsvQueryParameter("$search", `"${searchStr}"`, arguments);
168+
return this;
169+
}
166170

167171
filter(filterStr: string): GraphRequest {
168172
this.urlComponents.oDataQueryParams["$filter"] = filterStr;

src/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ oDataQueryNames = oDataQueryNames.concat(oDataQueryNames.map((s) => "$" + s));
2222
* @callback - The anonymous callback function
2323
*/
2424
export interface AuthProviderCallback {
25-
(error: any, accessToken: string): void
25+
(error: any, accessToken: string | null): void
2626
}
2727

2828
/**

0 commit comments

Comments
 (0)