@alipay/ams-checkout 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ams-checkout.js +3 -3
- package/dist/ams-checkout.min.js +1 -1
- package/esm/config/index.d.ts +7 -0
- package/esm/config/index.js +2 -2
- package/esm/constant/element.d.ts +2 -1
- package/esm/constant/element.js +1 -0
- package/esm/constant/index.d.ts +4 -21
- package/esm/core/component/ckp/index.d.ts +1 -1
- package/esm/core/component/ckp/index.js +5 -2
- package/esm/core/component/element/elementController/index.d.ts +3 -3
- package/esm/core/component/element/elementController/index.js +66 -42
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +1 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +1 -0
- package/esm/core/component/element/elementProcessor/convertPaymentMethods.d.ts +22 -0
- package/esm/core/component/element/elementProcessor/convertPaymentMethods.js +159 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +5 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +107 -29
- package/esm/core/component/element/index.d.ts +4 -1
- package/esm/core/component/element/index.js +19 -4
- package/esm/core/component/element/mock.js +2 -2
- package/esm/core/component/element/modernElementController/adapter.d.ts +19 -0
- package/esm/core/component/element/modernElementController/adapter.js +79 -0
- package/esm/core/component/element/modernElementController/index.d.ts +155 -0
- package/esm/core/component/element/modernElementController/index.js +1780 -0
- package/esm/core/component/element/type.d.ts +74 -19
- package/esm/core/component/element/util.d.ts +9 -2
- package/esm/core/component/element/util.js +3 -2
- package/esm/core/instance/index.d.ts +12 -4
- package/esm/core/instance/index.js +152 -26
- package/esm/foundation/service/event-center.js +1 -1
- package/esm/foundation/service/security/index.d.ts +9 -4
- package/esm/foundation/service/security/index.js +158 -35
- package/esm/foundation/service/security/security.d.ts +22 -1
- package/esm/foundation/service/security/security.js +150 -37
- package/esm/foundation/utils/preload_helper.d.ts +6 -3
- package/esm/foundation/utils/preload_helper.js +122 -32
- package/esm/main.js +4 -4
- package/esm/modern/global.d.ts +3 -0
- package/esm/modern/index.d.ts +5 -1
- package/esm/modern/index.js +1 -51
- package/esm/modern/tools.js +1 -0
- package/esm/plugin/component/channel.d.ts +2 -2
- package/esm/plugin/component/channel.js +18 -18
- package/esm/plugin/component/index.js +36 -29
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/types/index.d.ts +5 -1
- package/esm/util/beforeConfirm.d.ts +4 -2
- package/esm/util/beforeConfirm.js +15 -14
- package/esm/util/jshield-apdid/apdid-loader.js +377 -0
- package/esm/util/jshield-apdid/index.js +21 -0
- package/esm/util/logger.js +1 -2
- package/esm/util/security-registry.d.ts +72 -0
- package/esm/util/security-registry.js +175 -0
- package/esm/util/security.d.ts +22 -1
- package/esm/util/security.js +150 -39
- package/package.json +15 -9
- package/types.d.ts +843 -1103
- package/types.untrimmed.d.ts +995 -1122
- package/esm/modern/stageName.d.ts +0 -3
- package/esm/modern/stageName.js +0 -1
package/types.untrimmed.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { CompatibleTrackerFull } from '@antintl/intl-tracker/common';
|
|
2
|
+
|
|
1
3
|
declare interface ActionForm {
|
|
2
4
|
/**
|
|
3
5
|
* @description action form type
|
|
@@ -5,8 +7,6 @@ declare interface ActionForm {
|
|
|
5
7
|
actionFormType?: string;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
declare type AddBehavior = (behavior: BehaviorData) => void;
|
|
9
|
-
|
|
10
10
|
declare interface Address {
|
|
11
11
|
/**
|
|
12
12
|
* @description 2-letter courtry/region code, refer to ISO 3166
|
|
@@ -143,7 +143,88 @@ declare interface AmountLimitInfo {
|
|
|
143
143
|
/**
|
|
144
144
|
* AntomBridge事件类型,包含了SDK与webapp通信的所有事件类型
|
|
145
145
|
*/
|
|
146
|
-
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any
|
|
146
|
+
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends BaseBridgeEventMap<AppConfig, SR, SubmitParams, string, AntomOpenModalConfig> {
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
|
|
151
|
+
*/
|
|
152
|
+
export declare interface AntomBridgeWithNativeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends AntomBridgeEventMap<AppConfig, SubmitParams, SR> {
|
|
153
|
+
/**
|
|
154
|
+
* @internal 展示半浮层
|
|
155
|
+
*/
|
|
156
|
+
showPopup: {
|
|
157
|
+
mode: string;
|
|
158
|
+
showAnimation: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* @internal 隐藏loading
|
|
162
|
+
*/
|
|
163
|
+
dismissLoading: Record<string, never>;
|
|
164
|
+
/**
|
|
165
|
+
* @internal 通知APP 收银台已经ready
|
|
166
|
+
*/
|
|
167
|
+
webAppReady: {
|
|
168
|
+
source: string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* @internal 通知app 应用已启动
|
|
172
|
+
*/
|
|
173
|
+
onLaunch: {
|
|
174
|
+
success: boolean;
|
|
175
|
+
source: string;
|
|
176
|
+
target: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* @internal 收到客户端返回action query的数据和商户的配置
|
|
180
|
+
*/
|
|
181
|
+
renderComponent: {
|
|
182
|
+
sessionResult?: Record<string, unknown>;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* @internal 心跳事件
|
|
186
|
+
*/
|
|
187
|
+
appHeartBeat: {
|
|
188
|
+
success: boolean;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* @internal 客户端 展示toast弹窗
|
|
192
|
+
*/
|
|
193
|
+
showToast: {
|
|
194
|
+
icon: string;
|
|
195
|
+
message: string;
|
|
196
|
+
source: string;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* @internal 客户端eventCallback 事件
|
|
200
|
+
*/
|
|
201
|
+
onEventCallback: {
|
|
202
|
+
code: string;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* @internal 发送回调码事件
|
|
206
|
+
*/
|
|
207
|
+
onSubmitPayCallback: CallbackReturnData;
|
|
208
|
+
/**
|
|
209
|
+
* @internal 重置收银台
|
|
210
|
+
*/
|
|
211
|
+
reset: Record<string, never>;
|
|
212
|
+
/**
|
|
213
|
+
* @internal 销毁收银台
|
|
214
|
+
*/
|
|
215
|
+
destroy: Record<string, never>;
|
|
216
|
+
/**
|
|
217
|
+
* @internal 关闭收银台
|
|
218
|
+
*/
|
|
219
|
+
onClose: Record<string, never>;
|
|
220
|
+
/**
|
|
221
|
+
* @internal 重定向
|
|
222
|
+
*/
|
|
223
|
+
onRedirect: {
|
|
224
|
+
normalUrl: string;
|
|
225
|
+
isDestroy: boolean;
|
|
226
|
+
needReset: boolean;
|
|
227
|
+
};
|
|
147
228
|
}
|
|
148
229
|
|
|
149
230
|
/**
|
|
@@ -178,6 +259,8 @@ declare interface AntomErrorResponse {
|
|
|
178
259
|
extendInfo?: Record<string, any>;
|
|
179
260
|
}
|
|
180
261
|
|
|
262
|
+
export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
263
|
+
|
|
181
264
|
/**
|
|
182
265
|
* 给中间页使用的桥接事件类型
|
|
183
266
|
* @internal 内部使用,不暴露到外部
|
|
@@ -185,15 +268,13 @@ declare interface AntomErrorResponse {
|
|
|
185
268
|
export declare interface AntomMiddlePageEventMap extends AntomBridgeEventMap {
|
|
186
269
|
/**
|
|
187
270
|
* @description 3DS流程完成
|
|
271
|
+
* @deprecated 使用auto_close_modal
|
|
188
272
|
*/
|
|
189
273
|
three_ds_end: void;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
* @internal 内部使用,不暴露到外部
|
|
195
|
-
*/
|
|
196
|
-
export declare interface AntomModalEventMap extends AntomBridgeEventMap {
|
|
274
|
+
/**
|
|
275
|
+
* @description 正常结束自动关闭事件
|
|
276
|
+
*/
|
|
277
|
+
auto_close_modal: void;
|
|
197
278
|
}
|
|
198
279
|
|
|
199
280
|
/**
|
|
@@ -214,6 +295,11 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
214
295
|
* @description 更新配置
|
|
215
296
|
*/
|
|
216
297
|
updateConfig(config: Partial<BaseFactoryConfig>): void;
|
|
298
|
+
/**
|
|
299
|
+
* @internal
|
|
300
|
+
* @param payload
|
|
301
|
+
*/
|
|
302
|
+
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
217
303
|
/**
|
|
218
304
|
* @internal
|
|
219
305
|
* 这个方法为内部调用方法
|
|
@@ -224,9 +310,11 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
224
310
|
getContentWindow: () => Window;
|
|
225
311
|
}>;
|
|
226
312
|
elements(): Elements;
|
|
313
|
+
createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
227
314
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
228
315
|
createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
229
316
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
317
|
+
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
230
318
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
231
319
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
232
320
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
@@ -283,6 +371,22 @@ export declare const AntomSDKErrorCodes: {
|
|
|
283
371
|
* @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
|
|
284
372
|
*/
|
|
285
373
|
readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
|
|
374
|
+
/**
|
|
375
|
+
* @description checkout 页面未加载成功,不允许 updateConfig
|
|
376
|
+
*/
|
|
377
|
+
readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
|
|
378
|
+
/**
|
|
379
|
+
* @description 支付进行中,不允许更新金额
|
|
380
|
+
*/
|
|
381
|
+
readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
|
|
382
|
+
/**
|
|
383
|
+
* @description 金额不能为空
|
|
384
|
+
*/
|
|
385
|
+
readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
|
|
386
|
+
/**
|
|
387
|
+
* @description 金额格式非法(仅允许整数和小数)
|
|
388
|
+
*/
|
|
389
|
+
readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
|
|
286
390
|
readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
|
|
287
391
|
readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
|
|
288
392
|
readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
|
|
@@ -299,6 +403,11 @@ export declare const AntomSDKErrorCodes: {
|
|
|
299
403
|
readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
|
|
300
404
|
readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
|
|
301
405
|
readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
|
|
406
|
+
readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
|
|
407
|
+
readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
|
|
408
|
+
/**
|
|
409
|
+
* @description 是否需要更换 session 重试
|
|
410
|
+
*/
|
|
302
411
|
readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
|
|
303
412
|
readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
|
|
304
413
|
readonly API_MISS_PARAMS: "API_MISS_PARAMS";
|
|
@@ -316,29 +425,23 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
|
|
|
316
425
|
|
|
317
426
|
export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
|
|
318
427
|
|
|
319
|
-
declare
|
|
320
|
-
requestType: 'fetch' | 'xhr';
|
|
321
|
-
time: number;
|
|
322
|
-
url: string;
|
|
323
|
-
isSuccess?: boolean;
|
|
324
|
-
error?: unknown;
|
|
325
|
-
status?: number;
|
|
326
|
-
type?: string;
|
|
327
|
-
method?: string;
|
|
328
|
-
traceId?: string;
|
|
329
|
-
errorCode?: string | number;
|
|
330
|
-
errorMsg?: string;
|
|
331
|
-
}
|
|
428
|
+
export declare type AntomVariables = 'content-primary' | 'content-secondary' | 'content-tertiary' | 'content-quaternary' | 'background-primary' | 'background-secondary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-secondary' | 'border-disable' | 'action-normal' | 'action-hover' | 'action-disable' | 'action-secondary' | 'state-failure' | 'state-warning' | 'state-success' | 'state-info' | 'state-marketing' | 'state-conventional' | 'radius-backup' | 'radius-module' | 'radius-component' | 'radius-button' | 'wrapper-padding' | 'stroke-default' | 'stroke-active' | 'fontFamily';
|
|
332
429
|
|
|
430
|
+
/**
|
|
431
|
+
* @description SDK UI组件的外观配置。
|
|
432
|
+
* 控制主题、CSS变量、布局规则及显示设置。
|
|
433
|
+
* @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
|
|
434
|
+
*/
|
|
333
435
|
declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
|
|
334
436
|
theme?: Props['theme'];
|
|
335
437
|
variables?: PartialSpeKey<Props['variables'], string>;
|
|
336
438
|
rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
|
|
337
439
|
displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
|
|
338
440
|
layout?: Props['layout'];
|
|
441
|
+
fonts?: FontSource[];
|
|
339
442
|
}
|
|
340
443
|
|
|
341
|
-
declare type AppearanceSetting = {
|
|
444
|
+
export declare type AppearanceSetting = {
|
|
342
445
|
displaySetting: Record<'showCardBrandIcon', boolean>;
|
|
343
446
|
theme: 'light' | 'dark';
|
|
344
447
|
layout: 'accordion' | 'tabs';
|
|
@@ -632,6 +735,7 @@ declare class AxiosHeaders {
|
|
|
632
735
|
rewrite?: boolean | AxiosHeaderMatcher
|
|
633
736
|
): AxiosHeaders;
|
|
634
737
|
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
|
|
738
|
+
set(headers?: Iterable<[string, AxiosHeaderValue]>, rewrite?: boolean): AxiosHeaders;
|
|
635
739
|
|
|
636
740
|
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
637
741
|
get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
|
|
@@ -692,6 +796,8 @@ declare class AxiosHeaders {
|
|
|
692
796
|
|
|
693
797
|
getSetCookie(): string[];
|
|
694
798
|
|
|
799
|
+
toString(): string;
|
|
800
|
+
|
|
695
801
|
[Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
|
|
696
802
|
}
|
|
697
803
|
|
|
@@ -748,6 +854,16 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
748
854
|
merged: AppConfig;
|
|
749
855
|
updated: Partial<AppConfig>;
|
|
750
856
|
};
|
|
857
|
+
/**
|
|
858
|
+
* 更新配置时的回复事件,包含可能发生的错误信息。
|
|
859
|
+
* 如果 error 为 undefined,则表示没有错误发生。
|
|
860
|
+
*/
|
|
861
|
+
"OPENSDK@UPDATE_CONFIG_REPLY": {
|
|
862
|
+
/**
|
|
863
|
+
* 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
|
|
864
|
+
*/
|
|
865
|
+
error?: ErrorPayload<string>;
|
|
866
|
+
} | undefined;
|
|
751
867
|
/**
|
|
752
868
|
* @internal 内部事件 不暴露给商户
|
|
753
869
|
*/
|
|
@@ -786,6 +902,10 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
786
902
|
* @internal 内部事件 不暴露给商户
|
|
787
903
|
*/
|
|
788
904
|
"OPENSDK@TRANSFER_MODAL_APPEARANCE": Appearance;
|
|
905
|
+
/**
|
|
906
|
+
* @internal 内部事件 不暴露给商户
|
|
907
|
+
*/
|
|
908
|
+
"OPENSDK@TRANSFER_MODAL_INITIALDATA": Record<string, any>;
|
|
789
909
|
/**
|
|
790
910
|
* @internal 内部事件 不暴露给商户
|
|
791
911
|
*/
|
|
@@ -813,6 +933,12 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
813
933
|
* @internal 内部高度变化,同步到sdk更新iframe
|
|
814
934
|
*/
|
|
815
935
|
"OPENSDK@HEIGHT_UPDATE": number;
|
|
936
|
+
/**
|
|
937
|
+
* @internal 内部销毁元素,同步到sdk销毁元素
|
|
938
|
+
*/
|
|
939
|
+
"OPENSDK@DESTROY_ELEMENT": {
|
|
940
|
+
elementKey: string;
|
|
941
|
+
};
|
|
816
942
|
}
|
|
817
943
|
|
|
818
944
|
declare interface BaseConfig {
|
|
@@ -837,6 +963,12 @@ declare interface BaseConfig {
|
|
|
837
963
|
* @internal 不透出到用户
|
|
838
964
|
*/
|
|
839
965
|
version: string;
|
|
966
|
+
/**
|
|
967
|
+
* @description iframe 的 color-scheme CSS 属性,用于阻止商户页面的 color-scheme 传播到 iframe
|
|
968
|
+
* 默认值 'light dark',确保 iframe 透明背景在商户页面设置 color-scheme: dark 时正常工作
|
|
969
|
+
* @internal 内部使用,不暴露给商户
|
|
970
|
+
*/
|
|
971
|
+
colorScheme?: string;
|
|
840
972
|
}
|
|
841
973
|
|
|
842
974
|
/**
|
|
@@ -879,12 +1011,14 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
879
1011
|
* @internal 内部使用
|
|
880
1012
|
*/
|
|
881
1013
|
iframe: HTMLIFrameElement | null;
|
|
882
|
-
status:
|
|
1014
|
+
status: ElementStatus;
|
|
883
1015
|
/**
|
|
884
1016
|
* @description 等待发送的时间
|
|
885
1017
|
* @internal 外部不要访问
|
|
886
1018
|
*/
|
|
887
1019
|
private cachedSend;
|
|
1020
|
+
/** Reuses the pending reply for concurrent submit calls. */
|
|
1021
|
+
private submitPromise?;
|
|
888
1022
|
constructor(name: string, config: WithAppURL<Config>);
|
|
889
1023
|
/**
|
|
890
1024
|
* @internal 外部不能直接调用
|
|
@@ -895,10 +1029,16 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
895
1029
|
* @internal 外部不能直接调用
|
|
896
1030
|
*/
|
|
897
1031
|
setup(): Promise<Partial<BaseElementAppConfig> | undefined>;
|
|
1032
|
+
/** Races merchant setup against destruction to stop the mount flow immediately. */
|
|
1033
|
+
private _setup;
|
|
1034
|
+
/**
|
|
1035
|
+
* @internal Checks whether this element is an instance of the given element class.
|
|
1036
|
+
*/
|
|
1037
|
+
is<T extends iBaseElementClass>(eleCls: T): this is InstanceType<T>;
|
|
898
1038
|
/**
|
|
899
|
-
* @param {
|
|
1039
|
+
* @param {HTMLElement} container
|
|
900
1040
|
*/
|
|
901
|
-
mount(
|
|
1041
|
+
mount(container: HTMLElement): Promise<void>;
|
|
902
1042
|
/**
|
|
903
1043
|
* @description 内部使用,挂载iframe
|
|
904
1044
|
* @internal 外部不能直接调用
|
|
@@ -908,7 +1048,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
908
1048
|
* 更新webapp配置
|
|
909
1049
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
910
1050
|
*/
|
|
911
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
1051
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
|
|
912
1052
|
/**
|
|
913
1053
|
* 卸载元素
|
|
914
1054
|
*/
|
|
@@ -968,24 +1108,32 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
968
1108
|
* @param fn 构建回调
|
|
969
1109
|
* @internal
|
|
970
1110
|
*/
|
|
971
|
-
_addHook(hookName: 'ondestroy', fn: () => void): () => void;
|
|
1111
|
+
_addHook(hookName: 'ondestroy', fn: (preStatus: ElementStatus) => void): () => void;
|
|
972
1112
|
}
|
|
973
1113
|
|
|
974
1114
|
declare interface BaseElementAppConfig {
|
|
1115
|
+
/**
|
|
1116
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
1117
|
+
*/
|
|
975
1118
|
locale?: string;
|
|
976
1119
|
/**
|
|
977
|
-
* @internal
|
|
1120
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
978
1121
|
*/
|
|
979
1122
|
env?: 'sandbox' | 'prod';
|
|
980
1123
|
/**
|
|
981
|
-
* @description
|
|
1124
|
+
* @description 商户的唯一标识,用于监控
|
|
982
1125
|
* @internal 不透出到用户
|
|
983
1126
|
*/
|
|
984
1127
|
merchantId?: string;
|
|
985
1128
|
[key: string]: any;
|
|
986
1129
|
}
|
|
987
1130
|
|
|
988
|
-
declare interface BaseElementConfig<T extends BaseElementAppConfig =
|
|
1131
|
+
declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
|
|
1132
|
+
/**
|
|
1133
|
+
* @description Session id forwarded to the iframe as the track_id query parameter.
|
|
1134
|
+
* @internal Internal element config only.
|
|
1135
|
+
*/
|
|
1136
|
+
trackId?: string;
|
|
989
1137
|
appConfig: T;
|
|
990
1138
|
elementMode: ElementMode;
|
|
991
1139
|
}
|
|
@@ -1081,6 +1229,7 @@ declare abstract class BaseFactory {
|
|
|
1081
1229
|
*/
|
|
1082
1230
|
constructor(config: BaseFactoryConfig);
|
|
1083
1231
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
1232
|
+
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
1084
1233
|
/**
|
|
1085
1234
|
* @description 子类必须实现此方法,返回工厂可用的元素类列表
|
|
1086
1235
|
* @internal
|
|
@@ -1091,7 +1240,7 @@ declare abstract class BaseFactory {
|
|
|
1091
1240
|
*/
|
|
1092
1241
|
init(): Promise<this>;
|
|
1093
1242
|
/**
|
|
1094
|
-
* @description 默认情况下,生成元素的key为elementType
|
|
1243
|
+
* @description 默认情况下,生成元素的key为elementType,如有特殊需求,可重写此方法,key请以${elementType}开头,如elementType是payment则key可以是paymentXXX或者payment
|
|
1095
1244
|
* @internal
|
|
1096
1245
|
*/
|
|
1097
1246
|
protected generateElementKey(elementType: string, _options?: Partial<BaseElementAppConfig>): string;
|
|
@@ -1167,26 +1316,6 @@ declare interface BaseFactoryConfig extends BaseConfig {
|
|
|
1167
1316
|
trackerCode?: string;
|
|
1168
1317
|
}
|
|
1169
1318
|
|
|
1170
|
-
declare type BaseInfo = BrowserInfo & DeviceInfo & NetworkInfo & LocationInfo & EnvInfo & OSInfo & {
|
|
1171
|
-
sdk?: string;
|
|
1172
|
-
marmotId?: string;
|
|
1173
|
-
compatibleAppId?: string;
|
|
1174
|
-
deviceId?: string;
|
|
1175
|
-
userId?: string;
|
|
1176
|
-
programVer?: string;
|
|
1177
|
-
language?: string;
|
|
1178
|
-
timezone?: string;
|
|
1179
|
-
bizType?: string;
|
|
1180
|
-
productId?: string;
|
|
1181
|
-
clientId?: string;
|
|
1182
|
-
visibleState?: 'visible' | 'hidden' | 'app-visible' | 'page-visible' | 'app-hidden' | 'page-hidden';
|
|
1183
|
-
};
|
|
1184
|
-
|
|
1185
|
-
declare interface BaseInfoPlugin {
|
|
1186
|
-
getAppName?(): Promise<string | undefined>;
|
|
1187
|
-
getDefaultExtraInfo?(): Promise<BaseInfo>;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
1319
|
/**
|
|
1191
1320
|
* @description 主元素,可以独立提交
|
|
1192
1321
|
*/
|
|
@@ -1206,6 +1335,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
1206
1335
|
_submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
|
|
1207
1336
|
}
|
|
1208
1337
|
|
|
1338
|
+
/**
|
|
1339
|
+
* @description 打开模态框的配置项。
|
|
1340
|
+
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1341
|
+
*/
|
|
1209
1342
|
declare interface BaseOpenModalConfig {
|
|
1210
1343
|
/**
|
|
1211
1344
|
* 无需手动传递,app的唯一scope
|
|
@@ -1229,74 +1362,23 @@ declare interface BaseOpenModalConfig {
|
|
|
1229
1362
|
onClose?: () => void;
|
|
1230
1363
|
url: string;
|
|
1231
1364
|
/**
|
|
1232
|
-
*
|
|
1365
|
+
* @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
|
|
1233
1366
|
*/
|
|
1234
1367
|
closeConfirm?: boolean;
|
|
1368
|
+
/**
|
|
1369
|
+
* @description 需要同步的外观配置
|
|
1370
|
+
*/
|
|
1235
1371
|
appearance?: Appearance;
|
|
1372
|
+
/**
|
|
1373
|
+
* @description 需要传递的初始化数据
|
|
1374
|
+
*/
|
|
1375
|
+
initialData?: Record<string, any>;
|
|
1376
|
+
/**
|
|
1377
|
+
* @description 无需手动传递, 模态框的唯一标识
|
|
1378
|
+
*/
|
|
1379
|
+
modalId?: string;
|
|
1236
1380
|
}
|
|
1237
1381
|
|
|
1238
|
-
declare type BehaviorConfig = {
|
|
1239
|
-
enableConsole?: boolean;
|
|
1240
|
-
};
|
|
1241
|
-
|
|
1242
|
-
declare interface BehaviorData {
|
|
1243
|
-
type: string;
|
|
1244
|
-
data: {
|
|
1245
|
-
msg?: string | null;
|
|
1246
|
-
from?: string;
|
|
1247
|
-
to?: string;
|
|
1248
|
-
};
|
|
1249
|
-
timestamp: number;
|
|
1250
|
-
times?: number;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
declare type BlankMonitorConfig = {
|
|
1254
|
-
selector?: string | string[];
|
|
1255
|
-
delay?: number | (() => number);
|
|
1256
|
-
persistent?: boolean;
|
|
1257
|
-
};
|
|
1258
|
-
|
|
1259
|
-
declare interface BrowserInfo {
|
|
1260
|
-
title?: string;
|
|
1261
|
-
fullUrl?: string;
|
|
1262
|
-
url?: string;
|
|
1263
|
-
referrer?: string;
|
|
1264
|
-
domCnt?: number;
|
|
1265
|
-
delay?: number;
|
|
1266
|
-
scrollTop?: number;
|
|
1267
|
-
lastAction?: string;
|
|
1268
|
-
sessionId?: string;
|
|
1269
|
-
containerPageSessionId?: string;
|
|
1270
|
-
containerSessionId?: string;
|
|
1271
|
-
ua?: string;
|
|
1272
|
-
browser?: string;
|
|
1273
|
-
cCoreVer?: string;
|
|
1274
|
-
assetsVer?: string;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
declare type C = {
|
|
1278
|
-
c1?: string;
|
|
1279
|
-
c2?: string;
|
|
1280
|
-
c3?: string;
|
|
1281
|
-
c4?: string;
|
|
1282
|
-
c5?: string;
|
|
1283
|
-
c6?: string;
|
|
1284
|
-
c7?: string;
|
|
1285
|
-
c8?: string;
|
|
1286
|
-
c9?: string;
|
|
1287
|
-
c10?: string;
|
|
1288
|
-
c11?: string;
|
|
1289
|
-
c12?: string;
|
|
1290
|
-
c13?: string;
|
|
1291
|
-
c14?: string;
|
|
1292
|
-
c15?: string;
|
|
1293
|
-
c16?: string;
|
|
1294
|
-
c17?: string;
|
|
1295
|
-
c18?: string;
|
|
1296
|
-
c19?: string;
|
|
1297
|
-
c20?: string;
|
|
1298
|
-
};
|
|
1299
|
-
|
|
1300
1382
|
/**
|
|
1301
1383
|
* @description C2P标识
|
|
1302
1384
|
*/
|
|
@@ -1330,6 +1412,42 @@ declare interface C2PProps {
|
|
|
1330
1412
|
merchantTransactionId?: string;
|
|
1331
1413
|
}
|
|
1332
1414
|
|
|
1415
|
+
/**
|
|
1416
|
+
* @description native回调错误信息格式
|
|
1417
|
+
* @internal
|
|
1418
|
+
*/
|
|
1419
|
+
export declare interface CallbackErrorInfo {
|
|
1420
|
+
code: string;
|
|
1421
|
+
message?: string;
|
|
1422
|
+
needChangeSessionForRetry?: boolean;
|
|
1423
|
+
traceId?: string;
|
|
1424
|
+
context?: string;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* @description native回调返回数据
|
|
1429
|
+
* @internal
|
|
1430
|
+
*/
|
|
1431
|
+
export declare interface CallbackReturnData {
|
|
1432
|
+
status?: string;
|
|
1433
|
+
userCanceled3D?: boolean;
|
|
1434
|
+
isExposed?: boolean;
|
|
1435
|
+
error?: CallbackErrorInfo;
|
|
1436
|
+
session?: {
|
|
1437
|
+
nextAction?: CallbackSessionNextAction;
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* @description native回调会话下一步操作,包含了回调的url
|
|
1443
|
+
* @internal
|
|
1444
|
+
*/
|
|
1445
|
+
export declare interface CallbackSessionNextAction {
|
|
1446
|
+
normalUrl?: string;
|
|
1447
|
+
schemeUrl?: string;
|
|
1448
|
+
applinkUrl?: string;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1333
1451
|
declare interface CardIssuerAuthentication {
|
|
1334
1452
|
/**
|
|
1335
1453
|
* @description 卡售卖单元
|
|
@@ -1747,7 +1865,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1747
1865
|
/**
|
|
1748
1866
|
* @description 物流信息, 包含物流地址和物流费
|
|
1749
1867
|
*/
|
|
1750
|
-
shippingInfo?:
|
|
1868
|
+
shippingInfo?: ShippingInfo_2;
|
|
1751
1869
|
/**
|
|
1752
1870
|
* @description 用户已绑资产信息
|
|
1753
1871
|
*/
|
|
@@ -1780,28 +1898,6 @@ declare interface ChargeInfo {
|
|
|
1780
1898
|
chargeActualAmountView?: PaymentView;
|
|
1781
1899
|
}
|
|
1782
1900
|
|
|
1783
|
-
/** click 事件 resolve 参数 */
|
|
1784
|
-
export declare interface ClickResolveOptions {
|
|
1785
|
-
amount?: {
|
|
1786
|
-
currency: string;
|
|
1787
|
-
value: string;
|
|
1788
|
-
};
|
|
1789
|
-
shippingAddressRequired?: boolean;
|
|
1790
|
-
allowedShippingCountries?: string[];
|
|
1791
|
-
shippingRates?: Array<{
|
|
1792
|
-
id: string;
|
|
1793
|
-
displayName: string;
|
|
1794
|
-
amount: string;
|
|
1795
|
-
}>;
|
|
1796
|
-
lineItems?: Array<{
|
|
1797
|
-
name: string;
|
|
1798
|
-
amount: string;
|
|
1799
|
-
}>;
|
|
1800
|
-
business?: {
|
|
1801
|
-
name: string;
|
|
1802
|
-
};
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
1901
|
declare interface CodeFormView {
|
|
1806
1902
|
/**
|
|
1807
1903
|
* @description title
|
|
@@ -1827,6 +1923,11 @@ declare interface CodeFormView {
|
|
|
1827
1923
|
* @description label
|
|
1828
1924
|
*/
|
|
1829
1925
|
label?: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
1928
|
+
* when appLinkUrlForWeb is populated
|
|
1929
|
+
*/
|
|
1930
|
+
paymentGuideInfo?: PaymentGuideInfo;
|
|
1830
1931
|
/**
|
|
1831
1932
|
* @description 提醒事项
|
|
1832
1933
|
*/
|
|
@@ -1843,6 +1944,10 @@ declare interface CodeFormView {
|
|
|
1843
1944
|
* @description 码过期时间
|
|
1844
1945
|
*/
|
|
1845
1946
|
codeExpireTime?: string;
|
|
1947
|
+
/**
|
|
1948
|
+
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
1949
|
+
*/
|
|
1950
|
+
qrcodeConfig?: QrCodeConfig;
|
|
1846
1951
|
}
|
|
1847
1952
|
|
|
1848
1953
|
/**
|
|
@@ -2310,68 +2415,7 @@ declare interface ComIpayIexpprodServiceFacadeCommonPromotionInfo {
|
|
|
2310
2415
|
extendInfo?: Record<string, string>;
|
|
2311
2416
|
}
|
|
2312
2417
|
|
|
2313
|
-
declare
|
|
2314
|
-
private mdata;
|
|
2315
|
-
initi(options: OriginTrackerInitOptions & {
|
|
2316
|
-
performance?: boolean;
|
|
2317
|
-
error?: boolean;
|
|
2318
|
-
}): Promise<boolean>;
|
|
2319
|
-
set(options: Record<string, any>): void;
|
|
2320
|
-
protected getDefaultExtraInfo(): Promise<{
|
|
2321
|
-
title?: string | undefined;
|
|
2322
|
-
fullUrl?: string | undefined;
|
|
2323
|
-
url?: string | undefined;
|
|
2324
|
-
referrer?: string | undefined;
|
|
2325
|
-
domCnt?: number | undefined;
|
|
2326
|
-
delay?: number | undefined;
|
|
2327
|
-
scrollTop?: number | undefined;
|
|
2328
|
-
lastAction?: string | undefined;
|
|
2329
|
-
sessionId?: string | undefined;
|
|
2330
|
-
containerPageSessionId?: string | undefined;
|
|
2331
|
-
containerSessionId?: string | undefined;
|
|
2332
|
-
ua?: string | undefined;
|
|
2333
|
-
browser?: string | undefined;
|
|
2334
|
-
cCoreVer?: string | undefined;
|
|
2335
|
-
assetsVer?: string | undefined;
|
|
2336
|
-
device?: string | undefined;
|
|
2337
|
-
deviceType?: string | undefined;
|
|
2338
|
-
deviceBrand?: string | undefined;
|
|
2339
|
-
deviceModel?: string | undefined;
|
|
2340
|
-
screenWidth?: number | undefined;
|
|
2341
|
-
screenHeight?: number | undefined;
|
|
2342
|
-
contentHeight?: number | undefined;
|
|
2343
|
-
pixelRatio?: number | undefined;
|
|
2344
|
-
cClient?: string | undefined;
|
|
2345
|
-
networkType?: string | undefined;
|
|
2346
|
-
isp?: string | undefined;
|
|
2347
|
-
ip?: string | undefined;
|
|
2348
|
-
countryName?: string | undefined;
|
|
2349
|
-
cityName?: string | undefined;
|
|
2350
|
-
provinceName?: string | undefined;
|
|
2351
|
-
area?: string | undefined;
|
|
2352
|
-
env?: Env_2 | undefined;
|
|
2353
|
-
sprintId?: string | undefined;
|
|
2354
|
-
container?: string | undefined;
|
|
2355
|
-
cOfflineVer?: string | undefined;
|
|
2356
|
-
serverIp?: string | undefined;
|
|
2357
|
-
serverEnv?: string | undefined;
|
|
2358
|
-
canaryFlag?: string | undefined;
|
|
2359
|
-
os?: string | undefined;
|
|
2360
|
-
osVer?: string | undefined;
|
|
2361
|
-
sdk?: string | undefined;
|
|
2362
|
-
marmotId?: string | undefined;
|
|
2363
|
-
compatibleAppId?: string | undefined;
|
|
2364
|
-
deviceId?: string | undefined;
|
|
2365
|
-
userId?: string | undefined;
|
|
2366
|
-
programVer?: string | undefined;
|
|
2367
|
-
language?: string | undefined;
|
|
2368
|
-
timezone?: string | undefined;
|
|
2369
|
-
bizType?: string | undefined;
|
|
2370
|
-
productId?: string | undefined;
|
|
2371
|
-
clientId?: string | undefined;
|
|
2372
|
-
visibleState?: "hidden" | "visible" | "app-visible" | "page-visible" | "app-hidden" | "page-hidden" | undefined;
|
|
2373
|
-
}>;
|
|
2374
|
-
}
|
|
2418
|
+
declare type CompatibleTrackerFullOptions = ConstructorParameters<typeof CompatibleTrackerFull>[0];
|
|
2375
2419
|
|
|
2376
2420
|
/**
|
|
2377
2421
|
* @description googlePay createPaymentSession 入参
|
|
@@ -2396,13 +2440,17 @@ export declare interface ConfirmCardSetupOptions {
|
|
|
2396
2440
|
redirect?: 'always' | 'if_required';
|
|
2397
2441
|
}
|
|
2398
2442
|
|
|
2399
|
-
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'
|
|
2443
|
+
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'>, PaymentSubmitParams {
|
|
2400
2444
|
sessionData: string;
|
|
2401
2445
|
/**
|
|
2402
|
-
* @description 传入已挂载的 CVVElement
|
|
2446
|
+
* @description 传入已挂载的 CVVElement / PaymentElement / Elements 实例,不传则使用无 UI 自动提交模式
|
|
2403
2447
|
*/
|
|
2404
2448
|
elements?: BaseMainElement | BaseElements;
|
|
2405
2449
|
appearance?: CVVAppearance;
|
|
2450
|
+
/**
|
|
2451
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
2452
|
+
*/
|
|
2453
|
+
params?: Record<string, unknown>;
|
|
2406
2454
|
}
|
|
2407
2455
|
|
|
2408
2456
|
/**
|
|
@@ -2474,6 +2522,13 @@ declare namespace CSS_2 {
|
|
|
2474
2522
|
}
|
|
2475
2523
|
}
|
|
2476
2524
|
|
|
2525
|
+
/**
|
|
2526
|
+
* CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
|
|
2527
|
+
*/
|
|
2528
|
+
declare interface CssFontSource {
|
|
2529
|
+
cssSrc: string;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2477
2532
|
declare interface CurrencyInfo {
|
|
2478
2533
|
/**
|
|
2479
2534
|
* @description Getter method for property <tt>currencyCode</tt>.
|
|
@@ -2519,15 +2574,21 @@ declare interface CustomerFxInfo {
|
|
|
2519
2574
|
}
|
|
2520
2575
|
|
|
2521
2576
|
/**
|
|
2522
|
-
*
|
|
2577
|
+
* 自定义字体源 — 通过 @font-face 加载自托管字体
|
|
2523
2578
|
*/
|
|
2524
|
-
declare
|
|
2579
|
+
declare interface CustomFontSource {
|
|
2580
|
+
family: string;
|
|
2581
|
+
src: string;
|
|
2582
|
+
weight?: string;
|
|
2583
|
+
style?: string;
|
|
2584
|
+
unicodeRange?: string;
|
|
2585
|
+
}
|
|
2525
2586
|
|
|
2526
2587
|
/**
|
|
2527
2588
|
* @public
|
|
2528
2589
|
* @description CVV element app config type
|
|
2529
2590
|
*/
|
|
2530
|
-
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance
|
|
2591
|
+
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
|
|
2531
2592
|
/**
|
|
2532
2593
|
* @description sessionData
|
|
2533
2594
|
*/
|
|
@@ -2565,7 +2626,8 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2565
2626
|
|
|
2566
2627
|
export declare type CVVAppearanceProps = {
|
|
2567
2628
|
theme: AntomTheme;
|
|
2568
|
-
variables:
|
|
2629
|
+
variables: AntomVariables;
|
|
2630
|
+
fonts?: FontSource[];
|
|
2569
2631
|
};
|
|
2570
2632
|
|
|
2571
2633
|
/**
|
|
@@ -2657,6 +2719,10 @@ export declare interface CVVSubmitParams {
|
|
|
2657
2719
|
* 重定向策略
|
|
2658
2720
|
*/
|
|
2659
2721
|
redirect?: 'always' | 'if_required';
|
|
2722
|
+
/**
|
|
2723
|
+
* 集成用户自定义信息(如 cardHolderName)
|
|
2724
|
+
*/
|
|
2725
|
+
params?: Record<string, unknown>;
|
|
2660
2726
|
}
|
|
2661
2727
|
|
|
2662
2728
|
declare interface DanaSofCouponInfo {
|
|
@@ -3234,18 +3300,6 @@ declare interface DeliveryEstimateInfo {
|
|
|
3234
3300
|
value?: number;
|
|
3235
3301
|
}
|
|
3236
3302
|
|
|
3237
|
-
declare interface DeviceInfo {
|
|
3238
|
-
device?: string;
|
|
3239
|
-
deviceType?: string;
|
|
3240
|
-
deviceBrand?: string;
|
|
3241
|
-
deviceModel?: string;
|
|
3242
|
-
screenWidth?: number;
|
|
3243
|
-
screenHeight?: number;
|
|
3244
|
-
contentHeight?: number;
|
|
3245
|
-
pixelRatio?: number;
|
|
3246
|
-
cClient?: string;
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
3303
|
/**
|
|
3250
3304
|
* @description 立减型营销信息
|
|
3251
3305
|
*/
|
|
@@ -3291,29 +3345,6 @@ declare interface DisplayItem {
|
|
|
3291
3345
|
status?: string;
|
|
3292
3346
|
}
|
|
3293
3347
|
|
|
3294
|
-
declare type DMC = {
|
|
3295
|
-
d1?: number | string;
|
|
3296
|
-
d2?: number | string;
|
|
3297
|
-
d3?: number | string;
|
|
3298
|
-
d4?: number | string;
|
|
3299
|
-
d5?: number | string;
|
|
3300
|
-
d6?: number | string;
|
|
3301
|
-
d7?: number | string;
|
|
3302
|
-
d8?: number | string;
|
|
3303
|
-
d9?: number | string;
|
|
3304
|
-
d10?: number | string;
|
|
3305
|
-
d11?: number | string;
|
|
3306
|
-
d12?: number | string;
|
|
3307
|
-
d13?: number | string;
|
|
3308
|
-
d14?: number | string;
|
|
3309
|
-
d15?: number | string;
|
|
3310
|
-
d16?: number | string;
|
|
3311
|
-
d17?: number | string;
|
|
3312
|
-
d18?: number | string;
|
|
3313
|
-
d19?: number | string;
|
|
3314
|
-
d20?: number | string;
|
|
3315
|
-
} & C & M;
|
|
3316
|
-
|
|
3317
3348
|
/**
|
|
3318
3349
|
* @description 元素列表项类型
|
|
3319
3350
|
*/
|
|
@@ -3375,21 +3406,9 @@ declare class Elements extends BaseElements {
|
|
|
3375
3406
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3376
3407
|
}
|
|
3377
3408
|
|
|
3378
|
-
declare type
|
|
3379
|
-
|
|
3380
|
-
declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
|
|
3409
|
+
declare type ElementStatus = 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed' | 'unmounted';
|
|
3381
3410
|
|
|
3382
|
-
declare type
|
|
3383
|
-
|
|
3384
|
-
declare interface EnvInfo {
|
|
3385
|
-
env?: Env_2;
|
|
3386
|
-
sprintId?: string;
|
|
3387
|
-
container?: string;
|
|
3388
|
-
cOfflineVer?: string;
|
|
3389
|
-
serverIp?: string;
|
|
3390
|
-
serverEnv?: string;
|
|
3391
|
-
canaryFlag?: string;
|
|
3392
|
-
}
|
|
3411
|
+
declare type ElementTypeEnum = 'TEXT' | 'DIGIT_6' | 'DIGIT_18' | 'DIGIT_32' | 'DIGIT_11' | 'DIGIT_4' | 'DIGIT_10' | 'CHECKBOX' | 'SELECT' | 'SWITCH' | 'PASSWORD_2' | 'DATE_PICKER' | 'CHECKLIST' | 'ADDRESS' | 'DROPBOX' | 'DIGIT_13' | 'GRIDLIST' | 'TENOR_SELECT_KR' | 'STORELIST' | 'GRIDBANKLIST' | 'SUB_QR_CODE' | 'GRIDBANKTOP' | 'PHONE_TEXT_AREA_CODE' | 'SUPPORTIPPBANKLIST';
|
|
3393
3412
|
|
|
3394
3413
|
/**
|
|
3395
3414
|
* @description 错误上下文对象。参考主站<code>ErrorContext</code>实现。
|
|
@@ -3420,9 +3439,11 @@ declare type ErrorSource = ErrorSource_2;
|
|
|
3420
3439
|
|
|
3421
3440
|
declare type ErrorSource_2 = 'SDK_INTERNAL' | 'SDK_USAGE' | 'APP_RUNTIME' | 'SERVER_API' | 'SYSTEM';
|
|
3422
3441
|
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3442
|
+
/**
|
|
3443
|
+
* @description 工具类型,从类型中排除 undefined。
|
|
3444
|
+
* 如果 T 继承 undefined 则返回 never,否则返回 T。
|
|
3445
|
+
*/
|
|
3446
|
+
declare type ExcludeUndefined<T> = T extends undefined ? never : T;
|
|
3426
3447
|
|
|
3427
3448
|
/**
|
|
3428
3449
|
* @description 卡分期计划
|
|
@@ -3466,6 +3487,22 @@ declare interface ExpCardPlan {
|
|
|
3466
3487
|
* @description 每个月分期利息
|
|
3467
3488
|
*/
|
|
3468
3489
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3490
|
+
/**
|
|
3491
|
+
* @description 分期有效期开始时间
|
|
3492
|
+
*/
|
|
3493
|
+
validStartTime?: string;
|
|
3494
|
+
/**
|
|
3495
|
+
* @description 分期有效期结束时间
|
|
3496
|
+
*/
|
|
3497
|
+
validEndTime?: string;
|
|
3498
|
+
/**
|
|
3499
|
+
* @description 支持的银行信息
|
|
3500
|
+
*
|
|
3501
|
+
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3502
|
+
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3503
|
+
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3504
|
+
*/
|
|
3505
|
+
supportedBank?: ExpSupportIppBank;
|
|
3469
3506
|
}
|
|
3470
3507
|
|
|
3471
3508
|
declare interface ExpInstallmentInfo {
|
|
@@ -3490,12 +3527,18 @@ declare interface ExpPaymentOptionDetail {
|
|
|
3490
3527
|
* @public
|
|
3491
3528
|
* @description Express element app config type
|
|
3492
3529
|
*/
|
|
3493
|
-
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting
|
|
3530
|
+
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
|
|
3494
3531
|
/** payment SessionData */
|
|
3495
3532
|
sessionData?: string;
|
|
3496
3533
|
/** Business division (country/region) */
|
|
3497
3534
|
businessDivision?: string;
|
|
3498
|
-
/**
|
|
3535
|
+
/**
|
|
3536
|
+
* Amount & Currency
|
|
3537
|
+
*
|
|
3538
|
+
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3539
|
+
* Passing amount at creation time is ignored; the initial amount
|
|
3540
|
+
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3541
|
+
*/
|
|
3499
3542
|
amount?: {
|
|
3500
3543
|
currency: string;
|
|
3501
3544
|
value: string;
|
|
@@ -3504,20 +3547,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3504
3547
|
paypal?: PayPalConfig;
|
|
3505
3548
|
/**
|
|
3506
3549
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3507
|
-
* Each payment method can independently set the button display text
|
|
3508
|
-
* Reserved index signature for future payment method integration
|
|
3550
|
+
* Each payment method can independently set the button display text.
|
|
3509
3551
|
*/
|
|
3510
3552
|
buttonType?: {
|
|
3511
3553
|
/** PayPal: paypal | checkout | buynow | pay */
|
|
3512
3554
|
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
3513
3555
|
[method: string]: string | undefined;
|
|
3514
3556
|
};
|
|
3515
|
-
/**
|
|
3557
|
+
/**
|
|
3558
|
+
* Unified height for all buttons (px)
|
|
3559
|
+
*/
|
|
3516
3560
|
buttonHeight?: number;
|
|
3517
3561
|
/**
|
|
3518
3562
|
* Button color theme (following Stripe Express Checkout Element design)
|
|
3519
|
-
* Each payment method can independently set the theme color
|
|
3520
|
-
* Reserved index signature for future payment method integration
|
|
3563
|
+
* Each payment method can independently set the theme color.
|
|
3521
3564
|
*/
|
|
3522
3565
|
buttonTheme?: {
|
|
3523
3566
|
/** PayPal: gold | blue | silver | white | black */
|
|
@@ -3538,6 +3581,15 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3538
3581
|
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3539
3582
|
*/
|
|
3540
3583
|
locale?: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* 是否运行在 Native App 的 WebView 中。
|
|
3586
|
+
* 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
|
|
3587
|
+
*/
|
|
3588
|
+
isNativeAppWebview?: boolean;
|
|
3589
|
+
/** @internal SDK host 侧商户域名,供 Apple Pay merchant validation 使用 */
|
|
3590
|
+
merchantDomain?: string;
|
|
3591
|
+
/** @internal Elements2 历史协议字段,含义同 merchantDomain */
|
|
3592
|
+
doMain?: string;
|
|
3541
3593
|
}
|
|
3542
3594
|
|
|
3543
3595
|
/** cancel 事件负载 */
|
|
@@ -3546,24 +3598,54 @@ export declare interface ExpressCancelEvent {
|
|
|
3546
3598
|
data?: any;
|
|
3547
3599
|
}
|
|
3548
3600
|
|
|
3549
|
-
/** click
|
|
3601
|
+
/** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
|
|
3550
3602
|
export declare interface ExpressClickEvent {
|
|
3551
3603
|
expressPaymentType: string;
|
|
3552
|
-
resolve: (options: ClickResolveOptions) => void;
|
|
3553
3604
|
}
|
|
3554
3605
|
|
|
3555
3606
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3556
3607
|
export declare interface ExpressConfirmData {
|
|
3557
3608
|
expressPaymentType: string;
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3609
|
+
billingDetails?: {
|
|
3610
|
+
name?: string;
|
|
3611
|
+
email?: string;
|
|
3612
|
+
phone?: string;
|
|
3613
|
+
address?: {
|
|
3614
|
+
line1?: string;
|
|
3615
|
+
line2?: string;
|
|
3616
|
+
city?: string;
|
|
3617
|
+
state?: string;
|
|
3618
|
+
postalCode?: string;
|
|
3619
|
+
country?: string;
|
|
3620
|
+
};
|
|
3621
|
+
};
|
|
3622
|
+
shippingAddress?: {
|
|
3623
|
+
name?: string;
|
|
3624
|
+
phone?: string;
|
|
3625
|
+
address?: {
|
|
3626
|
+
line1?: string;
|
|
3627
|
+
line2?: string;
|
|
3628
|
+
city?: string;
|
|
3629
|
+
state?: string;
|
|
3630
|
+
postalCode?: string;
|
|
3631
|
+
country?: string;
|
|
3632
|
+
};
|
|
3633
|
+
};
|
|
3634
|
+
/** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
|
|
3635
|
+
paymentData?: unknown;
|
|
3636
|
+
/**
|
|
3637
|
+
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3638
|
+
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3639
|
+
*/
|
|
3640
|
+
paymentFailed: () => void;
|
|
3562
3641
|
}
|
|
3563
3642
|
|
|
3564
3643
|
/**
|
|
3565
3644
|
* @public
|
|
3566
3645
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
3646
|
+
*
|
|
3647
|
+
* Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
|
|
3648
|
+
* AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
|
|
3567
3649
|
*/
|
|
3568
3650
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3569
3651
|
static elementType: string;
|
|
@@ -3571,15 +3653,48 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3571
3653
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3572
3654
|
*/
|
|
3573
3655
|
private _callbacks;
|
|
3656
|
+
/** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
|
|
3657
|
+
private _renderData;
|
|
3658
|
+
/**
|
|
3659
|
+
* 构造时传入的初始金额。cleanAppConfig 已剔除 amount,setup 阶段透传给 iframe(PayPal 按钮首屏需要)
|
|
3660
|
+
* 与 PayPal channelClientId 查询仍需读它;运行时改额只能走 updateConfig。
|
|
3661
|
+
*/
|
|
3662
|
+
private _initialAmount;
|
|
3663
|
+
/**
|
|
3664
|
+
* 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
|
|
3665
|
+
* bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
|
|
3666
|
+
*/
|
|
3667
|
+
private _localHandlers;
|
|
3668
|
+
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3669
|
+
private _paymentInProgress;
|
|
3670
|
+
private _paypalOverlay;
|
|
3574
3671
|
constructor(name: string, config: ExpressElementConfig);
|
|
3575
|
-
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3576
3672
|
/**
|
|
3577
|
-
*
|
|
3673
|
+
* 重写 on:
|
|
3674
|
+
* 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3675
|
+
* 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
|
|
3578
3676
|
*/
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3677
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
3678
|
+
/**
|
|
3679
|
+
* SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
|
|
3680
|
+
* 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
|
|
3681
|
+
*/
|
|
3682
|
+
private _emit;
|
|
3683
|
+
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3684
|
+
/**
|
|
3685
|
+
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3686
|
+
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3687
|
+
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3688
|
+
*/
|
|
3689
|
+
completePayment(redirect?: 'always' | 'if_required'): Promise<{
|
|
3690
|
+
success: boolean;
|
|
3691
|
+
result?: any;
|
|
3692
|
+
error?: {
|
|
3693
|
+
code: string;
|
|
3694
|
+
message: string;
|
|
3695
|
+
};
|
|
3696
|
+
}>;
|
|
3697
|
+
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3583
3698
|
private registerInternalListeners;
|
|
3584
3699
|
protected focus(): void;
|
|
3585
3700
|
protected blur(): void;
|
|
@@ -3597,84 +3712,83 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3597
3712
|
* @public
|
|
3598
3713
|
* @description Express element events type
|
|
3599
3714
|
*/
|
|
3600
|
-
export declare interface ExpressElementEvents extends
|
|
3601
|
-
/**
|
|
3602
|
-
* @description Element ready event — 上报可用支付方式
|
|
3603
|
-
*/
|
|
3715
|
+
export declare interface ExpressElementEvents extends AntomBridgeWithNativeEventMap<ExpressAppConfig> {
|
|
3604
3716
|
ready: {
|
|
3605
3717
|
availablePaymentMethods: Record<string, boolean>;
|
|
3606
3718
|
};
|
|
3607
|
-
/**
|
|
3608
|
-
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3609
|
-
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3610
|
-
*/
|
|
3611
3719
|
click: ExpressClickEvent;
|
|
3612
|
-
/**
|
|
3613
|
-
* @description 统一支付完成事件(替代 approve)
|
|
3614
|
-
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3615
|
-
*/
|
|
3616
3720
|
confirm: ExpressConfirmData;
|
|
3617
|
-
/**
|
|
3618
|
-
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3619
|
-
*/
|
|
3620
3721
|
error: ErrorPayload & {
|
|
3621
3722
|
expressPaymentType: string;
|
|
3622
3723
|
};
|
|
3623
|
-
/**
|
|
3624
|
-
* @description 用户取消支付
|
|
3625
|
-
*/
|
|
3626
3724
|
cancel: ExpressCancelEvent;
|
|
3627
|
-
/**
|
|
3628
|
-
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3629
|
-
*/
|
|
3630
3725
|
shippingaddresschange: {
|
|
3631
3726
|
expressPaymentType: string;
|
|
3632
3727
|
address: any;
|
|
3633
3728
|
resolve: (options: ShippingResolveOptions) => void;
|
|
3634
3729
|
reject: (reason: string) => void;
|
|
3635
3730
|
};
|
|
3636
|
-
/**
|
|
3637
|
-
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3638
|
-
*/
|
|
3639
3731
|
shippingratechange: {
|
|
3640
3732
|
expressPaymentType: string;
|
|
3641
3733
|
shippingRate: any;
|
|
3642
3734
|
resolve: (options: RateResolveOptions) => void;
|
|
3643
3735
|
};
|
|
3644
|
-
/** @internal iframe 内容高度变化 */
|
|
3645
3736
|
contentHeightChanged: {
|
|
3646
3737
|
height: number;
|
|
3647
3738
|
};
|
|
3648
|
-
|
|
3649
|
-
|
|
3739
|
+
'OPENSDK@CLICK': {
|
|
3740
|
+
expressPaymentType: string;
|
|
3741
|
+
};
|
|
3742
|
+
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3743
|
+
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3650
3744
|
requestId: string;
|
|
3651
3745
|
};
|
|
3652
|
-
|
|
3653
|
-
'paypal:createOrder:reply': {
|
|
3746
|
+
'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
|
|
3654
3747
|
requestId: string;
|
|
3655
3748
|
sessionData?: string;
|
|
3656
3749
|
error?: string;
|
|
3657
3750
|
};
|
|
3658
|
-
|
|
3659
|
-
'paypal:onShippingAddressChange': {
|
|
3751
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
|
|
3660
3752
|
requestId: string;
|
|
3661
3753
|
shippingData: any;
|
|
3662
3754
|
};
|
|
3663
|
-
|
|
3664
|
-
'paypal:onShippingAddressChange:reply': {
|
|
3755
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
|
|
3665
3756
|
requestId: string;
|
|
3666
3757
|
error?: string;
|
|
3667
3758
|
};
|
|
3668
|
-
|
|
3669
|
-
'paypal:onShippingOptionsChange': {
|
|
3759
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
|
|
3670
3760
|
requestId: string;
|
|
3671
3761
|
shippingData: any;
|
|
3672
3762
|
};
|
|
3673
|
-
|
|
3674
|
-
'paypal:onShippingOptionsChange:reply': {
|
|
3763
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
|
|
3675
3764
|
requestId: string;
|
|
3676
3765
|
error?: string;
|
|
3677
3766
|
};
|
|
3767
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
3768
|
+
requestId: string;
|
|
3769
|
+
expressPaymentType: string;
|
|
3770
|
+
};
|
|
3771
|
+
/** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
|
|
3772
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
3773
|
+
requestId: string;
|
|
3774
|
+
success: boolean;
|
|
3775
|
+
result?: any;
|
|
3776
|
+
errorCode?: string;
|
|
3777
|
+
errorMessage?: string;
|
|
3778
|
+
billingDetails?: any;
|
|
3779
|
+
shippingAddress?: any;
|
|
3780
|
+
};
|
|
3781
|
+
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
3782
|
+
error?: ErrorPayload<string>;
|
|
3783
|
+
};
|
|
3784
|
+
'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
|
|
3785
|
+
onRedirect: {
|
|
3786
|
+
normalUrl: string;
|
|
3787
|
+
applinkUrl?: string;
|
|
3788
|
+
schemaUrl?: string;
|
|
3789
|
+
isDestroy: boolean;
|
|
3790
|
+
needReset: boolean;
|
|
3791
|
+
};
|
|
3678
3792
|
}
|
|
3679
3793
|
|
|
3680
3794
|
declare interface ExpSupportBank {
|
|
@@ -3699,6 +3813,24 @@ declare interface ExpSupportCardBrand {
|
|
|
3699
3813
|
logo?: Logo;
|
|
3700
3814
|
}
|
|
3701
3815
|
|
|
3816
|
+
/**
|
|
3817
|
+
* @description 支持的分期银行信息
|
|
3818
|
+
*/
|
|
3819
|
+
declare interface ExpSupportIppBank {
|
|
3820
|
+
/**
|
|
3821
|
+
* @description bank short name or bank code
|
|
3822
|
+
*/
|
|
3823
|
+
bankShortName?: string;
|
|
3824
|
+
/**
|
|
3825
|
+
* @description logo
|
|
3826
|
+
*/
|
|
3827
|
+
logo?: Logo;
|
|
3828
|
+
/**
|
|
3829
|
+
* @description bins
|
|
3830
|
+
*/
|
|
3831
|
+
bins?: string[];
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3702
3834
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
3703
3835
|
|
|
3704
3836
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -3716,6 +3848,27 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
3716
3848
|
promotionDetails?: PromotionDetail[];
|
|
3717
3849
|
}
|
|
3718
3850
|
|
|
3851
|
+
declare type FontSource = CssFontSource | CustomFontSource;
|
|
3852
|
+
|
|
3853
|
+
declare interface FrontModulesToBeLoadedInterface {
|
|
3854
|
+
acquirerName: string;
|
|
3855
|
+
scriptUrl: string;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
/**
|
|
3859
|
+
* @description 分期银行展示模型
|
|
3860
|
+
*/
|
|
3861
|
+
declare interface FrontSupportIppBank {
|
|
3862
|
+
/**
|
|
3863
|
+
* @description bank short name or bank code
|
|
3864
|
+
*/
|
|
3865
|
+
bankShortName?: string;
|
|
3866
|
+
/**
|
|
3867
|
+
* @description logo
|
|
3868
|
+
*/
|
|
3869
|
+
logo?: Logo;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3719
3872
|
declare type GetI18nQueryParam = string | {
|
|
3720
3873
|
/**
|
|
3721
3874
|
* 多语言文案的 key
|
|
@@ -3733,40 +3886,6 @@ declare type GetI18nQueryParam = string | {
|
|
|
3733
3886
|
defaultMessage?: string;
|
|
3734
3887
|
};
|
|
3735
3888
|
|
|
3736
|
-
declare function getMiniPerformance(): Promise<{
|
|
3737
|
-
performance: {
|
|
3738
|
-
appLaunch: number;
|
|
3739
|
-
jumpAppStartUnix: number;
|
|
3740
|
-
preparePhase: number;
|
|
3741
|
-
appPhase: number;
|
|
3742
|
-
pagePhase: number;
|
|
3743
|
-
appxPhase: number;
|
|
3744
|
-
launchId: string;
|
|
3745
|
-
launchType: 0 | 1;
|
|
3746
|
-
};
|
|
3747
|
-
onLoadTime: number;
|
|
3748
|
-
loadId: string;
|
|
3749
|
-
srcCount: number;
|
|
3750
|
-
webviewComponentSrc?: string | undefined;
|
|
3751
|
-
} | undefined>;
|
|
3752
|
-
|
|
3753
|
-
declare type GetRequesterResult = (data: string, rawData: (ReportData & BaseInfo) | IOptions | IEventOPtions) => Promise<void>;
|
|
3754
|
-
|
|
3755
|
-
declare interface GetWebVitalsInfoResult {
|
|
3756
|
-
fcp: Promise<number | null | undefined>;
|
|
3757
|
-
ttfb: Promise<number | null | undefined>;
|
|
3758
|
-
lcp: Promise<number | null | undefined>;
|
|
3759
|
-
inp: Promise<number | null | undefined>;
|
|
3760
|
-
cls: Promise<number | null | undefined>;
|
|
3761
|
-
}
|
|
3762
|
-
|
|
3763
|
-
declare interface GetWhiteScreenInfoOptions {
|
|
3764
|
-
selector?: string | string[];
|
|
3765
|
-
delay?: number | (() => number);
|
|
3766
|
-
persistent?: boolean;
|
|
3767
|
-
ignoreNotInViewport?: boolean;
|
|
3768
|
-
}
|
|
3769
|
-
|
|
3770
3889
|
declare type GlobalOptions = {
|
|
3771
3890
|
i18n?: SimpleI18n;
|
|
3772
3891
|
i18nPrefix: string;
|
|
@@ -4334,17 +4453,12 @@ declare type HtmlAttributes =
|
|
|
4334
4453
|
| "[writingsuggestions]"
|
|
4335
4454
|
| "[xmlns]";
|
|
4336
4455
|
|
|
4337
|
-
declare interface
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
redirected?: 0 | 1;
|
|
4344
|
-
responseUrl?: string;
|
|
4345
|
-
time: number;
|
|
4346
|
-
method?: string;
|
|
4347
|
-
aborted?: 0 | 1;
|
|
4456
|
+
declare interface IApplePayContactField {
|
|
4457
|
+
email: string;
|
|
4458
|
+
name: string;
|
|
4459
|
+
phone: string;
|
|
4460
|
+
postalAddress: string;
|
|
4461
|
+
phoneticName: string;
|
|
4348
4462
|
}
|
|
4349
4463
|
|
|
4350
4464
|
declare interface iBaseElementClass {
|
|
@@ -4352,16 +4466,6 @@ declare interface iBaseElementClass {
|
|
|
4352
4466
|
elementType: string;
|
|
4353
4467
|
}
|
|
4354
4468
|
|
|
4355
|
-
declare interface IEventOPtions {
|
|
4356
|
-
eventId: string;
|
|
4357
|
-
param4: Record<string, any>;
|
|
4358
|
-
immediat?: boolean;
|
|
4359
|
-
}
|
|
4360
|
-
|
|
4361
|
-
declare type IMDAP_SERVER = (typeof imdapServers)[number];
|
|
4362
|
-
|
|
4363
|
-
declare const imdapServers: readonly ["https://imdap-sea.alipay.com/loggw/dwcookieLogGet.do", "https://imdap.alipay.com/loggw/dwcookieLogGet.do", "https://imdap-de.alipay.com/loggw/dwcookieLogGet.do"];
|
|
4364
|
-
|
|
4365
4469
|
declare interface InstallmentPlan {
|
|
4366
4470
|
/**
|
|
4367
4471
|
* @description 分期支持的银行
|
|
@@ -4480,102 +4584,117 @@ declare interface InterestFree {
|
|
|
4480
4584
|
bankShortName?: string;
|
|
4481
4585
|
}
|
|
4482
4586
|
|
|
4483
|
-
declare
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
declare interface IntlOpenSDKTrackerInitOptions extends Omit<IntlOpenSDKTrackerInitOptions_2, 'appId'> {
|
|
4587
|
+
declare interface IntlOpenSDKTrackerInitOptions extends Omit<ExcludeUndefined<CompatibleTrackerFullOptions>, 'appId'> {
|
|
4588
|
+
trackId?: string;
|
|
4589
|
+
/**
|
|
4590
|
+
* @description appId,默认值为180020050100012557
|
|
4591
|
+
*/
|
|
4490
4592
|
appId?: string;
|
|
4491
|
-
}
|
|
4492
|
-
|
|
4493
|
-
declare interface IntlOpenSDKTrackerInitOptions_2 extends Omit<OriginTrackerInitOptions, 'bizType' | 'productId'> {
|
|
4494
|
-
whiteScreen?: BlankMonitorConfig | boolean;
|
|
4495
|
-
bizType?: string;
|
|
4496
|
-
productId?: string;
|
|
4497
4593
|
/**
|
|
4498
|
-
*
|
|
4594
|
+
* origin → 完全按入参 key 输出
|
|
4595
|
+
* snake → 强制 snake_case
|
|
4596
|
+
* camel → 强制 camelCase
|
|
4597
|
+
* both → snake + origin 双写
|
|
4499
4598
|
*/
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
declare interface IOptions {
|
|
4507
|
-
actionId: string;
|
|
4508
|
-
spmId: string;
|
|
4509
|
-
param1?: string;
|
|
4510
|
-
param2?: string;
|
|
4511
|
-
param3?: string;
|
|
4512
|
-
param4?: Record<string, any>;
|
|
4513
|
-
param5?: Record<string, any>;
|
|
4514
|
-
stayTime?: number;
|
|
4515
|
-
}
|
|
4516
|
-
|
|
4517
|
-
declare interface ISystemInfo {
|
|
4518
|
-
readonly pixelRatio: number;
|
|
4519
|
-
readonly windowWidth: number;
|
|
4520
|
-
readonly windowHeight: number;
|
|
4521
|
-
readonly model: string;
|
|
4522
|
-
readonly language: string;
|
|
4523
|
-
readonly version: string;
|
|
4524
|
-
readonly platform: string;
|
|
4525
|
-
readonly system: string;
|
|
4526
|
-
readonly screenWidth: number;
|
|
4527
|
-
readonly screenHeight: number;
|
|
4528
|
-
readonly brand: string;
|
|
4529
|
-
readonly app: string;
|
|
4530
|
-
readonly [propName: string]: any;
|
|
4531
|
-
}
|
|
4532
|
-
|
|
4533
|
-
declare interface ITracert extends IUserTracertProperties {
|
|
4534
|
-
get: (arg0: string) => any;
|
|
4535
|
-
set: (arg0: IUserTracertProperties) => void;
|
|
4536
|
-
loadPlugins: (_plugins: PluginFunction[]) => void;
|
|
4537
|
-
readonly logLevel?: string;
|
|
4538
|
-
readonly logVersion?: string;
|
|
4539
|
-
readonly debug?: boolean;
|
|
4540
|
-
readonly contact?: boolean;
|
|
4541
|
-
readonly pluginReady?: boolean;
|
|
4542
|
-
readonly _plugins?: readonly PluginFunction[];
|
|
4543
|
-
readonly _beforeEvObj?: Record<string, EventFunction[]>;
|
|
4544
|
-
readonly _afterEvObj?: Record<string, EventFunction[]>;
|
|
4545
|
-
readonly _pluginLoadCnt?: number;
|
|
4546
|
-
readonly apiCashList?: any[];
|
|
4547
|
-
}
|
|
4548
|
-
|
|
4549
|
-
declare interface IUserTracertProperties {
|
|
4550
|
-
readonly ready?: boolean;
|
|
4551
|
-
readonly bizType?: string;
|
|
4552
|
-
readonly deviceId?: string;
|
|
4553
|
-
readonly userId?: string;
|
|
4554
|
-
readonly spmAPos?: string;
|
|
4555
|
-
readonly spmBPos?: string;
|
|
4556
|
-
readonly pageId?: string;
|
|
4557
|
-
readonly server?: string;
|
|
4558
|
-
readonly servers?: string[];
|
|
4559
|
-
readonly chInfo?: string;
|
|
4560
|
-
readonly scm?: string;
|
|
4561
|
-
readonly env?: Env;
|
|
4562
|
-
readonly switch?: boolean;
|
|
4563
|
-
readonly sendFrequency?: number;
|
|
4564
|
-
readonly batchCount?: number;
|
|
4565
|
-
readonly referSPM?: string;
|
|
4566
|
-
readonly sessionId?: string;
|
|
4567
|
-
readonly appId?: string;
|
|
4568
|
-
readonly productId?: string;
|
|
4569
|
-
readonly mdata?: Record<string, number | string>;
|
|
4570
|
-
readonly systemInfo?: ISystemInfo;
|
|
4571
|
-
readonly networkType?: string;
|
|
4572
|
-
readonly path?: string;
|
|
4573
|
-
readonly packageVersion?: string;
|
|
4574
|
-
readonly autoExpo?: boolean;
|
|
4599
|
+
keyFormat?: 'origin' | 'snake' | 'camel' | 'both';
|
|
4600
|
+
/**
|
|
4601
|
+
* 是否上报idengine_user_path
|
|
4602
|
+
*/
|
|
4603
|
+
userPathAuto?: boolean;
|
|
4575
4604
|
}
|
|
4576
4605
|
|
|
4577
|
-
declare interface
|
|
4578
|
-
|
|
4606
|
+
declare interface IPaymentSessionMetaData {
|
|
4607
|
+
clientId?: string;
|
|
4608
|
+
renderDisplayType?: string;
|
|
4609
|
+
paymentSessionConfig?: PaymentSessionConfig;
|
|
4610
|
+
securityConfig?: SessionSecurityConfig;
|
|
4611
|
+
moneyView?: any;
|
|
4612
|
+
extendInfo?: string;
|
|
4613
|
+
paymentMethodInfoView?: any;
|
|
4614
|
+
paymentView?: any;
|
|
4615
|
+
modernWeb?: boolean;
|
|
4616
|
+
action?: PaymentSessionAction;
|
|
4617
|
+
/**
|
|
4618
|
+
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4619
|
+
*/
|
|
4620
|
+
flowSwitchTags?: string;
|
|
4621
|
+
authUrlInfo?: {
|
|
4622
|
+
appIdentifier?: string;
|
|
4623
|
+
applinkUrl?: string;
|
|
4624
|
+
normalUrl?: string;
|
|
4625
|
+
schemeUrl?: string;
|
|
4626
|
+
authUrl?: string;
|
|
4627
|
+
};
|
|
4628
|
+
paymentSessionFactor?: {
|
|
4629
|
+
externalRiskTimeout?: number;
|
|
4630
|
+
extendInfo?: {
|
|
4631
|
+
merchantCapabilities?: string[];
|
|
4632
|
+
supportedNetworks?: string[];
|
|
4633
|
+
requiredBillingContactFields: IApplePayContactField[];
|
|
4634
|
+
requiredShippingContactFields: IApplePayContactField[];
|
|
4635
|
+
};
|
|
4636
|
+
merchantInfo?: {
|
|
4637
|
+
registeredCountry?: string;
|
|
4638
|
+
partnerId?: string;
|
|
4639
|
+
merchantName?: string;
|
|
4640
|
+
};
|
|
4641
|
+
order?: {
|
|
4642
|
+
orderDescription: string;
|
|
4643
|
+
};
|
|
4644
|
+
paymentAmount?: {
|
|
4645
|
+
value?: string;
|
|
4646
|
+
currency?: string;
|
|
4647
|
+
};
|
|
4648
|
+
paymentMethodInfo?: {
|
|
4649
|
+
paymentMethodType?: string;
|
|
4650
|
+
};
|
|
4651
|
+
paymentMethodViewMetaData?: any;
|
|
4652
|
+
paymentRequestId?: string;
|
|
4653
|
+
supportedLanguages?: any;
|
|
4654
|
+
/**
|
|
4655
|
+
* 当前为苹果分期场景的信息
|
|
4656
|
+
*/
|
|
4657
|
+
recurringInfo?: {
|
|
4658
|
+
/**
|
|
4659
|
+
* 代扣协议开始日期 不传为当前系统时间
|
|
4660
|
+
*/
|
|
4661
|
+
startDate?: number;
|
|
4662
|
+
/**
|
|
4663
|
+
* 代扣协议结束日期 不传不限制结束时间
|
|
4664
|
+
*/
|
|
4665
|
+
endDate?: number;
|
|
4666
|
+
/**
|
|
4667
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4668
|
+
*/
|
|
4669
|
+
intervalUnit?: string;
|
|
4670
|
+
/**
|
|
4671
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4672
|
+
*/
|
|
4673
|
+
intervalCount?: number;
|
|
4674
|
+
/**
|
|
4675
|
+
* 分期标题信息
|
|
4676
|
+
*/
|
|
4677
|
+
title?: string;
|
|
4678
|
+
/**
|
|
4679
|
+
* 分期管理页面
|
|
4680
|
+
*/
|
|
4681
|
+
managementURL?: string;
|
|
4682
|
+
/**
|
|
4683
|
+
* 苹果通知ipay MAPN信息变更的地址
|
|
4684
|
+
*/
|
|
4685
|
+
tokenNotificationURL?: string;
|
|
4686
|
+
/**
|
|
4687
|
+
* 分期协议描述
|
|
4688
|
+
*/
|
|
4689
|
+
agreementDescription?: string;
|
|
4690
|
+
};
|
|
4691
|
+
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4692
|
+
};
|
|
4693
|
+
connectFactor?: {
|
|
4694
|
+
enableConnect?: boolean;
|
|
4695
|
+
};
|
|
4696
|
+
skipRenderPaymentMethod?: boolean;
|
|
4697
|
+
needAccountConfirmPage?: boolean;
|
|
4579
4698
|
}
|
|
4580
4699
|
|
|
4581
4700
|
/**
|
|
@@ -4630,86 +4749,6 @@ export declare interface LoadAntomConfig extends Omit<BaseFactoryConfig, 'tracke
|
|
|
4630
4749
|
env?: 'sandbox' | 'prod';
|
|
4631
4750
|
}
|
|
4632
4751
|
|
|
4633
|
-
declare interface LocationInfo {
|
|
4634
|
-
countryName?: string;
|
|
4635
|
-
cityName?: string;
|
|
4636
|
-
provinceName?: string;
|
|
4637
|
-
area?: string;
|
|
4638
|
-
}
|
|
4639
|
-
|
|
4640
|
-
declare interface LogInfo {
|
|
4641
|
-
title: string;
|
|
4642
|
-
msg?: string | Error | Record<string, number | string>;
|
|
4643
|
-
}
|
|
4644
|
-
|
|
4645
|
-
declare type LogItem = {
|
|
4646
|
-
code: string;
|
|
4647
|
-
msg: string;
|
|
4648
|
-
marmotId?: string;
|
|
4649
|
-
s1?: string | number;
|
|
4650
|
-
s2?: string | number;
|
|
4651
|
-
s3?: string | number;
|
|
4652
|
-
s4?: string | number;
|
|
4653
|
-
s5?: string | number;
|
|
4654
|
-
s6?: string | number;
|
|
4655
|
-
s7?: string | number;
|
|
4656
|
-
s8?: string | number;
|
|
4657
|
-
s9?: string | number;
|
|
4658
|
-
s10?: string | number;
|
|
4659
|
-
s11?: string | number;
|
|
4660
|
-
s12?: string | number;
|
|
4661
|
-
s13?: string | number;
|
|
4662
|
-
s14?: string | number;
|
|
4663
|
-
s15?: string | number;
|
|
4664
|
-
s16?: string | number;
|
|
4665
|
-
s17?: string | number;
|
|
4666
|
-
s18?: string | number;
|
|
4667
|
-
s19?: string | number;
|
|
4668
|
-
s20?: string | number;
|
|
4669
|
-
env?: Env_2;
|
|
4670
|
-
sdk?: string;
|
|
4671
|
-
container?: string;
|
|
4672
|
-
title?: string;
|
|
4673
|
-
fullUrl?: string;
|
|
4674
|
-
sprintId?: string;
|
|
4675
|
-
ip?: string;
|
|
4676
|
-
countryName?: string;
|
|
4677
|
-
cityName?: string;
|
|
4678
|
-
provinceName?: string;
|
|
4679
|
-
cOfflineVer?: string;
|
|
4680
|
-
url?: string;
|
|
4681
|
-
referrer?: string;
|
|
4682
|
-
domCnt?: number;
|
|
4683
|
-
delay?: number;
|
|
4684
|
-
scrollTop?: number;
|
|
4685
|
-
lastAction?: string;
|
|
4686
|
-
sessionId?: string;
|
|
4687
|
-
isp?: string;
|
|
4688
|
-
area?: string;
|
|
4689
|
-
ua?: string;
|
|
4690
|
-
browser?: string;
|
|
4691
|
-
os?: string;
|
|
4692
|
-
device?: string;
|
|
4693
|
-
deviceType?: string;
|
|
4694
|
-
deviceBrand?: string;
|
|
4695
|
-
deviceModel?: string;
|
|
4696
|
-
screenWidth?: number;
|
|
4697
|
-
screenHeight?: number;
|
|
4698
|
-
contentHeight?: number;
|
|
4699
|
-
pixelRatio?: number;
|
|
4700
|
-
cClient?: string;
|
|
4701
|
-
cClientId?: string;
|
|
4702
|
-
cCoreVer?: string;
|
|
4703
|
-
assetsVer?: string;
|
|
4704
|
-
traceId?: string;
|
|
4705
|
-
serverIp?: string;
|
|
4706
|
-
serverEnv?: string;
|
|
4707
|
-
clientId?: string;
|
|
4708
|
-
spm?: string;
|
|
4709
|
-
spma?: string;
|
|
4710
|
-
spmb?: string;
|
|
4711
|
-
} & DMC;
|
|
4712
|
-
|
|
4713
4752
|
/**
|
|
4714
4753
|
* @description Logo信息
|
|
4715
4754
|
*/
|
|
@@ -4740,29 +4779,6 @@ declare interface Logo {
|
|
|
4740
4779
|
logoHeight?: string;
|
|
4741
4780
|
}
|
|
4742
4781
|
|
|
4743
|
-
declare type M = {
|
|
4744
|
-
m1?: number;
|
|
4745
|
-
m2?: number;
|
|
4746
|
-
m3?: number;
|
|
4747
|
-
m4?: number;
|
|
4748
|
-
m5?: number;
|
|
4749
|
-
m6?: number;
|
|
4750
|
-
m7?: number;
|
|
4751
|
-
m8?: number;
|
|
4752
|
-
m9?: number;
|
|
4753
|
-
m10?: number;
|
|
4754
|
-
m11?: number;
|
|
4755
|
-
m12?: number;
|
|
4756
|
-
m13?: number;
|
|
4757
|
-
m14?: number;
|
|
4758
|
-
m15?: number;
|
|
4759
|
-
m16?: number;
|
|
4760
|
-
m17?: number;
|
|
4761
|
-
m18?: number;
|
|
4762
|
-
m19?: number;
|
|
4763
|
-
m20?: number;
|
|
4764
|
-
};
|
|
4765
|
-
|
|
4766
4782
|
/**
|
|
4767
4783
|
* @description 端上的行为设定 @Author yanhong
|
|
4768
4784
|
*/
|
|
@@ -4906,12 +4922,6 @@ declare interface MultiCurrencyMoney {
|
|
|
4906
4922
|
currencyValue?: string;
|
|
4907
4923
|
}
|
|
4908
4924
|
|
|
4909
|
-
declare interface NetworkInfo {
|
|
4910
|
-
networkType?: string;
|
|
4911
|
-
isp?: string;
|
|
4912
|
-
ip?: string;
|
|
4913
|
-
}
|
|
4914
|
-
|
|
4915
4925
|
declare interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
4916
4926
|
/**
|
|
4917
4927
|
* The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box.
|
|
@@ -7013,6 +7023,68 @@ declare interface OneAccountInfo {
|
|
|
7013
7023
|
accountStatus?: string;
|
|
7014
7024
|
}
|
|
7015
7025
|
|
|
7026
|
+
/**
|
|
7027
|
+
* @description one account 账户信息查询结果
|
|
7028
|
+
*/
|
|
7029
|
+
declare interface OneAccountQueryResult {
|
|
7030
|
+
/**
|
|
7031
|
+
* @description 是否业务处理成功
|
|
7032
|
+
*/
|
|
7033
|
+
success?: boolean;
|
|
7034
|
+
/**
|
|
7035
|
+
* @description 错误上下文
|
|
7036
|
+
*/
|
|
7037
|
+
errorContext?: ErrorContext;
|
|
7038
|
+
/**
|
|
7039
|
+
* @description 返回结果码
|
|
7040
|
+
*/
|
|
7041
|
+
resultCode?: string;
|
|
7042
|
+
/**
|
|
7043
|
+
* @description 返回结果信息
|
|
7044
|
+
*/
|
|
7045
|
+
resultMessage?: string;
|
|
7046
|
+
/**
|
|
7047
|
+
* @description error actions
|
|
7048
|
+
*/
|
|
7049
|
+
errorActions?: Record<string, string>;
|
|
7050
|
+
/**
|
|
7051
|
+
* @description error code
|
|
7052
|
+
*/
|
|
7053
|
+
errorCode?: string;
|
|
7054
|
+
/**
|
|
7055
|
+
* @description error status
|
|
7056
|
+
*/
|
|
7057
|
+
errorStatus?: string;
|
|
7058
|
+
/**
|
|
7059
|
+
* @description error message
|
|
7060
|
+
*/
|
|
7061
|
+
errorMessage?: string;
|
|
7062
|
+
/**
|
|
7063
|
+
* @description extend info
|
|
7064
|
+
*/
|
|
7065
|
+
extendInfo?: Record<string, string>;
|
|
7066
|
+
/**
|
|
7067
|
+
* @description one account 账户信息
|
|
7068
|
+
*/
|
|
7069
|
+
accountInfo?: OneAccountInfo;
|
|
7070
|
+
/**
|
|
7071
|
+
* @description action form 下一步动作
|
|
7072
|
+
*/
|
|
7073
|
+
actionForm?: OtpChallengeActionForm;
|
|
7074
|
+
/**
|
|
7075
|
+
* @description 支付方式列表
|
|
7076
|
+
*/
|
|
7077
|
+
paymentMethods?: PaymentMethodView[];
|
|
7078
|
+
/**
|
|
7079
|
+
* @description 物流信息
|
|
7080
|
+
*/
|
|
7081
|
+
shippings?: ShippingInfo_2[];
|
|
7082
|
+
/**
|
|
7083
|
+
* @description 支付金额 (订单金额 + 物流费)
|
|
7084
|
+
*/
|
|
7085
|
+
paymentAmount?: MobileMoneyView;
|
|
7086
|
+
}
|
|
7087
|
+
|
|
7016
7088
|
/**
|
|
7017
7089
|
* @description OpenModal的返回值类型
|
|
7018
7090
|
*/
|
|
@@ -7076,7 +7148,9 @@ declare type OpenSDKInternalErrorCodes = (typeof OpenSDKInternalErrorCodes)[keyo
|
|
|
7076
7148
|
|
|
7077
7149
|
declare class OpenSDKTracker {
|
|
7078
7150
|
private options?;
|
|
7151
|
+
private intlTrackerOptions?;
|
|
7079
7152
|
private tracker?;
|
|
7153
|
+
private trackerInitPromise?;
|
|
7080
7154
|
/**
|
|
7081
7155
|
* @description trackId,会话最终的唯一标识,可以用来打通服务端,追踪整体会话
|
|
7082
7156
|
*/
|
|
@@ -7094,7 +7168,7 @@ declare class OpenSDKTracker {
|
|
|
7094
7168
|
* @param options
|
|
7095
7169
|
* @returns
|
|
7096
7170
|
*/
|
|
7097
|
-
initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<
|
|
7171
|
+
initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<CompatibleTrackerFull | undefined>;
|
|
7098
7172
|
private safeCall;
|
|
7099
7173
|
/**
|
|
7100
7174
|
*
|
|
@@ -7104,7 +7178,7 @@ declare class OpenSDKTracker {
|
|
|
7104
7178
|
/**
|
|
7105
7179
|
* @description 设置属性
|
|
7106
7180
|
*/
|
|
7107
|
-
set(data: Partial<IntlOpenSDKTrackerInitOptions
|
|
7181
|
+
set(data: Partial<ExcludeUndefined<IntlOpenSDKTrackerInitOptions>>): void;
|
|
7108
7182
|
/**
|
|
7109
7183
|
* 会以 10141 code 上报一条常规日志,日志头为 D-AE
|
|
7110
7184
|
* @see https://yuque.antfin.com/marmot/handbook/beginning#cq9Zw
|
|
@@ -7114,109 +7188,98 @@ declare class OpenSDKTracker {
|
|
|
7114
7188
|
* 请在marmot申请code后使用,必须关联code
|
|
7115
7189
|
* @see https://yuque.antfin.com/marmot/handbook/beginning#W3dtb
|
|
7116
7190
|
*/
|
|
7117
|
-
log(...args: Parameters<
|
|
7191
|
+
log(...args: Parameters<CompatibleTrackerFull['log']>): void;
|
|
7192
|
+
/**
|
|
7193
|
+
* 用于埋点相关上报,点击
|
|
7194
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#XQel9
|
|
7195
|
+
*/
|
|
7196
|
+
click(...args: Parameters<CompatibleTrackerFull['click']>): void;
|
|
7197
|
+
/**
|
|
7198
|
+
* 用于埋点相关上报,曝光
|
|
7199
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#LiVxE
|
|
7200
|
+
*/
|
|
7201
|
+
expo(...args: Parameters<CompatibleTrackerFull['expo']>): void;
|
|
7202
|
+
/**
|
|
7203
|
+
* 用于日志管控
|
|
7204
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7205
|
+
*/
|
|
7206
|
+
onSendData(...args: Parameters<CompatibleTrackerFull['onSendData']>): void;
|
|
7207
|
+
/**
|
|
7208
|
+
* 用于日志管控
|
|
7209
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7210
|
+
*/
|
|
7211
|
+
offSendData(...args: Parameters<CompatibleTrackerFull['offSendData']>): void;
|
|
7212
|
+
/**
|
|
7213
|
+
* 用于埋点相关上报,上报的日志头为 D-VM
|
|
7214
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#RSCKn
|
|
7215
|
+
*/
|
|
7216
|
+
pageMonitor(...args: Parameters<CompatibleTrackerFull['pageMonitor']>): void;
|
|
7217
|
+
/**
|
|
7218
|
+
* 用于上报自定义性能指标,单次仅上报一个指标
|
|
7219
|
+
* @param {string} key — m1 - m20
|
|
7220
|
+
* @param {number} num — 耗时,数字,一定要 >= 0,否则无统计意义
|
|
7221
|
+
*/
|
|
7222
|
+
reportCustomizedPerformance(...args: Parameters<CompatibleTrackerFull['reportCustomizedPerformance']>): void;
|
|
7223
|
+
}
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* @description 订单信息
|
|
7227
|
+
*/
|
|
7228
|
+
declare interface OrderInfo {
|
|
7229
|
+
/**
|
|
7230
|
+
* @description 订单描述
|
|
7231
|
+
*/
|
|
7232
|
+
orderDescription?: string;
|
|
7233
|
+
}
|
|
7234
|
+
|
|
7235
|
+
declare interface OtpChallengeActionForm {
|
|
7236
|
+
/**
|
|
7237
|
+
* @description action form type
|
|
7238
|
+
*/
|
|
7239
|
+
actionFormType?: string;
|
|
7240
|
+
/**
|
|
7241
|
+
* @description type of challenge
|
|
7242
|
+
*/
|
|
7243
|
+
challengeType?: string;
|
|
7244
|
+
/**
|
|
7245
|
+
* @description The actual render value
|
|
7246
|
+
*/
|
|
7247
|
+
challengeRenderValue?: string;
|
|
7248
|
+
/**
|
|
7249
|
+
* @description Describe the challenge is required by AAC or external party
|
|
7250
|
+
*/
|
|
7251
|
+
triggerSource?: string;
|
|
7118
7252
|
/**
|
|
7119
|
-
*
|
|
7120
|
-
* @
|
|
7253
|
+
* @description is support retry challenge
|
|
7254
|
+
* @default true
|
|
7121
7255
|
*/
|
|
7122
|
-
|
|
7256
|
+
isChallengeRetrySupported?: boolean;
|
|
7123
7257
|
/**
|
|
7124
|
-
*
|
|
7125
|
-
* @
|
|
7258
|
+
* @description is fist otp auto triggered
|
|
7259
|
+
* @default false
|
|
7126
7260
|
*/
|
|
7127
|
-
|
|
7261
|
+
isChallengeAutoTriggered?: boolean;
|
|
7128
7262
|
/**
|
|
7129
|
-
*
|
|
7130
|
-
* @
|
|
7263
|
+
* @description estimated challenge response duration
|
|
7264
|
+
* @default 0
|
|
7131
7265
|
*/
|
|
7132
|
-
|
|
7266
|
+
estimatedDuration?: number;
|
|
7133
7267
|
/**
|
|
7134
|
-
*
|
|
7135
|
-
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7268
|
+
* @description url - like h5 sdk challenge need to call back url
|
|
7136
7269
|
*/
|
|
7137
|
-
|
|
7270
|
+
challengeUrl?: string;
|
|
7138
7271
|
/**
|
|
7139
|
-
*
|
|
7140
|
-
* @see https://yuque.antfin.com/marmot/handbook/beginning#RSCKn
|
|
7272
|
+
* @description extend information
|
|
7141
7273
|
*/
|
|
7142
|
-
|
|
7274
|
+
extendInfo?: string;
|
|
7143
7275
|
/**
|
|
7144
|
-
*
|
|
7145
|
-
* @param {string} key — m1 - m20
|
|
7146
|
-
* @param {number} num — 耗时,数字,一定要 >= 0,否则无统计意义
|
|
7276
|
+
* @description verify Id
|
|
7147
7277
|
*/
|
|
7148
|
-
|
|
7149
|
-
}
|
|
7150
|
-
|
|
7151
|
-
/**
|
|
7152
|
-
* @description 订单信息
|
|
7153
|
-
*/
|
|
7154
|
-
declare interface OrderInfo {
|
|
7278
|
+
verifyId?: string;
|
|
7155
7279
|
/**
|
|
7156
|
-
* @description
|
|
7280
|
+
* @description 重发次数
|
|
7157
7281
|
*/
|
|
7158
|
-
|
|
7159
|
-
}
|
|
7160
|
-
|
|
7161
|
-
declare interface OriginTrackerInitOptions {
|
|
7162
|
-
isMarmot?: boolean;
|
|
7163
|
-
spmConfig?: SpmConfig;
|
|
7164
|
-
bizType: string;
|
|
7165
|
-
appId: string;
|
|
7166
|
-
/**
|
|
7167
|
-
* 适用于从雨燕监控迁移到 marmot 的场景
|
|
7168
|
-
* 该字段的值可使用雨燕监控的 appId 值
|
|
7169
|
-
* 最终该值会放在 D-AE 日志类型的 appId 字段位置,并覆盖扩展参数 4 中的 idengine_groupId 值
|
|
7170
|
-
* 正常情况下不需要用到,有疑问咨询 @之其 205637
|
|
7171
|
-
**/
|
|
7172
|
-
compatibleAppId?: string;
|
|
7173
|
-
productId: string;
|
|
7174
|
-
userId?: string;
|
|
7175
|
-
deviceId?: string;
|
|
7176
|
-
chInfo?: string;
|
|
7177
|
-
batchCount?: number;
|
|
7178
|
-
plugins?: PluginFunction[];
|
|
7179
|
-
server?: string;
|
|
7180
|
-
/**
|
|
7181
|
-
* servers 传入空数组或不传的情况下,不会禁用所有日志的上报,这个字段不是用来做上报开关的
|
|
7182
|
-
* 就像 server 不传或传空字符串的情况下,也不会禁用日志的上报,会使用默认的服务器地址
|
|
7183
|
-
* servers 只在有至少一个有效值的情况下才有意义
|
|
7184
|
-
*/
|
|
7185
|
-
servers?: string[];
|
|
7186
|
-
mdata?: Record<string, number | string>;
|
|
7187
|
-
env?: Env_2;
|
|
7188
|
-
ready?: boolean;
|
|
7189
|
-
isReport?: boolean;
|
|
7190
|
-
version?: string;
|
|
7191
|
-
funnelAuto?: boolean;
|
|
7192
|
-
userPathAuto?: boolean;
|
|
7193
|
-
autoExpo?: boolean;
|
|
7194
|
-
autoClick?: boolean;
|
|
7195
|
-
expoOnce?: boolean;
|
|
7196
|
-
platform?: string;
|
|
7197
|
-
sprintId?: string;
|
|
7198
|
-
autoReportConfig?: {
|
|
7199
|
-
isReport?: boolean;
|
|
7200
|
-
programVersion?: string;
|
|
7201
|
-
productId?: string;
|
|
7202
|
-
appId?: string;
|
|
7203
|
-
bizType?: string;
|
|
7204
|
-
imdapServerIndex?: number;
|
|
7205
|
-
server?: string;
|
|
7206
|
-
servers?: string[];
|
|
7207
|
-
platform?: string;
|
|
7208
|
-
deviceId?: string;
|
|
7209
|
-
};
|
|
7210
|
-
whiteScreenConfig?: BlankMonitorConfig | boolean;
|
|
7211
|
-
fmpIgnoreElements?: string[];
|
|
7212
|
-
enableBehavior?: BehaviorConfig | boolean;
|
|
7213
|
-
enableRequestHook?: RequestHookConfig | boolean;
|
|
7214
|
-
enableJSAPIReport?: boolean;
|
|
7215
|
-
}
|
|
7216
|
-
|
|
7217
|
-
declare interface OSInfo {
|
|
7218
|
-
os?: string;
|
|
7219
|
-
osVer?: string;
|
|
7282
|
+
resendLeftTimes?: number;
|
|
7220
7283
|
}
|
|
7221
7284
|
|
|
7222
7285
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
@@ -7240,6 +7303,99 @@ declare interface PayByLinkInfo {
|
|
|
7240
7303
|
linkVersion?: number;
|
|
7241
7304
|
}
|
|
7242
7305
|
|
|
7306
|
+
/**
|
|
7307
|
+
* @description Payment element app config type
|
|
7308
|
+
*/
|
|
7309
|
+
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7310
|
+
/**
|
|
7311
|
+
* @description sessionData,无法通过updateConfig更新
|
|
7312
|
+
*/
|
|
7313
|
+
sessionData?: string;
|
|
7314
|
+
/**
|
|
7315
|
+
* @internal sdk所在hostname
|
|
7316
|
+
*/
|
|
7317
|
+
merchantDomain?: string;
|
|
7318
|
+
/**
|
|
7319
|
+
* @internal 渲染数据
|
|
7320
|
+
*/
|
|
7321
|
+
renderData?: CashierSdkActionQueryResult;
|
|
7322
|
+
/**
|
|
7323
|
+
* @internal connect时有这个数据
|
|
7324
|
+
*/
|
|
7325
|
+
connectAccount?: OneAccountQueryResult;
|
|
7326
|
+
/**
|
|
7327
|
+
* @internal sessionData解析后的数据
|
|
7328
|
+
*/
|
|
7329
|
+
sessionMetaData?: IPaymentSessionMetaData;
|
|
7330
|
+
/**
|
|
7331
|
+
* @internal 渲染数据错误信息
|
|
7332
|
+
*/
|
|
7333
|
+
renderDataError?: ErrorPayload;
|
|
7334
|
+
/**
|
|
7335
|
+
* @internal sdk 版本号
|
|
7336
|
+
*/
|
|
7337
|
+
sdkVersion?: string;
|
|
7338
|
+
/**
|
|
7339
|
+
* @internal 内部联调使用,生产环境传递无效
|
|
7340
|
+
*/
|
|
7341
|
+
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7342
|
+
/**
|
|
7343
|
+
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7344
|
+
*/
|
|
7345
|
+
logMetaData?: {
|
|
7346
|
+
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7347
|
+
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7348
|
+
trackId: string;
|
|
7349
|
+
merchantId?: string;
|
|
7350
|
+
paymentMethodType?: string;
|
|
7351
|
+
};
|
|
7352
|
+
/**
|
|
7353
|
+
* @internal 内部使用,无需用户传递,高度信息
|
|
7354
|
+
*/
|
|
7355
|
+
heightOfVisible?: number;
|
|
7356
|
+
}
|
|
7357
|
+
|
|
7358
|
+
/**
|
|
7359
|
+
* @description Payment element appearance type
|
|
7360
|
+
*/
|
|
7361
|
+
export declare type PaymentAppearance = PickAppearance<{
|
|
7362
|
+
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7363
|
+
theme: AntomTheme;
|
|
7364
|
+
variables: AntomVariables;
|
|
7365
|
+
layout: AntomLayouts;
|
|
7366
|
+
}>;
|
|
7367
|
+
|
|
7368
|
+
/**
|
|
7369
|
+
* @description Payment element
|
|
7370
|
+
*/
|
|
7371
|
+
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7372
|
+
static elementType: string;
|
|
7373
|
+
constructor(name: string, config: PaymentElementConfig);
|
|
7374
|
+
/**
|
|
7375
|
+
* @internal
|
|
7376
|
+
*/
|
|
7377
|
+
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7378
|
+
/**
|
|
7379
|
+
* @internal
|
|
7380
|
+
*/
|
|
7381
|
+
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7382
|
+
protected focus(): void;
|
|
7383
|
+
protected blur(): void;
|
|
7384
|
+
protected clear(): void;
|
|
7385
|
+
}
|
|
7386
|
+
|
|
7387
|
+
/**
|
|
7388
|
+
* @description Payment element config type
|
|
7389
|
+
*/
|
|
7390
|
+
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7391
|
+
}
|
|
7392
|
+
|
|
7393
|
+
/**
|
|
7394
|
+
* @description Payment element events
|
|
7395
|
+
*/
|
|
7396
|
+
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7397
|
+
}
|
|
7398
|
+
|
|
7243
7399
|
declare interface PaymentElementView {
|
|
7244
7400
|
/**
|
|
7245
7401
|
* @description payment element key
|
|
@@ -7341,6 +7497,36 @@ declare interface PaymentEvaluationResult {
|
|
|
7341
7497
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7342
7498
|
}
|
|
7343
7499
|
|
|
7500
|
+
/**
|
|
7501
|
+
* @description Payment guidance information (CKP scenario)
|
|
7502
|
+
*
|
|
7503
|
+
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
7504
|
+
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
7505
|
+
* via Map, dynamically addable)
|
|
7506
|
+
*/
|
|
7507
|
+
declare interface PaymentGuideInfo {
|
|
7508
|
+
/**
|
|
7509
|
+
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
7510
|
+
* payment guide button when this field is populated
|
|
7511
|
+
*/
|
|
7512
|
+
appLinkUrlForWeb?: string;
|
|
7513
|
+
/**
|
|
7514
|
+
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
7515
|
+
* text fields
|
|
7516
|
+
*
|
|
7517
|
+
* <p>Example configuration:
|
|
7518
|
+
*
|
|
7519
|
+
* <pre>
|
|
7520
|
+
* {
|
|
7521
|
+
* "dividerText": "or pay using",
|
|
7522
|
+
* "directPayButtonText": "Pay directly with online banking",
|
|
7523
|
+
* "ctoPButtonText": "Continue to payment"
|
|
7524
|
+
* }
|
|
7525
|
+
* </pre>
|
|
7526
|
+
*/
|
|
7527
|
+
copyWriting?: Record<string, any>;
|
|
7528
|
+
}
|
|
7529
|
+
|
|
7344
7530
|
/**
|
|
7345
7531
|
* @description 支付方式余额检查结果信息
|
|
7346
7532
|
*/
|
|
@@ -7403,6 +7589,10 @@ declare interface PaymentMethodView {
|
|
|
7403
7589
|
* @description icon
|
|
7404
7590
|
*/
|
|
7405
7591
|
icon?: string;
|
|
7592
|
+
/**
|
|
7593
|
+
* @description adaptive icon for PAYME payment method
|
|
7594
|
+
*/
|
|
7595
|
+
adaptiveIcon?: string;
|
|
7406
7596
|
/**
|
|
7407
7597
|
* @description icon对应的名称
|
|
7408
7598
|
*/
|
|
@@ -7411,6 +7601,10 @@ declare interface PaymentMethodView {
|
|
|
7411
7601
|
* @description 支付方式描述
|
|
7412
7602
|
*/
|
|
7413
7603
|
description?: string;
|
|
7604
|
+
/**
|
|
7605
|
+
* @description 支付方式点击后的描述
|
|
7606
|
+
*/
|
|
7607
|
+
descriptionAfterClick?: string;
|
|
7414
7608
|
/**
|
|
7415
7609
|
* @description category
|
|
7416
7610
|
*/
|
|
@@ -7545,6 +7739,10 @@ declare interface PaymentMethodView {
|
|
|
7545
7739
|
* @description 账单地址收集模式
|
|
7546
7740
|
*/
|
|
7547
7741
|
billingAddressCollectionMode?: string;
|
|
7742
|
+
/**
|
|
7743
|
+
* @description 分期银行信息列表
|
|
7744
|
+
*/
|
|
7745
|
+
supportIppBankList?: FrontSupportIppBank[];
|
|
7548
7746
|
}
|
|
7549
7747
|
|
|
7550
7748
|
declare interface PaymentOption {
|
|
@@ -7612,6 +7810,10 @@ declare interface PaymentOption {
|
|
|
7612
7810
|
* @description 支付选项Logo信息
|
|
7613
7811
|
*/
|
|
7614
7812
|
logo?: Logo;
|
|
7813
|
+
/**
|
|
7814
|
+
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
7815
|
+
*/
|
|
7816
|
+
description?: Record<string, string>;
|
|
7615
7817
|
/**
|
|
7616
7818
|
* @description extendInfo extendInfo information
|
|
7617
7819
|
*/
|
|
@@ -7679,6 +7881,13 @@ declare interface PaymentQuoteInfo {
|
|
|
7679
7881
|
* @description payment amount view
|
|
7680
7882
|
*/
|
|
7681
7883
|
paymentAmountView?: PaymentView;
|
|
7884
|
+
/**
|
|
7885
|
+
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
7886
|
+
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
7887
|
+
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
7888
|
+
* MYR/SGD currency pair
|
|
7889
|
+
*/
|
|
7890
|
+
quotePrice?: any;
|
|
7682
7891
|
}
|
|
7683
7892
|
|
|
7684
7893
|
/**
|
|
@@ -7788,6 +7997,45 @@ declare interface PaymentSessionConfig {
|
|
|
7788
7997
|
productSceneVersion?: string;
|
|
7789
7998
|
}
|
|
7790
7999
|
|
|
8000
|
+
/**
|
|
8001
|
+
* @description The submit params
|
|
8002
|
+
*/
|
|
8003
|
+
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8004
|
+
/**
|
|
8005
|
+
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8006
|
+
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8007
|
+
*/
|
|
8008
|
+
handleActions?: boolean;
|
|
8009
|
+
/**
|
|
8010
|
+
* @description 收件地址信息
|
|
8011
|
+
*/
|
|
8012
|
+
shippingInfo?: ShippingInfo;
|
|
8013
|
+
/**
|
|
8014
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
8015
|
+
*/
|
|
8016
|
+
params?: Record<string, unknown>;
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* @description Payment element submit result
|
|
8021
|
+
*/
|
|
8022
|
+
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8023
|
+
paymentSession?: {
|
|
8024
|
+
/**
|
|
8025
|
+
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8026
|
+
*/
|
|
8027
|
+
returnUrl: string;
|
|
8028
|
+
/**
|
|
8029
|
+
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8030
|
+
*/
|
|
8031
|
+
returnAppUrl?: string;
|
|
8032
|
+
/**
|
|
8033
|
+
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8034
|
+
*/
|
|
8035
|
+
returnAppScheme?: string;
|
|
8036
|
+
};
|
|
8037
|
+
}
|
|
8038
|
+
|
|
7791
8039
|
declare interface PaymentView {
|
|
7792
8040
|
/**
|
|
7793
8041
|
* @description 金额,以元为单位的金额
|
|
@@ -7845,56 +8093,6 @@ export declare interface PayPalConfig {
|
|
|
7845
8093
|
onShippingOptionsChange?: (data: any, actions: any) => Promise<void>;
|
|
7846
8094
|
}
|
|
7847
8095
|
|
|
7848
|
-
declare interface PerformancePlugin extends BaseInfoPlugin {
|
|
7849
|
-
getAnalyzePerformanceInfo?(): Record<string, any> | null;
|
|
7850
|
-
getPagePerformanceInfo?(): {
|
|
7851
|
-
onload: string | number;
|
|
7852
|
-
domContentLoad: string | number;
|
|
7853
|
-
redirect: string | number;
|
|
7854
|
-
appCache: string | number;
|
|
7855
|
-
dns: string | number;
|
|
7856
|
-
tcp: string | number;
|
|
7857
|
-
ssl: string | number;
|
|
7858
|
-
reqt: string | number;
|
|
7859
|
-
rest: string | number;
|
|
7860
|
-
dpt: string | number;
|
|
7861
|
-
ft: string | number;
|
|
7862
|
-
domInteractive: string | number;
|
|
7863
|
-
domReady: string | number;
|
|
7864
|
-
domComplete: string | number;
|
|
7865
|
-
random: string | number;
|
|
7866
|
-
miniPerformance?: ReturnType<typeof getMiniPerformance>;
|
|
7867
|
-
timeOrigin?: number;
|
|
7868
|
-
};
|
|
7869
|
-
getWebVitalsInfo?(): GetWebVitalsInfoResult;
|
|
7870
|
-
getWhiteScreenInfo?(options?: Pick<GetWhiteScreenInfoOptions, 'selector' | 'ignoreNotInViewport'>): Promise<{
|
|
7871
|
-
status: 'error' | 'ok';
|
|
7872
|
-
}>;
|
|
7873
|
-
getFMP?(options?: {
|
|
7874
|
-
ignoreElements?: string[];
|
|
7875
|
-
}): Promise<{
|
|
7876
|
-
time: number;
|
|
7877
|
-
selector: string;
|
|
7878
|
-
} | undefined>;
|
|
7879
|
-
getTTI?(): Promise<number | undefined>;
|
|
7880
|
-
getFP?(): Promise<number | undefined>;
|
|
7881
|
-
getT2Time?(): Promise<number | undefined>;
|
|
7882
|
-
/**
|
|
7883
|
-
* 将性能数据发送到容器,目前只需 H5 应用实现
|
|
7884
|
-
*/
|
|
7885
|
-
sendPerformanceDataToContainer?(data: LogItem): Promise<void>;
|
|
7886
|
-
getSnapshot?: () => {
|
|
7887
|
-
fmp: string;
|
|
7888
|
-
lcp: string;
|
|
7889
|
-
};
|
|
7890
|
-
/**
|
|
7891
|
-
* 用于采集详细的性能数据,越晚调用,搜集的数据越多
|
|
7892
|
-
*/
|
|
7893
|
-
getDetailPerformance?(): Promise<DMC | null>;
|
|
7894
|
-
startCheckingPageWhiteScreen?(config: GetWhiteScreenInfoOptions | boolean | undefined): Promise<(() => void) | undefined>;
|
|
7895
|
-
startCheckingDOMWhiteScreen?(selector: string, options: Omit<GetWhiteScreenInfoOptions, 'selector'>): (() => void) | undefined;
|
|
7896
|
-
}
|
|
7897
|
-
|
|
7898
8096
|
declare interface PeriodRule {
|
|
7899
8097
|
/**
|
|
7900
8098
|
* @description period type
|
|
@@ -7906,87 +8104,13 @@ declare interface PeriodRule {
|
|
|
7906
8104
|
periodCount?: number;
|
|
7907
8105
|
}
|
|
7908
8106
|
|
|
8107
|
+
/**
|
|
8108
|
+
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8109
|
+
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8110
|
+
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8111
|
+
*/
|
|
7909
8112
|
declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
|
|
7910
8113
|
|
|
7911
|
-
declare interface PluginContext {
|
|
7912
|
-
userPath: {
|
|
7913
|
-
reStoreUserPath: (appId: string) => void;
|
|
7914
|
-
parseUserPathExtra: (key: string) => {
|
|
7915
|
-
idengine_user_path: string;
|
|
7916
|
-
} | null;
|
|
7917
|
-
getUserPathExtra: () => {
|
|
7918
|
-
cachePath: string[];
|
|
7919
|
-
extra: {
|
|
7920
|
-
idengine_user_path: string;
|
|
7921
|
-
};
|
|
7922
|
-
};
|
|
7923
|
-
};
|
|
7924
|
-
waitInit: () => Promise<void>;
|
|
7925
|
-
}
|
|
7926
|
-
|
|
7927
|
-
declare type PluginFunction = (iTracert: ITracert, callback: () => void) => boolean;
|
|
7928
|
-
|
|
7929
|
-
declare type PluginInitOptions = Pick<OriginTrackerInitOptions, 'spmConfig' | 'autoExpo' | 'autoClick' | 'bizType' | 'appId' | 'compatibleAppId' | 'productId' | 'batchCount' | 'mdata' | 'env' | 'plugins' | 'userId' | 'ready' | 'isReport' | 'version' | 'chInfo' | 'expoOnce' | 'platform' | 'sprintId' | 'autoReportConfig' | 'enableJSAPIReport'> & {
|
|
7930
|
-
server?: string;
|
|
7931
|
-
servers?: string[];
|
|
7932
|
-
isMarmot?: boolean;
|
|
7933
|
-
deviceId?: Promise<string>;
|
|
7934
|
-
whiteScreenConfig?: (BlankMonitorConfig & {
|
|
7935
|
-
callback?: (options: ReportData) => Promise<void>;
|
|
7936
|
-
}) | boolean;
|
|
7937
|
-
spmCheckCover?: string;
|
|
7938
|
-
whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
|
|
7939
|
-
remoteConfigValidDuration?: number;
|
|
7940
|
-
};
|
|
7941
|
-
|
|
7942
|
-
declare interface PluginOnErrorCallbackErrorInfo {
|
|
7943
|
-
message: string;
|
|
7944
|
-
extra: Record<string, any>;
|
|
7945
|
-
type: ErrorType;
|
|
7946
|
-
}
|
|
7947
|
-
|
|
7948
|
-
declare interface PluginPageMonitorOptions {
|
|
7949
|
-
spmInfo: {
|
|
7950
|
-
spmAPos: string;
|
|
7951
|
-
spmBPos: string;
|
|
7952
|
-
currentPage: string;
|
|
7953
|
-
};
|
|
7954
|
-
logData?: Record<string, any>;
|
|
7955
|
-
}
|
|
7956
|
-
|
|
7957
|
-
declare interface PluginShape extends PerformancePlugin, LagPlugin {
|
|
7958
|
-
getRequester(): GetRequesterResult;
|
|
7959
|
-
getDataFilter?(): (data: string[]) => Promise<string[]>;
|
|
7960
|
-
getExtraDataFilter?(): (data: Record<string, any>) => Promise<Record<string, any>>;
|
|
7961
|
-
onSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
7962
|
-
offSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
7963
|
-
init?(options: PluginInitOptions): Promise<void>;
|
|
7964
|
-
onError?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): () => void;
|
|
7965
|
-
onPageLoad?(callback: () => void): () => void;
|
|
7966
|
-
set?(options: Record<string, any>): void;
|
|
7967
|
-
/**
|
|
7968
|
-
* @deprecated Compatible with old APIs. Use `Tracker#report` instead.
|
|
7969
|
-
* @param info
|
|
7970
|
-
* @param extra
|
|
7971
|
-
*/
|
|
7972
|
-
log?(type: string, params?: Record<string, any>): void;
|
|
7973
|
-
pageMonitor?(options: PluginPageMonitorOptions): void;
|
|
7974
|
-
expo?(code: string, extra?: Record<string, number | string | boolean>): void;
|
|
7975
|
-
click?(code: string, extra: Record<string, number | string | boolean>): void;
|
|
7976
|
-
getSessionItem?(key: string): string | null;
|
|
7977
|
-
removeSessionItem?(key: string): void;
|
|
7978
|
-
setSessionItem?(key: string, value: string): void;
|
|
7979
|
-
getSessionId?(): string | null;
|
|
7980
|
-
getStorageItem?(key: string): Promise<string | null>;
|
|
7981
|
-
removeStorageItem?(key: string): void;
|
|
7982
|
-
setStorageItem?(key: string, value: string): void;
|
|
7983
|
-
onHTTPError?(callback: (options: HTTPErrorCallbackOptions) => void): void;
|
|
7984
|
-
triggerPreCaptureReport?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): void;
|
|
7985
|
-
PluginShape?: void;
|
|
7986
|
-
initBehaviorListener?(addBehavior: AddBehavior, config: BehaviorConfig): void;
|
|
7987
|
-
reportAPI?(config: RequestHookConfig, callback: (options: APICallbackOptions) => void): void;
|
|
7988
|
-
}
|
|
7989
|
-
|
|
7990
8114
|
/**
|
|
7991
8115
|
* @description 政策信息,例如隐私链接,免责声明等
|
|
7992
8116
|
*/
|
|
@@ -9878,6 +10002,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
9878
10002
|
|
|
9879
10003
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
9880
10004
|
|
|
10005
|
+
/**
|
|
10006
|
+
* @description QR code configuration for code form view
|
|
10007
|
+
*/
|
|
10008
|
+
declare interface QrCodeConfig {
|
|
10009
|
+
/**
|
|
10010
|
+
* @description QR code render style, e.g. "rounded"
|
|
10011
|
+
*/
|
|
10012
|
+
renderStyle?: string;
|
|
10013
|
+
/**
|
|
10014
|
+
* @description QR code center icon, can be URL or Base64 format
|
|
10015
|
+
*/
|
|
10016
|
+
centerIcon?: string;
|
|
10017
|
+
/**
|
|
10018
|
+
* @description QR code corner icon, can be URL or Base64 format
|
|
10019
|
+
*/
|
|
10020
|
+
cornerIcon?: string;
|
|
10021
|
+
}
|
|
10022
|
+
|
|
9881
10023
|
declare interface Rate {
|
|
9882
10024
|
/**
|
|
9883
10025
|
* @description rate label value
|
|
@@ -9947,66 +10089,35 @@ declare class ReceivePort {
|
|
|
9947
10089
|
}): Promise<Record<string, any> | undefined>;
|
|
9948
10090
|
}
|
|
9949
10091
|
|
|
10092
|
+
/**
|
|
10093
|
+
* @description 从webapp重定向到新URL的配置项。
|
|
10094
|
+
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10095
|
+
*/
|
|
9950
10096
|
declare interface RedirectOption {
|
|
10097
|
+
/**
|
|
10098
|
+
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10099
|
+
*/
|
|
9951
10100
|
url: string;
|
|
10101
|
+
/**
|
|
10102
|
+
* @description 唤端到url地址,http或https的地址
|
|
10103
|
+
*/
|
|
10104
|
+
appLinkUrl?: string;
|
|
10105
|
+
/**
|
|
10106
|
+
* @description 唤端到schema地址, schema://的地址
|
|
10107
|
+
*/
|
|
10108
|
+
schemaUrl?: string;
|
|
10109
|
+
/**
|
|
10110
|
+
* @description 重定向模式,默认为redirect
|
|
10111
|
+
*/
|
|
9952
10112
|
mode?: 'redirect' | 'replace';
|
|
9953
10113
|
/**
|
|
9954
10114
|
* @description 是否重定向后销毁实例,默认为true
|
|
9955
10115
|
*/
|
|
9956
|
-
|
|
10116
|
+
destroy?: boolean;
|
|
9957
10117
|
}
|
|
9958
10118
|
|
|
9959
|
-
declare type ReportData = {
|
|
9960
|
-
title?: string;
|
|
9961
|
-
msg?: string | Error | Record<string, number | string> | Event;
|
|
9962
|
-
logType: 'error' | 'info';
|
|
9963
|
-
extra?: Record<string, number | boolean | string | undefined | Error | null>;
|
|
9964
|
-
} | ({
|
|
9965
|
-
logType: 'custom';
|
|
9966
|
-
} & LogItem);
|
|
9967
|
-
|
|
9968
10119
|
declare type RequestEnv = 'local' | 'dev' | 'sit' | 'pre' | 'prod' | 'sandbox' | 'light_sandbox';
|
|
9969
10120
|
|
|
9970
|
-
declare class RequesterCacheWrapper {
|
|
9971
|
-
private autoReportConfig;
|
|
9972
|
-
private dataCache;
|
|
9973
|
-
private lastSendTime;
|
|
9974
|
-
private batchCount;
|
|
9975
|
-
private sendFrequency;
|
|
9976
|
-
constructor(autoReportConfig: {
|
|
9977
|
-
immediate?: boolean;
|
|
9978
|
-
deviceId?: Promise<string>;
|
|
9979
|
-
isReport?: boolean;
|
|
9980
|
-
programVersion?: string;
|
|
9981
|
-
productId?: string;
|
|
9982
|
-
appId?: string;
|
|
9983
|
-
compatibleAppId?: string;
|
|
9984
|
-
bizType?: string;
|
|
9985
|
-
});
|
|
9986
|
-
report(options: ReportData & {
|
|
9987
|
-
request: GetRequesterResult;
|
|
9988
|
-
extraDataFilter?: (data: Record<string, any>) => Promise<Record<string, any>>;
|
|
9989
|
-
dataFilter?: (data: string[]) => Promise<string[]>;
|
|
9990
|
-
} & BaseInfo & {
|
|
9991
|
-
immediate?: boolean;
|
|
9992
|
-
}): Promise<void>;
|
|
9993
|
-
private send;
|
|
9994
|
-
/**
|
|
9995
|
-
* 分批发送请求
|
|
9996
|
-
*/
|
|
9997
|
-
private httpRequest;
|
|
9998
|
-
private sendBatch;
|
|
9999
|
-
}
|
|
10000
|
-
|
|
10001
|
-
declare type RequestHookConfig = {
|
|
10002
|
-
/**
|
|
10003
|
-
* @description 不上报的域名
|
|
10004
|
-
*/
|
|
10005
|
-
excludes?: Array<string | RegExp>;
|
|
10006
|
-
getFetchResponseInfo?: (headers: Headers, responseData: Record<string, any>, requestParam: Array<any>) => ResponseInfo;
|
|
10007
|
-
getXHRResponseInfo?: (response: XHRResponse) => ResponseInfo;
|
|
10008
|
-
};
|
|
10009
|
-
|
|
10010
10121
|
declare interface RequestOptions {
|
|
10011
10122
|
env?: RequestEnv;
|
|
10012
10123
|
baseURL?: string;
|
|
@@ -10031,15 +10142,6 @@ declare interface RequestOptions {
|
|
|
10031
10142
|
scope?: string;
|
|
10032
10143
|
}
|
|
10033
10144
|
|
|
10034
|
-
declare type ResponseInfo = {
|
|
10035
|
-
responseUrl?: string;
|
|
10036
|
-
traceId?: string;
|
|
10037
|
-
isSuccess?: boolean;
|
|
10038
|
-
errorCode?: string | number;
|
|
10039
|
-
errorMsg?: string;
|
|
10040
|
-
url?: string;
|
|
10041
|
-
};
|
|
10042
|
-
|
|
10043
10145
|
/**
|
|
10044
10146
|
* @description 国际支付标准结果码,参考主站<code>ErrorCode</code>实现。
|
|
10045
10147
|
*
|
|
@@ -10184,7 +10286,25 @@ declare interface SharePayInfo {
|
|
|
10184
10286
|
securityText?: string;
|
|
10185
10287
|
}
|
|
10186
10288
|
|
|
10187
|
-
declare interface ShippingInfo {
|
|
10289
|
+
export declare interface ShippingInfo {
|
|
10290
|
+
shippingName: {
|
|
10291
|
+
firstName: string;
|
|
10292
|
+
lastName: string;
|
|
10293
|
+
middleName?: string;
|
|
10294
|
+
fullName?: string;
|
|
10295
|
+
};
|
|
10296
|
+
shippingPhoneNo: string;
|
|
10297
|
+
shippingAddress: {
|
|
10298
|
+
region: string;
|
|
10299
|
+
address1: string;
|
|
10300
|
+
address2: string;
|
|
10301
|
+
city?: string;
|
|
10302
|
+
state?: string;
|
|
10303
|
+
zipCode: string;
|
|
10304
|
+
};
|
|
10305
|
+
}
|
|
10306
|
+
|
|
10307
|
+
declare interface ShippingInfo_2 {
|
|
10188
10308
|
/**
|
|
10189
10309
|
* @description The unique ID to identify the shipping info
|
|
10190
10310
|
*/
|
|
@@ -10396,14 +10516,6 @@ declare type SimplePseudos =
|
|
|
10396
10516
|
| ":volume-locked"
|
|
10397
10517
|
| ":xr-overlay";
|
|
10398
10518
|
|
|
10399
|
-
declare interface SpmConfig {
|
|
10400
|
-
spmAPos: string;
|
|
10401
|
-
bizType: string;
|
|
10402
|
-
pages?: Record<string, Record<string, string>>;
|
|
10403
|
-
mdata?: Record<string, number | string | boolean>;
|
|
10404
|
-
immediate?: boolean;
|
|
10405
|
-
}
|
|
10406
|
-
|
|
10407
10519
|
declare interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
10408
10520
|
/**
|
|
10409
10521
|
* This feature is not Baseline because it does not work in some of the most widely-used browsers.
|
|
@@ -24102,14 +24214,14 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
24102
24214
|
|
|
24103
24215
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
24104
24216
|
|
|
24217
|
+
export declare type SubmitParams = {
|
|
24218
|
+
redirect?: 'always' | 'if_required';
|
|
24219
|
+
};
|
|
24220
|
+
|
|
24105
24221
|
/**
|
|
24106
|
-
* @description
|
|
24222
|
+
* @description 成功时的数据类型
|
|
24107
24223
|
*/
|
|
24108
24224
|
export declare type SubmitResult = {
|
|
24109
|
-
/**
|
|
24110
|
-
* 查询到的状态
|
|
24111
|
-
*/
|
|
24112
|
-
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24113
24225
|
/**
|
|
24114
24226
|
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
24115
24227
|
* @deprecated 已废弃请读取error中的code
|
|
@@ -24122,6 +24234,10 @@ export declare type SubmitResult = {
|
|
|
24122
24234
|
* @internal
|
|
24123
24235
|
*/
|
|
24124
24236
|
message?: string;
|
|
24237
|
+
/**
|
|
24238
|
+
* 查询到的状态
|
|
24239
|
+
*/
|
|
24240
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24125
24241
|
/**
|
|
24126
24242
|
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
24127
24243
|
*/
|
|
@@ -24134,6 +24250,10 @@ export declare type SubmitResult = {
|
|
|
24134
24250
|
* 查询到的结果消息
|
|
24135
24251
|
*/
|
|
24136
24252
|
message?: string;
|
|
24253
|
+
/**
|
|
24254
|
+
* @description 是否需要更换 session 重试
|
|
24255
|
+
*/
|
|
24256
|
+
needChangeSessionForRetry?: boolean;
|
|
24137
24257
|
};
|
|
24138
24258
|
/**
|
|
24139
24259
|
* 是否是用户手动取消3D
|
|
@@ -24592,256 +24712,15 @@ declare interface TerminalTypeAction {
|
|
|
24592
24712
|
interactionType?: string;
|
|
24593
24713
|
}
|
|
24594
24714
|
|
|
24595
|
-
|
|
24596
|
-
|
|
24597
|
-
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
private cachePath;
|
|
24605
|
-
private userPathLength;
|
|
24606
|
-
private pathUserMeta;
|
|
24607
|
-
private isMarmot;
|
|
24608
|
-
protected appId?: string;
|
|
24609
|
-
protected compatibleAppId?: string;
|
|
24610
|
-
private plugin;
|
|
24611
|
-
private sprintId?;
|
|
24612
|
-
private userId;
|
|
24613
|
-
protected deviceId?: Promise<string>;
|
|
24614
|
-
protected programVersion?: string;
|
|
24615
|
-
private language?;
|
|
24616
|
-
protected bizType?: string;
|
|
24617
|
-
protected productId?: string;
|
|
24618
|
-
private whiteScreenConfig?;
|
|
24619
|
-
private performance?;
|
|
24620
|
-
protected isReport?: boolean;
|
|
24621
|
-
protected server?: string;
|
|
24622
|
-
protected servers?: string[];
|
|
24623
|
-
protected platform?: string;
|
|
24624
|
-
private env?;
|
|
24625
|
-
private immediate?;
|
|
24626
|
-
enableScreenshot: boolean | undefined | {
|
|
24627
|
-
rate: number;
|
|
24628
|
-
};
|
|
24629
|
-
private enableResourceAnalysis?;
|
|
24630
|
-
private _lag?;
|
|
24631
|
-
private spmCheckCover?;
|
|
24632
|
-
private enableBehavior?;
|
|
24633
|
-
private behavior?;
|
|
24634
|
-
private enableRequestHook?;
|
|
24635
|
-
private enableJSAPIReport?;
|
|
24636
|
-
private customizedPerformanceMark?;
|
|
24637
|
-
constructor(Plugin: new (context: PluginContext) => PluginShape);
|
|
24638
|
-
init(options: TrackerInitOptions): Promise<boolean>;
|
|
24639
|
-
/**
|
|
24640
|
-
* 业务侧可以拦截发送日志的请求,用于手动过滤
|
|
24641
|
-
* 当前仅对浏览器环境生效
|
|
24642
|
-
* rawData 是 intl-tracker 内部格式的数据,为对象
|
|
24643
|
-
* data 是最终发送到服务端的数据,为字符串形式
|
|
24644
|
-
*/
|
|
24645
|
-
onSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
24646
|
-
/**
|
|
24647
|
-
* 业务侧可以取消拦截发送日志的请求
|
|
24648
|
-
* 当前仅对浏览器环境生效
|
|
24649
|
-
*/
|
|
24650
|
-
offSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
24651
|
-
private startReportSnapshot;
|
|
24652
|
-
/**
|
|
24653
|
-
* 用于上报自定义性能指标,单次仅上报一个指标
|
|
24654
|
-
* @param key m1 - m20
|
|
24655
|
-
* @param num 耗时,数字,一定要 >= 0,否则无统计意义
|
|
24656
|
-
*/
|
|
24657
|
-
reportCustomizedPerformance(key: CustomizedPerformanceKey, num: number): void | undefined;
|
|
24658
|
-
/**
|
|
24659
|
-
* 上报自定义性能指标
|
|
24660
|
-
* @param data 适合单次合并上报多个指标的场景
|
|
24661
|
-
* 请注意,使用 reportCustomizedPerformance 上报时,每次上报会发送一次日志请求
|
|
24662
|
-
* 不同阶段的数据量会有差异,这些差异可以作为页面流失漏斗的数据源
|
|
24663
|
-
* 但合并上报时,同时上报的多个指标数量是相同的
|
|
24664
|
-
*/
|
|
24665
|
-
reportCustomizedPerformanceData(data: Partial<Record<CustomizedPerformanceKey, number>>): void | undefined;
|
|
24666
|
-
/**
|
|
24667
|
-
* 用于显式上报小程序性能指标
|
|
24668
|
-
* 由于小程序的性能指标仅在“使用 schema 打开页面”时有效,原来的自动上报未区分场景,会导致脏数据较多
|
|
24669
|
-
* 改为数据自动采集、仅在必要时由业务方手动调用接口上报
|
|
24670
|
-
*/
|
|
24671
|
-
reportMiniProgramPerformance(): Promise<void> | undefined;
|
|
24672
|
-
getMiniProgramPerformanceData(): Promise<{
|
|
24673
|
-
s1: number;
|
|
24674
|
-
s2: number;
|
|
24675
|
-
s3: number;
|
|
24676
|
-
s4: number;
|
|
24677
|
-
s5: number;
|
|
24678
|
-
s6: number;
|
|
24679
|
-
s7: number;
|
|
24680
|
-
s8: number;
|
|
24681
|
-
} | undefined> | undefined;
|
|
24682
|
-
/**
|
|
24683
|
-
* 用于显式上报网页性能指标,一般用不上
|
|
24684
|
-
* 1. tracker.onPageLoad() 会自动上报
|
|
24685
|
-
* 2. tracker.reportCustomizedPerformanceData() 会自动上报
|
|
24686
|
-
* 3. tracker.reportCustomizedPerformance() 会自动上报
|
|
24687
|
-
* 4. tracker.reportMiniProgramPerformance() 会自动上报
|
|
24688
|
-
* 5. 以上方法仅会上报一次网页性能指标,多次调用不受影响
|
|
24689
|
-
* 6. 仅当以上所有方法均未调用时,才需要手动调用此方法
|
|
24690
|
-
*/
|
|
24691
|
-
reportPagePerformance(): Promise<void> | undefined;
|
|
24692
|
-
private handleReportSnapShot;
|
|
24693
|
-
get lag(): {
|
|
24694
|
-
log: (msg: string) => Promise<void>;
|
|
24695
|
-
fps: () => Promise<void>;
|
|
24696
|
-
};
|
|
24697
|
-
onPageLoad(options?: string | {
|
|
24698
|
-
title?: string;
|
|
24699
|
-
fmpIgnoreElements?: string[];
|
|
24700
|
-
}): Promise<void>;
|
|
24701
|
-
reportPerformance(title?: string): void;
|
|
24702
|
-
reportDetailPerformance(): void;
|
|
24703
|
-
onError(): Promise<(() => void) | undefined>;
|
|
24704
|
-
fmp(time: number): void;
|
|
24705
|
-
flushBehavior(): void;
|
|
24706
|
-
/**
|
|
24707
|
-
* 内部使用
|
|
24708
|
-
*
|
|
24709
|
-
* @param error
|
|
24710
|
-
*/
|
|
24711
|
-
private reportError;
|
|
24712
|
-
private triggerPreCaptureReport;
|
|
24713
|
-
onHTTPError(): Promise<void>;
|
|
24714
|
-
private reportAPI;
|
|
24715
|
-
/**
|
|
24716
|
-
* 内部使用,业务项目不要调用
|
|
24717
|
-
*
|
|
24718
|
-
* @param options
|
|
24719
|
-
*/
|
|
24720
|
-
reportHTTPError(options: HTTPErrorCallbackOptions): void;
|
|
24721
|
-
set(options: Record<string, any>): void;
|
|
24722
|
-
log(item: LogItem): void;
|
|
24723
|
-
/**
|
|
24724
|
-
* @deprecated Compatible with old APIs. Use `Tracker#log` instead.
|
|
24725
|
-
* @param info
|
|
24726
|
-
* @param extra
|
|
24727
|
-
*/
|
|
24728
|
-
logInfo(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
|
|
24729
|
-
/**
|
|
24730
|
-
* @deprecated Compatible with old APIs. Use `Tracker#log` instead.
|
|
24731
|
-
* @param info
|
|
24732
|
-
* @param extra
|
|
24733
|
-
*/
|
|
24734
|
-
logError(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
|
|
24735
|
-
reportFunnel(title: string, config?: {
|
|
24736
|
-
[prop: string]: string | number;
|
|
24737
|
-
name: string;
|
|
24738
|
-
level: number;
|
|
24739
|
-
label: string;
|
|
24740
|
-
} | undefined): Promise<void>;
|
|
24741
|
-
reportRPC(rpcInfo: {
|
|
24742
|
-
name: string;
|
|
24743
|
-
label: string;
|
|
24744
|
-
code?: string | undefined;
|
|
24745
|
-
msg?: string | Error | Record<string, string | number> | undefined;
|
|
24746
|
-
success?: boolean | undefined;
|
|
24747
|
-
result?: number | undefined;
|
|
24748
|
-
traceId?: string | undefined;
|
|
24749
|
-
httpStatus?: string | undefined;
|
|
24750
|
-
time?: number | undefined;
|
|
24751
|
-
}): void;
|
|
24752
|
-
logJSBridgeError(info: LogInfo): void;
|
|
24753
|
-
pageMonitor(page: string, extraParams?: Record<string, any>, autoPv?: boolean): void;
|
|
24754
|
-
expo(code: string, extra?: Record<string, string | number | boolean> | undefined): void;
|
|
24755
|
-
click(code: string, extra?: Record<string, string | number | boolean>): void;
|
|
24756
|
-
pv(): void;
|
|
24757
|
-
/**
|
|
24758
|
-
* 指定点位白屏的监控 - 用于监控目标点位的白屏
|
|
24759
|
-
* 页面白屏和目标点位白屏的通用监控逻辑
|
|
24760
|
-
*
|
|
24761
|
-
* @param selector 目标点位选择器
|
|
24762
|
-
* @param options 配置项
|
|
24763
|
-
* {
|
|
24764
|
-
* 检测延时,单位 second,即启动白屏检测后多久开始执行白屏识别
|
|
24765
|
-
* NOTE: 设置时间时要考虑业务平均加载时间,太短可能会误报
|
|
24766
|
-
* delay
|
|
24767
|
-
*
|
|
24768
|
-
* 是否持续监测, 即初始化白屏检测结束之后是否继续监控业务运行中白屏, default: true
|
|
24769
|
-
* persistent
|
|
24770
|
-
* }
|
|
24771
|
-
*/
|
|
24772
|
-
startCheckingDOMWhiteScreen(selector: string, options: Omit<BlankMonitorConfig, 'selector'>): void;
|
|
24773
|
-
private getRequester;
|
|
24774
|
-
protected getDefaultExtraInfo(): Promise<BaseInfo>;
|
|
24775
|
-
private request;
|
|
24776
|
-
private formatExtra;
|
|
24777
|
-
private reportLog;
|
|
24778
|
-
/**
|
|
24779
|
-
* 解析成功率上报参数
|
|
24780
|
-
* @param key p_ page c_ click expo r l -info或者-error结尾是前端日志
|
|
24781
|
-
* @param funnelConfig 标准漏斗上报参数
|
|
24782
|
-
* @returns 扩展参数数据
|
|
24783
|
-
*/
|
|
24784
|
-
private parseUserPathExtra;
|
|
24785
|
-
/**
|
|
24786
|
-
* 获取成功率上报参数
|
|
24787
|
-
* 用于去冲
|
|
24788
|
-
*/
|
|
24789
|
-
private getUserPathExtra;
|
|
24790
|
-
/**
|
|
24791
|
-
* 恢复存储的用户路径
|
|
24792
|
-
*/
|
|
24793
|
-
private reStoreUserPath;
|
|
24794
|
-
private reStoreUserPathMeta;
|
|
24795
|
-
private reStoreSessionId;
|
|
24796
|
-
/**
|
|
24797
|
-
* 重置session id
|
|
24798
|
-
*/
|
|
24799
|
-
resetSessionId(): void;
|
|
24800
|
-
/**
|
|
24801
|
-
* 重置用户路径
|
|
24802
|
-
*/
|
|
24803
|
-
resetUserPath(): void;
|
|
24804
|
-
private normalizeServer;
|
|
24805
|
-
private normalizeServers;
|
|
24806
|
-
}
|
|
24807
|
-
|
|
24808
|
-
declare interface TrackerInitOptions {
|
|
24809
|
-
spmConfig?: SpmConfig;
|
|
24810
|
-
marmotId: string;
|
|
24811
|
-
compatibleAppId?: string;
|
|
24812
|
-
userId?: string;
|
|
24813
|
-
server?: IMDAP_SERVER | string;
|
|
24814
|
-
servers?: (IMDAP_SERVER | string)[];
|
|
24815
|
-
env?: Env_2;
|
|
24816
|
-
sprintId?: string;
|
|
24817
|
-
whiteScreen?: BlankMonitorConfig | boolean;
|
|
24818
|
-
immediate?: boolean;
|
|
24819
|
-
autoExpo?: boolean;
|
|
24820
|
-
autoClick?: boolean;
|
|
24821
|
-
expoOnce?: boolean;
|
|
24822
|
-
enableScreenshot?: boolean | {
|
|
24823
|
-
rate: number;
|
|
24824
|
-
};
|
|
24825
|
-
enableResourceAnalysis?: boolean;
|
|
24826
|
-
spmCheckCover?: string;
|
|
24827
|
-
enableBehavior?: BehaviorConfig | boolean;
|
|
24828
|
-
enableRequestHook?: RequestHookConfig | boolean;
|
|
24829
|
-
enableJSAPIReport?: boolean;
|
|
24830
|
-
/**
|
|
24831
|
-
* 白名单配置源,仅浏览器环境支持
|
|
24832
|
-
* 不传值时,与旧版功能相同,所有日志都会发送
|
|
24833
|
-
* 1. 值为 REMOTE 时,表示从远程服务器获取白名单配置
|
|
24834
|
-
* 2. 值为 NONE 时,表示不使用白名单配置,所有日志都会发送
|
|
24835
|
-
*/
|
|
24836
|
-
whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
|
|
24837
|
-
/**
|
|
24838
|
-
* 当且仅当 whiteListConfigSource 为 REMOTE 时有效
|
|
24839
|
-
* 在有效期内,不重复加载 json 请求
|
|
24840
|
-
*/
|
|
24841
|
-
remoteConfigValidDuration?: number;
|
|
24842
|
-
productId?: string;
|
|
24843
|
-
bizType?: string;
|
|
24844
|
-
}
|
|
24715
|
+
/**
|
|
24716
|
+
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
24717
|
+
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
24718
|
+
* 确保两条路径的弹窗 loading 表现一致。
|
|
24719
|
+
*/
|
|
24720
|
+
export declare const themeColorMap: Record<AntomTheme, {
|
|
24721
|
+
theme: 'dark' | 'light';
|
|
24722
|
+
backgroundColor: string;
|
|
24723
|
+
}>;
|
|
24845
24724
|
|
|
24846
24725
|
/**
|
|
24847
24726
|
* @description 交易信息
|
|
@@ -24936,7 +24815,8 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
24936
24815
|
export declare type VaultingAppearanceProps = {
|
|
24937
24816
|
displaySetting: 'showCardBrandIcon';
|
|
24938
24817
|
theme: AntomTheme;
|
|
24939
|
-
variables:
|
|
24818
|
+
variables: AntomVariables;
|
|
24819
|
+
fonts?: FontSource[];
|
|
24940
24820
|
};
|
|
24941
24821
|
|
|
24942
24822
|
/**
|
|
@@ -24965,7 +24845,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
24965
24845
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
24966
24846
|
}
|
|
24967
24847
|
|
|
24968
|
-
export declare interface VaultingElementEvents extends
|
|
24848
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
24969
24849
|
}
|
|
24970
24850
|
|
|
24971
24851
|
/**
|
|
@@ -28605,16 +28485,9 @@ declare interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, T
|
|
|
28605
28485
|
|
|
28606
28486
|
declare type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>;
|
|
28607
28487
|
|
|
28608
|
-
declare type WHITE_LIST_CONFIG_SOURCE = 'REMOTE' | 'NONE';
|
|
28609
|
-
|
|
28610
28488
|
declare type WithAppURL<T> = T & {
|
|
28611
28489
|
appUrl: string;
|
|
28612
28490
|
isMainElement: boolean;
|
|
28613
28491
|
};
|
|
28614
28492
|
|
|
28615
|
-
declare type XHRResponse = {
|
|
28616
|
-
headers: ReturnType<XMLHttpRequest['getAllResponseHeaders']>;
|
|
28617
|
-
body: XMLHttpRequest['response'];
|
|
28618
|
-
};
|
|
28619
|
-
|
|
28620
28493
|
export { }
|