@etsoo/smarterp-core 1.0.23 → 1.0.25

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.
@@ -8,6 +8,12 @@ import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
8
8
  import { IdentityType } from "./dto/IdentityType";
9
9
  import { AuthCodeApi } from "./AuthCodeApi";
10
10
  import { ListType } from "@etsoo/shared";
11
+ type AppData = {
12
+ id: number;
13
+ appId?: number;
14
+ name: string;
15
+ localName?: string;
16
+ };
11
17
  /**
12
18
  * Core application interface
13
19
  * 核心应用程序接口
@@ -47,11 +53,7 @@ export interface ICoreApp {
47
53
  * @param data App data
48
54
  * @returns Name
49
55
  */
50
- getAppName(data: {
51
- id: number;
52
- name: string;
53
- localName?: string;
54
- }): string;
56
+ getAppName(data: AppData): string;
55
57
  /**
56
58
  * Get user identifier type label
57
59
  * 获取用户标识类型标签
@@ -137,11 +139,7 @@ export declare class CoreApp implements ICoreApp {
137
139
  * @param data App data
138
140
  * @returns Name
139
141
  */
140
- getAppName(data: {
141
- id: number;
142
- name: string;
143
- localName?: string;
144
- }): string;
142
+ getAppName(data: AppData): string;
145
143
  /**
146
144
  * Get user identifier type label
147
145
  * 获取用户标识类型标签
@@ -165,3 +163,4 @@ export declare class CoreApp implements ICoreApp {
165
163
  */
166
164
  getIdentities(identity?: number): ListType[];
167
165
  }
166
+ export {};
@@ -90,7 +90,7 @@ class CoreApp {
90
90
  * @returns Name
91
91
  */
92
92
  getAppName(data) {
93
- return data.localName ?? this.app.get(`app${data.id}`) ?? data.name;
93
+ return (data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name);
94
94
  }
95
95
  /**
96
96
  * Get user identifier type label
@@ -5,6 +5,10 @@ import { AppQueryData } from "./AppQueryData";
5
5
  * 购买的应用查询数据
6
6
  */
7
7
  export type AppPurchasedQueryData = AppQueryData & {
8
+ /**
9
+ * Global app id
10
+ */
11
+ appId: number;
8
12
  /**
9
13
  * Expiry
10
14
  * 到期时间
@@ -65,4 +65,9 @@ export type OrgReadDto = {
65
65
  * 用户数
66
66
  */
67
67
  users: number;
68
+ /**
69
+ * Persons
70
+ * 人员数
71
+ */
72
+ persons: number;
68
73
  };
@@ -8,6 +8,12 @@ import { AuthApi, IApp, UserIdentifierType } from "@etsoo/appscript";
8
8
  import { IdentityType } from "./dto/IdentityType";
9
9
  import { AuthCodeApi } from "./AuthCodeApi";
10
10
  import { ListType } from "@etsoo/shared";
11
+ type AppData = {
12
+ id: number;
13
+ appId?: number;
14
+ name: string;
15
+ localName?: string;
16
+ };
11
17
  /**
12
18
  * Core application interface
13
19
  * 核心应用程序接口
@@ -47,11 +53,7 @@ export interface ICoreApp {
47
53
  * @param data App data
48
54
  * @returns Name
49
55
  */
50
- getAppName(data: {
51
- id: number;
52
- name: string;
53
- localName?: string;
54
- }): string;
56
+ getAppName(data: AppData): string;
55
57
  /**
56
58
  * Get user identifier type label
57
59
  * 获取用户标识类型标签
@@ -137,11 +139,7 @@ export declare class CoreApp implements ICoreApp {
137
139
  * @param data App data
138
140
  * @returns Name
139
141
  */
140
- getAppName(data: {
141
- id: number;
142
- name: string;
143
- localName?: string;
144
- }): string;
142
+ getAppName(data: AppData): string;
145
143
  /**
146
144
  * Get user identifier type label
147
145
  * 获取用户标识类型标签
@@ -165,3 +163,4 @@ export declare class CoreApp implements ICoreApp {
165
163
  */
166
164
  getIdentities(identity?: number): ListType[];
167
165
  }
166
+ export {};
@@ -87,7 +87,7 @@ export class CoreApp {
87
87
  * @returns Name
88
88
  */
89
89
  getAppName(data) {
90
- return data.localName ?? this.app.get(`app${data.id}`) ?? data.name;
90
+ return (data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name);
91
91
  }
92
92
  /**
93
93
  * Get user identifier type label
@@ -5,6 +5,10 @@ import { AppQueryData } from "./AppQueryData";
5
5
  * 购买的应用查询数据
6
6
  */
7
7
  export type AppPurchasedQueryData = AppQueryData & {
8
+ /**
9
+ * Global app id
10
+ */
11
+ appId: number;
8
12
  /**
9
13
  * Expiry
10
14
  * 到期时间
@@ -65,4 +65,9 @@ export type OrgReadDto = {
65
65
  * 用户数
66
66
  */
67
67
  users: number;
68
+ /**
69
+ * Persons
70
+ * 人员数
71
+ */
72
+ persons: number;
68
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -41,24 +41,24 @@
41
41
  "homepage": "https://github.com/ETSOO/etsoo-smarterp-core#readme",
42
42
  "devDependencies": {
43
43
  "@babel/cli": "^7.26.4",
44
- "@babel/core": "^7.26.9",
45
- "@babel/plugin-transform-runtime": "^7.26.9",
44
+ "@babel/core": "^7.26.10",
45
+ "@babel/plugin-transform-runtime": "^7.26.10",
46
46
  "@babel/preset-env": "^7.26.9",
47
- "@babel/runtime-corejs3": "^7.26.9",
47
+ "@babel/runtime-corejs3": "^7.26.10",
48
48
  "@types/react": "^18.3.1",
49
49
  "@types/react-dom": "^18.3.1",
50
50
  "@vitejs/plugin-react": "^4.3.4",
51
51
  "jsdom": "^26.0.0",
52
52
  "typescript": "^5.8.2",
53
- "vitest": "^3.0.7"
53
+ "vitest": "^3.0.8"
54
54
  },
55
55
  "dependencies": {
56
- "@etsoo/appscript": "^1.6.17",
56
+ "@etsoo/appscript": "^1.6.18",
57
57
  "@etsoo/materialui": "^1.4.97",
58
58
  "@etsoo/react": "^1.8.32",
59
59
  "@etsoo/shared": "^1.2.62",
60
60
  "@etsoo/toolpad": "^1.0.19",
61
- "@mui/material": "^6.4.6",
61
+ "@mui/material": "^6.4.7",
62
62
  "react": "^18.3.1",
63
63
  "react-dom": "^18.3.1"
64
64
  }
package/src/CoreApp.ts CHANGED
@@ -9,6 +9,8 @@ import { IdentityType } from "./dto/IdentityType";
9
9
  import { AuthCodeApi } from "./AuthCodeApi";
10
10
  import { DataTypes, ListType } from "@etsoo/shared";
11
11
 
12
+ type AppData = { id: number; appId?: number; name: string; localName?: string };
13
+
12
14
  /**
13
15
  * Core application interface
14
16
  * 核心应用程序接口
@@ -55,7 +57,7 @@ export interface ICoreApp {
55
57
  * @param data App data
56
58
  * @returns Name
57
59
  */
58
- getAppName(data: { id: number; name: string; localName?: string }): string;
60
+ getAppName(data: AppData): string;
59
61
 
60
62
  /**
61
63
  * Get user identifier type label
@@ -168,8 +170,10 @@ export class CoreApp implements ICoreApp {
168
170
  * @param data App data
169
171
  * @returns Name
170
172
  */
171
- getAppName(data: { id: number; name: string; localName?: string }) {
172
- return data.localName ?? this.app.get(`app${data.id}`) ?? data.name;
173
+ getAppName(data: AppData) {
174
+ return (
175
+ data.localName ?? this.app.get(`app${data.appId ?? data.id}`) ?? data.name
176
+ );
173
177
  }
174
178
 
175
179
  /**
@@ -6,6 +6,11 @@ import { AppQueryData } from "./AppQueryData";
6
6
  * 购买的应用查询数据
7
7
  */
8
8
  export type AppPurchasedQueryData = AppQueryData & {
9
+ /**
10
+ * Global app id
11
+ */
12
+ appId: number;
13
+
9
14
  /**
10
15
  * Expiry
11
16
  * 到期时间
@@ -80,4 +80,10 @@ export type OrgReadDto = {
80
80
  * 用户数
81
81
  */
82
82
  users: number;
83
+
84
+ /**
85
+ * Persons
86
+ * 人员数
87
+ */
88
+ persons: number;
83
89
  };