@jctrans-materials/shared 1.0.40-beta.9 → 1.0.40

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.d.ts CHANGED
@@ -1,9 +1,14 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ import { BoardQueryResult } from '@jctrans/dw-sdk';
3
+ import { DateType } from '@jctrans/dw-sdk';
2
4
  import { Emitter } from 'mitt';
5
+ import { GraphQLClientError } from '@jctrans/dw-sdk';
6
+ import { OpportunityBoardParams } from '@jctrans/dw-sdk';
3
7
 
4
8
  declare type ActionKeys = (typeof MODAL_ACTION)[keyof typeof MODAL_ACTION];
5
9
 
6
- declare interface ApiResponse<T = any> {
10
+ /** 通用 API 响应结构 (最外层) */
11
+ export declare interface ApiResponse<T = any> {
7
12
  code: number;
8
13
  msg: string;
9
14
  data: T;
@@ -14,12 +19,16 @@ export declare interface AppointSearch {
14
19
  val: string;
15
20
  }
16
21
 
22
+ /** baseSearch 的 appointSearch 条目 */
17
23
  export declare type AppointSearchName = "continentId" | "countryId" | "cityId" | "provinceId" | "seaportId" | "airportId" | "allCityByCountryId";
18
24
 
19
- /**
20
- * 1-1-2.TGC自动登录
21
- * @returns
22
- */
25
+ /** Auth session key 映射表 */
26
+ declare const AUTH_SESSION_KEYS: Record<string, string>;
27
+
28
+ declare type AuthSessionData = {
29
+ [K in keyof typeof AUTH_SESSION_KEYS]?: string | null;
30
+ };
31
+
23
32
  export declare function autoLoginByTGC(data: {
24
33
  toSys: string;
25
34
  path: string;
@@ -27,6 +36,7 @@ export declare function autoLoginByTGC(data: {
27
36
  tokenId?: string;
28
37
  }): Promise<any>;
29
38
 
39
+ /** 分页响应结构 */
30
40
  export declare interface BaseResponse<T = any> {
31
41
  records: T[];
32
42
  total: number;
@@ -41,52 +51,20 @@ export declare interface BaseResponse<T = any> {
41
51
  */
42
52
  export declare type BeforeSendCallback = (event: GioEvent) => GioEvent;
43
53
 
44
- /**
45
- * 验证验证码绑定第三方应用
46
- * @param data
47
- * @returns
48
- */
49
54
  export declare function bindThirdPartyByCodeApi(data: any): Promise<any>;
50
55
 
51
- /**
52
- * 验证密码绑定第三方应用
53
- * @param data
54
- * @returns
55
- */
56
56
  export declare function bindThirdPartyByPwdApi(data: any): Promise<any>;
57
57
 
58
- declare interface CarrierRequestPayload {
59
- current: number;
60
- size: number;
61
- lineType: "air" | "shipping";
62
- searchkey?: string;
63
- ids?: number[];
64
- [key: string]: any;
65
- }
58
+ export { BoardQueryResult }
66
59
 
67
- /**
68
- * 检查账号是否存在(忘记密码专用)
69
- * @param data
70
- * @returns
71
- */
72
- export declare function checkAccountExistsFPApi(data: any): Promise<any>;
60
+ export declare function checkAccountExistsFPApi(data: ForgotPasswordAccountData): Promise<any>;
73
61
 
74
- /**
75
- * 验证邮件验证码
76
- * @param data
77
- * @returns
78
- */
79
62
  export declare function checkEmailCodeApi(data: {
80
63
  uuid: string;
81
64
  code: string;
82
65
  target: string;
83
66
  }): Promise<any>;
84
67
 
85
- /**
86
- * 验证手机验证码
87
- * @param data
88
- * @returns
89
- */
90
68
  export declare function checkMobileCodeApi(data: {
91
69
  code: string;
92
70
  uuid: string;
@@ -107,6 +85,20 @@ export declare interface ClientIdPluginOptions {
107
85
  headerName?: string;
108
86
  }
109
87
 
88
+ export declare interface CommonKeysConfig {
89
+ TokenKey: string;
90
+ HasLoginKey: string;
91
+ PrjId: string;
92
+ ExpiresInKey: string;
93
+ ExpiresInTimeKey: string;
94
+ RefreshTokenKey: string;
95
+ RefreshExpiresInKey: string;
96
+ RefreshExpiresInTimeKey: string;
97
+ RememberMeAccountKey: string;
98
+ RememberMePasswordKey: string;
99
+ }
100
+
101
+ /** baseSearch 的通用请求参数 */
110
102
  export declare interface CommonParams {
111
103
  current?: number;
112
104
  size?: number;
@@ -124,18 +116,8 @@ export declare interface CompanyOption {
124
116
  compName: string;
125
117
  }
126
118
 
127
- /**
128
- * 完善公司信息跳转
129
- * @param {*} data
130
- * @returns
131
- */
132
119
  export declare function completeCompRedirectApi(data: any): Promise<any>;
133
120
 
134
- /**
135
- * 完善信息加入公司
136
- * @param data
137
- * @returns
138
- */
139
121
  export declare function completeJoinCompanyRedirectApi(data: any): Promise<any>;
140
122
 
141
123
  /**
@@ -169,34 +151,40 @@ export declare const currentConfig: {
169
151
  readonly allLinePath: string;
170
152
  readonly oldBasePath: string;
171
153
  readonly prefixPath: string;
154
+ readonly appId: string | undefined;
172
155
  };
173
156
 
157
+ export { DateType }
158
+
159
+ /** 兼容旧名 */
160
+ export declare const Decrypt: typeof decrypt;
161
+
174
162
  /**
175
- * 解密方法
176
- * @param word
177
- * @returns
163
+ * 解密
178
164
  */
179
- export declare function Decrypt(word: string): string;
165
+ export declare function decrypt(word: string): string;
180
166
 
181
167
  /**
182
168
  * 设备 ID 回调
183
169
  */
184
170
  export declare type DeviceIdCallback = (deviceId: string) => void;
185
171
 
186
- export declare type DisplayInfo = "Continent" | "Country" | "Province" | "City" | "Seaport" | "Airport";
172
+ /** 兼容旧名:baseSearch.DisplayInfo */
173
+ export declare type DisplayInfo = LocationType;
187
174
 
188
175
  export declare const emitter: Emitter<ModalEvents>;
189
176
 
177
+ /** 兼容旧名 */
178
+ export declare const Encrypt: typeof encrypt;
179
+
190
180
  /**
191
- * 加密方法
192
- * @param word
193
- * @returns
181
+ * 加密
194
182
  */
195
- export declare function Encrypt(word: string): string;
183
+ export declare function encrypt(word: string): string;
196
184
 
197
- export declare const ExpiresInKey = "JC-Expires-In";
185
+ export declare const ExpiresInKey: string;
198
186
 
199
- export declare const ExpiresInTimeKey = "JC-Expires-Time-In";
187
+ export declare const ExpiresInTimeKey: string;
200
188
 
201
189
  /**
202
190
  * Fetch API ClientId 拦截器
@@ -213,31 +201,30 @@ export declare interface FetchClientIdOptions {
213
201
  injectRequest?: boolean;
214
202
  }
215
203
 
216
- /**
217
- * 获取字典列表
218
- * @param data
219
- * @returns
220
- */
221
- export declare function findDictAPi(data?: {
204
+ export declare function findDictApi(data?: {
222
205
  size: number;
223
206
  }): Promise<any>;
224
207
 
225
- /**
226
- * 根据手机邮箱获取重复列表
227
- * @param data
228
- * @returns
229
- */
230
208
  export declare function findListByMobileEmailApi(data: any): Promise<any>;
231
209
 
232
- /**
233
- * 查询区号列表
234
- * @param data
235
- * @returns
236
- */
237
- export declare function findPAreaCodeAPi(data?: {
210
+ export declare function findPAreaCodeApi(data?: {
238
211
  size: number;
239
212
  }): Promise<any>;
240
213
 
214
+ declare interface ForgotPasswordAccountData {
215
+ account?: string;
216
+ email?: string;
217
+ mobile?: string;
218
+ [key: string]: any;
219
+ }
220
+
221
+ declare interface ForgotPasswordVerifyData {
222
+ account?: string;
223
+ code?: string;
224
+ uuid?: string;
225
+ [key: string]: any;
226
+ }
227
+
241
228
  /**
242
229
  * ClientId 管理工具
243
230
  * 用于生成和管理唯一的客户端标识符
@@ -250,34 +237,19 @@ export declare function findPAreaCodeAPi(data?: {
250
237
  */
251
238
  export declare function generateClientId(): string;
252
239
 
253
- export declare function getAirport(params?: {
240
+ export declare const getAirport: (params?: {
254
241
  page?: number;
255
242
  size?: number;
256
243
  ids?: number[];
257
- cityId?: number;
258
244
  countryId?: number;
259
- }): Promise<BaseResponse<UnifiedItem>>;
245
+ cityId?: number;
246
+ }) => Promise<BaseResponse<UnifiedItem>>;
247
+
248
+ export declare function getAirportByNameEnShow(nameEnShow: string): Promise<any>;
260
249
 
261
- /**
262
- * 跨环境获取 AppId (兼容 Vite, Webpack, Nuxt)
263
- */
264
250
  export declare function getAppId(): string;
265
251
 
266
- /**
267
- * 全局获取 session
268
- * @returns
269
- */
270
- export declare function getAuthSessionItems(): {
271
- activityCode: string | null;
272
- referenceUserId: string | null;
273
- empNo: string | null;
274
- uniqueCode: string | null;
275
- path: string | null;
276
- clickSource: string | null;
277
- registerEvent?: string | null;
278
- registerType?: string | null;
279
- compKey?: string | null;
280
- };
252
+ export declare function getAuthSessionItems(): AuthSessionData;
281
253
 
282
254
  /** 单 id 版本 */
283
255
  export declare function getById(type: DisplayInfo, id: number): Promise<UnifiedItem | null>;
@@ -297,49 +269,48 @@ export declare function getCitiesByCountry(countryId: number, opts?: {
297
269
  size?: number;
298
270
  }): Promise<BaseResponse<UnifiedItem>>;
299
271
 
300
- export declare function getCity(params?: {
272
+ export declare const getCity: (params?: {
301
273
  page?: number;
302
274
  size?: number;
303
275
  ids?: number[];
304
276
  countryId?: number;
305
- }): Promise<BaseResponse<UnifiedItem>>;
277
+ cityId?: number;
278
+ }) => Promise<BaseResponse<UnifiedItem>>;
279
+
280
+ export declare function getCityByNameEnShow(nameEnShow: string): Promise<any>;
281
+
282
+ export declare const getCommonKeys: () => CommonKeysConfig;
306
283
 
307
284
  export declare const getCompanyOptionApi: (data: CompanyOption) => Promise<any>;
308
285
 
309
- /** 保留对外兼容函数:getContinent/getCountry/getCity/getProvince/getSeaport/getAirport */
310
- export declare function getContinent(params?: {
286
+ export declare const getContinent: (params?: {
311
287
  page?: number;
312
288
  size?: number;
313
- }): Promise<BaseResponse<UnifiedItem>>;
289
+ ids?: number[];
290
+ countryId?: number;
291
+ cityId?: number;
292
+ }) => Promise<BaseResponse<UnifiedItem>>;
314
293
 
315
- export declare function getCountry(params?: {
294
+ export declare const getCountry: (params?: {
316
295
  page?: number;
317
296
  size?: number;
318
297
  ids?: number[];
319
- }): Promise<BaseResponse<UnifiedItem>>;
298
+ countryId?: number;
299
+ cityId?: number;
300
+ }) => Promise<BaseResponse<UnifiedItem>>;
301
+
302
+ export declare function getCountryByNameEnShow(nameEnShow: string): Promise<any>;
320
303
 
321
304
  /**
322
305
  * 获取当前的 clientId(不会创建新的)
323
306
  */
324
307
  export declare function getCurrentClientId(): string | null;
325
308
 
326
- /**
327
- * 🚀 补全:获取 Access Token 的过期时间戳 (用于判断是否需要刷新)
328
- */
329
309
  export declare function getExpiresTimeIn(): number;
330
310
 
331
- /**
332
- * 获取一级域名 (用于 Cookie 跨域共享)
333
- */
334
311
  export declare function getFirstDomain(): string | undefined;
335
312
 
336
- /**
337
- * 全局获取 GIO 相关 session
338
- * @returns
339
- */
340
- export declare function getGioSessionItems(): {
341
- registerEntry: string | null;
342
- };
313
+ export declare function getGioSessionItems(): GioSessionData;
343
314
 
344
315
  /**
345
316
  * 兼容全环境的语言判断方法
@@ -347,45 +318,16 @@ export declare function getGioSessionItems(): {
347
318
  */
348
319
  export declare const getIsEn: () => boolean;
349
320
 
350
- /**
351
- * 获取用户加入公司信息
352
- * @param data
353
- * @returns
354
- */
355
321
  export declare function getJoinCompanyApi(data: any): Promise<any>;
356
322
 
357
- /**
358
- * 获取当前语言
359
- * @returns
360
- */
361
323
  export declare function getLanguage(): string | undefined;
362
324
 
363
- /**
364
- * 获取本地 IP 数据
365
- * @param data
366
- * @returns
367
- */
368
- export declare function getLocalIpDataApi(data: any): Promise<any>;
325
+ export declare function getLocalIpDataApi(data: Record<string, any>): Promise<any>;
369
326
 
370
- /**
371
- * 获取登录微信二维码
372
- * @param data
373
- * @returns
374
- */
375
327
  export declare function getLoginQrCode(data?: {}): Promise<any>;
376
328
 
377
- /**
378
- * 忘记密码发送验证码
379
- * @param data
380
- * @returns
381
- */
382
- export declare function getMEVCodeApi(data: any): Promise<any>;
329
+ export declare function getMEVCodeApi(data: ForgotPasswordVerifyData): Promise<any>;
383
330
 
384
- /**
385
- * 根据用户 id 获取手机号
386
- * @param data
387
- * @returns
388
- */
389
331
  export declare function getMobileEmailApi(data: {
390
332
  id: string;
391
333
  }): Promise<any>;
@@ -396,51 +338,36 @@ export declare function getMobileEmailApi(data: {
396
338
  */
397
339
  export declare function getOrCreateClientId(): string;
398
340
 
399
- /**
400
- * 跨环境获取 Path
401
- */
402
341
  export declare function getPathFromConfig(config: any): string;
403
342
 
404
- /**
405
- * 4. 导出操作方法
406
- */
407
343
  export declare function getProjectId(): string | undefined;
408
344
 
409
- export declare function getProvince(params?: {
345
+ export declare const getProvince: (params?: {
410
346
  page?: number;
411
347
  size?: number;
412
348
  ids?: number[];
413
349
  countryId?: number;
414
- }): Promise<BaseResponse<UnifiedItem>>;
350
+ cityId?: number;
351
+ }) => Promise<BaseResponse<UnifiedItem>>;
415
352
 
416
- /**
417
- * 跳转其他站
418
- * @param appId
419
- * @param path
420
- * @returns
421
- */
422
353
  export declare function getRedirectPathApi(appId: string, path: string): Promise<any>;
423
354
 
424
- /**
425
- * 🚀 补全:获取当前的 Refresh Token
426
- */
427
355
  export declare function getRefreshToken(): string | undefined;
428
356
 
429
- /**
430
- * 获取记住的账号
431
- */
432
357
  export declare function getRememberAccount(): {
433
358
  account?: string;
434
359
  password?: string;
435
360
  };
436
361
 
437
- export declare function getSeaport(params?: {
362
+ export declare const getSeaport: (params?: {
438
363
  page?: number;
439
364
  size?: number;
440
365
  ids?: number[];
441
- cityId?: number;
442
366
  countryId?: number;
443
- }): Promise<BaseResponse<UnifiedItem>>;
367
+ cityId?: number;
368
+ }) => Promise<BaseResponse<UnifiedItem>>;
369
+
370
+ export declare function getSeaportByNameEnShow(nameEnShow: string): Promise<any>;
444
371
 
445
372
  export declare function getSessionHeaderValue(key: string): string;
446
373
 
@@ -454,11 +381,9 @@ export declare const getSharedConfig: () => {
454
381
  readonly allLinePath: string;
455
382
  readonly oldBasePath: string;
456
383
  readonly prefixPath: string;
384
+ readonly appId: string | undefined;
457
385
  };
458
386
 
459
- /**
460
- * 获取当前的 Access Token
461
- */
462
387
  export declare function getToken(): string | undefined;
463
388
 
464
389
  /**
@@ -480,15 +405,16 @@ export declare function getToken(): string | undefined;
480
405
  */
481
406
  export declare function getTracker<T extends GioTracker>(trackerInstance?: T): T | null;
482
407
 
483
- /**
484
- * 获取用户手机号邮箱信息
485
- * @param data
486
- * @returns
487
- */
488
- export declare function getUserInfoApi(data: any): Promise<any>;
408
+ export declare function getUserInfoApi(data: Record<string, any>): Promise<any>;
489
409
 
490
410
  export declare const GIO_CLICK_PAGE_REQUIRED_FIELDS: readonly ["companyID_var", "contactPerson_var", "inquiryID_var", "modulePosition_var", "moduleType_var", "pageCode_var", "pageClickName_var", "moduleName_var"];
491
411
 
412
+ /** clickPage 事件名常量 */
413
+ export declare const GIO_EVENT_CLICK_PAGE = "clickPage";
414
+
415
+ /** GIO session key 映射表 */
416
+ declare const GIO_SESSION_KEYS: Record<string, string>;
417
+
492
418
  /**
493
419
  * GIO 属性对象
494
420
  */
@@ -588,6 +514,8 @@ export declare interface GioInitOptions {
588
514
  ignoreFields?: string[];
589
515
  /** 曝光比例(0-1),与曝光插件结合使用,默认 0 */
590
516
  impressionScale?: number;
517
+ /** 性能采集插件配置。集成后默认开启首屏加载监控和错误监控,默认关闭网络监控 */
518
+ performance?: GioPerformanceOptions;
591
519
  /** 与小程序打通时的配置项,SDK >= 4.3.0 支持 */
592
520
  embeddedAdapter?: {
593
521
  /** 圈选服务器地址,SaaS 客户不需要配置 */
@@ -607,52 +535,46 @@ export declare interface GioPageProps {
607
535
  }
608
536
 
609
537
  /**
610
- * 事件计时器 ID 类型
538
+ * 性能采集 - 网络监控排除配置
611
539
  */
612
- export declare type GioTimerId = string;
540
+ declare interface GioPerformanceNetwork {
541
+ /**
542
+ * 请求监控排除名单
543
+ * 值可以是域名字符串、正则表达式,或由两者组成的数组
544
+ * 配置此项即视为开启请求监控
545
+ * 注意:使用纯字符串校验时应尽可能使用长且准确的字符,过短的字符串可能会误过滤其他请求
546
+ */
547
+ exclude?: string | RegExp | Array<string | RegExp>;
548
+ }
613
549
 
614
550
  /**
615
- * GrowingIO SDK 封装模块
616
- * 基于 gio-webjs-sdk npm 包
617
- *
618
- * @module gio
619
- *
620
- * @example
621
- * ```typescript
622
- * import { tracker, type GioAttributes, type GioInitOptions } from '@jctrans-materials/shared';
623
- *
624
- * // 基础初始化
625
- * tracker.init('your-account-id', 'your-datasource-id', {
626
- * debug: true,
627
- * trackPage: false,
628
- * });
629
- *
630
- * // 微信公众号 H5(需要 appId 和 forceLogin)
631
- * tracker.init('accountId', 'dataSourceId', 'wx-app-id', {
632
- * forceLogin: true,
633
- * debug: true,
634
- * });
635
- *
636
- * // 设置登录用户 ID
637
- * tracker.setUserId('user-123');
638
- * tracker.setUserId('user-123', 'user_id', () => {
639
- * console.log('set user id with userKey done');
640
- * });
641
- *
642
- * // 埋点事件
643
- * tracker.track('order_submit', {
644
- * order_type: 'freight',
645
- * price: 5000,
646
- * services: ['ocean', 'customs']
647
- * });
648
- *
649
- * // 设置全局属性
650
- * tracker.setGeneralProps({
651
- * platform: 'jctrans_web',
652
- * locale: 'zh-CN'
653
- * });
654
- * ```
551
+ * 性能采集配置项
552
+ * 集成性能采集插件后,默认开启首屏加载监控和错误监控,默认关闭网络监控
553
+ */
554
+ declare interface GioPerformanceOptions {
555
+ /** 是否开启首屏加载监控,默认 true */
556
+ monitor?: boolean;
557
+ /** 是否开启错误监控,默认 true */
558
+ exception?: boolean;
559
+ /**
560
+ * 网络监控配置
561
+ * - 不配置时默认关闭网络监控
562
+ * - 设为 true 开启网络监控
563
+ * - 设为对象时开启网络监控并配置排除名单
564
+ * 注意:请求监控强制过滤了 Gio 上报的请求
565
+ */
566
+ network?: boolean | GioPerformanceNetwork;
567
+ }
568
+
569
+ declare type GioSessionData = {
570
+ [K in keyof typeof GIO_SESSION_KEYS]?: string | null;
571
+ };
572
+
573
+ /**
574
+ * 事件计时器 ID 类型
655
575
  */
576
+ export declare type GioTimerId = string;
577
+
656
578
  export declare type GioTrackAttrs = Record<string, string | number | Array<string | number> | null | undefined>;
657
579
 
658
580
  declare class GioTracker {
@@ -868,7 +790,11 @@ export declare interface GioUserAttributes {
868
790
  [key: string]: GioAttributeValue;
869
791
  }
870
792
 
871
- export declare const HasLoginKey = "hasLogin";
793
+ export { GraphQLClientError }
794
+
795
+ export declare const HasLoginKey: string;
796
+
797
+ export declare const initCommonKeys: (newKeys: Partial<CommonKeysConfig>) => void;
872
798
 
873
799
  /**
874
800
  * 全局初始化方法,在项目入口调用
@@ -899,22 +825,13 @@ export declare function installClientIdPlugin(instance: AxiosInstance, options?:
899
825
  */
900
826
  export declare function installFetchClientId(options?: FetchClientIdOptions): void;
901
827
 
902
- /**
903
- * 获取邀请加入公司信息
904
- * @param data
905
- * @returns
906
- */
907
828
  export declare function inviteJoinGetCompApi(data: any): Promise<any>;
908
829
 
909
- declare interface IResponse<T> {
830
+ /** 简化响应结构(仅 data 字段)— 兼容旧名 IResponse */
831
+ export declare type IResponse<T> = {
910
832
  data: T;
911
- }
833
+ };
912
834
 
913
- /**
914
- * 检查值是否为空
915
- * @param value 要检查的值
916
- * @returns 是否为空
917
- */
918
835
  export declare function isEmpty(value: any): boolean;
919
836
 
920
837
  /**
@@ -929,238 +846,68 @@ export declare function isEmpty(value: any): boolean;
929
846
  */
930
847
  export declare function isGioAvailable(trackerInstance?: typeof tracker): boolean;
931
848
 
932
- /**
933
- * 判断域名是否为 IP
934
- */
935
849
  export declare function isIpAddress(hostname: string): boolean;
936
850
 
937
- declare interface LineRequestPayload {
938
- current: number;
939
- size: number;
940
- lineType: "air" | "shipping";
941
- searchkey?: string;
942
- ids?: number[];
943
- [key: string]: any;
944
- }
945
-
946
851
  export declare const locationSearchV2: {
947
- SEARCH_VERSION: string;
948
- searchByName: (params: SearchGenericParams) => Promise<{
949
- records: LocationUnifiedItem[];
950
- total: number;
951
- current: number;
952
- size: number;
953
- }>;
852
+ searchByName: (params: SearchGenericParams) => Promise<BaseResponse<LocationUnifiedItem>>;
954
853
  searchByIdWithType: (id: number | string | Array<number | string>, type: LocationType, extraParams?: {
955
854
  lineType?: "air" | "shipping";
956
- }) => Promise<{
957
- records: LocationUnifiedItem[];
958
- total: number;
959
- current: number;
960
- size: number;
961
- }>;
855
+ }) => any;
962
856
  country: {
963
- searchByName: (params: SearchByNameParams) => Promise<{
964
- records: LocationUnifiedItem[];
965
- total: number;
966
- current: number;
967
- size: number;
968
- }>;
969
- getByIds: (ids: number[]) => Promise<{
970
- records: LocationUnifiedItem[];
971
- total: number;
972
- current: number;
973
- size: number;
974
- }>;
857
+ searchRegionByName: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
858
+ getRegionByIds: (ids: number[]) => Promise<BaseResponse<LocationUnifiedItem>>;
859
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
860
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
975
861
  };
976
862
  region: {
977
- searchByName: (params: SearchByNameParams) => Promise<{
978
- records: LocationUnifiedItem[];
979
- total: number;
980
- current: number;
981
- size: number;
982
- }>;
983
- getByIds: (ids: number[]) => Promise<{
984
- records: LocationUnifiedItem[];
985
- total: number;
986
- current: number;
987
- size: number;
988
- }>;
863
+ searchByName: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
864
+ getByIds: (ids: number[]) => Promise<BaseResponse<LocationUnifiedItem>>;
989
865
  };
990
866
  city: {
991
- searchByName: (params: SearchWithScopeParams) => Promise<{
992
- records: LocationUnifiedItem[];
993
- total: number;
994
- current: number;
995
- size: number;
996
- }>;
997
- getByIds: (ids: number[]) => Promise<{
998
- records: LocationUnifiedItem[];
999
- total: number;
1000
- current: number;
1001
- size: number;
1002
- }>;
1003
- getCitiesByCountry: (countryId: number, params?: PageParams) => Promise<{
1004
- records: LocationUnifiedItem[];
1005
- total: number;
1006
- current: number;
1007
- size: number;
1008
- }>;
867
+ getCitiesByCountry: (countryId: number, params?: PageParams) => Promise<BaseResponse<LocationUnifiedItem>>;
868
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
869
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
1009
870
  };
1010
871
  seaport: {
1011
- searchByName: (params: SearchWithScopeParams) => Promise<{
1012
- records: LocationUnifiedItem[];
1013
- total: number;
1014
- current: number;
1015
- size: number;
1016
- }>;
1017
- getByIds: (ids: number[]) => Promise<{
1018
- records: LocationUnifiedItem[];
1019
- total: number;
1020
- current: number;
1021
- size: number;
1022
- }>;
872
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
873
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
1023
874
  };
1024
875
  airport: {
1025
- searchByName: (params: SearchWithScopeParams) => Promise<{
1026
- records: LocationUnifiedItem[];
1027
- total: number;
1028
- current: number;
1029
- size: number;
1030
- }>;
1031
- getByIds: (ids: number[]) => Promise<{
1032
- records: LocationUnifiedItem[];
1033
- total: number;
1034
- current: number;
1035
- size: number;
1036
- }>;
876
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
877
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
878
+ };
879
+ province: {
880
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
881
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
882
+ };
883
+ continent: {
884
+ searchByName: (params: SearchWithScopeParams) => Promise<BaseResponse<LocationUnifiedItem>>;
885
+ getByIds: (ids: number[] | string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
1037
886
  };
1038
887
  wharf: {
1039
- getByIds: (ids: string[]) => Promise<{
1040
- records: LocationUnifiedItem[];
1041
- total: number;
1042
- current: number;
1043
- size: number;
1044
- }>;
888
+ getByIds: (ids: string[]) => Promise<BaseResponse<LocationUnifiedItem>>;
1045
889
  };
1046
890
  carrier: {
1047
- /**
1048
- * 内部私有方法:构建符合 Carrier 接口要求的 payload
1049
- */
1050
- _buildPayload: (params: Partial<SearchByNameParams> & {
1051
- ids?: number[];
1052
- }, lineType: "air" | "shipping") => CarrierRequestPayload;
1053
- /**
1054
- * 搜索船公司 (Shipping Line)
1055
- */
1056
- searchShipping: (params: SearchByNameParams) => Promise<{
1057
- records: LocationUnifiedItem[];
1058
- total: number;
1059
- current: number;
1060
- size: number;
1061
- }>;
1062
- /**
1063
- * 搜索航空公司 (Airline)
1064
- */
1065
- searchAir: (params: SearchByNameParams) => Promise<{
1066
- records: LocationUnifiedItem[];
1067
- total: number;
1068
- current: number;
1069
- size: number;
1070
- }>;
1071
- /**
1072
- * 通用搜索 (需要手动传入 type)
1073
- * 场景:如果前端有一个下拉框让用户选类型,则调用此方法
1074
- */
1075
- search: (params: SearchByNameParams, lineType: "air" | "shipping") => Promise<{
1076
- records: LocationUnifiedItem[];
1077
- total: number;
1078
- current: number;
1079
- size: number;
1080
- }>;
1081
- /**
1082
- * 根据 ID 获取详情
1083
- * 注意:根据你的 Interface,ID 查询可能也需要传 lineType,
1084
- * 默认设为 shipping,或者你需要拆分成两个 ID 方法
1085
- */
1086
- getByIds: (ids: number[], lineType?: "air" | "shipping") => Promise<{
1087
- records: LocationUnifiedItem[];
1088
- total: number;
1089
- current: number;
1090
- size: number;
1091
- }>;
891
+ searchShipping: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
892
+ searchAir: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
893
+ search: (params: SearchByNameParams, lineType: "air" | "shipping") => Promise<BaseResponse<LocationUnifiedItem>>;
894
+ getByIds: (ids: number[], lineType?: "air" | "shipping") => Promise<BaseResponse<LocationUnifiedItem>>;
1092
895
  };
1093
896
  line: {
1094
- /**
1095
- * 内部私有方法:构建符合后端要求的 Payload
1096
- */
1097
- _buildPayload: (params: Partial<SearchByNameParams> & {
1098
- ids?: number[];
1099
- }, lineType: "air" | "shipping") => LineRequestPayload;
1100
- searchAllByCountry: (lineType: "air" | "shipping", countryId?: number) => Promise<{
1101
- records: LocationUnifiedItem[];
1102
- total: number;
1103
- current: number;
1104
- size: number;
1105
- }>;
1106
- /**
1107
- * 搜索海运航线 (Shipping Line)
1108
- * 例如:AE1, TP9
1109
- */
1110
- searchShipping: (params: SearchByNameParams) => Promise<{
1111
- records: LocationUnifiedItem[];
1112
- total: number;
1113
- current: number;
1114
- size: number;
1115
- }>;
1116
- /**
1117
- * 搜索空运航线 (Air Line)
1118
- * 业务上较少见,但接口支持
1119
- */
1120
- searchAir: (params: SearchByNameParams) => Promise<{
1121
- records: LocationUnifiedItem[];
1122
- total: number;
1123
- current: number;
1124
- size: number;
1125
- }>;
1126
- /**
1127
- * 通用搜索 (需要手动传 lineType)
1128
- */
1129
- search: (params: SearchByNameParams, lineType: "air" | "shipping") => Promise<{
1130
- records: LocationUnifiedItem[];
1131
- total: number;
1132
- current: number;
1133
- size: number;
1134
- }>;
1135
- /**
1136
- * 根据 ID 获取航线详情
1137
- * 默认默认为 shipping,如需查空运航线需显式传入
1138
- */
1139
- getByIds: (ids: number[], lineType?: "air" | "shipping") => Promise<{
1140
- records: LocationUnifiedItem[];
1141
- total: number;
1142
- current: number;
1143
- size: number;
1144
- }>;
897
+ searchAllByCountry: (lineType: "air" | "shipping", countryId?: number) => Promise<BaseResponse<LocationUnifiedItem>>;
898
+ searchShipping: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
899
+ searchAir: (params: SearchByNameParams) => Promise<BaseResponse<LocationUnifiedItem>>;
900
+ search: (params: SearchByNameParams, lineType: "air" | "shipping") => Promise<BaseResponse<LocationUnifiedItem>>;
901
+ getByIds: (ids: number[], lineType?: "air" | "shipping") => Promise<BaseResponse<LocationUnifiedItem>>;
1145
902
  };
1146
- /** 获取某个国家下的所有城市 */
1147
- getCitiesByCountry: (countryId: number, params?: PageParams) => Promise<{
1148
- records: LocationUnifiedItem[];
1149
- total: number;
1150
- current: number;
1151
- size: number;
1152
- }>;
1153
- /** 获取某个城市下的子实体 */
1154
- getChildrenByCity: (cityId: number, childTypes: Array<"Seaport" | "Airport" | "Wharf">, params?: PageParams) => Promise<{
1155
- records: LocationUnifiedItem[];
1156
- total: number;
1157
- current: number;
1158
- size: number;
1159
- }>;
903
+ getCitiesByCountry: (countryId: number, params?: PageParams) => Promise<BaseResponse<LocationUnifiedItem>>;
904
+ getChildrenByCity: (cityId: number, childTypes: Array<"Seaport" | "Airport" | "Wharf">, params?: PageParams) => Promise<BaseResponse<LocationUnifiedItem>>;
1160
905
  };
1161
906
 
907
+ /** 所有支持的搜索实体类型(V1 + V2 的 superset) */
1162
908
  export declare type LocationType = "Continent" | "Country" | "Region" | "Province" | "City" | "Seaport" | "Airport" | "Street" | "Town" | "Wharf" | "Carrier" | "Line";
1163
909
 
910
+ /** 标准化后的实体对象(V1 + V2 的 superset) */
1164
911
  export declare interface LocationUnifiedItem {
1165
912
  id: number | string;
1166
913
  type: LocationType;
@@ -1182,39 +929,14 @@ export declare interface LocationUnifiedItem {
1182
929
  [key: string]: unknown;
1183
930
  }
1184
931
 
1185
- /**
1186
- * 用户登录
1187
- * @param loginData
1188
- * @returns
1189
- */
1190
932
  export declare function loginApi(loginData: LoginDataParams): Promise<IResponse<ApiResponse<LoginResponseData>>>;
1191
933
 
1192
- /**
1193
- * 验证码登录注册
1194
- * @param data
1195
- * @returns
1196
- */
1197
934
  export declare function loginByEmailOrMobileCodeApi(data: any): Promise<IResponse<ApiResponse<LoginResponseData>>>;
1198
935
 
1199
- /**
1200
- * Facebook 登录
1201
- * @param data
1202
- * @returns
1203
- */
1204
- export declare function loginByFacebookApi(data: any): Promise<IResponse<ApiResponse<ThirdResponseData>>>;
936
+ export declare const loginByFacebookApi: (data: any) => Promise<IResponse<ApiResponse<ThirdResponseData>>>;
1205
937
 
1206
- /**
1207
- * LinkedIn 登录
1208
- * @param data
1209
- * @returns
1210
- */
1211
- export declare function loginByLinkedinApi(data: any): Promise<IResponse<ApiResponse<ThirdResponseData>>>;
938
+ export declare const loginByLinkedinApi: (data: any) => Promise<IResponse<ApiResponse<ThirdResponseData>>>;
1212
939
 
1213
- /**
1214
- * 微信二维码登录(1s轮询)
1215
- * @param data
1216
- * @returns
1217
- */
1218
940
  export declare function loginByQrCode(data: {
1219
941
  uniqueCode: string;
1220
942
  appId: string;
@@ -1224,14 +946,10 @@ export declare function loginByQrCode(data: {
1224
946
  formEntry?: string;
1225
947
  }): Promise<any>;
1226
948
 
1227
- /**
1228
- * 微信二维码登录绑定用户(验证码)
1229
- * @param data
1230
- * @returns
1231
- */
1232
949
  export declare function loginCodeBindWechatApi(data: any): Promise<any>;
1233
950
 
1234
- declare interface LoginDataParams {
951
+ /** 登录请求参数 */
952
+ export declare interface LoginDataParams {
1235
953
  username: string;
1236
954
  password: string;
1237
955
  appId: string;
@@ -1243,14 +961,10 @@ declare interface LoginDataParams {
1243
961
  referenceUserId: string;
1244
962
  }
1245
963
 
1246
- /**
1247
- * 微信二维码登录绑定用户(账号密码)
1248
- * @param data
1249
- * @returns
1250
- */
1251
964
  export declare function loginPwdBindWechatApi(data: any): Promise<any>;
1252
965
 
1253
- declare interface LoginResponseData {
966
+ /** 登录响应的 data 层 */
967
+ export declare interface LoginResponseData {
1254
968
  redirect: boolean;
1255
969
  redirectPath?: string;
1256
970
  tgc?: string;
@@ -1258,7 +972,8 @@ declare interface LoginResponseData {
1258
972
  hasLogon?: boolean;
1259
973
  }
1260
974
 
1261
- declare interface LoginResult {
975
+ /** 登录结果中的 Token 信息 */
976
+ export declare interface LoginResult {
1262
977
  accessToken: string;
1263
978
  expireIn: number;
1264
979
  refreshToken: string;
@@ -1284,77 +999,72 @@ export declare const normalizeAttrs: (attrs?: GioTrackAttrs) => GioTrackAttrs;
1284
999
 
1285
1000
  export declare const normalizeClickPageAttrs: (eventName: string, attrs?: GioTrackAttrs) => GioTrackAttrs;
1286
1001
 
1002
+ export { OpportunityBoardParams }
1003
+
1287
1004
  /**
1288
1005
  * 页面变更回调
1289
1006
  */
1290
1007
  export declare type PageListenerCallback = (pageProps: GioPageProps) => void;
1291
1008
 
1009
+ /** 分页参数 */
1292
1010
  export declare interface PageParams {
1293
1011
  current?: number;
1294
1012
  size?: number;
1295
1013
  }
1296
1014
 
1297
- export declare const PrjId = "prjId";
1015
+ export declare const PrjId: string;
1016
+
1017
+ /**
1018
+ * 查询商机有效看板数据(分页)。
1019
+ *
1020
+ * 【每次调用新建 SDK 实例,无状态污染】
1021
+ *
1022
+ * @example
1023
+ * ```ts
1024
+ * import { queryOpportunityBoard } from '@jctrans-materials/shared'
1025
+ *
1026
+ * const result = await queryOpportunityBoard({
1027
+ * compId: 12345,
1028
+ * dateType: 'QUARTER',
1029
+ * dateValue: '2026-Q2',
1030
+ * })
1031
+ *
1032
+ * if (result.success) {
1033
+ * console.log(result.data.records)
1034
+ * }
1035
+ * ```
1036
+ */
1037
+ export declare function queryOpportunityBoard(params: OpportunityBoardParams): Promise<BoardQueryResult>;
1298
1038
 
1299
- export declare const RefreshExpiresInKey = "JC-Refresh-Expires-In";
1039
+ export declare const RefreshExpiresInKey: string;
1300
1040
 
1301
- export declare const RefreshExpiresInTimeKey = "JC-Refresh-Expires-Time-In";
1041
+ export declare const RefreshExpiresInTimeKey: string;
1302
1042
 
1303
- export declare const RefreshTokenKey = "JC-Refresh-Token";
1043
+ export declare const RefreshTokenKey: string;
1304
1044
 
1305
- /**
1306
- * 国际站峰会注册
1307
- * @param data
1308
- * @returns
1309
- */
1310
1045
  export declare function registerApi(data: any): Promise<any>;
1311
1046
 
1312
- /**
1313
- * 使用第三方应用注册用户公司
1314
- * @param data
1315
- * @returns
1316
- */
1317
1047
  export declare function registerByThirdPartyApi(data: any): Promise<any>;
1318
1048
 
1319
- /**
1320
- * 用户注册加入公司
1321
- * @param data
1322
- * @returns
1323
- */
1324
1049
  export declare function registerJoinCompanyApi(data: any): Promise<any>;
1325
1050
 
1326
- /**
1327
- * 微信二维码登录用户注册加入公司 🍉
1328
- * @param data
1329
- * @returns
1330
- */
1331
1051
  export declare function registerJoinCompanyBindWechatApi(data: any): Promise<any>;
1332
1052
 
1333
- /**
1334
- * 第三方应用注册加入公司
1335
- * @param data
1336
- * @returns
1337
- */
1338
1053
  export declare function registerJoinCompByThirdPartyApi(data: any): Promise<any>;
1339
1054
 
1340
- /**
1341
- * 微信二维码登录注册用户公司
1342
- * @param data
1343
- * @returns
1344
- */
1345
1055
  export declare function registerUserCompBindWechatApi(data: any): Promise<any>;
1346
1056
 
1347
- export declare const RememberMeAccountKey = "JC-Remember-Account";
1057
+ export declare const RememberMeAccountKey: string;
1348
1058
 
1349
- export declare const RememberMePasswordKey = "JC-Remember-Password";
1059
+ export declare const RememberMePasswordKey: string;
1350
1060
 
1351
- export declare interface reportNewTypeData {
1061
+ export declare interface ReportNewTypeData {
1352
1062
  reportData: string;
1353
1063
  reportType: ReportType;
1354
1064
  countryId?: string | number;
1355
1065
  }
1356
1066
 
1357
- export declare function reportNewTypeDataApi(payload: reportNewTypeData): Promise<{}>;
1067
+ export declare function reportNewTypeDataApi(payload: ReportNewTypeData): Promise<Record<string, any>>;
1358
1068
 
1359
1069
  export declare type ReportType = "City" | "Seaport" | "Airport" | "Line" | "Carrier" | "shipping_line" | "shipping_carrier" | "air_line" | "air_carrier";
1360
1070
 
@@ -1377,23 +1087,18 @@ declare interface RequestOptions {
1377
1087
  fetch?: typeof fetch;
1378
1088
  }
1379
1089
 
1380
- /**
1381
- * 重置 session
1382
- */
1383
1090
  export declare function resetAuthSessionItems(): void;
1384
1091
 
1385
- /**
1386
- * 重置 GIO 相关 session
1387
- * @returns
1388
- */
1389
1092
  export declare function resetGioSessionItems(): void;
1390
1093
 
1391
- /**
1392
- * 重置密码
1393
- * @param data
1394
- * @returns
1395
- */
1396
- export declare function resetPasswordApi(data: any): Promise<any>;
1094
+ export declare function resetPasswordApi(data: ResetPasswordData): Promise<any>;
1095
+
1096
+ declare interface ResetPasswordData {
1097
+ account?: string;
1098
+ password?: string;
1099
+ code?: string;
1100
+ [key: string]: any;
1101
+ }
1397
1102
 
1398
1103
  /**
1399
1104
  * 保存 clientId 到 localStorage
@@ -1407,8 +1112,6 @@ export declare function saveClientIdToSessionStorage(clientId: string): void;
1407
1112
 
1408
1113
  /**
1409
1114
  * 统一搜索接口
1410
- * - 支持 keyword(模糊), displayInfo(数组), ids(按 type), scope(countryId/cityId/provinceId)
1411
- * - 返回扁平化的 UnifiedItem 列表 + 分页信息
1412
1115
  */
1413
1116
  export declare function search(params: {
1414
1117
  keyword?: string;
@@ -1433,7 +1136,7 @@ export declare function searchAirportByName(keyword: string, opts?: {
1433
1136
  page?: number;
1434
1137
  size?: number;
1435
1138
  cityId?: number;
1436
- }): Promise<BaseResponse<UnifiedItem>>;
1139
+ }): Promise<BaseResponse<LocationUnifiedItem>>;
1437
1140
 
1438
1141
  /**
1439
1142
  * 按名称搜索指定类型
@@ -1447,6 +1150,7 @@ export declare function searchByName(params: {
1447
1150
  sort?: string;
1448
1151
  }): Promise<BaseResponse<UnifiedItem>>;
1449
1152
 
1153
+ /** 按名称搜索参数 */
1450
1154
  export declare interface SearchByNameParams extends PageParams {
1451
1155
  keyword: string;
1452
1156
  searchMode?: "0" | "1" | "2";
@@ -1456,13 +1160,14 @@ export declare function searchCityByName(keyword: string, opts?: {
1456
1160
  page?: number;
1457
1161
  size?: number;
1458
1162
  countryId?: number;
1459
- }): Promise<BaseResponse<UnifiedItem>>;
1163
+ }): Promise<BaseResponse<LocationUnifiedItem>>;
1460
1164
 
1461
1165
  export declare function searchCountryByName(keyword: string, opts?: {
1462
1166
  page?: number;
1463
1167
  size?: number;
1464
- }): Promise<BaseResponse<UnifiedItem>>;
1168
+ }): Promise<BaseResponse<LocationUnifiedItem>>;
1465
1169
 
1170
+ /** 通用搜索参数(需指定 displayInfo) */
1466
1171
  export declare interface SearchGenericParams extends SearchByNameParams {
1467
1172
  displayInfo: LocationType[];
1468
1173
  }
@@ -1471,19 +1176,15 @@ export declare function searchSeaportByName(keyword: string, opts?: {
1471
1176
  page?: number;
1472
1177
  size?: number;
1473
1178
  cityId?: number;
1474
- }): Promise<BaseResponse<UnifiedItem>>;
1179
+ }): Promise<BaseResponse<LocationUnifiedItem>>;
1475
1180
 
1181
+ /** 带范围约束的搜索参数 */
1476
1182
  export declare interface SearchWithScopeParams extends SearchByNameParams {
1477
1183
  countryId?: number;
1478
1184
  cityId?: number;
1479
1185
  provinceId?: number;
1480
1186
  }
1481
1187
 
1482
- /**
1483
- * 发送邮箱验证码
1484
- * @param data
1485
- * @returns
1486
- */
1487
1188
  export declare function sendEmailCodeApi(data: {
1488
1189
  target: string;
1489
1190
  countryId?: number;
@@ -1491,11 +1192,6 @@ export declare function sendEmailCodeApi(data: {
1491
1192
  uuid?: string;
1492
1193
  }): Promise<any>;
1493
1194
 
1494
- /**
1495
- * 发送手机验证码
1496
- * @param data
1497
- * @returns
1498
- */
1499
1195
  export declare function sendMobileCodeApi(data: {
1500
1196
  target: string;
1501
1197
  countryId?: number;
@@ -1503,38 +1199,12 @@ export declare function sendMobileCodeApi(data: {
1503
1199
  uuid?: string;
1504
1200
  }): Promise<any>;
1505
1201
 
1506
- /**
1507
- * 全局设置 session
1508
- * @param data
1509
- */
1510
- export declare function setAuthSessionItems(data: {
1511
- activityCode?: string | null;
1512
- referenceUserId?: string | null;
1513
- empNo?: string | null;
1514
- uniqueCode?: string | null;
1515
- path?: string | null;
1516
- clickSource?: string | null;
1517
- registerEvent?: string | null;
1518
- registerType?: string | null;
1519
- compKey?: string | null;
1520
- }): void;
1202
+ export declare function setAuthSessionItems(data: AuthSessionData): void;
1521
1203
 
1522
- /**
1523
- * 全局设置 GIO 相关 session
1524
- * @param data
1525
- */
1526
- export declare function setGioSessionItems(data: {
1527
- registerEntry?: string | null;
1528
- }): void;
1204
+ export declare function setGioSessionItems(data: GioSessionData): void;
1529
1205
 
1530
- /**
1531
- * 记住账号 (替代存密码)
1532
- */
1533
1206
  export declare function setRememberMe(account: string, password: string, remember: boolean): void;
1534
1207
 
1535
- /**
1536
- * 整体设置所有凭证
1537
- */
1538
1208
  export declare function setTokenAll(data: TokenData | null | undefined): void;
1539
1209
 
1540
1210
  export declare interface SharedConfig {
@@ -1545,29 +1215,20 @@ export declare interface SharedConfig {
1545
1215
  linePath: string;
1546
1216
  allLinePath: string;
1547
1217
  appId?: string;
1218
+ commonKeys?: Partial<CommonKeysConfig>;
1548
1219
  }
1549
1220
 
1550
- /**
1551
- * 滑动或者点选验证
1552
- * @param data
1553
- * @returns
1554
- */
1555
1221
  export declare function slideCheckApi(data: {
1556
1222
  pointJson: string;
1557
1223
  uuid: string;
1558
1224
  }): Promise<any>;
1559
1225
 
1560
- /**
1561
- * 获取验证图片 以及token
1562
- * @param data
1563
- * @returns
1564
- */
1565
1226
  export declare function slideGetApi(data: {
1566
1227
  clientUid: string;
1567
1228
  ts: number;
1568
1229
  }): Promise<any>;
1569
1230
 
1570
- declare interface ThirdPartyInfo {
1231
+ export declare interface ThirdPartyInfo {
1571
1232
  thirdPartyEmail: string;
1572
1233
  thirdPartyId: string;
1573
1234
  thirdPartyType: string;
@@ -1575,31 +1236,24 @@ declare interface ThirdPartyInfo {
1575
1236
  [property: string]: any;
1576
1237
  }
1577
1238
 
1578
- declare interface ThirdResponseData {
1579
- /**
1580
- * 手机邮箱匹配列表 (修正为数组)
1581
- */
1239
+ /** 第三方登录响应 */
1240
+ export declare interface ThirdResponse {
1241
+ code: number;
1242
+ data: ThirdResponseData;
1243
+ msg: string;
1244
+ [property: string]: any;
1245
+ }
1246
+
1247
+ export declare interface ThirdResponseData {
1582
1248
  mobileEmailList: ThirdResponseMobileEmailList[];
1583
- /**
1584
- * 是否跳转, true跳转 false不跳转
1585
- */
1586
1249
  redirect: boolean;
1587
- /**
1588
- * 跳转路径
1589
- */
1590
1250
  redirectPath: string;
1591
- /**
1592
- * tgc
1593
- */
1594
1251
  tgc: string;
1595
- /**
1596
- * 三方信息
1597
- */
1598
1252
  thirdPartyInfo: ThirdPartyInfo;
1599
1253
  [property: string]: any;
1600
1254
  }
1601
1255
 
1602
- declare interface ThirdResponseMobileEmailList {
1256
+ export declare interface ThirdResponseMobileEmailList {
1603
1257
  account: string;
1604
1258
  cityId: number;
1605
1259
  cityNameCn: string;
@@ -1619,9 +1273,6 @@ declare interface ThirdResponseMobileEmailList {
1619
1273
 
1620
1274
  export declare const TOKEN_ENDPOINTS: Set<string>;
1621
1275
 
1622
- /**
1623
- * 3. 类型定义
1624
- */
1625
1276
  export declare interface TokenData {
1626
1277
  accessToken?: string;
1627
1278
  expireIn?: number;
@@ -1629,50 +1280,21 @@ export declare interface TokenData {
1629
1280
  refreshTokenExpireIn?: number;
1630
1281
  }
1631
1282
 
1632
- /**
1633
- * 2. 常量定义 (补全所有业务 Key)
1634
- */
1635
- export declare const TokenKey = "JC-JAVA-Token-Root";
1283
+ export declare const TokenKey: string;
1636
1284
 
1637
1285
  export declare function toSafeHeaderValue(value: string): string;
1638
1286
 
1639
1287
  export declare const tracker: GioTracker;
1640
1288
 
1641
- /** 归一化之后的实体 */
1642
- export declare interface UnifiedItem {
1643
- id: number | string;
1644
- type: DisplayInfo;
1645
- nameCn?: string;
1646
- nameEn?: string;
1647
- display?: string;
1648
- continent?: Record<string, any>;
1649
- country?: Record<string, any>;
1650
- city?: Record<string, any>;
1651
- province?: Record<string, any>;
1652
- raw?: any;
1653
- }
1289
+ /** 兼容旧名:baseSearch.UnifiedItem */
1290
+ export declare type UnifiedItem = LocationUnifiedItem;
1654
1291
 
1655
- /**
1656
- * 获取用户信息
1657
- * @param data
1658
- * @returns
1659
- */
1660
- export declare function userCompPermsApi(data: any): Promise<any>;
1292
+ export declare function userCompPermsApi(data: Record<string, any>): Promise<any>;
1661
1293
 
1662
- /**
1663
- * 验证账号是否存在 /auth/validateAccountExist
1664
- * @param data
1665
- * @returns
1666
- */
1667
1294
  export declare function validateAccountExistApi(data: {
1668
1295
  target: string;
1669
1296
  }): Promise<any>;
1670
1297
 
1671
- /**
1672
- * 校验注册公司是否重名
1673
- * @param data
1674
- * @returns
1675
- */
1676
1298
  export declare function validateCompanyApi(data: {
1677
1299
  countryId: number;
1678
1300
  cityId: number;