@etsoo/appscript 1.3.86 → 1.3.88

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.
@@ -4,6 +4,8 @@ import { IApp } from '../app/IApp';
4
4
  import { IActionResult } from '../result/IActionResult';
5
5
  import { BaseApi } from './BaseApi';
6
6
  import { AuditLineDto, AuditLinePayload } from './dto/AuditLineDto';
7
+ import { ResultPayload } from './dto/ResultPayload';
8
+ import { MergeRQ } from './rq/MergeRQ';
7
9
  import { QueryRQ } from './rq/QueryRQ';
8
10
  import { TiplistRQ } from './rq/TiplistRQ';
9
11
  /**
@@ -39,6 +41,13 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
39
41
  * @returns Result
40
42
  */
41
43
  protected listBase<T extends DataTypes.IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
44
+ /**
45
+ * Merge
46
+ * @param rq Request data
47
+ * @param payload Payload
48
+ * @returns Result
49
+ */
50
+ protected mergeBase<T extends DataTypes.IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
42
51
  /**
43
52
  * Query
44
53
  * @param rq Request data
@@ -40,6 +40,15 @@ class EntityApi extends BaseApi_1.BaseApi {
40
40
  listBase(rq, payload) {
41
41
  return this.api.post(`${this.flag}/List`, rq, payload);
42
42
  }
43
+ /**
44
+ * Merge
45
+ * @param rq Request data
46
+ * @param payload Payload
47
+ * @returns Result
48
+ */
49
+ mergeBase(rq, payload) {
50
+ return this.api.put(`${this.flag}/Merge`, rq, payload);
51
+ }
43
52
  /**
44
53
  * Query
45
54
  * @param rq Request data
@@ -0,0 +1,18 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+ /**
3
+ * Merge request data
4
+ */
5
+ export type MergeRQ<T extends DataTypes.IdType = number> = {
6
+ /**
7
+ * Source id
8
+ */
9
+ sourceId: T;
10
+ /**
11
+ * Target id
12
+ */
13
+ targetId: T;
14
+ /**
15
+ * Delete source at the same time
16
+ */
17
+ deleteSource?: boolean;
18
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -119,6 +119,7 @@
119
119
  "open": "Open",
120
120
  "openMenu": "Open menu",
121
121
  "operationSucceeded": "Operation succeeded",
122
+ "others": "Others",
122
123
  "pageNotFound": "Page Not Found",
123
124
  "passwordChangeSuccess": "Password changed successfully, please sign in again",
124
125
  "passwordRepeatError": "The two passwords entered are inconsistent",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "Employer identification number",
191
192
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
193
+ "title": "Title",
192
194
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
193
195
  "type": "Type",
194
196
  "yes": "Yes",
@@ -119,6 +119,7 @@
119
119
  "open": "打开",
120
120
  "openMenu": "打开菜单",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到页面",
123
124
  "passwordChangeSuccess": "密码修改成功,请重新登录",
124
125
  "passwordRepeatError": "两次输入的密码不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主识别号码(EIN)",
191
192
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
193
+ "title": "标题",
192
194
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
193
195
  "type": "类型",
194
196
  "yes": "是",
@@ -119,6 +119,7 @@
119
119
  "open": "打開",
120
120
  "openMenu": "打開菜單",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到頁面",
123
124
  "passwordChangeSuccess": "密碼修改成功,請重新登錄",
124
125
  "passwordRepeatError": "兩次輸入的密碼不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主識別號碼(EIN)",
191
192
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
193
+ "title": "標題",
192
194
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
193
195
  "type": "類型",
194
196
  "yes": "是",
@@ -40,6 +40,7 @@ export * from './erp/dto/ResultPayload';
40
40
  export * from './erp/rq/LoginIdRQ';
41
41
  export * from './erp/rq/LoginRQ';
42
42
  export * from './erp/rq/MemberListRQ';
43
+ export * from './erp/rq/MergeRQ';
43
44
  export * from './erp/rq/OrgListRQ';
44
45
  export * from './erp/rq/OrgQueryRQ';
45
46
  export * from './erp/rq/ParsePinRQ';
package/lib/cjs/index.js CHANGED
@@ -64,6 +64,7 @@ __exportStar(require("./erp/dto/ResultPayload"), exports);
64
64
  __exportStar(require("./erp/rq/LoginIdRQ"), exports);
65
65
  __exportStar(require("./erp/rq/LoginRQ"), exports);
66
66
  __exportStar(require("./erp/rq/MemberListRQ"), exports);
67
+ __exportStar(require("./erp/rq/MergeRQ"), exports);
67
68
  __exportStar(require("./erp/rq/OrgListRQ"), exports);
68
69
  __exportStar(require("./erp/rq/OrgQueryRQ"), exports);
69
70
  __exportStar(require("./erp/rq/ParsePinRQ"), exports);
@@ -4,6 +4,8 @@ import { IApp } from '../app/IApp';
4
4
  import { IActionResult } from '../result/IActionResult';
5
5
  import { BaseApi } from './BaseApi';
6
6
  import { AuditLineDto, AuditLinePayload } from './dto/AuditLineDto';
7
+ import { ResultPayload } from './dto/ResultPayload';
8
+ import { MergeRQ } from './rq/MergeRQ';
7
9
  import { QueryRQ } from './rq/QueryRQ';
8
10
  import { TiplistRQ } from './rq/TiplistRQ';
9
11
  /**
@@ -39,6 +41,13 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
39
41
  * @returns Result
40
42
  */
41
43
  protected listBase<T extends DataTypes.IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
44
+ /**
45
+ * Merge
46
+ * @param rq Request data
47
+ * @param payload Payload
48
+ * @returns Result
49
+ */
50
+ protected mergeBase<T extends DataTypes.IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
42
51
  /**
43
52
  * Query
44
53
  * @param rq Request data
@@ -37,6 +37,15 @@ export class EntityApi extends BaseApi {
37
37
  listBase(rq, payload) {
38
38
  return this.api.post(`${this.flag}/List`, rq, payload);
39
39
  }
40
+ /**
41
+ * Merge
42
+ * @param rq Request data
43
+ * @param payload Payload
44
+ * @returns Result
45
+ */
46
+ mergeBase(rq, payload) {
47
+ return this.api.put(`${this.flag}/Merge`, rq, payload);
48
+ }
40
49
  /**
41
50
  * Query
42
51
  * @param rq Request data
@@ -0,0 +1,18 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+ /**
3
+ * Merge request data
4
+ */
5
+ export type MergeRQ<T extends DataTypes.IdType = number> = {
6
+ /**
7
+ * Source id
8
+ */
9
+ sourceId: T;
10
+ /**
11
+ * Target id
12
+ */
13
+ targetId: T;
14
+ /**
15
+ * Delete source at the same time
16
+ */
17
+ deleteSource?: boolean;
18
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -119,6 +119,7 @@
119
119
  "open": "Open",
120
120
  "openMenu": "Open menu",
121
121
  "operationSucceeded": "Operation succeeded",
122
+ "others": "Others",
122
123
  "pageNotFound": "Page Not Found",
123
124
  "passwordChangeSuccess": "Password changed successfully, please sign in again",
124
125
  "passwordRepeatError": "The two passwords entered are inconsistent",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "Employer identification number",
191
192
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
193
+ "title": "Title",
192
194
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
193
195
  "type": "Type",
194
196
  "yes": "Yes",
@@ -119,6 +119,7 @@
119
119
  "open": "打开",
120
120
  "openMenu": "打开菜单",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到页面",
123
124
  "passwordChangeSuccess": "密码修改成功,请重新登录",
124
125
  "passwordRepeatError": "两次输入的密码不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主识别号码(EIN)",
191
192
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
193
+ "title": "标题",
192
194
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
193
195
  "type": "类型",
194
196
  "yes": "是",
@@ -119,6 +119,7 @@
119
119
  "open": "打開",
120
120
  "openMenu": "打開菜單",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到頁面",
123
124
  "passwordChangeSuccess": "密碼修改成功,請重新登錄",
124
125
  "passwordRepeatError": "兩次輸入的密碼不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主識別號碼(EIN)",
191
192
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
193
+ "title": "標題",
192
194
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
193
195
  "type": "類型",
194
196
  "yes": "是",
@@ -40,6 +40,7 @@ export * from './erp/dto/ResultPayload';
40
40
  export * from './erp/rq/LoginIdRQ';
41
41
  export * from './erp/rq/LoginRQ';
42
42
  export * from './erp/rq/MemberListRQ';
43
+ export * from './erp/rq/MergeRQ';
43
44
  export * from './erp/rq/OrgListRQ';
44
45
  export * from './erp/rq/OrgQueryRQ';
45
46
  export * from './erp/rq/ParsePinRQ';
package/lib/mjs/index.js CHANGED
@@ -47,6 +47,7 @@ export * from './erp/dto/ResultPayload';
47
47
  export * from './erp/rq/LoginIdRQ';
48
48
  export * from './erp/rq/LoginRQ';
49
49
  export * from './erp/rq/MemberListRQ';
50
+ export * from './erp/rq/MergeRQ';
50
51
  export * from './erp/rq/OrgListRQ';
51
52
  export * from './erp/rq/OrgQueryRQ';
52
53
  export * from './erp/rq/ParsePinRQ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.86",
3
+ "version": "1.3.88",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,20 +54,20 @@
54
54
  "dependencies": {
55
55
  "@etsoo/notificationbase": "^1.1.24",
56
56
  "@etsoo/restclient": "^1.0.87",
57
- "@etsoo/shared": "^1.1.94",
57
+ "@etsoo/shared": "^1.1.95",
58
58
  "@types/crypto-js": "^4.1.1",
59
59
  "crypto-js": "^4.1.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/cli": "^7.21.0",
63
- "@babel/core": "^7.21.3",
64
- "@babel/plugin-transform-runtime": "^7.21.0",
65
- "@babel/preset-env": "^7.20.2",
63
+ "@babel/core": "^7.21.4",
64
+ "@babel/plugin-transform-runtime": "^7.21.4",
65
+ "@babel/preset-env": "^7.21.4",
66
66
  "@babel/runtime-corejs3": "^7.21.0",
67
67
  "@types/jest": "^29.5.0",
68
68
  "jest": "^29.5.0",
69
69
  "jest-environment-jsdom": "^29.5.0",
70
70
  "ts-jest": "^29.0.5",
71
- "typescript": "^5.0.2"
71
+ "typescript": "^5.0.3"
72
72
  }
73
73
  }
@@ -4,6 +4,8 @@ import { IApp } from '../app/IApp';
4
4
  import { IActionResult } from '../result/IActionResult';
5
5
  import { BaseApi } from './BaseApi';
6
6
  import { AuditLineDto, AuditLinePayload } from './dto/AuditLineDto';
7
+ import { ResultPayload } from './dto/ResultPayload';
8
+ import { MergeRQ } from './rq/MergeRQ';
7
9
  import { QueryRQ } from './rq/QueryRQ';
8
10
  import { TiplistRQ } from './rq/TiplistRQ';
9
11
 
@@ -75,6 +77,19 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
75
77
  return this.api.post(`${this.flag}/List`, rq, payload);
76
78
  }
77
79
 
80
+ /**
81
+ * Merge
82
+ * @param rq Request data
83
+ * @param payload Payload
84
+ * @returns Result
85
+ */
86
+ protected mergeBase<T extends DataTypes.IdType = number>(
87
+ rq: MergeRQ<T>,
88
+ payload?: ResultPayload
89
+ ) {
90
+ return this.api.put(`${this.flag}/Merge`, rq, payload);
91
+ }
92
+
78
93
  /**
79
94
  * Query
80
95
  * @param rq Request data
@@ -0,0 +1,21 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+
3
+ /**
4
+ * Merge request data
5
+ */
6
+ export type MergeRQ<T extends DataTypes.IdType = number> = {
7
+ /**
8
+ * Source id
9
+ */
10
+ sourceId: T;
11
+
12
+ /**
13
+ * Target id
14
+ */
15
+ targetId: T;
16
+
17
+ /**
18
+ * Delete source at the same time
19
+ */
20
+ deleteSource?: boolean;
21
+ };
package/src/i18n/en.json CHANGED
@@ -119,6 +119,7 @@
119
119
  "open": "Open",
120
120
  "openMenu": "Open menu",
121
121
  "operationSucceeded": "Operation succeeded",
122
+ "others": "Others",
122
123
  "pageNotFound": "Page Not Found",
123
124
  "passwordChangeSuccess": "Password changed successfully, please sign in again",
124
125
  "passwordRepeatError": "The two passwords entered are inconsistent",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "Employer identification number",
191
192
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
193
+ "title": "Title",
192
194
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
193
195
  "type": "Type",
194
196
  "yes": "Yes",
@@ -119,6 +119,7 @@
119
119
  "open": "打开",
120
120
  "openMenu": "打开菜单",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到页面",
123
124
  "passwordChangeSuccess": "密码修改成功,请重新登录",
124
125
  "passwordRepeatError": "两次输入的密码不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主识别号码(EIN)",
191
192
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
193
+ "title": "标题",
192
194
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
193
195
  "type": "类型",
194
196
  "yes": "是",
@@ -119,6 +119,7 @@
119
119
  "open": "打開",
120
120
  "openMenu": "打開菜單",
121
121
  "operationSucceeded": "操作成功",
122
+ "others": "其他",
122
123
  "pageNotFound": "找不到頁面",
123
124
  "passwordChangeSuccess": "密碼修改成功,請重新登錄",
124
125
  "passwordRepeatError": "兩次輸入的密碼不一致",
@@ -189,6 +190,7 @@
189
190
  "taxNZIRD": "IRD",
190
191
  "taxUSEIN": "雇主識別號碼(EIN)",
191
192
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
193
+ "title": "標題",
192
194
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
193
195
  "type": "類型",
194
196
  "yes": "是",
package/src/index.ts CHANGED
@@ -53,6 +53,7 @@ export * from './erp/dto/ResultPayload';
53
53
  export * from './erp/rq/LoginIdRQ';
54
54
  export * from './erp/rq/LoginRQ';
55
55
  export * from './erp/rq/MemberListRQ';
56
+ export * from './erp/rq/MergeRQ';
56
57
  export * from './erp/rq/OrgListRQ';
57
58
  export * from './erp/rq/OrgQueryRQ';
58
59
  export * from './erp/rq/ParsePinRQ';