@gjzq/sdk 1.6.0-beta.2 → 1.6.0-beta.4

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +1790 -1255
  2. package/package.json +4 -3
package/dist/index.d.ts CHANGED
@@ -1,1255 +1,1790 @@
1
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
-
3
- type AddCalendarParams = {
4
- title: string;
5
- start: number;
6
- end?: number;
7
- remindMinutes?: number;
8
- repeat?: number;
9
- location?: string;
10
- description?: string;
11
- };
12
- /**
13
- * 添加日历事件 3022
14
- * @function addCalendar
15
- * @param {AddCalendarParams} param
16
- * @returns {Promise<object>}
17
- */
18
- declare const addCalendar: (param: AddCalendarParams) => Promise<object>;
19
-
20
- type PortfolioParams$1 = {
21
- stockCode: string;
22
- codeType?: number;
23
- stockName?: string;
24
- };
25
- /**
26
- * 添加股票至自选股 4011
27
- * @function addToPortfolio
28
- * @param {PortfolioParams} param 参数
29
- * @returns {Promise<object>} 返回值
30
- */
31
- declare const addToPortfolio: (param: PortfolioParams$1) => Promise<object | null>;
32
-
33
- /**
34
- * 初始化 (检测webapps-session数据正确性)
35
- * @function appInit
36
- * @returns {Promise<boolean>}
37
- */
38
- declare function appInit(): Promise<boolean>;
39
-
40
- /**
41
- * 调用银联继承的apple pay支付功能 3021
42
- * @function applePay
43
- * @param {object} orderInfo orderInfo
44
- * @param {String} mode "00" 代表接入生产环境 "01"代表接入开发测试环境
45
- * @retruns {Promise<object>} 返回结果
46
- */
47
- declare const appleChinaPay: (orderInfo: object, mode: string | null) => Promise<object | null>;
48
-
49
- /**
50
- * 调用银联继承的apple pay支付功能 3020
51
- * @function appleUnionPay
52
- * @param {String} tn 交易流水号
53
- * @param {String} mID 苹果公司分配的商铺号
54
- * @param {String} mode "00" 代表接入生产环境 "01"代表接入开发测试环境
55
- * @retruns {Promise<object>} 返回结果
56
- */
57
- declare const appleUnionPay: (tn: string, mID: string, mode: string | null) => Promise<object | null>;
58
-
59
- type ApplyPermissionParams = {
60
- permission?: number;
61
- permissions: string;
62
- switch?: string;
63
- };
64
- /**
65
- * 申请系统权限(安卓) 3019
66
- * @function applyPermission
67
- * @param {ApplyPermissionParams} param
68
- * @returns {Promise<object>}
69
- */
70
- declare const applyPermission: (param: ApplyPermissionParams) => Promise<object>;
71
-
72
- /**
73
- * 检查登录状态并在未登录情况下调用登录功能
74
- * @function beginLogin
75
- * @param {number} loginType 登录类型
76
- * @param {string} channelId 渠道号 普通信用可缺省
77
- * @returns {Promise<any>}
78
- */
79
- declare const beginLogin: (loginType: string, channelId: string, json?: any) => Promise<any>;
80
-
81
- /**
82
- * 检查登录状态并在未登录情况下调用登录功能
83
- * @function beginLogin
84
- * @param {string} loginType 登录类型
85
- * @param {string} backUrl 登录成功跳转URL(尽在未登录条件下适用,可直接跳转目标页,优化体验)
86
- * @param {Object} loginParam 补充参数,目前仅应用于用户登录
87
- * @param {Object} loginParam.key 用户登录营销参数,格式参考4015功能号
88
- * @returns {Promise<boolean> | void}
89
- */
90
- declare function beginLoginForWeb(loginType: string, backUrl: string, loginParam?: object): Promise<boolean | void>;
91
-
92
- interface BindInfoData {
93
- userId?: string;
94
- passportId?: string;
95
- YJB_userId?: string;
96
- clientId?: string;
97
- }
98
- /**
99
- *
100
- * @param data
101
- * 2025.01.02 经讨论 退登不解绑!!
102
- */
103
- declare function bindInfo(data: BindInfoData): void;
104
-
105
- /**
106
- *
107
- * @param params
108
- * user_unique_id => clientId
109
- * pid
110
- * userId
111
- * 若finder已初始化,则直接绑定
112
- * 若未初始化,则加入全局变量中。待finder初始化后,由collect中initFinder方法后调用
113
- */
114
- declare function bindInfoFunc(params: object): void;
115
-
116
- /**
117
- * call 功能组件
118
- */
119
- declare const call: (phoneNumber: string) => void;
120
-
121
- /**
122
- * 调用拨号功能
123
- * @function callphone
124
- * @param {string} phonenum 手机号码
125
- * @returns {Promise<any>}
126
- */
127
- declare const callphone: (phonenum: string) => Promise<void>;
128
-
129
- type changeSkinTypeParams = {
130
- skinType: number;
131
- };
132
- /**
133
- * changeSkinType 换肤 4026
134
- * skinType: 0-白,1-黑
135
- */
136
- declare function changeSkinType(param: changeSkinTypeParams): void;
137
-
138
- /**
139
- * webapp 账户类型
140
- */
141
- declare enum AccountType {
142
- FUNDACCOUNT = 0,
143
- MARGINACCOUNT = 1,
144
- USERID = "u"
145
- }
146
- declare enum LoginType {
147
- USER = "u",
148
- PASSPORT = "p",
149
- FUNDACCOUNT = "1",
150
- MARGINACCOUNT = "2"
151
- }
152
- declare enum LoginTypeEnum {
153
- '($userId)' = "u",
154
- '($passportId)' = "p",
155
- '($clientId)' = "1",
156
- '($fundAccount)' = "1",
157
- '($fundPassword)' = "1",
158
- '($fundAccountType)' = "1",
159
- '($marginAccount)' = "2",
160
- '($marginPassword)' = "2"
161
- }
162
- declare enum ReadFileType {
163
- OFFICE = 1,
164
- PDF = 2
165
- }
166
- declare enum LinkPageEnvEnum {
167
- HYBRID = 1,// hybrid
168
- WEBAPPS = 2,// webapps
169
- NATIVE = 3
170
- }
171
- declare enum LinkParamsEnvEnum {
172
- LINK_SETTING = 1,// link链接参数
173
- REDIRECT = 2,// redirectManager_options
174
- OPEN_APP = 3
175
- }
176
- type ClientJumpParams$1 = {
177
- type: number;
178
- stockCode?: string;
179
- codeType?: number;
180
- tabName?: string;
181
- exchangeType?: string;
182
- stockAccount?: string;
183
- tradeType?: number;
184
- isReopen?: number;
185
- bondPeriod?: number;
186
- mobileCode?: string;
187
- mobileCodeStyle?: number;
188
- isSTIB?: number;
189
- };
190
- type OpenParams = {
191
- url?: string;
192
- fullScreen?: number;
193
- navBarStyle?: number;
194
- navBarBgColor?: string;
195
- title?: string;
196
- titleColor?: string;
197
- subtitle?: string;
198
- subtitleColor?: string;
199
- leftType?: number;
200
- rightType?: number;
201
- leftText?: string;
202
- leftTextColor?: string;
203
- rightText?: string;
204
- rightTextColor?: string;
205
- leftJS?: string;
206
- rightJS?: string;
207
- leftURL?: string;
208
- rightURL?: string;
209
- leftButtons?: number[];
210
- rightButtons?: number[];
211
- condition?: number;
212
- animated?: number;
213
- skinType?: number;
214
- canRefresh?: number;
215
- refreshJS?: string;
216
- showLoadingPage?: string;
217
- keepActive?: number;
218
- enableSwipeLeftGoBack?: number;
219
- };
220
- type HttpResponse<T = unknown> = {
221
- code: number;
222
- message?: string;
223
- data?: T;
224
- };
225
-
226
- /**
227
- * fundaccount登录状态检查
228
- * @function checkFundAccountLogin
229
- * @returns {Promise<HttpResponse>}
230
- */
231
- declare function checkFundAccountLogin(): Promise<HttpResponse>;
232
-
233
- /**
234
- * 检查登录状态
235
- * @function checkLogin
236
- * @param {string} loginType 登录类型
237
- * @param {string} channelId 渠道号 普通信用可缺省
238
- * @returns {Promise<any>}
239
- */
240
- declare const checkLogin: (loginType: string, channelId: string) => Promise<any>;
241
-
242
- /**
243
- * 检查登录状态
244
- * @function checkLogin
245
- * @param {string} loginType 登录类型
246
- * @returns {Promise<boolean>}
247
- */
248
- declare function checkLoginForWeb(loginType: string): Promise<boolean | Number>;
249
-
250
- /**
251
- * marginAccount登录状态检查
252
- * @function checkMarginAccountLogin
253
- * @returns {Promise<HttpResponse>}
254
- */
255
- declare function checkMarginAccountLogin(): Promise<HttpResponse>;
256
-
257
- /**
258
- * user登录状态检查
259
- * @function checkUserLogin
260
- * @returns {Promise<HttpResponse>}
261
- */
262
- declare function checkUserLogin(): Promise<HttpResponse>;
263
-
264
- type ChooseImgParams = {
265
- source?: number;
266
- front?: number;
267
- size?: number;
268
- compressionQuality?: number;
269
- floatingLayer?: number;
270
- };
271
- /**
272
- * 选择照片 3004
273
- * @function chooseImg
274
- * @param {ChooseImgParams} param
275
- * {<br />
276
- * source: 0-从相册选择,1-拍照<br />
277
- * front: 0-后置摄像头,1-前置摄像头<br />
278
- * size: 客户端需要将图片高或者宽中较大的一边,缩小到这个size,然后将另一边按比例缩放<br />
279
- * compressionQuality:JPEG压缩比例,范围为0.0-1.0。size和压缩比暂定1200和0.6,后续可调整。<br />
280
- * floatingLayer:浮层类型,仅在source为1时生效。0没有,1身份证正面(人头),2身份证反面(国徽),3自拍头像。<br />
281
- * }<br />
282
- * @returns {Promise<object>} 返回值<br/>
283
- * code 0成功,1失败,2取消。<br />
284
- * result.data: base64编码的图片信息
285
- */
286
- declare const chooseImg: (param: ChooseImgParams) => Promise<object>;
287
-
288
- type ChooseVideoParams = {
289
- front?: number;
290
- width?: number;
291
- height?: number;
292
- duration?: number;
293
- bitRate?: number;
294
- fps?: number;
295
- title?: string;
296
- content?: string;
297
- };
298
- /**
299
- * 客户端本地录制视频 3009
300
- * @function chooseVideo
301
- * @param {ChooseVideoParams} param
302
- * {
303
- * front number 0代表非前置(后置)摄像头,1代表前置摄像头。
304
- * width number 视频宽度
305
- * height number 视频高度
306
- * duration number 视频最大长度,单位秒,默认-1,不限制视频长度。
307
- * bitRate number 码率
308
- * fps number 帧数
309
- * title string 录制屏幕上方显示的标题(例如“请用标准普通话匀速朗读”)
310
- * content string 录制屏幕上方显示的正文(例如“本人自愿在国金证券开户”)
311
- * }
312
- * @returns {Promise<object>} Promise<object>
313
- * code 0成功,1失败,2取消。
314
- * result.filePath: 客户端存储视频的本地路径。
315
- * result.fileSize: 视频文件大小
316
- * result.duration: 视频文件长度
317
- */
318
- declare const chooseVideo: (param: ChooseVideoParams) => Promise<object>;
319
-
320
- type ClientJumpParams = {
321
- type: number;
322
- stockCode?: string;
323
- codeType?: number;
324
- tabName?: string;
325
- exchangeType?: string;
326
- stockAccount?: string;
327
- tradeType?: number;
328
- isReopen?: number;
329
- bondPeriod?: number;
330
- mobileCode?: string;
331
- mobileCodeStyle?: number;
332
- isSTIB?: number;
333
- listKeys?: string;
334
- title?: string;
335
- };
336
- /**
337
- * 客户端本地页面跳转 4002
338
- * @function clientJump
339
- * @param {ClientJumpParams} param
340
- */
341
- declare const clientJump: (params: ClientJumpParams) => void;
342
-
343
- /**
344
- * 关闭webview的loading页面 3017
345
- * @function closeLoading
346
- * @returns {Promise<object>}
347
- */
348
- declare const closeLoading: () => Promise<object>;
349
-
350
- type CloseParams = {
351
- type?: number;
352
- rootType?: number;
353
- url?: string;
354
- };
355
- declare function closePage(params: CloseParams): void;
356
-
357
- type DeleteCalendarParams = {
358
- eventIds: string[];
359
- };
360
- /**
361
- * 删除日历事件 3024
362
- * @function vivoDetection
363
- * @param {DeleteCalendarParams} param
364
- * @returns {Promise<object>}
365
- */
366
- declare const deleteCalendar: (param: DeleteCalendarParams) => Promise<object>;
367
-
368
- /**
369
- * 完成适当性测评,关闭webview,继续登录前的操作 4009
370
- * @function doneSuitability
371
- * @param {number} loginType 登录类型 见:login
372
- * @param {number} isValid 是否完成:0-未完成,1-已完成
373
- */
374
- declare const doneSuitability: (loginType: number, isValid: number) => void;
375
-
376
- type execType = {
377
- funcId: number;
378
- param: object;
379
- respCallback: (params: object) => void;
380
- noNativeInterfaceAvailable: (params: object) => void;
381
- };
382
- /**
383
- * exec 功能组件
384
- */
385
- declare function exec({ funcId, param, respCallback, noNativeInterfaceAvailable }: execType): void;
386
-
387
- type FundAccountLoginParams = {
388
- instant_token?: string;
389
- op_station?: string;
390
- account_type?: AccountType;
391
- };
392
- /**
393
- * fundaccount登录
394
- * @function fundAccountLogin
395
- * @param {FundAccountLoginParams} param
396
- * @returns {Promise<HttpResponse>}
397
- */
398
- declare function fundAccountLogin(param: FundAccountLoginParams): Promise<HttpResponse>;
399
-
400
- declare function getAppId(): Promise<string>;
401
-
402
- /**
403
- * 获取AppVersion
404
- */
405
- declare function getAppVersion(): Promise<string | null>;
406
-
407
- /**
408
- * 获取资金流向数据 4017
409
- * @function getCapital
410
- * @param {String} code 渠道编号
411
- * @param {number} codeType 渠道编号
412
- * @retruns {Promise<object>} 返回结果
413
- */
414
- declare const getCapital: (code: string, codeType: number) => Promise<object | null>;
415
-
416
- /**
417
- * getInterfaceVersion 功能组件
418
- */
419
- declare function getInterfaceVersion(): Promise<string | null>;
420
-
421
- /**
422
- * 获取登录状态 4012
423
- * @function getLoginStatus
424
- * @param {function} callback callback接收结果作为参数
425
- */
426
- declare const getLoginStatus: () => Promise<number | null>;
427
-
428
- /**
429
- * 获取页面路径
430
- * @function getPagePath
431
- * @returns {string}
432
- */
433
- declare const getPagePath: () => string;
434
-
435
- /**
436
- * getSystemVersion 功能组件
437
- */
438
- declare function getSystemVersion(): Promise<string | null>;
439
-
440
- /**
441
- *
442
- * @returns 获取UDID
443
- */
444
- declare function getUDID(): Promise<string | null>;
445
-
446
- /**
447
- *
448
- * @returns 获取UID
449
- */
450
- declare function getUID(): Promise<string | null>;
451
-
452
- /**
453
- * 获取与channelId对应的ukeys 4012
454
- * @param {String} channelId 渠道编号
455
- * @function getukeys
456
- * @returns {Promise<string>} 获取成功后,callback接收ukey作为参数(获取失败时,返回null)
457
- */
458
- declare const getUkeyByChannelId: (channelId: string) => Promise<string | null>;
459
-
460
- /**
461
- * 获取与channelId对应的userUKeys 4012
462
- * @param {String} channelId 渠道编号
463
- * @function getUserUKeys
464
- * @returns {Promise<string>} 获取成功后,callback接收ukey作为参数(获取失败时,返回null)
465
- */
466
- declare const getUserUKeysByChannelId: (channelId: string) => Promise<string | null>;
467
-
468
- type WechatUserInfoOptions = {
469
- code: string;
470
- account_name?: string;
471
- app_name?: string;
472
- };
473
- /**
474
- * 获取微信用户信息
475
- */
476
- declare const getWechatUserInfo: (options: WechatUserInfoOptions) => Promise<unknown>;
477
-
478
- type goAlipayResult = {
479
- message: string;
480
- result: string | object;
481
- code: number;
482
- };
483
- /**
484
- * @description 端内支付宝支付,功能号:3012
485
- * @param {string} order 支付订单参数
486
- * goAlipay 功能组件
487
- */
488
- declare function goAlipay(order: string): Promise<goAlipayResult>;
489
-
490
- /**
491
- * 页面返回
492
- * @function goBackPage
493
- * @param {CloseParams} config 设置参数
494
- * @returns {Promise<void>}
495
- */
496
- declare const goBackPage: (config?: CloseParams) => Promise<void>;
497
-
498
- type goWechatCustomServiceParams = {
499
- corpId?: string;
500
- url?: string;
501
- };
502
- /**
503
- * 跳转微信客服页面 3039
504
- * @function goWechatCustomService
505
- * @param {goWechatCustomServiceParams} param
506
- * @retruns {Promise<object>} 返回结果
507
- */
508
- declare const goWechatCustomService: (param: goWechatCustomServiceParams) => Promise<object>;
509
-
510
- type goWechatPaymentResult = {
511
- code: number;
512
- message: string;
513
- result: object;
514
- };
515
- /**
516
- * @description goWechatPayment 微信支付功能
517
- * @param {WechatPayParams} params 微信支付参数
518
- * @returns {Promise<object>} 微信支付返回的信息
519
- */
520
- type WechatPayParams = {
521
- appId: string;
522
- partnerId: string;
523
- prepayId: string;
524
- nonceStr: string;
525
- timeStamp: string;
526
- packageStr: string;
527
- sign: string;
528
- };
529
- declare function goWechatPayment(params: WechatPayParams): Promise<goWechatPaymentResult>;
530
-
531
- /**
532
- * 微信分享 3015
533
- * @function goWeChatShare
534
- * @param {any} param 分享参数 (第三方参数透传,请查看native文档)
535
- * @returns {Promise<object>} 微信分享返回的信息
536
- */
537
- declare const goWeChatShare: (params: object) => Promise<object>;
538
-
539
- /**
540
- * 支付时暴露给调用者的参数
541
- */
542
- type PayExportOptions = {
543
- source?: string;
544
- pay_type: number | string;
545
- subject: string;
546
- out_trade_no: number;
547
- total_fee: number | string;
548
- promo_params?: string;
549
- goods_type?: string;
550
- detail?: string;
551
- timeout_express?: string;
552
- account_name?: string;
553
- app_name?: string;
554
- product_code?: string;
555
- device_info?: string;
556
- openid?: string;
557
- return_url?: string;
558
- passback_params?: string;
559
- skip_pre_order?: boolean;
560
- pre_order_result?: unknown;
561
- wxWebAuthCode?: string;
562
- };
563
-
564
- /**
565
- * WEB-H5支付支付方法【微信,支付宝】
566
- */
567
- declare const h5Pay: (options: PayExportOptions) => Promise<unknown>;
568
-
569
- interface HttpRequestConfig extends AxiosRequestConfig {
570
- directResponse?: boolean;
571
- notParseResponse?: boolean;
572
- beginLoginBackUrl?: string;
573
- LoginAction?: (loginType: LoginTypeEnum) => Promise<boolean | void>;
574
- }
575
- interface HttpInterface extends AxiosInstance {
576
- request<T = unknown>(config: HttpRequestConfig): Promise<T>;
577
- get<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
578
- delete<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
579
- head<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
580
- options<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
581
- post<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
582
- put<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
583
- patch<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
584
- }
585
-
586
- declare const http: HttpInterface;
587
-
588
- /**
589
- * 获取PassportId-依赖内部环境 4004
590
- * @param {SaveFileInDiskParams} param
591
- * @function hybridGetPassport
592
- * @returns {void}
593
- */
594
- declare const hybridGetPassport: () => Promise<string | null>;
595
-
596
- /**
597
- * 获取PassportId-依赖内部环境 4004
598
- * @param {SaveFileInDiskParams} param
599
- * @function hybridGetPassport
600
- * @returns {void}
601
- */
602
- declare const hybridGetUserId: () => Promise<string | null>;
603
-
604
- type TInitFinder = {
605
- app_id: string | number;
606
- env: string;
607
- Native?: boolean;
608
- enable_native?: boolean;
609
- disable_auto_pv?: boolean;
610
- spa?: boolean;
611
- enable_ab_test?: boolean;
612
- cross_subdomain?: boolean;
613
- cookie_domain?: string;
614
- max_report?: number | string;
615
- reportTime?: number | string;
616
- timeout?: number | string;
617
- enable_custom_webid?: boolean;
618
- disable_ab_reset?: boolean;
619
- enable_stay_duration?: boolean;
620
- };
621
- declare const initFinder: (params: TInitFinder) => Promise<void>;
622
-
623
- /**广告链接解析入参*/
624
- type LinkDecodeParam$1 = {
625
- LINK_PAGE_ENV: LinkPageEnvEnum;
626
- LINK_PARAM: LinkParamsEnvEnum;
627
- };
628
- /**回流参数解析入参*/
629
- type LinkActionConfigParam = {
630
- type: 'web' | 'native';
631
- param: {
632
- url?: string;
633
- type?: number;
634
- closeBack?: number;
635
- hashIgnore?: number;
636
- [prop: string]: any;
637
- };
638
- precondition?: {
639
- announceSubType?: string;
640
- loginType?: number;
641
- isWeakLogin?: 0 | 1;
642
- needToken?: 0 | 1;
643
- };
644
- };
645
- /**
646
- * v2工具:回流配置转换成v1广告配置,并根据使用场景返回跳转参数对象
647
- * @function linkDecode
648
- * @param {string} link 需要解析的链接(用配置工具生成的)
649
- * @param {LinkDecodeParam} config 附加参数
650
- * @returns {json}
651
- */
652
- declare const linkActionDecode: (action: LinkActionConfigParam, config?: LinkDecodeParam$1) => any;
653
-
654
- /**广告链接解析入参**/
655
- type LinkDecodeParam = {
656
- LINK_PAGE_ENV: LinkPageEnvEnum;
657
- LINK_PARAM: LinkParamsEnvEnum;
658
- };
659
- /**
660
- * v1工具:广告配置链接解析,并根据使用场景返回跳转参数对象
661
- * @function linkDecode
662
- * @param {string} link 需要解析的链接(用配置工具生成的)
663
- * @param {LinkDecodeParam} config 附加参数
664
- * @returns {json}
665
- */
666
- declare const linkDecode: (link: string, config?: LinkDecodeParam) => any;
667
-
668
- type loginResult = {
669
- result: any;
670
- errStr?: string;
671
- message: string;
672
- code: number | string;
673
- errCode?: number | string;
674
- };
675
- type LoginParams = {
676
- type?: 1 | 2 | 16;
677
- needPassportId?: 0 | 1;
678
- needStockAccount?: 0 | 1;
679
- fundAccount?: string | number;
680
- };
681
- /**
682
- * @description 端内登录组件
683
- * @param {LoginParams} params 登录参数
684
- * @returns {loginResult} 返回结果
685
- */
686
- declare function login(params?: LoginParams): Promise<loginResult>;
687
-
688
- type loginWithAccountParams = {
689
- fundAccount?: string;
690
- type?: number;
691
- needPassportId?: number;
692
- needStockAccount?: number;
693
- };
694
- type LoginResponse = {
695
- errCode: number;
696
- errStr: string;
697
- [key: string]: unknown;
698
- };
699
- /**
700
- * 登录代入资金账号-调用前需要判断版本号 4030
701
- * @function
702
- * @param {loginWithAccountParams} params
703
- * @param {Promise<LoginResponse>} 结果:0 - 登录成功; 1 - 取消登录; -2 - 参数格式错误; 其他值-换登功能号返回
704
- */
705
- declare const loginWithAccount: (params: loginWithAccountParams) => Promise<LoginResponse>;
706
-
707
- /**
708
- * 用户登录 - 使用页面链接上的token & type
709
- * @function loginWithToken
710
- * @return boolean
711
- */
712
- declare function loginWithToken(): Promise<boolean>;
713
-
714
- declare function loginWithTokenForWeb(loginType: string): Promise<boolean>;
715
-
716
- type LogoutParams = {
717
- type: number;
718
- };
719
- /**
720
- * 注销登录 4001
721
- * @function logout
722
- * @param {LogoutParams} type
723
- * 登录类型: <br>
724
- * 1-普通登录<br>
725
- * 2-信用登录<br>
726
- * 3-担保品划转登录(普通+信用)<br>
727
- * 4-通行证passport登录<br>
728
- * 5-普通+passort登录<br>
729
- */
730
- declare const logout: (param: LogoutParams) => void;
731
-
732
- /**
733
- * 登出
734
- * @function logout
735
- * @param {string} loginType 登录类型
736
- * @returns { Promise<HttpResponse> }
737
- */
738
- declare function logoutForWeb(loginType: string | null): Promise<HttpResponse>;
739
-
740
- type MarginAccountLoginParams = {
741
- instant_token?: string;
742
- op_station?: string;
743
- account_type?: AccountType;
744
- };
745
- /**
746
- * marginAccount登录
747
- * @function marginAccountLogin
748
- * @param {MarginAccountLoginParams} param
749
- * @returns {Promise<HttpResponse> }
750
- */
751
- declare function marginAccountLogin(param: MarginAccountLoginParams): Promise<HttpResponse>;
752
-
753
- type multiLoginParams = {
754
- [key: string]: unknown;
755
- };
756
- /**
757
- * multiLogin 功能组件
758
- */
759
- declare function multiLogin(param: multiLoginParams): Promise<HttpResponse>;
760
-
761
- declare const native2011IOOperation: (options: object) => void;
762
-
763
- type nativeIOOperationType = {
764
- code: number;
765
- options: object;
766
- };
767
- /**
768
- * nativeIOOperation 功能组件
769
- */
770
- declare function nativeIOOperation(code: number, options: object): Promise<object>;
771
-
772
- /**
773
- * onAppear 2011
774
- * @function onAppear
775
- * @param {any} fn
776
- */
777
- declare const onAppear: (fn: unknown) => void;
778
-
779
- /**
780
- * onBackKeyPressed 2011
781
- * @function onBackKeyPressed
782
- * @param {any} fn
783
- */
784
- declare const onBackKeyPressed: (fn: unknown) => void;
785
-
786
- /**
787
- * onClose 2011
788
- * @function onClose
789
- * @param {any} fn
790
- */
791
- declare const onClose: (fn: unknown) => void;
792
-
793
- /**
794
- * onDisappear 2011
795
- * @function onDisappear
796
- * @param {any} fn
797
- */
798
- declare const onDisappear: (fn: unknown) => void;
799
-
800
- /**
801
- * onAppear 2011
802
- * @function onSkinChanged
803
- * @param {any} fn
804
- */
805
- declare const onSkinChanged: (fn: unknown) => void;
806
-
807
- type OpenAppParams = {
808
- appURL: string;
809
- rodownloadURLotType?: string;
810
- };
811
- /**
812
- * 客户端打开其它App 3002
813
- * @function openApp
814
- * @param {OpenAppParams} param
815
- */
816
- declare const openApp: (param: OpenAppParams) => void;
817
-
818
- type OpenAppParam = {
819
- type: string;
820
- param: ClientJumpParams$1 | OpenParams;
821
- precondition?: {
822
- announceSubType?: string;
823
- loginType?: number;
824
- isWeakLogin?: number;
825
- needToken?: number;
826
- };
827
- };
828
- type OpenPageActionParam = {
829
- type: number;
830
- env: string;
831
- site: string;
832
- };
833
- type OpenAppUrlParam = {
834
- EVOLUTION_UNIVERSAL_URL?: string;
835
- EVOLUTION_TXAPP_URL?: string;
836
- EVOLUTION_ANDOWNLOAD_URL?: string;
837
- EVOLUTION_MINIAPP_URL?: string;
838
- EVOLUTION_PAGE_ENV?: string;
839
- EVOLUTION_SCENE_INFO?: {
840
- URL?: string;
841
- SHORT_LINK?: number;
842
- };
843
- };
844
- /**
845
- * 跳转至APP下载并传参
846
- * @function openApp
847
- * @param {string} selector APP下载事件選擇器
848
- * @param {OpenAppParam} config APP下载跳转参数
849
- * @param {OpenAppUrlParam} urlConfig APP下载相关URL参数
850
- * @returns {Promise<void>}
851
- */
852
- declare const openAppForWeb: (selector: string, config?: OpenAppParam, urlConfig?: OpenAppUrlParam) => Promise<void>;
853
-
854
- /**
855
- * 打开新的webview 2007 2008
856
- * @function openPage
857
- * @param {OpenParams} params 参数
858
- * url {string} 当前需要打开的url地址
859
- * fullScreen {number} 是否全屏展示 0-否,1-是 在展示资讯内容的时候有需要全屏展示
860
- * title {string} 页面的标题,如果不传或者传空,在load结束时,使用H5的标题。
861
- * leftType {number} "按钮类型 v0-没有按钮 1-返回 98-图片自定义(设置按钮为图片格式)" 99-自定义(设置为默认底图,显示对应文本)"
862
- * rightType {number} 类型同上
863
- * leftText {string} 当type=98时图片的地址,当type=99时按钮标题
864
- * rightText {string} 当type=98时图片的地址,当type=99时右边按钮标题
865
- * leftJS {string} 点击左边按钮,调用的js函数名或者js语句块,客户端直接调用即可,如果是函数,H5传值需为”functionName()”而不是functionName。
866
- * rightJS {string} 点击右边按钮,调用的js函数名或者js语句块,客户端直接调用即可,如果是函数,H5传值需为”functionName()”而不是functionName。
867
- * leftURL {string} 点击左边按钮,跳转的链接地址,未设置leftJS有效
868
- * rightURL {string} 点击右边按钮,跳转的链接地址,未设置rightJS有效
869
- * animated {number} 跳转是否有动画,0为没有,1为有
870
- * showLoadingPage {number} 0:不显示loading效果,1:显示loading效果
871
- * @param {boolean} needCloseCurrentView 是否需要关闭当前webview
872
- */
873
- declare function openPage(params: OpenParams, needCloseCurrentView?: boolean): void;
874
-
875
- interface PageConfig$2 {
876
- title?: string;
877
- leftType?: number;
878
- rightType?: number;
879
- rightText?: string;
880
- rightJS?: string;
881
- [key: string]: unknown;
882
- }
883
- /**
884
- * 打开新页面
885
- * @function pageInit
886
- * @param {string} URL 页面URL
887
- * @param {boolean} needCloseCurrentView 是否需要关闭当前页面 缺省false
888
- * @param {object} config 打开页面参数
889
- * @returns {Promise<void>}
890
- */
891
- declare const pageInit: (URL: string, needCloseCurrentView?: boolean, config?: PageConfig$2) => Promise<void>;
892
-
893
- interface PageConfig$1 {
894
- title?: string;
895
- [key: string]: unknown;
896
- }
897
- /**
898
- * 打开新页面并写入集群SESSION
899
- * @function pageInitWithSession
900
- * @param {number} loginType 登录类型
901
- * @param {string} URL 跳转URL
902
- * @param {boolean} needCloseCurrentView 是否需要关闭当前页
903
- * @param {object} config 页面跳转参数
904
- * @returns {Promise<void>}
905
- */
906
- declare const pageInitWithSession: (loginType: number, URL: string, needCloseCurrentView: boolean, config?: PageConfig$1) => Promise<void>;
907
-
908
- interface PageConfig {
909
- title?: string;
910
- [key: string]: unknown;
911
- }
912
- /**
913
- * 打开新页面并生成token
914
- * @function pageInitWithToken
915
- * @param {number} loginType 登录类型
916
- * @param {string} URL 跳转URL
917
- * @param {boolean} needCloseCurrentView 是否需要关闭当前页
918
- * @param {object} config 页面跳转参数
919
- * @returns {Promise<void>}
920
- */
921
- declare const pageInitWithToken: (loginType: number, URL: string, needCloseCurrentView: boolean, config?: PageConfig) => Promise<void>;
922
-
923
- type PidLoginParams = {
924
- channelId: string;
925
- uKey: string;
926
- };
927
- /**
928
- * yjb3.0-passportId登录-phpsession状态同步
929
- * @function pidLogin
930
- * @param {PidLoginParams} param
931
- * @returns {Promise<HttpResponse>}
932
- */
933
- declare function pidLogin(param: PidLoginParams): Promise<HttpResponse>;
934
-
935
- type QQStockLoginParams = {
936
- session_id?: string;
937
- };
938
- /**
939
- * 腾讯自选股渠道,session_id登录
940
- * @function qqStockLogin
941
- * @param {QQStockLoginParams} param
942
- * @returns {Promise<HttpResponse>}
943
- */
944
- declare function qqStockLogin(param: QQStockLoginParams): Promise<HttpResponse>;
945
-
946
- type ReadFileParams = {
947
- url: string;
948
- type?: ReadFileType;
949
- };
950
- declare function readFile(param: ReadFileParams): void;
951
-
952
- type ReadFileInDiskParams = {
953
- name: string;
954
- };
955
- /**
956
- * 读客户端磁盘文件-依赖内部环境 2005
957
- * @param {ReadFileInDiskParams} param
958
- * @function readFileInDisk
959
- * @returns {Promise<object>} 文件内容
960
- */
961
- declare const readFileInDisk: (param: ReadFileInDiskParams) => Promise<object | null>;
962
-
963
- type ReadSystemParams = {
964
- keys?: Array<string>;
965
- };
966
- /**
967
- * 请求客户端非系统参数 4012
968
- * @function readNoSystemParameter
969
- * @param {ReadSystemParams} param
970
- * @returns {Promise}
971
- */
972
- declare const readNoSystemParameter: (param: ReadSystemParams) => Promise<object>;
973
-
974
- type readSystemParameterParams = {
975
- keys?: Array<string>;
976
- };
977
- /**
978
- * readSystemParameter 功能组件
979
- */
980
- declare function readSystemParameter(param: readSystemParameterParams): Promise<object>;
981
-
982
- type readyResult = {
983
- value: object | undefined;
984
- };
985
- /**
986
- * ready 功能组件
987
- */
988
- declare function ready(): Promise<readyResult>;
989
-
990
- type PortfolioParams = {
991
- stockCode: string;
992
- codeType?: number;
993
- stockName?: string;
994
- };
995
- /**
996
- * 添加股票至自选股 4020
997
- * @function addToPortfolio
998
- * @param {PortfolioParams} param 参数
999
- * @returns {Promise<object>} 返回值
1000
- */
1001
- declare const removePortfolio: (param: PortfolioParams) => Promise<object | null>;
1002
-
1003
- type SaveFileInDiskParams = {
1004
- name: string;
1005
- data: string;
1006
- encrypt?: number;
1007
- };
1008
- /**
1009
- * 往客户端磁盘写文件-依赖内部环境 2004
1010
- * @param {SaveFileInDiskParams} param
1011
- * @function saveFileInDisk
1012
- * @returns {void}
1013
- */
1014
- declare const saveFileInDisk: (param: SaveFileInDiskParams) => void;
1015
-
1016
- declare const savePictureToPhone: (data: string, imageType?: number) => Promise<object>;
1017
-
1018
- /**
1019
- * 二维码扫描 3007
1020
- * @function scanCode
1021
- * @returns {Promise<object>}
1022
- */
1023
- declare const scanCode: () => Promise<object>;
1024
-
1025
- type SelectCalendarParams = {
1026
- eventId?: string;
1027
- start?: number;
1028
- end?: number;
1029
- };
1030
- /**
1031
- * 查询日历事件 3023
1032
- * @function selectCalendar
1033
- * @param {SelectCalendarParams} param
1034
- * @returns {Promise<object>}
1035
- */
1036
- declare const selectCalendar: (param: SelectCalendarParams) => Promise<object>;
1037
-
1038
- type StatusBarParams = {
1039
- style: number;
1040
- };
1041
- /**
1042
- * 设置statusBar样式 3016
1043
- * @function setStatusBar
1044
- * @param {StatusBarParams} param
1045
- * @returns {Promise<object>}
1046
- */
1047
- declare const setStatusBar: (param: StatusBarParams) => Promise<object>;
1048
-
1049
- /**
1050
- * setTitle 功能组件
1051
- */
1052
- declare function setTitle(param: OpenParams): void;
1053
-
1054
- /**
1055
- * 设置标题栏
1056
- * @function setTitle
1057
- * @param {OpenParams} config 设置参数(类open参数)
1058
- * @returns {Promise<any>}
1059
- */
1060
- declare const setTitles: (config: OpenParams) => Promise<void>;
1061
-
1062
- type showAlertParams = {
1063
- url: string;
1064
- };
1065
- type showResult = {
1066
- code: number;
1067
- result: string;
1068
- };
1069
- /**
1070
- * showAlert 功能组件
1071
- */
1072
- declare const showAlert: (content: string, title?: string, success?: (params?: string) => void) => void;
1073
-
1074
- /**
1075
- * 弹出确认提示框
1076
- * @function showConfirm
1077
- * @param {string} content 显示内容
1078
- * @param {function} onConfirm 点击确定后回调
1079
- * @param {function} onCancel 点击取消后回调
1080
- * @param {string} confirmTitle 确定键标题
1081
- * @param {string} cancelTitle 取消键标题
1082
- */
1083
- declare const showConfirm: (content: string, onConfirm: (param: object) => void, onCancel: (param: object) => void, title?: string, cancelTitle?: string) => void;
1084
-
1085
- type StartAnyChatParams = {
1086
- type: number;
1087
- ip?: string;
1088
- port?: number;
1089
- user?: string;
1090
- password?: string;
1091
- room?: number;
1092
- roomPassword?: string;
1093
- statusNotify: string;
1094
- };
1095
- /**
1096
- * AnyChat视频见证 3005
1097
- * @function startAnyChat
1098
- * @param {StartAnyChatParams} param
1099
- * @returns {Promise<object>}
1100
- */
1101
- declare const startAnyChat: (param: StartAnyChatParams) => Promise<object>;
1102
-
1103
- /**
1104
- * 客户端与服务端登录态同步
1105
- * @function syncLoginStatusBetweenNativeAndServer
1106
- * @returns {Promise<HttpResponse>}
1107
- */
1108
- declare function syncLoginStatusBetweenNativeAndServer(syncLoginTypes?: LoginType[]): Promise<unknown>;
1109
-
1110
- type TTrackEvent = {
1111
- event_name: string;
1112
- page_name: string;
1113
- element_name?: string;
1114
- module_name?: string;
1115
- eventid?: string | number;
1116
- from_page?: string;
1117
- product_code?: string;
1118
- location?: string;
1119
- remarks?: string;
1120
- [key: string]: any;
1121
- };
1122
- /**
1123
- * trackEvent 功能组件
1124
- */
1125
- declare const trackEvent: (params: TTrackEvent) => "event_name is empty!" | undefined;
1126
-
1127
- /**
1128
- * 自动执行initFinder
1129
- *
1130
- */
1131
- declare const trackInitAuto: () => void;
1132
-
1133
- /**
1134
- * 设置公共参数
1135
- * @param params 配置参数
1136
- */
1137
- type keyPublicValueType = 'userId' | 'pid' | 'YJB_userId';
1138
- declare const trackPublicValue: <T extends Partial<Record<keyPublicValueType, string>>>(params: T) => void;
1139
-
1140
- type TTrackUserProfile = {
1141
- pid?: string;
1142
- userId?: string;
1143
- clientId?: string;
1144
- };
1145
- /**
1146
- *
1147
- * @param params
1148
- */
1149
- declare const trackUserProfile: (params: TTrackUserProfile) => void;
1150
-
1151
- /**
1152
- * 设置唯一id及类型
1153
- * 目前支持user_id、client_id、preappoint
1154
- * @param uuid
1155
- * @param uuid_type
1156
- */
1157
- declare const trackUuid: (uuid: string, uuid_type?: string) => void;
1158
-
1159
- type UploadFileparams = {
1160
- url: string;
1161
- name?: string;
1162
- fileName?: string;
1163
- filePath?: string;
1164
- fileData?: string;
1165
- };
1166
- /**
1167
- * uploadFile 功能组件
1168
- */
1169
- declare function uploadFile(param: UploadFileparams): Promise<object>;
1170
-
1171
- /**
1172
- * user登录 4015
1173
- * 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1174
- * @function key: {tag: ''}
1175
- * @returns {Promise<object>} 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1176
- */
1177
- declare const userLogin: (json?: object) => Promise<object>;
1178
-
1179
- type UserLoginParams = {
1180
- channelId?: string;
1181
- userUKey?: string;
1182
- instant_token_v3?: string;
1183
- };
1184
- /**
1185
- * yjb3.0-user登录-phpsession状态同步
1186
- * @function userLogin
1187
- * @param {UserLoginParams} param
1188
- * @returns {Promise<HttpResponse>}
1189
- */
1190
- declare function userLoginForWeb(param: UserLoginParams): Promise<HttpResponse>;
1191
-
1192
- type userLoginMobileParams = {
1193
- key?: string;
1194
- mobileCode?: string;
1195
- quickLogin?: number;
1196
- };
1197
- /**
1198
- * 用户登录 支持带入手机号 4031
1199
- * @function userLoginMobile
1200
- * @param {userLoginMobileParams} param
1201
- * key string(JSON) json格式字符串,通过tag字段透传给服务端,渠道或活动相关信息
1202
- * mobileCode string 目标登录的手机号
1203
- * quickLogin number 默认为1. 1: 支持启动一键登录,将忽目标手机号 0.启动全屏登录,支持填入目标手机号
1204
- */
1205
- declare const userLoginMobile: (json: userLoginMobileParams) => Promise<object>;
1206
-
1207
- /**
1208
- * user登录用户登录(一键登录弹窗) 4028
1209
- * 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1210
- * @function userLogin
1211
- * @returns {Promise<object>} 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1212
- */
1213
- declare const userLoginModal: (json?: object) => Promise<object>;
1214
-
1215
- /**
1216
- * 注销用户号登录 4016
1217
- * @function userLogOut
1218
- */
1219
- declare const userLogOut: () => void;
1220
-
1221
- type VivoDetectionParams = {
1222
- allActions?: string;
1223
- timeout?: number;
1224
- count?: number;
1225
- needOrigin?: number;
1226
- };
1227
- /**
1228
- * 活体检测 3018
1229
- * @function VivoDetectionParams
1230
- * @param {VivoDetectionParams} param
1231
- * @returns {Promise<object>}
1232
- */
1233
- declare const vivoDetection: (param: VivoDetectionParams) => Promise<object>;
1234
-
1235
- /**
1236
- * 获取授权链接的参数
1237
- */
1238
- type WechatAuthOptions = {
1239
- redirect_uri?: string;
1240
- scope?: string;
1241
- account_name?: string;
1242
- app_name?: string;
1243
- };
1244
- /**
1245
- * 佣金宝公众号授权
1246
- */
1247
- declare const wechatAuth: (options: WechatAuthOptions) => Promise<{
1248
- code: string;
1249
- msg: string;
1250
- } | {
1251
- code: number;
1252
- msg: string;
1253
- } | undefined>;
1254
-
1255
- export { type AddCalendarParams, type ApplyPermissionParams, type BindInfoData, type ChooseImgParams, type ChooseVideoParams, type ClientJumpParams, type CloseParams, type DeleteCalendarParams, type FundAccountLoginParams, type LinkActionConfigParam, type LinkDecodeParam, type LoginParams, type LogoutParams, type MarginAccountLoginParams, type OpenAppParam, type OpenAppParams, type OpenAppUrlParam, type OpenPageActionParam, type PageConfig$2 as PageConfig, type PidLoginParams, type PortfolioParams$1 as PortfolioParams, type QQStockLoginParams, type ReadFileInDiskParams, type ReadFileParams, type ReadSystemParams, type SaveFileInDiskParams, type SelectCalendarParams, type StartAnyChatParams, type StatusBarParams, type UploadFileparams, type UserLoginParams, type VivoDetectionParams, type WechatAuthOptions, type WechatPayParams, type WechatUserInfoOptions, addCalendar, addToPortfolio, appInit, appleChinaPay, appleUnionPay, applyPermission, beginLogin, beginLoginForWeb, bindInfo, bindInfoFunc, call, callphone, changeSkinType, type changeSkinTypeParams, checkFundAccountLogin, checkLogin, checkLoginForWeb, checkMarginAccountLogin, checkUserLogin, chooseImg, chooseVideo, clientJump, closeLoading, closePage, deleteCalendar, doneSuitability, exec, type execType, fundAccountLogin, getAppId, getAppVersion, getCapital, getInterfaceVersion, getLoginStatus, getPagePath, getSystemVersion, getUDID, getUID, getUkeyByChannelId, getUserUKeysByChannelId, getWechatUserInfo, goAlipay, type goAlipayResult, goBackPage, goWeChatShare, goWechatCustomService, type goWechatCustomServiceParams, goWechatPayment, type goWechatPaymentResult, h5Pay, http, hybridGetPassport, hybridGetUserId, initFinder, linkActionDecode, linkDecode, login, type loginResult, loginWithAccount, type loginWithAccountParams, loginWithToken, loginWithTokenForWeb, logout, logoutForWeb, marginAccountLogin, multiLogin, type multiLoginParams, native2011IOOperation, nativeIOOperation, type nativeIOOperationType, onAppear, onBackKeyPressed, onClose, onDisappear, onSkinChanged, openApp, openAppForWeb, openPage, pageInit, pageInitWithSession, pageInitWithToken, pidLogin, qqStockLogin, readFile, readFileInDisk, readNoSystemParameter, readSystemParameter, type readSystemParameterParams, ready, type readyResult, removePortfolio, saveFileInDisk, savePictureToPhone, scanCode, selectCalendar, setStatusBar, setTitle, setTitles, showAlert, type showAlertParams, showConfirm, type showResult, startAnyChat, syncLoginStatusBetweenNativeAndServer, trackEvent, trackInitAuto, trackPublicValue, trackUserProfile, trackUuid, uploadFile, userLogOut, userLogin, userLoginForWeb, userLoginMobile, type userLoginMobileParams, userLoginModal, vivoDetection, wechatAuth };
1
+ /**
2
+ * webapp 账户类型
3
+ */
4
+ declare enum AccountType {
5
+ FUNDACCOUNT = 0,
6
+ MARGINACCOUNT = 1,
7
+ USERID = "u"
8
+ }
9
+
10
+ /**
11
+ * 添加日历事件 3022
12
+ * @function addCalendar
13
+ * @param {AddCalendarParams} param
14
+ * @returns {Promise<object>}
15
+ */
16
+ export declare const addCalendar: (param: AddCalendarParams) => Promise<object>;
17
+
18
+ export declare type AddCalendarParams = {
19
+ title: string;
20
+ start: number;
21
+ end?: number;
22
+ remindMinutes?: number;
23
+ repeat?: number;
24
+ location?: string;
25
+ description?: string;
26
+ };
27
+
28
+ declare type AddressFamily = 4 | 6 | undefined;
29
+
30
+ /**
31
+ * 添加股票至自选股 4011
32
+ * @function addToPortfolio
33
+ * @param {PortfolioParams} param 参数
34
+ * @returns {Promise<object>} 返回值
35
+ */
36
+ export declare const addToPortfolio: (param: PortfolioParams) => Promise<object | null>;
37
+
38
+ /**
39
+ * 初始化 (检测webapps-session数据正确性)
40
+ * @function appInit
41
+ * @returns {Promise<boolean>}
42
+ */
43
+ export declare function appInit(): Promise<boolean>;
44
+
45
+ /**
46
+ * 调用银联继承的apple pay支付功能 3021
47
+ * @function applePay
48
+ * @param {object} orderInfo orderInfo
49
+ * @param {String} mode "00" 代表接入生产环境 "01"代表接入开发测试环境
50
+ * @retruns {Promise<object>} 返回结果
51
+ */
52
+ export declare const appleChinaPay: (orderInfo: object, mode: string | null) => Promise<object | null>;
53
+
54
+ /**
55
+ * 调用银联继承的apple pay支付功能 3020
56
+ * @function appleUnionPay
57
+ * @param {String} tn 交易流水号
58
+ * @param {String} mID 苹果公司分配的商铺号
59
+ * @param {String} mode "00" 代表接入生产环境 "01"代表接入开发测试环境
60
+ * @retruns {Promise<object>} 返回结果
61
+ */
62
+ export declare const appleUnionPay: (tn: string, mID: string, mode: string | null) => Promise<object | null>;
63
+
64
+ /**
65
+ * 申请系统权限(安卓) 3019
66
+ * @function applyPermission
67
+ * @param {ApplyPermissionParams} param
68
+ * @returns {Promise<object>}
69
+ */
70
+ export declare const applyPermission: (param: ApplyPermissionParams) => Promise<object>;
71
+
72
+ export declare type ApplyPermissionParams = {
73
+ permission?: number;
74
+ permissions: string;
75
+ switch?: string;
76
+ };
77
+
78
+ declare class Axios {
79
+ constructor(config?: AxiosRequestConfig);
80
+ defaults: AxiosDefaults;
81
+ interceptors: {
82
+ request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
83
+ response: AxiosInterceptorManager<AxiosResponse>;
84
+ };
85
+ getUri(config?: AxiosRequestConfig): string;
86
+ request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
87
+ get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
88
+ delete<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
89
+ head<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
90
+ options<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
91
+ post<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
92
+ put<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
93
+ patch<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
94
+ postForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
95
+ putForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
96
+ patchForm<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
97
+ }
98
+
99
+ declare interface AxiosAdapter {
100
+ (config: InternalAxiosRequestConfig): AxiosPromise;
101
+ }
102
+
103
+ declare type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
104
+
105
+ declare type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | (string & {});
106
+
107
+ declare interface AxiosBasicCredentials {
108
+ username: string;
109
+ password: string;
110
+ }
111
+
112
+ declare interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
113
+ headers: HeadersDefaults;
114
+ }
115
+
116
+ declare type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean);
117
+
118
+ declare type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any;
119
+
120
+ declare class AxiosHeaders {
121
+ constructor(
122
+ headers?: RawAxiosHeaders | AxiosHeaders | string
123
+ );
124
+
125
+ [key: string]: any;
126
+
127
+ set(headerName?: string, value?: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
128
+ set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
129
+
130
+ get(headerName: string, parser: RegExp): RegExpExecArray | null;
131
+ get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
132
+
133
+ has(header: string, matcher?: AxiosHeaderMatcher): boolean;
134
+
135
+ delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
136
+
137
+ clear(matcher?: AxiosHeaderMatcher): boolean;
138
+
139
+ normalize(format: boolean): AxiosHeaders;
140
+
141
+ concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
142
+
143
+ toJSON(asStrings?: boolean): RawAxiosHeaders;
144
+
145
+ static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
146
+
147
+ static accessor(header: string | string[]): AxiosHeaders;
148
+
149
+ static concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
150
+
151
+ setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
152
+ getContentType(parser?: RegExp): RegExpExecArray | null;
153
+ getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
154
+ hasContentType(matcher?: AxiosHeaderMatcher): boolean;
155
+
156
+ setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
157
+ getContentLength(parser?: RegExp): RegExpExecArray | null;
158
+ getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
159
+ hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
160
+
161
+ setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
162
+ getAccept(parser?: RegExp): RegExpExecArray | null;
163
+ getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
164
+ hasAccept(matcher?: AxiosHeaderMatcher): boolean;
165
+
166
+ setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
167
+ getUserAgent(parser?: RegExp): RegExpExecArray | null;
168
+ getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
169
+ hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
170
+
171
+ setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
172
+ getContentEncoding(parser?: RegExp): RegExpExecArray | null;
173
+ getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
174
+ hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
175
+
176
+ setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
177
+ getAuthorization(parser?: RegExp): RegExpExecArray | null;
178
+ getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
179
+ hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
180
+
181
+ getSetCookie(): string[];
182
+
183
+ [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
184
+ }
185
+
186
+ declare type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
187
+
188
+ declare interface AxiosInstance extends Axios {
189
+ <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
190
+ <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
191
+
192
+ create(config?: CreateAxiosDefaults): AxiosInstance;
193
+ defaults: Omit<AxiosDefaults, 'headers'> & {
194
+ headers: HeadersDefaults & {
195
+ [key: string]: AxiosHeaderValue
196
+ }
197
+ };
198
+ }
199
+
200
+ declare interface AxiosInterceptorManager<V> {
201
+ use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>;
202
+ eject(id: number): void;
203
+ clear(): void;
204
+ }
205
+
206
+ declare interface AxiosInterceptorOptions {
207
+ synchronous?: boolean;
208
+ runWhen?: (config: InternalAxiosRequestConfig) => boolean;
209
+ }
210
+
211
+ declare interface AxiosProgressEvent {
212
+ loaded: number;
213
+ total?: number;
214
+ progress?: number;
215
+ bytes: number;
216
+ rate?: number;
217
+ estimated?: number;
218
+ upload?: boolean;
219
+ download?: boolean;
220
+ event?: BrowserProgressEvent;
221
+ lengthComputable: boolean;
222
+ }
223
+
224
+ declare type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
225
+
226
+ declare interface AxiosProxyConfig {
227
+ host: string;
228
+ port: number;
229
+ auth?: AxiosBasicCredentials;
230
+ protocol?: string;
231
+ }
232
+
233
+ declare interface AxiosRequestConfig<D = any> {
234
+ url?: string;
235
+ method?: Method | string;
236
+ baseURL?: string;
237
+ allowAbsoluteUrls?: boolean;
238
+ transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
239
+ transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
240
+ headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
241
+ params?: any;
242
+ paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
243
+ data?: D;
244
+ timeout?: Milliseconds;
245
+ timeoutErrorMessage?: string;
246
+ withCredentials?: boolean;
247
+ adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
248
+ auth?: AxiosBasicCredentials;
249
+ responseType?: ResponseType_2;
250
+ responseEncoding?: responseEncoding | string;
251
+ xsrfCookieName?: string;
252
+ xsrfHeaderName?: string;
253
+ onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
254
+ onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
255
+ maxContentLength?: number;
256
+ validateStatus?: ((status: number) => boolean) | null;
257
+ maxBodyLength?: number;
258
+ maxRedirects?: number;
259
+ maxRate?: number | [MaxUploadRate, MaxDownloadRate];
260
+ beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>, statusCode: HttpStatusCode}) => void;
261
+ socketPath?: string | null;
262
+ transport?: any;
263
+ httpAgent?: any;
264
+ httpsAgent?: any;
265
+ proxy?: AxiosProxyConfig | false;
266
+ cancelToken?: CancelToken;
267
+ decompress?: boolean;
268
+ transitional?: TransitionalOptions;
269
+ signal?: GenericAbortSignal;
270
+ insecureHTTPParser?: boolean;
271
+ env?: {
272
+ FormData?: new (...args: any[]) => object;
273
+ fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
274
+ Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
275
+ Response?: new (
276
+ body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
277
+ init?: ResponseInit
278
+ ) => Response;
279
+ };
280
+ formSerializer?: FormSerializerOptions;
281
+ family?: AddressFamily;
282
+ lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
283
+ ((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
284
+ withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
285
+ parseReviver?: (this: any, key: string, value: any) => any;
286
+ fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
287
+ }
288
+
289
+ declare type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
290
+
291
+ declare type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
292
+
293
+ declare interface AxiosRequestTransformer {
294
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
295
+ }
296
+
297
+ declare interface AxiosResponse<T = any, D = any, H = {}> {
298
+ data: T;
299
+ status: number;
300
+ statusText: string;
301
+ headers: H & RawAxiosResponseHeaders | AxiosResponseHeaders;
302
+ config: InternalAxiosRequestConfig<D>;
303
+ request?: any;
304
+ }
305
+
306
+ declare type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
307
+
308
+ declare type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number;
309
+
310
+ declare interface AxiosResponseTransformer {
311
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosResponseHeaders, status?: number): any;
312
+ }
313
+
314
+ /**
315
+ * 检查登录状态并在未登录情况下调用登录功能
316
+ * @function beginLogin
317
+ * @param {number} loginType 登录类型
318
+ * @param {string} channelId 渠道号 普通信用可缺省
319
+ * @returns {Promise<any>}
320
+ */
321
+ export declare const beginLogin: (loginType: string, channelId: string, json?: any) => Promise<any>;
322
+
323
+ /**
324
+ * 检查登录状态并在未登录情况下调用登录功能
325
+ * @function beginLogin
326
+ * @param {string} loginType 登录类型
327
+ * @param {string} backUrl 登录成功跳转URL(尽在未登录条件下适用,可直接跳转目标页,优化体验)
328
+ * @param {Object} loginParam 补充参数,目前仅应用于用户登录
329
+ * @param {Object} loginParam.key 用户登录营销参数,格式参考4015功能号
330
+ * @returns {Promise<boolean> | void}
331
+ */
332
+ export declare function beginLoginForWeb(loginType: string, backUrl: string, loginParam?: object): Promise<boolean | void>;
333
+
334
+ /**
335
+ *
336
+ * @param data
337
+ * 2025.01.02 经讨论 退登不解绑!!
338
+ */
339
+ export declare function bindInfo(data: BindInfoData): void;
340
+
341
+ export declare interface BindInfoData {
342
+ userId?: string;
343
+ passportId?: string;
344
+ YJB_userId?: string;
345
+ clientId?: string;
346
+ }
347
+
348
+ /**
349
+ *
350
+ * @param params
351
+ * user_unique_id => clientId
352
+ * pid
353
+ * userId
354
+ * 若finder已初始化,则直接绑定
355
+ * 若未初始化,则加入全局变量中。待finder初始化后,由collect中initFinder方法后调用
356
+ */
357
+ export declare function bindInfoFunc(params: object): void;
358
+
359
+ declare type BrowserProgressEvent = any;
360
+
361
+ /**
362
+ * call 功能组件
363
+ */
364
+ export declare const call: (phoneNumber: string) => void;
365
+
366
+ /**
367
+ * 调用拨号功能
368
+ * @function callphone
369
+ * @param {string} phonenum 手机号码
370
+ * @returns {Promise<any>}
371
+ */
372
+ export declare const callphone: (phonenum: string) => Promise<void>;
373
+
374
+ declare interface Cancel {
375
+ message: string | undefined;
376
+ }
377
+
378
+ declare interface CancelToken {
379
+ promise: Promise<Cancel>;
380
+ reason?: Cancel;
381
+ throwIfRequested(): void;
382
+ }
383
+
384
+ /**
385
+ * changeSkinType 换肤 4026
386
+ * skinType: 0-白,1-黑
387
+ */
388
+ export declare function changeSkinType(param: changeSkinTypeParams): void;
389
+
390
+ export declare type changeSkinTypeParams = {
391
+ skinType: number;
392
+ };
393
+
394
+ /**
395
+ * fundaccount登录状态检查
396
+ * @function checkFundAccountLogin
397
+ * @returns {Promise<HttpResponse>}
398
+ */
399
+ export declare function checkFundAccountLogin(): Promise<HttpResponse>;
400
+
401
+ /**
402
+ * 检查登录状态
403
+ * @function checkLogin
404
+ * @param {string} loginType 登录类型
405
+ * @param {string} channelId 渠道号 普通信用可缺省
406
+ * @returns {Promise<any>}
407
+ */
408
+ export declare const checkLogin: (loginType: string, channelId: string) => Promise<any>;
409
+
410
+ /**
411
+ * 检查登录状态
412
+ * @function checkLogin
413
+ * @param {string} loginType 登录类型
414
+ * @returns {Promise<boolean>}
415
+ */
416
+ export declare function checkLoginForWeb(loginType: string): Promise<boolean | Number>;
417
+
418
+ /**
419
+ * marginAccount登录状态检查
420
+ * @function checkMarginAccountLogin
421
+ * @returns {Promise<HttpResponse>}
422
+ */
423
+ export declare function checkMarginAccountLogin(): Promise<HttpResponse>;
424
+
425
+ /**
426
+ * user登录状态检查
427
+ * @function checkUserLogin
428
+ * @returns {Promise<HttpResponse>}
429
+ */
430
+ export declare function checkUserLogin(): Promise<HttpResponse>;
431
+
432
+ /**
433
+ * 选择照片 3004
434
+ * @function chooseImg
435
+ * @param {ChooseImgParams} param
436
+ * {<br />
437
+ * source: 0-从相册选择,1-拍照<br />
438
+ * front: 0-后置摄像头,1-前置摄像头<br />
439
+ * size: 客户端需要将图片高或者宽中较大的一边,缩小到这个size,然后将另一边按比例缩放<br />
440
+ * compressionQuality:JPEG压缩比例,范围为0.0-1.0。size和压缩比暂定1200和0.6,后续可调整。<br />
441
+ * floatingLayer:浮层类型,仅在source为1时生效。0没有,1身份证正面(人头),2身份证反面(国徽),3自拍头像。<br />
442
+ * }<br />
443
+ * @returns {Promise<object>} 返回值<br/>
444
+ * code 0成功,1失败,2取消。<br />
445
+ * result.data: base64编码的图片信息
446
+ */
447
+ export declare const chooseImg: (param: ChooseImgParams) => Promise<object>;
448
+
449
+ export declare type ChooseImgParams = {
450
+ source?: number;
451
+ front?: number;
452
+ size?: number;
453
+ compressionQuality?: number;
454
+ floatingLayer?: number;
455
+ };
456
+
457
+ /**
458
+ * 客户端本地录制视频 3009
459
+ * @function chooseVideo
460
+ * @param {ChooseVideoParams} param
461
+ * {
462
+ * front number 0代表非前置(后置)摄像头,1代表前置摄像头。
463
+ * width number 视频宽度
464
+ * height number 视频高度
465
+ * duration number 视频最大长度,单位秒,默认-1,不限制视频长度。
466
+ * bitRate number 码率
467
+ * fps number 帧数
468
+ * title string 录制屏幕上方显示的标题(例如“请用标准普通话匀速朗读”)
469
+ * content string 录制屏幕上方显示的正文(例如“本人自愿在国金证券开户”)
470
+ * }
471
+ * @returns {Promise<object>} Promise<object>
472
+ * code 0成功,1失败,2取消。
473
+ * result.filePath: 客户端存储视频的本地路径。
474
+ * result.fileSize: 视频文件大小
475
+ * result.duration: 视频文件长度
476
+ */
477
+ export declare const chooseVideo: (param: ChooseVideoParams) => Promise<object>;
478
+
479
+ export declare type ChooseVideoParams = {
480
+ front?: number;
481
+ width?: number;
482
+ height?: number;
483
+ duration?: number;
484
+ bitRate?: number;
485
+ fps?: number;
486
+ title?: string;
487
+ content?: string;
488
+ };
489
+
490
+ /**
491
+ * 客户端本地页面跳转 4002
492
+ * @function clientJump
493
+ * @param {ClientJumpParams} param
494
+ */
495
+ export declare const clientJump: (params: ClientJumpParams) => void;
496
+
497
+ declare type ClientJumpParams$1 = {
498
+ type: number;
499
+ stockCode?: string;
500
+ codeType?: number;
501
+ tabName?: string;
502
+ exchangeType?: string;
503
+ stockAccount?: string;
504
+ tradeType?: number;
505
+ isReopen?: number;
506
+ bondPeriod?: number;
507
+ mobileCode?: string;
508
+ mobileCodeStyle?: number;
509
+ isSTIB?: number;
510
+ };
511
+
512
+ export declare type ClientJumpParams = {
513
+ type: number;
514
+ stockCode?: string;
515
+ codeType?: number;
516
+ tabName?: string;
517
+ exchangeType?: string;
518
+ stockAccount?: string;
519
+ tradeType?: number;
520
+ isReopen?: number;
521
+ bondPeriod?: number;
522
+ mobileCode?: string;
523
+ mobileCodeStyle?: number;
524
+ isSTIB?: number;
525
+ listKeys?: string;
526
+ title?: string;
527
+ };
528
+
529
+ /**
530
+ * 关闭webview的loading页面 3017
531
+ * @function closeLoading
532
+ * @returns {Promise<object>}
533
+ */
534
+ export declare const closeLoading: () => Promise<object>;
535
+
536
+ export declare function closePage(params: CloseParams): void;
537
+
538
+ export declare type CloseParams = {
539
+ type?: number;
540
+ rootType?: number;
541
+ url?: string;
542
+ };
543
+
544
+ declare type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent' | 'Content-Encoding' | 'Authorization';
545
+
546
+ declare type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding';
547
+
548
+ declare type ContentType = AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream';
549
+
550
+ declare interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
551
+ headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
552
+ }
553
+
554
+ declare interface CustomParamsSerializer {
555
+ (params: Record<string, any>, options?: ParamsSerializerOptions): string;
556
+ }
557
+
558
+ /**
559
+ * 删除日历事件 3024
560
+ * @function vivoDetection
561
+ * @param {DeleteCalendarParams} param
562
+ * @returns {Promise<object>}
563
+ */
564
+ export declare const deleteCalendar: (param: DeleteCalendarParams) => Promise<object>;
565
+
566
+ export declare type DeleteCalendarParams = {
567
+ eventIds: string[];
568
+ };
569
+
570
+ /**
571
+ * 完成适当性测评,关闭webview,继续登录前的操作 4009
572
+ * @function doneSuitability
573
+ * @param {number} loginType 登录类型 见:login
574
+ * @param {number} isValid 是否完成:0-未完成,1-已完成
575
+ */
576
+ export declare const doneSuitability: (loginType: number, isValid: number) => void;
577
+
578
+ /**
579
+ * exec 功能组件
580
+ */
581
+ export declare function exec({ funcId, param, respCallback, noNativeInterfaceAvailable }: execType): void;
582
+
583
+ export declare type execType = {
584
+ funcId: number;
585
+ param: object;
586
+ respCallback: (params: object) => void;
587
+ noNativeInterfaceAvailable: (params: object) => void;
588
+ };
589
+
590
+ declare interface FormDataVisitorHelpers {
591
+ defaultVisitor: SerializerVisitor;
592
+ convertValue: (value: any) => any;
593
+ isVisitable: (value: any) => boolean;
594
+ }
595
+
596
+ declare interface FormSerializerOptions extends SerializerOptions {
597
+ }
598
+
599
+ /**
600
+ * fundaccount登录
601
+ * @function fundAccountLogin
602
+ * @param {FundAccountLoginParams} param
603
+ * @returns {Promise<HttpResponse>}
604
+ */
605
+ export declare function fundAccountLogin(param: FundAccountLoginParams): Promise<HttpResponse>;
606
+
607
+ export declare type FundAccountLoginParams = {
608
+ instant_token?: string;
609
+ op_station?: string;
610
+ account_type?: AccountType;
611
+ };
612
+
613
+ declare interface GenericAbortSignal {
614
+ readonly aborted: boolean;
615
+ onabort?: ((...args: any) => any) | null;
616
+ addEventListener?: (...args: any) => any;
617
+ removeEventListener?: (...args: any) => any;
618
+ }
619
+
620
+ declare interface GenericFormData {
621
+ append(name: string, value: any, options?: any): any;
622
+ }
623
+
624
+ export declare function getAppId(): Promise<string>;
625
+
626
+ /**
627
+ * 获取AppVersion
628
+ */
629
+ export declare function getAppVersion(): Promise<string | null>;
630
+
631
+ /**
632
+ * 获取资金流向数据 4017
633
+ * @function getCapital
634
+ * @param {String} code 渠道编号
635
+ * @param {number} codeType 渠道编号
636
+ * @retruns {Promise<object>} 返回结果
637
+ */
638
+ export declare const getCapital: (code: string, codeType: number) => Promise<object | null>;
639
+
640
+ /**
641
+ * getInterfaceVersion 功能组件
642
+ */
643
+ export declare function getInterfaceVersion(): Promise<string | null>;
644
+
645
+ /**
646
+ * 获取登录状态 4012
647
+ * @function getLoginStatus
648
+ * @param {function} callback callback接收结果作为参数
649
+ */
650
+ export declare const getLoginStatus: () => Promise<number | null>;
651
+
652
+ /**
653
+ * 获取页面路径
654
+ * @function getPagePath
655
+ * @returns {string}
656
+ */
657
+ export declare const getPagePath: () => string;
658
+
659
+ /**
660
+ * getSystemVersion 功能组件
661
+ */
662
+ export declare function getSystemVersion(): Promise<string | null>;
663
+
664
+ /**
665
+ *
666
+ * @returns 获取UDID
667
+ */
668
+ export declare function getUDID(): Promise<string | null>;
669
+
670
+ /**
671
+ *
672
+ * @returns 获取UID
673
+ */
674
+ export declare function getUID(): Promise<string | null>;
675
+
676
+ /**
677
+ * 获取与channelId对应的ukeys 4012
678
+ * @param {String} channelId 渠道编号
679
+ * @function getukeys
680
+ * @returns {Promise<string>} 获取成功后,callback接收ukey作为参数(获取失败时,返回null)
681
+ */
682
+ export declare const getUkeyByChannelId: (channelId: string) => Promise<string | null>;
683
+
684
+ /**
685
+ * 获取与channelId对应的userUKeys 4012
686
+ * @param {String} channelId 渠道编号
687
+ * @function getUserUKeys
688
+ * @returns {Promise<string>} 获取成功后,callback接收ukey作为参数(获取失败时,返回null)
689
+ */
690
+ export declare const getUserUKeysByChannelId: (channelId: string) => Promise<string | null>;
691
+
692
+ /**
693
+ * 获取微信用户信息
694
+ */
695
+ export declare const getWechatUserInfo: (options: WechatUserInfoOptions) => Promise<unknown>;
696
+
697
+ /**
698
+ * @description 端内支付宝支付,功能号:3012
699
+ * @param {string} order 支付订单参数
700
+ * goAlipay 功能组件
701
+ */
702
+ export declare function goAlipay(order: string): Promise<goAlipayResult>;
703
+
704
+ export declare type goAlipayResult = {
705
+ message: string;
706
+ result: string | object;
707
+ code: number;
708
+ };
709
+
710
+ /**
711
+ * 页面返回
712
+ * @function goBackPage
713
+ * @param {CloseParams} config 设置参数
714
+ * @returns {Promise<void>}
715
+ */
716
+ export declare const goBackPage: (config?: CloseParams) => Promise<void>;
717
+
718
+ /**
719
+ * 跳转微信客服页面 3039
720
+ * @function goWechatCustomService
721
+ * @param {goWechatCustomServiceParams} param
722
+ * @retruns {Promise<object>} 返回结果
723
+ */
724
+ export declare const goWechatCustomService: (param: goWechatCustomServiceParams) => Promise<object>;
725
+
726
+ export declare type goWechatCustomServiceParams = {
727
+ corpId?: string;
728
+ url?: string;
729
+ };
730
+
731
+ export declare function goWechatPayment(params: WechatPayParams): Promise<goWechatPaymentResult>;
732
+
733
+ export declare type goWechatPaymentResult = {
734
+ code: number;
735
+ message: string;
736
+ result: object;
737
+ };
738
+
739
+ /**
740
+ * 微信分享 3015
741
+ * @function goWeChatShare
742
+ * @param {any} param 分享参数 (第三方参数透传,请查看native文档)
743
+ * @returns {Promise<object>} 微信分享返回的信息
744
+ */
745
+ export declare const goWeChatShare: (params: object) => Promise<object>;
746
+
747
+ /**
748
+ * WEB-H5支付支付方法【微信,支付宝】
749
+ */
750
+ export declare const h5Pay: (options: PayExportOptions) => Promise<unknown>;
751
+
752
+ declare interface HeadersDefaults {
753
+ common: RawAxiosRequestHeaders;
754
+ delete: RawAxiosRequestHeaders;
755
+ get: RawAxiosRequestHeaders;
756
+ head: RawAxiosRequestHeaders;
757
+ post: RawAxiosRequestHeaders;
758
+ put: RawAxiosRequestHeaders;
759
+ patch: RawAxiosRequestHeaders;
760
+ options?: RawAxiosRequestHeaders;
761
+ purge?: RawAxiosRequestHeaders;
762
+ link?: RawAxiosRequestHeaders;
763
+ unlink?: RawAxiosRequestHeaders;
764
+ }
765
+
766
+ export declare const http: HttpInterface;
767
+
768
+ declare interface HttpInterface extends AxiosInstance {
769
+ request<T = unknown>(config: HttpRequestConfig): Promise<T>;
770
+ get<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
771
+ delete<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
772
+ head<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
773
+ options<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T>;
774
+ post<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
775
+ put<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
776
+ patch<T = unknown>(url: string, data?: unknown, config?: HttpRequestConfig): Promise<T>;
777
+ }
778
+
779
+ declare interface HttpRequestConfig extends AxiosRequestConfig {
780
+ directResponse?: boolean;
781
+ notParseResponse?: boolean;
782
+ beginLoginBackUrl?: string;
783
+ LoginAction?: (loginType: LoginTypeEnum) => Promise<boolean | void>;
784
+ }
785
+
786
+ declare type HttpResponse<T = unknown> = {
787
+ code: number;
788
+ message?: string;
789
+ data?: T;
790
+ };
791
+
792
+ declare enum HttpStatusCode {
793
+ Continue = 100,
794
+ SwitchingProtocols = 101,
795
+ Processing = 102,
796
+ EarlyHints = 103,
797
+ Ok = 200,
798
+ Created = 201,
799
+ Accepted = 202,
800
+ NonAuthoritativeInformation = 203,
801
+ NoContent = 204,
802
+ ResetContent = 205,
803
+ PartialContent = 206,
804
+ MultiStatus = 207,
805
+ AlreadyReported = 208,
806
+ ImUsed = 226,
807
+ MultipleChoices = 300,
808
+ MovedPermanently = 301,
809
+ Found = 302,
810
+ SeeOther = 303,
811
+ NotModified = 304,
812
+ UseProxy = 305,
813
+ Unused = 306,
814
+ TemporaryRedirect = 307,
815
+ PermanentRedirect = 308,
816
+ BadRequest = 400,
817
+ Unauthorized = 401,
818
+ PaymentRequired = 402,
819
+ Forbidden = 403,
820
+ NotFound = 404,
821
+ MethodNotAllowed = 405,
822
+ NotAcceptable = 406,
823
+ ProxyAuthenticationRequired = 407,
824
+ RequestTimeout = 408,
825
+ Conflict = 409,
826
+ Gone = 410,
827
+ LengthRequired = 411,
828
+ PreconditionFailed = 412,
829
+ PayloadTooLarge = 413,
830
+ UriTooLong = 414,
831
+ UnsupportedMediaType = 415,
832
+ RangeNotSatisfiable = 416,
833
+ ExpectationFailed = 417,
834
+ ImATeapot = 418,
835
+ MisdirectedRequest = 421,
836
+ UnprocessableEntity = 422,
837
+ Locked = 423,
838
+ FailedDependency = 424,
839
+ TooEarly = 425,
840
+ UpgradeRequired = 426,
841
+ PreconditionRequired = 428,
842
+ TooManyRequests = 429,
843
+ RequestHeaderFieldsTooLarge = 431,
844
+ UnavailableForLegalReasons = 451,
845
+ InternalServerError = 500,
846
+ NotImplemented = 501,
847
+ BadGateway = 502,
848
+ ServiceUnavailable = 503,
849
+ GatewayTimeout = 504,
850
+ HttpVersionNotSupported = 505,
851
+ VariantAlsoNegotiates = 506,
852
+ InsufficientStorage = 507,
853
+ LoopDetected = 508,
854
+ NotExtended = 510,
855
+ NetworkAuthenticationRequired = 511,
856
+ }
857
+
858
+ /**
859
+ * 获取PassportId-依赖内部环境 4004
860
+ * @param {SaveFileInDiskParams} param
861
+ * @function hybridGetPassport
862
+ * @returns {void}
863
+ */
864
+ export declare const hybridGetPassport: () => Promise<string | null>;
865
+
866
+ /**
867
+ * 获取PassportId-依赖内部环境 4004
868
+ * @param {SaveFileInDiskParams} param
869
+ * @function hybridGetPassport
870
+ * @returns {void}
871
+ */
872
+ export declare const hybridGetUserId: () => Promise<string | null>;
873
+
874
+ export declare const initFinder: (params: TInitFinder) => Promise<void>;
875
+
876
+ declare interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
877
+ headers: AxiosRequestHeaders;
878
+ }
879
+
880
+ /**
881
+ * 设置公共参数
882
+ * @param params 配置参数
883
+ */
884
+ declare type keyPublicValueType = 'userId' | 'pid' | 'YJB_userId';
885
+
886
+ /**回流参数解析入参*/
887
+ export declare type LinkActionConfigParam = {
888
+ type: 'web' | 'native';
889
+ param: {
890
+ url?: string;
891
+ type?: number;
892
+ closeBack?: number;
893
+ hashIgnore?: number;
894
+ [prop: string]: any;
895
+ };
896
+ precondition?: {
897
+ announceSubType?: string;
898
+ loginType?: number;
899
+ isWeakLogin?: 0 | 1;
900
+ needToken?: 0 | 1;
901
+ };
902
+ };
903
+
904
+ /**
905
+ * v2工具:回流配置转换成v1广告配置,并根据使用场景返回跳转参数对象
906
+ * @function linkDecode
907
+ * @param {string} link 需要解析的链接(用配置工具生成的)
908
+ * @param {LinkDecodeParam} config 附加参数
909
+ * @returns {json}
910
+ */
911
+ export declare const linkActionDecode: (action: LinkActionConfigParam, config?: LinkDecodeParam$1) => any;
912
+
913
+ /**
914
+ * v1工具:广告配置链接解析,并根据使用场景返回跳转参数对象
915
+ * @function linkDecode
916
+ * @param {string} link 需要解析的链接(用配置工具生成的)
917
+ * @param {LinkDecodeParam} config 附加参数
918
+ * @returns {json}
919
+ */
920
+ export declare const linkDecode: (link: string, config?: LinkDecodeParam) => any;
921
+
922
+ /**广告链接解析入参*/
923
+ declare type LinkDecodeParam$1 = {
924
+ LINK_PAGE_ENV: LinkPageEnvEnum;
925
+ LINK_PARAM: LinkParamsEnvEnum;
926
+ };
927
+
928
+ /**广告链接解析入参**/
929
+ export declare type LinkDecodeParam = {
930
+ LINK_PAGE_ENV: LinkPageEnvEnum;
931
+ LINK_PARAM: LinkParamsEnvEnum;
932
+ };
933
+
934
+ declare enum LinkPageEnvEnum {
935
+ HYBRID = 1,// hybrid
936
+ WEBAPPS = 2,// webapps
937
+ NATIVE = 3
938
+ }
939
+
940
+ declare enum LinkParamsEnvEnum {
941
+ LINK_SETTING = 1,// link链接参数
942
+ REDIRECT = 2,// redirectManager_options
943
+ OPEN_APP = 3
944
+ }
945
+
946
+ /**
947
+ * @description 端内登录组件
948
+ * @param {LoginParams} params 登录参数
949
+ * @returns {loginResult} 返回结果
950
+ */
951
+ export declare function login(params?: LoginParams): Promise<loginResult>;
952
+
953
+ export declare type LoginParams = {
954
+ type?: 1 | 2 | 16;
955
+ needPassportId?: 0 | 1;
956
+ needStockAccount?: 0 | 1;
957
+ fundAccount?: string | number;
958
+ };
959
+
960
+ declare type LoginResponse = {
961
+ errCode: number;
962
+ errStr: string;
963
+ [key: string]: unknown;
964
+ };
965
+
966
+ export declare type loginResult = {
967
+ result: any;
968
+ errStr?: string;
969
+ message: string;
970
+ code: number | string;
971
+ errCode?: number | string;
972
+ };
973
+
974
+ declare enum LoginType {
975
+ USER = "u",
976
+ PASSPORT = "p",
977
+ FUNDACCOUNT = "1",
978
+ MARGINACCOUNT = "2"
979
+ }
980
+
981
+ declare enum LoginTypeEnum {
982
+ '($userId)' = "u",
983
+ '($passportId)' = "p",
984
+ '($clientId)' = "1",
985
+ '($fundAccount)' = "1",
986
+ '($fundPassword)' = "1",
987
+ '($fundAccountType)' = "1",
988
+ '($marginAccount)' = "2",
989
+ '($marginPassword)' = "2"
990
+ }
991
+
992
+ /**
993
+ * 登录代入资金账号-调用前需要判断版本号 4030
994
+ * @function
995
+ * @param {loginWithAccountParams} params
996
+ * @param {Promise<LoginResponse>} 结果:0 - 登录成功; 1 - 取消登录; -2 - 参数格式错误; 其他值-换登功能号返回
997
+ */
998
+ export declare const loginWithAccount: (params: loginWithAccountParams) => Promise<LoginResponse>;
999
+
1000
+ export declare type loginWithAccountParams = {
1001
+ fundAccount?: string;
1002
+ type?: number;
1003
+ needPassportId?: number;
1004
+ needStockAccount?: number;
1005
+ };
1006
+
1007
+ /**
1008
+ * 用户登录 - 使用页面链接上的token & type
1009
+ * @function loginWithToken
1010
+ * @return boolean
1011
+ */
1012
+ export declare function loginWithToken(): Promise<boolean>;
1013
+
1014
+ export declare function loginWithTokenForWeb(loginType: string): Promise<boolean>;
1015
+
1016
+ /**
1017
+ * 注销登录 4001
1018
+ * @function logout
1019
+ * @param {LogoutParams} type
1020
+ * 登录类型: <br>
1021
+ * 1-普通登录<br>
1022
+ * 2-信用登录<br>
1023
+ * 3-担保品划转登录(普通+信用)<br>
1024
+ * 4-通行证passport登录<br>
1025
+ * 5-普通+passort登录<br>
1026
+ */
1027
+ export declare const logout: (param: LogoutParams) => void;
1028
+
1029
+ /**
1030
+ * 登出
1031
+ * @function logout
1032
+ * @param {string} loginType 登录类型
1033
+ * @returns { Promise<HttpResponse> }
1034
+ */
1035
+ export declare function logoutForWeb(loginType: string | null): Promise<HttpResponse>;
1036
+
1037
+ export declare type LogoutParams = {
1038
+ type: number;
1039
+ };
1040
+
1041
+ declare type LookupAddress = string | LookupAddressEntry;
1042
+
1043
+ declare interface LookupAddressEntry {
1044
+ address: string;
1045
+ family?: AddressFamily;
1046
+ }
1047
+
1048
+ /**
1049
+ * marginAccount登录
1050
+ * @function marginAccountLogin
1051
+ * @param {MarginAccountLoginParams} param
1052
+ * @returns {Promise<HttpResponse> }
1053
+ */
1054
+ export declare function marginAccountLogin(param: MarginAccountLoginParams): Promise<HttpResponse>;
1055
+
1056
+ export declare type MarginAccountLoginParams = {
1057
+ instant_token?: string;
1058
+ op_station?: string;
1059
+ account_type?: AccountType;
1060
+ };
1061
+
1062
+ declare type MaxDownloadRate = number;
1063
+
1064
+ declare type MaxUploadRate = number;
1065
+
1066
+ declare type Method =
1067
+ | 'get' | 'GET'
1068
+ | 'delete' | 'DELETE'
1069
+ | 'head' | 'HEAD'
1070
+ | 'options' | 'OPTIONS'
1071
+ | 'post' | 'POST'
1072
+ | 'put' | 'PUT'
1073
+ | 'patch' | 'PATCH'
1074
+ | 'purge' | 'PURGE'
1075
+ | 'link' | 'LINK'
1076
+ | 'unlink' | 'UNLINK';
1077
+
1078
+ declare type MethodsHeaders = Partial<{
1079
+ [Key in Method as Lowercase<Key>]: AxiosHeaders;
1080
+ } & {common: AxiosHeaders}>;
1081
+
1082
+ declare type Milliseconds = number;
1083
+
1084
+ /**
1085
+ * multiLogin 功能组件
1086
+ */
1087
+ export declare function multiLogin(param: multiLoginParams): Promise<HttpResponse>;
1088
+
1089
+ export declare type multiLoginParams = {
1090
+ [key: string]: unknown;
1091
+ };
1092
+
1093
+ export declare const native2011IOOperation: (options: object) => void;
1094
+
1095
+ /**
1096
+ * nativeIOOperation 功能组件
1097
+ */
1098
+ export declare function nativeIOOperation(code: number, options: object): Promise<object>;
1099
+
1100
+ export declare type nativeIOOperationType = {
1101
+ code: number;
1102
+ options: object;
1103
+ };
1104
+
1105
+ /**
1106
+ * onAppear 2011
1107
+ * @function onAppear
1108
+ * @param {any} fn
1109
+ */
1110
+ export declare const onAppear: (fn: unknown) => void;
1111
+
1112
+ /**
1113
+ * onBackKeyPressed 2011
1114
+ * @function onBackKeyPressed
1115
+ * @param {any} fn
1116
+ */
1117
+ export declare const onBackKeyPressed: (fn: unknown) => void;
1118
+
1119
+ /**
1120
+ * onClose 2011
1121
+ * @function onClose
1122
+ * @param {any} fn
1123
+ */
1124
+ export declare const onClose: (fn: unknown) => void;
1125
+
1126
+ /**
1127
+ * onDisappear 2011
1128
+ * @function onDisappear
1129
+ * @param {any} fn
1130
+ */
1131
+ export declare const onDisappear: (fn: unknown) => void;
1132
+
1133
+ /**
1134
+ * onAppear 2011
1135
+ * @function onSkinChanged
1136
+ * @param {any} fn
1137
+ */
1138
+ export declare const onSkinChanged: (fn: unknown) => void;
1139
+
1140
+ /**
1141
+ * 客户端打开其它App 3002
1142
+ * @function openApp
1143
+ * @param {OpenAppParams} param
1144
+ */
1145
+ export declare const openApp: (param: OpenAppParams) => void;
1146
+
1147
+ /**
1148
+ * 跳转至APP下载并传参
1149
+ * @function openApp
1150
+ * @param {string} selector APP下载事件選擇器
1151
+ * @param {OpenAppParam} config APP下载跳转参数
1152
+ * @param {OpenAppUrlParam} urlConfig APP下载相关URL参数
1153
+ * @returns {Promise<void>}
1154
+ */
1155
+ export declare const openAppForWeb: (selector: string, config?: OpenAppParam, urlConfig?: OpenAppUrlParam) => Promise<void>;
1156
+
1157
+ export declare type OpenAppParam = {
1158
+ type: string;
1159
+ param: ClientJumpParams$1 | OpenParams;
1160
+ precondition?: {
1161
+ announceSubType?: string;
1162
+ loginType?: number;
1163
+ isWeakLogin?: number;
1164
+ needToken?: number;
1165
+ };
1166
+ };
1167
+
1168
+ export declare type OpenAppParams = {
1169
+ appURL: string;
1170
+ rodownloadURLotType?: string;
1171
+ };
1172
+
1173
+ export declare type OpenAppUrlParam = {
1174
+ EVOLUTION_UNIVERSAL_URL?: string;
1175
+ EVOLUTION_TXAPP_URL?: string;
1176
+ EVOLUTION_ANDOWNLOAD_URL?: string;
1177
+ EVOLUTION_MINIAPP_URL?: string;
1178
+ EVOLUTION_PAGE_ENV?: string;
1179
+ EVOLUTION_SCENE_INFO?: {
1180
+ URL?: string;
1181
+ SHORT_LINK?: number;
1182
+ };
1183
+ };
1184
+
1185
+ /**
1186
+ * 打开新的webview 2007 2008
1187
+ * @function openPage
1188
+ * @param {OpenParams} params 参数
1189
+ * url {string} 当前需要打开的url地址
1190
+ * fullScreen {number} 是否全屏展示 0-否,1-是 在展示资讯内容的时候有需要全屏展示
1191
+ * title {string} 页面的标题,如果不传或者传空,在load结束时,使用H5的标题。
1192
+ * leftType {number} "按钮类型 v0-没有按钮 1-返回 98-图片自定义(设置按钮为图片格式)" 99-自定义(设置为默认底图,显示对应文本)"
1193
+ * rightType {number} 类型同上
1194
+ * leftText {string} 当type=98时图片的地址,当type=99时按钮标题
1195
+ * rightText {string} 当type=98时图片的地址,当type=99时右边按钮标题
1196
+ * leftJS {string} 点击左边按钮,调用的js函数名或者js语句块,客户端直接调用即可,如果是函数,H5传值需为”functionName()”而不是functionName。
1197
+ * rightJS {string} 点击右边按钮,调用的js函数名或者js语句块,客户端直接调用即可,如果是函数,H5传值需为”functionName()”而不是functionName。
1198
+ * leftURL {string} 点击左边按钮,跳转的链接地址,未设置leftJS有效
1199
+ * rightURL {string} 点击右边按钮,跳转的链接地址,未设置rightJS有效
1200
+ * animated {number} 跳转是否有动画,0为没有,1为有
1201
+ * showLoadingPage {number} 0:不显示loading效果,1:显示loading效果
1202
+ * @param {boolean} needCloseCurrentView 是否需要关闭当前webview
1203
+ */
1204
+ export declare function openPage(params: OpenParams, needCloseCurrentView?: boolean): void;
1205
+
1206
+ export declare type OpenPageActionParam = {
1207
+ type: number;
1208
+ env: string;
1209
+ site: string;
1210
+ };
1211
+
1212
+ declare type OpenParams = {
1213
+ url?: string;
1214
+ fullScreen?: number;
1215
+ navBarStyle?: number;
1216
+ navBarBgColor?: string;
1217
+ title?: string;
1218
+ titleColor?: string;
1219
+ subtitle?: string;
1220
+ subtitleColor?: string;
1221
+ leftType?: number;
1222
+ rightType?: number;
1223
+ leftText?: string;
1224
+ leftTextColor?: string;
1225
+ rightText?: string;
1226
+ rightTextColor?: string;
1227
+ leftJS?: string;
1228
+ rightJS?: string;
1229
+ leftURL?: string;
1230
+ rightURL?: string;
1231
+ leftButtons?: number[];
1232
+ rightButtons?: number[];
1233
+ condition?: number;
1234
+ animated?: number;
1235
+ skinType?: number;
1236
+ canRefresh?: number;
1237
+ refreshJS?: string;
1238
+ showLoadingPage?: string;
1239
+ keepActive?: number;
1240
+ enableSwipeLeftGoBack?: number;
1241
+ };
1242
+
1243
+ declare interface PageConfig$1 {
1244
+ title?: string;
1245
+ [key: string]: unknown;
1246
+ }
1247
+
1248
+ export declare interface PageConfig {
1249
+ title?: string;
1250
+ leftType?: number;
1251
+ rightType?: number;
1252
+ rightText?: string;
1253
+ rightJS?: string;
1254
+ [key: string]: unknown;
1255
+ }
1256
+
1257
+ declare interface PageConfig_2 {
1258
+ title?: string;
1259
+ [key: string]: unknown;
1260
+ }
1261
+
1262
+ /**
1263
+ * 打开新页面
1264
+ * @function pageInit
1265
+ * @param {string} URL 页面URL
1266
+ * @param {boolean} needCloseCurrentView 是否需要关闭当前页面 缺省false
1267
+ * @param {object} config 打开页面参数
1268
+ * @returns {Promise<void>}
1269
+ */
1270
+ export declare const pageInit: (URL: string, needCloseCurrentView?: boolean, config?: PageConfig) => Promise<void>;
1271
+
1272
+ /**
1273
+ * 打开新页面并写入集群SESSION
1274
+ * @function pageInitWithSession
1275
+ * @param {number} loginType 登录类型
1276
+ * @param {string} URL 跳转URL
1277
+ * @param {boolean} needCloseCurrentView 是否需要关闭当前页
1278
+ * @param {object} config 页面跳转参数
1279
+ * @returns {Promise<void>}
1280
+ */
1281
+ export declare const pageInitWithSession: (loginType: number, URL: string, needCloseCurrentView: boolean, config?: PageConfig$1) => Promise<void>;
1282
+
1283
+ /**
1284
+ * 打开新页面并生成token
1285
+ * @function pageInitWithToken
1286
+ * @param {number} loginType 登录类型
1287
+ * @param {string} URL 跳转URL
1288
+ * @param {boolean} needCloseCurrentView 是否需要关闭当前页
1289
+ * @param {object} config 页面跳转参数
1290
+ * @returns {Promise<void>}
1291
+ */
1292
+ export declare const pageInitWithToken: (loginType: number, URL: string, needCloseCurrentView: boolean, config?: PageConfig_2) => Promise<void>;
1293
+
1294
+ declare interface ParamEncoder {
1295
+ (value: any, defaultEncoder: (value: any) => any): any;
1296
+ }
1297
+
1298
+ declare interface ParamsSerializerOptions extends SerializerOptions {
1299
+ encode?: ParamEncoder;
1300
+ serialize?: CustomParamsSerializer;
1301
+ }
1302
+
1303
+ /**
1304
+ * 支付时暴露给调用者的参数
1305
+ */
1306
+ declare type PayExportOptions = {
1307
+ source?: string;
1308
+ pay_type: number | string;
1309
+ subject: string;
1310
+ out_trade_no: number;
1311
+ total_fee: number | string;
1312
+ promo_params?: string;
1313
+ goods_type?: string;
1314
+ detail?: string;
1315
+ timeout_express?: string;
1316
+ account_name?: string;
1317
+ app_name?: string;
1318
+ product_code?: string;
1319
+ device_info?: string;
1320
+ openid?: string;
1321
+ return_url?: string;
1322
+ passback_params?: string;
1323
+ skip_pre_order?: boolean;
1324
+ pre_order_result?: unknown;
1325
+ wxWebAuthCode?: string;
1326
+ };
1327
+
1328
+ /**
1329
+ * yjb3.0-passportId登录-phpsession状态同步
1330
+ * @function pidLogin
1331
+ * @param {PidLoginParams} param
1332
+ * @returns {Promise<HttpResponse>}
1333
+ */
1334
+ export declare function pidLogin(param: PidLoginParams): Promise<HttpResponse>;
1335
+
1336
+ export declare type PidLoginParams = {
1337
+ channelId: string;
1338
+ uKey: string;
1339
+ };
1340
+
1341
+ export declare type PortfolioParams = {
1342
+ stockCode: string;
1343
+ codeType?: number;
1344
+ stockName?: string;
1345
+ };
1346
+
1347
+ declare type PortfolioParams_2 = {
1348
+ stockCode: string;
1349
+ codeType?: number;
1350
+ stockName?: string;
1351
+ };
1352
+
1353
+ /**
1354
+ * 腾讯自选股渠道,session_id登录
1355
+ * @function qqStockLogin
1356
+ * @param {QQStockLoginParams} param
1357
+ * @returns {Promise<HttpResponse>}
1358
+ */
1359
+ export declare function qqStockLogin(param: QQStockLoginParams): Promise<HttpResponse>;
1360
+
1361
+ export declare type QQStockLoginParams = {
1362
+ session_id?: string;
1363
+ };
1364
+
1365
+ declare interface RawAxiosHeaders {
1366
+ [key: string]: AxiosHeaderValue;
1367
+ }
1368
+
1369
+ declare type RawAxiosRequestHeaders = Partial<RawAxiosHeaders & {
1370
+ [Key in CommonRequestHeadersList]: AxiosHeaderValue;
1371
+ } & {
1372
+ 'Content-Type': ContentType
1373
+ }>;
1374
+
1375
+ declare type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
1376
+
1377
+ declare type RawCommonResponseHeaders = {
1378
+ [Key in CommonResponseHeadersList]: AxiosHeaderValue;
1379
+ } & {
1380
+ "set-cookie": string[];
1381
+ };
1382
+
1383
+ export declare function readFile(param: ReadFileParams): void;
1384
+
1385
+ /**
1386
+ * 读客户端磁盘文件-依赖内部环境 2005
1387
+ * @param {ReadFileInDiskParams} param
1388
+ * @function readFileInDisk
1389
+ * @returns {Promise<object>} 文件内容
1390
+ */
1391
+ export declare const readFileInDisk: (param: ReadFileInDiskParams) => Promise<object | null>;
1392
+
1393
+ export declare type ReadFileInDiskParams = {
1394
+ name: string;
1395
+ };
1396
+
1397
+ export declare type ReadFileParams = {
1398
+ url: string;
1399
+ type?: ReadFileType;
1400
+ };
1401
+
1402
+ declare enum ReadFileType {
1403
+ OFFICE = 1,
1404
+ PDF = 2
1405
+ }
1406
+
1407
+ /**
1408
+ * 请求客户端非系统参数 4012
1409
+ * @function readNoSystemParameter
1410
+ * @param {ReadSystemParams} param
1411
+ * @returns {Promise}
1412
+ */
1413
+ export declare const readNoSystemParameter: (param: ReadSystemParams) => Promise<object>;
1414
+
1415
+ /**
1416
+ * readSystemParameter 功能组件
1417
+ */
1418
+ export declare function readSystemParameter(param: readSystemParameterParams): Promise<object>;
1419
+
1420
+ export declare type readSystemParameterParams = {
1421
+ keys?: Array<string>;
1422
+ };
1423
+
1424
+ export declare type ReadSystemParams = {
1425
+ keys?: Array<string>;
1426
+ };
1427
+
1428
+ /**
1429
+ * ready 功能组件
1430
+ */
1431
+ export declare function ready(): Promise<readyResult>;
1432
+
1433
+ export declare type readyResult = {
1434
+ value: object | undefined;
1435
+ };
1436
+
1437
+ /**
1438
+ * 添加股票至自选股 4020
1439
+ * @function addToPortfolio
1440
+ * @param {PortfolioParams} param 参数
1441
+ * @returns {Promise<object>} 返回值
1442
+ */
1443
+ export declare const removePortfolio: (param: PortfolioParams_2) => Promise<object | null>;
1444
+
1445
+ declare type responseEncoding =
1446
+ | 'ascii' | 'ASCII'
1447
+ | 'ansi' | 'ANSI'
1448
+ | 'binary' | 'BINARY'
1449
+ | 'base64' | 'BASE64'
1450
+ | 'base64url' | 'BASE64URL'
1451
+ | 'hex' | 'HEX'
1452
+ | 'latin1' | 'LATIN1'
1453
+ | 'ucs-2' | 'UCS-2'
1454
+ | 'ucs2' | 'UCS2'
1455
+ | 'utf-8' | 'UTF-8'
1456
+ | 'utf8' | 'UTF8'
1457
+ | 'utf16le' | 'UTF16LE';
1458
+
1459
+ declare type ResponseType_2 =
1460
+ | 'arraybuffer'
1461
+ | 'blob'
1462
+ | 'document'
1463
+ | 'json'
1464
+ | 'text'
1465
+ | 'stream'
1466
+ | 'formdata';
1467
+
1468
+ /**
1469
+ * 往客户端磁盘写文件-依赖内部环境 2004
1470
+ * @param {SaveFileInDiskParams} param
1471
+ * @function saveFileInDisk
1472
+ * @returns {void}
1473
+ */
1474
+ export declare const saveFileInDisk: (param: SaveFileInDiskParams) => void;
1475
+
1476
+ export declare type SaveFileInDiskParams = {
1477
+ name: string;
1478
+ data: string;
1479
+ encrypt?: number;
1480
+ };
1481
+
1482
+ export declare const savePictureToPhone: (data: string, imageType?: number) => Promise<object>;
1483
+
1484
+ /**
1485
+ * 二维码扫描 3007
1486
+ * @function scanCode
1487
+ * @returns {Promise<object>}
1488
+ */
1489
+ export declare const scanCode: () => Promise<object>;
1490
+
1491
+ /**
1492
+ * 查询日历事件 3023
1493
+ * @function selectCalendar
1494
+ * @param {SelectCalendarParams} param
1495
+ * @returns {Promise<object>}
1496
+ */
1497
+ export declare const selectCalendar: (param: SelectCalendarParams) => Promise<object>;
1498
+
1499
+ export declare type SelectCalendarParams = {
1500
+ eventId?: string;
1501
+ start?: number;
1502
+ end?: number;
1503
+ };
1504
+
1505
+ declare interface SerializerOptions {
1506
+ visitor?: SerializerVisitor;
1507
+ dots?: boolean;
1508
+ metaTokens?: boolean;
1509
+ indexes?: boolean | null;
1510
+ }
1511
+
1512
+ declare interface SerializerVisitor {
1513
+ (
1514
+ this: GenericFormData,
1515
+ value: any,
1516
+ key: string | number,
1517
+ path: null | Array<string | number>,
1518
+ helpers: FormDataVisitorHelpers
1519
+ ): boolean;
1520
+ }
1521
+
1522
+ /**
1523
+ * 设置statusBar样式 3016
1524
+ * @function setStatusBar
1525
+ * @param {StatusBarParams} param
1526
+ * @returns {Promise<object>}
1527
+ */
1528
+ export declare const setStatusBar: (param: StatusBarParams) => Promise<object>;
1529
+
1530
+ /**
1531
+ * setTitle 功能组件
1532
+ */
1533
+ export declare function setTitle(param: OpenParams): void;
1534
+
1535
+ /**
1536
+ * 设置标题栏
1537
+ * @function setTitle
1538
+ * @param {OpenParams} config 设置参数(类open参数)
1539
+ * @returns {Promise<any>}
1540
+ */
1541
+ export declare const setTitles: (config: OpenParams) => Promise<void>;
1542
+
1543
+ /**
1544
+ * showAlert 功能组件
1545
+ */
1546
+ export declare const showAlert: (content: string, title?: string, success?: (params?: string) => void) => void;
1547
+
1548
+ export declare type showAlertParams = {
1549
+ url: string;
1550
+ };
1551
+
1552
+ /**
1553
+ * 弹出确认提示框
1554
+ * @function showConfirm
1555
+ * @param {string} content 显示内容
1556
+ * @param {function} onConfirm 点击确定后回调
1557
+ * @param {function} onCancel 点击取消后回调
1558
+ * @param {string} confirmTitle 确定键标题
1559
+ * @param {string} cancelTitle 取消键标题
1560
+ */
1561
+ export declare const showConfirm: (content: string, onConfirm: (param: object) => void, onCancel: (param: object) => void, title?: string, cancelTitle?: string) => void;
1562
+
1563
+ export declare type showResult = {
1564
+ code: number;
1565
+ result: string;
1566
+ };
1567
+
1568
+ /**
1569
+ * AnyChat视频见证 3005
1570
+ * @function startAnyChat
1571
+ * @param {StartAnyChatParams} param
1572
+ * @returns {Promise<object>}
1573
+ */
1574
+ export declare const startAnyChat: (param: StartAnyChatParams) => Promise<object>;
1575
+
1576
+ export declare type StartAnyChatParams = {
1577
+ type: number;
1578
+ ip?: string;
1579
+ port?: number;
1580
+ user?: string;
1581
+ password?: string;
1582
+ room?: number;
1583
+ roomPassword?: string;
1584
+ statusNotify: string;
1585
+ };
1586
+
1587
+ export declare type StatusBarParams = {
1588
+ style: number;
1589
+ };
1590
+
1591
+ /**
1592
+ * 客户端与服务端登录态同步
1593
+ * @function syncLoginStatusBetweenNativeAndServer
1594
+ * @returns {Promise<HttpResponse>}
1595
+ */
1596
+ export declare function syncLoginStatusBetweenNativeAndServer(syncLoginTypes?: LoginType[]): Promise<unknown>;
1597
+
1598
+ declare type TInitFinder = {
1599
+ app_id: string | number;
1600
+ env: string;
1601
+ Native?: boolean;
1602
+ enable_native?: boolean;
1603
+ disable_auto_pv?: boolean;
1604
+ spa?: boolean;
1605
+ enable_ab_test?: boolean;
1606
+ cross_subdomain?: boolean;
1607
+ cookie_domain?: string;
1608
+ max_report?: number | string;
1609
+ reportTime?: number | string;
1610
+ timeout?: number | string;
1611
+ enable_custom_webid?: boolean;
1612
+ disable_ab_reset?: boolean;
1613
+ enable_stay_duration?: boolean;
1614
+ };
1615
+
1616
+ /**
1617
+ * trackEvent 功能组件
1618
+ */
1619
+ export declare const trackEvent: (params: TTrackEvent) => "event_name is empty!" | undefined;
1620
+
1621
+ /**
1622
+ * 自动执行initFinder
1623
+ *
1624
+ */
1625
+ export declare const trackInitAuto: () => void;
1626
+
1627
+ export declare const trackPublicValue: <T extends Partial<Record<keyPublicValueType, string>>>(params: T) => void;
1628
+
1629
+ /**
1630
+ *
1631
+ * @param params
1632
+ */
1633
+ export declare const trackUserProfile: (params: TTrackUserProfile) => void;
1634
+
1635
+ /**
1636
+ * 设置唯一id及类型
1637
+ * 目前支持user_id、client_id、preappoint
1638
+ * @param uuid
1639
+ * @param uuid_type
1640
+ */
1641
+ export declare const trackUuid: (uuid: string, uuid_type?: string) => void;
1642
+
1643
+ declare interface TransitionalOptions {
1644
+ silentJSONParsing?: boolean;
1645
+ forcedJSONParsing?: boolean;
1646
+ clarifyTimeoutError?: boolean;
1647
+ }
1648
+
1649
+ declare type TTrackEvent = {
1650
+ event_name: string;
1651
+ page_name: string;
1652
+ element_name?: string;
1653
+ module_name?: string;
1654
+ eventid?: string | number;
1655
+ from_page?: string;
1656
+ product_code?: string;
1657
+ location?: string;
1658
+ remarks?: string;
1659
+ [key: string]: any;
1660
+ };
1661
+
1662
+ declare type TTrackUserProfile = {
1663
+ pid?: string;
1664
+ userId?: string;
1665
+ clientId?: string;
1666
+ };
1667
+
1668
+ /**
1669
+ * uploadFile 功能组件
1670
+ */
1671
+ export declare function uploadFile(param: UploadFileparams): Promise<object>;
1672
+
1673
+ export declare type UploadFileparams = {
1674
+ url: string;
1675
+ name?: string;
1676
+ fileName?: string;
1677
+ filePath?: string;
1678
+ fileData?: string;
1679
+ };
1680
+
1681
+ /**
1682
+ * user登录 4015
1683
+ * 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1684
+ * @function key: {tag: ''}
1685
+ * @returns {Promise<object>} 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1686
+ */
1687
+ export declare const userLogin: (json?: object) => Promise<object>;
1688
+
1689
+ /**
1690
+ * yjb3.0-user登录-phpsession状态同步
1691
+ * @function userLogin
1692
+ * @param {UserLoginParams} param
1693
+ * @returns {Promise<HttpResponse>}
1694
+ */
1695
+ export declare function userLoginForWeb(param: UserLoginParams): Promise<HttpResponse>;
1696
+
1697
+ /**
1698
+ * 用户登录 支持带入手机号 4031
1699
+ * @function userLoginMobile
1700
+ * @param {userLoginMobileParams} param
1701
+ * key string(JSON) json格式字符串,通过tag字段透传给服务端,渠道或活动相关信息
1702
+ * mobileCode string 目标登录的手机号
1703
+ * quickLogin number 默认为1. 1: 支持启动一键登录,将忽目标手机号 0.启动全屏登录,支持填入目标手机号
1704
+ */
1705
+ export declare const userLoginMobile: (json: userLoginMobileParams) => Promise<object>;
1706
+
1707
+ export declare type userLoginMobileParams = {
1708
+ key?: string;
1709
+ mobileCode?: string;
1710
+ quickLogin?: number;
1711
+ };
1712
+
1713
+ /**
1714
+ * user登录用户登录(一键登录弹窗) 4028
1715
+ * 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1716
+ * @function userLogin
1717
+ * @returns {Promise<object>} 回调函数接收返回结果,结果:0 - 登录成功; 1 - 取消登录
1718
+ */
1719
+ export declare const userLoginModal: (json?: object) => Promise<object>;
1720
+
1721
+ export declare type UserLoginParams = {
1722
+ channelId?: string;
1723
+ userUKey?: string;
1724
+ instant_token_v3?: string;
1725
+ };
1726
+
1727
+ /**
1728
+ * 注销用户号登录 4016
1729
+ * @function userLogOut
1730
+ */
1731
+ export declare const userLogOut: () => void;
1732
+
1733
+ /**
1734
+ * 活体检测 3018
1735
+ * @function VivoDetectionParams
1736
+ * @param {VivoDetectionParams} param
1737
+ * @returns {Promise<object>}
1738
+ */
1739
+ export declare const vivoDetection: (param: VivoDetectionParams) => Promise<object>;
1740
+
1741
+ export declare type VivoDetectionParams = {
1742
+ allActions?: string;
1743
+ timeout?: number;
1744
+ count?: number;
1745
+ needOrigin?: number;
1746
+ };
1747
+
1748
+ /**
1749
+ * 佣金宝公众号授权
1750
+ */
1751
+ export declare const wechatAuth: (options: WechatAuthOptions) => Promise<{
1752
+ code: string;
1753
+ msg: string;
1754
+ } | {
1755
+ code: number;
1756
+ msg: string;
1757
+ } | undefined>;
1758
+
1759
+ /**
1760
+ * 获取授权链接的参数
1761
+ */
1762
+ export declare type WechatAuthOptions = {
1763
+ redirect_uri?: string;
1764
+ scope?: string;
1765
+ account_name?: string;
1766
+ app_name?: string;
1767
+ };
1768
+
1769
+ /**
1770
+ * @description goWechatPayment 微信支付功能
1771
+ * @param {WechatPayParams} params 微信支付参数
1772
+ * @returns {Promise<object>} 微信支付返回的信息
1773
+ */
1774
+ export declare type WechatPayParams = {
1775
+ appId: string;
1776
+ partnerId: string;
1777
+ prepayId: string;
1778
+ nonceStr: string;
1779
+ timeStamp: string;
1780
+ packageStr: string;
1781
+ sign: string;
1782
+ };
1783
+
1784
+ export declare type WechatUserInfoOptions = {
1785
+ code: string;
1786
+ account_name?: string;
1787
+ app_name?: string;
1788
+ };
1789
+
1790
+ export { }