@authing/guard-shim-react 4.5.26 → 4.5.27-gba.1

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.
@@ -11,6 +11,7 @@ export declare class GuardHttp {
11
11
  setTenantId(tenantId: string): this;
12
12
  setDeviceId(deviceId: string): this;
13
13
  setBaseUrl(baseUrl: string): this;
14
+ getBaseUrl(): any;
14
15
  getHeaders: () => Record<string, string>;
15
16
  get: <T = any>(path: string, query?: Record<string, any>, config?: any) => Promise<AuthingGuardResponse<T>>;
16
17
  post: <T = any>(path: string, data: any, config?: {
@@ -19,9 +20,9 @@ export declare class GuardHttp {
19
20
  postForm: <T = any>(path: string, formData: any, config?: {
20
21
  headers: any;
21
22
  }) => Promise<AuthingGuardResponse<T>>;
22
- authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
23
+ authFlow: <T = any>(action: string, data?: any, fetchErrorHandler?: () => void) => Promise<AuthingGuardResponse<T>>;
23
24
  initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
24
- responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
25
+ responseIntercept: (res: AuthingResponse, fetchErrorHandler?: () => void) => AuthingGuardResponse;
25
26
  }
26
27
  export declare const initGuardHttp: (baseUrl: string) => GuardHttp;
27
28
  export declare const getGuardHttp: () => GuardHttp;
@@ -11,6 +11,7 @@ export declare const requestClient: {
11
11
  }): Promise<AuthingResponse<T_2>>;
12
12
  baseUrl: string;
13
13
  setBaseUrl(base: string): void;
14
+ getBaseUrl(base: string): string;
14
15
  langHeader: string;
15
16
  tenantHeader: string;
16
17
  tenantId: string;
@@ -1,4 +1,4 @@
1
1
  import { AuthingGuardResponse, AuthingResponse } from '../http';
2
2
  import { CodeAction } from './interface';
3
3
  export * from './interface';
4
- export declare const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
4
+ export declare const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse, fetchErrorHandler?: () => void) => AuthingResponse<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "4.5.26",
3
+ "version": "4.5.27-gba.1",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",