@etsoo/appscript 1.3.47 → 1.3.49

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.
@@ -32,17 +32,17 @@ exports.AddressRegion = AddressRegion;
32
32
  /**
33
33
  * CN - China
34
34
  */
35
- AddressRegion.CN = new AddressRegion('CN', 'CHN', '156', AddressContinent_1.AddressContinent.AS, '00', '+86', '0', 'CNY', ['zh-CN']);
35
+ AddressRegion.CN = new AddressRegion('CN', 'CHN', '156', AddressContinent_1.AddressContinent.AS, '00', '+86', '0', 'CNY', ['zh-Hans-CN', 'zh-CN']);
36
36
  /**
37
37
  * HK - HK, China
38
38
  * 中国香港
39
39
  */
40
- AddressRegion.HK = new AddressRegion('HK', 'HKG', '344', AddressContinent_1.AddressContinent.AS, '001', '+852', undefined, 'HKD', ['zh-HK', 'en-HK']);
40
+ AddressRegion.HK = new AddressRegion('HK', 'HKG', '344', AddressContinent_1.AddressContinent.AS, '001', '+852', undefined, 'HKD', ['zh-Hant-HK', 'zh-HK', 'en-HK']);
41
41
  /**
42
42
  * SG - Singapore
43
43
  * 新加坡
44
44
  */
45
- AddressRegion.SG = new AddressRegion('SG', 'SGP', '702', AddressContinent_1.AddressContinent.AS, '000', '+65', undefined, 'SGD', ['zh-SG', 'en-SG']);
45
+ AddressRegion.SG = new AddressRegion('SG', 'SGP', '702', AddressContinent_1.AddressContinent.AS, '000', '+65', undefined, 'SGD', ['zh-Hans-SG', 'zh-SG', 'en-SG']);
46
46
  /**
47
47
  * JP - Japan
48
48
  * 日本
@@ -0,0 +1,33 @@
1
+ import { IApiPayload } from '@etsoo/restclient';
2
+ import { IActionResult } from '../result/IActionResult';
3
+ import { IUser } from '../state/User';
4
+ import { BaseApi } from './BaseApi';
5
+ import { ResultPayload } from './dto/ResultPayload';
6
+ import { LoginRQ } from './rq/LoginRQ';
7
+ import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
8
+ /**
9
+ * Authentication API
10
+ */
11
+ export declare class AuthApi extends BaseApi {
12
+ /**
13
+ * Login
14
+ * @param rq Request data
15
+ * @param payload Payload
16
+ * @returns Result
17
+ */
18
+ protected loginBase<T extends IUser>(rq: LoginRQ, payload?: IApiPayload<IActionResult<T>>): Promise<[IActionResult<T> | undefined, string | null]>;
19
+ /**
20
+ * Login id check
21
+ * @param id Check id
22
+ * @param payload Payload
23
+ * @returns Result
24
+ */
25
+ loginId(id: string, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
26
+ /**
27
+ * Reset password
28
+ * @param rq Request data
29
+ * @param payload Payload
30
+ * @returns Result
31
+ */
32
+ resetPassword(rq: ResetPasswordRQ, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
33
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthApi = void 0;
4
+ const BaseApi_1 = require("./BaseApi");
5
+ /**
6
+ * Authentication API
7
+ */
8
+ class AuthApi extends BaseApi_1.BaseApi {
9
+ /**
10
+ * Login
11
+ * @param rq Request data
12
+ * @param payload Payload
13
+ * @returns Result
14
+ */
15
+ async loginBase(rq, payload) {
16
+ payload !== null && payload !== void 0 ? payload : (payload = {});
17
+ const result = await this.api.post('Auth/Login', rq, payload);
18
+ const refreshToken = (result === null || result === void 0 ? void 0 : result.ok)
19
+ ? this.app.getResponseToken(payload.response)
20
+ : null;
21
+ return [result, refreshToken];
22
+ }
23
+ /**
24
+ * Login id check
25
+ * @param id Check id
26
+ * @param payload Payload
27
+ * @returns Result
28
+ */
29
+ loginId(id, payload) {
30
+ const { deviceId, region } = this.app;
31
+ id = this.app.encrypt(id);
32
+ const rq = {
33
+ id,
34
+ deviceId,
35
+ region
36
+ };
37
+ return this.api.get('Auth/LoginId', rq, payload);
38
+ }
39
+ /**
40
+ * Reset password
41
+ * @param rq Request data
42
+ * @param payload Payload
43
+ * @returns Result
44
+ */
45
+ resetPassword(rq, payload) {
46
+ return this.api.put('Auth/ResetPassword', rq, payload);
47
+ }
48
+ }
49
+ exports.AuthApi = AuthApi;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Login id request data
3
+ */
4
+ export type LoginIdRQ = {
5
+ /**
6
+ * Device id
7
+ */
8
+ deviceId: string;
9
+ /**
10
+ * Username, Email or mobile
11
+ */
12
+ id: string;
13
+ /**
14
+ * Country or region
15
+ */
16
+ region: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+ import { LoginIdRQ } from './LoginIdRQ';
3
+ /**
4
+ * Login request data
5
+ */
6
+ export type LoginRQ = LoginIdRQ & {
7
+ /**
8
+ * Password
9
+ */
10
+ pwd: string;
11
+ /**
12
+ * Organization
13
+ */
14
+ org?: number;
15
+ /**
16
+ * Time zone
17
+ */
18
+ timezone?: string;
19
+ /**
20
+ * Service id or uid
21
+ */
22
+ serviceId?: DataTypes.IdType;
23
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ export type ResetPasswordRQ = {
2
+ /**
3
+ * Email or mobile
4
+ */
5
+ id: string;
6
+ /**
7
+ * Verification code id
8
+ */
9
+ codeId: string;
10
+ /**
11
+ * Device id
12
+ */
13
+ deviceId: string;
14
+ /**
15
+ * New password
16
+ */
17
+ password: string;
18
+ /**
19
+ * Country or region
20
+ */
21
+ region: string;
22
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -28,14 +28,18 @@ export * from './erp/dto/OrgQueryDto';
28
28
  export * from './erp/dto/OrgViewDto';
29
29
  export * from './erp/dto/PublicProductDto';
30
30
  export * from './erp/dto/ResultPayload';
31
+ export * from './erp/rq/LoginIdRQ';
32
+ export * from './erp/rq/LoginRQ';
31
33
  export * from './erp/rq/MemberListRQ';
32
34
  export * from './erp/rq/OrgListRQ';
33
35
  export * from './erp/rq/OrgQueryRQ';
34
36
  export * from './erp/rq/QueryRQ';
35
37
  export * from './erp/rq/RefreshTokenRQ';
36
38
  export * from './erp/rq/RegionsRQ';
39
+ export * from './erp/rq/ResetPasswordRQ';
37
40
  export * from './erp/rq/TiplistRQ';
38
41
  export * from './erp/AddressApi';
42
+ export * from './erp/AuthApi';
39
43
  export * from './erp/BaseApi';
40
44
  export * from './erp/EntityApi';
41
45
  export * from './erp/MemberApi';
package/lib/cjs/index.js CHANGED
@@ -52,15 +52,19 @@ __exportStar(require("./erp/dto/OrgViewDto"), exports);
52
52
  __exportStar(require("./erp/dto/PublicProductDto"), exports);
53
53
  __exportStar(require("./erp/dto/ResultPayload"), exports);
54
54
  // erp rq
55
+ __exportStar(require("./erp/rq/LoginIdRQ"), exports);
56
+ __exportStar(require("./erp/rq/LoginRQ"), exports);
55
57
  __exportStar(require("./erp/rq/MemberListRQ"), exports);
56
58
  __exportStar(require("./erp/rq/OrgListRQ"), exports);
57
59
  __exportStar(require("./erp/rq/OrgQueryRQ"), exports);
58
60
  __exportStar(require("./erp/rq/QueryRQ"), exports);
59
61
  __exportStar(require("./erp/rq/RefreshTokenRQ"), exports);
60
62
  __exportStar(require("./erp/rq/RegionsRQ"), exports);
63
+ __exportStar(require("./erp/rq/ResetPasswordRQ"), exports);
61
64
  __exportStar(require("./erp/rq/TiplistRQ"), exports);
62
65
  // erp api
63
66
  __exportStar(require("./erp/AddressApi"), exports);
67
+ __exportStar(require("./erp/AuthApi"), exports);
64
68
  __exportStar(require("./erp/BaseApi"), exports);
65
69
  __exportStar(require("./erp/EntityApi"), exports);
66
70
  __exportStar(require("./erp/MemberApi"), exports);
@@ -28,17 +28,17 @@ export class AddressRegion {
28
28
  /**
29
29
  * CN - China
30
30
  */
31
- AddressRegion.CN = new AddressRegion('CN', 'CHN', '156', AddressContinent.AS, '00', '+86', '0', 'CNY', ['zh-CN']);
31
+ AddressRegion.CN = new AddressRegion('CN', 'CHN', '156', AddressContinent.AS, '00', '+86', '0', 'CNY', ['zh-Hans-CN', 'zh-CN']);
32
32
  /**
33
33
  * HK - HK, China
34
34
  * 中国香港
35
35
  */
36
- AddressRegion.HK = new AddressRegion('HK', 'HKG', '344', AddressContinent.AS, '001', '+852', undefined, 'HKD', ['zh-HK', 'en-HK']);
36
+ AddressRegion.HK = new AddressRegion('HK', 'HKG', '344', AddressContinent.AS, '001', '+852', undefined, 'HKD', ['zh-Hant-HK', 'zh-HK', 'en-HK']);
37
37
  /**
38
38
  * SG - Singapore
39
39
  * 新加坡
40
40
  */
41
- AddressRegion.SG = new AddressRegion('SG', 'SGP', '702', AddressContinent.AS, '000', '+65', undefined, 'SGD', ['zh-SG', 'en-SG']);
41
+ AddressRegion.SG = new AddressRegion('SG', 'SGP', '702', AddressContinent.AS, '000', '+65', undefined, 'SGD', ['zh-Hans-SG', 'zh-SG', 'en-SG']);
42
42
  /**
43
43
  * JP - Japan
44
44
  * 日本
@@ -0,0 +1,33 @@
1
+ import { IApiPayload } from '@etsoo/restclient';
2
+ import { IActionResult } from '../result/IActionResult';
3
+ import { IUser } from '../state/User';
4
+ import { BaseApi } from './BaseApi';
5
+ import { ResultPayload } from './dto/ResultPayload';
6
+ import { LoginRQ } from './rq/LoginRQ';
7
+ import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
8
+ /**
9
+ * Authentication API
10
+ */
11
+ export declare class AuthApi extends BaseApi {
12
+ /**
13
+ * Login
14
+ * @param rq Request data
15
+ * @param payload Payload
16
+ * @returns Result
17
+ */
18
+ protected loginBase<T extends IUser>(rq: LoginRQ, payload?: IApiPayload<IActionResult<T>>): Promise<[IActionResult<T> | undefined, string | null]>;
19
+ /**
20
+ * Login id check
21
+ * @param id Check id
22
+ * @param payload Payload
23
+ * @returns Result
24
+ */
25
+ loginId(id: string, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
26
+ /**
27
+ * Reset password
28
+ * @param rq Request data
29
+ * @param payload Payload
30
+ * @returns Result
31
+ */
32
+ resetPassword(rq: ResetPasswordRQ, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
33
+ }
@@ -0,0 +1,45 @@
1
+ import { BaseApi } from './BaseApi';
2
+ /**
3
+ * Authentication API
4
+ */
5
+ export class AuthApi extends BaseApi {
6
+ /**
7
+ * Login
8
+ * @param rq Request data
9
+ * @param payload Payload
10
+ * @returns Result
11
+ */
12
+ async loginBase(rq, payload) {
13
+ payload !== null && payload !== void 0 ? payload : (payload = {});
14
+ const result = await this.api.post('Auth/Login', rq, payload);
15
+ const refreshToken = (result === null || result === void 0 ? void 0 : result.ok)
16
+ ? this.app.getResponseToken(payload.response)
17
+ : null;
18
+ return [result, refreshToken];
19
+ }
20
+ /**
21
+ * Login id check
22
+ * @param id Check id
23
+ * @param payload Payload
24
+ * @returns Result
25
+ */
26
+ loginId(id, payload) {
27
+ const { deviceId, region } = this.app;
28
+ id = this.app.encrypt(id);
29
+ const rq = {
30
+ id,
31
+ deviceId,
32
+ region
33
+ };
34
+ return this.api.get('Auth/LoginId', rq, payload);
35
+ }
36
+ /**
37
+ * Reset password
38
+ * @param rq Request data
39
+ * @param payload Payload
40
+ * @returns Result
41
+ */
42
+ resetPassword(rq, payload) {
43
+ return this.api.put('Auth/ResetPassword', rq, payload);
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Login id request data
3
+ */
4
+ export type LoginIdRQ = {
5
+ /**
6
+ * Device id
7
+ */
8
+ deviceId: string;
9
+ /**
10
+ * Username, Email or mobile
11
+ */
12
+ id: string;
13
+ /**
14
+ * Country or region
15
+ */
16
+ region: string;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+ import { LoginIdRQ } from './LoginIdRQ';
3
+ /**
4
+ * Login request data
5
+ */
6
+ export type LoginRQ = LoginIdRQ & {
7
+ /**
8
+ * Password
9
+ */
10
+ pwd: string;
11
+ /**
12
+ * Organization
13
+ */
14
+ org?: number;
15
+ /**
16
+ * Time zone
17
+ */
18
+ timezone?: string;
19
+ /**
20
+ * Service id or uid
21
+ */
22
+ serviceId?: DataTypes.IdType;
23
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ export type ResetPasswordRQ = {
2
+ /**
3
+ * Email or mobile
4
+ */
5
+ id: string;
6
+ /**
7
+ * Verification code id
8
+ */
9
+ codeId: string;
10
+ /**
11
+ * Device id
12
+ */
13
+ deviceId: string;
14
+ /**
15
+ * New password
16
+ */
17
+ password: string;
18
+ /**
19
+ * Country or region
20
+ */
21
+ region: string;
22
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import enUSResources from './en.json';
1
+ import enResources from './en.json';
2
2
  /**
3
3
  * Get en neutral culture
4
4
  * @param localResources Local resources
@@ -7,6 +7,6 @@ import enUSResources from './en.json';
7
7
  export const en = (localResources) => ({
8
8
  name: 'en',
9
9
  label: 'English',
10
- resources: { ...enUSResources, ...localResources },
10
+ resources: { ...enResources, ...localResources },
11
11
  compatibleNames: []
12
12
  });
@@ -1,4 +1,4 @@
1
- import zhCNResources from './zh-Hans.json';
1
+ import zhHansResources from './zh-Hans.json';
2
2
  /**
3
3
  * Get zh-Hans neutral cultrue
4
4
  * @param localResources Local resources
@@ -7,6 +7,6 @@ import zhCNResources from './zh-Hans.json';
7
7
  export const zhHans = (localResources) => ({
8
8
  name: 'zh-Hans',
9
9
  label: '简体中文',
10
- resources: { ...zhCNResources, ...localResources },
10
+ resources: { ...zhHansResources, ...localResources },
11
11
  compatibleNames: ['zh-CN', 'zh-SG']
12
12
  });
@@ -1,4 +1,4 @@
1
- import zhHKResources from './zh-Hant.json';
1
+ import zhHantResources from './zh-Hant.json';
2
2
  /**
3
3
  * Get zh-Hant neutral cultrue
4
4
  * @param localResources Local resources
@@ -7,6 +7,6 @@ import zhHKResources from './zh-Hant.json';
7
7
  export const zhHant = (localResources) => ({
8
8
  name: 'zh-Hant',
9
9
  label: '繁體中文',
10
- resources: { ...zhHKResources, ...localResources },
10
+ resources: { ...zhHantResources, ...localResources },
11
11
  compatibleNames: ['zh-HK', 'zh-TW', 'zh-MO']
12
12
  });
@@ -28,14 +28,18 @@ export * from './erp/dto/OrgQueryDto';
28
28
  export * from './erp/dto/OrgViewDto';
29
29
  export * from './erp/dto/PublicProductDto';
30
30
  export * from './erp/dto/ResultPayload';
31
+ export * from './erp/rq/LoginIdRQ';
32
+ export * from './erp/rq/LoginRQ';
31
33
  export * from './erp/rq/MemberListRQ';
32
34
  export * from './erp/rq/OrgListRQ';
33
35
  export * from './erp/rq/OrgQueryRQ';
34
36
  export * from './erp/rq/QueryRQ';
35
37
  export * from './erp/rq/RefreshTokenRQ';
36
38
  export * from './erp/rq/RegionsRQ';
39
+ export * from './erp/rq/ResetPasswordRQ';
37
40
  export * from './erp/rq/TiplistRQ';
38
41
  export * from './erp/AddressApi';
42
+ export * from './erp/AuthApi';
39
43
  export * from './erp/BaseApi';
40
44
  export * from './erp/EntityApi';
41
45
  export * from './erp/MemberApi';
package/lib/mjs/index.js CHANGED
@@ -35,15 +35,19 @@ export * from './erp/dto/OrgViewDto';
35
35
  export * from './erp/dto/PublicProductDto';
36
36
  export * from './erp/dto/ResultPayload';
37
37
  // erp rq
38
+ export * from './erp/rq/LoginIdRQ';
39
+ export * from './erp/rq/LoginRQ';
38
40
  export * from './erp/rq/MemberListRQ';
39
41
  export * from './erp/rq/OrgListRQ';
40
42
  export * from './erp/rq/OrgQueryRQ';
41
43
  export * from './erp/rq/QueryRQ';
42
44
  export * from './erp/rq/RefreshTokenRQ';
43
45
  export * from './erp/rq/RegionsRQ';
46
+ export * from './erp/rq/ResetPasswordRQ';
44
47
  export * from './erp/rq/TiplistRQ';
45
48
  // erp api
46
49
  export * from './erp/AddressApi';
50
+ export * from './erp/AuthApi';
47
51
  export * from './erp/BaseApi';
48
52
  export * from './erp/EntityApi';
49
53
  export * from './erp/MemberApi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.47",
3
+ "version": "1.3.49",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -52,9 +52,9 @@
52
52
  },
53
53
  "homepage": "https://github.com/ETSOO/AppScript#readme",
54
54
  "dependencies": {
55
- "@etsoo/notificationbase": "^1.1.18",
56
- "@etsoo/restclient": "^1.0.79",
57
- "@etsoo/shared": "^1.1.81",
55
+ "@etsoo/notificationbase": "^1.1.20",
56
+ "@etsoo/restclient": "^1.0.80",
57
+ "@etsoo/shared": "^1.1.84",
58
58
  "@types/crypto-js": "^4.1.1",
59
59
  "crypto-js": "^4.1.1"
60
60
  },
@@ -64,15 +64,15 @@
64
64
  "@babel/plugin-transform-runtime": "^7.19.6",
65
65
  "@babel/preset-env": "^7.20.2",
66
66
  "@babel/runtime-corejs3": "^7.20.6",
67
- "@types/jest": "^29.2.3",
68
- "@typescript-eslint/eslint-plugin": "^5.45.0",
69
- "@typescript-eslint/parser": "^5.45.0",
70
- "eslint": "^8.29.0",
67
+ "@types/jest": "^29.2.4",
68
+ "@typescript-eslint/eslint-plugin": "^5.47.0",
69
+ "@typescript-eslint/parser": "^5.47.0",
70
+ "eslint": "^8.30.0",
71
71
  "eslint-config-airbnb-base": "^15.0.0",
72
72
  "eslint-plugin-import": "^2.26.0",
73
73
  "jest": "^29.3.1",
74
74
  "jest-environment-jsdom": "^29.3.1",
75
75
  "ts-jest": "^29.0.3",
76
- "typescript": "^4.9.3"
76
+ "typescript": "^4.9.4"
77
77
  }
78
78
  }
@@ -100,7 +100,7 @@ export class AddressRegion implements IAddressRegion {
100
100
  '+86',
101
101
  '0',
102
102
  'CNY',
103
- ['zh-CN']
103
+ ['zh-Hans-CN', 'zh-CN']
104
104
  );
105
105
 
106
106
  /**
@@ -116,7 +116,7 @@ export class AddressRegion implements IAddressRegion {
116
116
  '+852',
117
117
  undefined,
118
118
  'HKD',
119
- ['zh-HK', 'en-HK']
119
+ ['zh-Hant-HK', 'zh-HK', 'en-HK']
120
120
  );
121
121
 
122
122
  /**
@@ -132,7 +132,7 @@ export class AddressRegion implements IAddressRegion {
132
132
  '+65',
133
133
  undefined,
134
134
  'SGD',
135
- ['zh-SG', 'en-SG']
135
+ ['zh-Hans-SG', 'zh-SG', 'en-SG']
136
136
  );
137
137
 
138
138
  /**
@@ -0,0 +1,58 @@
1
+ import { IApiPayload } from '@etsoo/restclient';
2
+ import { IActionResult } from '../result/IActionResult';
3
+ import { IUser } from '../state/User';
4
+ import { BaseApi } from './BaseApi';
5
+ import { ResultPayload } from './dto/ResultPayload';
6
+ import { LoginIdRQ } from './rq/LoginIdRQ';
7
+ import { LoginRQ } from './rq/LoginRQ';
8
+ import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
9
+
10
+ /**
11
+ * Authentication API
12
+ */
13
+ export class AuthApi extends BaseApi {
14
+ /**
15
+ * Login
16
+ * @param rq Request data
17
+ * @param payload Payload
18
+ * @returns Result
19
+ */
20
+ protected async loginBase<T extends IUser>(
21
+ rq: LoginRQ,
22
+ payload?: IApiPayload<IActionResult<T>>
23
+ ): Promise<[IActionResult<T> | undefined, string | null]> {
24
+ payload ??= {};
25
+ const result = await this.api.post('Auth/Login', rq, payload);
26
+ const refreshToken = result?.ok
27
+ ? this.app.getResponseToken(payload.response)
28
+ : null;
29
+ return [result, refreshToken];
30
+ }
31
+
32
+ /**
33
+ * Login id check
34
+ * @param id Check id
35
+ * @param payload Payload
36
+ * @returns Result
37
+ */
38
+ loginId(id: string, payload?: ResultPayload) {
39
+ const { deviceId, region } = this.app;
40
+ id = this.app.encrypt(id);
41
+ const rq: LoginIdRQ = {
42
+ id,
43
+ deviceId,
44
+ region
45
+ };
46
+ return this.api.get('Auth/LoginId', rq, payload);
47
+ }
48
+
49
+ /**
50
+ * Reset password
51
+ * @param rq Request data
52
+ * @param payload Payload
53
+ * @returns Result
54
+ */
55
+ resetPassword(rq: ResetPasswordRQ, payload?: ResultPayload) {
56
+ return this.api.put('Auth/ResetPassword', rq, payload);
57
+ }
58
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Login id request data
3
+ */
4
+ export type LoginIdRQ = {
5
+ /**
6
+ * Device id
7
+ */
8
+ deviceId: string;
9
+
10
+ /**
11
+ * Username, Email or mobile
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * Country or region
17
+ */
18
+ region: string;
19
+ };
@@ -0,0 +1,27 @@
1
+ import { DataTypes } from '@etsoo/shared';
2
+ import { LoginIdRQ } from './LoginIdRQ';
3
+
4
+ /**
5
+ * Login request data
6
+ */
7
+ export type LoginRQ = LoginIdRQ & {
8
+ /**
9
+ * Password
10
+ */
11
+ pwd: string;
12
+
13
+ /**
14
+ * Organization
15
+ */
16
+ org?: number;
17
+
18
+ /**
19
+ * Time zone
20
+ */
21
+ timezone?: string;
22
+
23
+ /**
24
+ * Service id or uid
25
+ */
26
+ serviceId?: DataTypes.IdType;
27
+ };
@@ -0,0 +1,26 @@
1
+ export type ResetPasswordRQ = {
2
+ /**
3
+ * Email or mobile
4
+ */
5
+ id: string;
6
+
7
+ /**
8
+ * Verification code id
9
+ */
10
+ codeId: string;
11
+
12
+ /**
13
+ * Device id
14
+ */
15
+ deviceId: string;
16
+
17
+ /**
18
+ * New password
19
+ */
20
+ password: string;
21
+
22
+ /**
23
+ * Country or region
24
+ */
25
+ region: string;
26
+ };
package/src/i18n/en.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DataTypes } from '@etsoo/shared';
2
- import enUSResources from './en.json';
2
+ import enResources from './en.json';
3
3
 
4
4
  /**
5
5
  * Get en neutral culture
@@ -9,6 +9,6 @@ import enUSResources from './en.json';
9
9
  export const en = (localResources: object): DataTypes.CultureDefinition => ({
10
10
  name: 'en',
11
11
  label: 'English',
12
- resources: { ...enUSResources, ...localResources },
12
+ resources: { ...enResources, ...localResources },
13
13
  compatibleNames: []
14
14
  });
@@ -1,5 +1,5 @@
1
1
  import { DataTypes } from '@etsoo/shared';
2
- import zhCNResources from './zh-Hans.json';
2
+ import zhHansResources from './zh-Hans.json';
3
3
 
4
4
  /**
5
5
  * Get zh-Hans neutral cultrue
@@ -9,6 +9,6 @@ import zhCNResources from './zh-Hans.json';
9
9
  export const zhHans = (localResources: {}): DataTypes.CultureDefinition => ({
10
10
  name: 'zh-Hans',
11
11
  label: '简体中文',
12
- resources: { ...zhCNResources, ...localResources },
12
+ resources: { ...zhHansResources, ...localResources },
13
13
  compatibleNames: ['zh-CN', 'zh-SG']
14
14
  });
@@ -1,5 +1,5 @@
1
1
  import { DataTypes } from '@etsoo/shared';
2
- import zhHKResources from './zh-Hant.json';
2
+ import zhHantResources from './zh-Hant.json';
3
3
 
4
4
  /**
5
5
  * Get zh-Hant neutral cultrue
@@ -11,6 +11,6 @@ export const zhHant = (
11
11
  ): DataTypes.CultureDefinition => ({
12
12
  name: 'zh-Hant',
13
13
  label: '繁體中文',
14
- resources: { ...zhHKResources, ...localResources },
14
+ resources: { ...zhHantResources, ...localResources },
15
15
  compatibleNames: ['zh-HK', 'zh-TW', 'zh-MO']
16
16
  });
package/src/index.ts CHANGED
@@ -41,16 +41,20 @@ export * from './erp/dto/PublicProductDto';
41
41
  export * from './erp/dto/ResultPayload';
42
42
 
43
43
  // erp rq
44
+ export * from './erp/rq/LoginIdRQ';
45
+ export * from './erp/rq/LoginRQ';
44
46
  export * from './erp/rq/MemberListRQ';
45
47
  export * from './erp/rq/OrgListRQ';
46
48
  export * from './erp/rq/OrgQueryRQ';
47
49
  export * from './erp/rq/QueryRQ';
48
50
  export * from './erp/rq/RefreshTokenRQ';
49
51
  export * from './erp/rq/RegionsRQ';
52
+ export * from './erp/rq/ResetPasswordRQ';
50
53
  export * from './erp/rq/TiplistRQ';
51
54
 
52
55
  // erp api
53
56
  export * from './erp/AddressApi';
57
+ export * from './erp/AuthApi';
54
58
  export * from './erp/BaseApi';
55
59
  export * from './erp/EntityApi';
56
60
  export * from './erp/MemberApi';