dauth-context-react 1.0.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,10 @@
1
1
  import { IDauthUser } from '../interfaces';
2
- import { IgetUserAPIResponse, IrefreshAccessTokenAPIResponse, IsendEmailVerificationAPIResponse, IupdateUserAPIResponse, IverifyTokenAPIResponse } from './interfaces/dauth.api.responses';
2
+ import { IgetUserAPIResponse, IrefreshAccessTokenAPIResponse, IrefreshTokenAPIResponse, IsendEmailVerificationAPIResponse, IupdateUserAPIResponse } from './interfaces/dauth.api.responses';
3
3
  export declare const getUserAPI: (domainName: string, token: string) => Promise<IgetUserAPIResponse>;
4
4
  export declare const updateUserAPI: (domainName: string, user: Partial<IDauthUser>, token: string) => Promise<IupdateUserAPIResponse>;
5
5
  export declare const sendEmailVerificationAPI: (domainName: string, token: string) => Promise<IsendEmailVerificationAPIResponse>;
6
6
  export declare const refreshAccessTokenAPI: (domainName: string, token: string) => Promise<IrefreshAccessTokenAPIResponse>;
7
- export declare const verifyTokenAPI: ({ domainName, tsk, token, }: {
8
- domainName: string;
9
- tsk: string;
10
- token: string;
11
- }) => Promise<IverifyTokenAPIResponse>;
7
+ export declare const refreshTokenAPI: (domainName: string, refreshToken: string) => Promise<IrefreshTokenAPIResponse>;
8
+ export declare const logoutAPI: (domainName: string, refreshToken: string) => Promise<{
9
+ response: Response;
10
+ }>;
@@ -29,10 +29,10 @@ export interface IrefreshAccessTokenAPIResponse {
29
29
  accessToken: string;
30
30
  };
31
31
  }
32
- export interface IverifyTokenAPIResponse {
32
+ export interface IrefreshTokenAPIResponse {
33
33
  response: Response;
34
34
  data: {
35
- status: string;
36
- message: string;
35
+ accessToken: string;
36
+ refreshToken: string;
37
37
  };
38
38
  }
@@ -1 +1,2 @@
1
1
  export declare const TOKEN_LS = "dauth_state";
2
+ export declare const REFRESH_TOKEN_LS = "dauth_refresh_token";