@jctrans-materials/shared 1.0.41-beta.8 → 1.0.41
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/index.cjs.js +0 -0
- package/dist/index.d.ts +242 -0
- package/dist/index.esm.js +0 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { BoardQueryResult } from '@jctrans/dw-sdk';
|
|
3
|
+
import { CrmDashboardParams } from '@jctrans/dw-sdk';
|
|
4
|
+
import { CrmNewSigningResult } from '@jctrans/dw-sdk';
|
|
5
|
+
import { CrmRenewalDetailResult } from '@jctrans/dw-sdk';
|
|
6
|
+
import { CrmRenewalResult } from '@jctrans/dw-sdk';
|
|
3
7
|
import { DateType } from '@jctrans/dw-sdk';
|
|
4
8
|
import { Emitter } from 'mitt';
|
|
5
9
|
import { GraphQLClientError } from '@jctrans/dw-sdk';
|
|
10
|
+
import { MemberQuarterlyVo } from '@jctrans/dw-sdk';
|
|
6
11
|
import { OpportunityBoardParams } from '@jctrans/dw-sdk';
|
|
12
|
+
import { PlatformQueryResult } from '@jctrans/dw-sdk';
|
|
13
|
+
import { PlatformServiceParams } from '@jctrans/dw-sdk';
|
|
14
|
+
import { RenewalDetailResult } from '@jctrans/dw-sdk';
|
|
15
|
+
import { SalesEventPerfResult } from '@jctrans/dw-sdk';
|
|
16
|
+
import { SalesMemberPerfResult } from '@jctrans/dw-sdk';
|
|
17
|
+
import { SalesServiceParams } from '@jctrans/dw-sdk';
|
|
18
|
+
import { SalesTotalPerfResult } from '@jctrans/dw-sdk';
|
|
7
19
|
|
|
8
20
|
declare type ActionKeys = (typeof MODAL_ACTION)[keyof typeof MODAL_ACTION];
|
|
9
21
|
|
|
@@ -57,6 +69,17 @@ export declare function bindThirdPartyByPwdApi(data: any): Promise<any>;
|
|
|
57
69
|
|
|
58
70
|
export { BoardQueryResult }
|
|
59
71
|
|
|
72
|
+
/**
|
|
73
|
+
* 修改/设置密码(需登录)
|
|
74
|
+
*/
|
|
75
|
+
export declare function changePwdApi(data: {
|
|
76
|
+
account?: string;
|
|
77
|
+
verificationCodeUuid?: string;
|
|
78
|
+
verificationCodeVal?: string;
|
|
79
|
+
newPassword: string;
|
|
80
|
+
oldPassword?: string;
|
|
81
|
+
}): Promise<any>;
|
|
82
|
+
|
|
60
83
|
export declare function checkAccountExistsFPApi(data: ForgotPasswordAccountData): Promise<any>;
|
|
61
84
|
|
|
62
85
|
export declare function checkEmailCodeApi(data: {
|
|
@@ -144,6 +167,14 @@ export declare function createFetchWithClientId(options?: FetchClientIdOptions):
|
|
|
144
167
|
|
|
145
168
|
export declare function createRequest(driver: RequestDriver, options?: RequestOptions): RequestAdapter;
|
|
146
169
|
|
|
170
|
+
export { CrmDashboardParams }
|
|
171
|
+
|
|
172
|
+
export { CrmNewSigningResult }
|
|
173
|
+
|
|
174
|
+
export { CrmRenewalDetailResult }
|
|
175
|
+
|
|
176
|
+
export { CrmRenewalResult }
|
|
177
|
+
|
|
147
178
|
export declare const currentConfig: {
|
|
148
179
|
readonly basePath: string;
|
|
149
180
|
readonly carrierPath: string;
|
|
@@ -931,6 +962,10 @@ export declare interface LocationUnifiedItem {
|
|
|
931
962
|
|
|
932
963
|
export declare function loginApi(loginData: LoginDataParams): Promise<IResponse<ApiResponse<LoginResponseData>>>;
|
|
933
964
|
|
|
965
|
+
/**
|
|
966
|
+
* 验证码登录
|
|
967
|
+
* @description Endpoint changed to /auth/loginByCode
|
|
968
|
+
*/
|
|
934
969
|
export declare function loginByEmailOrMobileCodeApi(data: any): Promise<IResponse<ApiResponse<LoginResponseData>>>;
|
|
935
970
|
|
|
936
971
|
export declare const loginByFacebookApi: (data: any) => Promise<IResponse<ApiResponse<ThirdResponseData>>>;
|
|
@@ -981,6 +1016,27 @@ export declare interface LoginResult {
|
|
|
981
1016
|
improveComp: boolean;
|
|
982
1017
|
}
|
|
983
1018
|
|
|
1019
|
+
/** 客户季度报告查询入参 */
|
|
1020
|
+
export declare interface MemberQuarterlyParams {
|
|
1021
|
+
/** 公司ID(必填) */
|
|
1022
|
+
companyId: number;
|
|
1023
|
+
/** 年份(必填) */
|
|
1024
|
+
year: number;
|
|
1025
|
+
/** 季度:1-4(必填) */
|
|
1026
|
+
quarter: number;
|
|
1027
|
+
/** 子类型:'interaction' | 'benchmark' | 'account'(可选) */
|
|
1028
|
+
subTypes?: string[];
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/** 客户季度报告查询结果 */
|
|
1032
|
+
export declare interface MemberQuarterlyResult {
|
|
1033
|
+
success: boolean;
|
|
1034
|
+
data: MemberQuarterlyVo | null;
|
|
1035
|
+
error: string | null;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export { MemberQuarterlyVo }
|
|
1039
|
+
|
|
984
1040
|
export declare const MODAL_ACTION: {
|
|
985
1041
|
readonly Open: "GLOBAL_MODAL_OPEN";
|
|
986
1042
|
readonly Close: "GLOBAL_MODAL_CLOSE";
|
|
@@ -1012,8 +1068,74 @@ export declare interface PageParams {
|
|
|
1012
1068
|
size?: number;
|
|
1013
1069
|
}
|
|
1014
1070
|
|
|
1071
|
+
export { PlatformQueryResult }
|
|
1072
|
+
|
|
1073
|
+
export { PlatformServiceParams }
|
|
1074
|
+
|
|
1015
1075
|
export declare const PrjId: string;
|
|
1016
1076
|
|
|
1077
|
+
/**
|
|
1078
|
+
* 查询 CRM 新签观测数据。
|
|
1079
|
+
*
|
|
1080
|
+
* @example
|
|
1081
|
+
* ```ts
|
|
1082
|
+
* const result = await queryCrmNewSigning({
|
|
1083
|
+
* deptId: 100,
|
|
1084
|
+
* statMonth: '2026-06',
|
|
1085
|
+
* })
|
|
1086
|
+
* ```
|
|
1087
|
+
*/
|
|
1088
|
+
export declare function queryCrmNewSigning(params: CrmDashboardParams): Promise<CrmNewSigningResult>;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* 查询 CRM 续费观测数据。
|
|
1092
|
+
*
|
|
1093
|
+
* @example
|
|
1094
|
+
* ```ts
|
|
1095
|
+
* const result = await queryCrmRenewal({
|
|
1096
|
+
* deptId: 100,
|
|
1097
|
+
* statMonth: '2026-06',
|
|
1098
|
+
* })
|
|
1099
|
+
* ```
|
|
1100
|
+
*/
|
|
1101
|
+
export declare function queryCrmRenewal(params: CrmDashboardParams): Promise<CrmRenewalResult>;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* 查询 CRM 续费观测详情。
|
|
1105
|
+
*
|
|
1106
|
+
* @example
|
|
1107
|
+
* ```ts
|
|
1108
|
+
* const result = await queryCrmRenewalDetail({
|
|
1109
|
+
* deptId: 100,
|
|
1110
|
+
* statMonth: '2026-06',
|
|
1111
|
+
* })
|
|
1112
|
+
* ```
|
|
1113
|
+
*/
|
|
1114
|
+
export declare function queryCrmRenewalDetail(params: CrmDashboardParams): Promise<CrmRenewalDetailResult>;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* 查询客户季度综合报告。
|
|
1118
|
+
*
|
|
1119
|
+
* 返回单个公司的全维度季度数据,包含互动排名、对标公司、账号使用等。
|
|
1120
|
+
* 默认查询全部字段。
|
|
1121
|
+
*
|
|
1122
|
+
* @example
|
|
1123
|
+
* ```ts
|
|
1124
|
+
* const result = await queryMemberQuarterly({
|
|
1125
|
+
* companyId: 12345,
|
|
1126
|
+
* year: 2026,
|
|
1127
|
+
* quarter: 2,
|
|
1128
|
+
* subTypes: ['interaction', 'benchmark'],
|
|
1129
|
+
* })
|
|
1130
|
+
*
|
|
1131
|
+
* if (result.success) {
|
|
1132
|
+
* console.log(result.data.companyNameCn)
|
|
1133
|
+
* console.log(result.data.interactionList)
|
|
1134
|
+
* }
|
|
1135
|
+
* ```
|
|
1136
|
+
*/
|
|
1137
|
+
export declare function queryMemberQuarterly(params: MemberQuarterlyParams): Promise<MemberQuarterlyResult>;
|
|
1138
|
+
|
|
1017
1139
|
/**
|
|
1018
1140
|
* 查询商机有效看板数据(分页)。
|
|
1019
1141
|
*
|
|
@@ -1036,28 +1158,117 @@ export declare const PrjId: string;
|
|
|
1036
1158
|
*/
|
|
1037
1159
|
export declare function queryOpportunityBoard(params: OpportunityBoardParams): Promise<BoardQueryResult>;
|
|
1038
1160
|
|
|
1161
|
+
/**
|
|
1162
|
+
* 查询业绩部门用户数据(分页)。
|
|
1163
|
+
*
|
|
1164
|
+
* @example
|
|
1165
|
+
* ```ts
|
|
1166
|
+
* import { queryPlatformDeptUser } from '@jctrans-materials/shared'
|
|
1167
|
+
*
|
|
1168
|
+
* const result = await queryPlatformDeptUser({
|
|
1169
|
+
* queryDim: 'dept',
|
|
1170
|
+
* deptId: 100,
|
|
1171
|
+
* })
|
|
1172
|
+
*
|
|
1173
|
+
* if (result.success) {
|
|
1174
|
+
* console.log(result.data.records)
|
|
1175
|
+
* }
|
|
1176
|
+
* ```
|
|
1177
|
+
*/
|
|
1178
|
+
export declare function queryPlatformDeptUser(params?: PlatformServiceParams): Promise<PlatformQueryResult>;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* 查询续费明细。
|
|
1182
|
+
*
|
|
1183
|
+
* @example
|
|
1184
|
+
* ```ts
|
|
1185
|
+
* const result = await queryRenewalDetail({ userId: 100 })
|
|
1186
|
+
* ```
|
|
1187
|
+
*/
|
|
1188
|
+
export declare function queryRenewalDetail(params: SalesServiceParams): Promise<RenewalDetailResult>;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* 查询会议业绩看板。
|
|
1192
|
+
*
|
|
1193
|
+
* @example
|
|
1194
|
+
* ```ts
|
|
1195
|
+
* const result = await querySalesEventPerf({
|
|
1196
|
+
* deptId: 100,
|
|
1197
|
+
* monthFilterMode: 'month',
|
|
1198
|
+
* })
|
|
1199
|
+
* ```
|
|
1200
|
+
*/
|
|
1201
|
+
export declare function querySalesEventPerf(params: SalesServiceParams): Promise<SalesEventPerfResult>;
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* 查询会员业绩看板。
|
|
1205
|
+
*
|
|
1206
|
+
* @example
|
|
1207
|
+
* ```ts
|
|
1208
|
+
* const result = await querySalesMemberPerf({ deptId: 100 })
|
|
1209
|
+
* ```
|
|
1210
|
+
*/
|
|
1211
|
+
export declare function querySalesMemberPerf(params: SalesServiceParams): Promise<SalesMemberPerfResult>;
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* 查询总业绩看板。
|
|
1215
|
+
*
|
|
1216
|
+
* @example
|
|
1217
|
+
* ```ts
|
|
1218
|
+
* const result = await querySalesTotalPerf({
|
|
1219
|
+
* deptId: 100,
|
|
1220
|
+
* performanceMonth: '2026-06',
|
|
1221
|
+
* })
|
|
1222
|
+
* ```
|
|
1223
|
+
*/
|
|
1224
|
+
export declare function querySalesTotalPerf(params: SalesServiceParams): Promise<SalesTotalPerfResult>;
|
|
1225
|
+
|
|
1039
1226
|
export declare const RefreshExpiresInKey: string;
|
|
1040
1227
|
|
|
1041
1228
|
export declare const RefreshExpiresInTimeKey: string;
|
|
1042
1229
|
|
|
1043
1230
|
export declare const RefreshTokenKey: string;
|
|
1044
1231
|
|
|
1232
|
+
/**
|
|
1233
|
+
* @deprecated 已改用 registerCustomizedApi
|
|
1234
|
+
*/
|
|
1045
1235
|
export declare function registerApi(data: any): Promise<any>;
|
|
1046
1236
|
|
|
1047
1237
|
export declare function registerByThirdPartyApi(data: any): Promise<any>;
|
|
1048
1238
|
|
|
1239
|
+
/**
|
|
1240
|
+
* 定制化注册接口(统一支持新设公司/加入已有公司)
|
|
1241
|
+
*/
|
|
1242
|
+
export declare function registerCustomizedApi(data: any): Promise<any>;
|
|
1243
|
+
|
|
1049
1244
|
export declare function registerJoinCompanyApi(data: any): Promise<any>;
|
|
1050
1245
|
|
|
1246
|
+
/**
|
|
1247
|
+
* @deprecated 已改用 registerThirdPartyCustomizedApi
|
|
1248
|
+
*/
|
|
1051
1249
|
export declare function registerJoinCompanyBindWechatApi(data: any): Promise<any>;
|
|
1052
1250
|
|
|
1251
|
+
/**
|
|
1252
|
+
* @deprecated 已改用 registerCustomizedApi
|
|
1253
|
+
*/
|
|
1053
1254
|
export declare function registerJoinCompByThirdPartyApi(data: any): Promise<any>;
|
|
1054
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* 定制化第三方注册接口(统一支持微信/Facebook/LinkedIn)
|
|
1258
|
+
*/
|
|
1259
|
+
export declare function registerThirdPartyCustomizedApi(data: any): Promise<any>;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* @deprecated 已改用 registerThirdPartyCustomizedApi
|
|
1263
|
+
*/
|
|
1055
1264
|
export declare function registerUserCompBindWechatApi(data: any): Promise<any>;
|
|
1056
1265
|
|
|
1057
1266
|
export declare const RememberMeAccountKey: string;
|
|
1058
1267
|
|
|
1059
1268
|
export declare const RememberMePasswordKey: string;
|
|
1060
1269
|
|
|
1270
|
+
export { RenewalDetailResult }
|
|
1271
|
+
|
|
1061
1272
|
export declare interface ReportNewTypeData {
|
|
1062
1273
|
reportData: string;
|
|
1063
1274
|
reportType: ReportType;
|
|
@@ -1102,6 +1313,14 @@ declare interface ResetPasswordData {
|
|
|
1102
1313
|
[key: string]: any;
|
|
1103
1314
|
}
|
|
1104
1315
|
|
|
1316
|
+
export { SalesEventPerfResult }
|
|
1317
|
+
|
|
1318
|
+
export { SalesMemberPerfResult }
|
|
1319
|
+
|
|
1320
|
+
export { SalesServiceParams }
|
|
1321
|
+
|
|
1322
|
+
export { SalesTotalPerfResult }
|
|
1323
|
+
|
|
1105
1324
|
/**
|
|
1106
1325
|
* 保存 clientId 到 localStorage
|
|
1107
1326
|
*/
|
|
@@ -1187,6 +1406,11 @@ export declare interface SearchWithScopeParams extends SearchByNameParams {
|
|
|
1187
1406
|
provinceId?: number;
|
|
1188
1407
|
}
|
|
1189
1408
|
|
|
1409
|
+
/**
|
|
1410
|
+
* 发送邮箱验证码(旧接口)
|
|
1411
|
+
* @deprecated 验证码登录场景已改用 sendLoginCodeCustomizedApi;
|
|
1412
|
+
* 保留供注册/完善信息场景兼容使用
|
|
1413
|
+
*/
|
|
1190
1414
|
export declare function sendEmailCodeApi(data: {
|
|
1191
1415
|
target: string;
|
|
1192
1416
|
countryId?: number;
|
|
@@ -1194,6 +1418,24 @@ export declare function sendEmailCodeApi(data: {
|
|
|
1194
1418
|
uuid?: string;
|
|
1195
1419
|
}): Promise<any>;
|
|
1196
1420
|
|
|
1421
|
+
/**
|
|
1422
|
+
* 验证码登录 - 发送验证码(定制化接口)
|
|
1423
|
+
* @description 仅用于验证码登录场景,会先校验账号是否存在;
|
|
1424
|
+
* 注册/完善信息场景继续使用旧接口 sendEmailCodeApi/sendMobileCodeApi
|
|
1425
|
+
*/
|
|
1426
|
+
export declare function sendLoginCodeCustomizedApi(data: {
|
|
1427
|
+
target: string;
|
|
1428
|
+
areaCode?: string;
|
|
1429
|
+
type: string;
|
|
1430
|
+
uuid: string;
|
|
1431
|
+
code: string;
|
|
1432
|
+
}): Promise<any>;
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* 发送手机验证码(旧接口)
|
|
1436
|
+
* @deprecated 验证码登录场景已改用 sendLoginCodeCustomizedApi;
|
|
1437
|
+
* 保留供注册/完善信息场景兼容使用
|
|
1438
|
+
*/
|
|
1197
1439
|
export declare function sendMobileCodeApi(data: {
|
|
1198
1440
|
target: string;
|
|
1199
1441
|
countryId?: number;
|
package/dist/index.esm.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jctrans-materials/shared",
|
|
3
|
-
"version": "1.0.41
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared utilities including auth, request, crypto, and GrowingIO analytics.",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"packageManager": "pnpm@10.12.4",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@jctrans/dw-sdk": "^1.
|
|
21
|
+
"@jctrans/dw-sdk": "^1.1.4",
|
|
22
22
|
"crypto-js": "^4.2.0",
|
|
23
23
|
"js-cookie": "^3.0.5",
|
|
24
24
|
"mitt": "^3.0.1",
|