@etsoo/appscript 1.5.74 → 1.5.76

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.
@@ -37,11 +37,10 @@ export declare class AuthApi extends BaseApi {
37
37
  * Change password
38
38
  * @param oldPassword Ole password
39
39
  * @param password New password
40
- * @param isSecure Is secure or not
41
40
  * @param payload Payload
42
41
  * @returns Result
43
42
  */
44
- changePassword(oldPassword: string, password: string, isSecure?: boolean, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
43
+ changePassword(oldPassword: string, password: string, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
45
44
  /**
46
45
  * Exchange token
47
46
  * @param rq Request data
@@ -28,21 +28,16 @@ class AuthApi extends BaseApi_1.BaseApi {
28
28
  * Change password
29
29
  * @param oldPassword Ole password
30
30
  * @param password New password
31
- * @param isSecure Is secure or not
32
31
  * @param payload Payload
33
32
  * @returns Result
34
33
  */
35
- changePassword(oldPassword, password, isSecure, payload) {
36
- const rq = isSecure === false
37
- ? {
38
- oldPassword: this.app.hash(oldPassword),
39
- password: this.app.hash(password)
40
- }
41
- : {
42
- deviceId: this.app.deviceId,
43
- oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
44
- password: this.app.encrypt(this.app.hash(password))
45
- };
34
+ changePassword(oldPassword, password, payload) {
35
+ const rq = {
36
+ appId: this.app.settings.appId,
37
+ deviceId: this.app.deviceId,
38
+ oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
39
+ password: this.app.encrypt(this.app.hash(password))
40
+ };
46
41
  return this.api.put("Auth/ChangePassword", rq, payload);
47
42
  }
48
43
  /**
@@ -1,9 +1,14 @@
1
1
  export type ChangePasswordRQ = {
2
+ /**
3
+ * Application id
4
+ * 应用编号
5
+ */
6
+ appId: number;
2
7
  /**
3
8
  * Device id
4
9
  * 设备编号
5
10
  */
6
- deviceId?: string;
11
+ deviceId: string;
7
12
  /**
8
13
  * Current password
9
14
  * 当前密码
@@ -3,10 +3,6 @@ export type ResetPasswordRQ = {
3
3
  * Email or mobile
4
4
  */
5
5
  id: string;
6
- /**
7
- * Verification code id
8
- */
9
- codeId: string;
10
6
  /**
11
7
  * Device id
12
8
  */
@@ -37,11 +37,10 @@ export declare class AuthApi extends BaseApi {
37
37
  * Change password
38
38
  * @param oldPassword Ole password
39
39
  * @param password New password
40
- * @param isSecure Is secure or not
41
40
  * @param payload Payload
42
41
  * @returns Result
43
42
  */
44
- changePassword(oldPassword: string, password: string, isSecure?: boolean, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
43
+ changePassword(oldPassword: string, password: string, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
45
44
  /**
46
45
  * Exchange token
47
46
  * @param rq Request data
@@ -25,21 +25,16 @@ export class AuthApi extends BaseApi {
25
25
  * Change password
26
26
  * @param oldPassword Ole password
27
27
  * @param password New password
28
- * @param isSecure Is secure or not
29
28
  * @param payload Payload
30
29
  * @returns Result
31
30
  */
32
- changePassword(oldPassword, password, isSecure, payload) {
33
- const rq = isSecure === false
34
- ? {
35
- oldPassword: this.app.hash(oldPassword),
36
- password: this.app.hash(password)
37
- }
38
- : {
39
- deviceId: this.app.deviceId,
40
- oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
41
- password: this.app.encrypt(this.app.hash(password))
42
- };
31
+ changePassword(oldPassword, password, payload) {
32
+ const rq = {
33
+ appId: this.app.settings.appId,
34
+ deviceId: this.app.deviceId,
35
+ oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
36
+ password: this.app.encrypt(this.app.hash(password))
37
+ };
43
38
  return this.api.put("Auth/ChangePassword", rq, payload);
44
39
  }
45
40
  /**
@@ -1,9 +1,14 @@
1
1
  export type ChangePasswordRQ = {
2
+ /**
3
+ * Application id
4
+ * 应用编号
5
+ */
6
+ appId: number;
2
7
  /**
3
8
  * Device id
4
9
  * 设备编号
5
10
  */
6
- deviceId?: string;
11
+ deviceId: string;
7
12
  /**
8
13
  * Current password
9
14
  * 当前密码
@@ -3,10 +3,6 @@ export type ResetPasswordRQ = {
3
3
  * Email or mobile
4
4
  */
5
5
  id: string;
6
- /**
7
- * Verification code id
8
- */
9
- codeId: string;
10
6
  /**
11
7
  * Device id
12
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.5.74",
3
+ "version": "1.5.76",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -48,27 +48,20 @@ export class AuthApi extends BaseApi {
48
48
  * Change password
49
49
  * @param oldPassword Ole password
50
50
  * @param password New password
51
- * @param isSecure Is secure or not
52
51
  * @param payload Payload
53
52
  * @returns Result
54
53
  */
55
54
  changePassword(
56
55
  oldPassword: string,
57
56
  password: string,
58
- isSecure?: boolean,
59
57
  payload?: ResultPayload
60
58
  ) {
61
- const rq: ChangePasswordRQ =
62
- isSecure === false
63
- ? {
64
- oldPassword: this.app.hash(oldPassword),
65
- password: this.app.hash(password)
66
- }
67
- : {
68
- deviceId: this.app.deviceId,
69
- oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
70
- password: this.app.encrypt(this.app.hash(password))
71
- };
59
+ const rq: ChangePasswordRQ = {
60
+ appId: this.app.settings.appId,
61
+ deviceId: this.app.deviceId,
62
+ oldPassword: this.app.encrypt(this.app.hash(oldPassword)),
63
+ password: this.app.encrypt(this.app.hash(password))
64
+ };
72
65
  return this.api.put("Auth/ChangePassword", rq, payload);
73
66
  }
74
67
 
@@ -1,9 +1,15 @@
1
1
  export type ChangePasswordRQ = {
2
+ /**
3
+ * Application id
4
+ * 应用编号
5
+ */
6
+ appId: number;
7
+
2
8
  /**
3
9
  * Device id
4
10
  * 设备编号
5
11
  */
6
- deviceId?: string;
12
+ deviceId: string;
7
13
 
8
14
  /**
9
15
  * Current password
@@ -4,11 +4,6 @@ export type ResetPasswordRQ = {
4
4
  */
5
5
  id: string;
6
6
 
7
- /**
8
- * Verification code id
9
- */
10
- codeId: string;
11
-
12
7
  /**
13
8
  * Device id
14
9
  */