@etsoo/smarterp-core 1.0.9 → 1.0.11

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.
@@ -44,6 +44,12 @@ export declare class UserApi extends EntityApi {
44
44
  * @returns Result
45
45
  */
46
46
  auditHistory(rq: AuditHistoryRQ, payload?: IApiPayload<AuditHistoryDto[]>): Promise<AuditHistoryDto[] | undefined>;
47
+ /**
48
+ * Check app session
49
+ * @param payload Payload
50
+ * @returns Result
51
+ */
52
+ checkSession(payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
47
53
  /**
48
54
  * Delete user identifier
49
55
  * @param id Identifier id
@@ -50,6 +50,14 @@ class UserApi extends appscript_1.EntityApi {
50
50
  auditHistory(rq, payload) {
51
51
  return this.api.post(`${this.flag}/AuditHistory`, rq, payload);
52
52
  }
53
+ /**
54
+ * Check app session
55
+ * @param payload Payload
56
+ * @returns Result
57
+ */
58
+ checkSession(payload) {
59
+ return this.api.post(`${this.flag}/CheckSession/${this.app.settings.appId}`, undefined, payload);
60
+ }
53
61
  /**
54
62
  * Delete user identifier
55
63
  * @param id Identifier id
@@ -18,7 +18,7 @@ export type AppUrl = {
18
18
  };
19
19
  /**
20
20
  * Application data
21
- * 程序数据
21
+ * 应用数据
22
22
  */
23
23
  export type AppData = {
24
24
  /**
@@ -19,6 +19,14 @@ export type AuditHistoryDto = {
19
19
  * Title
20
20
  */
21
21
  title: string;
22
+ /**
23
+ * Organization id
24
+ */
25
+ organizationId?: number;
26
+ /**
27
+ * Application id
28
+ */
29
+ appId: number;
22
30
  /**
23
31
  * JSON data
24
32
  */
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "Current user",
3
3
  "appKey": "App key",
4
4
  "appSecret": "App secret",
5
+ "app": "App",
5
6
  "app1": "Admin Center",
6
7
  "app2": "O&M System",
7
8
  "app3": "Business Mgt.",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "Switch to dark mode",
70
71
  "switchToLightModeAriaLabel": "Switch to light mode",
71
72
  "switchOrg": "Switch organization",
73
+ "target": "Target",
74
+ "targetId": "Target id",
72
75
  "years5": ["1 year", "2 years", "3 years", "4 years", "5 years"],
73
76
  "uiTypeEmail": "Email",
74
77
  "uiTypeMobile": "Mobile",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "当前用户",
3
3
  "appKey": "应用键",
4
4
  "appSecret": "应用密钥",
5
+ "app": "应用",
5
6
  "app1": "管理中心",
6
7
  "app2": "运维中心",
7
8
  "app3": "业务管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切换到深色模式",
70
71
  "switchToLightModeAriaLabel": "切换到浅色模式",
71
72
  "switchOrg": "切换机构",
73
+ "target": "目标",
74
+ "targetId": "目标编号",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "电子邮箱",
74
77
  "uiTypeMobile": "手机号",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "當前用戶",
3
3
  "appKey": "應用程式鍵",
4
4
  "appSecret": "應用金鑰",
5
+ "app": "應用",
5
6
  "app1": "管理中心",
6
7
  "app2": "運維中心",
7
8
  "app3": "業務管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切換到深色模式",
70
71
  "switchToLightModeAriaLabel": "切換到淺色模式",
71
72
  "switchOrg": "切換機構",
73
+ "target": "目標",
74
+ "targetId": "目標編號",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "電子郵件",
74
77
  "uiTypeMobile": "手機號碼",
@@ -44,6 +44,12 @@ export declare class UserApi extends EntityApi {
44
44
  * @returns Result
45
45
  */
46
46
  auditHistory(rq: AuditHistoryRQ, payload?: IApiPayload<AuditHistoryDto[]>): Promise<AuditHistoryDto[] | undefined>;
47
+ /**
48
+ * Check app session
49
+ * @param payload Payload
50
+ * @returns Result
51
+ */
52
+ checkSession(payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
47
53
  /**
48
54
  * Delete user identifier
49
55
  * @param id Identifier id
@@ -47,6 +47,14 @@ export class UserApi extends EntityApi {
47
47
  auditHistory(rq, payload) {
48
48
  return this.api.post(`${this.flag}/AuditHistory`, rq, payload);
49
49
  }
50
+ /**
51
+ * Check app session
52
+ * @param payload Payload
53
+ * @returns Result
54
+ */
55
+ checkSession(payload) {
56
+ return this.api.post(`${this.flag}/CheckSession/${this.app.settings.appId}`, undefined, payload);
57
+ }
50
58
  /**
51
59
  * Delete user identifier
52
60
  * @param id Identifier id
@@ -18,7 +18,7 @@ export type AppUrl = {
18
18
  };
19
19
  /**
20
20
  * Application data
21
- * 程序数据
21
+ * 应用数据
22
22
  */
23
23
  export type AppData = {
24
24
  /**
@@ -19,6 +19,14 @@ export type AuditHistoryDto = {
19
19
  * Title
20
20
  */
21
21
  title: string;
22
+ /**
23
+ * Organization id
24
+ */
25
+ organizationId?: number;
26
+ /**
27
+ * Application id
28
+ */
29
+ appId: number;
22
30
  /**
23
31
  * JSON data
24
32
  */
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "Current user",
3
3
  "appKey": "App key",
4
4
  "appSecret": "App secret",
5
+ "app": "App",
5
6
  "app1": "Admin Center",
6
7
  "app2": "O&M System",
7
8
  "app3": "Business Mgt.",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "Switch to dark mode",
70
71
  "switchToLightModeAriaLabel": "Switch to light mode",
71
72
  "switchOrg": "Switch organization",
73
+ "target": "Target",
74
+ "targetId": "Target id",
72
75
  "years5": ["1 year", "2 years", "3 years", "4 years", "5 years"],
73
76
  "uiTypeEmail": "Email",
74
77
  "uiTypeMobile": "Mobile",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "当前用户",
3
3
  "appKey": "应用键",
4
4
  "appSecret": "应用密钥",
5
+ "app": "应用",
5
6
  "app1": "管理中心",
6
7
  "app2": "运维中心",
7
8
  "app3": "业务管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切换到深色模式",
70
71
  "switchToLightModeAriaLabel": "切换到浅色模式",
71
72
  "switchOrg": "切换机构",
73
+ "target": "目标",
74
+ "targetId": "目标编号",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "电子邮箱",
74
77
  "uiTypeMobile": "手机号",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "當前用戶",
3
3
  "appKey": "應用程式鍵",
4
4
  "appSecret": "應用金鑰",
5
+ "app": "應用",
5
6
  "app1": "管理中心",
6
7
  "app2": "運維中心",
7
8
  "app3": "業務管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切換到深色模式",
70
71
  "switchToLightModeAriaLabel": "切換到淺色模式",
71
72
  "switchOrg": "切換機構",
73
+ "target": "目標",
74
+ "targetId": "目標編號",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "電子郵件",
74
77
  "uiTypeMobile": "手機號碼",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -50,15 +50,15 @@
50
50
  "@vitejs/plugin-react": "^4.3.4",
51
51
  "jsdom": "^26.0.0",
52
52
  "typescript": "^5.7.3",
53
- "vitest": "^3.0.5"
53
+ "vitest": "^3.0.6"
54
54
  },
55
55
  "dependencies": {
56
- "@etsoo/appscript": "^1.6.8",
56
+ "@etsoo/appscript": "^1.6.9",
57
57
  "@etsoo/materialui": "^1.4.82",
58
58
  "@etsoo/react": "^1.8.31",
59
59
  "@etsoo/shared": "^1.2.61",
60
60
  "@etsoo/toolpad": "^1.0.15",
61
- "@mui/material": "^6.4.4",
61
+ "@mui/material": "^6.4.5",
62
62
  "react": "^18.3.1",
63
63
  "react-dom": "^18.3.1"
64
64
  }
package/src/UserApi.ts CHANGED
@@ -67,6 +67,19 @@ export class UserApi extends EntityApi {
67
67
  return this.api.post(`${this.flag}/AuditHistory`, rq, payload);
68
68
  }
69
69
 
70
+ /**
71
+ * Check app session
72
+ * @param payload Payload
73
+ * @returns Result
74
+ */
75
+ checkSession(payload?: IdResultPayload) {
76
+ return this.api.post(
77
+ `${this.flag}/CheckSession/${this.app.settings.appId}`,
78
+ undefined,
79
+ payload
80
+ );
81
+ }
82
+
70
83
  /**
71
84
  * Delete user identifier
72
85
  * @param id Identifier id
@@ -21,7 +21,7 @@ export type AppUrl = {
21
21
 
22
22
  /**
23
23
  * Application data
24
- * 程序数据
24
+ * 应用数据
25
25
  */
26
26
  export type AppData = {
27
27
  /**
@@ -23,6 +23,16 @@ export type AuditHistoryDto = {
23
23
  */
24
24
  title: string;
25
25
 
26
+ /**
27
+ * Organization id
28
+ */
29
+ organizationId?: number;
30
+
31
+ /**
32
+ * Application id
33
+ */
34
+ appId: number;
35
+
26
36
  /**
27
37
  * JSON data
28
38
  */
package/src/i18n/en.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "Current user",
3
3
  "appKey": "App key",
4
4
  "appSecret": "App secret",
5
+ "app": "App",
5
6
  "app1": "Admin Center",
6
7
  "app2": "O&M System",
7
8
  "app3": "Business Mgt.",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "Switch to dark mode",
70
71
  "switchToLightModeAriaLabel": "Switch to light mode",
71
72
  "switchOrg": "Switch organization",
73
+ "target": "Target",
74
+ "targetId": "Target id",
72
75
  "years5": ["1 year", "2 years", "3 years", "4 years", "5 years"],
73
76
  "uiTypeEmail": "Email",
74
77
  "uiTypeMobile": "Mobile",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "当前用户",
3
3
  "appKey": "应用键",
4
4
  "appSecret": "应用密钥",
5
+ "app": "应用",
5
6
  "app1": "管理中心",
6
7
  "app2": "运维中心",
7
8
  "app3": "业务管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切换到深色模式",
70
71
  "switchToLightModeAriaLabel": "切换到浅色模式",
71
72
  "switchOrg": "切换机构",
73
+ "target": "目标",
74
+ "targetId": "目标编号",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "电子邮箱",
74
77
  "uiTypeMobile": "手机号",
@@ -2,6 +2,7 @@
2
2
  "accountIconButtonAriaLabel": "當前用戶",
3
3
  "appKey": "應用程式鍵",
4
4
  "appSecret": "應用金鑰",
5
+ "app": "應用",
5
6
  "app1": "管理中心",
6
7
  "app2": "運維中心",
7
8
  "app3": "業務管理",
@@ -69,6 +70,8 @@
69
70
  "switchToDarkModeAriaLabel": "切換到深色模式",
70
71
  "switchToLightModeAriaLabel": "切換到淺色模式",
71
72
  "switchOrg": "切換機構",
73
+ "target": "目標",
74
+ "targetId": "目標編號",
72
75
  "years5": ["1年", "2年", "3年", "4年", "5年"],
73
76
  "uiTypeEmail": "電子郵件",
74
77
  "uiTypeMobile": "手機號碼",