@das-fed/upf-utils 6.4.0-dev.156 → 6.4.0-dev.158

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 (56) hide show
  1. package/api-services/index.js +1 -1
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +806 -792
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +836 -818
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +839 -821
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +662 -658
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +1 -1
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +1 -1
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +1 -1
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +836 -818
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +1 -1
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +1076 -1094
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +1 -1
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +836 -818
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +1 -1
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +836 -818
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +1 -1
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +1 -1
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +1 -1
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +1 -1
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +820 -838
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +1 -1
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +1 -1
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +836 -818
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +1 -1
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/common-tools/handle-data/index.js +9 -10
  50. package/create-api-service/check-token/index.d.ts +16 -0
  51. package/create-api-service/check-token/index.js +1757 -0
  52. package/create-api-service/check-token/index.js.gz +0 -0
  53. package/create-api-service/index.js +1 -1
  54. package/create-api-service/index.js.gz +0 -0
  55. package/esm-map.json +2 -1
  56. package/package.json +4 -4
@@ -7,7 +7,7 @@ import Xn from "dayjs/plugin/timezone";
7
7
  import { getProjectInfo as Zn, getInstanceInfo as Yn } from "@das-fed/upf-utils/common-info";
8
8
  import { getAccessToken as eo } from "@das-fed/upf-utils/token-tools";
9
9
  import { getConfig as kr } from "@das-fed/upf-utils/config";
10
- import { getValidAccessToken as to } from "@das-fed/upf-utils/create-api-service/sso/check-token";
10
+ import { getValidAccessToken as to } from "@das-fed/upf-utils/create-api-service/check-token";
11
11
  function qr(t, e) {
12
12
  return function() {
13
13
  return t.apply(e, arguments);
@@ -1,17 +1,16 @@
1
- const f = (t) => t === null || typeof t > "u" || t === "", i = async (t) => {
2
- let { pathname: o = "back-end", langArr: l = ["zh-CN", "en"] } = t || {}, r = "", n = {};
3
- r = "/upf/web/admin";
1
+ const i = (n) => n === null || typeof n > "u" || n === "", o = async (n) => {
2
+ let { pathname: a = "back-end", langArr: l = ["zh-CN", "en"], urlPrefix: f = "" } = n || {}, t = {};
4
3
  for (let e of l)
5
- if (!n[e]) {
6
- const a = await import(
4
+ if (!t[e]) {
5
+ const r = await import(
7
6
  /* @vite-ignore */
8
- `${r}/i18n/${o}/${e}.js`
7
+ `${f}/i18n/${a}/${e}.js`
9
8
  );
10
- n[e] = (a == null ? void 0 : a.default) || {};
9
+ t[e] = (r == null ? void 0 : r.default) || {};
11
10
  }
12
- return n;
11
+ return t;
13
12
  };
14
13
  export {
15
- i as handleI18nData,
16
- f as isEmpty
14
+ o as handleI18nData,
15
+ i as isEmpty
17
16
  };
@@ -0,0 +1,16 @@
1
+ export interface RefreshDataType {
2
+ accessToken: string;
3
+ refreshToken: string;
4
+ accessExp: number;
5
+ refreshExp: number;
6
+ sub?: string;
7
+ tenant?: string;
8
+ }
9
+ /**
10
+ * 检查并获取有效的 Access Token(带缓冲、防并发和重试机制)
11
+ * @param tokenData 当前 token 数据
12
+ * @param updateTokenCallback 更新 token 的回调函数
13
+ * @param retryCount 内部重试计数器(外部调用无需传递)
14
+ * @returns 有效的 access_token
15
+ */
16
+ export declare function getValidAccessToken(tokenData: RefreshDataType, updateTokenCallback: (newToken: RefreshDataType) => void, retryCount?: number): Promise<string>;