@etsoo/appscript 1.5.17 → 1.5.18
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.
- package/lib/cjs/app/CoreApp.d.ts +1 -1
- package/lib/cjs/app/CoreApp.js +4 -2
- package/lib/cjs/erp/rq/RefreshTokenRQ.d.ts +0 -12
- package/lib/cjs/state/User.d.ts +2 -2
- package/lib/mjs/app/CoreApp.d.ts +1 -1
- package/lib/mjs/app/CoreApp.js +4 -2
- package/lib/mjs/erp/rq/RefreshTokenRQ.d.ts +0 -12
- package/lib/mjs/state/User.d.ts +2 -2
- package/package.json +1 -1
- package/src/app/CoreApp.ts +4 -2
- package/src/erp/rq/RefreshTokenRQ.ts +0 -15
- package/src/state/User.ts +2 -2
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
83
83
|
get region(): string;
|
|
84
84
|
private _deviceId;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Device id, randome string from ServiceBase.InitCallAsync
|
|
87
87
|
*/
|
|
88
88
|
get deviceId(): string;
|
|
89
89
|
/**
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -36,7 +36,7 @@ class CoreApp {
|
|
|
36
36
|
return this._region;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Device id, randome string from ServiceBase.InitCallAsync
|
|
40
40
|
*/
|
|
41
41
|
get deviceId() {
|
|
42
42
|
return this._deviceId;
|
|
@@ -1391,7 +1391,9 @@ class CoreApp {
|
|
|
1391
1391
|
userLogin(user, refreshToken, keep) {
|
|
1392
1392
|
this.userData = user;
|
|
1393
1393
|
// Cache the encrypted serverside device id
|
|
1394
|
-
|
|
1394
|
+
if (user.deviceId) {
|
|
1395
|
+
this.storage.setData(this.fields.serversideDeviceId, user.deviceId);
|
|
1396
|
+
}
|
|
1395
1397
|
if (keep) {
|
|
1396
1398
|
this.authorize(user.token, user.tokenScheme, refreshToken);
|
|
1397
1399
|
}
|
package/lib/cjs/state/User.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { IState } from './State';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface IUserData {
|
|
6
6
|
/**
|
|
7
|
-
* Serverside device id encrypted
|
|
7
|
+
* Serverside device id encrypted, not the same device id of the app
|
|
8
8
|
*/
|
|
9
|
-
readonly deviceId
|
|
9
|
+
readonly deviceId?: string;
|
|
10
10
|
/**
|
|
11
11
|
* User name
|
|
12
12
|
* 用户姓名
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
83
83
|
get region(): string;
|
|
84
84
|
private _deviceId;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Device id, randome string from ServiceBase.InitCallAsync
|
|
87
87
|
*/
|
|
88
88
|
get deviceId(): string;
|
|
89
89
|
/**
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -33,7 +33,7 @@ export class CoreApp {
|
|
|
33
33
|
return this._region;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Device id, randome string from ServiceBase.InitCallAsync
|
|
37
37
|
*/
|
|
38
38
|
get deviceId() {
|
|
39
39
|
return this._deviceId;
|
|
@@ -1388,7 +1388,9 @@ export class CoreApp {
|
|
|
1388
1388
|
userLogin(user, refreshToken, keep) {
|
|
1389
1389
|
this.userData = user;
|
|
1390
1390
|
// Cache the encrypted serverside device id
|
|
1391
|
-
|
|
1391
|
+
if (user.deviceId) {
|
|
1392
|
+
this.storage.setData(this.fields.serversideDeviceId, user.deviceId);
|
|
1393
|
+
}
|
|
1392
1394
|
if (keep) {
|
|
1393
1395
|
this.authorize(user.token, user.tokenScheme, refreshToken);
|
|
1394
1396
|
}
|
package/lib/mjs/state/User.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { IState } from './State';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface IUserData {
|
|
6
6
|
/**
|
|
7
|
-
* Serverside device id encrypted
|
|
7
|
+
* Serverside device id encrypted, not the same device id of the app
|
|
8
8
|
*/
|
|
9
|
-
readonly deviceId
|
|
9
|
+
readonly deviceId?: string;
|
|
10
10
|
/**
|
|
11
11
|
* User name
|
|
12
12
|
* 用户姓名
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -155,7 +155,7 @@ export abstract class CoreApp<
|
|
|
155
155
|
|
|
156
156
|
private _deviceId: string;
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* Device id, randome string from ServiceBase.InitCallAsync
|
|
159
159
|
*/
|
|
160
160
|
get deviceId() {
|
|
161
161
|
return this._deviceId;
|
|
@@ -1891,7 +1891,9 @@ export abstract class CoreApp<
|
|
|
1891
1891
|
this.userData = user;
|
|
1892
1892
|
|
|
1893
1893
|
// Cache the encrypted serverside device id
|
|
1894
|
-
|
|
1894
|
+
if (user.deviceId) {
|
|
1895
|
+
this.storage.setData(this.fields.serversideDeviceId, user.deviceId);
|
|
1896
|
+
}
|
|
1895
1897
|
|
|
1896
1898
|
if (keep) {
|
|
1897
1899
|
this.authorize(user.token, user.tokenScheme, refreshToken);
|
package/src/state/User.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { IState } from './State';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface IUserData {
|
|
7
7
|
/**
|
|
8
|
-
* Serverside device id encrypted
|
|
8
|
+
* Serverside device id encrypted, not the same device id of the app
|
|
9
9
|
*/
|
|
10
|
-
readonly deviceId
|
|
10
|
+
readonly deviceId?: string;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* User name
|