@etsoo/materialui 1.3.2 → 1.3.4
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/app/IAppApi.d.ts +3 -2
- package/lib/app/ServiceApp.js +1 -1
- package/package.json +2 -2
- package/src/app/IAppApi.ts +7 -2
- package/src/app/ServiceApp.ts +1 -1
package/lib/app/IAppApi.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IApi } from "@etsoo/restclient";
|
|
2
2
|
import { ISmartERPUser } from "./ISmartERPUser";
|
|
3
3
|
import { RefreshTokenRQ } from "@etsoo/appscript";
|
|
4
|
+
import { IServiceUser } from "./IServiceUser";
|
|
4
5
|
/**
|
|
5
6
|
* Service application API, Implement interface calls between different services
|
|
6
7
|
* 服务程序接口,实现不同服务之间的接口调用
|
|
@@ -22,9 +23,9 @@ export interface IAppApi {
|
|
|
22
23
|
* Authorize the API
|
|
23
24
|
* @param user SmartERP user
|
|
24
25
|
* @param refreshToken SmartERP user refresh token
|
|
25
|
-
* @param
|
|
26
|
+
* @param serviceUser Service user
|
|
26
27
|
*/
|
|
27
|
-
authorize(user: ISmartERPUser, refreshToken: string,
|
|
28
|
+
authorize(user: ISmartERPUser, refreshToken: string, serviceUser: IServiceUser): void;
|
|
28
29
|
/**
|
|
29
30
|
* Get refresh token data
|
|
30
31
|
*/
|
package/lib/app/ServiceApp.js
CHANGED
|
@@ -159,7 +159,7 @@ export class ServiceApp extends ReactApp {
|
|
|
159
159
|
this.setApiErrorHandler(appApi.api, true);
|
|
160
160
|
}
|
|
161
161
|
// Authorize external service application API
|
|
162
|
-
appApi.authorize(userData, refreshToken, serviceResult.data
|
|
162
|
+
appApi.authorize(userData, refreshToken, serviceResult.data);
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
165
|
// Authorize local service
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/css": "^11.11.2",
|
|
51
51
|
"@emotion/react": "^11.11.1",
|
|
52
52
|
"@emotion/styled": "^11.11.0",
|
|
53
|
-
"@etsoo/appscript": "^1.4.
|
|
53
|
+
"@etsoo/appscript": "^1.4.38",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.28",
|
|
55
55
|
"@etsoo/react": "^1.7.7",
|
|
56
56
|
"@etsoo/shared": "^1.2.10",
|
package/src/app/IAppApi.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IApi } from "@etsoo/restclient";
|
|
2
2
|
import { ISmartERPUser } from "./ISmartERPUser";
|
|
3
3
|
import { RefreshTokenRQ } from "@etsoo/appscript";
|
|
4
|
+
import { IServiceUser } from "./IServiceUser";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Service application API, Implement interface calls between different services
|
|
@@ -26,9 +27,13 @@ export interface IAppApi {
|
|
|
26
27
|
* Authorize the API
|
|
27
28
|
* @param user SmartERP user
|
|
28
29
|
* @param refreshToken SmartERP user refresh token
|
|
29
|
-
* @param
|
|
30
|
+
* @param serviceUser Service user
|
|
30
31
|
*/
|
|
31
|
-
authorize(
|
|
32
|
+
authorize(
|
|
33
|
+
user: ISmartERPUser,
|
|
34
|
+
refreshToken: string,
|
|
35
|
+
serviceUser: IServiceUser
|
|
36
|
+
): void;
|
|
32
37
|
|
|
33
38
|
/**
|
|
34
39
|
* Get refresh token data
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -236,7 +236,7 @@ export class ServiceApp<
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// Authorize external service application API
|
|
239
|
-
appApi.authorize(userData, refreshToken, serviceResult.data
|
|
239
|
+
appApi.authorize(userData, refreshToken, serviceResult.data);
|
|
240
240
|
} else {
|
|
241
241
|
// Authorize local service
|
|
242
242
|
this.userLoginEx(userData, refreshToken, serviceResult.data);
|