Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(typings): mark optional parameters
Browse files Browse the repository at this point in the history
used coming babel-dts-generator to mark all unknown function parameter types as optional
  • Loading branch information
doktordirk committed May 4, 2016
1 parent b0e23e4 commit f56df76
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 152 deletions.
76 changes: 38 additions & 38 deletions dist/amd/aurelia-authentication.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
declare module 'aurelia-authentication' {
export class Popup {
constructor();
open(url: any, windowName: any, options: any, redirectUri: any): any;
eventListener(redirectUri: any): any;
open(url?: any, windowName?: any, options?: any, redirectUri?: any): any;
eventListener(redirectUri?: any): any;
pollPopup(): any;
}
export class AuthFilterValueConverter {
toView(routes?: any, isAuthenticated?: any): any;
}
export class BaseConfig {

// prepends baseUrl
withBase(url: any): any;
withBase(url?: any): any;

// merge current settings with incomming settings
configure(incomming: any): any;
configure(incomming?: any): any;

/* ----------- default config ----------- */
// Used internally. The used Rest instance; set during configuration (see index.js)
Expand Down Expand Up @@ -141,28 +144,25 @@ declare module 'aurelia-authentication' {
tokenName: any;
tokenPrefix: any;
}
export class AuthFilterValueConverter {
toView(routes: any, isAuthenticated: any): any;
}
export class Storage {
constructor(config: any);
get(key: any): any;
set(key: any, value: any): any;
remove(key: any): any;
constructor(config?: any);
get(key?: any): any;
set(key?: any, value?: any): any;
remove(key?: any): any;
}
export class OAuth1 {
constructor(storage: any, popup: any, config: any);
open(options: any, userData: any): any;
exchangeForToken(oauthData: any, userData: any, provider: any): any;
constructor(storage?: any, popup?: any, config?: any);
open(options?: any, userData?: any): any;
exchangeForToken(oauthData?: any, userData?: any, provider?: any): any;
}
export class OAuth2 {
constructor(storage: any, popup: any, config: any);
open(options: any, userData: any): any;
exchangeForToken(oauthData: any, userData: any, provider: any): any;
buildQuery(provider: any): any;
constructor(storage?: any, popup?: any, config?: any);
open(options?: any, userData?: any): any;
exchangeForToken(oauthData?: any, userData?: any, provider?: any): any;
buildQuery(provider?: any): any;
}
export class Authentication {
constructor(storage: any, config: any, oAuth1: any, oAuth2: any);
constructor(storage?: any, config?: any, oAuth1?: any, oAuth2?: any);

/* deprecated methods */
getLoginRoute(): any;
Expand All @@ -187,11 +187,11 @@ declare module 'aurelia-authentication' {
isAuthenticated(): any;

/* get and set from response */
getDataFromResponse(response: any): any;
getDataFromResponse(response?: any): any;
deleteData(): any;
getTokenFromResponse(response: any, tokenProp: any, tokenName: any, tokenRoot: any): any;
getTokenFromResponse(response?: any, tokenProp?: any, tokenName?: any, tokenRoot?: any): any;
toUpdateTokenCallstack(): any;
resolveUpdateTokenCallstack(response: any): any;
resolveUpdateTokenCallstack(response?: any): any;

/**
* Authenticate with third-party
Expand All @@ -201,11 +201,15 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
authenticate(name: any, userData?: any): any;
redirect(redirectUrl: any, defaultRedirectUrl: any): any;
authenticate(name?: any, userData?: any): any;
redirect(redirectUrl?: any, defaultRedirectUrl?: any): any;
}
export class AuthorizeStep {
constructor(authentication?: any);
run(routingContext?: any, next?: any): any;
}
export class AuthService {
constructor(authentication: any, config: any);
constructor(authentication?: any, config?: any);

/**
* Getter: The configured client for all aurelia-authentication requests
Expand All @@ -222,7 +226,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
getMe(criteria: any): any;
getMe(criteria?: any): any;

/**
* Send current user profile update to server
Expand All @@ -232,7 +236,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
updateMe(body: any, criteria: any): any;
updateMe(body?: any, criteria?: any): any;

/**
* Get accessToken from storage
Expand Down Expand Up @@ -295,7 +299,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
signup(displayName: any, email: any, password: any, options: any, redirectUri: any): any;
signup(displayName?: any, email?: any, password?: any, options?: any, redirectUri?: any): any;

/**
* login locally. Redirect depending on config
Expand All @@ -307,7 +311,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
login(email: any, password: any, options: any, redirectUri: any): any;
login(email?: any, password?: any, options?: any, redirectUri?: any): any;

/**
* logout locally and redirect to redirectUri (if set) or redirectUri of config
Expand All @@ -316,7 +320,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<>}
*/
logout(redirectUri: any): any;
logout(redirectUri?: any): any;

/**
* Authenticate with third-party and redirect to redirectUri (if set) or redirectUri of config
Expand All @@ -327,7 +331,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
authenticate(name: any, redirectUri: any, userData?: any): any;
authenticate(name?: any, redirectUri?: any, userData?: any): any;

/**
* Unlink third-party
Expand All @@ -336,11 +340,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
unlink(name: any, redirectUri: any): any;
}
export class AuthorizeStep {
constructor(authentication: any);
run(routingContext: any, next: any): any;
unlink(name?: any, redirectUri?: any): any;
}
export class FetchConfig {

Expand All @@ -352,7 +352,7 @@ declare module 'aurelia-authentication' {
* @param {Authentication} authService
* @param {BaseConfig} config
*/
constructor(httpClient: any, clientConfig: any, authService: any, config: any);
constructor(httpClient?: any, clientConfig?: any, authService?: any, config?: any);

/**
* Interceptor for HttpClient
Expand All @@ -368,6 +368,6 @@ declare module 'aurelia-authentication' {
*
* @return {HttpClient[]}
*/
configure(client: any): any;
configure(client?: any): any;
}
}
76 changes: 38 additions & 38 deletions dist/commonjs/aurelia-authentication.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
declare module 'aurelia-authentication' {
export class Popup {
constructor();
open(url: any, windowName: any, options: any, redirectUri: any): any;
eventListener(redirectUri: any): any;
open(url?: any, windowName?: any, options?: any, redirectUri?: any): any;
eventListener(redirectUri?: any): any;
pollPopup(): any;
}
export class AuthFilterValueConverter {
toView(routes?: any, isAuthenticated?: any): any;
}
export class BaseConfig {

// prepends baseUrl
withBase(url: any): any;
withBase(url?: any): any;

// merge current settings with incomming settings
configure(incomming: any): any;
configure(incomming?: any): any;

/* ----------- default config ----------- */
// Used internally. The used Rest instance; set during configuration (see index.js)
Expand Down Expand Up @@ -141,28 +144,25 @@ declare module 'aurelia-authentication' {
tokenName: any;
tokenPrefix: any;
}
export class AuthFilterValueConverter {
toView(routes: any, isAuthenticated: any): any;
}
export class Storage {
constructor(config: any);
get(key: any): any;
set(key: any, value: any): any;
remove(key: any): any;
constructor(config?: any);
get(key?: any): any;
set(key?: any, value?: any): any;
remove(key?: any): any;
}
export class OAuth1 {
constructor(storage: any, popup: any, config: any);
open(options: any, userData: any): any;
exchangeForToken(oauthData: any, userData: any, provider: any): any;
constructor(storage?: any, popup?: any, config?: any);
open(options?: any, userData?: any): any;
exchangeForToken(oauthData?: any, userData?: any, provider?: any): any;
}
export class OAuth2 {
constructor(storage: any, popup: any, config: any);
open(options: any, userData: any): any;
exchangeForToken(oauthData: any, userData: any, provider: any): any;
buildQuery(provider: any): any;
constructor(storage?: any, popup?: any, config?: any);
open(options?: any, userData?: any): any;
exchangeForToken(oauthData?: any, userData?: any, provider?: any): any;
buildQuery(provider?: any): any;
}
export class Authentication {
constructor(storage: any, config: any, oAuth1: any, oAuth2: any);
constructor(storage?: any, config?: any, oAuth1?: any, oAuth2?: any);

/* deprecated methods */
getLoginRoute(): any;
Expand All @@ -187,11 +187,11 @@ declare module 'aurelia-authentication' {
isAuthenticated(): any;

/* get and set from response */
getDataFromResponse(response: any): any;
getDataFromResponse(response?: any): any;
deleteData(): any;
getTokenFromResponse(response: any, tokenProp: any, tokenName: any, tokenRoot: any): any;
getTokenFromResponse(response?: any, tokenProp?: any, tokenName?: any, tokenRoot?: any): any;
toUpdateTokenCallstack(): any;
resolveUpdateTokenCallstack(response: any): any;
resolveUpdateTokenCallstack(response?: any): any;

/**
* Authenticate with third-party
Expand All @@ -201,11 +201,15 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
authenticate(name: any, userData?: any): any;
redirect(redirectUrl: any, defaultRedirectUrl: any): any;
authenticate(name?: any, userData?: any): any;
redirect(redirectUrl?: any, defaultRedirectUrl?: any): any;
}
export class AuthorizeStep {
constructor(authentication?: any);
run(routingContext?: any, next?: any): any;
}
export class AuthService {
constructor(authentication: any, config: any);
constructor(authentication?: any, config?: any);

/**
* Getter: The configured client for all aurelia-authentication requests
Expand All @@ -222,7 +226,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
getMe(criteria: any): any;
getMe(criteria?: any): any;

/**
* Send current user profile update to server
Expand All @@ -232,7 +236,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
updateMe(body: any, criteria: any): any;
updateMe(body?: any, criteria?: any): any;

/**
* Get accessToken from storage
Expand Down Expand Up @@ -295,7 +299,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
signup(displayName: any, email: any, password: any, options: any, redirectUri: any): any;
signup(displayName?: any, email?: any, password?: any, options?: any, redirectUri?: any): any;

/**
* login locally. Redirect depending on config
Expand All @@ -307,7 +311,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
login(email: any, password: any, options: any, redirectUri: any): any;
login(email?: any, password?: any, options?: any, redirectUri?: any): any;

/**
* logout locally and redirect to redirectUri (if set) or redirectUri of config
Expand All @@ -316,7 +320,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<>}
*/
logout(redirectUri: any): any;
logout(redirectUri?: any): any;

/**
* Authenticate with third-party and redirect to redirectUri (if set) or redirectUri of config
Expand All @@ -327,7 +331,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
authenticate(name: any, redirectUri: any, userData?: any): any;
authenticate(name?: any, redirectUri?: any, userData?: any): any;

/**
* Unlink third-party
Expand All @@ -336,11 +340,7 @@ declare module 'aurelia-authentication' {
*
* @return {Promise<response>}
*/
unlink(name: any, redirectUri: any): any;
}
export class AuthorizeStep {
constructor(authentication: any);
run(routingContext: any, next: any): any;
unlink(name?: any, redirectUri?: any): any;
}
export class FetchConfig {

Expand All @@ -352,7 +352,7 @@ declare module 'aurelia-authentication' {
* @param {Authentication} authService
* @param {BaseConfig} config
*/
constructor(httpClient: any, clientConfig: any, authService: any, config: any);
constructor(httpClient?: any, clientConfig?: any, authService?: any, config?: any);

/**
* Interceptor for HttpClient
Expand All @@ -368,6 +368,6 @@ declare module 'aurelia-authentication' {
*
* @return {HttpClient[]}
*/
configure(client: any): any;
configure(client?: any): any;
}
}
Loading

0 comments on commit f56df76

Please sign in to comment.