From a045a2c505c0aa38042d04a3ddd086b56c1894c0 Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Wed, 22 Nov 2017 22:31:33 +0100 Subject: [PATCH 1/3] Update contract for Auth0DecodedHash of auth0-js This commit updates contract for results of the WebAuth.parseHash call to v.8 of auth0-js. Here is a link to relevant vanilla JS implementation: https://git.io/vFNdC Thanks! --- types/auth0-js/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index 76a2c5f319..85e4401266 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Matt Durrant +// Peter Blazejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export as namespace auth0; @@ -525,14 +526,21 @@ export interface Auth0Error { statusText?: string; } +/** + * The contents of the authResult object returned by {@link WebAuth#parseHash } + * @export + * @interface Auth0DecodedHash + */ export interface Auth0DecodedHash { accessToken?: string; idToken?: string; idTokenPayload?: any; + appState?: any; refreshToken?: string; state?: string; expiresIn?: number; tokenType?: string; + scope?: string; } /** Represents the response from an API Token Delegation request. */ From a1642fcdfe696d402565ac09668cfa7fb24a6f0e Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Wed, 22 Nov 2017 22:45:34 +0100 Subject: [PATCH 2/3] Bump auth0-js version covered by this definition file I have tested with 8.11.3 - hence the version bump Thanks! --- types/auth0-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index 85e4401266..02642f0934 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Auth0.js 8.10 +// Type definitions for Auth0.js 8.11.3 // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Matt Durrant From f9702725c729deec03d7e571ff358b5124ab7886 Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Thu, 23 Nov 2017 09:20:47 +0100 Subject: [PATCH 3/3] Fix CI check failures This makes the PR complies with CI build requirements --- types/auth0-js/index.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index 02642f0934..faab2ac006 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Auth0.js 8.11.3 +// Type definitions for Auth0.js 8.11 // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Matt Durrant @@ -528,8 +528,6 @@ export interface Auth0Error { /** * The contents of the authResult object returned by {@link WebAuth#parseHash } - * @export - * @interface Auth0DecodedHash */ export interface Auth0DecodedHash { accessToken?: string;