@fctc/interface-logic 1.7.5 → 1.7.6
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/configs.d.mts +3 -2
- package/dist/configs.d.ts +3 -2
- package/dist/environment.d.mts +57 -1
- package/dist/environment.d.ts +57 -1
- package/dist/environment.js +670 -53
- package/dist/environment.mjs +670 -53
- package/dist/hooks.js +668 -52
- package/dist/hooks.mjs +668 -52
- package/dist/provider.js +54 -52
- package/dist/provider.mjs +54 -52
- package/dist/services.js +668 -52
- package/dist/services.mjs +668 -52
- package/package.json +1 -1
- package/dist/environment-BtoPepkC.d.mts +0 -72
- package/dist/environment-BtoPepkC.d.ts +0 -72
package/dist/configs.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvStore } from './environment.mjs';
|
|
2
|
+
import '@reduxjs/toolkit';
|
|
2
3
|
|
|
3
4
|
declare const axiosClient: {
|
|
4
|
-
init(config:
|
|
5
|
+
init(config: EnvStore): {
|
|
5
6
|
get: (url: string, headers: any) => Promise<any>;
|
|
6
7
|
post: (url: string, body: any, headers: any) => Promise<any>;
|
|
7
8
|
post_excel: (url: string, body: any, headers: any) => Promise<any>;
|
package/dist/configs.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvStore } from './environment.js';
|
|
2
|
+
import '@reduxjs/toolkit';
|
|
2
3
|
|
|
3
4
|
declare const axiosClient: {
|
|
4
|
-
init(config:
|
|
5
|
+
init(config: EnvStore): {
|
|
5
6
|
get: (url: string, headers: any) => Promise<any>;
|
|
6
7
|
post: (url: string, body: any, headers: any) => Promise<any>;
|
|
7
8
|
post_excel: (url: string, body: any, headers: any) => Promise<any>;
|
package/dist/environment.d.mts
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
2
|
+
|
|
3
|
+
declare const localStorageUtils: () => {
|
|
4
|
+
setToken: (access_token: string) => Promise<void>;
|
|
5
|
+
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
6
|
+
getAccessToken: () => Promise<string | null>;
|
|
7
|
+
getRefreshToken: () => Promise<string | null>;
|
|
8
|
+
clearToken: () => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
11
|
+
|
|
12
|
+
declare const sessionStorageUtils: () => {
|
|
13
|
+
getBrowserSession: () => Promise<string | null>;
|
|
14
|
+
};
|
|
15
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
16
|
+
|
|
17
|
+
declare global {
|
|
18
|
+
interface Global {
|
|
19
|
+
envStore?: EnvStore;
|
|
20
|
+
}
|
|
21
|
+
interface Window {
|
|
22
|
+
envStore?: EnvStore;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
declare class EnvStore {
|
|
26
|
+
private static instance;
|
|
27
|
+
envStore: EnhancedStore | any;
|
|
28
|
+
baseUrl?: string;
|
|
29
|
+
requests?: any;
|
|
30
|
+
context?: any;
|
|
31
|
+
defaultCompany?: any;
|
|
32
|
+
config?: any;
|
|
33
|
+
companies?: any[];
|
|
34
|
+
user?: any;
|
|
35
|
+
db?: string;
|
|
36
|
+
localStorageUtils?: any;
|
|
37
|
+
sessionStorageUtils?: any;
|
|
38
|
+
refreshTokenEndpoint?: string;
|
|
39
|
+
private constructor();
|
|
40
|
+
static getInstance(envStore: EnhancedStore, localStorageUtils?: any, sessionStorageUtils?: any): EnvStore;
|
|
41
|
+
setup(): void;
|
|
42
|
+
setupEnv(envConfig: Partial<EnvStore>): void;
|
|
43
|
+
setUid(uid: number): void;
|
|
44
|
+
setLang(lang: string): void;
|
|
45
|
+
setAllowCompanies(allowCompanies: number[]): void;
|
|
46
|
+
setCompanies(companies: any[]): void;
|
|
47
|
+
setDefaultCompany(company: any): void;
|
|
48
|
+
setUserInfo(userInfo: any): void;
|
|
49
|
+
}
|
|
50
|
+
declare function initEnv({ envStore, localStorageUtils, sessionStorageUtils, }: {
|
|
51
|
+
envStore: EnhancedStore;
|
|
52
|
+
localStorageUtils?: LocalStorageUtilsType;
|
|
53
|
+
sessionStorageUtils?: SessionStorageUtilsType;
|
|
54
|
+
}): EnvStore;
|
|
55
|
+
declare function getEnv(): EnvStore;
|
|
56
|
+
|
|
57
|
+
export { EnvStore, getEnv, initEnv };
|
package/dist/environment.d.ts
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
2
|
+
|
|
3
|
+
declare const localStorageUtils: () => {
|
|
4
|
+
setToken: (access_token: string) => Promise<void>;
|
|
5
|
+
setRefreshToken: (refresh_token: string) => Promise<void>;
|
|
6
|
+
getAccessToken: () => Promise<string | null>;
|
|
7
|
+
getRefreshToken: () => Promise<string | null>;
|
|
8
|
+
clearToken: () => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
|
|
11
|
+
|
|
12
|
+
declare const sessionStorageUtils: () => {
|
|
13
|
+
getBrowserSession: () => Promise<string | null>;
|
|
14
|
+
};
|
|
15
|
+
type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
|
|
16
|
+
|
|
17
|
+
declare global {
|
|
18
|
+
interface Global {
|
|
19
|
+
envStore?: EnvStore;
|
|
20
|
+
}
|
|
21
|
+
interface Window {
|
|
22
|
+
envStore?: EnvStore;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
declare class EnvStore {
|
|
26
|
+
private static instance;
|
|
27
|
+
envStore: EnhancedStore | any;
|
|
28
|
+
baseUrl?: string;
|
|
29
|
+
requests?: any;
|
|
30
|
+
context?: any;
|
|
31
|
+
defaultCompany?: any;
|
|
32
|
+
config?: any;
|
|
33
|
+
companies?: any[];
|
|
34
|
+
user?: any;
|
|
35
|
+
db?: string;
|
|
36
|
+
localStorageUtils?: any;
|
|
37
|
+
sessionStorageUtils?: any;
|
|
38
|
+
refreshTokenEndpoint?: string;
|
|
39
|
+
private constructor();
|
|
40
|
+
static getInstance(envStore: EnhancedStore, localStorageUtils?: any, sessionStorageUtils?: any): EnvStore;
|
|
41
|
+
setup(): void;
|
|
42
|
+
setupEnv(envConfig: Partial<EnvStore>): void;
|
|
43
|
+
setUid(uid: number): void;
|
|
44
|
+
setLang(lang: string): void;
|
|
45
|
+
setAllowCompanies(allowCompanies: number[]): void;
|
|
46
|
+
setCompanies(companies: any[]): void;
|
|
47
|
+
setDefaultCompany(company: any): void;
|
|
48
|
+
setUserInfo(userInfo: any): void;
|
|
49
|
+
}
|
|
50
|
+
declare function initEnv({ envStore, localStorageUtils, sessionStorageUtils, }: {
|
|
51
|
+
envStore: EnhancedStore;
|
|
52
|
+
localStorageUtils?: LocalStorageUtilsType;
|
|
53
|
+
sessionStorageUtils?: SessionStorageUtilsType;
|
|
54
|
+
}): EnvStore;
|
|
55
|
+
declare function getEnv(): EnvStore;
|
|
56
|
+
|
|
57
|
+
export { EnvStore, getEnv, initEnv };
|