@jctrans-materials/shared 1.0.13 → 1.0.15

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.
@@ -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,15 +30,66 @@ 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
- username: string;
34
- password: string;
33
+ export declare function loginApi(loginData: LoginDataParams): Promise<IResponse<ApiResponse<LoginResponseData>>>;
34
+ export declare function loginByEmailOrMobileCodeApi(data: any): Promise<IResponse<ApiResponse<LoginResponseData>>>;
35
+ export declare function loginByQrCode(data: {
36
+ uniqueCode: string;
35
37
  appId: string;
36
- code: string;
37
- uuid: string;
38
- kick: boolean;
39
38
  redirectPath: string;
40
- activityCode: string;
41
- referenceUserId: string;
39
+ kick: boolean;
40
+ }): Promise<any>;
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;
42
51
  }): Promise<any>;
43
- export declare function loginByEmailOrMobileCodeApi(data: any): 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>;
73
+ export declare function setAuthSessionItems(data: {
74
+ activityCode?: string | null;
75
+ referenceUserId?: string | null;
76
+ empNo?: string | null;
77
+ uniqueCode?: string | null;
78
+ path?: string | null;
79
+ clickSource?: string | null;
80
+ registerEvent?: string | null;
81
+ registerType?: string | null;
82
+ compKey?: string | null;
83
+ }): void;
84
+ export declare function resetAuthSessionItems(): void;
85
+ export declare function getAuthSessionItems(): {
86
+ activityCode: string | null;
87
+ referenceUserId: string | null;
88
+ empNo: string | null;
89
+ uniqueCode: string | null;
90
+ path: string | null;
91
+ clickSource: string | null;
92
+ registerEvent?: string | null;
93
+ registerType?: string | null;
94
+ compKey?: string | null;
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
+ }