@fctc/interface-logic 1.7.3 → 1.7.5

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