login-authorization-v2 2.0.0-beta.9 → 2.0.1
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/README.md +27 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +35 -22
- package/dist/index.umd.js +35 -22
- package/dist/src/compatible.d.ts +1 -1
- package/dist/src/compatible.d.ts.map +1 -1
- package/dist/src/cookie.d.ts +2 -2
- package/dist/src/cookie.d.ts.map +1 -1
- package/dist/src/request.d.ts +1 -1
- package/dist/src/request.d.ts.map +1 -1
- package/dist/src/types.d.ts +6 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,17 +14,40 @@ yarn add login-authorization-v2
|
|
|
14
14
|
```javascript
|
|
15
15
|
import { make } from 'login-authorization-v2'
|
|
16
16
|
|
|
17
|
-
const { init } = make({
|
|
18
|
-
brand: 1,
|
|
19
|
-
tenantId: 1,
|
|
17
|
+
const { init, logout } = make({
|
|
20
18
|
moduleName: 'Portal', // 当前模块名称
|
|
21
19
|
moduleBaseUrl: 'https://servers-api.gztest.net:8107', // 后端的 module_base 服务地址
|
|
22
20
|
loginPageUrl: 'http://huangcheng.ddmarketinghub.com:8080', // 如果未登录,跳转的登录页地址
|
|
23
21
|
})
|
|
24
22
|
|
|
25
|
-
init().then(menus => {
|
|
23
|
+
init({ brand: 1, tenantId: 1 }).then(menus => {
|
|
26
24
|
// menus 即为当前用户的菜单权限数据
|
|
27
25
|
}).catch(err => {
|
|
28
26
|
// 任何不能正常登陆的情况都会进入这里
|
|
29
27
|
})
|
|
28
|
+
|
|
29
|
+
logout().then(() => {
|
|
30
|
+
// 退出登陆成功
|
|
31
|
+
}).catch(() => {
|
|
32
|
+
// 可以不用管
|
|
33
|
+
})
|
|
30
34
|
```
|
|
35
|
+
> tenantId、brand、moduleName 枚举值可以在 login-authorization-v2 包内的 `./dist/src/types.d.ts` 文件中查看
|
|
36
|
+
|
|
37
|
+
### 新增方法
|
|
38
|
+
#### main
|
|
39
|
+
1. make(options: MakeFnParams): { init, logout }
|
|
40
|
+
2. init(params: InitParams): Promise<MenuItem[]>
|
|
41
|
+
3. logout(): Promise<void>
|
|
42
|
+
|
|
43
|
+
#### cookie 相关方法
|
|
44
|
+
1. setAccessToken(string | null): void
|
|
45
|
+
2. getAccessToken(): string | undefined
|
|
46
|
+
3. setRefreshToken(string | null): void
|
|
47
|
+
4. getRefreshToken(): string | undefined
|
|
48
|
+
5. setSystemType(string | null): void
|
|
49
|
+
6. getSystemType(): string | undefined
|
|
50
|
+
|
|
51
|
+
#### 工具函数
|
|
52
|
+
1. isMobile(): boolean // 判断当前环境是否为移动端
|
|
53
|
+
2. getUserInfo(): Promise<UserInfo | null> // 获取当前用户信息
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAO3B,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAc,MAAM,EAAiB,MAAM,aAAa,CAAA;AAGvF,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,IAAI,GAAI,QAAQ,YAAY;uBAUb,YAAY;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAO3B,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAc,MAAM,EAAiB,MAAM,aAAa,CAAA;AAGvF,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,IAAI,GAAI,QAAQ,YAAY;uBAUb,YAAY;;;;;;;;;CAiIvC,CAAA"}
|
package/dist/index.esm.js
CHANGED
|
@@ -56,8 +56,12 @@ const makeSetCookieFn = (key, options) => {
|
|
|
56
56
|
};
|
|
57
57
|
const setIdTokenFront = makeSetCookieFn('idTokenFront');
|
|
58
58
|
const setIdTokenBack = makeSetCookieFn('idTokenBack');
|
|
59
|
+
const getIdTokenFront = () => Cookie.get('idTokenFront');
|
|
60
|
+
const getIdTokenBack = () => Cookie.get('idTokenBack');
|
|
59
61
|
const setRefreshTokenFront = makeSetCookieFn('refreshTokenFront');
|
|
60
62
|
const setRefreshTokenBack = makeSetCookieFn('refreshTokenBack');
|
|
63
|
+
const getRefreshTokenFront = () => Cookie.get('refreshTokenFront');
|
|
64
|
+
const getRefreshTokenBack = () => Cookie.get('refreshTokenBack');
|
|
61
65
|
const setRefreshToken = (token) => {
|
|
62
66
|
if (!token) {
|
|
63
67
|
setIdTokenBack(null);
|
|
@@ -72,7 +76,8 @@ const setRefreshToken = (token) => {
|
|
|
72
76
|
const refreshTokenBack = splits[2] + '.' + splits[3] + '.' + splits[4];
|
|
73
77
|
setRefreshTokenFront(refreshTokenFront);
|
|
74
78
|
setRefreshTokenBack(refreshTokenBack);
|
|
75
|
-
makeSetCookieFn('refresh_token')(
|
|
79
|
+
makeSetCookieFn('refresh_token')(null);
|
|
80
|
+
// makeSetCookieFn('refresh_token')(token)
|
|
76
81
|
};
|
|
77
82
|
const setAccessToken = (token) => {
|
|
78
83
|
if (!token) {
|
|
@@ -88,10 +93,19 @@ const setAccessToken = (token) => {
|
|
|
88
93
|
const idTokenBack = splits[2] || '';
|
|
89
94
|
setIdTokenFront(idTokenFront);
|
|
90
95
|
setIdTokenBack(idTokenBack);
|
|
91
|
-
makeSetCookieFn('access_token')(
|
|
96
|
+
makeSetCookieFn('access_token')(null);
|
|
97
|
+
// makeSetCookieFn('access_token')(token)
|
|
98
|
+
};
|
|
99
|
+
const getAccessToken = () => {
|
|
100
|
+
if (!getIdTokenFront() || !getIdTokenBack())
|
|
101
|
+
return '';
|
|
102
|
+
return getIdTokenFront() + '.' + getIdTokenBack();
|
|
103
|
+
};
|
|
104
|
+
const getRefreshToken = () => {
|
|
105
|
+
if (!getRefreshTokenFront() || !getRefreshTokenBack())
|
|
106
|
+
return '';
|
|
107
|
+
return getRefreshTokenFront() + '.' + getRefreshTokenBack();
|
|
92
108
|
};
|
|
93
|
-
const getAccessToken = () => Cookie.get('access_token');
|
|
94
|
-
const getRefreshToken = () => Cookie.get('refresh_token');
|
|
95
109
|
const setSystemType = makeSetCookieFn('currentSystemType');
|
|
96
110
|
const getSystemType = () => Cookie.get('currentSystemType');
|
|
97
111
|
|
|
@@ -240,19 +254,11 @@ let instance;
|
|
|
240
254
|
* 没找到更好的方式,只能这样做了
|
|
241
255
|
*/
|
|
242
256
|
const initInstance = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
243
|
-
let userInfo = null;
|
|
244
|
-
try {
|
|
245
|
-
userInfo = yield getUserInfo();
|
|
246
|
-
}
|
|
247
|
-
catch (error) {
|
|
248
|
-
console.warn('initInstance getUserInfo error:', error);
|
|
249
|
-
}
|
|
250
257
|
instance = axios.create({
|
|
251
258
|
baseURL: moduleBaseUrl,
|
|
252
259
|
timeout: 1.5e4,
|
|
253
260
|
});
|
|
254
261
|
instance.interceptors.request.use((config) => {
|
|
255
|
-
config.headers = Object.assign(Object.assign({}, config.headers), { 'X-tenant-id': userInfo ? userInfo['custom:tenant_id'].toString() : tenantId.toString(), 'X-brand': brand.toString(), 'Authorization': `Bearer ${getAccessToken()}` });
|
|
256
262
|
return config;
|
|
257
263
|
}, (error) => {
|
|
258
264
|
return Promise.reject(error);
|
|
@@ -275,16 +281,24 @@ const fetchRefreshTokenHTTP = (refreshToken) => {
|
|
|
275
281
|
}
|
|
276
282
|
});
|
|
277
283
|
};
|
|
278
|
-
const fetchLogoutHTTP = () => {
|
|
284
|
+
const fetchLogoutHTTP = (data) => {
|
|
279
285
|
return instance({
|
|
280
|
-
method: '
|
|
281
|
-
url: '/user-profile/logout'
|
|
286
|
+
method: 'post',
|
|
287
|
+
url: '/user-profile/logout',
|
|
288
|
+
data
|
|
282
289
|
});
|
|
283
290
|
};
|
|
284
291
|
const fetchServerListHTTP = () => {
|
|
285
|
-
return
|
|
286
|
-
|
|
287
|
-
|
|
292
|
+
return getUserInfo().then(userInfo => {
|
|
293
|
+
return instance({
|
|
294
|
+
method: 'get',
|
|
295
|
+
url: '/session/current/servers',
|
|
296
|
+
headers: {
|
|
297
|
+
'X-tenant-id': userInfo ? userInfo['custom:tenant_id'].toString() : tenantId.toString(),
|
|
298
|
+
'X-brand': brand.toString(),
|
|
299
|
+
'Authorization': `Bearer ${getAccessToken()}`,
|
|
300
|
+
}
|
|
301
|
+
});
|
|
288
302
|
});
|
|
289
303
|
};
|
|
290
304
|
|
|
@@ -326,7 +340,7 @@ const make = (config) => {
|
|
|
326
340
|
openDialog();
|
|
327
341
|
return Promise.reject();
|
|
328
342
|
}
|
|
329
|
-
if (config.moduleName === 'commonLogin') {
|
|
343
|
+
if (config.moduleName === 'commonLogin' || config.moduleName === 'App') {
|
|
330
344
|
setupRefreshTokenTimer();
|
|
331
345
|
return Promise.resolve(menus);
|
|
332
346
|
}
|
|
@@ -342,7 +356,6 @@ const make = (config) => {
|
|
|
342
356
|
clearRefreshTokenTimer();
|
|
343
357
|
setAccessToken(null);
|
|
344
358
|
setRefreshToken(null);
|
|
345
|
-
yield logout();
|
|
346
359
|
throw error;
|
|
347
360
|
}));
|
|
348
361
|
};
|
|
@@ -384,8 +397,8 @@ const make = (config) => {
|
|
|
384
397
|
}, 1e3 * 60 * 3); // 3 minutes
|
|
385
398
|
};
|
|
386
399
|
const logout = () => {
|
|
387
|
-
return fetchLogoutHTTP()
|
|
388
|
-
.
|
|
400
|
+
return fetchLogoutHTTP({ refreshToken: getRefreshToken() })
|
|
401
|
+
.then(() => {
|
|
389
402
|
clearRefreshTokenTimer();
|
|
390
403
|
setAccessToken(null);
|
|
391
404
|
setRefreshToken(null);
|
package/dist/index.umd.js
CHANGED
|
@@ -58,8 +58,12 @@
|
|
|
58
58
|
};
|
|
59
59
|
const setIdTokenFront = makeSetCookieFn('idTokenFront');
|
|
60
60
|
const setIdTokenBack = makeSetCookieFn('idTokenBack');
|
|
61
|
+
const getIdTokenFront = () => Cookie.get('idTokenFront');
|
|
62
|
+
const getIdTokenBack = () => Cookie.get('idTokenBack');
|
|
61
63
|
const setRefreshTokenFront = makeSetCookieFn('refreshTokenFront');
|
|
62
64
|
const setRefreshTokenBack = makeSetCookieFn('refreshTokenBack');
|
|
65
|
+
const getRefreshTokenFront = () => Cookie.get('refreshTokenFront');
|
|
66
|
+
const getRefreshTokenBack = () => Cookie.get('refreshTokenBack');
|
|
63
67
|
const setRefreshToken = (token) => {
|
|
64
68
|
if (!token) {
|
|
65
69
|
setIdTokenBack(null);
|
|
@@ -74,7 +78,8 @@
|
|
|
74
78
|
const refreshTokenBack = splits[2] + '.' + splits[3] + '.' + splits[4];
|
|
75
79
|
setRefreshTokenFront(refreshTokenFront);
|
|
76
80
|
setRefreshTokenBack(refreshTokenBack);
|
|
77
|
-
makeSetCookieFn('refresh_token')(
|
|
81
|
+
makeSetCookieFn('refresh_token')(null);
|
|
82
|
+
// makeSetCookieFn('refresh_token')(token)
|
|
78
83
|
};
|
|
79
84
|
const setAccessToken = (token) => {
|
|
80
85
|
if (!token) {
|
|
@@ -90,10 +95,19 @@
|
|
|
90
95
|
const idTokenBack = splits[2] || '';
|
|
91
96
|
setIdTokenFront(idTokenFront);
|
|
92
97
|
setIdTokenBack(idTokenBack);
|
|
93
|
-
makeSetCookieFn('access_token')(
|
|
98
|
+
makeSetCookieFn('access_token')(null);
|
|
99
|
+
// makeSetCookieFn('access_token')(token)
|
|
100
|
+
};
|
|
101
|
+
const getAccessToken = () => {
|
|
102
|
+
if (!getIdTokenFront() || !getIdTokenBack())
|
|
103
|
+
return '';
|
|
104
|
+
return getIdTokenFront() + '.' + getIdTokenBack();
|
|
105
|
+
};
|
|
106
|
+
const getRefreshToken = () => {
|
|
107
|
+
if (!getRefreshTokenFront() || !getRefreshTokenBack())
|
|
108
|
+
return '';
|
|
109
|
+
return getRefreshTokenFront() + '.' + getRefreshTokenBack();
|
|
94
110
|
};
|
|
95
|
-
const getAccessToken = () => Cookie.get('access_token');
|
|
96
|
-
const getRefreshToken = () => Cookie.get('refresh_token');
|
|
97
111
|
const setSystemType = makeSetCookieFn('currentSystemType');
|
|
98
112
|
const getSystemType = () => Cookie.get('currentSystemType');
|
|
99
113
|
|
|
@@ -242,19 +256,11 @@
|
|
|
242
256
|
* 没找到更好的方式,只能这样做了
|
|
243
257
|
*/
|
|
244
258
|
const initInstance = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
245
|
-
let userInfo = null;
|
|
246
|
-
try {
|
|
247
|
-
userInfo = yield getUserInfo();
|
|
248
|
-
}
|
|
249
|
-
catch (error) {
|
|
250
|
-
console.warn('initInstance getUserInfo error:', error);
|
|
251
|
-
}
|
|
252
259
|
instance = axios.create({
|
|
253
260
|
baseURL: moduleBaseUrl,
|
|
254
261
|
timeout: 1.5e4,
|
|
255
262
|
});
|
|
256
263
|
instance.interceptors.request.use((config) => {
|
|
257
|
-
config.headers = Object.assign(Object.assign({}, config.headers), { 'X-tenant-id': userInfo ? userInfo['custom:tenant_id'].toString() : tenantId.toString(), 'X-brand': brand.toString(), 'Authorization': `Bearer ${getAccessToken()}` });
|
|
258
264
|
return config;
|
|
259
265
|
}, (error) => {
|
|
260
266
|
return Promise.reject(error);
|
|
@@ -277,16 +283,24 @@
|
|
|
277
283
|
}
|
|
278
284
|
});
|
|
279
285
|
};
|
|
280
|
-
const fetchLogoutHTTP = () => {
|
|
286
|
+
const fetchLogoutHTTP = (data) => {
|
|
281
287
|
return instance({
|
|
282
|
-
method: '
|
|
283
|
-
url: '/user-profile/logout'
|
|
288
|
+
method: 'post',
|
|
289
|
+
url: '/user-profile/logout',
|
|
290
|
+
data
|
|
284
291
|
});
|
|
285
292
|
};
|
|
286
293
|
const fetchServerListHTTP = () => {
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
|
|
294
|
+
return getUserInfo().then(userInfo => {
|
|
295
|
+
return instance({
|
|
296
|
+
method: 'get',
|
|
297
|
+
url: '/session/current/servers',
|
|
298
|
+
headers: {
|
|
299
|
+
'X-tenant-id': userInfo ? userInfo['custom:tenant_id'].toString() : tenantId.toString(),
|
|
300
|
+
'X-brand': brand.toString(),
|
|
301
|
+
'Authorization': `Bearer ${getAccessToken()}`,
|
|
302
|
+
}
|
|
303
|
+
});
|
|
290
304
|
});
|
|
291
305
|
};
|
|
292
306
|
|
|
@@ -328,7 +342,7 @@
|
|
|
328
342
|
openDialog();
|
|
329
343
|
return Promise.reject();
|
|
330
344
|
}
|
|
331
|
-
if (config.moduleName === 'commonLogin') {
|
|
345
|
+
if (config.moduleName === 'commonLogin' || config.moduleName === 'App') {
|
|
332
346
|
setupRefreshTokenTimer();
|
|
333
347
|
return Promise.resolve(menus);
|
|
334
348
|
}
|
|
@@ -344,7 +358,6 @@
|
|
|
344
358
|
clearRefreshTokenTimer();
|
|
345
359
|
setAccessToken(null);
|
|
346
360
|
setRefreshToken(null);
|
|
347
|
-
yield logout();
|
|
348
361
|
throw error;
|
|
349
362
|
}));
|
|
350
363
|
};
|
|
@@ -386,8 +399,8 @@
|
|
|
386
399
|
}, 1e3 * 60 * 3); // 3 minutes
|
|
387
400
|
};
|
|
388
401
|
const logout = () => {
|
|
389
|
-
return fetchLogoutHTTP()
|
|
390
|
-
.
|
|
402
|
+
return fetchLogoutHTTP({ refreshToken: getRefreshToken() })
|
|
403
|
+
.then(() => {
|
|
391
404
|
clearRefreshTokenTimer();
|
|
392
405
|
setAccessToken(null);
|
|
393
406
|
setRefreshToken(null);
|
package/dist/src/compatible.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 这个文件是写一些兼容的方法,避免各个项目做出大量调整
|
|
3
3
|
*/
|
|
4
4
|
export declare const setIdToken: (token: string | null) => void;
|
|
5
|
-
export declare const getIdToken: () => string
|
|
5
|
+
export declare const getIdToken: () => string;
|
|
6
6
|
export declare const setCookie: (name: string, value: string | undefined | null, domain: string, path?: string, time?: number) => void;
|
|
7
7
|
export declare const clearLoginCookie: () => void;
|
|
8
8
|
export declare const getCookie: (c_name: string) => string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compatible.d.ts","sourceRoot":"","sources":["../../src/compatible.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU,gCAAiB,CAAA;AACxC,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"compatible.d.ts","sourceRoot":"","sources":["../../src/compatible.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU,gCAAiB,CAAA;AACxC,eAAO,MAAM,UAAU,cAAiB,CAAA;AAExC,eAAO,MAAM,SAAS,GACpB,MAAM,MAAM,EACZ,OAAO,MAAM,GAAG,SAAS,GAAG,IAAI,EAChC,QAAQ,MAAM,EACd,OAAM,MAAY,EAClB,aAA+B,SAUhC,CAAA;AACD,eAAO,MAAM,gBAAgB,YAG5B,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,kBAKvC,CAAA;AAGD,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,kBAMrD,CAAA"}
|
package/dist/src/cookie.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type CookieKeys = 'access_token' | 'refresh_token' | 'idTokenFront' | 'idTokenBack' | 'refreshTokenFront' | 'refreshTokenBack' | 'currentSystemType';
|
|
2
2
|
export declare const setRefreshToken: (token: string | null) => void;
|
|
3
3
|
export declare const setAccessToken: (token: string | null) => void;
|
|
4
|
-
export declare const getAccessToken: () => string
|
|
5
|
-
export declare const getRefreshToken: () => string
|
|
4
|
+
export declare const getAccessToken: () => string;
|
|
5
|
+
export declare const getRefreshToken: () => string;
|
|
6
6
|
export declare const setSystemType: (value: string | null) => void;
|
|
7
7
|
export declare const getSystemType: () => string | undefined;
|
|
8
8
|
//# sourceMappingURL=cookie.d.ts.map
|
package/dist/src/cookie.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/cookie.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GACpB,cAAc,GACZ,eAAe,GACf,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/cookie.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GACpB,cAAc,GACZ,eAAe,GACf,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,CAAA;AA+BvB,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,GAAG,IAAI,SAiBnD,CAAA;AACD,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,GAAG,IAAI,SAiBlD,CAAA;AAED,eAAO,MAAM,cAAc,cAG1B,CAAA;AACD,eAAO,MAAM,eAAe,cAG3B,CAAA;AAED,eAAO,MAAM,aAAa,UApET,MAAM,GAAG,IAAI,SAoEmC,CAAA;AACjE,eAAO,MAAM,aAAa,0BAAwC,CAAA"}
|
package/dist/src/request.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ type RefreshTokenResponse = {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export declare const fetchRefreshTokenHTTP: (refreshToken: string) => AxiosPromise<RefreshTokenResponse>;
|
|
20
|
-
export declare const fetchLogoutHTTP: () => AxiosPromise<any>;
|
|
20
|
+
export declare const fetchLogoutHTTP: (data: unknown) => AxiosPromise<any>;
|
|
21
21
|
type Content = {
|
|
22
22
|
groupName: ModuleName;
|
|
23
23
|
icon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAMxD;;GAEG;AACH,eAAO,MAAM,YAAY,qBA0BxB,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAA;QACnB,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,iBAAiB,EAAE,IAAI,CAAA;QACvB,YAAY,EAAE,MAAM,CAAA;QACpB,SAAS,EAAE,QAAQ,CAAA;KACpB,CAAA;CACF,CAAA;AACD,eAAO,MAAM,qBAAqB,GAAI,cAAc,MAAM,KAOlD,YAAY,CAAC,oBAAoB,CACxC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,OAAO,sBAM5C,CAAA;AAED,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,UAAU,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,OAAO,CAAA;IACtB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AACD,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AACD,eAAO,MAAM,mBAAmB,QAWxB,YAAY,CAAC,kBAAkB,CACtC,CAAA"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ declare const modules: readonly [{
|
|
|
46
46
|
}, {
|
|
47
47
|
readonly href: "";
|
|
48
48
|
readonly name: "Promotion";
|
|
49
|
+
}, {
|
|
50
|
+
readonly href: "";
|
|
51
|
+
readonly name: "OAAdmin";
|
|
52
|
+
}, {
|
|
53
|
+
readonly href: "";
|
|
54
|
+
readonly name: "SecuritiesConfiguration";
|
|
49
55
|
}];
|
|
50
56
|
export type ModuleName = typeof modules[number]['name'];
|
|
51
57
|
export type UserInfo = {
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEH,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,UAAU,EAAE,CAAA;IAC9B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,0BAA0B,EAAE,MAAM,CAAA;IAClC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,OAAO,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,oBAAY,KAAK;IACf,IAAI,IAAI;IACR,SAAS,IAAI;IACb,IAAI,IAAI;CACT;AAED,oBAAY,MAAM;IAChB,QAAQ,IAAI;IACZ,SAAS,IAAI;IACb,OAAO,IAAI;IACX,OAAO,IAAI;IACX,OAAO,IAAI;IACX,OAAO,IAAI;CACZ;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
|