@alipay/ams-checkout 2.0.20 → 2.0.22
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/element/elementController/index.d.ts +3 -3
- package/esm/core/component/element/elementController/index.js +66 -42
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +13 -10
- 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 +1 -1
- 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 +1818 -0
- package/esm/core/component/element/type.d.ts +16 -18
- 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 +3 -3
- package/esm/plugin/component/channel.js +28 -19
- package/esm/plugin/component/index.js +36 -29
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/types/index.d.ts +1 -0
- 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 +872 -1102
- package/types.untrimmed.d.ts +1024 -1121
- 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
|
+
* 查询到的结果消息
|
|
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';
|
|
@@ -751,6 +854,16 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
751
854
|
merged: AppConfig;
|
|
752
855
|
updated: Partial<AppConfig>;
|
|
753
856
|
};
|
|
857
|
+
/**
|
|
858
|
+
* 更新配置时的回复事件,包含可能发生的错误信息。
|
|
859
|
+
* 如果 error 为 undefined,则表示没有错误发生。
|
|
860
|
+
*/
|
|
861
|
+
"OPENSDK@UPDATE_CONFIG_REPLY": {
|
|
862
|
+
/**
|
|
863
|
+
* 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
|
|
864
|
+
*/
|
|
865
|
+
error?: ErrorPayload<string>;
|
|
866
|
+
} | undefined;
|
|
754
867
|
/**
|
|
755
868
|
* @internal 内部事件 不暴露给商户
|
|
756
869
|
*/
|
|
@@ -789,6 +902,10 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
789
902
|
* @internal 内部事件 不暴露给商户
|
|
790
903
|
*/
|
|
791
904
|
"OPENSDK@TRANSFER_MODAL_APPEARANCE": Appearance;
|
|
905
|
+
/**
|
|
906
|
+
* @internal 内部事件 不暴露给商户
|
|
907
|
+
*/
|
|
908
|
+
"OPENSDK@TRANSFER_MODAL_INITIALDATA": Record<string, any>;
|
|
792
909
|
/**
|
|
793
910
|
* @internal 内部事件 不暴露给商户
|
|
794
911
|
*/
|
|
@@ -816,6 +933,12 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
816
933
|
* @internal 内部高度变化,同步到sdk更新iframe
|
|
817
934
|
*/
|
|
818
935
|
"OPENSDK@HEIGHT_UPDATE": number;
|
|
936
|
+
/**
|
|
937
|
+
* @internal 内部销毁元素,同步到sdk销毁元素
|
|
938
|
+
*/
|
|
939
|
+
"OPENSDK@DESTROY_ELEMENT": {
|
|
940
|
+
elementKey: string;
|
|
941
|
+
};
|
|
819
942
|
}
|
|
820
943
|
|
|
821
944
|
declare interface BaseConfig {
|
|
@@ -840,6 +963,12 @@ declare interface BaseConfig {
|
|
|
840
963
|
* @internal 不透出到用户
|
|
841
964
|
*/
|
|
842
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;
|
|
843
972
|
}
|
|
844
973
|
|
|
845
974
|
/**
|
|
@@ -882,12 +1011,14 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
882
1011
|
* @internal 内部使用
|
|
883
1012
|
*/
|
|
884
1013
|
iframe: HTMLIFrameElement | null;
|
|
885
|
-
status:
|
|
1014
|
+
status: ElementStatus;
|
|
886
1015
|
/**
|
|
887
1016
|
* @description 等待发送的时间
|
|
888
1017
|
* @internal 外部不要访问
|
|
889
1018
|
*/
|
|
890
1019
|
private cachedSend;
|
|
1020
|
+
/** Reuses the pending reply for concurrent submit calls. */
|
|
1021
|
+
private submitPromise?;
|
|
891
1022
|
constructor(name: string, config: WithAppURL<Config>);
|
|
892
1023
|
/**
|
|
893
1024
|
* @internal 外部不能直接调用
|
|
@@ -898,10 +1029,16 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
898
1029
|
* @internal 外部不能直接调用
|
|
899
1030
|
*/
|
|
900
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>;
|
|
901
1038
|
/**
|
|
902
|
-
* @param {
|
|
1039
|
+
* @param {HTMLElement} container
|
|
903
1040
|
*/
|
|
904
|
-
mount(
|
|
1041
|
+
mount(container: HTMLElement): Promise<void>;
|
|
905
1042
|
/**
|
|
906
1043
|
* @description 内部使用,挂载iframe
|
|
907
1044
|
* @internal 外部不能直接调用
|
|
@@ -911,7 +1048,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
911
1048
|
* 更新webapp配置
|
|
912
1049
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
913
1050
|
*/
|
|
914
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
1051
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
|
|
915
1052
|
/**
|
|
916
1053
|
* 卸载元素
|
|
917
1054
|
*/
|
|
@@ -971,24 +1108,32 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
971
1108
|
* @param fn 构建回调
|
|
972
1109
|
* @internal
|
|
973
1110
|
*/
|
|
974
|
-
_addHook(hookName: 'ondestroy', fn: () => void): () => void;
|
|
1111
|
+
_addHook(hookName: 'ondestroy', fn: (preStatus: ElementStatus) => void): () => void;
|
|
975
1112
|
}
|
|
976
1113
|
|
|
977
1114
|
declare interface BaseElementAppConfig {
|
|
1115
|
+
/**
|
|
1116
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
1117
|
+
*/
|
|
978
1118
|
locale?: string;
|
|
979
1119
|
/**
|
|
980
|
-
* @internal
|
|
1120
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
981
1121
|
*/
|
|
982
1122
|
env?: 'sandbox' | 'prod';
|
|
983
1123
|
/**
|
|
984
|
-
* @description
|
|
1124
|
+
* @description 商户的唯一标识,用于监控
|
|
985
1125
|
* @internal 不透出到用户
|
|
986
1126
|
*/
|
|
987
1127
|
merchantId?: string;
|
|
988
1128
|
[key: string]: any;
|
|
989
1129
|
}
|
|
990
1130
|
|
|
991
|
-
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;
|
|
992
1137
|
appConfig: T;
|
|
993
1138
|
elementMode: ElementMode;
|
|
994
1139
|
}
|
|
@@ -1045,6 +1190,10 @@ declare abstract class BaseFactory {
|
|
|
1045
1190
|
* @internal
|
|
1046
1191
|
*/
|
|
1047
1192
|
private isInit;
|
|
1193
|
+
/**
|
|
1194
|
+
* Indicates whether this factory instance has been destroyed.
|
|
1195
|
+
*/
|
|
1196
|
+
isDestroyed: boolean;
|
|
1048
1197
|
/**
|
|
1049
1198
|
* @description 当前版本号
|
|
1050
1199
|
* 用于日志上报
|
|
@@ -1084,6 +1233,7 @@ declare abstract class BaseFactory {
|
|
|
1084
1233
|
*/
|
|
1085
1234
|
constructor(config: BaseFactoryConfig);
|
|
1086
1235
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
1236
|
+
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
1087
1237
|
/**
|
|
1088
1238
|
* @description 子类必须实现此方法,返回工厂可用的元素类列表
|
|
1089
1239
|
* @internal
|
|
@@ -1094,7 +1244,7 @@ declare abstract class BaseFactory {
|
|
|
1094
1244
|
*/
|
|
1095
1245
|
init(): Promise<this>;
|
|
1096
1246
|
/**
|
|
1097
|
-
* @description 默认情况下,生成元素的key为elementType
|
|
1247
|
+
* @description 默认情况下,生成元素的key为elementType,如有特殊需求,可重写此方法,key请以${elementType}开头,如elementType是payment则key可以是paymentXXX或者payment
|
|
1098
1248
|
* @internal
|
|
1099
1249
|
*/
|
|
1100
1250
|
protected generateElementKey(elementType: string, _options?: Partial<BaseElementAppConfig>): string;
|
|
@@ -1170,26 +1320,6 @@ declare interface BaseFactoryConfig extends BaseConfig {
|
|
|
1170
1320
|
trackerCode?: string;
|
|
1171
1321
|
}
|
|
1172
1322
|
|
|
1173
|
-
declare type BaseInfo = BrowserInfo & DeviceInfo & NetworkInfo & LocationInfo & EnvInfo & OSInfo & {
|
|
1174
|
-
sdk?: string;
|
|
1175
|
-
marmotId?: string;
|
|
1176
|
-
compatibleAppId?: string;
|
|
1177
|
-
deviceId?: string;
|
|
1178
|
-
userId?: string;
|
|
1179
|
-
programVer?: string;
|
|
1180
|
-
language?: string;
|
|
1181
|
-
timezone?: string;
|
|
1182
|
-
bizType?: string;
|
|
1183
|
-
productId?: string;
|
|
1184
|
-
clientId?: string;
|
|
1185
|
-
visibleState?: 'visible' | 'hidden' | 'app-visible' | 'page-visible' | 'app-hidden' | 'page-hidden';
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
declare interface BaseInfoPlugin {
|
|
1189
|
-
getAppName?(): Promise<string | undefined>;
|
|
1190
|
-
getDefaultExtraInfo?(): Promise<BaseInfo>;
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
1323
|
/**
|
|
1194
1324
|
* @description 主元素,可以独立提交
|
|
1195
1325
|
*/
|
|
@@ -1209,6 +1339,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
1209
1339
|
_submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
|
|
1210
1340
|
}
|
|
1211
1341
|
|
|
1342
|
+
/**
|
|
1343
|
+
* @description 打开模态框的配置项。
|
|
1344
|
+
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1345
|
+
*/
|
|
1212
1346
|
declare interface BaseOpenModalConfig {
|
|
1213
1347
|
/**
|
|
1214
1348
|
* 无需手动传递,app的唯一scope
|
|
@@ -1232,74 +1366,23 @@ declare interface BaseOpenModalConfig {
|
|
|
1232
1366
|
onClose?: () => void;
|
|
1233
1367
|
url: string;
|
|
1234
1368
|
/**
|
|
1235
|
-
*
|
|
1369
|
+
* @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
|
|
1236
1370
|
*/
|
|
1237
1371
|
closeConfirm?: boolean;
|
|
1372
|
+
/**
|
|
1373
|
+
* @description 需要同步的外观配置
|
|
1374
|
+
*/
|
|
1238
1375
|
appearance?: Appearance;
|
|
1376
|
+
/**
|
|
1377
|
+
* @description 需要传递的初始化数据
|
|
1378
|
+
*/
|
|
1379
|
+
initialData?: Record<string, any>;
|
|
1380
|
+
/**
|
|
1381
|
+
* @description 无需手动传递, 模态框的唯一标识
|
|
1382
|
+
*/
|
|
1383
|
+
modalId?: string;
|
|
1239
1384
|
}
|
|
1240
1385
|
|
|
1241
|
-
declare type BehaviorConfig = {
|
|
1242
|
-
enableConsole?: boolean;
|
|
1243
|
-
};
|
|
1244
|
-
|
|
1245
|
-
declare interface BehaviorData {
|
|
1246
|
-
type: string;
|
|
1247
|
-
data: {
|
|
1248
|
-
msg?: string | null;
|
|
1249
|
-
from?: string;
|
|
1250
|
-
to?: string;
|
|
1251
|
-
};
|
|
1252
|
-
timestamp: number;
|
|
1253
|
-
times?: number;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
declare type BlankMonitorConfig = {
|
|
1257
|
-
selector?: string | string[];
|
|
1258
|
-
delay?: number | (() => number);
|
|
1259
|
-
persistent?: boolean;
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
declare interface BrowserInfo {
|
|
1263
|
-
title?: string;
|
|
1264
|
-
fullUrl?: string;
|
|
1265
|
-
url?: string;
|
|
1266
|
-
referrer?: string;
|
|
1267
|
-
domCnt?: number;
|
|
1268
|
-
delay?: number;
|
|
1269
|
-
scrollTop?: number;
|
|
1270
|
-
lastAction?: string;
|
|
1271
|
-
sessionId?: string;
|
|
1272
|
-
containerPageSessionId?: string;
|
|
1273
|
-
containerSessionId?: string;
|
|
1274
|
-
ua?: string;
|
|
1275
|
-
browser?: string;
|
|
1276
|
-
cCoreVer?: string;
|
|
1277
|
-
assetsVer?: string;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
declare type C = {
|
|
1281
|
-
c1?: string;
|
|
1282
|
-
c2?: string;
|
|
1283
|
-
c3?: string;
|
|
1284
|
-
c4?: string;
|
|
1285
|
-
c5?: string;
|
|
1286
|
-
c6?: string;
|
|
1287
|
-
c7?: string;
|
|
1288
|
-
c8?: string;
|
|
1289
|
-
c9?: string;
|
|
1290
|
-
c10?: string;
|
|
1291
|
-
c11?: string;
|
|
1292
|
-
c12?: string;
|
|
1293
|
-
c13?: string;
|
|
1294
|
-
c14?: string;
|
|
1295
|
-
c15?: string;
|
|
1296
|
-
c16?: string;
|
|
1297
|
-
c17?: string;
|
|
1298
|
-
c18?: string;
|
|
1299
|
-
c19?: string;
|
|
1300
|
-
c20?: string;
|
|
1301
|
-
};
|
|
1302
|
-
|
|
1303
1386
|
/**
|
|
1304
1387
|
* @description C2P标识
|
|
1305
1388
|
*/
|
|
@@ -1333,6 +1416,42 @@ declare interface C2PProps {
|
|
|
1333
1416
|
merchantTransactionId?: string;
|
|
1334
1417
|
}
|
|
1335
1418
|
|
|
1419
|
+
/**
|
|
1420
|
+
* @description native回调错误信息格式
|
|
1421
|
+
* @internal
|
|
1422
|
+
*/
|
|
1423
|
+
export declare interface CallbackErrorInfo {
|
|
1424
|
+
code: string;
|
|
1425
|
+
message?: string;
|
|
1426
|
+
needChangeSessionForRetry?: boolean;
|
|
1427
|
+
traceId?: string;
|
|
1428
|
+
context?: string;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* @description native回调返回数据
|
|
1433
|
+
* @internal
|
|
1434
|
+
*/
|
|
1435
|
+
export declare interface CallbackReturnData {
|
|
1436
|
+
status?: string;
|
|
1437
|
+
userCanceled3D?: boolean;
|
|
1438
|
+
isExposed?: boolean;
|
|
1439
|
+
error?: CallbackErrorInfo;
|
|
1440
|
+
session?: {
|
|
1441
|
+
nextAction?: CallbackSessionNextAction;
|
|
1442
|
+
};
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* @description native回调会话下一步操作,包含了回调的url
|
|
1447
|
+
* @internal
|
|
1448
|
+
*/
|
|
1449
|
+
export declare interface CallbackSessionNextAction {
|
|
1450
|
+
normalUrl?: string;
|
|
1451
|
+
schemeUrl?: string;
|
|
1452
|
+
applinkUrl?: string;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1336
1455
|
declare interface CardIssuerAuthentication {
|
|
1337
1456
|
/**
|
|
1338
1457
|
* @description 卡售卖单元
|
|
@@ -1750,7 +1869,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1750
1869
|
/**
|
|
1751
1870
|
* @description 物流信息, 包含物流地址和物流费
|
|
1752
1871
|
*/
|
|
1753
|
-
shippingInfo?:
|
|
1872
|
+
shippingInfo?: ShippingInfo_2;
|
|
1754
1873
|
/**
|
|
1755
1874
|
* @description 用户已绑资产信息
|
|
1756
1875
|
*/
|
|
@@ -1783,28 +1902,6 @@ declare interface ChargeInfo {
|
|
|
1783
1902
|
chargeActualAmountView?: PaymentView;
|
|
1784
1903
|
}
|
|
1785
1904
|
|
|
1786
|
-
/** click 事件 resolve 参数 */
|
|
1787
|
-
export declare interface ClickResolveOptions {
|
|
1788
|
-
amount?: {
|
|
1789
|
-
currency: string;
|
|
1790
|
-
value: string;
|
|
1791
|
-
};
|
|
1792
|
-
shippingAddressRequired?: boolean;
|
|
1793
|
-
allowedShippingCountries?: string[];
|
|
1794
|
-
shippingRates?: Array<{
|
|
1795
|
-
id: string;
|
|
1796
|
-
displayName: string;
|
|
1797
|
-
amount: string;
|
|
1798
|
-
}>;
|
|
1799
|
-
lineItems?: Array<{
|
|
1800
|
-
name: string;
|
|
1801
|
-
amount: string;
|
|
1802
|
-
}>;
|
|
1803
|
-
business?: {
|
|
1804
|
-
name: string;
|
|
1805
|
-
};
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
1905
|
declare interface CodeFormView {
|
|
1809
1906
|
/**
|
|
1810
1907
|
* @description title
|
|
@@ -1830,6 +1927,11 @@ declare interface CodeFormView {
|
|
|
1830
1927
|
* @description label
|
|
1831
1928
|
*/
|
|
1832
1929
|
label?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
1932
|
+
* when appLinkUrlForWeb is populated
|
|
1933
|
+
*/
|
|
1934
|
+
paymentGuideInfo?: PaymentGuideInfo;
|
|
1833
1935
|
/**
|
|
1834
1936
|
* @description 提醒事项
|
|
1835
1937
|
*/
|
|
@@ -1846,6 +1948,10 @@ declare interface CodeFormView {
|
|
|
1846
1948
|
* @description 码过期时间
|
|
1847
1949
|
*/
|
|
1848
1950
|
codeExpireTime?: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
1953
|
+
*/
|
|
1954
|
+
qrcodeConfig?: QrCodeConfig;
|
|
1849
1955
|
}
|
|
1850
1956
|
|
|
1851
1957
|
/**
|
|
@@ -2313,68 +2419,7 @@ declare interface ComIpayIexpprodServiceFacadeCommonPromotionInfo {
|
|
|
2313
2419
|
extendInfo?: Record<string, string>;
|
|
2314
2420
|
}
|
|
2315
2421
|
|
|
2316
|
-
declare
|
|
2317
|
-
private mdata;
|
|
2318
|
-
initi(options: OriginTrackerInitOptions & {
|
|
2319
|
-
performance?: boolean;
|
|
2320
|
-
error?: boolean;
|
|
2321
|
-
}): Promise<boolean>;
|
|
2322
|
-
set(options: Record<string, any>): void;
|
|
2323
|
-
protected getDefaultExtraInfo(): Promise<{
|
|
2324
|
-
title?: string | undefined;
|
|
2325
|
-
fullUrl?: string | undefined;
|
|
2326
|
-
url?: string | undefined;
|
|
2327
|
-
referrer?: string | undefined;
|
|
2328
|
-
domCnt?: number | undefined;
|
|
2329
|
-
delay?: number | undefined;
|
|
2330
|
-
scrollTop?: number | undefined;
|
|
2331
|
-
lastAction?: string | undefined;
|
|
2332
|
-
sessionId?: string | undefined;
|
|
2333
|
-
containerPageSessionId?: string | undefined;
|
|
2334
|
-
containerSessionId?: string | undefined;
|
|
2335
|
-
ua?: string | undefined;
|
|
2336
|
-
browser?: string | undefined;
|
|
2337
|
-
cCoreVer?: string | undefined;
|
|
2338
|
-
assetsVer?: string | undefined;
|
|
2339
|
-
device?: string | undefined;
|
|
2340
|
-
deviceType?: string | undefined;
|
|
2341
|
-
deviceBrand?: string | undefined;
|
|
2342
|
-
deviceModel?: string | undefined;
|
|
2343
|
-
screenWidth?: number | undefined;
|
|
2344
|
-
screenHeight?: number | undefined;
|
|
2345
|
-
contentHeight?: number | undefined;
|
|
2346
|
-
pixelRatio?: number | undefined;
|
|
2347
|
-
cClient?: string | undefined;
|
|
2348
|
-
networkType?: string | undefined;
|
|
2349
|
-
isp?: string | undefined;
|
|
2350
|
-
ip?: string | undefined;
|
|
2351
|
-
countryName?: string | undefined;
|
|
2352
|
-
cityName?: string | undefined;
|
|
2353
|
-
provinceName?: string | undefined;
|
|
2354
|
-
area?: string | undefined;
|
|
2355
|
-
env?: Env_2 | undefined;
|
|
2356
|
-
sprintId?: string | undefined;
|
|
2357
|
-
container?: string | undefined;
|
|
2358
|
-
cOfflineVer?: string | undefined;
|
|
2359
|
-
serverIp?: string | undefined;
|
|
2360
|
-
serverEnv?: string | undefined;
|
|
2361
|
-
canaryFlag?: string | undefined;
|
|
2362
|
-
os?: string | undefined;
|
|
2363
|
-
osVer?: string | undefined;
|
|
2364
|
-
sdk?: string | undefined;
|
|
2365
|
-
marmotId?: string | undefined;
|
|
2366
|
-
compatibleAppId?: string | undefined;
|
|
2367
|
-
deviceId?: string | undefined;
|
|
2368
|
-
userId?: string | undefined;
|
|
2369
|
-
programVer?: string | undefined;
|
|
2370
|
-
language?: string | undefined;
|
|
2371
|
-
timezone?: string | undefined;
|
|
2372
|
-
bizType?: string | undefined;
|
|
2373
|
-
productId?: string | undefined;
|
|
2374
|
-
clientId?: string | undefined;
|
|
2375
|
-
visibleState?: "hidden" | "visible" | "app-visible" | "page-visible" | "app-hidden" | "page-hidden" | undefined;
|
|
2376
|
-
}>;
|
|
2377
|
-
}
|
|
2422
|
+
declare type CompatibleTrackerFullOptions = ConstructorParameters<typeof CompatibleTrackerFull>[0];
|
|
2378
2423
|
|
|
2379
2424
|
/**
|
|
2380
2425
|
* @description googlePay createPaymentSession 入参
|
|
@@ -2399,13 +2444,17 @@ export declare interface ConfirmCardSetupOptions {
|
|
|
2399
2444
|
redirect?: 'always' | 'if_required';
|
|
2400
2445
|
}
|
|
2401
2446
|
|
|
2402
|
-
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'
|
|
2447
|
+
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'>, PaymentSubmitParams {
|
|
2403
2448
|
sessionData: string;
|
|
2404
2449
|
/**
|
|
2405
|
-
* @description 传入已挂载的 CVVElement
|
|
2450
|
+
* @description 传入已挂载的 CVVElement / PaymentElement / Elements 实例,不传则使用无 UI 自动提交模式
|
|
2406
2451
|
*/
|
|
2407
2452
|
elements?: BaseMainElement | BaseElements;
|
|
2408
2453
|
appearance?: CVVAppearance;
|
|
2454
|
+
/**
|
|
2455
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
2456
|
+
*/
|
|
2457
|
+
params?: Record<string, unknown>;
|
|
2409
2458
|
}
|
|
2410
2459
|
|
|
2411
2460
|
/**
|
|
@@ -2477,6 +2526,13 @@ declare namespace CSS_2 {
|
|
|
2477
2526
|
}
|
|
2478
2527
|
}
|
|
2479
2528
|
|
|
2529
|
+
/**
|
|
2530
|
+
* CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
|
|
2531
|
+
*/
|
|
2532
|
+
declare interface CssFontSource {
|
|
2533
|
+
cssSrc: string;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2480
2536
|
declare interface CurrencyInfo {
|
|
2481
2537
|
/**
|
|
2482
2538
|
* @description Getter method for property <tt>currencyCode</tt>.
|
|
@@ -2522,15 +2578,21 @@ declare interface CustomerFxInfo {
|
|
|
2522
2578
|
}
|
|
2523
2579
|
|
|
2524
2580
|
/**
|
|
2525
|
-
*
|
|
2581
|
+
* 自定义字体源 — 通过 @font-face 加载自托管字体
|
|
2526
2582
|
*/
|
|
2527
|
-
declare
|
|
2583
|
+
declare interface CustomFontSource {
|
|
2584
|
+
family: string;
|
|
2585
|
+
src: string;
|
|
2586
|
+
weight?: string;
|
|
2587
|
+
style?: string;
|
|
2588
|
+
unicodeRange?: string;
|
|
2589
|
+
}
|
|
2528
2590
|
|
|
2529
2591
|
/**
|
|
2530
2592
|
* @public
|
|
2531
2593
|
* @description CVV element app config type
|
|
2532
2594
|
*/
|
|
2533
|
-
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance
|
|
2595
|
+
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
|
|
2534
2596
|
/**
|
|
2535
2597
|
* @description sessionData
|
|
2536
2598
|
*/
|
|
@@ -2568,7 +2630,8 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2568
2630
|
|
|
2569
2631
|
export declare type CVVAppearanceProps = {
|
|
2570
2632
|
theme: AntomTheme;
|
|
2571
|
-
variables:
|
|
2633
|
+
variables: AntomVariables;
|
|
2634
|
+
fonts?: FontSource[];
|
|
2572
2635
|
};
|
|
2573
2636
|
|
|
2574
2637
|
/**
|
|
@@ -2660,6 +2723,10 @@ export declare interface CVVSubmitParams {
|
|
|
2660
2723
|
* 重定向策略
|
|
2661
2724
|
*/
|
|
2662
2725
|
redirect?: 'always' | 'if_required';
|
|
2726
|
+
/**
|
|
2727
|
+
* 集成用户自定义信息(如 cardHolderName)
|
|
2728
|
+
*/
|
|
2729
|
+
params?: Record<string, unknown>;
|
|
2663
2730
|
}
|
|
2664
2731
|
|
|
2665
2732
|
declare interface DanaSofCouponInfo {
|
|
@@ -3237,18 +3304,6 @@ declare interface DeliveryEstimateInfo {
|
|
|
3237
3304
|
value?: number;
|
|
3238
3305
|
}
|
|
3239
3306
|
|
|
3240
|
-
declare interface DeviceInfo {
|
|
3241
|
-
device?: string;
|
|
3242
|
-
deviceType?: string;
|
|
3243
|
-
deviceBrand?: string;
|
|
3244
|
-
deviceModel?: string;
|
|
3245
|
-
screenWidth?: number;
|
|
3246
|
-
screenHeight?: number;
|
|
3247
|
-
contentHeight?: number;
|
|
3248
|
-
pixelRatio?: number;
|
|
3249
|
-
cClient?: string;
|
|
3250
|
-
}
|
|
3251
|
-
|
|
3252
3307
|
/**
|
|
3253
3308
|
* @description 立减型营销信息
|
|
3254
3309
|
*/
|
|
@@ -3294,29 +3349,6 @@ declare interface DisplayItem {
|
|
|
3294
3349
|
status?: string;
|
|
3295
3350
|
}
|
|
3296
3351
|
|
|
3297
|
-
declare type DMC = {
|
|
3298
|
-
d1?: number | string;
|
|
3299
|
-
d2?: number | string;
|
|
3300
|
-
d3?: number | string;
|
|
3301
|
-
d4?: number | string;
|
|
3302
|
-
d5?: number | string;
|
|
3303
|
-
d6?: number | string;
|
|
3304
|
-
d7?: number | string;
|
|
3305
|
-
d8?: number | string;
|
|
3306
|
-
d9?: number | string;
|
|
3307
|
-
d10?: number | string;
|
|
3308
|
-
d11?: number | string;
|
|
3309
|
-
d12?: number | string;
|
|
3310
|
-
d13?: number | string;
|
|
3311
|
-
d14?: number | string;
|
|
3312
|
-
d15?: number | string;
|
|
3313
|
-
d16?: number | string;
|
|
3314
|
-
d17?: number | string;
|
|
3315
|
-
d18?: number | string;
|
|
3316
|
-
d19?: number | string;
|
|
3317
|
-
d20?: number | string;
|
|
3318
|
-
} & C & M;
|
|
3319
|
-
|
|
3320
3352
|
/**
|
|
3321
3353
|
* @description 元素列表项类型
|
|
3322
3354
|
*/
|
|
@@ -3378,21 +3410,9 @@ declare class Elements extends BaseElements {
|
|
|
3378
3410
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3379
3411
|
}
|
|
3380
3412
|
|
|
3381
|
-
declare type
|
|
3413
|
+
declare type ElementStatus = 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed' | 'unmounted';
|
|
3382
3414
|
|
|
3383
|
-
declare type
|
|
3384
|
-
|
|
3385
|
-
declare type Env_2 = 'DEV' | 'SIT' | 'PRE' | 'PROD' | 'LOCAL';
|
|
3386
|
-
|
|
3387
|
-
declare interface EnvInfo {
|
|
3388
|
-
env?: Env_2;
|
|
3389
|
-
sprintId?: string;
|
|
3390
|
-
container?: string;
|
|
3391
|
-
cOfflineVer?: string;
|
|
3392
|
-
serverIp?: string;
|
|
3393
|
-
serverEnv?: string;
|
|
3394
|
-
canaryFlag?: string;
|
|
3395
|
-
}
|
|
3415
|
+
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';
|
|
3396
3416
|
|
|
3397
3417
|
/**
|
|
3398
3418
|
* @description 错误上下文对象。参考主站<code>ErrorContext</code>实现。
|
|
@@ -3423,9 +3443,11 @@ declare type ErrorSource = ErrorSource_2;
|
|
|
3423
3443
|
|
|
3424
3444
|
declare type ErrorSource_2 = 'SDK_INTERNAL' | 'SDK_USAGE' | 'APP_RUNTIME' | 'SERVER_API' | 'SYSTEM';
|
|
3425
3445
|
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3446
|
+
/**
|
|
3447
|
+
* @description 工具类型,从类型中排除 undefined。
|
|
3448
|
+
* 如果 T 继承 undefined 则返回 never,否则返回 T。
|
|
3449
|
+
*/
|
|
3450
|
+
declare type ExcludeUndefined<T> = T extends undefined ? never : T;
|
|
3429
3451
|
|
|
3430
3452
|
/**
|
|
3431
3453
|
* @description 卡分期计划
|
|
@@ -3469,6 +3491,22 @@ declare interface ExpCardPlan {
|
|
|
3469
3491
|
* @description 每个月分期利息
|
|
3470
3492
|
*/
|
|
3471
3493
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3494
|
+
/**
|
|
3495
|
+
* @description 分期有效期开始时间
|
|
3496
|
+
*/
|
|
3497
|
+
validStartTime?: string;
|
|
3498
|
+
/**
|
|
3499
|
+
* @description 分期有效期结束时间
|
|
3500
|
+
*/
|
|
3501
|
+
validEndTime?: string;
|
|
3502
|
+
/**
|
|
3503
|
+
* @description 支持的银行信息
|
|
3504
|
+
*
|
|
3505
|
+
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3506
|
+
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3507
|
+
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3508
|
+
*/
|
|
3509
|
+
supportedBank?: ExpSupportIppBank;
|
|
3472
3510
|
}
|
|
3473
3511
|
|
|
3474
3512
|
declare interface ExpInstallmentInfo {
|
|
@@ -3493,12 +3531,18 @@ declare interface ExpPaymentOptionDetail {
|
|
|
3493
3531
|
* @public
|
|
3494
3532
|
* @description Express element app config type
|
|
3495
3533
|
*/
|
|
3496
|
-
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting
|
|
3534
|
+
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
|
|
3497
3535
|
/** payment SessionData */
|
|
3498
3536
|
sessionData?: string;
|
|
3499
3537
|
/** Business division (country/region) */
|
|
3500
3538
|
businessDivision?: string;
|
|
3501
|
-
/**
|
|
3539
|
+
/**
|
|
3540
|
+
* Amount & Currency
|
|
3541
|
+
*
|
|
3542
|
+
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3543
|
+
* Passing amount at creation time is ignored; the initial amount
|
|
3544
|
+
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3545
|
+
*/
|
|
3502
3546
|
amount?: {
|
|
3503
3547
|
currency: string;
|
|
3504
3548
|
value: string;
|
|
@@ -3507,20 +3551,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3507
3551
|
paypal?: PayPalConfig;
|
|
3508
3552
|
/**
|
|
3509
3553
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3510
|
-
* Each payment method can independently set the button display text
|
|
3511
|
-
* Reserved index signature for future payment method integration
|
|
3554
|
+
* Each payment method can independently set the button display text.
|
|
3512
3555
|
*/
|
|
3513
3556
|
buttonType?: {
|
|
3514
3557
|
/** PayPal: paypal | checkout | buynow | pay */
|
|
3515
3558
|
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
3516
3559
|
[method: string]: string | undefined;
|
|
3517
3560
|
};
|
|
3518
|
-
/**
|
|
3561
|
+
/**
|
|
3562
|
+
* Unified height for all buttons (px)
|
|
3563
|
+
*/
|
|
3519
3564
|
buttonHeight?: number;
|
|
3520
3565
|
/**
|
|
3521
3566
|
* Button color theme (following Stripe Express Checkout Element design)
|
|
3522
|
-
* Each payment method can independently set the theme color
|
|
3523
|
-
* Reserved index signature for future payment method integration
|
|
3567
|
+
* Each payment method can independently set the theme color.
|
|
3524
3568
|
*/
|
|
3525
3569
|
buttonTheme?: {
|
|
3526
3570
|
/** PayPal: gold | blue | silver | white | black */
|
|
@@ -3541,6 +3585,15 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3541
3585
|
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3542
3586
|
*/
|
|
3543
3587
|
locale?: string;
|
|
3588
|
+
/**
|
|
3589
|
+
* 是否运行在 Native App 的 WebView 中。
|
|
3590
|
+
* 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
|
|
3591
|
+
*/
|
|
3592
|
+
isNativeAppWebview?: boolean;
|
|
3593
|
+
/** @internal SDK host 侧商户域名,供 Apple Pay merchant validation 使用 */
|
|
3594
|
+
merchantDomain?: string;
|
|
3595
|
+
/** @internal Elements2 历史协议字段,含义同 merchantDomain */
|
|
3596
|
+
doMain?: string;
|
|
3544
3597
|
}
|
|
3545
3598
|
|
|
3546
3599
|
/** cancel 事件负载 */
|
|
@@ -3549,24 +3602,54 @@ export declare interface ExpressCancelEvent {
|
|
|
3549
3602
|
data?: any;
|
|
3550
3603
|
}
|
|
3551
3604
|
|
|
3552
|
-
/** click
|
|
3605
|
+
/** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
|
|
3553
3606
|
export declare interface ExpressClickEvent {
|
|
3554
3607
|
expressPaymentType: string;
|
|
3555
|
-
resolve: (options: ClickResolveOptions) => void;
|
|
3556
3608
|
}
|
|
3557
3609
|
|
|
3558
3610
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3559
3611
|
export declare interface ExpressConfirmData {
|
|
3560
3612
|
expressPaymentType: string;
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3613
|
+
billingDetails?: {
|
|
3614
|
+
name?: string;
|
|
3615
|
+
email?: string;
|
|
3616
|
+
phone?: string;
|
|
3617
|
+
address?: {
|
|
3618
|
+
line1?: string;
|
|
3619
|
+
line2?: string;
|
|
3620
|
+
city?: string;
|
|
3621
|
+
state?: string;
|
|
3622
|
+
postalCode?: string;
|
|
3623
|
+
country?: string;
|
|
3624
|
+
};
|
|
3625
|
+
};
|
|
3626
|
+
shippingAddress?: {
|
|
3627
|
+
name?: string;
|
|
3628
|
+
phone?: string;
|
|
3629
|
+
address?: {
|
|
3630
|
+
line1?: string;
|
|
3631
|
+
line2?: string;
|
|
3632
|
+
city?: string;
|
|
3633
|
+
state?: string;
|
|
3634
|
+
postalCode?: string;
|
|
3635
|
+
country?: string;
|
|
3636
|
+
};
|
|
3637
|
+
};
|
|
3638
|
+
/** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
|
|
3639
|
+
paymentData?: unknown;
|
|
3640
|
+
/**
|
|
3641
|
+
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3642
|
+
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3643
|
+
*/
|
|
3644
|
+
paymentFailed: () => void;
|
|
3565
3645
|
}
|
|
3566
3646
|
|
|
3567
3647
|
/**
|
|
3568
3648
|
* @public
|
|
3569
3649
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
3650
|
+
*
|
|
3651
|
+
* Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
|
|
3652
|
+
* AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
|
|
3570
3653
|
*/
|
|
3571
3654
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3572
3655
|
static elementType: string;
|
|
@@ -3574,15 +3657,48 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3574
3657
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3575
3658
|
*/
|
|
3576
3659
|
private _callbacks;
|
|
3660
|
+
/** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
|
|
3661
|
+
private _renderData;
|
|
3662
|
+
/**
|
|
3663
|
+
* 构造时传入的初始金额。cleanAppConfig 已剔除 amount,setup 阶段透传给 iframe(PayPal 按钮首屏需要)
|
|
3664
|
+
* 与 PayPal channelClientId 查询仍需读它;运行时改额只能走 updateConfig。
|
|
3665
|
+
*/
|
|
3666
|
+
private _initialAmount;
|
|
3667
|
+
/**
|
|
3668
|
+
* 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
|
|
3669
|
+
* bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
|
|
3670
|
+
*/
|
|
3671
|
+
private _localHandlers;
|
|
3672
|
+
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3673
|
+
private _paymentInProgress;
|
|
3674
|
+
private _paypalOverlay;
|
|
3577
3675
|
constructor(name: string, config: ExpressElementConfig);
|
|
3578
|
-
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3579
3676
|
/**
|
|
3580
|
-
*
|
|
3677
|
+
* 重写 on:
|
|
3678
|
+
* 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3679
|
+
* 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
|
|
3581
3680
|
*/
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3681
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
3682
|
+
/**
|
|
3683
|
+
* SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
|
|
3684
|
+
* 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
|
|
3685
|
+
*/
|
|
3686
|
+
private _emit;
|
|
3687
|
+
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3688
|
+
/**
|
|
3689
|
+
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3690
|
+
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3691
|
+
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3692
|
+
*/
|
|
3693
|
+
completePayment(redirect?: 'always' | 'if_required'): Promise<{
|
|
3694
|
+
success: boolean;
|
|
3695
|
+
result?: any;
|
|
3696
|
+
error?: {
|
|
3697
|
+
code: string;
|
|
3698
|
+
message: string;
|
|
3699
|
+
};
|
|
3700
|
+
}>;
|
|
3701
|
+
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3586
3702
|
private registerInternalListeners;
|
|
3587
3703
|
protected focus(): void;
|
|
3588
3704
|
protected blur(): void;
|
|
@@ -3600,84 +3716,83 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3600
3716
|
* @public
|
|
3601
3717
|
* @description Express element events type
|
|
3602
3718
|
*/
|
|
3603
|
-
export declare interface ExpressElementEvents extends
|
|
3604
|
-
/**
|
|
3605
|
-
* @description Element ready event — 上报可用支付方式
|
|
3606
|
-
*/
|
|
3719
|
+
export declare interface ExpressElementEvents extends AntomBridgeWithNativeEventMap<ExpressAppConfig> {
|
|
3607
3720
|
ready: {
|
|
3608
3721
|
availablePaymentMethods: Record<string, boolean>;
|
|
3609
3722
|
};
|
|
3610
|
-
/**
|
|
3611
|
-
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3612
|
-
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3613
|
-
*/
|
|
3614
3723
|
click: ExpressClickEvent;
|
|
3615
|
-
/**
|
|
3616
|
-
* @description 统一支付完成事件(替代 approve)
|
|
3617
|
-
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3618
|
-
*/
|
|
3619
3724
|
confirm: ExpressConfirmData;
|
|
3620
|
-
/**
|
|
3621
|
-
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3622
|
-
*/
|
|
3623
3725
|
error: ErrorPayload & {
|
|
3624
3726
|
expressPaymentType: string;
|
|
3625
3727
|
};
|
|
3626
|
-
/**
|
|
3627
|
-
* @description 用户取消支付
|
|
3628
|
-
*/
|
|
3629
3728
|
cancel: ExpressCancelEvent;
|
|
3630
|
-
/**
|
|
3631
|
-
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3632
|
-
*/
|
|
3633
3729
|
shippingaddresschange: {
|
|
3634
3730
|
expressPaymentType: string;
|
|
3635
3731
|
address: any;
|
|
3636
3732
|
resolve: (options: ShippingResolveOptions) => void;
|
|
3637
3733
|
reject: (reason: string) => void;
|
|
3638
3734
|
};
|
|
3639
|
-
/**
|
|
3640
|
-
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3641
|
-
*/
|
|
3642
3735
|
shippingratechange: {
|
|
3643
3736
|
expressPaymentType: string;
|
|
3644
3737
|
shippingRate: any;
|
|
3645
3738
|
resolve: (options: RateResolveOptions) => void;
|
|
3646
3739
|
};
|
|
3647
|
-
/** @internal iframe 内容高度变化 */
|
|
3648
3740
|
contentHeightChanged: {
|
|
3649
3741
|
height: number;
|
|
3650
3742
|
};
|
|
3651
|
-
|
|
3652
|
-
|
|
3743
|
+
'OPENSDK@CLICK': {
|
|
3744
|
+
expressPaymentType: string;
|
|
3745
|
+
};
|
|
3746
|
+
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3747
|
+
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3653
3748
|
requestId: string;
|
|
3654
3749
|
};
|
|
3655
|
-
|
|
3656
|
-
'paypal:createOrder:reply': {
|
|
3750
|
+
'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
|
|
3657
3751
|
requestId: string;
|
|
3658
3752
|
sessionData?: string;
|
|
3659
3753
|
error?: string;
|
|
3660
3754
|
};
|
|
3661
|
-
|
|
3662
|
-
'paypal:onShippingAddressChange': {
|
|
3755
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
|
|
3663
3756
|
requestId: string;
|
|
3664
3757
|
shippingData: any;
|
|
3665
3758
|
};
|
|
3666
|
-
|
|
3667
|
-
'paypal:onShippingAddressChange:reply': {
|
|
3759
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
|
|
3668
3760
|
requestId: string;
|
|
3669
3761
|
error?: string;
|
|
3670
3762
|
};
|
|
3671
|
-
|
|
3672
|
-
'paypal:onShippingOptionsChange': {
|
|
3763
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
|
|
3673
3764
|
requestId: string;
|
|
3674
3765
|
shippingData: any;
|
|
3675
3766
|
};
|
|
3676
|
-
|
|
3677
|
-
'paypal:onShippingOptionsChange:reply': {
|
|
3767
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
|
|
3678
3768
|
requestId: string;
|
|
3679
3769
|
error?: string;
|
|
3680
3770
|
};
|
|
3771
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
3772
|
+
requestId: string;
|
|
3773
|
+
expressPaymentType: string;
|
|
3774
|
+
};
|
|
3775
|
+
/** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
|
|
3776
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
3777
|
+
requestId: string;
|
|
3778
|
+
success: boolean;
|
|
3779
|
+
result?: any;
|
|
3780
|
+
errorCode?: string;
|
|
3781
|
+
errorMessage?: string;
|
|
3782
|
+
billingDetails?: any;
|
|
3783
|
+
shippingAddress?: any;
|
|
3784
|
+
};
|
|
3785
|
+
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
3786
|
+
error?: ErrorPayload<string>;
|
|
3787
|
+
};
|
|
3788
|
+
'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
|
|
3789
|
+
onRedirect: {
|
|
3790
|
+
normalUrl: string;
|
|
3791
|
+
applinkUrl?: string;
|
|
3792
|
+
schemaUrl?: string;
|
|
3793
|
+
isDestroy: boolean;
|
|
3794
|
+
needReset: boolean;
|
|
3795
|
+
};
|
|
3681
3796
|
}
|
|
3682
3797
|
|
|
3683
3798
|
declare interface ExpSupportBank {
|
|
@@ -3702,6 +3817,24 @@ declare interface ExpSupportCardBrand {
|
|
|
3702
3817
|
logo?: Logo;
|
|
3703
3818
|
}
|
|
3704
3819
|
|
|
3820
|
+
/**
|
|
3821
|
+
* @description 支持的分期银行信息
|
|
3822
|
+
*/
|
|
3823
|
+
declare interface ExpSupportIppBank {
|
|
3824
|
+
/**
|
|
3825
|
+
* @description bank short name or bank code
|
|
3826
|
+
*/
|
|
3827
|
+
bankShortName?: string;
|
|
3828
|
+
/**
|
|
3829
|
+
* @description logo
|
|
3830
|
+
*/
|
|
3831
|
+
logo?: Logo;
|
|
3832
|
+
/**
|
|
3833
|
+
* @description bins
|
|
3834
|
+
*/
|
|
3835
|
+
bins?: string[];
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3705
3838
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
3706
3839
|
|
|
3707
3840
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -3719,6 +3852,27 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
3719
3852
|
promotionDetails?: PromotionDetail[];
|
|
3720
3853
|
}
|
|
3721
3854
|
|
|
3855
|
+
declare type FontSource = CssFontSource | CustomFontSource;
|
|
3856
|
+
|
|
3857
|
+
declare interface FrontModulesToBeLoadedInterface {
|
|
3858
|
+
acquirerName: string;
|
|
3859
|
+
scriptUrl: string;
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
/**
|
|
3863
|
+
* @description 分期银行展示模型
|
|
3864
|
+
*/
|
|
3865
|
+
declare interface FrontSupportIppBank {
|
|
3866
|
+
/**
|
|
3867
|
+
* @description bank short name or bank code
|
|
3868
|
+
*/
|
|
3869
|
+
bankShortName?: string;
|
|
3870
|
+
/**
|
|
3871
|
+
* @description logo
|
|
3872
|
+
*/
|
|
3873
|
+
logo?: Logo;
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3722
3876
|
declare type GetI18nQueryParam = string | {
|
|
3723
3877
|
/**
|
|
3724
3878
|
* 多语言文案的 key
|
|
@@ -3736,40 +3890,6 @@ declare type GetI18nQueryParam = string | {
|
|
|
3736
3890
|
defaultMessage?: string;
|
|
3737
3891
|
};
|
|
3738
3892
|
|
|
3739
|
-
declare function getMiniPerformance(): Promise<{
|
|
3740
|
-
performance: {
|
|
3741
|
-
appLaunch: number;
|
|
3742
|
-
jumpAppStartUnix: number;
|
|
3743
|
-
preparePhase: number;
|
|
3744
|
-
appPhase: number;
|
|
3745
|
-
pagePhase: number;
|
|
3746
|
-
appxPhase: number;
|
|
3747
|
-
launchId: string;
|
|
3748
|
-
launchType: 0 | 1;
|
|
3749
|
-
};
|
|
3750
|
-
onLoadTime: number;
|
|
3751
|
-
loadId: string;
|
|
3752
|
-
srcCount: number;
|
|
3753
|
-
webviewComponentSrc?: string | undefined;
|
|
3754
|
-
} | undefined>;
|
|
3755
|
-
|
|
3756
|
-
declare type GetRequesterResult = (data: string, rawData: (ReportData & BaseInfo) | IOptions | IEventOPtions) => Promise<void>;
|
|
3757
|
-
|
|
3758
|
-
declare interface GetWebVitalsInfoResult {
|
|
3759
|
-
fcp: Promise<number | null | undefined>;
|
|
3760
|
-
ttfb: Promise<number | null | undefined>;
|
|
3761
|
-
lcp: Promise<number | null | undefined>;
|
|
3762
|
-
inp: Promise<number | null | undefined>;
|
|
3763
|
-
cls: Promise<number | null | undefined>;
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
declare interface GetWhiteScreenInfoOptions {
|
|
3767
|
-
selector?: string | string[];
|
|
3768
|
-
delay?: number | (() => number);
|
|
3769
|
-
persistent?: boolean;
|
|
3770
|
-
ignoreNotInViewport?: boolean;
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
3893
|
declare type GlobalOptions = {
|
|
3774
3894
|
i18n?: SimpleI18n;
|
|
3775
3895
|
i18nPrefix: string;
|
|
@@ -4337,17 +4457,12 @@ declare type HtmlAttributes =
|
|
|
4337
4457
|
| "[writingsuggestions]"
|
|
4338
4458
|
| "[xmlns]";
|
|
4339
4459
|
|
|
4340
|
-
declare interface
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
redirected?: 0 | 1;
|
|
4347
|
-
responseUrl?: string;
|
|
4348
|
-
time: number;
|
|
4349
|
-
method?: string;
|
|
4350
|
-
aborted?: 0 | 1;
|
|
4460
|
+
declare interface IApplePayContactField {
|
|
4461
|
+
email: string;
|
|
4462
|
+
name: string;
|
|
4463
|
+
phone: string;
|
|
4464
|
+
postalAddress: string;
|
|
4465
|
+
phoneticName: string;
|
|
4351
4466
|
}
|
|
4352
4467
|
|
|
4353
4468
|
declare interface iBaseElementClass {
|
|
@@ -4355,16 +4470,6 @@ declare interface iBaseElementClass {
|
|
|
4355
4470
|
elementType: string;
|
|
4356
4471
|
}
|
|
4357
4472
|
|
|
4358
|
-
declare interface IEventOPtions {
|
|
4359
|
-
eventId: string;
|
|
4360
|
-
param4: Record<string, any>;
|
|
4361
|
-
immediat?: boolean;
|
|
4362
|
-
}
|
|
4363
|
-
|
|
4364
|
-
declare type IMDAP_SERVER = (typeof imdapServers)[number];
|
|
4365
|
-
|
|
4366
|
-
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"];
|
|
4367
|
-
|
|
4368
4473
|
declare interface InstallmentPlan {
|
|
4369
4474
|
/**
|
|
4370
4475
|
* @description 分期支持的银行
|
|
@@ -4483,102 +4588,117 @@ declare interface InterestFree {
|
|
|
4483
4588
|
bankShortName?: string;
|
|
4484
4589
|
}
|
|
4485
4590
|
|
|
4486
|
-
declare
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
declare interface IntlOpenSDKTrackerInitOptions extends Omit<IntlOpenSDKTrackerInitOptions_2, 'appId'> {
|
|
4591
|
+
declare interface IntlOpenSDKTrackerInitOptions extends Omit<ExcludeUndefined<CompatibleTrackerFullOptions>, 'appId'> {
|
|
4592
|
+
trackId?: string;
|
|
4593
|
+
/**
|
|
4594
|
+
* @description appId,默认值为180020050100012557
|
|
4595
|
+
*/
|
|
4493
4596
|
appId?: string;
|
|
4494
|
-
}
|
|
4495
|
-
|
|
4496
|
-
declare interface IntlOpenSDKTrackerInitOptions_2 extends Omit<OriginTrackerInitOptions, 'bizType' | 'productId'> {
|
|
4497
|
-
whiteScreen?: BlankMonitorConfig | boolean;
|
|
4498
|
-
bizType?: string;
|
|
4499
|
-
productId?: string;
|
|
4500
4597
|
/**
|
|
4501
|
-
*
|
|
4598
|
+
* origin → 完全按入参 key 输出
|
|
4599
|
+
* snake → 强制 snake_case
|
|
4600
|
+
* camel → 强制 camelCase
|
|
4601
|
+
* both → snake + origin 双写
|
|
4502
4602
|
*/
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
declare interface IOptions {
|
|
4510
|
-
actionId: string;
|
|
4511
|
-
spmId: string;
|
|
4512
|
-
param1?: string;
|
|
4513
|
-
param2?: string;
|
|
4514
|
-
param3?: string;
|
|
4515
|
-
param4?: Record<string, any>;
|
|
4516
|
-
param5?: Record<string, any>;
|
|
4517
|
-
stayTime?: number;
|
|
4518
|
-
}
|
|
4519
|
-
|
|
4520
|
-
declare interface ISystemInfo {
|
|
4521
|
-
readonly pixelRatio: number;
|
|
4522
|
-
readonly windowWidth: number;
|
|
4523
|
-
readonly windowHeight: number;
|
|
4524
|
-
readonly model: string;
|
|
4525
|
-
readonly language: string;
|
|
4526
|
-
readonly version: string;
|
|
4527
|
-
readonly platform: string;
|
|
4528
|
-
readonly system: string;
|
|
4529
|
-
readonly screenWidth: number;
|
|
4530
|
-
readonly screenHeight: number;
|
|
4531
|
-
readonly brand: string;
|
|
4532
|
-
readonly app: string;
|
|
4533
|
-
readonly [propName: string]: any;
|
|
4534
|
-
}
|
|
4535
|
-
|
|
4536
|
-
declare interface ITracert extends IUserTracertProperties {
|
|
4537
|
-
get: (arg0: string) => any;
|
|
4538
|
-
set: (arg0: IUserTracertProperties) => void;
|
|
4539
|
-
loadPlugins: (_plugins: PluginFunction[]) => void;
|
|
4540
|
-
readonly logLevel?: string;
|
|
4541
|
-
readonly logVersion?: string;
|
|
4542
|
-
readonly debug?: boolean;
|
|
4543
|
-
readonly contact?: boolean;
|
|
4544
|
-
readonly pluginReady?: boolean;
|
|
4545
|
-
readonly _plugins?: readonly PluginFunction[];
|
|
4546
|
-
readonly _beforeEvObj?: Record<string, EventFunction[]>;
|
|
4547
|
-
readonly _afterEvObj?: Record<string, EventFunction[]>;
|
|
4548
|
-
readonly _pluginLoadCnt?: number;
|
|
4549
|
-
readonly apiCashList?: any[];
|
|
4550
|
-
}
|
|
4551
|
-
|
|
4552
|
-
declare interface IUserTracertProperties {
|
|
4553
|
-
readonly ready?: boolean;
|
|
4554
|
-
readonly bizType?: string;
|
|
4555
|
-
readonly deviceId?: string;
|
|
4556
|
-
readonly userId?: string;
|
|
4557
|
-
readonly spmAPos?: string;
|
|
4558
|
-
readonly spmBPos?: string;
|
|
4559
|
-
readonly pageId?: string;
|
|
4560
|
-
readonly server?: string;
|
|
4561
|
-
readonly servers?: string[];
|
|
4562
|
-
readonly chInfo?: string;
|
|
4563
|
-
readonly scm?: string;
|
|
4564
|
-
readonly env?: Env;
|
|
4565
|
-
readonly switch?: boolean;
|
|
4566
|
-
readonly sendFrequency?: number;
|
|
4567
|
-
readonly batchCount?: number;
|
|
4568
|
-
readonly referSPM?: string;
|
|
4569
|
-
readonly sessionId?: string;
|
|
4570
|
-
readonly appId?: string;
|
|
4571
|
-
readonly productId?: string;
|
|
4572
|
-
readonly mdata?: Record<string, number | string>;
|
|
4573
|
-
readonly systemInfo?: ISystemInfo;
|
|
4574
|
-
readonly networkType?: string;
|
|
4575
|
-
readonly path?: string;
|
|
4576
|
-
readonly packageVersion?: string;
|
|
4577
|
-
readonly autoExpo?: boolean;
|
|
4603
|
+
keyFormat?: 'origin' | 'snake' | 'camel' | 'both';
|
|
4604
|
+
/**
|
|
4605
|
+
* 是否上报idengine_user_path
|
|
4606
|
+
*/
|
|
4607
|
+
userPathAuto?: boolean;
|
|
4578
4608
|
}
|
|
4579
4609
|
|
|
4580
|
-
declare interface
|
|
4581
|
-
|
|
4610
|
+
declare interface IPaymentSessionMetaData {
|
|
4611
|
+
clientId?: string;
|
|
4612
|
+
renderDisplayType?: string;
|
|
4613
|
+
paymentSessionConfig?: PaymentSessionConfig;
|
|
4614
|
+
securityConfig?: SessionSecurityConfig;
|
|
4615
|
+
moneyView?: any;
|
|
4616
|
+
extendInfo?: string;
|
|
4617
|
+
paymentMethodInfoView?: any;
|
|
4618
|
+
paymentView?: any;
|
|
4619
|
+
modernWeb?: boolean;
|
|
4620
|
+
action?: PaymentSessionAction;
|
|
4621
|
+
/**
|
|
4622
|
+
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4623
|
+
*/
|
|
4624
|
+
flowSwitchTags?: string;
|
|
4625
|
+
authUrlInfo?: {
|
|
4626
|
+
appIdentifier?: string;
|
|
4627
|
+
applinkUrl?: string;
|
|
4628
|
+
normalUrl?: string;
|
|
4629
|
+
schemeUrl?: string;
|
|
4630
|
+
authUrl?: string;
|
|
4631
|
+
};
|
|
4632
|
+
paymentSessionFactor?: {
|
|
4633
|
+
externalRiskTimeout?: number;
|
|
4634
|
+
extendInfo?: {
|
|
4635
|
+
merchantCapabilities?: string[];
|
|
4636
|
+
supportedNetworks?: string[];
|
|
4637
|
+
requiredBillingContactFields: IApplePayContactField[];
|
|
4638
|
+
requiredShippingContactFields: IApplePayContactField[];
|
|
4639
|
+
};
|
|
4640
|
+
merchantInfo?: {
|
|
4641
|
+
registeredCountry?: string;
|
|
4642
|
+
partnerId?: string;
|
|
4643
|
+
merchantName?: string;
|
|
4644
|
+
};
|
|
4645
|
+
order?: {
|
|
4646
|
+
orderDescription: string;
|
|
4647
|
+
};
|
|
4648
|
+
paymentAmount?: {
|
|
4649
|
+
value?: string;
|
|
4650
|
+
currency?: string;
|
|
4651
|
+
};
|
|
4652
|
+
paymentMethodInfo?: {
|
|
4653
|
+
paymentMethodType?: string;
|
|
4654
|
+
};
|
|
4655
|
+
paymentMethodViewMetaData?: any;
|
|
4656
|
+
paymentRequestId?: string;
|
|
4657
|
+
supportedLanguages?: any;
|
|
4658
|
+
/**
|
|
4659
|
+
* 当前为苹果分期场景的信息
|
|
4660
|
+
*/
|
|
4661
|
+
recurringInfo?: {
|
|
4662
|
+
/**
|
|
4663
|
+
* 代扣协议开始日期 不传为当前系统时间
|
|
4664
|
+
*/
|
|
4665
|
+
startDate?: number;
|
|
4666
|
+
/**
|
|
4667
|
+
* 代扣协议结束日期 不传不限制结束时间
|
|
4668
|
+
*/
|
|
4669
|
+
endDate?: number;
|
|
4670
|
+
/**
|
|
4671
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4672
|
+
*/
|
|
4673
|
+
intervalUnit?: string;
|
|
4674
|
+
/**
|
|
4675
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4676
|
+
*/
|
|
4677
|
+
intervalCount?: number;
|
|
4678
|
+
/**
|
|
4679
|
+
* 分期标题信息
|
|
4680
|
+
*/
|
|
4681
|
+
title?: string;
|
|
4682
|
+
/**
|
|
4683
|
+
* 分期管理页面
|
|
4684
|
+
*/
|
|
4685
|
+
managementURL?: string;
|
|
4686
|
+
/**
|
|
4687
|
+
* 苹果通知ipay MAPN信息变更的地址
|
|
4688
|
+
*/
|
|
4689
|
+
tokenNotificationURL?: string;
|
|
4690
|
+
/**
|
|
4691
|
+
* 分期协议描述
|
|
4692
|
+
*/
|
|
4693
|
+
agreementDescription?: string;
|
|
4694
|
+
};
|
|
4695
|
+
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4696
|
+
};
|
|
4697
|
+
connectFactor?: {
|
|
4698
|
+
enableConnect?: boolean;
|
|
4699
|
+
};
|
|
4700
|
+
skipRenderPaymentMethod?: boolean;
|
|
4701
|
+
needAccountConfirmPage?: boolean;
|
|
4582
4702
|
}
|
|
4583
4703
|
|
|
4584
4704
|
/**
|
|
@@ -4633,86 +4753,6 @@ export declare interface LoadAntomConfig extends Omit<BaseFactoryConfig, 'tracke
|
|
|
4633
4753
|
env?: 'sandbox' | 'prod';
|
|
4634
4754
|
}
|
|
4635
4755
|
|
|
4636
|
-
declare interface LocationInfo {
|
|
4637
|
-
countryName?: string;
|
|
4638
|
-
cityName?: string;
|
|
4639
|
-
provinceName?: string;
|
|
4640
|
-
area?: string;
|
|
4641
|
-
}
|
|
4642
|
-
|
|
4643
|
-
declare interface LogInfo {
|
|
4644
|
-
title: string;
|
|
4645
|
-
msg?: string | Error | Record<string, number | string>;
|
|
4646
|
-
}
|
|
4647
|
-
|
|
4648
|
-
declare type LogItem = {
|
|
4649
|
-
code: string;
|
|
4650
|
-
msg: string;
|
|
4651
|
-
marmotId?: string;
|
|
4652
|
-
s1?: string | number;
|
|
4653
|
-
s2?: string | number;
|
|
4654
|
-
s3?: string | number;
|
|
4655
|
-
s4?: string | number;
|
|
4656
|
-
s5?: string | number;
|
|
4657
|
-
s6?: string | number;
|
|
4658
|
-
s7?: string | number;
|
|
4659
|
-
s8?: string | number;
|
|
4660
|
-
s9?: string | number;
|
|
4661
|
-
s10?: string | number;
|
|
4662
|
-
s11?: string | number;
|
|
4663
|
-
s12?: string | number;
|
|
4664
|
-
s13?: string | number;
|
|
4665
|
-
s14?: string | number;
|
|
4666
|
-
s15?: string | number;
|
|
4667
|
-
s16?: string | number;
|
|
4668
|
-
s17?: string | number;
|
|
4669
|
-
s18?: string | number;
|
|
4670
|
-
s19?: string | number;
|
|
4671
|
-
s20?: string | number;
|
|
4672
|
-
env?: Env_2;
|
|
4673
|
-
sdk?: string;
|
|
4674
|
-
container?: string;
|
|
4675
|
-
title?: string;
|
|
4676
|
-
fullUrl?: string;
|
|
4677
|
-
sprintId?: string;
|
|
4678
|
-
ip?: string;
|
|
4679
|
-
countryName?: string;
|
|
4680
|
-
cityName?: string;
|
|
4681
|
-
provinceName?: string;
|
|
4682
|
-
cOfflineVer?: string;
|
|
4683
|
-
url?: string;
|
|
4684
|
-
referrer?: string;
|
|
4685
|
-
domCnt?: number;
|
|
4686
|
-
delay?: number;
|
|
4687
|
-
scrollTop?: number;
|
|
4688
|
-
lastAction?: string;
|
|
4689
|
-
sessionId?: string;
|
|
4690
|
-
isp?: string;
|
|
4691
|
-
area?: string;
|
|
4692
|
-
ua?: string;
|
|
4693
|
-
browser?: string;
|
|
4694
|
-
os?: string;
|
|
4695
|
-
device?: string;
|
|
4696
|
-
deviceType?: string;
|
|
4697
|
-
deviceBrand?: string;
|
|
4698
|
-
deviceModel?: string;
|
|
4699
|
-
screenWidth?: number;
|
|
4700
|
-
screenHeight?: number;
|
|
4701
|
-
contentHeight?: number;
|
|
4702
|
-
pixelRatio?: number;
|
|
4703
|
-
cClient?: string;
|
|
4704
|
-
cClientId?: string;
|
|
4705
|
-
cCoreVer?: string;
|
|
4706
|
-
assetsVer?: string;
|
|
4707
|
-
traceId?: string;
|
|
4708
|
-
serverIp?: string;
|
|
4709
|
-
serverEnv?: string;
|
|
4710
|
-
clientId?: string;
|
|
4711
|
-
spm?: string;
|
|
4712
|
-
spma?: string;
|
|
4713
|
-
spmb?: string;
|
|
4714
|
-
} & DMC;
|
|
4715
|
-
|
|
4716
4756
|
/**
|
|
4717
4757
|
* @description Logo信息
|
|
4718
4758
|
*/
|
|
@@ -4743,29 +4783,6 @@ declare interface Logo {
|
|
|
4743
4783
|
logoHeight?: string;
|
|
4744
4784
|
}
|
|
4745
4785
|
|
|
4746
|
-
declare type M = {
|
|
4747
|
-
m1?: number;
|
|
4748
|
-
m2?: number;
|
|
4749
|
-
m3?: number;
|
|
4750
|
-
m4?: number;
|
|
4751
|
-
m5?: number;
|
|
4752
|
-
m6?: number;
|
|
4753
|
-
m7?: number;
|
|
4754
|
-
m8?: number;
|
|
4755
|
-
m9?: number;
|
|
4756
|
-
m10?: number;
|
|
4757
|
-
m11?: number;
|
|
4758
|
-
m12?: number;
|
|
4759
|
-
m13?: number;
|
|
4760
|
-
m14?: number;
|
|
4761
|
-
m15?: number;
|
|
4762
|
-
m16?: number;
|
|
4763
|
-
m17?: number;
|
|
4764
|
-
m18?: number;
|
|
4765
|
-
m19?: number;
|
|
4766
|
-
m20?: number;
|
|
4767
|
-
};
|
|
4768
|
-
|
|
4769
4786
|
/**
|
|
4770
4787
|
* @description 端上的行为设定 @Author yanhong
|
|
4771
4788
|
*/
|
|
@@ -4909,12 +4926,6 @@ declare interface MultiCurrencyMoney {
|
|
|
4909
4926
|
currencyValue?: string;
|
|
4910
4927
|
}
|
|
4911
4928
|
|
|
4912
|
-
declare interface NetworkInfo {
|
|
4913
|
-
networkType?: string;
|
|
4914
|
-
isp?: string;
|
|
4915
|
-
ip?: string;
|
|
4916
|
-
}
|
|
4917
|
-
|
|
4918
4929
|
declare interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
4919
4930
|
/**
|
|
4920
4931
|
* 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.
|
|
@@ -7016,6 +7027,68 @@ declare interface OneAccountInfo {
|
|
|
7016
7027
|
accountStatus?: string;
|
|
7017
7028
|
}
|
|
7018
7029
|
|
|
7030
|
+
/**
|
|
7031
|
+
* @description one account 账户信息查询结果
|
|
7032
|
+
*/
|
|
7033
|
+
declare interface OneAccountQueryResult {
|
|
7034
|
+
/**
|
|
7035
|
+
* @description 是否业务处理成功
|
|
7036
|
+
*/
|
|
7037
|
+
success?: boolean;
|
|
7038
|
+
/**
|
|
7039
|
+
* @description 错误上下文
|
|
7040
|
+
*/
|
|
7041
|
+
errorContext?: ErrorContext;
|
|
7042
|
+
/**
|
|
7043
|
+
* @description 返回结果码
|
|
7044
|
+
*/
|
|
7045
|
+
resultCode?: string;
|
|
7046
|
+
/**
|
|
7047
|
+
* @description 返回结果信息
|
|
7048
|
+
*/
|
|
7049
|
+
resultMessage?: string;
|
|
7050
|
+
/**
|
|
7051
|
+
* @description error actions
|
|
7052
|
+
*/
|
|
7053
|
+
errorActions?: Record<string, string>;
|
|
7054
|
+
/**
|
|
7055
|
+
* @description error code
|
|
7056
|
+
*/
|
|
7057
|
+
errorCode?: string;
|
|
7058
|
+
/**
|
|
7059
|
+
* @description error status
|
|
7060
|
+
*/
|
|
7061
|
+
errorStatus?: string;
|
|
7062
|
+
/**
|
|
7063
|
+
* @description error message
|
|
7064
|
+
*/
|
|
7065
|
+
errorMessage?: string;
|
|
7066
|
+
/**
|
|
7067
|
+
* @description extend info
|
|
7068
|
+
*/
|
|
7069
|
+
extendInfo?: Record<string, string>;
|
|
7070
|
+
/**
|
|
7071
|
+
* @description one account 账户信息
|
|
7072
|
+
*/
|
|
7073
|
+
accountInfo?: OneAccountInfo;
|
|
7074
|
+
/**
|
|
7075
|
+
* @description action form 下一步动作
|
|
7076
|
+
*/
|
|
7077
|
+
actionForm?: OtpChallengeActionForm;
|
|
7078
|
+
/**
|
|
7079
|
+
* @description 支付方式列表
|
|
7080
|
+
*/
|
|
7081
|
+
paymentMethods?: PaymentMethodView[];
|
|
7082
|
+
/**
|
|
7083
|
+
* @description 物流信息
|
|
7084
|
+
*/
|
|
7085
|
+
shippings?: ShippingInfo_2[];
|
|
7086
|
+
/**
|
|
7087
|
+
* @description 支付金额 (订单金额 + 物流费)
|
|
7088
|
+
*/
|
|
7089
|
+
paymentAmount?: MobileMoneyView;
|
|
7090
|
+
}
|
|
7091
|
+
|
|
7019
7092
|
/**
|
|
7020
7093
|
* @description OpenModal的返回值类型
|
|
7021
7094
|
*/
|
|
@@ -7079,7 +7152,9 @@ declare type OpenSDKInternalErrorCodes = (typeof OpenSDKInternalErrorCodes)[keyo
|
|
|
7079
7152
|
|
|
7080
7153
|
declare class OpenSDKTracker {
|
|
7081
7154
|
private options?;
|
|
7155
|
+
private intlTrackerOptions?;
|
|
7082
7156
|
private tracker?;
|
|
7157
|
+
private trackerInitPromise?;
|
|
7083
7158
|
/**
|
|
7084
7159
|
* @description trackId,会话最终的唯一标识,可以用来打通服务端,追踪整体会话
|
|
7085
7160
|
*/
|
|
@@ -7097,7 +7172,7 @@ declare class OpenSDKTracker {
|
|
|
7097
7172
|
* @param options
|
|
7098
7173
|
* @returns
|
|
7099
7174
|
*/
|
|
7100
|
-
initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<
|
|
7175
|
+
initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<CompatibleTrackerFull | undefined>;
|
|
7101
7176
|
private safeCall;
|
|
7102
7177
|
/**
|
|
7103
7178
|
*
|
|
@@ -7107,7 +7182,7 @@ declare class OpenSDKTracker {
|
|
|
7107
7182
|
/**
|
|
7108
7183
|
* @description 设置属性
|
|
7109
7184
|
*/
|
|
7110
|
-
set(data: Partial<IntlOpenSDKTrackerInitOptions
|
|
7185
|
+
set(data: Partial<ExcludeUndefined<IntlOpenSDKTrackerInitOptions>>): void;
|
|
7111
7186
|
/**
|
|
7112
7187
|
* 会以 10141 code 上报一条常规日志,日志头为 D-AE
|
|
7113
7188
|
* @see https://yuque.antfin.com/marmot/handbook/beginning#cq9Zw
|
|
@@ -7117,109 +7192,98 @@ declare class OpenSDKTracker {
|
|
|
7117
7192
|
* 请在marmot申请code后使用,必须关联code
|
|
7118
7193
|
* @see https://yuque.antfin.com/marmot/handbook/beginning#W3dtb
|
|
7119
7194
|
*/
|
|
7120
|
-
log(...args: Parameters<
|
|
7195
|
+
log(...args: Parameters<CompatibleTrackerFull['log']>): void;
|
|
7196
|
+
/**
|
|
7197
|
+
* 用于埋点相关上报,点击
|
|
7198
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#XQel9
|
|
7199
|
+
*/
|
|
7200
|
+
click(...args: Parameters<CompatibleTrackerFull['click']>): void;
|
|
7201
|
+
/**
|
|
7202
|
+
* 用于埋点相关上报,曝光
|
|
7203
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#LiVxE
|
|
7204
|
+
*/
|
|
7205
|
+
expo(...args: Parameters<CompatibleTrackerFull['expo']>): void;
|
|
7206
|
+
/**
|
|
7207
|
+
* 用于日志管控
|
|
7208
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7209
|
+
*/
|
|
7210
|
+
onSendData(...args: Parameters<CompatibleTrackerFull['onSendData']>): void;
|
|
7211
|
+
/**
|
|
7212
|
+
* 用于日志管控
|
|
7213
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7214
|
+
*/
|
|
7215
|
+
offSendData(...args: Parameters<CompatibleTrackerFull['offSendData']>): void;
|
|
7216
|
+
/**
|
|
7217
|
+
* 用于埋点相关上报,上报的日志头为 D-VM
|
|
7218
|
+
* @see https://yuque.antfin.com/marmot/handbook/beginning#RSCKn
|
|
7219
|
+
*/
|
|
7220
|
+
pageMonitor(...args: Parameters<CompatibleTrackerFull['pageMonitor']>): void;
|
|
7221
|
+
/**
|
|
7222
|
+
* 用于上报自定义性能指标,单次仅上报一个指标
|
|
7223
|
+
* @param {string} key — m1 - m20
|
|
7224
|
+
* @param {number} num — 耗时,数字,一定要 >= 0,否则无统计意义
|
|
7225
|
+
*/
|
|
7226
|
+
reportCustomizedPerformance(...args: Parameters<CompatibleTrackerFull['reportCustomizedPerformance']>): void;
|
|
7227
|
+
}
|
|
7228
|
+
|
|
7229
|
+
/**
|
|
7230
|
+
* @description 订单信息
|
|
7231
|
+
*/
|
|
7232
|
+
declare interface OrderInfo {
|
|
7233
|
+
/**
|
|
7234
|
+
* @description 订单描述
|
|
7235
|
+
*/
|
|
7236
|
+
orderDescription?: string;
|
|
7237
|
+
}
|
|
7238
|
+
|
|
7239
|
+
declare interface OtpChallengeActionForm {
|
|
7240
|
+
/**
|
|
7241
|
+
* @description action form type
|
|
7242
|
+
*/
|
|
7243
|
+
actionFormType?: string;
|
|
7244
|
+
/**
|
|
7245
|
+
* @description type of challenge
|
|
7246
|
+
*/
|
|
7247
|
+
challengeType?: string;
|
|
7248
|
+
/**
|
|
7249
|
+
* @description The actual render value
|
|
7250
|
+
*/
|
|
7251
|
+
challengeRenderValue?: string;
|
|
7252
|
+
/**
|
|
7253
|
+
* @description Describe the challenge is required by AAC or external party
|
|
7254
|
+
*/
|
|
7255
|
+
triggerSource?: string;
|
|
7121
7256
|
/**
|
|
7122
|
-
*
|
|
7123
|
-
* @
|
|
7257
|
+
* @description is support retry challenge
|
|
7258
|
+
* @default true
|
|
7124
7259
|
*/
|
|
7125
|
-
|
|
7260
|
+
isChallengeRetrySupported?: boolean;
|
|
7126
7261
|
/**
|
|
7127
|
-
*
|
|
7128
|
-
* @
|
|
7262
|
+
* @description is fist otp auto triggered
|
|
7263
|
+
* @default false
|
|
7129
7264
|
*/
|
|
7130
|
-
|
|
7265
|
+
isChallengeAutoTriggered?: boolean;
|
|
7131
7266
|
/**
|
|
7132
|
-
*
|
|
7133
|
-
* @
|
|
7267
|
+
* @description estimated challenge response duration
|
|
7268
|
+
* @default 0
|
|
7134
7269
|
*/
|
|
7135
|
-
|
|
7270
|
+
estimatedDuration?: number;
|
|
7136
7271
|
/**
|
|
7137
|
-
*
|
|
7138
|
-
* @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
|
|
7272
|
+
* @description url - like h5 sdk challenge need to call back url
|
|
7139
7273
|
*/
|
|
7140
|
-
|
|
7274
|
+
challengeUrl?: string;
|
|
7141
7275
|
/**
|
|
7142
|
-
*
|
|
7143
|
-
* @see https://yuque.antfin.com/marmot/handbook/beginning#RSCKn
|
|
7276
|
+
* @description extend information
|
|
7144
7277
|
*/
|
|
7145
|
-
|
|
7278
|
+
extendInfo?: string;
|
|
7146
7279
|
/**
|
|
7147
|
-
*
|
|
7148
|
-
* @param {string} key — m1 - m20
|
|
7149
|
-
* @param {number} num — 耗时,数字,一定要 >= 0,否则无统计意义
|
|
7280
|
+
* @description verify Id
|
|
7150
7281
|
*/
|
|
7151
|
-
|
|
7152
|
-
}
|
|
7153
|
-
|
|
7154
|
-
/**
|
|
7155
|
-
* @description 订单信息
|
|
7156
|
-
*/
|
|
7157
|
-
declare interface OrderInfo {
|
|
7282
|
+
verifyId?: string;
|
|
7158
7283
|
/**
|
|
7159
|
-
* @description
|
|
7284
|
+
* @description 重发次数
|
|
7160
7285
|
*/
|
|
7161
|
-
|
|
7162
|
-
}
|
|
7163
|
-
|
|
7164
|
-
declare interface OriginTrackerInitOptions {
|
|
7165
|
-
isMarmot?: boolean;
|
|
7166
|
-
spmConfig?: SpmConfig;
|
|
7167
|
-
bizType: string;
|
|
7168
|
-
appId: string;
|
|
7169
|
-
/**
|
|
7170
|
-
* 适用于从雨燕监控迁移到 marmot 的场景
|
|
7171
|
-
* 该字段的值可使用雨燕监控的 appId 值
|
|
7172
|
-
* 最终该值会放在 D-AE 日志类型的 appId 字段位置,并覆盖扩展参数 4 中的 idengine_groupId 值
|
|
7173
|
-
* 正常情况下不需要用到,有疑问咨询 @之其 205637
|
|
7174
|
-
**/
|
|
7175
|
-
compatibleAppId?: string;
|
|
7176
|
-
productId: string;
|
|
7177
|
-
userId?: string;
|
|
7178
|
-
deviceId?: string;
|
|
7179
|
-
chInfo?: string;
|
|
7180
|
-
batchCount?: number;
|
|
7181
|
-
plugins?: PluginFunction[];
|
|
7182
|
-
server?: string;
|
|
7183
|
-
/**
|
|
7184
|
-
* servers 传入空数组或不传的情况下,不会禁用所有日志的上报,这个字段不是用来做上报开关的
|
|
7185
|
-
* 就像 server 不传或传空字符串的情况下,也不会禁用日志的上报,会使用默认的服务器地址
|
|
7186
|
-
* servers 只在有至少一个有效值的情况下才有意义
|
|
7187
|
-
*/
|
|
7188
|
-
servers?: string[];
|
|
7189
|
-
mdata?: Record<string, number | string>;
|
|
7190
|
-
env?: Env_2;
|
|
7191
|
-
ready?: boolean;
|
|
7192
|
-
isReport?: boolean;
|
|
7193
|
-
version?: string;
|
|
7194
|
-
funnelAuto?: boolean;
|
|
7195
|
-
userPathAuto?: boolean;
|
|
7196
|
-
autoExpo?: boolean;
|
|
7197
|
-
autoClick?: boolean;
|
|
7198
|
-
expoOnce?: boolean;
|
|
7199
|
-
platform?: string;
|
|
7200
|
-
sprintId?: string;
|
|
7201
|
-
autoReportConfig?: {
|
|
7202
|
-
isReport?: boolean;
|
|
7203
|
-
programVersion?: string;
|
|
7204
|
-
productId?: string;
|
|
7205
|
-
appId?: string;
|
|
7206
|
-
bizType?: string;
|
|
7207
|
-
imdapServerIndex?: number;
|
|
7208
|
-
server?: string;
|
|
7209
|
-
servers?: string[];
|
|
7210
|
-
platform?: string;
|
|
7211
|
-
deviceId?: string;
|
|
7212
|
-
};
|
|
7213
|
-
whiteScreenConfig?: BlankMonitorConfig | boolean;
|
|
7214
|
-
fmpIgnoreElements?: string[];
|
|
7215
|
-
enableBehavior?: BehaviorConfig | boolean;
|
|
7216
|
-
enableRequestHook?: RequestHookConfig | boolean;
|
|
7217
|
-
enableJSAPIReport?: boolean;
|
|
7218
|
-
}
|
|
7219
|
-
|
|
7220
|
-
declare interface OSInfo {
|
|
7221
|
-
os?: string;
|
|
7222
|
-
osVer?: string;
|
|
7286
|
+
resendLeftTimes?: number;
|
|
7223
7287
|
}
|
|
7224
7288
|
|
|
7225
7289
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
@@ -7243,6 +7307,100 @@ declare interface PayByLinkInfo {
|
|
|
7243
7307
|
linkVersion?: number;
|
|
7244
7308
|
}
|
|
7245
7309
|
|
|
7310
|
+
/**
|
|
7311
|
+
* @description Payment element app config type
|
|
7312
|
+
*/
|
|
7313
|
+
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7314
|
+
/**
|
|
7315
|
+
* @description sessionData,无法通过updateConfig更新
|
|
7316
|
+
*/
|
|
7317
|
+
sessionData?: string;
|
|
7318
|
+
/**
|
|
7319
|
+
* @internal sdk所在hostname
|
|
7320
|
+
*/
|
|
7321
|
+
merchantDomain?: string;
|
|
7322
|
+
doMain?: string;
|
|
7323
|
+
/**
|
|
7324
|
+
* @internal 渲染数据
|
|
7325
|
+
*/
|
|
7326
|
+
renderData?: CashierSdkActionQueryResult;
|
|
7327
|
+
/**
|
|
7328
|
+
* @internal connect时有这个数据
|
|
7329
|
+
*/
|
|
7330
|
+
connectAccount?: OneAccountQueryResult;
|
|
7331
|
+
/**
|
|
7332
|
+
* @internal sessionData解析后的数据
|
|
7333
|
+
*/
|
|
7334
|
+
sessionMetaData?: IPaymentSessionMetaData;
|
|
7335
|
+
/**
|
|
7336
|
+
* @internal 渲染数据错误信息
|
|
7337
|
+
*/
|
|
7338
|
+
renderDataError?: ErrorPayload;
|
|
7339
|
+
/**
|
|
7340
|
+
* @internal sdk 版本号
|
|
7341
|
+
*/
|
|
7342
|
+
sdkVersion?: string;
|
|
7343
|
+
/**
|
|
7344
|
+
* @internal 内部联调使用,生产环境传递无效
|
|
7345
|
+
*/
|
|
7346
|
+
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7347
|
+
/**
|
|
7348
|
+
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7349
|
+
*/
|
|
7350
|
+
logMetaData?: {
|
|
7351
|
+
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7352
|
+
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7353
|
+
trackId: string;
|
|
7354
|
+
merchantId?: string;
|
|
7355
|
+
paymentMethodType?: string;
|
|
7356
|
+
};
|
|
7357
|
+
/**
|
|
7358
|
+
* @internal 内部使用,无需用户传递,高度信息
|
|
7359
|
+
*/
|
|
7360
|
+
heightOfVisible?: number;
|
|
7361
|
+
}
|
|
7362
|
+
|
|
7363
|
+
/**
|
|
7364
|
+
* @description Payment element appearance type
|
|
7365
|
+
*/
|
|
7366
|
+
export declare type PaymentAppearance = PickAppearance<{
|
|
7367
|
+
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7368
|
+
theme: AntomTheme;
|
|
7369
|
+
variables: AntomVariables;
|
|
7370
|
+
layout: AntomLayouts;
|
|
7371
|
+
}>;
|
|
7372
|
+
|
|
7373
|
+
/**
|
|
7374
|
+
* @description Payment element
|
|
7375
|
+
*/
|
|
7376
|
+
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7377
|
+
static elementType: string;
|
|
7378
|
+
constructor(name: string, config: PaymentElementConfig);
|
|
7379
|
+
/**
|
|
7380
|
+
* @internal
|
|
7381
|
+
*/
|
|
7382
|
+
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7383
|
+
/**
|
|
7384
|
+
* @internal
|
|
7385
|
+
*/
|
|
7386
|
+
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7387
|
+
protected focus(): void;
|
|
7388
|
+
protected blur(): void;
|
|
7389
|
+
protected clear(): void;
|
|
7390
|
+
}
|
|
7391
|
+
|
|
7392
|
+
/**
|
|
7393
|
+
* @description Payment element config type
|
|
7394
|
+
*/
|
|
7395
|
+
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7396
|
+
}
|
|
7397
|
+
|
|
7398
|
+
/**
|
|
7399
|
+
* @description Payment element events
|
|
7400
|
+
*/
|
|
7401
|
+
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7402
|
+
}
|
|
7403
|
+
|
|
7246
7404
|
declare interface PaymentElementView {
|
|
7247
7405
|
/**
|
|
7248
7406
|
* @description payment element key
|
|
@@ -7344,6 +7502,36 @@ declare interface PaymentEvaluationResult {
|
|
|
7344
7502
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7345
7503
|
}
|
|
7346
7504
|
|
|
7505
|
+
/**
|
|
7506
|
+
* @description Payment guidance information (CKP scenario)
|
|
7507
|
+
*
|
|
7508
|
+
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
7509
|
+
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
7510
|
+
* via Map, dynamically addable)
|
|
7511
|
+
*/
|
|
7512
|
+
declare interface PaymentGuideInfo {
|
|
7513
|
+
/**
|
|
7514
|
+
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
7515
|
+
* payment guide button when this field is populated
|
|
7516
|
+
*/
|
|
7517
|
+
appLinkUrlForWeb?: string;
|
|
7518
|
+
/**
|
|
7519
|
+
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
7520
|
+
* text fields
|
|
7521
|
+
*
|
|
7522
|
+
* <p>Example configuration:
|
|
7523
|
+
*
|
|
7524
|
+
* <pre>
|
|
7525
|
+
* {
|
|
7526
|
+
* "dividerText": "or pay using",
|
|
7527
|
+
* "directPayButtonText": "Pay directly with online banking",
|
|
7528
|
+
* "ctoPButtonText": "Continue to payment"
|
|
7529
|
+
* }
|
|
7530
|
+
* </pre>
|
|
7531
|
+
*/
|
|
7532
|
+
copyWriting?: Record<string, any>;
|
|
7533
|
+
}
|
|
7534
|
+
|
|
7347
7535
|
/**
|
|
7348
7536
|
* @description 支付方式余额检查结果信息
|
|
7349
7537
|
*/
|
|
@@ -7406,6 +7594,10 @@ declare interface PaymentMethodView {
|
|
|
7406
7594
|
* @description icon
|
|
7407
7595
|
*/
|
|
7408
7596
|
icon?: string;
|
|
7597
|
+
/**
|
|
7598
|
+
* @description adaptive icon for PAYME payment method
|
|
7599
|
+
*/
|
|
7600
|
+
adaptiveIcon?: string;
|
|
7409
7601
|
/**
|
|
7410
7602
|
* @description icon对应的名称
|
|
7411
7603
|
*/
|
|
@@ -7414,6 +7606,10 @@ declare interface PaymentMethodView {
|
|
|
7414
7606
|
* @description 支付方式描述
|
|
7415
7607
|
*/
|
|
7416
7608
|
description?: string;
|
|
7609
|
+
/**
|
|
7610
|
+
* @description 支付方式点击后的描述
|
|
7611
|
+
*/
|
|
7612
|
+
descriptionAfterClick?: string;
|
|
7417
7613
|
/**
|
|
7418
7614
|
* @description category
|
|
7419
7615
|
*/
|
|
@@ -7548,6 +7744,10 @@ declare interface PaymentMethodView {
|
|
|
7548
7744
|
* @description 账单地址收集模式
|
|
7549
7745
|
*/
|
|
7550
7746
|
billingAddressCollectionMode?: string;
|
|
7747
|
+
/**
|
|
7748
|
+
* @description 分期银行信息列表
|
|
7749
|
+
*/
|
|
7750
|
+
supportIppBankList?: FrontSupportIppBank[];
|
|
7551
7751
|
}
|
|
7552
7752
|
|
|
7553
7753
|
declare interface PaymentOption {
|
|
@@ -7615,6 +7815,10 @@ declare interface PaymentOption {
|
|
|
7615
7815
|
* @description 支付选项Logo信息
|
|
7616
7816
|
*/
|
|
7617
7817
|
logo?: Logo;
|
|
7818
|
+
/**
|
|
7819
|
+
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
7820
|
+
*/
|
|
7821
|
+
description?: Record<string, string>;
|
|
7618
7822
|
/**
|
|
7619
7823
|
* @description extendInfo extendInfo information
|
|
7620
7824
|
*/
|
|
@@ -7682,6 +7886,13 @@ declare interface PaymentQuoteInfo {
|
|
|
7682
7886
|
* @description payment amount view
|
|
7683
7887
|
*/
|
|
7684
7888
|
paymentAmountView?: PaymentView;
|
|
7889
|
+
/**
|
|
7890
|
+
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
7891
|
+
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
7892
|
+
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
7893
|
+
* MYR/SGD currency pair
|
|
7894
|
+
*/
|
|
7895
|
+
quotePrice?: any;
|
|
7685
7896
|
}
|
|
7686
7897
|
|
|
7687
7898
|
/**
|
|
@@ -7791,6 +8002,45 @@ declare interface PaymentSessionConfig {
|
|
|
7791
8002
|
productSceneVersion?: string;
|
|
7792
8003
|
}
|
|
7793
8004
|
|
|
8005
|
+
/**
|
|
8006
|
+
* @description The submit params
|
|
8007
|
+
*/
|
|
8008
|
+
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8009
|
+
/**
|
|
8010
|
+
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8011
|
+
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8012
|
+
*/
|
|
8013
|
+
handleActions?: boolean;
|
|
8014
|
+
/**
|
|
8015
|
+
* @description 收件地址信息
|
|
8016
|
+
*/
|
|
8017
|
+
shippingInfo?: ShippingInfo;
|
|
8018
|
+
/**
|
|
8019
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
8020
|
+
*/
|
|
8021
|
+
params?: Record<string, unknown>;
|
|
8022
|
+
}
|
|
8023
|
+
|
|
8024
|
+
/**
|
|
8025
|
+
* @description Payment element submit result
|
|
8026
|
+
*/
|
|
8027
|
+
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8028
|
+
paymentSession?: {
|
|
8029
|
+
/**
|
|
8030
|
+
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8031
|
+
*/
|
|
8032
|
+
returnUrl: string;
|
|
8033
|
+
/**
|
|
8034
|
+
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8035
|
+
*/
|
|
8036
|
+
returnAppUrl?: string;
|
|
8037
|
+
/**
|
|
8038
|
+
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8039
|
+
*/
|
|
8040
|
+
returnAppScheme?: string;
|
|
8041
|
+
};
|
|
8042
|
+
}
|
|
8043
|
+
|
|
7794
8044
|
declare interface PaymentView {
|
|
7795
8045
|
/**
|
|
7796
8046
|
* @description 金额,以元为单位的金额
|
|
@@ -7848,56 +8098,6 @@ export declare interface PayPalConfig {
|
|
|
7848
8098
|
onShippingOptionsChange?: (data: any, actions: any) => Promise<void>;
|
|
7849
8099
|
}
|
|
7850
8100
|
|
|
7851
|
-
declare interface PerformancePlugin extends BaseInfoPlugin {
|
|
7852
|
-
getAnalyzePerformanceInfo?(): Record<string, any> | null;
|
|
7853
|
-
getPagePerformanceInfo?(): {
|
|
7854
|
-
onload: string | number;
|
|
7855
|
-
domContentLoad: string | number;
|
|
7856
|
-
redirect: string | number;
|
|
7857
|
-
appCache: string | number;
|
|
7858
|
-
dns: string | number;
|
|
7859
|
-
tcp: string | number;
|
|
7860
|
-
ssl: string | number;
|
|
7861
|
-
reqt: string | number;
|
|
7862
|
-
rest: string | number;
|
|
7863
|
-
dpt: string | number;
|
|
7864
|
-
ft: string | number;
|
|
7865
|
-
domInteractive: string | number;
|
|
7866
|
-
domReady: string | number;
|
|
7867
|
-
domComplete: string | number;
|
|
7868
|
-
random: string | number;
|
|
7869
|
-
miniPerformance?: ReturnType<typeof getMiniPerformance>;
|
|
7870
|
-
timeOrigin?: number;
|
|
7871
|
-
};
|
|
7872
|
-
getWebVitalsInfo?(): GetWebVitalsInfoResult;
|
|
7873
|
-
getWhiteScreenInfo?(options?: Pick<GetWhiteScreenInfoOptions, 'selector' | 'ignoreNotInViewport'>): Promise<{
|
|
7874
|
-
status: 'error' | 'ok';
|
|
7875
|
-
}>;
|
|
7876
|
-
getFMP?(options?: {
|
|
7877
|
-
ignoreElements?: string[];
|
|
7878
|
-
}): Promise<{
|
|
7879
|
-
time: number;
|
|
7880
|
-
selector: string;
|
|
7881
|
-
} | undefined>;
|
|
7882
|
-
getTTI?(): Promise<number | undefined>;
|
|
7883
|
-
getFP?(): Promise<number | undefined>;
|
|
7884
|
-
getT2Time?(): Promise<number | undefined>;
|
|
7885
|
-
/**
|
|
7886
|
-
* 将性能数据发送到容器,目前只需 H5 应用实现
|
|
7887
|
-
*/
|
|
7888
|
-
sendPerformanceDataToContainer?(data: LogItem): Promise<void>;
|
|
7889
|
-
getSnapshot?: () => {
|
|
7890
|
-
fmp: string;
|
|
7891
|
-
lcp: string;
|
|
7892
|
-
};
|
|
7893
|
-
/**
|
|
7894
|
-
* 用于采集详细的性能数据,越晚调用,搜集的数据越多
|
|
7895
|
-
*/
|
|
7896
|
-
getDetailPerformance?(): Promise<DMC | null>;
|
|
7897
|
-
startCheckingPageWhiteScreen?(config: GetWhiteScreenInfoOptions | boolean | undefined): Promise<(() => void) | undefined>;
|
|
7898
|
-
startCheckingDOMWhiteScreen?(selector: string, options: Omit<GetWhiteScreenInfoOptions, 'selector'>): (() => void) | undefined;
|
|
7899
|
-
}
|
|
7900
|
-
|
|
7901
8101
|
declare interface PeriodRule {
|
|
7902
8102
|
/**
|
|
7903
8103
|
* @description period type
|
|
@@ -7909,87 +8109,13 @@ declare interface PeriodRule {
|
|
|
7909
8109
|
periodCount?: number;
|
|
7910
8110
|
}
|
|
7911
8111
|
|
|
8112
|
+
/**
|
|
8113
|
+
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8114
|
+
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8115
|
+
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8116
|
+
*/
|
|
7912
8117
|
declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
|
|
7913
8118
|
|
|
7914
|
-
declare interface PluginContext {
|
|
7915
|
-
userPath: {
|
|
7916
|
-
reStoreUserPath: (appId: string) => void;
|
|
7917
|
-
parseUserPathExtra: (key: string) => {
|
|
7918
|
-
idengine_user_path: string;
|
|
7919
|
-
} | null;
|
|
7920
|
-
getUserPathExtra: () => {
|
|
7921
|
-
cachePath: string[];
|
|
7922
|
-
extra: {
|
|
7923
|
-
idengine_user_path: string;
|
|
7924
|
-
};
|
|
7925
|
-
};
|
|
7926
|
-
};
|
|
7927
|
-
waitInit: () => Promise<void>;
|
|
7928
|
-
}
|
|
7929
|
-
|
|
7930
|
-
declare type PluginFunction = (iTracert: ITracert, callback: () => void) => boolean;
|
|
7931
|
-
|
|
7932
|
-
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'> & {
|
|
7933
|
-
server?: string;
|
|
7934
|
-
servers?: string[];
|
|
7935
|
-
isMarmot?: boolean;
|
|
7936
|
-
deviceId?: Promise<string>;
|
|
7937
|
-
whiteScreenConfig?: (BlankMonitorConfig & {
|
|
7938
|
-
callback?: (options: ReportData) => Promise<void>;
|
|
7939
|
-
}) | boolean;
|
|
7940
|
-
spmCheckCover?: string;
|
|
7941
|
-
whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
|
|
7942
|
-
remoteConfigValidDuration?: number;
|
|
7943
|
-
};
|
|
7944
|
-
|
|
7945
|
-
declare interface PluginOnErrorCallbackErrorInfo {
|
|
7946
|
-
message: string;
|
|
7947
|
-
extra: Record<string, any>;
|
|
7948
|
-
type: ErrorType;
|
|
7949
|
-
}
|
|
7950
|
-
|
|
7951
|
-
declare interface PluginPageMonitorOptions {
|
|
7952
|
-
spmInfo: {
|
|
7953
|
-
spmAPos: string;
|
|
7954
|
-
spmBPos: string;
|
|
7955
|
-
currentPage: string;
|
|
7956
|
-
};
|
|
7957
|
-
logData?: Record<string, any>;
|
|
7958
|
-
}
|
|
7959
|
-
|
|
7960
|
-
declare interface PluginShape extends PerformancePlugin, LagPlugin {
|
|
7961
|
-
getRequester(): GetRequesterResult;
|
|
7962
|
-
getDataFilter?(): (data: string[]) => Promise<string[]>;
|
|
7963
|
-
getExtraDataFilter?(): (data: Record<string, any>) => Promise<Record<string, any>>;
|
|
7964
|
-
onSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
7965
|
-
offSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
7966
|
-
init?(options: PluginInitOptions): Promise<void>;
|
|
7967
|
-
onError?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): () => void;
|
|
7968
|
-
onPageLoad?(callback: () => void): () => void;
|
|
7969
|
-
set?(options: Record<string, any>): void;
|
|
7970
|
-
/**
|
|
7971
|
-
* @deprecated Compatible with old APIs. Use `Tracker#report` instead.
|
|
7972
|
-
* @param info
|
|
7973
|
-
* @param extra
|
|
7974
|
-
*/
|
|
7975
|
-
log?(type: string, params?: Record<string, any>): void;
|
|
7976
|
-
pageMonitor?(options: PluginPageMonitorOptions): void;
|
|
7977
|
-
expo?(code: string, extra?: Record<string, number | string | boolean>): void;
|
|
7978
|
-
click?(code: string, extra: Record<string, number | string | boolean>): void;
|
|
7979
|
-
getSessionItem?(key: string): string | null;
|
|
7980
|
-
removeSessionItem?(key: string): void;
|
|
7981
|
-
setSessionItem?(key: string, value: string): void;
|
|
7982
|
-
getSessionId?(): string | null;
|
|
7983
|
-
getStorageItem?(key: string): Promise<string | null>;
|
|
7984
|
-
removeStorageItem?(key: string): void;
|
|
7985
|
-
setStorageItem?(key: string, value: string): void;
|
|
7986
|
-
onHTTPError?(callback: (options: HTTPErrorCallbackOptions) => void): void;
|
|
7987
|
-
triggerPreCaptureReport?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): void;
|
|
7988
|
-
PluginShape?: void;
|
|
7989
|
-
initBehaviorListener?(addBehavior: AddBehavior, config: BehaviorConfig): void;
|
|
7990
|
-
reportAPI?(config: RequestHookConfig, callback: (options: APICallbackOptions) => void): void;
|
|
7991
|
-
}
|
|
7992
|
-
|
|
7993
8119
|
/**
|
|
7994
8120
|
* @description 政策信息,例如隐私链接,免责声明等
|
|
7995
8121
|
*/
|
|
@@ -9881,6 +10007,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
9881
10007
|
|
|
9882
10008
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
9883
10009
|
|
|
10010
|
+
/**
|
|
10011
|
+
* @description QR code configuration for code form view
|
|
10012
|
+
*/
|
|
10013
|
+
declare interface QrCodeConfig {
|
|
10014
|
+
/**
|
|
10015
|
+
* @description QR code render style, e.g. "rounded"
|
|
10016
|
+
*/
|
|
10017
|
+
renderStyle?: string;
|
|
10018
|
+
/**
|
|
10019
|
+
* @description QR code center icon, can be URL or Base64 format
|
|
10020
|
+
*/
|
|
10021
|
+
centerIcon?: string;
|
|
10022
|
+
/**
|
|
10023
|
+
* @description QR code corner icon, can be URL or Base64 format
|
|
10024
|
+
*/
|
|
10025
|
+
cornerIcon?: string;
|
|
10026
|
+
}
|
|
10027
|
+
|
|
9884
10028
|
declare interface Rate {
|
|
9885
10029
|
/**
|
|
9886
10030
|
* @description rate label value
|
|
@@ -9950,66 +10094,35 @@ declare class ReceivePort {
|
|
|
9950
10094
|
}): Promise<Record<string, any> | undefined>;
|
|
9951
10095
|
}
|
|
9952
10096
|
|
|
10097
|
+
/**
|
|
10098
|
+
* @description 从webapp重定向到新URL的配置项。
|
|
10099
|
+
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10100
|
+
*/
|
|
9953
10101
|
declare interface RedirectOption {
|
|
10102
|
+
/**
|
|
10103
|
+
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10104
|
+
*/
|
|
9954
10105
|
url: string;
|
|
10106
|
+
/**
|
|
10107
|
+
* @description 唤端到url地址,http或https的地址
|
|
10108
|
+
*/
|
|
10109
|
+
appLinkUrl?: string;
|
|
10110
|
+
/**
|
|
10111
|
+
* @description 唤端到schema地址, schema://的地址
|
|
10112
|
+
*/
|
|
10113
|
+
schemaUrl?: string;
|
|
10114
|
+
/**
|
|
10115
|
+
* @description 重定向模式,默认为redirect
|
|
10116
|
+
*/
|
|
9955
10117
|
mode?: 'redirect' | 'replace';
|
|
9956
10118
|
/**
|
|
9957
10119
|
* @description 是否重定向后销毁实例,默认为true
|
|
9958
10120
|
*/
|
|
9959
|
-
|
|
10121
|
+
destroy?: boolean;
|
|
9960
10122
|
}
|
|
9961
10123
|
|
|
9962
|
-
declare type ReportData = {
|
|
9963
|
-
title?: string;
|
|
9964
|
-
msg?: string | Error | Record<string, number | string> | Event;
|
|
9965
|
-
logType: 'error' | 'info';
|
|
9966
|
-
extra?: Record<string, number | boolean | string | undefined | Error | null>;
|
|
9967
|
-
} | ({
|
|
9968
|
-
logType: 'custom';
|
|
9969
|
-
} & LogItem);
|
|
9970
|
-
|
|
9971
10124
|
declare type RequestEnv = 'local' | 'dev' | 'sit' | 'pre' | 'prod' | 'sandbox' | 'light_sandbox';
|
|
9972
10125
|
|
|
9973
|
-
declare class RequesterCacheWrapper {
|
|
9974
|
-
private autoReportConfig;
|
|
9975
|
-
private dataCache;
|
|
9976
|
-
private lastSendTime;
|
|
9977
|
-
private batchCount;
|
|
9978
|
-
private sendFrequency;
|
|
9979
|
-
constructor(autoReportConfig: {
|
|
9980
|
-
immediate?: boolean;
|
|
9981
|
-
deviceId?: Promise<string>;
|
|
9982
|
-
isReport?: boolean;
|
|
9983
|
-
programVersion?: string;
|
|
9984
|
-
productId?: string;
|
|
9985
|
-
appId?: string;
|
|
9986
|
-
compatibleAppId?: string;
|
|
9987
|
-
bizType?: string;
|
|
9988
|
-
});
|
|
9989
|
-
report(options: ReportData & {
|
|
9990
|
-
request: GetRequesterResult;
|
|
9991
|
-
extraDataFilter?: (data: Record<string, any>) => Promise<Record<string, any>>;
|
|
9992
|
-
dataFilter?: (data: string[]) => Promise<string[]>;
|
|
9993
|
-
} & BaseInfo & {
|
|
9994
|
-
immediate?: boolean;
|
|
9995
|
-
}): Promise<void>;
|
|
9996
|
-
private send;
|
|
9997
|
-
/**
|
|
9998
|
-
* 分批发送请求
|
|
9999
|
-
*/
|
|
10000
|
-
private httpRequest;
|
|
10001
|
-
private sendBatch;
|
|
10002
|
-
}
|
|
10003
|
-
|
|
10004
|
-
declare type RequestHookConfig = {
|
|
10005
|
-
/**
|
|
10006
|
-
* @description 不上报的域名
|
|
10007
|
-
*/
|
|
10008
|
-
excludes?: Array<string | RegExp>;
|
|
10009
|
-
getFetchResponseInfo?: (headers: Headers, responseData: Record<string, any>, requestParam: Array<any>) => ResponseInfo;
|
|
10010
|
-
getXHRResponseInfo?: (response: XHRResponse) => ResponseInfo;
|
|
10011
|
-
};
|
|
10012
|
-
|
|
10013
10126
|
declare interface RequestOptions {
|
|
10014
10127
|
env?: RequestEnv;
|
|
10015
10128
|
baseURL?: string;
|
|
@@ -10034,15 +10147,6 @@ declare interface RequestOptions {
|
|
|
10034
10147
|
scope?: string;
|
|
10035
10148
|
}
|
|
10036
10149
|
|
|
10037
|
-
declare type ResponseInfo = {
|
|
10038
|
-
responseUrl?: string;
|
|
10039
|
-
traceId?: string;
|
|
10040
|
-
isSuccess?: boolean;
|
|
10041
|
-
errorCode?: string | number;
|
|
10042
|
-
errorMsg?: string;
|
|
10043
|
-
url?: string;
|
|
10044
|
-
};
|
|
10045
|
-
|
|
10046
10150
|
/**
|
|
10047
10151
|
* @description 国际支付标准结果码,参考主站<code>ErrorCode</code>实现。
|
|
10048
10152
|
*
|
|
@@ -10187,7 +10291,25 @@ declare interface SharePayInfo {
|
|
|
10187
10291
|
securityText?: string;
|
|
10188
10292
|
}
|
|
10189
10293
|
|
|
10190
|
-
declare interface ShippingInfo {
|
|
10294
|
+
export declare interface ShippingInfo {
|
|
10295
|
+
shippingName: {
|
|
10296
|
+
firstName: string;
|
|
10297
|
+
lastName: string;
|
|
10298
|
+
middleName?: string;
|
|
10299
|
+
fullName?: string;
|
|
10300
|
+
};
|
|
10301
|
+
shippingPhoneNo: string;
|
|
10302
|
+
shippingAddress: {
|
|
10303
|
+
region: string;
|
|
10304
|
+
address1: string;
|
|
10305
|
+
address2: string;
|
|
10306
|
+
city?: string;
|
|
10307
|
+
state?: string;
|
|
10308
|
+
zipCode: string;
|
|
10309
|
+
};
|
|
10310
|
+
}
|
|
10311
|
+
|
|
10312
|
+
declare interface ShippingInfo_2 {
|
|
10191
10313
|
/**
|
|
10192
10314
|
* @description The unique ID to identify the shipping info
|
|
10193
10315
|
*/
|
|
@@ -10399,14 +10521,6 @@ declare type SimplePseudos =
|
|
|
10399
10521
|
| ":volume-locked"
|
|
10400
10522
|
| ":xr-overlay";
|
|
10401
10523
|
|
|
10402
|
-
declare interface SpmConfig {
|
|
10403
|
-
spmAPos: string;
|
|
10404
|
-
bizType: string;
|
|
10405
|
-
pages?: Record<string, Record<string, string>>;
|
|
10406
|
-
mdata?: Record<string, number | string | boolean>;
|
|
10407
|
-
immediate?: boolean;
|
|
10408
|
-
}
|
|
10409
|
-
|
|
10410
10524
|
declare interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
10411
10525
|
/**
|
|
10412
10526
|
* This feature is not Baseline because it does not work in some of the most widely-used browsers.
|
|
@@ -24105,14 +24219,14 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
24105
24219
|
|
|
24106
24220
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
24107
24221
|
|
|
24222
|
+
export declare type SubmitParams = {
|
|
24223
|
+
redirect?: 'always' | 'if_required';
|
|
24224
|
+
};
|
|
24225
|
+
|
|
24108
24226
|
/**
|
|
24109
|
-
* @description
|
|
24227
|
+
* @description 成功时的数据类型
|
|
24110
24228
|
*/
|
|
24111
24229
|
export declare type SubmitResult = {
|
|
24112
|
-
/**
|
|
24113
|
-
* 查询到的状态
|
|
24114
|
-
*/
|
|
24115
|
-
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24116
24230
|
/**
|
|
24117
24231
|
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
24118
24232
|
* @deprecated 已废弃请读取error中的code
|
|
@@ -24125,6 +24239,10 @@ export declare type SubmitResult = {
|
|
|
24125
24239
|
* @internal
|
|
24126
24240
|
*/
|
|
24127
24241
|
message?: string;
|
|
24242
|
+
/**
|
|
24243
|
+
* 查询到的状态
|
|
24244
|
+
*/
|
|
24245
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24128
24246
|
/**
|
|
24129
24247
|
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
24130
24248
|
*/
|
|
@@ -24137,6 +24255,10 @@ export declare type SubmitResult = {
|
|
|
24137
24255
|
* 查询到的结果消息
|
|
24138
24256
|
*/
|
|
24139
24257
|
message?: string;
|
|
24258
|
+
/**
|
|
24259
|
+
* @description 是否需要更换 session 重试
|
|
24260
|
+
*/
|
|
24261
|
+
needChangeSessionForRetry?: boolean;
|
|
24140
24262
|
};
|
|
24141
24263
|
/**
|
|
24142
24264
|
* 是否是用户手动取消3D
|
|
@@ -24595,255 +24717,42 @@ declare interface TerminalTypeAction {
|
|
|
24595
24717
|
interactionType?: string;
|
|
24596
24718
|
}
|
|
24597
24719
|
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
|
|
24607
|
-
|
|
24608
|
-
|
|
24609
|
-
|
|
24610
|
-
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
24614
|
-
|
|
24615
|
-
|
|
24616
|
-
|
|
24617
|
-
|
|
24618
|
-
|
|
24619
|
-
|
|
24620
|
-
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24624
|
-
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24631
|
-
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
private spmCheckCover?;
|
|
24635
|
-
private enableBehavior?;
|
|
24636
|
-
private behavior?;
|
|
24637
|
-
private enableRequestHook?;
|
|
24638
|
-
private enableJSAPIReport?;
|
|
24639
|
-
private customizedPerformanceMark?;
|
|
24640
|
-
constructor(Plugin: new (context: PluginContext) => PluginShape);
|
|
24641
|
-
init(options: TrackerInitOptions): Promise<boolean>;
|
|
24642
|
-
/**
|
|
24643
|
-
* 业务侧可以拦截发送日志的请求,用于手动过滤
|
|
24644
|
-
* 当前仅对浏览器环境生效
|
|
24645
|
-
* rawData 是 intl-tracker 内部格式的数据,为对象
|
|
24646
|
-
* data 是最终发送到服务端的数据,为字符串形式
|
|
24647
|
-
*/
|
|
24648
|
-
onSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
24649
|
-
/**
|
|
24650
|
-
* 业务侧可以取消拦截发送日志的请求
|
|
24651
|
-
* 当前仅对浏览器环境生效
|
|
24652
|
-
*/
|
|
24653
|
-
offSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
|
|
24654
|
-
private startReportSnapshot;
|
|
24655
|
-
/**
|
|
24656
|
-
* 用于上报自定义性能指标,单次仅上报一个指标
|
|
24657
|
-
* @param key m1 - m20
|
|
24658
|
-
* @param num 耗时,数字,一定要 >= 0,否则无统计意义
|
|
24659
|
-
*/
|
|
24660
|
-
reportCustomizedPerformance(key: CustomizedPerformanceKey, num: number): void | undefined;
|
|
24661
|
-
/**
|
|
24662
|
-
* 上报自定义性能指标
|
|
24663
|
-
* @param data 适合单次合并上报多个指标的场景
|
|
24664
|
-
* 请注意,使用 reportCustomizedPerformance 上报时,每次上报会发送一次日志请求
|
|
24665
|
-
* 不同阶段的数据量会有差异,这些差异可以作为页面流失漏斗的数据源
|
|
24666
|
-
* 但合并上报时,同时上报的多个指标数量是相同的
|
|
24667
|
-
*/
|
|
24668
|
-
reportCustomizedPerformanceData(data: Partial<Record<CustomizedPerformanceKey, number>>): void | undefined;
|
|
24669
|
-
/**
|
|
24670
|
-
* 用于显式上报小程序性能指标
|
|
24671
|
-
* 由于小程序的性能指标仅在“使用 schema 打开页面”时有效,原来的自动上报未区分场景,会导致脏数据较多
|
|
24672
|
-
* 改为数据自动采集、仅在必要时由业务方手动调用接口上报
|
|
24673
|
-
*/
|
|
24674
|
-
reportMiniProgramPerformance(): Promise<void> | undefined;
|
|
24675
|
-
getMiniProgramPerformanceData(): Promise<{
|
|
24676
|
-
s1: number;
|
|
24677
|
-
s2: number;
|
|
24678
|
-
s3: number;
|
|
24679
|
-
s4: number;
|
|
24680
|
-
s5: number;
|
|
24681
|
-
s6: number;
|
|
24682
|
-
s7: number;
|
|
24683
|
-
s8: number;
|
|
24684
|
-
} | undefined> | undefined;
|
|
24685
|
-
/**
|
|
24686
|
-
* 用于显式上报网页性能指标,一般用不上
|
|
24687
|
-
* 1. tracker.onPageLoad() 会自动上报
|
|
24688
|
-
* 2. tracker.reportCustomizedPerformanceData() 会自动上报
|
|
24689
|
-
* 3. tracker.reportCustomizedPerformance() 会自动上报
|
|
24690
|
-
* 4. tracker.reportMiniProgramPerformance() 会自动上报
|
|
24691
|
-
* 5. 以上方法仅会上报一次网页性能指标,多次调用不受影响
|
|
24692
|
-
* 6. 仅当以上所有方法均未调用时,才需要手动调用此方法
|
|
24693
|
-
*/
|
|
24694
|
-
reportPagePerformance(): Promise<void> | undefined;
|
|
24695
|
-
private handleReportSnapShot;
|
|
24696
|
-
get lag(): {
|
|
24697
|
-
log: (msg: string) => Promise<void>;
|
|
24698
|
-
fps: () => Promise<void>;
|
|
24699
|
-
};
|
|
24700
|
-
onPageLoad(options?: string | {
|
|
24701
|
-
title?: string;
|
|
24702
|
-
fmpIgnoreElements?: string[];
|
|
24703
|
-
}): Promise<void>;
|
|
24704
|
-
reportPerformance(title?: string): void;
|
|
24705
|
-
reportDetailPerformance(): void;
|
|
24706
|
-
onError(): Promise<(() => void) | undefined>;
|
|
24707
|
-
fmp(time: number): void;
|
|
24708
|
-
flushBehavior(): void;
|
|
24709
|
-
/**
|
|
24710
|
-
* 内部使用
|
|
24711
|
-
*
|
|
24712
|
-
* @param error
|
|
24713
|
-
*/
|
|
24714
|
-
private reportError;
|
|
24715
|
-
private triggerPreCaptureReport;
|
|
24716
|
-
onHTTPError(): Promise<void>;
|
|
24717
|
-
private reportAPI;
|
|
24718
|
-
/**
|
|
24719
|
-
* 内部使用,业务项目不要调用
|
|
24720
|
-
*
|
|
24721
|
-
* @param options
|
|
24722
|
-
*/
|
|
24723
|
-
reportHTTPError(options: HTTPErrorCallbackOptions): void;
|
|
24724
|
-
set(options: Record<string, any>): void;
|
|
24725
|
-
log(item: LogItem): void;
|
|
24726
|
-
/**
|
|
24727
|
-
* @deprecated Compatible with old APIs. Use `Tracker#log` instead.
|
|
24728
|
-
* @param info
|
|
24729
|
-
* @param extra
|
|
24730
|
-
*/
|
|
24731
|
-
logInfo(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
|
|
24732
|
-
/**
|
|
24733
|
-
* @deprecated Compatible with old APIs. Use `Tracker#log` instead.
|
|
24734
|
-
* @param info
|
|
24735
|
-
* @param extra
|
|
24736
|
-
*/
|
|
24737
|
-
logError(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
|
|
24738
|
-
reportFunnel(title: string, config?: {
|
|
24739
|
-
[prop: string]: string | number;
|
|
24740
|
-
name: string;
|
|
24741
|
-
level: number;
|
|
24742
|
-
label: string;
|
|
24743
|
-
} | undefined): Promise<void>;
|
|
24744
|
-
reportRPC(rpcInfo: {
|
|
24745
|
-
name: string;
|
|
24746
|
-
label: string;
|
|
24747
|
-
code?: string | undefined;
|
|
24748
|
-
msg?: string | Error | Record<string, string | number> | undefined;
|
|
24749
|
-
success?: boolean | undefined;
|
|
24750
|
-
result?: number | undefined;
|
|
24751
|
-
traceId?: string | undefined;
|
|
24752
|
-
httpStatus?: string | undefined;
|
|
24753
|
-
time?: number | undefined;
|
|
24754
|
-
}): void;
|
|
24755
|
-
logJSBridgeError(info: LogInfo): void;
|
|
24756
|
-
pageMonitor(page: string, extraParams?: Record<string, any>, autoPv?: boolean): void;
|
|
24757
|
-
expo(code: string, extra?: Record<string, string | number | boolean> | undefined): void;
|
|
24758
|
-
click(code: string, extra?: Record<string, string | number | boolean>): void;
|
|
24759
|
-
pv(): void;
|
|
24760
|
-
/**
|
|
24761
|
-
* 指定点位白屏的监控 - 用于监控目标点位的白屏
|
|
24762
|
-
* 页面白屏和目标点位白屏的通用监控逻辑
|
|
24763
|
-
*
|
|
24764
|
-
* @param selector 目标点位选择器
|
|
24765
|
-
* @param options 配置项
|
|
24766
|
-
* {
|
|
24767
|
-
* 检测延时,单位 second,即启动白屏检测后多久开始执行白屏识别
|
|
24768
|
-
* NOTE: 设置时间时要考虑业务平均加载时间,太短可能会误报
|
|
24769
|
-
* delay
|
|
24770
|
-
*
|
|
24771
|
-
* 是否持续监测, 即初始化白屏检测结束之后是否继续监控业务运行中白屏, default: true
|
|
24772
|
-
* persistent
|
|
24773
|
-
* }
|
|
24774
|
-
*/
|
|
24775
|
-
startCheckingDOMWhiteScreen(selector: string, options: Omit<BlankMonitorConfig, 'selector'>): void;
|
|
24776
|
-
private getRequester;
|
|
24777
|
-
protected getDefaultExtraInfo(): Promise<BaseInfo>;
|
|
24778
|
-
private request;
|
|
24779
|
-
private formatExtra;
|
|
24780
|
-
private reportLog;
|
|
24781
|
-
/**
|
|
24782
|
-
* 解析成功率上报参数
|
|
24783
|
-
* @param key p_ page c_ click expo r l -info或者-error结尾是前端日志
|
|
24784
|
-
* @param funnelConfig 标准漏斗上报参数
|
|
24785
|
-
* @returns 扩展参数数据
|
|
24786
|
-
*/
|
|
24787
|
-
private parseUserPathExtra;
|
|
24788
|
-
/**
|
|
24789
|
-
* 获取成功率上报参数
|
|
24790
|
-
* 用于去冲
|
|
24791
|
-
*/
|
|
24792
|
-
private getUserPathExtra;
|
|
24793
|
-
/**
|
|
24794
|
-
* 恢复存储的用户路径
|
|
24795
|
-
*/
|
|
24796
|
-
private reStoreUserPath;
|
|
24797
|
-
private reStoreUserPathMeta;
|
|
24798
|
-
private reStoreSessionId;
|
|
24799
|
-
/**
|
|
24800
|
-
* 重置session id
|
|
24801
|
-
*/
|
|
24802
|
-
resetSessionId(): void;
|
|
24803
|
-
/**
|
|
24804
|
-
* 重置用户路径
|
|
24805
|
-
*/
|
|
24806
|
-
resetUserPath(): void;
|
|
24807
|
-
private normalizeServer;
|
|
24808
|
-
private normalizeServers;
|
|
24809
|
-
}
|
|
24810
|
-
|
|
24811
|
-
declare interface TrackerInitOptions {
|
|
24812
|
-
spmConfig?: SpmConfig;
|
|
24813
|
-
marmotId: string;
|
|
24814
|
-
compatibleAppId?: string;
|
|
24815
|
-
userId?: string;
|
|
24816
|
-
server?: IMDAP_SERVER | string;
|
|
24817
|
-
servers?: (IMDAP_SERVER | string)[];
|
|
24818
|
-
env?: Env_2;
|
|
24819
|
-
sprintId?: string;
|
|
24820
|
-
whiteScreen?: BlankMonitorConfig | boolean;
|
|
24821
|
-
immediate?: boolean;
|
|
24822
|
-
autoExpo?: boolean;
|
|
24823
|
-
autoClick?: boolean;
|
|
24824
|
-
expoOnce?: boolean;
|
|
24825
|
-
enableScreenshot?: boolean | {
|
|
24826
|
-
rate: number;
|
|
24827
|
-
};
|
|
24828
|
-
enableResourceAnalysis?: boolean;
|
|
24829
|
-
spmCheckCover?: string;
|
|
24830
|
-
enableBehavior?: BehaviorConfig | boolean;
|
|
24831
|
-
enableRequestHook?: RequestHookConfig | boolean;
|
|
24832
|
-
enableJSAPIReport?: boolean;
|
|
24833
|
-
/**
|
|
24834
|
-
* 白名单配置源,仅浏览器环境支持
|
|
24835
|
-
* 不传值时,与旧版功能相同,所有日志都会发送
|
|
24836
|
-
* 1. 值为 REMOTE 时,表示从远程服务器获取白名单配置
|
|
24837
|
-
* 2. 值为 NONE 时,表示不使用白名单配置,所有日志都会发送
|
|
24838
|
-
*/
|
|
24839
|
-
whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
|
|
24840
|
-
/**
|
|
24841
|
-
* 当且仅当 whiteListConfigSource 为 REMOTE 时有效
|
|
24842
|
-
* 在有效期内,不重复加载 json 请求
|
|
24843
|
-
*/
|
|
24844
|
-
remoteConfigValidDuration?: number;
|
|
24845
|
-
productId?: string;
|
|
24846
|
-
bizType?: string;
|
|
24720
|
+
/**
|
|
24721
|
+
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
24722
|
+
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
24723
|
+
* 确保两条路径的弹窗 loading 表现一致。
|
|
24724
|
+
*/
|
|
24725
|
+
export declare const themeColorMap: Record<AntomTheme, {
|
|
24726
|
+
theme: 'dark' | 'light';
|
|
24727
|
+
backgroundColor: string;
|
|
24728
|
+
}>;
|
|
24729
|
+
|
|
24730
|
+
/** Configuration options for rendering a toast notification. */
|
|
24731
|
+
export declare interface ToastParams {
|
|
24732
|
+
/** Text displayed in the toast. */
|
|
24733
|
+
message: string;
|
|
24734
|
+
/** Placement of the toast container within the viewport. */
|
|
24735
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
|
|
24736
|
+
/** Toast background color in any valid CSS color format. */
|
|
24737
|
+
backgroundColor?: string;
|
|
24738
|
+
/** Toast text color in any valid CSS color format. */
|
|
24739
|
+
color?: string;
|
|
24740
|
+
/** Toast padding in any valid CSS length format. */
|
|
24741
|
+
padding?: string;
|
|
24742
|
+
/** Toast border radius in any valid CSS length format. */
|
|
24743
|
+
borderRadius?: string;
|
|
24744
|
+
/** Toast font size in any valid CSS length format. */
|
|
24745
|
+
fontSize?: string;
|
|
24746
|
+
/** Stacking order of the toast container. */
|
|
24747
|
+
zIndex?: number;
|
|
24748
|
+
/** Toast width in any valid CSS length format. */
|
|
24749
|
+
width?: string;
|
|
24750
|
+
/** Time in milliseconds before the toast starts to disappear. */
|
|
24751
|
+
duration?: number;
|
|
24752
|
+
/** Preset status icon displayed above the message. */
|
|
24753
|
+
icon?: 'SUCCESS' | 'FAIL';
|
|
24754
|
+
/** Whether the status icon uses a spinning animation. */
|
|
24755
|
+
spin?: boolean;
|
|
24847
24756
|
}
|
|
24848
24757
|
|
|
24849
24758
|
/**
|
|
@@ -24939,7 +24848,8 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
24939
24848
|
export declare type VaultingAppearanceProps = {
|
|
24940
24849
|
displaySetting: 'showCardBrandIcon';
|
|
24941
24850
|
theme: AntomTheme;
|
|
24942
|
-
variables:
|
|
24851
|
+
variables: AntomVariables;
|
|
24852
|
+
fonts?: FontSource[];
|
|
24943
24853
|
};
|
|
24944
24854
|
|
|
24945
24855
|
/**
|
|
@@ -24968,7 +24878,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
24968
24878
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
24969
24879
|
}
|
|
24970
24880
|
|
|
24971
|
-
export declare interface VaultingElementEvents extends
|
|
24881
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
24972
24882
|
}
|
|
24973
24883
|
|
|
24974
24884
|
/**
|
|
@@ -28608,16 +28518,9 @@ declare interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, T
|
|
|
28608
28518
|
|
|
28609
28519
|
declare type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>;
|
|
28610
28520
|
|
|
28611
|
-
declare type WHITE_LIST_CONFIG_SOURCE = 'REMOTE' | 'NONE';
|
|
28612
|
-
|
|
28613
28521
|
declare type WithAppURL<T> = T & {
|
|
28614
28522
|
appUrl: string;
|
|
28615
28523
|
isMainElement: boolean;
|
|
28616
28524
|
};
|
|
28617
28525
|
|
|
28618
|
-
declare type XHRResponse = {
|
|
28619
|
-
headers: ReturnType<XMLHttpRequest['getAllResponseHeaders']>;
|
|
28620
|
-
body: XMLHttpRequest['response'];
|
|
28621
|
-
};
|
|
28622
|
-
|
|
28623
28526
|
export { }
|