acsi-core 1.1.1 → 1.2.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.
- package/dist/components/MSALRedirectHandler/index.d.ts +14 -0
- package/dist/components/UpdateNotifier.d.ts +3 -0
- package/dist/configs/api.d.ts +3 -0
- package/dist/configs/api_removed.d.ts +3 -0
- package/dist/containers/Login/apiClient/index.d.ts +5 -5
- package/dist/index.js +644 -64
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +631 -51
- package/dist/index.modern.js.map +1 -1
- package/dist/services/accountService.d.ts +6 -6
- package/dist/utils/configLoader.d.ts +2 -0
- package/dist/utils/hooks/useServiceWorker.d.ts +1 -0
- package/dist/utils/msalInstance.d.ts +38 -0
- package/dist/utils/timeSpanToLocalMoment.d.ts +2 -2
- package/package.json +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LoginAccessTokenRequest, LoginRequest } from "../utils/types/login";
|
|
2
|
-
export declare const getInfo: (role: string) => Promise<import("axios").AxiosResponse<any, any
|
|
3
|
-
export declare const getSuperAdminInfoFromWeb: () => Promise<import("axios").AxiosResponse<any, any
|
|
4
|
-
export declare const apiLoginGoogle: (body: LoginRequest) => Promise<import("axios").AxiosResponse<any, any
|
|
5
|
-
export declare const apiLoginGoogleSuperAdmin: (body: LoginRequest) => Promise<import("axios").AxiosResponse<any, any
|
|
6
|
-
export declare const apiLoginWithAccessToken: (body: LoginAccessTokenRequest, domain?: string | undefined) => Promise<import("axios").AxiosResponse<any, any
|
|
7
|
-
export declare const checkToken: (token: string) => Promise<import("axios").AxiosResponse<any, any
|
|
2
|
+
export declare const getInfo: (role: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
3
|
+
export declare const getSuperAdminInfoFromWeb: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
export declare const apiLoginGoogle: (body: LoginRequest) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
+
export declare const apiLoginGoogleSuperAdmin: (body: LoginRequest) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
+
export declare const apiLoginWithAccessToken: (body: LoginAccessTokenRequest, domain?: string | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
export declare const checkToken: (token: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useServiceWorker: () => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IPublicClientApplication, AccountInfo, AuthenticationResult } from "@azure/msal-browser";
|
|
2
|
+
/**
|
|
3
|
+
* Get or create the MSAL singleton instance
|
|
4
|
+
* @param clientId - Microsoft client ID (optional, uses env if not provided)
|
|
5
|
+
* @param redirectUri - Redirect URI (optional, uses env if not provided)
|
|
6
|
+
* @returns MSAL instance
|
|
7
|
+
*/
|
|
8
|
+
export declare const getMSALInstance: (clientId?: string | undefined, redirectUri?: string | undefined) => IPublicClientApplication | null;
|
|
9
|
+
/**
|
|
10
|
+
* Initialize the MSAL instance
|
|
11
|
+
* @param clientId - Microsoft client ID (optional)
|
|
12
|
+
* @param redirectUri - Redirect URI (optional)
|
|
13
|
+
* @returns Promise that resolves when initialization is complete
|
|
14
|
+
*/
|
|
15
|
+
export declare const initializeMSAL: (clientId?: string | undefined, redirectUri?: string | undefined) => Promise<IPublicClientApplication | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Handle MSAL redirect promise
|
|
18
|
+
* This should be called as early as possible, before React Router processes the URL
|
|
19
|
+
* @param clientId - Microsoft client ID (optional)
|
|
20
|
+
* @param redirectUri - Redirect URI (optional)
|
|
21
|
+
* @returns Promise with authentication result or null
|
|
22
|
+
*/
|
|
23
|
+
export declare const handleMSALRedirect: (clientId?: string | undefined, redirectUri?: string | undefined) => Promise<AuthenticationResult | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Check if current URL contains MSAL redirect parameters
|
|
26
|
+
* @returns true if MSAL redirect detected
|
|
27
|
+
*/
|
|
28
|
+
export declare const isMSALRedirect: () => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Get all accounts from MSAL cache
|
|
31
|
+
* @returns Array of account info
|
|
32
|
+
*/
|
|
33
|
+
export declare const getAllAccounts: () => AccountInfo[];
|
|
34
|
+
/**
|
|
35
|
+
* Get active account
|
|
36
|
+
* @returns Active account or null
|
|
37
|
+
*/
|
|
38
|
+
export declare const getActiveAccount: () => AccountInfo | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import moment from "moment
|
|
2
|
-
declare const _default: (time: string
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
declare const _default: (time: string) => moment.Moment | null;
|
|
3
3
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acsi-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Contains core components && functions for acsi-core project",
|
|
5
5
|
"author": "brss",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"link": "^2.1.0",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
34
|
"moment": "^2.29.4",
|
|
35
|
-
"moment-timezone": "^0.6.0",
|
|
36
35
|
"node-sass": "^7.0.3",
|
|
37
36
|
"pusher-js": "^8.4.0-rc2",
|
|
38
37
|
"react-google-recaptcha-v3": "^1.10.1",
|