@fctc/interface-logic 1.8.2 → 1.8.4

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.
Files changed (43) hide show
  1. package/dist/configs.d.mts +12 -0
  2. package/dist/configs.d.ts +12 -0
  3. package/dist/configs.js +2386 -0
  4. package/dist/configs.mjs +2349 -0
  5. package/dist/constants.d.mts +131 -0
  6. package/dist/constants.d.ts +131 -0
  7. package/dist/constants.js +205 -0
  8. package/dist/constants.mjs +166 -0
  9. package/dist/environment.d.mts +53 -0
  10. package/dist/environment.d.ts +53 -0
  11. package/dist/environment.js +3080 -0
  12. package/dist/environment.mjs +3042 -0
  13. package/dist/hooks.d.mts +359 -0
  14. package/dist/hooks.d.ts +359 -0
  15. package/dist/{index.js → hooks.js} +203 -1435
  16. package/dist/{index.mjs → hooks.mjs} +159 -1251
  17. package/dist/provider.d.mts +16 -0
  18. package/dist/provider.d.ts +16 -0
  19. package/dist/provider.js +3600 -0
  20. package/dist/provider.mjs +3561 -0
  21. package/dist/services.d.mts +255 -0
  22. package/dist/services.d.ts +255 -0
  23. package/dist/services.js +4653 -0
  24. package/dist/services.mjs +4608 -0
  25. package/dist/store.d.mts +377 -0
  26. package/dist/store.d.ts +377 -0
  27. package/dist/store.js +814 -0
  28. package/dist/store.mjs +709 -0
  29. package/dist/types.d.mts +17 -0
  30. package/dist/types.d.ts +17 -0
  31. package/dist/types.js +18 -0
  32. package/dist/types.mjs +0 -0
  33. package/dist/utils.d.mts +93 -0
  34. package/dist/utils.d.ts +93 -0
  35. package/dist/utils.js +2962 -0
  36. package/dist/utils.mjs +2896 -0
  37. package/dist/view-type-D8ukwj_2.d.mts +113 -0
  38. package/dist/view-type-D8ukwj_2.d.ts +113 -0
  39. package/package.json +1 -1
  40. package/dist/index.d.mts +0 -1681
  41. package/dist/index.d.ts +0 -1681
  42. package/dist/index.js.map +0 -1
  43. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,53 @@
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
+ interface EnvConfig {
26
+ baseUrl?: string;
27
+ requests?: any;
28
+ context?: any;
29
+ defaultCompany?: any;
30
+ config?: any;
31
+ companies?: any[];
32
+ user?: any;
33
+ db?: string;
34
+ refreshTokenEndpoint?: string;
35
+ }
36
+ declare function createEnvStore(store: EnhancedStore, localStorageUtil?: LocalStorageUtilsType, sessionStorageUtil?: SessionStorageUtilsType): {
37
+ getEnvConfig: () => EnvConfig;
38
+ setupEnv: (envConfig: EnvConfig) => EnvConfig;
39
+ setUid: (uid: number) => EnvConfig;
40
+ setLang: (lang: string) => EnvConfig;
41
+ setAllowCompanies: (allowCompanies: number[]) => EnvConfig;
42
+ setCompanies: (companies: any[]) => EnvConfig;
43
+ setDefaultCompany: (company: any) => EnvConfig;
44
+ setUserInfo: (userInfo: any) => EnvConfig;
45
+ };
46
+ type EnvStore = ReturnType<typeof createEnvStore>;
47
+ declare function initEnv({ localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
48
+ localStorageUtils?: LocalStorageUtilsType;
49
+ sessionStorageUtils?: SessionStorageUtilsType;
50
+ }): EnvStore;
51
+ declare function getEnv(): any;
52
+
53
+ export { type EnvStore, getEnv, initEnv };