@jctrans-materials/shared 1.0.14 → 1.0.16
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/dist/api/auth.d.ts +40 -12
- package/dist/api/type.d.ts +86 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.esm.js +1105 -1031
- package/package.json +1 -1
package/dist/api/auth.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiResponse, IResponse, LoginDataParams, LoginResponseData, ThirdResponseData } from './type';
|
|
1
2
|
export declare function validateAccountExistApi(data: {
|
|
2
3
|
target: string;
|
|
3
4
|
}): Promise<any>;
|
|
@@ -29,18 +30,8 @@ export declare function registerApi(data: any): Promise<any>;
|
|
|
29
30
|
export declare function registerBindWechatApi(data: any): Promise<any>;
|
|
30
31
|
export declare function registerUserCompBindWechatApi(data: any): Promise<any>;
|
|
31
32
|
export declare function registerJoinCompanyBindWechatApi(data: any): Promise<any>;
|
|
32
|
-
export declare function loginApi(loginData:
|
|
33
|
-
|
|
34
|
-
password: string;
|
|
35
|
-
appId: string;
|
|
36
|
-
code: string;
|
|
37
|
-
uuid: string;
|
|
38
|
-
kick: boolean;
|
|
39
|
-
redirectPath: string;
|
|
40
|
-
activityCode: string;
|
|
41
|
-
referenceUserId: string;
|
|
42
|
-
}): Promise<any>;
|
|
43
|
-
export declare function loginByEmailOrMobileCodeApi(data: any): Promise<any>;
|
|
33
|
+
export declare function loginApi(loginData: LoginDataParams): Promise<IResponse<ApiResponse<LoginResponseData>>>;
|
|
34
|
+
export declare function loginByEmailOrMobileCodeApi(data: any): Promise<IResponse<ApiResponse<LoginResponseData>>>;
|
|
44
35
|
export declare function loginByQrCode(data: {
|
|
45
36
|
uniqueCode: string;
|
|
46
37
|
appId: string;
|
|
@@ -48,6 +39,37 @@ export declare function loginByQrCode(data: {
|
|
|
48
39
|
kick: boolean;
|
|
49
40
|
}): Promise<any>;
|
|
50
41
|
export declare function getLoginQrCode(data?: {}): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* 1-1-2.TGC自动登录
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare function autoLoginByTGC(data: {
|
|
47
|
+
toSys: string;
|
|
48
|
+
path: string;
|
|
49
|
+
tokenId: string;
|
|
50
|
+
tgc: string;
|
|
51
|
+
}): Promise<any>;
|
|
52
|
+
/**
|
|
53
|
+
* 完善公司信息跳转
|
|
54
|
+
* @param {*} data
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
export declare function completeCompRedirectApi(data: any): Promise<any>;
|
|
58
|
+
export declare function checkAccountExistsFPApi(data: any): Promise<any>;
|
|
59
|
+
export declare function getMEVCodeApi(data: any): Promise<any>;
|
|
60
|
+
export declare function resetPasswordApi(data: any): Promise<any>;
|
|
61
|
+
export declare function loginByFacebookApi(data: any): Promise<IResponse<ApiResponse<ThirdResponseData>>>;
|
|
62
|
+
export declare function loginByLinkedinApi(data: any): Promise<IResponse<ApiResponse<ThirdResponseData>>>;
|
|
63
|
+
export declare function bindThirdPartyByPwdApi(data: any): Promise<any>;
|
|
64
|
+
export declare function bindThirdPartyByCodeApi(data: any): Promise<any>;
|
|
65
|
+
export declare function registerByThirdPartyApi(data: any): Promise<any>;
|
|
66
|
+
export declare function findListByMobileEmailApi(data: any): Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* 获取邀请加入公司信息
|
|
69
|
+
* @param data
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
export declare function inviteJoinGetCompApi(data: any): Promise<any>;
|
|
51
73
|
export declare function setAuthSessionItems(data: {
|
|
52
74
|
activityCode?: string | null;
|
|
53
75
|
referenceUserId?: string | null;
|
|
@@ -55,6 +77,9 @@ export declare function setAuthSessionItems(data: {
|
|
|
55
77
|
uniqueCode?: string | null;
|
|
56
78
|
path?: string | null;
|
|
57
79
|
clickSource?: string | null;
|
|
80
|
+
registerEvent?: string | null;
|
|
81
|
+
registerType?: string | null;
|
|
82
|
+
compKey?: string | null;
|
|
58
83
|
}): void;
|
|
59
84
|
export declare function resetAuthSessionItems(): void;
|
|
60
85
|
export declare function getAuthSessionItems(): {
|
|
@@ -64,4 +89,7 @@ export declare function getAuthSessionItems(): {
|
|
|
64
89
|
uniqueCode: string | null;
|
|
65
90
|
path: string | null;
|
|
66
91
|
clickSource: string | null;
|
|
92
|
+
registerEvent?: string | null;
|
|
93
|
+
registerType?: string | null;
|
|
94
|
+
compKey?: string | null;
|
|
67
95
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export interface LoginResult {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
expireIn: number;
|
|
4
|
+
refreshToken: string;
|
|
5
|
+
refreshTokenExpireIn: number;
|
|
6
|
+
improveComp: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface LoginResponseData {
|
|
9
|
+
redirect: boolean;
|
|
10
|
+
redirectPath?: string;
|
|
11
|
+
tgc?: string;
|
|
12
|
+
result?: LoginResult;
|
|
13
|
+
hasLogon?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface ApiResponse<T = any> {
|
|
16
|
+
code: number;
|
|
17
|
+
msg: string;
|
|
18
|
+
data: T;
|
|
19
|
+
}
|
|
20
|
+
export interface IResponse<T> {
|
|
21
|
+
data: T;
|
|
22
|
+
}
|
|
23
|
+
export interface LoginDataParams {
|
|
24
|
+
username: string;
|
|
25
|
+
password: string;
|
|
26
|
+
appId: string;
|
|
27
|
+
code: string;
|
|
28
|
+
uuid: string;
|
|
29
|
+
kick: boolean;
|
|
30
|
+
redirectPath: string;
|
|
31
|
+
activityCode: string;
|
|
32
|
+
referenceUserId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ThirdResponse {
|
|
35
|
+
code: number;
|
|
36
|
+
data: ThirdResponseData;
|
|
37
|
+
msg: string;
|
|
38
|
+
[property: string]: any;
|
|
39
|
+
}
|
|
40
|
+
export interface ThirdResponseData {
|
|
41
|
+
/**
|
|
42
|
+
* 手机邮箱匹配列表 (修正为数组)
|
|
43
|
+
*/
|
|
44
|
+
mobileEmailList: ThirdResponseMobileEmailList[];
|
|
45
|
+
/**
|
|
46
|
+
* 是否跳转, true跳转 false不跳转
|
|
47
|
+
*/
|
|
48
|
+
redirect: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 跳转路径
|
|
51
|
+
*/
|
|
52
|
+
redirectPath: string;
|
|
53
|
+
/**
|
|
54
|
+
* tgc
|
|
55
|
+
*/
|
|
56
|
+
tgc: string;
|
|
57
|
+
/**
|
|
58
|
+
* 三方信息
|
|
59
|
+
*/
|
|
60
|
+
thirdPartyInfo: ThirdPartyInfo;
|
|
61
|
+
[property: string]: any;
|
|
62
|
+
}
|
|
63
|
+
export interface ThirdResponseMobileEmailList {
|
|
64
|
+
account: string;
|
|
65
|
+
cityId: number;
|
|
66
|
+
cityNameCn: string;
|
|
67
|
+
cityNameEn: string;
|
|
68
|
+
compNameCn: string;
|
|
69
|
+
compNameEn: string;
|
|
70
|
+
countryId: number;
|
|
71
|
+
countryNameCn: string;
|
|
72
|
+
countryNameEn: string;
|
|
73
|
+
email: string;
|
|
74
|
+
mobile: string;
|
|
75
|
+
userId: number;
|
|
76
|
+
userNameCn: string;
|
|
77
|
+
userNameEn: string;
|
|
78
|
+
[property: string]: any;
|
|
79
|
+
}
|
|
80
|
+
export interface ThirdPartyInfo {
|
|
81
|
+
thirdPartyEmail: string;
|
|
82
|
+
thirdPartyId: string;
|
|
83
|
+
thirdPartyType: string;
|
|
84
|
+
thirdPartyUserName: string;
|
|
85
|
+
[property: string]: any;
|
|
86
|
+
}
|