@alipay/ams-checkout 0.0.1783663570-dev.9 → 0.0.1784256876-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/ams-checkout.js +3 -4
  2. package/dist/ams-checkout.min.js +1 -2
  3. package/esm/config/index.d.ts +0 -7
  4. package/esm/config/index.js +2 -2
  5. package/esm/constant/element.d.ts +1 -2
  6. package/esm/constant/element.js +0 -1
  7. package/esm/constant/index.d.ts +21 -4
  8. package/esm/core/component/element/elementController/index.d.ts +3 -3
  9. package/esm/core/component/element/elementController/index.js +42 -66
  10. package/esm/core/component/element/elementProcessor/paymentProcessor.js +10 -13
  11. package/esm/core/component/element/index.d.ts +1 -4
  12. package/esm/core/component/element/index.js +4 -19
  13. package/esm/core/component/element/mock.js +1 -1
  14. package/esm/core/component/element/type.d.ts +18 -16
  15. package/esm/core/instance/index.d.ts +4 -12
  16. package/esm/core/instance/index.js +26 -152
  17. package/esm/foundation/service/event-center.js +1 -1
  18. package/esm/foundation/service/security/index.d.ts +4 -9
  19. package/esm/foundation/service/security/index.js +35 -158
  20. package/esm/foundation/service/security/security.d.ts +1 -22
  21. package/esm/foundation/service/security/security.js +37 -150
  22. package/esm/foundation/utils/preload_helper.d.ts +3 -6
  23. package/esm/foundation/utils/preload_helper.js +32 -122
  24. package/esm/main.js +4 -4
  25. package/esm/modern/index.d.ts +1 -5
  26. package/esm/modern/index.js +51 -1
  27. package/esm/modern/stageName.d.ts +3 -0
  28. package/esm/modern/stageName.js +1 -0
  29. package/esm/plugin/component/channel.d.ts +2 -2
  30. package/esm/plugin/component/channel.js +18 -18
  31. package/esm/plugin/component/index.js +29 -36
  32. package/esm/tsdoc-metadata.json +1 -1
  33. package/esm/types/index.d.ts +0 -1
  34. package/esm/util/beforeConfirm.d.ts +2 -4
  35. package/esm/util/beforeConfirm.js +14 -15
  36. package/esm/util/logger.js +2 -1
  37. package/esm/util/security.d.ts +1 -22
  38. package/esm/util/security.js +39 -150
  39. package/package.json +9 -15
  40. package/types.d.ts +1106 -842
  41. package/types.untrimmed.d.ts +1122 -991
  42. package/dist/ams-checkout.min.js.map +0 -1
  43. package/esm/core/component/element/modernElementController/adapter.d.ts +0 -19
  44. package/esm/core/component/element/modernElementController/adapter.js +0 -79
  45. package/esm/core/component/element/modernElementController/index.d.ts +0 -154
  46. package/esm/core/component/element/modernElementController/index.js +0 -1777
  47. package/esm/modern/global.d.ts +0 -3
  48. package/esm/modern/tools.js +0 -1
  49. package/esm/util/jshield-apdid/apdid-loader.js +0 -377
  50. package/esm/util/jshield-apdid/index.js +0 -21
  51. package/esm/util/security-registry.d.ts +0 -72
  52. package/esm/util/security-registry.js +0 -175
package/types.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { CompatibleTrackerFull } from '@antintl/intl-tracker/common';
2
-
3
1
  declare interface ActionForm {
4
2
  /**
5
3
  * @description action form type
@@ -7,6 +5,8 @@ declare interface ActionForm {
7
5
  actionFormType?: string;
8
6
  }
9
7
 
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,26 +143,7 @@ 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>, 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
- /* Excluded from this release type: showPopup */
154
- /* Excluded from this release type: dismissLoading */
155
- /* Excluded from this release type: webAppReady */
156
- /* Excluded from this release type: onLaunch */
157
- /* Excluded from this release type: renderComponent */
158
- /* Excluded from this release type: appHeartBeat */
159
- /* Excluded from this release type: showToast */
160
- /* Excluded from this release type: onEventCallback */
161
- /* Excluded from this release type: onSubmitPayCallback */
162
- /* Excluded from this release type: reset */
163
- /* Excluded from this release type: destroy */
164
- /* Excluded from this release type: onClose */
165
- /* Excluded from this release type: onRedirect */
146
+ export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>> extends BaseBridgeEventMap<AppConfig, SubmitResult, SubmitParams, string, OpenModalParams> {
166
147
  }
167
148
 
168
149
  /**
@@ -197,10 +178,10 @@ declare interface AntomErrorResponse {
197
178
  extendInfo?: Record<string, any>;
198
179
  }
199
180
 
200
- export declare type AntomLayouts = 'tabs' | 'accordion';
201
-
202
181
  /* Excluded from this release type: AntomMiddlePageEventMap */
203
182
 
183
+ /* Excluded from this release type: AntomModalEventMap */
184
+
204
185
  /* Excluded from this release type: AntomOpenModalConfig */
205
186
 
206
187
  /**
@@ -214,14 +195,11 @@ export declare class AntomSDK extends BaseElementsFactory {
214
195
  * @description 更新配置
215
196
  */
216
197
  updateConfig(config: Partial<BaseFactoryConfig>): void;
217
- /* Excluded from this release type: redirect */
218
198
  /* Excluded from this release type: openModal */
219
199
  elements(): Elements;
220
- createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
221
200
  createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
222
201
  createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
223
202
  createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
224
- getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
225
203
  getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
226
204
  getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
227
205
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
@@ -278,22 +256,6 @@ export declare const AntomSDKErrorCodes: {
278
256
  * @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
279
257
  */
280
258
  readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
281
- /**
282
- * @description checkout 页面未加载成功,不允许 updateConfig
283
- */
284
- readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
285
- /**
286
- * @description 支付进行中,不允许更新金额
287
- */
288
- readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
289
- /**
290
- * @description 金额不能为空
291
- */
292
- readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
293
- /**
294
- * @description 金额格式非法(仅允许整数和小数)
295
- */
296
- readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
297
259
  readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
298
260
  readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
299
261
  readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
@@ -310,11 +272,6 @@ export declare const AntomSDKErrorCodes: {
310
272
  readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
311
273
  readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
312
274
  readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
313
- readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
314
- readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
315
- /**
316
- * @description 是否需要更换 session 重试
317
- */
318
275
  readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
319
276
  readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
320
277
  readonly API_MISS_PARAMS: "API_MISS_PARAMS";
@@ -332,23 +289,29 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
332
289
 
333
290
  export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
334
291
 
335
- 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';
292
+ declare interface APICallbackOptions {
293
+ requestType: 'fetch' | 'xhr';
294
+ time: number;
295
+ url: string;
296
+ isSuccess?: boolean;
297
+ error?: unknown;
298
+ status?: number;
299
+ type?: string;
300
+ method?: string;
301
+ traceId?: string;
302
+ errorCode?: string | number;
303
+ errorMsg?: string;
304
+ }
336
305
 
337
- /**
338
- * @description SDK UI组件的外观配置。
339
- * 控制主题、CSS变量、布局规则及显示设置。
340
- * @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
341
- */
342
306
  declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
343
307
  theme?: Props['theme'];
344
308
  variables?: PartialSpeKey<Props['variables'], string>;
345
309
  rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
346
310
  displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
347
311
  layout?: Props['layout'];
348
- fonts?: FontSource[];
349
312
  }
350
313
 
351
- export declare type AppearanceSetting = {
314
+ declare type AppearanceSetting = {
352
315
  displaySetting: Record<'showCardBrandIcon', boolean>;
353
316
  theme: 'light' | 'dark';
354
317
  layout: 'accordion' | 'tabs';
@@ -749,16 +712,6 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
749
712
  /* Excluded from this release type: "OPENSDK@HANDSHAKE" */
750
713
  /* Excluded from this release type: "OPENSDK@READY_HANDSHAKE" */
751
714
  /* Excluded from this release type: "OPENSDK@UPDATE_CONFIG" */
752
- /**
753
- * 更新配置时的回复事件,包含可能发生的错误信息。
754
- * 如果 error 为 undefined,则表示没有错误发生。
755
- */
756
- "OPENSDK@UPDATE_CONFIG_REPLY": {
757
- /**
758
- * 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
759
- */
760
- error?: ErrorPayload<string>;
761
- } | undefined;
762
715
  /* Excluded from this release type: "OPENSDK@HANDSHAKE_ACK" */
763
716
  /* Excluded from this release type: "OPENSDK@SUBMIT" */
764
717
  /* Excluded from this release type: "OPENSDK@SUBMIT_REPLY" */
@@ -768,14 +721,12 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
768
721
  /* Excluded from this release type: "OPENSDK@REDIRECT" */
769
722
  /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_PORT" */
770
723
  /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_APPEARANCE" */
771
- /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_INITIALDATA" */
772
724
  /* Excluded from this release type: "OPENSDK@TRANSFER_APP_PORT" */
773
725
  /* Excluded from this release type: "OPENSDK@ERROR" */
774
726
  /* Excluded from this release type: "OPENSDK@TRANSFER_RECEIVE_PORT" */
775
727
  /* Excluded from this release type: "OPENSDK@TRANSFER_SEND_PORT" */
776
728
  /* Excluded from this release type: "OPENSDK@MESSAGE" */
777
729
  /* Excluded from this release type: "OPENSDK@HEIGHT_UPDATE" */
778
- /* Excluded from this release type: "OPENSDK@DESTROY_ELEMENT" */
779
730
  }
780
731
 
781
732
  declare interface BaseConfig {
@@ -796,7 +747,6 @@ declare interface BaseConfig {
796
747
  */
797
748
  locale?: string;
798
749
  /* Excluded from this release type: version */
799
- /* Excluded from this release type: colorScheme */
800
750
  }
801
751
 
802
752
  /**
@@ -811,26 +761,21 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
811
761
  /* Excluded from this release type: bridge */
812
762
  /* Excluded from this release type: hooks */
813
763
  /* Excluded from this release type: iframe */
814
- status: ElementStatus;
764
+ status: 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed' | 'unmounted';
815
765
  /* Excluded from this release type: cachedSend */
816
- /** Reuses the pending reply for concurrent submit calls. */
817
- private submitPromise?;
818
766
  constructor(name: string, config: WithAppURL<Config>);
819
767
  /* Excluded from this release type: submit */
820
768
  /* Excluded from this release type: setup */
821
- /** Races merchant setup against destruction to stop the mount flow immediately. */
822
- private _setup;
823
- /* Excluded from this release type: is */
824
769
  /**
825
- * @param {HTMLElement} container
770
+ * @param {string | HTMLElement} containerId 如果给字符串id不要带#号
826
771
  */
827
- mount(container: HTMLElement): Promise<void>;
772
+ mount(containerId: HTMLElement): Promise<void>;
828
773
  /* Excluded from this release type: _mount */
829
774
  /**
830
775
  * 更新webapp配置
831
776
  * @param {Partial<BaseElementAppConfig>} newConfig
832
777
  */
833
- updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
778
+ updateConfig(newConfig: Partial<Config['appConfig']>): void;
834
779
  /**
835
780
  * 卸载元素
836
781
  */
@@ -863,14 +808,13 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
863
808
  }
864
809
 
865
810
  declare interface BaseElementAppConfig {
866
- /* Excluded from this release type: locale */
811
+ locale?: string;
867
812
  /* Excluded from this release type: env */
868
813
  /* Excluded from this release type: merchantId */
869
814
  [key: string]: any;
870
815
  }
871
816
 
872
- declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
873
- /* Excluded from this release type: trackId */
817
+ declare interface BaseElementConfig<T extends BaseElementAppConfig = Record<string, any>> extends BaseConfig {
874
818
  appConfig: T;
875
819
  elementMode: ElementMode;
876
820
  }
@@ -921,7 +865,6 @@ declare abstract class BaseFactory {
921
865
  */
922
866
  constructor(config: BaseFactoryConfig);
923
867
  protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
924
- protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
925
868
  /* Excluded from this release type: canUseElements */
926
869
  /**
927
870
  * @description 无需手动调用
@@ -961,6 +904,26 @@ declare interface BaseFactoryConfig extends BaseConfig {
961
904
  /* Excluded from this release type: trackerCode */
962
905
  }
963
906
 
907
+ declare type BaseInfo = BrowserInfo & DeviceInfo & NetworkInfo & LocationInfo & EnvInfo & OSInfo & {
908
+ sdk?: string;
909
+ marmotId?: string;
910
+ compatibleAppId?: string;
911
+ deviceId?: string;
912
+ userId?: string;
913
+ programVer?: string;
914
+ language?: string;
915
+ timezone?: string;
916
+ bizType?: string;
917
+ productId?: string;
918
+ clientId?: string;
919
+ visibleState?: 'visible' | 'hidden' | 'app-visible' | 'page-visible' | 'app-hidden' | 'page-hidden';
920
+ };
921
+
922
+ declare interface BaseInfoPlugin {
923
+ getAppName?(): Promise<string | undefined>;
924
+ getDefaultExtraInfo?(): Promise<BaseInfo>;
925
+ }
926
+
964
927
  /**
965
928
  * @description 主元素,可以独立提交
966
929
  */
@@ -976,10 +939,6 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
976
939
  /* Excluded from this release type: _submit */
977
940
  }
978
941
 
979
- /**
980
- * @description 打开模态框的配置项。
981
- * 包含显示选项、关闭行为、外观设置及初始化数据。
982
- */
983
942
  declare interface BaseOpenModalConfig {
984
943
  /**
985
944
  * 无需手动传递,app的唯一scope
@@ -1003,23 +962,74 @@ declare interface BaseOpenModalConfig {
1003
962
  onClose?: () => void;
1004
963
  url: string;
1005
964
  /**
1006
- * @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
965
+ * 关闭时,是否需要app页面二次确认,默认为false,即直接关闭
1007
966
  */
1008
967
  closeConfirm?: boolean;
1009
- /**
1010
- * @description 需要同步的外观配置
1011
- */
1012
968
  appearance?: Appearance;
1013
- /**
1014
- * @description 需要传递的初始化数据
1015
- */
1016
- initialData?: Record<string, any>;
1017
- /**
1018
- * @description 无需手动传递, 模态框的唯一标识
1019
- */
1020
- modalId?: string;
1021
969
  }
1022
970
 
971
+ declare type BehaviorConfig = {
972
+ enableConsole?: boolean;
973
+ };
974
+
975
+ declare interface BehaviorData {
976
+ type: string;
977
+ data: {
978
+ msg?: string | null;
979
+ from?: string;
980
+ to?: string;
981
+ };
982
+ timestamp: number;
983
+ times?: number;
984
+ }
985
+
986
+ declare type BlankMonitorConfig = {
987
+ selector?: string | string[];
988
+ delay?: number | (() => number);
989
+ persistent?: boolean;
990
+ };
991
+
992
+ declare interface BrowserInfo {
993
+ title?: string;
994
+ fullUrl?: string;
995
+ url?: string;
996
+ referrer?: string;
997
+ domCnt?: number;
998
+ delay?: number;
999
+ scrollTop?: number;
1000
+ lastAction?: string;
1001
+ sessionId?: string;
1002
+ containerPageSessionId?: string;
1003
+ containerSessionId?: string;
1004
+ ua?: string;
1005
+ browser?: string;
1006
+ cCoreVer?: string;
1007
+ assetsVer?: string;
1008
+ }
1009
+
1010
+ declare type C = {
1011
+ c1?: string;
1012
+ c2?: string;
1013
+ c3?: string;
1014
+ c4?: string;
1015
+ c5?: string;
1016
+ c6?: string;
1017
+ c7?: string;
1018
+ c8?: string;
1019
+ c9?: string;
1020
+ c10?: string;
1021
+ c11?: string;
1022
+ c12?: string;
1023
+ c13?: string;
1024
+ c14?: string;
1025
+ c15?: string;
1026
+ c16?: string;
1027
+ c17?: string;
1028
+ c18?: string;
1029
+ c19?: string;
1030
+ c20?: string;
1031
+ };
1032
+
1023
1033
  /**
1024
1034
  * @description C2P标识
1025
1035
  */
@@ -1053,12 +1063,6 @@ declare interface C2PProps {
1053
1063
  merchantTransactionId?: string;
1054
1064
  }
1055
1065
 
1056
- /* Excluded from this release type: CallbackErrorInfo */
1057
-
1058
- /* Excluded from this release type: CallbackReturnData */
1059
-
1060
- /* Excluded from this release type: CallbackSessionNextAction */
1061
-
1062
1066
  declare interface CardIssuerAuthentication {
1063
1067
  /**
1064
1068
  * @description 卡售卖单元
@@ -1476,7 +1480,7 @@ declare interface CashierSdkActionQueryResult {
1476
1480
  /**
1477
1481
  * @description 物流信息, 包含物流地址和物流费
1478
1482
  */
1479
- shippingInfo?: ShippingInfo_2;
1483
+ shippingInfo?: ShippingInfo;
1480
1484
  /**
1481
1485
  * @description 用户已绑资产信息
1482
1486
  */
@@ -1509,6 +1513,28 @@ declare interface ChargeInfo {
1509
1513
  chargeActualAmountView?: PaymentView;
1510
1514
  }
1511
1515
 
1516
+ /** click 事件 resolve 参数 */
1517
+ export declare interface ClickResolveOptions {
1518
+ amount?: {
1519
+ currency: string;
1520
+ value: string;
1521
+ };
1522
+ shippingAddressRequired?: boolean;
1523
+ allowedShippingCountries?: string[];
1524
+ shippingRates?: Array<{
1525
+ id: string;
1526
+ displayName: string;
1527
+ amount: string;
1528
+ }>;
1529
+ lineItems?: Array<{
1530
+ name: string;
1531
+ amount: string;
1532
+ }>;
1533
+ business?: {
1534
+ name: string;
1535
+ };
1536
+ }
1537
+
1512
1538
  declare interface CodeFormView {
1513
1539
  /**
1514
1540
  * @description title
@@ -1534,11 +1560,6 @@ declare interface CodeFormView {
1534
1560
  * @description label
1535
1561
  */
1536
1562
  label?: string;
1537
- /**
1538
- * @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
1539
- * when appLinkUrlForWeb is populated
1540
- */
1541
- paymentGuideInfo?: PaymentGuideInfo;
1542
1563
  /**
1543
1564
  * @description 提醒事项
1544
1565
  */
@@ -1555,10 +1576,6 @@ declare interface CodeFormView {
1555
1576
  * @description 码过期时间
1556
1577
  */
1557
1578
  codeExpireTime?: string;
1558
- /**
1559
- * @description QR code configuration including renderStyle, centerIcon and cornerIcon
1560
- */
1561
- qrcodeConfig?: QrCodeConfig;
1562
1579
  }
1563
1580
 
1564
1581
  /**
@@ -2026,7 +2043,68 @@ declare interface ComIpayIexpprodServiceFacadeCommonPromotionInfo {
2026
2043
  extendInfo?: Record<string, string>;
2027
2044
  }
2028
2045
 
2029
- declare type CompatibleTrackerFullOptions = ConstructorParameters<typeof CompatibleTrackerFull>[0];
2046
+ declare class CompatibleTracker extends Tracker {
2047
+ private mdata;
2048
+ initi(options: OriginTrackerInitOptions & {
2049
+ performance?: boolean;
2050
+ error?: boolean;
2051
+ }): Promise<boolean>;
2052
+ set(options: Record<string, any>): void;
2053
+ protected getDefaultExtraInfo(): Promise<{
2054
+ title?: string | undefined;
2055
+ fullUrl?: string | undefined;
2056
+ url?: string | undefined;
2057
+ referrer?: string | undefined;
2058
+ domCnt?: number | undefined;
2059
+ delay?: number | undefined;
2060
+ scrollTop?: number | undefined;
2061
+ lastAction?: string | undefined;
2062
+ sessionId?: string | undefined;
2063
+ containerPageSessionId?: string | undefined;
2064
+ containerSessionId?: string | undefined;
2065
+ ua?: string | undefined;
2066
+ browser?: string | undefined;
2067
+ cCoreVer?: string | undefined;
2068
+ assetsVer?: string | undefined;
2069
+ device?: string | undefined;
2070
+ deviceType?: string | undefined;
2071
+ deviceBrand?: string | undefined;
2072
+ deviceModel?: string | undefined;
2073
+ screenWidth?: number | undefined;
2074
+ screenHeight?: number | undefined;
2075
+ contentHeight?: number | undefined;
2076
+ pixelRatio?: number | undefined;
2077
+ cClient?: string | undefined;
2078
+ networkType?: string | undefined;
2079
+ isp?: string | undefined;
2080
+ ip?: string | undefined;
2081
+ countryName?: string | undefined;
2082
+ cityName?: string | undefined;
2083
+ provinceName?: string | undefined;
2084
+ area?: string | undefined;
2085
+ env?: Env_2 | undefined;
2086
+ sprintId?: string | undefined;
2087
+ container?: string | undefined;
2088
+ cOfflineVer?: string | undefined;
2089
+ serverIp?: string | undefined;
2090
+ serverEnv?: string | undefined;
2091
+ canaryFlag?: string | undefined;
2092
+ os?: string | undefined;
2093
+ osVer?: string | undefined;
2094
+ sdk?: string | undefined;
2095
+ marmotId?: string | undefined;
2096
+ compatibleAppId?: string | undefined;
2097
+ deviceId?: string | undefined;
2098
+ userId?: string | undefined;
2099
+ programVer?: string | undefined;
2100
+ language?: string | undefined;
2101
+ timezone?: string | undefined;
2102
+ bizType?: string | undefined;
2103
+ productId?: string | undefined;
2104
+ clientId?: string | undefined;
2105
+ visibleState?: "hidden" | "visible" | "app-visible" | "page-visible" | "app-hidden" | "page-hidden" | undefined;
2106
+ }>;
2107
+ }
2030
2108
 
2031
2109
  /**
2032
2110
  * @description googlePay createPaymentSession 入参
@@ -2051,17 +2129,13 @@ export declare interface ConfirmCardSetupOptions {
2051
2129
  redirect?: 'always' | 'if_required';
2052
2130
  }
2053
2131
 
2054
- export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'>, PaymentSubmitParams {
2132
+ export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'> {
2055
2133
  sessionData: string;
2056
2134
  /**
2057
- * @description 传入已挂载的 CVVElement / PaymentElement / Elements 实例,不传则使用无 UI 自动提交模式
2135
+ * @description 传入已挂载的 CVVElement 或 Elements 实例,不传则使用无 UI 自动提交模式
2058
2136
  */
2059
2137
  elements?: BaseMainElement | BaseElements;
2060
2138
  appearance?: CVVAppearance;
2061
- /**
2062
- * @description 集成用户自定义信息(如 cardHolderName)
2063
- */
2064
- params?: Record<string, unknown>;
2065
2139
  }
2066
2140
 
2067
2141
  /**
@@ -2133,13 +2207,6 @@ declare namespace CSS_2 {
2133
2207
  }
2134
2208
  }
2135
2209
 
2136
- /**
2137
- * CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
2138
- */
2139
- declare interface CssFontSource {
2140
- cssSrc: string;
2141
- }
2142
-
2143
2210
  declare interface CurrencyInfo {
2144
2211
  /**
2145
2212
  * @description Getter method for property <tt>currencyCode</tt>.
@@ -2185,21 +2252,15 @@ declare interface CustomerFxInfo {
2185
2252
  }
2186
2253
 
2187
2254
  /**
2188
- * 自定义字体源 — 通过 @font-face 加载自托管字体
2255
+ * CustomizedPerformanceKey 是给业务使用的自定义指标,共 20 个,页面之间互相独立
2189
2256
  */
2190
- declare interface CustomFontSource {
2191
- family: string;
2192
- src: string;
2193
- weight?: string;
2194
- style?: string;
2195
- unicodeRange?: string;
2196
- }
2257
+ declare type CustomizedPerformanceKey = 'm1' | 'm2' | 'm3' | 'm4' | 'm5' | 'm6' | 'm7' | 'm8' | 'm9' | 'm10' | 'm11' | 'm12' | 'm13' | 'm14' | 'm15' | 'm16' | 'm17' | 'm18' | 'm19' | 'm20';
2197
2258
 
2198
2259
  /**
2199
2260
  * @public
2200
2261
  * @description CVV element app config type
2201
2262
  */
2202
- export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
2263
+ export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance> {
2203
2264
  /**
2204
2265
  * @description sessionData
2205
2266
  */
@@ -2219,8 +2280,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
2219
2280
 
2220
2281
  export declare type CVVAppearanceProps = {
2221
2282
  theme: AntomTheme;
2222
- variables: AntomVariables;
2223
- fonts?: FontSource[];
2283
+ variables: 'content-primary' | 'content-tertiary' | 'background-primary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-disable' | 'action-normal' | 'action-hover' | 'radius-component' | 'content-secondary' | 'background-secondary';
2224
2284
  };
2225
2285
 
2226
2286
  /**
@@ -2306,10 +2366,6 @@ export declare interface CVVSubmitParams {
2306
2366
  * 重定向策略
2307
2367
  */
2308
2368
  redirect?: 'always' | 'if_required';
2309
- /**
2310
- * 集成用户自定义信息(如 cardHolderName)
2311
- */
2312
- params?: Record<string, unknown>;
2313
2369
  }
2314
2370
 
2315
2371
  declare interface DanaSofCouponInfo {
@@ -2887,6 +2943,18 @@ declare interface DeliveryEstimateInfo {
2887
2943
  value?: number;
2888
2944
  }
2889
2945
 
2946
+ declare interface DeviceInfo {
2947
+ device?: string;
2948
+ deviceType?: string;
2949
+ deviceBrand?: string;
2950
+ deviceModel?: string;
2951
+ screenWidth?: number;
2952
+ screenHeight?: number;
2953
+ contentHeight?: number;
2954
+ pixelRatio?: number;
2955
+ cClient?: string;
2956
+ }
2957
+
2890
2958
  /**
2891
2959
  * @description 立减型营销信息
2892
2960
  */
@@ -2932,6 +3000,29 @@ declare interface DisplayItem {
2932
3000
  status?: string;
2933
3001
  }
2934
3002
 
3003
+ declare type DMC = {
3004
+ d1?: number | string;
3005
+ d2?: number | string;
3006
+ d3?: number | string;
3007
+ d4?: number | string;
3008
+ d5?: number | string;
3009
+ d6?: number | string;
3010
+ d7?: number | string;
3011
+ d8?: number | string;
3012
+ d9?: number | string;
3013
+ d10?: number | string;
3014
+ d11?: number | string;
3015
+ d12?: number | string;
3016
+ d13?: number | string;
3017
+ d14?: number | string;
3018
+ d15?: number | string;
3019
+ d16?: number | string;
3020
+ d17?: number | string;
3021
+ d18?: number | string;
3022
+ d19?: number | string;
3023
+ d20?: number | string;
3024
+ } & C & M;
3025
+
2935
3026
  /**
2936
3027
  * @description 元素列表项类型
2937
3028
  */
@@ -2993,9 +3084,21 @@ declare class Elements extends BaseElements {
2993
3084
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
2994
3085
  }
2995
3086
 
2996
- declare type ElementStatus = 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed' | 'unmounted';
3087
+ 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';
3088
+
3089
+ declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
2997
3090
 
2998
- 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';
3091
+ declare type Env_2 = 'DEV' | 'SIT' | 'PRE' | 'PROD' | 'LOCAL';
3092
+
3093
+ declare interface EnvInfo {
3094
+ env?: Env_2;
3095
+ sprintId?: string;
3096
+ container?: string;
3097
+ cOfflineVer?: string;
3098
+ serverIp?: string;
3099
+ serverEnv?: string;
3100
+ canaryFlag?: string;
3101
+ }
2999
3102
 
3000
3103
  /**
3001
3104
  * @description 错误上下文对象。参考主站<code>ErrorContext</code>实现。
@@ -3026,11 +3129,9 @@ declare type ErrorSource = ErrorSource_2;
3026
3129
 
3027
3130
  declare type ErrorSource_2 = 'SDK_INTERNAL' | 'SDK_USAGE' | 'APP_RUNTIME' | 'SERVER_API' | 'SYSTEM';
3028
3131
 
3029
- /**
3030
- * @description 工具类型,从类型中排除 undefined。
3031
- * 如果 T 继承 undefined 则返回 never,否则返回 T。
3032
- */
3033
- declare type ExcludeUndefined<T> = T extends undefined ? never : T;
3132
+ declare type ErrorType = 'js-error-addeventlistener' | 'source-error' | 'promise-error' | 'video-error' | 'video-source-error';
3133
+
3134
+ declare type EventFunction = (opt: Record<string, any>) => boolean;
3034
3135
 
3035
3136
  /**
3036
3137
  * @description 卡分期计划
@@ -3074,22 +3175,6 @@ declare interface ExpCardPlan {
3074
3175
  * @description 每个月分期利息
3075
3176
  */
3076
3177
  monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
3077
- /**
3078
- * @description 分期有效期开始时间
3079
- */
3080
- validStartTime?: string;
3081
- /**
3082
- * @description 分期有效期结束时间
3083
- */
3084
- validEndTime?: string;
3085
- /**
3086
- * @description 支持的银行信息
3087
- *
3088
- * 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
3089
- * 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
3090
- * 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
3091
- */
3092
- supportedBank?: ExpSupportIppBank;
3093
3178
  }
3094
3179
 
3095
3180
  declare interface ExpInstallmentInfo {
@@ -3114,18 +3199,12 @@ declare interface ExpPaymentOptionDetail {
3114
3199
  * @public
3115
3200
  * @description Express element app config type
3116
3201
  */
3117
- export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
3202
+ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting> {
3118
3203
  /** payment SessionData */
3119
3204
  sessionData?: string;
3120
3205
  /** Business division (country/region) */
3121
3206
  businessDivision?: string;
3122
- /**
3123
- * Amount & Currency
3124
- *
3125
- * Only effective via `updateConfig({ amount })` at runtime.
3126
- * Passing amount at creation time is ignored; the initial amount
3127
- * comes from the server-side sdkQuery result (renderData.paymentAmount).
3128
- */
3207
+ /** Amount & Currency */
3129
3208
  amount?: {
3130
3209
  currency: string;
3131
3210
  value: string;
@@ -3134,20 +3213,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3134
3213
  paypal?: PayPalConfig;
3135
3214
  /**
3136
3215
  * Button text type (following Stripe Express Checkout Element design)
3137
- * Each payment method can independently set the button display text.
3216
+ * Each payment method can independently set the button display text
3217
+ * Reserved index signature for future payment method integration
3138
3218
  */
3139
3219
  buttonType?: {
3140
3220
  /** PayPal: paypal | checkout | buynow | pay */
3141
3221
  paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
3142
3222
  [method: string]: string | undefined;
3143
3223
  };
3144
- /**
3145
- * Unified height for all buttons (px)
3146
- */
3224
+ /** Unified height for all buttons (px) */
3147
3225
  buttonHeight?: number;
3148
3226
  /**
3149
3227
  * Button color theme (following Stripe Express Checkout Element design)
3150
- * Each payment method can independently set the theme color.
3228
+ * Each payment method can independently set the theme color
3229
+ * Reserved index signature for future payment method integration
3151
3230
  */
3152
3231
  buttonTheme?: {
3153
3232
  /** PayPal: gold | blue | silver | white | black */
@@ -3165,13 +3244,6 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3165
3244
  * Locale for internationalization, passed from entry params (loadAntom), default to en_US
3166
3245
  */
3167
3246
  locale?: string;
3168
- /**
3169
- * 是否运行在 Native App 的 WebView 中。
3170
- * 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
3171
- */
3172
- isNativeAppWebview?: boolean;
3173
- /* Excluded from this release type: merchantDomain */
3174
- /* Excluded from this release type: doMain */
3175
3247
  }
3176
3248
 
3177
3249
  /** cancel 事件负载 */
@@ -3180,54 +3252,24 @@ export declare interface ExpressCancelEvent {
3180
3252
  data?: any;
3181
3253
  }
3182
3254
 
3183
- /** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
3255
+ /** click 事件负载 */
3184
3256
  export declare interface ExpressClickEvent {
3185
3257
  expressPaymentType: string;
3258
+ resolve: (options: ClickResolveOptions) => void;
3186
3259
  }
3187
3260
 
3188
3261
  /** confirm 事件负载(统一终态,替代 approve) */
3189
3262
  export declare interface ExpressConfirmData {
3190
3263
  expressPaymentType: string;
3191
- billingDetails?: {
3192
- name?: string;
3193
- email?: string;
3194
- phone?: string;
3195
- address?: {
3196
- line1?: string;
3197
- line2?: string;
3198
- city?: string;
3199
- state?: string;
3200
- postalCode?: string;
3201
- country?: string;
3202
- };
3203
- };
3204
- shippingAddress?: {
3205
- name?: string;
3206
- phone?: string;
3207
- address?: {
3208
- line1?: string;
3209
- line2?: string;
3210
- city?: string;
3211
- state?: string;
3212
- postalCode?: string;
3213
- country?: string;
3214
- };
3215
- };
3216
- /** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
3217
- paymentData?: unknown;
3218
- /**
3219
- * 商户主动拒绝本次支付(如库存不足、价格变动等)。
3220
- * 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
3221
- */
3222
- paymentFailed: () => void;
3264
+ paymentData: any;
3265
+ billingDetails?: any;
3266
+ shippingAddress?: any;
3267
+ sessionData?: string;
3223
3268
  }
3224
3269
 
3225
3270
  /**
3226
3271
  * @public
3227
3272
  * @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
3228
- *
3229
- * Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
3230
- * AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
3231
3273
  */
3232
3274
  export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
3233
3275
  static elementType: string;
@@ -3235,49 +3277,15 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3235
3277
  * Store all function-type callbacks locally, not involved in postMessage serialization
3236
3278
  */
3237
3279
  private _callbacks;
3238
- /** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
3239
- private _renderData;
3240
- private _hostSign;
3241
- /**
3242
- * 构造时传入的初始金额。cleanAppConfig 已剔除 amount,setup 阶段透传给 iframe(PayPal 按钮首屏需要)
3243
- * 与 PayPal channelClientId 查询仍需读它;运行时改额只能走 updateConfig。
3244
- */
3245
- private _initialAmount;
3246
- /**
3247
- * 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
3248
- * bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
3249
- */
3250
- private _localHandlers;
3251
- /** 支付流程进行中标志(click → confirm/error/cancel 之间) */
3252
- private _paymentInProgress;
3253
- private _paypalOverlay;
3254
3280
  constructor(name: string, config: ExpressElementConfig);
3281
+ setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3255
3282
  /**
3256
- * 重写 on:
3257
- * 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
3258
- * 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
3259
- */
3260
- on(event: string, handler: (...args: any[]) => void): void;
3261
- /**
3262
- * SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
3263
- * 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
3264
- */
3265
- private _emit;
3266
- updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3267
- /**
3268
- * 商户在 confirm 回调内调用,触发实际支付提交。
3269
- * iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
3270
- * 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
3283
+ * Register internal event listeners (iframe communication)
3271
3284
  */
3272
- completePayment(redirect?: 'always' | 'if_required'): Promise<{
3273
- success: boolean;
3274
- result?: any;
3275
- error?: {
3276
- code: string;
3277
- message: string;
3278
- };
3279
- }>;
3280
- setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3285
+ /** Overlay DOM node, created on click, removed after payment ends */
3286
+ private _overlay;
3287
+ private _showOverlay;
3288
+ private _hideOverlay;
3281
3289
  private registerInternalListeners;
3282
3290
  protected focus(): void;
3283
3291
  protected blur(): void;
@@ -3295,83 +3303,57 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
3295
3303
  * @public
3296
3304
  * @description Express element events type
3297
3305
  */
3298
- export declare interface ExpressElementEvents extends AntomBridgeWithNativeEventMap<ExpressAppConfig> {
3306
+ export declare interface ExpressElementEvents extends AntomBridgeEventMap<ExpressAppConfig> {
3307
+ /**
3308
+ * @description Element ready event — 上报可用支付方式
3309
+ */
3299
3310
  ready: {
3300
3311
  availablePaymentMethods: Record<string, boolean>;
3301
3312
  };
3313
+ /**
3314
+ * @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
3315
+ * 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
3316
+ */
3302
3317
  click: ExpressClickEvent;
3318
+ /**
3319
+ * @description 统一支付完成事件(替代 approve)
3320
+ * 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
3321
+ */
3303
3322
  confirm: ExpressConfirmData;
3323
+ /**
3324
+ * @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
3325
+ */
3304
3326
  error: ErrorPayload & {
3305
3327
  expressPaymentType: string;
3306
3328
  };
3329
+ /**
3330
+ * @description 用户取消支付
3331
+ */
3307
3332
  cancel: ExpressCancelEvent;
3333
+ /**
3334
+ * @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
3335
+ */
3308
3336
  shippingaddresschange: {
3309
3337
  expressPaymentType: string;
3310
3338
  address: any;
3311
3339
  resolve: (options: ShippingResolveOptions) => void;
3312
3340
  reject: (reason: string) => void;
3313
3341
  };
3342
+ /**
3343
+ * @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
3344
+ */
3314
3345
  shippingratechange: {
3315
3346
  expressPaymentType: string;
3316
3347
  shippingRate: any;
3317
3348
  resolve: (options: RateResolveOptions) => void;
3318
3349
  };
3319
- contentHeightChanged: {
3320
- height: number;
3321
- };
3322
- 'OPENSDK@CLICK': {
3323
- expressPaymentType: string;
3324
- };
3325
- 'OPENSDK@CLICK_RESOLVE': Record<string, never>;
3326
- 'OPENSDK@PAYPAL_CREATE_ORDER': {
3327
- requestId: string;
3328
- };
3329
- 'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
3330
- requestId: string;
3331
- sessionData?: string;
3332
- error?: string;
3333
- };
3334
- 'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
3335
- requestId: string;
3336
- shippingData: any;
3337
- };
3338
- 'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
3339
- requestId: string;
3340
- error?: string;
3341
- };
3342
- 'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
3343
- requestId: string;
3344
- shippingData: any;
3345
- };
3346
- 'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
3347
- requestId: string;
3348
- error?: string;
3349
- };
3350
- 'OPENSDK@GET_APPLE_PAY_TOKEN': {
3351
- requestId: string;
3352
- expressPaymentType: string;
3353
- };
3354
- /** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
3355
- 'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
3356
- requestId: string;
3357
- success: boolean;
3358
- result?: any;
3359
- errorCode?: string;
3360
- errorMessage?: string;
3361
- billingDetails?: any;
3362
- shippingAddress?: any;
3363
- };
3364
- 'OPENSDK@UPDATE_CONFIG_REPLY': {
3365
- error?: ErrorPayload<string>;
3366
- };
3367
- 'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
3368
- onRedirect: {
3369
- normalUrl: string;
3370
- applinkUrl?: string;
3371
- schemaUrl?: string;
3372
- isDestroy: boolean;
3373
- needReset: boolean;
3374
- };
3350
+ /* Excluded from this release type: contentHeightChanged */
3351
+ /* Excluded from this release type: "paypal:createOrder" */
3352
+ /* Excluded from this release type: "paypal:createOrder:reply" */
3353
+ /* Excluded from this release type: "paypal:onShippingAddressChange" */
3354
+ /* Excluded from this release type: "paypal:onShippingAddressChange:reply" */
3355
+ /* Excluded from this release type: "paypal:onShippingOptionsChange" */
3356
+ /* Excluded from this release type: "paypal:onShippingOptionsChange:reply" */
3375
3357
  }
3376
3358
 
3377
3359
  declare interface ExpSupportBank {
@@ -3396,24 +3378,6 @@ declare interface ExpSupportCardBrand {
3396
3378
  logo?: Logo;
3397
3379
  }
3398
3380
 
3399
- /**
3400
- * @description 支持的分期银行信息
3401
- */
3402
- declare interface ExpSupportIppBank {
3403
- /**
3404
- * @description bank short name or bank code
3405
- */
3406
- bankShortName?: string;
3407
- /**
3408
- * @description logo
3409
- */
3410
- logo?: Logo;
3411
- /**
3412
- * @description bins
3413
- */
3414
- bins?: string[];
3415
- }
3416
-
3417
3381
  declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
3418
3382
 
3419
3383
  declare interface FirstPhaseSubscriptionDetail {
@@ -3431,27 +3395,6 @@ declare interface FirstPhaseSubscriptionDetail {
3431
3395
  promotionDetails?: PromotionDetail[];
3432
3396
  }
3433
3397
 
3434
- declare type FontSource = CssFontSource | CustomFontSource;
3435
-
3436
- declare interface FrontModulesToBeLoadedInterface {
3437
- acquirerName: string;
3438
- scriptUrl: string;
3439
- }
3440
-
3441
- /**
3442
- * @description 分期银行展示模型
3443
- */
3444
- declare interface FrontSupportIppBank {
3445
- /**
3446
- * @description bank short name or bank code
3447
- */
3448
- bankShortName?: string;
3449
- /**
3450
- * @description logo
3451
- */
3452
- logo?: Logo;
3453
- }
3454
-
3455
3398
  declare type GetI18nQueryParam = string | {
3456
3399
  /**
3457
3400
  * 多语言文案的 key
@@ -3469,6 +3412,40 @@ declare type GetI18nQueryParam = string | {
3469
3412
  defaultMessage?: string;
3470
3413
  };
3471
3414
 
3415
+ declare function getMiniPerformance(): Promise<{
3416
+ performance: {
3417
+ appLaunch: number;
3418
+ jumpAppStartUnix: number;
3419
+ preparePhase: number;
3420
+ appPhase: number;
3421
+ pagePhase: number;
3422
+ appxPhase: number;
3423
+ launchId: string;
3424
+ launchType: 0 | 1;
3425
+ };
3426
+ onLoadTime: number;
3427
+ loadId: string;
3428
+ srcCount: number;
3429
+ webviewComponentSrc?: string | undefined;
3430
+ } | undefined>;
3431
+
3432
+ declare type GetRequesterResult = (data: string, rawData: (ReportData & BaseInfo) | IOptions | IEventOPtions) => Promise<void>;
3433
+
3434
+ declare interface GetWebVitalsInfoResult {
3435
+ fcp: Promise<number | null | undefined>;
3436
+ ttfb: Promise<number | null | undefined>;
3437
+ lcp: Promise<number | null | undefined>;
3438
+ inp: Promise<number | null | undefined>;
3439
+ cls: Promise<number | null | undefined>;
3440
+ }
3441
+
3442
+ declare interface GetWhiteScreenInfoOptions {
3443
+ selector?: string | string[];
3444
+ delay?: number | (() => number);
3445
+ persistent?: boolean;
3446
+ ignoreNotInViewport?: boolean;
3447
+ }
3448
+
3472
3449
  declare type GlobalOptions = {
3473
3450
  i18n?: SimpleI18n;
3474
3451
  i18nPrefix: string;
@@ -4036,12 +4013,17 @@ declare type HtmlAttributes =
4036
4013
  | "[writingsuggestions]"
4037
4014
  | "[xmlns]";
4038
4015
 
4039
- declare interface IApplePayContactField {
4040
- email: string;
4041
- name: string;
4042
- phone: string;
4043
- postalAddress: string;
4044
- phoneticName: string;
4016
+ declare interface HTTPErrorCallbackOptions {
4017
+ requestType: 'fetch' | 'xhr';
4018
+ error?: unknown;
4019
+ status?: number;
4020
+ url: string;
4021
+ type?: string;
4022
+ redirected?: 0 | 1;
4023
+ responseUrl?: string;
4024
+ time: number;
4025
+ method?: string;
4026
+ aborted?: 0 | 1;
4045
4027
  }
4046
4028
 
4047
4029
  declare interface iBaseElementClass {
@@ -4049,6 +4031,16 @@ declare interface iBaseElementClass {
4049
4031
  elementType: string;
4050
4032
  }
4051
4033
 
4034
+ declare interface IEventOPtions {
4035
+ eventId: string;
4036
+ param4: Record<string, any>;
4037
+ immediat?: boolean;
4038
+ }
4039
+
4040
+ declare type IMDAP_SERVER = (typeof imdapServers)[number];
4041
+
4042
+ 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"];
4043
+
4052
4044
  declare interface InstallmentPlan {
4053
4045
  /**
4054
4046
  * @description 分期支持的银行
@@ -4167,117 +4159,102 @@ declare interface InterestFree {
4167
4159
  bankShortName?: string;
4168
4160
  }
4169
4161
 
4170
- declare interface IntlOpenSDKTrackerInitOptions extends Omit<ExcludeUndefined<CompatibleTrackerFullOptions>, 'appId'> {
4171
- trackId?: string;
4172
- /**
4173
- * @description appId,默认值为180020050100012557
4174
- */
4162
+ declare class IntlOpenSDKTracker extends CompatibleTracker {
4163
+ constructor(initOption?: IntlOpenSDKTrackerInitOptions_2);
4164
+ initi(options: IntlOpenSDKTrackerInitOptions_2): Promise<boolean>;
4165
+ set(data: Partial<IntlOpenSDKTrackerInitOptions_2>): void;
4166
+ }
4167
+
4168
+ declare interface IntlOpenSDKTrackerInitOptions extends Omit<IntlOpenSDKTrackerInitOptions_2, 'appId'> {
4175
4169
  appId?: string;
4176
- /**
4177
- * origin → 完全按入参 key 输出
4178
- * snake → 强制 snake_case
4179
- * camel → 强制 camelCase
4180
- * both → snake + origin 双写
4181
- */
4182
- keyFormat?: 'origin' | 'snake' | 'camel' | 'both';
4183
- /**
4184
- * 是否上报idengine_user_path
4185
- */
4186
- userPathAuto?: boolean;
4187
4170
  }
4188
4171
 
4189
- declare interface IPaymentSessionMetaData {
4190
- clientId?: string;
4191
- renderDisplayType?: string;
4192
- paymentSessionConfig?: PaymentSessionConfig;
4193
- securityConfig?: SessionSecurityConfig;
4194
- moneyView?: any;
4195
- extendInfo?: string;
4196
- paymentMethodInfoView?: any;
4197
- paymentView?: any;
4198
- modernWeb?: boolean;
4199
- action?: PaymentSessionAction;
4172
+ declare interface IntlOpenSDKTrackerInitOptions_2 extends Omit<OriginTrackerInitOptions, 'bizType' | 'productId'> {
4173
+ whiteScreen?: BlankMonitorConfig | boolean;
4174
+ bizType?: string;
4175
+ productId?: string;
4200
4176
  /**
4201
- * @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
4177
+ * @description 追踪id
4202
4178
  */
4203
- flowSwitchTags?: string;
4204
- authUrlInfo?: {
4205
- appIdentifier?: string;
4206
- applinkUrl?: string;
4207
- normalUrl?: string;
4208
- schemeUrl?: string;
4209
- authUrl?: string;
4210
- };
4211
- paymentSessionFactor?: {
4212
- externalRiskTimeout?: number;
4213
- extendInfo?: {
4214
- merchantCapabilities?: string[];
4215
- supportedNetworks?: string[];
4216
- requiredBillingContactFields: IApplePayContactField[];
4217
- requiredShippingContactFields: IApplePayContactField[];
4218
- };
4219
- merchantInfo?: {
4220
- registeredCountry?: string;
4221
- partnerId?: string;
4222
- merchantName?: string;
4223
- };
4224
- order?: {
4225
- orderDescription: string;
4226
- };
4227
- paymentAmount?: {
4228
- value?: string;
4229
- currency?: string;
4230
- };
4231
- paymentMethodInfo?: {
4232
- paymentMethodType?: string;
4233
- };
4234
- paymentMethodViewMetaData?: any;
4235
- paymentRequestId?: string;
4236
- supportedLanguages?: any;
4237
- /**
4238
- * 当前为苹果分期场景的信息
4239
- */
4240
- recurringInfo?: {
4241
- /**
4242
- * 代扣协议开始日期 不传为当前系统时间
4243
- */
4244
- startDate?: number;
4245
- /**
4246
- * 代扣协议结束日期 不传不限制结束时间
4247
- */
4248
- endDate?: number;
4249
- /**
4250
- * 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
4251
- */
4252
- intervalUnit?: string;
4253
- /**
4254
- * 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
4255
- */
4256
- intervalCount?: number;
4257
- /**
4258
- * 分期标题信息
4259
- */
4260
- title?: string;
4261
- /**
4262
- * 分期管理页面
4263
- */
4264
- managementURL?: string;
4265
- /**
4266
- * 苹果通知ipay MAPN信息变更的地址
4267
- */
4268
- tokenNotificationURL?: string;
4269
- /**
4270
- * 分期协议描述
4271
- */
4272
- agreementDescription?: string;
4273
- };
4274
- frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
4275
- };
4276
- connectFactor?: {
4277
- enableConnect?: boolean;
4278
- };
4279
- skipRenderPaymentMethod?: boolean;
4280
- needAccountConfirmPage?: boolean;
4179
+ trackId?: string;
4180
+ mdata?: Record<string, any>;
4181
+ performance?: boolean;
4182
+ error?: boolean;
4183
+ }
4184
+
4185
+ declare interface IOptions {
4186
+ actionId: string;
4187
+ spmId: string;
4188
+ param1?: string;
4189
+ param2?: string;
4190
+ param3?: string;
4191
+ param4?: Record<string, any>;
4192
+ param5?: Record<string, any>;
4193
+ stayTime?: number;
4194
+ }
4195
+
4196
+ declare interface ISystemInfo {
4197
+ readonly pixelRatio: number;
4198
+ readonly windowWidth: number;
4199
+ readonly windowHeight: number;
4200
+ readonly model: string;
4201
+ readonly language: string;
4202
+ readonly version: string;
4203
+ readonly platform: string;
4204
+ readonly system: string;
4205
+ readonly screenWidth: number;
4206
+ readonly screenHeight: number;
4207
+ readonly brand: string;
4208
+ readonly app: string;
4209
+ readonly [propName: string]: any;
4210
+ }
4211
+
4212
+ declare interface ITracert extends IUserTracertProperties {
4213
+ get: (arg0: string) => any;
4214
+ set: (arg0: IUserTracertProperties) => void;
4215
+ loadPlugins: (_plugins: PluginFunction[]) => void;
4216
+ readonly logLevel?: string;
4217
+ readonly logVersion?: string;
4218
+ readonly debug?: boolean;
4219
+ readonly contact?: boolean;
4220
+ readonly pluginReady?: boolean;
4221
+ readonly _plugins?: readonly PluginFunction[];
4222
+ readonly _beforeEvObj?: Record<string, EventFunction[]>;
4223
+ readonly _afterEvObj?: Record<string, EventFunction[]>;
4224
+ readonly _pluginLoadCnt?: number;
4225
+ readonly apiCashList?: any[];
4226
+ }
4227
+
4228
+ declare interface IUserTracertProperties {
4229
+ readonly ready?: boolean;
4230
+ readonly bizType?: string;
4231
+ readonly deviceId?: string;
4232
+ readonly userId?: string;
4233
+ readonly spmAPos?: string;
4234
+ readonly spmBPos?: string;
4235
+ readonly pageId?: string;
4236
+ readonly server?: string;
4237
+ readonly servers?: string[];
4238
+ readonly chInfo?: string;
4239
+ readonly scm?: string;
4240
+ readonly env?: Env;
4241
+ readonly switch?: boolean;
4242
+ readonly sendFrequency?: number;
4243
+ readonly batchCount?: number;
4244
+ readonly referSPM?: string;
4245
+ readonly sessionId?: string;
4246
+ readonly appId?: string;
4247
+ readonly productId?: string;
4248
+ readonly mdata?: Record<string, number | string>;
4249
+ readonly systemInfo?: ISystemInfo;
4250
+ readonly networkType?: string;
4251
+ readonly path?: string;
4252
+ readonly packageVersion?: string;
4253
+ readonly autoExpo?: boolean;
4254
+ }
4255
+
4256
+ declare interface LagPlugin {
4257
+ onFpsLag?: (callback: (durationList: number[]) => void, maxDuration?: number, maxTimeoutCount?: number) => void;
4281
4258
  }
4282
4259
 
4283
4260
  /**
@@ -4332,6 +4309,86 @@ export declare interface LoadAntomConfig extends Omit<BaseFactoryConfig, 'tracke
4332
4309
  env?: 'sandbox' | 'prod';
4333
4310
  }
4334
4311
 
4312
+ declare interface LocationInfo {
4313
+ countryName?: string;
4314
+ cityName?: string;
4315
+ provinceName?: string;
4316
+ area?: string;
4317
+ }
4318
+
4319
+ declare interface LogInfo {
4320
+ title: string;
4321
+ msg?: string | Error | Record<string, number | string>;
4322
+ }
4323
+
4324
+ declare type LogItem = {
4325
+ code: string;
4326
+ msg: string;
4327
+ marmotId?: string;
4328
+ s1?: string | number;
4329
+ s2?: string | number;
4330
+ s3?: string | number;
4331
+ s4?: string | number;
4332
+ s5?: string | number;
4333
+ s6?: string | number;
4334
+ s7?: string | number;
4335
+ s8?: string | number;
4336
+ s9?: string | number;
4337
+ s10?: string | number;
4338
+ s11?: string | number;
4339
+ s12?: string | number;
4340
+ s13?: string | number;
4341
+ s14?: string | number;
4342
+ s15?: string | number;
4343
+ s16?: string | number;
4344
+ s17?: string | number;
4345
+ s18?: string | number;
4346
+ s19?: string | number;
4347
+ s20?: string | number;
4348
+ env?: Env_2;
4349
+ sdk?: string;
4350
+ container?: string;
4351
+ title?: string;
4352
+ fullUrl?: string;
4353
+ sprintId?: string;
4354
+ ip?: string;
4355
+ countryName?: string;
4356
+ cityName?: string;
4357
+ provinceName?: string;
4358
+ cOfflineVer?: string;
4359
+ url?: string;
4360
+ referrer?: string;
4361
+ domCnt?: number;
4362
+ delay?: number;
4363
+ scrollTop?: number;
4364
+ lastAction?: string;
4365
+ sessionId?: string;
4366
+ isp?: string;
4367
+ area?: string;
4368
+ ua?: string;
4369
+ browser?: string;
4370
+ os?: string;
4371
+ device?: string;
4372
+ deviceType?: string;
4373
+ deviceBrand?: string;
4374
+ deviceModel?: string;
4375
+ screenWidth?: number;
4376
+ screenHeight?: number;
4377
+ contentHeight?: number;
4378
+ pixelRatio?: number;
4379
+ cClient?: string;
4380
+ cClientId?: string;
4381
+ cCoreVer?: string;
4382
+ assetsVer?: string;
4383
+ traceId?: string;
4384
+ serverIp?: string;
4385
+ serverEnv?: string;
4386
+ clientId?: string;
4387
+ spm?: string;
4388
+ spma?: string;
4389
+ spmb?: string;
4390
+ } & DMC;
4391
+
4335
4392
  /**
4336
4393
  * @description Logo信息
4337
4394
  */
@@ -4362,6 +4419,29 @@ declare interface Logo {
4362
4419
  logoHeight?: string;
4363
4420
  }
4364
4421
 
4422
+ declare type M = {
4423
+ m1?: number;
4424
+ m2?: number;
4425
+ m3?: number;
4426
+ m4?: number;
4427
+ m5?: number;
4428
+ m6?: number;
4429
+ m7?: number;
4430
+ m8?: number;
4431
+ m9?: number;
4432
+ m10?: number;
4433
+ m11?: number;
4434
+ m12?: number;
4435
+ m13?: number;
4436
+ m14?: number;
4437
+ m15?: number;
4438
+ m16?: number;
4439
+ m17?: number;
4440
+ m18?: number;
4441
+ m19?: number;
4442
+ m20?: number;
4443
+ };
4444
+
4365
4445
  /**
4366
4446
  * @description 端上的行为设定 @Author yanhong
4367
4447
  */
@@ -4505,6 +4585,12 @@ declare interface MultiCurrencyMoney {
4505
4585
  currencyValue?: string;
4506
4586
  }
4507
4587
 
4588
+ declare interface NetworkInfo {
4589
+ networkType?: string;
4590
+ isp?: string;
4591
+ ip?: string;
4592
+ }
4593
+
4508
4594
  declare interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> {
4509
4595
  /**
4510
4596
  * 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.
@@ -6572,100 +6658,38 @@ declare interface ObsoletePropertiesHyphen<TLength = (string & {}) | 0, TTime =
6572
6658
  *
6573
6659
  * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit`
6574
6660
  *
6575
- * **Initial value**: `inline-axis`
6576
- *
6577
- * @deprecated
6578
- */
6579
- "-webkit-box-orient"?: Property.BoxOrient | undefined;
6580
- /**
6581
- * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.
6582
- *
6583
- * **Syntax**: `start | center | end | justify`
6584
- *
6585
- * **Initial value**: `start`
6586
- *
6587
- * @deprecated
6588
- */
6589
- "-webkit-box-pack"?: Property.BoxPack | undefined;
6590
- }
6591
-
6592
- declare type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>;
6593
-
6594
- declare interface OneAccountInfo {
6595
- /**
6596
- * @description accountId
6597
- */
6598
- oneAccountId?: string;
6599
- /**
6600
- * @description 邮箱
6601
- */
6602
- email?: string;
6603
- /**
6604
- * @description 账号状态
6605
- */
6606
- accountStatus?: string;
6607
- }
6608
-
6609
- /**
6610
- * @description one account 账户信息查询结果
6611
- */
6612
- declare interface OneAccountQueryResult {
6613
- /**
6614
- * @description 是否业务处理成功
6615
- */
6616
- success?: boolean;
6617
- /**
6618
- * @description 错误上下文
6619
- */
6620
- errorContext?: ErrorContext;
6621
- /**
6622
- * @description 返回结果码
6623
- */
6624
- resultCode?: string;
6625
- /**
6626
- * @description 返回结果信息
6627
- */
6628
- resultMessage?: string;
6629
- /**
6630
- * @description error actions
6631
- */
6632
- errorActions?: Record<string, string>;
6633
- /**
6634
- * @description error code
6635
- */
6636
- errorCode?: string;
6637
- /**
6638
- * @description error status
6639
- */
6640
- errorStatus?: string;
6641
- /**
6642
- * @description error message
6643
- */
6644
- errorMessage?: string;
6645
- /**
6646
- * @description extend info
6647
- */
6648
- extendInfo?: Record<string, string>;
6649
- /**
6650
- * @description one account 账户信息
6661
+ * **Initial value**: `inline-axis`
6662
+ *
6663
+ * @deprecated
6651
6664
  */
6652
- accountInfo?: OneAccountInfo;
6665
+ "-webkit-box-orient"?: Property.BoxOrient | undefined;
6653
6666
  /**
6654
- * @description action form 下一步动作
6667
+ * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.
6668
+ *
6669
+ * **Syntax**: `start | center | end | justify`
6670
+ *
6671
+ * **Initial value**: `start`
6672
+ *
6673
+ * @deprecated
6655
6674
  */
6656
- actionForm?: OtpChallengeActionForm;
6675
+ "-webkit-box-pack"?: Property.BoxPack | undefined;
6676
+ }
6677
+
6678
+ declare type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>;
6679
+
6680
+ declare interface OneAccountInfo {
6657
6681
  /**
6658
- * @description 支付方式列表
6682
+ * @description accountId
6659
6683
  */
6660
- paymentMethods?: PaymentMethodView[];
6684
+ oneAccountId?: string;
6661
6685
  /**
6662
- * @description 物流信息
6686
+ * @description 邮箱
6663
6687
  */
6664
- shippings?: ShippingInfo_2[];
6688
+ email?: string;
6665
6689
  /**
6666
- * @description 支付金额 (订单金额 + 物流费)
6690
+ * @description 账号状态
6667
6691
  */
6668
- paymentAmount?: MobileMoneyView;
6692
+ accountStatus?: string;
6669
6693
  }
6670
6694
 
6671
6695
  /**
@@ -6746,7 +6770,7 @@ declare class OpenSDKTracker {
6746
6770
  * @param options
6747
6771
  * @returns
6748
6772
  */
6749
- initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<CompatibleTrackerFull | undefined>;
6773
+ initTracker(options?: IntlOpenSDKTrackerInitOptions): Promise<IntlOpenSDKTracker | undefined>;
6750
6774
  private safeCall;
6751
6775
  /**
6752
6776
  *
@@ -6756,7 +6780,7 @@ declare class OpenSDKTracker {
6756
6780
  /**
6757
6781
  * @description 设置属性
6758
6782
  */
6759
- set(data: Partial<ExcludeUndefined<IntlOpenSDKTrackerInitOptions>>): void;
6783
+ set(data: Partial<IntlOpenSDKTrackerInitOptions>): void;
6760
6784
  /**
6761
6785
  * 会以 10141 code 上报一条常规日志,日志头为 D-AE
6762
6786
  * @see https://yuque.antfin.com/marmot/handbook/beginning#cq9Zw
@@ -6766,38 +6790,38 @@ declare class OpenSDKTracker {
6766
6790
  * 请在marmot申请code后使用,必须关联code
6767
6791
  * @see https://yuque.antfin.com/marmot/handbook/beginning#W3dtb
6768
6792
  */
6769
- log(...args: Parameters<CompatibleTrackerFull['log']>): void;
6793
+ log(...args: Parameters<IntlOpenSDKTracker['log']>): void;
6770
6794
  /**
6771
6795
  * 用于埋点相关上报,点击
6772
6796
  * @see https://yuque.antfin.com/marmot/handbook/beginning#XQel9
6773
6797
  */
6774
- click(...args: Parameters<CompatibleTrackerFull['click']>): void;
6798
+ click(...args: Parameters<IntlOpenSDKTracker['click']>): void;
6775
6799
  /**
6776
6800
  * 用于埋点相关上报,曝光
6777
6801
  * @see https://yuque.antfin.com/marmot/handbook/beginning#LiVxE
6778
6802
  */
6779
- expo(...args: Parameters<CompatibleTrackerFull['expo']>): void;
6803
+ expo(...args: Parameters<IntlOpenSDKTracker['expo']>): void;
6780
6804
  /**
6781
6805
  * 用于日志管控
6782
6806
  * @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
6783
6807
  */
6784
- onSendData(...args: Parameters<CompatibleTrackerFull['onSendData']>): void;
6808
+ onSendData(...args: Parameters<IntlOpenSDKTracker['onSendData']>): void;
6785
6809
  /**
6786
6810
  * 用于日志管控
6787
6811
  * @see https://yuque.antfin.com/marmot/handbook/beginning#rK7Ru
6788
6812
  */
6789
- offSendData(...args: Parameters<CompatibleTrackerFull['offSendData']>): void;
6813
+ offSendData(...args: Parameters<IntlOpenSDKTracker['offSendData']>): void;
6790
6814
  /**
6791
6815
  * 用于埋点相关上报,上报的日志头为 D-VM
6792
6816
  * @see https://yuque.antfin.com/marmot/handbook/beginning#RSCKn
6793
6817
  */
6794
- pageMonitor(...args: Parameters<CompatibleTrackerFull['pageMonitor']>): void;
6818
+ pageMonitor(...args: Parameters<IntlOpenSDKTracker['pageMonitor']>): void;
6795
6819
  /**
6796
6820
  * 用于上报自定义性能指标,单次仅上报一个指标
6797
6821
  * @param {string} key — m1 - m20
6798
6822
  * @param {number} num — 耗时,数字,一定要 >= 0,否则无统计意义
6799
6823
  */
6800
- reportCustomizedPerformance(...args: Parameters<CompatibleTrackerFull['reportCustomizedPerformance']>): void;
6824
+ reportCustomizedPerformance(...args: Parameters<IntlOpenSDKTracker['reportCustomizedPerformance']>): void;
6801
6825
  }
6802
6826
 
6803
6827
  /**
@@ -6810,54 +6834,65 @@ declare interface OrderInfo {
6810
6834
  orderDescription?: string;
6811
6835
  }
6812
6836
 
6813
- declare interface OtpChallengeActionForm {
6814
- /**
6815
- * @description action form type
6816
- */
6817
- actionFormType?: string;
6818
- /**
6819
- * @description type of challenge
6820
- */
6821
- challengeType?: string;
6822
- /**
6823
- * @description The actual render value
6824
- */
6825
- challengeRenderValue?: string;
6826
- /**
6827
- * @description Describe the challenge is required by AAC or external party
6828
- */
6829
- triggerSource?: string;
6830
- /**
6831
- * @description is support retry challenge
6832
- * @default true
6833
- */
6834
- isChallengeRetrySupported?: boolean;
6835
- /**
6836
- * @description is fist otp auto triggered
6837
- * @default false
6838
- */
6839
- isChallengeAutoTriggered?: boolean;
6840
- /**
6841
- * @description estimated challenge response duration
6842
- * @default 0
6843
- */
6844
- estimatedDuration?: number;
6845
- /**
6846
- * @description url - like h5 sdk challenge need to call back url
6847
- */
6848
- challengeUrl?: string;
6849
- /**
6850
- * @description extend information
6851
- */
6852
- extendInfo?: string;
6853
- /**
6854
- * @description verify Id
6855
- */
6856
- verifyId?: string;
6857
- /**
6858
- * @description 重发次数
6859
- */
6860
- resendLeftTimes?: number;
6837
+ declare interface OriginTrackerInitOptions {
6838
+ isMarmot?: boolean;
6839
+ spmConfig?: SpmConfig;
6840
+ bizType: string;
6841
+ appId: string;
6842
+ /**
6843
+ * 适用于从雨燕监控迁移到 marmot 的场景
6844
+ * 该字段的值可使用雨燕监控的 appId 值
6845
+ * 最终该值会放在 D-AE 日志类型的 appId 字段位置,并覆盖扩展参数 4 中的 idengine_groupId 值
6846
+ * 正常情况下不需要用到,有疑问咨询 @之其 205637
6847
+ **/
6848
+ compatibleAppId?: string;
6849
+ productId: string;
6850
+ userId?: string;
6851
+ deviceId?: string;
6852
+ chInfo?: string;
6853
+ batchCount?: number;
6854
+ plugins?: PluginFunction[];
6855
+ server?: string;
6856
+ /**
6857
+ * servers 传入空数组或不传的情况下,不会禁用所有日志的上报,这个字段不是用来做上报开关的
6858
+ * 就像 server 不传或传空字符串的情况下,也不会禁用日志的上报,会使用默认的服务器地址
6859
+ * servers 只在有至少一个有效值的情况下才有意义
6860
+ */
6861
+ servers?: string[];
6862
+ mdata?: Record<string, number | string>;
6863
+ env?: Env_2;
6864
+ ready?: boolean;
6865
+ isReport?: boolean;
6866
+ version?: string;
6867
+ funnelAuto?: boolean;
6868
+ userPathAuto?: boolean;
6869
+ autoExpo?: boolean;
6870
+ autoClick?: boolean;
6871
+ expoOnce?: boolean;
6872
+ platform?: string;
6873
+ sprintId?: string;
6874
+ autoReportConfig?: {
6875
+ isReport?: boolean;
6876
+ programVersion?: string;
6877
+ productId?: string;
6878
+ appId?: string;
6879
+ bizType?: string;
6880
+ imdapServerIndex?: number;
6881
+ server?: string;
6882
+ servers?: string[];
6883
+ platform?: string;
6884
+ deviceId?: string;
6885
+ };
6886
+ whiteScreenConfig?: BlankMonitorConfig | boolean;
6887
+ fmpIgnoreElements?: string[];
6888
+ enableBehavior?: BehaviorConfig | boolean;
6889
+ enableRequestHook?: RequestHookConfig | boolean;
6890
+ enableJSAPIReport?: boolean;
6891
+ }
6892
+
6893
+ declare interface OSInfo {
6894
+ os?: string;
6895
+ osVer?: string;
6861
6896
  }
6862
6897
 
6863
6898
  declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
@@ -6881,60 +6916,6 @@ declare interface PayByLinkInfo {
6881
6916
  linkVersion?: number;
6882
6917
  }
6883
6918
 
6884
- /**
6885
- * @description Payment element app config type
6886
- */
6887
- export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
6888
- /**
6889
- * @description sessionData,无法通过updateConfig更新
6890
- */
6891
- sessionData?: string;
6892
- /* Excluded from this release type: merchantDomain */
6893
- /* Excluded from this release type: renderData */
6894
- /* Excluded from this release type: connectAccount */
6895
- /* Excluded from this release type: sessionMetaData */
6896
- /* Excluded from this release type: renderDataError */
6897
- /* Excluded from this release type: sdkVersion */
6898
- /* Excluded from this release type: _requestConfig */
6899
- /* Excluded from this release type: logMetaData */
6900
- /* Excluded from this release type: heightOfVisible */
6901
- }
6902
-
6903
- /**
6904
- * @description Payment element appearance type
6905
- */
6906
- export declare type PaymentAppearance = PickAppearance<{
6907
- displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
6908
- theme: AntomTheme;
6909
- variables: AntomVariables;
6910
- layout: AntomLayouts;
6911
- }>;
6912
-
6913
- /**
6914
- * @description Payment element
6915
- */
6916
- export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
6917
- static elementType: string;
6918
- constructor(name: string, config: PaymentElementConfig);
6919
- /* Excluded from this release type: setup */
6920
- /* Excluded from this release type: submit */
6921
- protected focus(): void;
6922
- protected blur(): void;
6923
- protected clear(): void;
6924
- }
6925
-
6926
- /**
6927
- * @description Payment element config type
6928
- */
6929
- declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
6930
- }
6931
-
6932
- /**
6933
- * @description Payment element events
6934
- */
6935
- export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
6936
- }
6937
-
6938
6919
  declare interface PaymentElementView {
6939
6920
  /**
6940
6921
  * @description payment element key
@@ -7036,36 +7017,6 @@ declare interface PaymentEvaluationResult {
7036
7017
  paymentBalanceInfo?: DanaSofPayMethodView[];
7037
7018
  }
7038
7019
 
7039
- /**
7040
- * @description Payment guidance information (CKP scenario)
7041
- *
7042
- * <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
7043
- * bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
7044
- * via Map, dynamically addable)
7045
- */
7046
- declare interface PaymentGuideInfo {
7047
- /**
7048
- * @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
7049
- * payment guide button when this field is populated
7050
- */
7051
- appLinkUrlForWeb?: string;
7052
- /**
7053
- * @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
7054
- * text fields
7055
- *
7056
- * <p>Example configuration:
7057
- *
7058
- * <pre>
7059
- * {
7060
- * "dividerText": "or pay using",
7061
- * "directPayButtonText": "Pay directly with online banking",
7062
- * "ctoPButtonText": "Continue to payment"
7063
- * }
7064
- * </pre>
7065
- */
7066
- copyWriting?: Record<string, any>;
7067
- }
7068
-
7069
7020
  /**
7070
7021
  * @description 支付方式余额检查结果信息
7071
7022
  */
@@ -7128,10 +7079,6 @@ declare interface PaymentMethodView {
7128
7079
  * @description icon
7129
7080
  */
7130
7081
  icon?: string;
7131
- /**
7132
- * @description adaptive icon for PAYME payment method
7133
- */
7134
- adaptiveIcon?: string;
7135
7082
  /**
7136
7083
  * @description icon对应的名称
7137
7084
  */
@@ -7140,10 +7087,6 @@ declare interface PaymentMethodView {
7140
7087
  * @description 支付方式描述
7141
7088
  */
7142
7089
  description?: string;
7143
- /**
7144
- * @description 支付方式点击后的描述
7145
- */
7146
- descriptionAfterClick?: string;
7147
7090
  /**
7148
7091
  * @description category
7149
7092
  */
@@ -7278,10 +7221,6 @@ declare interface PaymentMethodView {
7278
7221
  * @description 账单地址收集模式
7279
7222
  */
7280
7223
  billingAddressCollectionMode?: string;
7281
- /**
7282
- * @description 分期银行信息列表
7283
- */
7284
- supportIppBankList?: FrontSupportIppBank[];
7285
7224
  }
7286
7225
 
7287
7226
  declare interface PaymentOption {
@@ -7349,10 +7288,6 @@ declare interface PaymentOption {
7349
7288
  * @description 支付选项Logo信息
7350
7289
  */
7351
7290
  logo?: Logo;
7352
- /**
7353
- * @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
7354
- */
7355
- description?: Record<string, string>;
7356
7291
  /**
7357
7292
  * @description extendInfo extendInfo information
7358
7293
  */
@@ -7420,13 +7355,6 @@ declare interface PaymentQuoteInfo {
7420
7355
  * @description payment amount view
7421
7356
  */
7422
7357
  paymentAmountView?: PaymentView;
7423
- /**
7424
- * @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
7425
- * places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
7426
- * price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
7427
- * MYR/SGD currency pair
7428
- */
7429
- quotePrice?: any;
7430
7358
  }
7431
7359
 
7432
7360
  /**
@@ -7536,45 +7464,6 @@ declare interface PaymentSessionConfig {
7536
7464
  productSceneVersion?: string;
7537
7465
  }
7538
7466
 
7539
- /**
7540
- * @description The submit params
7541
- */
7542
- export declare interface PaymentSubmitParams extends SubmitParams {
7543
- /**
7544
- * @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
7545
- * 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
7546
- */
7547
- handleActions?: boolean;
7548
- /**
7549
- * @description 收件地址信息
7550
- */
7551
- shippingInfo?: ShippingInfo;
7552
- /**
7553
- * @description 集成用户自定义信息(如 cardHolderName)
7554
- */
7555
- params?: Record<string, unknown>;
7556
- }
7557
-
7558
- /**
7559
- * @description Payment element submit result
7560
- */
7561
- export declare interface PaymentSubmitResult extends SubmitResult {
7562
- paymentSession?: {
7563
- /**
7564
- * @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
7565
- */
7566
- returnUrl: string;
7567
- /**
7568
- * @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
7569
- */
7570
- returnAppUrl?: string;
7571
- /**
7572
- * @description 回调页面唤起app的scheme链接,比如 alipay://xxx
7573
- */
7574
- returnAppScheme?: string;
7575
- };
7576
- }
7577
-
7578
7467
  declare interface PaymentView {
7579
7468
  /**
7580
7469
  * @description 金额,以元为单位的金额
@@ -7632,6 +7521,56 @@ export declare interface PayPalConfig {
7632
7521
  onShippingOptionsChange?: (data: any, actions: any) => Promise<void>;
7633
7522
  }
7634
7523
 
7524
+ declare interface PerformancePlugin extends BaseInfoPlugin {
7525
+ getAnalyzePerformanceInfo?(): Record<string, any> | null;
7526
+ getPagePerformanceInfo?(): {
7527
+ onload: string | number;
7528
+ domContentLoad: string | number;
7529
+ redirect: string | number;
7530
+ appCache: string | number;
7531
+ dns: string | number;
7532
+ tcp: string | number;
7533
+ ssl: string | number;
7534
+ reqt: string | number;
7535
+ rest: string | number;
7536
+ dpt: string | number;
7537
+ ft: string | number;
7538
+ domInteractive: string | number;
7539
+ domReady: string | number;
7540
+ domComplete: string | number;
7541
+ random: string | number;
7542
+ miniPerformance?: ReturnType<typeof getMiniPerformance>;
7543
+ timeOrigin?: number;
7544
+ };
7545
+ getWebVitalsInfo?(): GetWebVitalsInfoResult;
7546
+ getWhiteScreenInfo?(options?: Pick<GetWhiteScreenInfoOptions, 'selector' | 'ignoreNotInViewport'>): Promise<{
7547
+ status: 'error' | 'ok';
7548
+ }>;
7549
+ getFMP?(options?: {
7550
+ ignoreElements?: string[];
7551
+ }): Promise<{
7552
+ time: number;
7553
+ selector: string;
7554
+ } | undefined>;
7555
+ getTTI?(): Promise<number | undefined>;
7556
+ getFP?(): Promise<number | undefined>;
7557
+ getT2Time?(): Promise<number | undefined>;
7558
+ /**
7559
+ * 将性能数据发送到容器,目前只需 H5 应用实现
7560
+ */
7561
+ sendPerformanceDataToContainer?(data: LogItem): Promise<void>;
7562
+ getSnapshot?: () => {
7563
+ fmp: string;
7564
+ lcp: string;
7565
+ };
7566
+ /**
7567
+ * 用于采集详细的性能数据,越晚调用,搜集的数据越多
7568
+ */
7569
+ getDetailPerformance?(): Promise<DMC | null>;
7570
+ startCheckingPageWhiteScreen?(config: GetWhiteScreenInfoOptions | boolean | undefined): Promise<(() => void) | undefined>;
7571
+ startCheckingDOMWhiteScreen?(selector: string, options: Omit<GetWhiteScreenInfoOptions, 'selector'>): (() => void) | undefined;
7572
+ }
7573
+
7635
7574
  declare interface PeriodRule {
7636
7575
  /**
7637
7576
  * @description period type
@@ -7643,13 +7582,87 @@ declare interface PeriodRule {
7643
7582
  periodCount?: number;
7644
7583
  }
7645
7584
 
7646
- /**
7647
- * @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
7648
- * 返回受 Props 中存在的键约束的部分外观对象。
7649
- * @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
7650
- */
7651
7585
  declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
7652
7586
 
7587
+ declare interface PluginContext {
7588
+ userPath: {
7589
+ reStoreUserPath: (appId: string) => void;
7590
+ parseUserPathExtra: (key: string) => {
7591
+ idengine_user_path: string;
7592
+ } | null;
7593
+ getUserPathExtra: () => {
7594
+ cachePath: string[];
7595
+ extra: {
7596
+ idengine_user_path: string;
7597
+ };
7598
+ };
7599
+ };
7600
+ waitInit: () => Promise<void>;
7601
+ }
7602
+
7603
+ declare type PluginFunction = (iTracert: ITracert, callback: () => void) => boolean;
7604
+
7605
+ 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'> & {
7606
+ server?: string;
7607
+ servers?: string[];
7608
+ isMarmot?: boolean;
7609
+ deviceId?: Promise<string>;
7610
+ whiteScreenConfig?: (BlankMonitorConfig & {
7611
+ callback?: (options: ReportData) => Promise<void>;
7612
+ }) | boolean;
7613
+ spmCheckCover?: string;
7614
+ whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
7615
+ remoteConfigValidDuration?: number;
7616
+ };
7617
+
7618
+ declare interface PluginOnErrorCallbackErrorInfo {
7619
+ message: string;
7620
+ extra: Record<string, any>;
7621
+ type: ErrorType;
7622
+ }
7623
+
7624
+ declare interface PluginPageMonitorOptions {
7625
+ spmInfo: {
7626
+ spmAPos: string;
7627
+ spmBPos: string;
7628
+ currentPage: string;
7629
+ };
7630
+ logData?: Record<string, any>;
7631
+ }
7632
+
7633
+ declare interface PluginShape extends PerformancePlugin, LagPlugin {
7634
+ getRequester(): GetRequesterResult;
7635
+ getDataFilter?(): (data: string[]) => Promise<string[]>;
7636
+ getExtraDataFilter?(): (data: Record<string, any>) => Promise<Record<string, any>>;
7637
+ onSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
7638
+ offSendData?(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
7639
+ init?(options: PluginInitOptions): Promise<void>;
7640
+ onError?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): () => void;
7641
+ onPageLoad?(callback: () => void): () => void;
7642
+ set?(options: Record<string, any>): void;
7643
+ /**
7644
+ * @deprecated Compatible with old APIs. Use `Tracker#report` instead.
7645
+ * @param info
7646
+ * @param extra
7647
+ */
7648
+ log?(type: string, params?: Record<string, any>): void;
7649
+ pageMonitor?(options: PluginPageMonitorOptions): void;
7650
+ expo?(code: string, extra?: Record<string, number | string | boolean>): void;
7651
+ click?(code: string, extra: Record<string, number | string | boolean>): void;
7652
+ getSessionItem?(key: string): string | null;
7653
+ removeSessionItem?(key: string): void;
7654
+ setSessionItem?(key: string, value: string): void;
7655
+ getSessionId?(): string | null;
7656
+ getStorageItem?(key: string): Promise<string | null>;
7657
+ removeStorageItem?(key: string): void;
7658
+ setStorageItem?(key: string, value: string): void;
7659
+ onHTTPError?(callback: (options: HTTPErrorCallbackOptions) => void): void;
7660
+ triggerPreCaptureReport?(callback: (error: PluginOnErrorCallbackErrorInfo) => void): void;
7661
+ PluginShape?: void;
7662
+ initBehaviorListener?(addBehavior: AddBehavior, config: BehaviorConfig): void;
7663
+ reportAPI?(config: RequestHookConfig, callback: (options: APICallbackOptions) => void): void;
7664
+ }
7665
+
7653
7666
  /**
7654
7667
  * @description 政策信息,例如隐私链接,免责声明等
7655
7668
  */
@@ -9541,24 +9554,6 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
9541
9554
 
9542
9555
  declare type Pseudos = AdvancedPseudos | SimplePseudos;
9543
9556
 
9544
- /**
9545
- * @description QR code configuration for code form view
9546
- */
9547
- declare interface QrCodeConfig {
9548
- /**
9549
- * @description QR code render style, e.g. "rounded"
9550
- */
9551
- renderStyle?: string;
9552
- /**
9553
- * @description QR code center icon, can be URL or Base64 format
9554
- */
9555
- centerIcon?: string;
9556
- /**
9557
- * @description QR code corner icon, can be URL or Base64 format
9558
- */
9559
- cornerIcon?: string;
9560
- }
9561
-
9562
9557
  declare interface Rate {
9563
9558
  /**
9564
9559
  * @description rate label value
@@ -9628,35 +9623,66 @@ declare class ReceivePort {
9628
9623
  }): Promise<Record<string, any> | undefined>;
9629
9624
  }
9630
9625
 
9631
- /**
9632
- * @description 从webapp重定向到新URL的配置项。
9633
- * 支持浏览器重定向、app link唤端及schema唤端。
9634
- */
9635
9626
  declare interface RedirectOption {
9636
- /**
9637
- * @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
9638
- */
9639
9627
  url: string;
9640
- /**
9641
- * @description 唤端到url地址,http或https的地址
9642
- */
9643
- appLinkUrl?: string;
9644
- /**
9645
- * @description 唤端到schema地址, schema://的地址
9646
- */
9647
- schemaUrl?: string;
9648
- /**
9649
- * @description 重定向模式,默认为redirect
9650
- */
9651
9628
  mode?: 'redirect' | 'replace';
9652
9629
  /**
9653
9630
  * @description 是否重定向后销毁实例,默认为true
9654
9631
  */
9655
- destroy?: boolean;
9632
+ destory?: boolean;
9656
9633
  }
9657
9634
 
9635
+ declare type ReportData = {
9636
+ title?: string;
9637
+ msg?: string | Error | Record<string, number | string> | Event;
9638
+ logType: 'error' | 'info';
9639
+ extra?: Record<string, number | boolean | string | undefined | Error | null>;
9640
+ } | ({
9641
+ logType: 'custom';
9642
+ } & LogItem);
9643
+
9658
9644
  declare type RequestEnv = 'local' | 'dev' | 'sit' | 'pre' | 'prod' | 'sandbox' | 'light_sandbox';
9659
9645
 
9646
+ declare class RequesterCacheWrapper {
9647
+ private autoReportConfig;
9648
+ private dataCache;
9649
+ private lastSendTime;
9650
+ private batchCount;
9651
+ private sendFrequency;
9652
+ constructor(autoReportConfig: {
9653
+ immediate?: boolean;
9654
+ deviceId?: Promise<string>;
9655
+ isReport?: boolean;
9656
+ programVersion?: string;
9657
+ productId?: string;
9658
+ appId?: string;
9659
+ compatibleAppId?: string;
9660
+ bizType?: string;
9661
+ });
9662
+ report(options: ReportData & {
9663
+ request: GetRequesterResult;
9664
+ extraDataFilter?: (data: Record<string, any>) => Promise<Record<string, any>>;
9665
+ dataFilter?: (data: string[]) => Promise<string[]>;
9666
+ } & BaseInfo & {
9667
+ immediate?: boolean;
9668
+ }): Promise<void>;
9669
+ private send;
9670
+ /**
9671
+ * 分批发送请求
9672
+ */
9673
+ private httpRequest;
9674
+ private sendBatch;
9675
+ }
9676
+
9677
+ declare type RequestHookConfig = {
9678
+ /**
9679
+ * @description 不上报的域名
9680
+ */
9681
+ excludes?: Array<string | RegExp>;
9682
+ getFetchResponseInfo?: (headers: Headers, responseData: Record<string, any>, requestParam: Array<any>) => ResponseInfo;
9683
+ getXHRResponseInfo?: (response: XHRResponse) => ResponseInfo;
9684
+ };
9685
+
9660
9686
  declare interface RequestOptions {
9661
9687
  env?: RequestEnv;
9662
9688
  baseURL?: string;
@@ -9681,6 +9707,15 @@ declare interface RequestOptions {
9681
9707
  scope?: string;
9682
9708
  }
9683
9709
 
9710
+ declare type ResponseInfo = {
9711
+ responseUrl?: string;
9712
+ traceId?: string;
9713
+ isSuccess?: boolean;
9714
+ errorCode?: string | number;
9715
+ errorMsg?: string;
9716
+ url?: string;
9717
+ };
9718
+
9684
9719
  /**
9685
9720
  * @description 国际支付标准结果码,参考主站<code>ErrorCode</code>实现。
9686
9721
  *
@@ -9825,25 +9860,7 @@ declare interface SharePayInfo {
9825
9860
  securityText?: string;
9826
9861
  }
9827
9862
 
9828
- export declare interface ShippingInfo {
9829
- shippingName: {
9830
- firstName: string;
9831
- lastName: string;
9832
- middleName?: string;
9833
- fullName?: string;
9834
- };
9835
- shippingPhoneNo: string;
9836
- shippingAddress: {
9837
- region: string;
9838
- address1: string;
9839
- address2: string;
9840
- city?: string;
9841
- state?: string;
9842
- zipCode: string;
9843
- };
9844
- }
9845
-
9846
- declare interface ShippingInfo_2 {
9863
+ declare interface ShippingInfo {
9847
9864
  /**
9848
9865
  * @description The unique ID to identify the shipping info
9849
9866
  */
@@ -10055,6 +10072,14 @@ declare type SimplePseudos =
10055
10072
  | ":volume-locked"
10056
10073
  | ":xr-overlay";
10057
10074
 
10075
+ declare interface SpmConfig {
10076
+ spmAPos: string;
10077
+ bizType: string;
10078
+ pages?: Record<string, Record<string, string>>;
10079
+ mdata?: Record<string, number | string | boolean>;
10080
+ immediate?: boolean;
10081
+ }
10082
+
10058
10083
  declare interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
10059
10084
  /**
10060
10085
  * This feature is not Baseline because it does not work in some of the most widely-used browsers.
@@ -23753,20 +23778,16 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
23753
23778
 
23754
23779
  declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
23755
23780
 
23756
- export declare type SubmitParams = {
23757
- redirect?: 'always' | 'if_required';
23758
- };
23759
-
23760
23781
  /**
23761
- * @description 成功时的数据类型
23782
+ * @description 成功时的data数据类型
23762
23783
  */
23763
23784
  export declare type SubmitResult = {
23764
- /* Excluded from this release type: code */
23765
- /* Excluded from this release type: message */
23766
23785
  /**
23767
23786
  * 查询到的状态
23768
23787
  */
23769
23788
  status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
23789
+ /* Excluded from this release type: code */
23790
+ /* Excluded from this release type: message */
23770
23791
  /**
23771
23792
  * @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
23772
23793
  */
@@ -23779,10 +23800,6 @@ export declare type SubmitResult = {
23779
23800
  * 查询到的结果消息
23780
23801
  */
23781
23802
  message?: string;
23782
- /**
23783
- * @description 是否需要更换 session 重试
23784
- */
23785
- needChangeSessionForRetry?: boolean;
23786
23803
  };
23787
23804
  /**
23788
23805
  * 是否是用户手动取消3D
@@ -24241,15 +24258,256 @@ declare interface TerminalTypeAction {
24241
24258
  interactionType?: string;
24242
24259
  }
24243
24260
 
24244
- /**
24245
- * 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
24246
- * 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
24247
- * 确保两条路径的弹窗 loading 表现一致。
24248
- */
24249
- export declare const themeColorMap: Record<AntomTheme, {
24250
- theme: 'dark' | 'light';
24251
- backgroundColor: string;
24252
- }>;
24261
+ declare class Tracker {
24262
+ protected requesterCacheWrapper?: RequesterCacheWrapper;
24263
+ private initPromise;
24264
+ private spmInfo;
24265
+ private spmConfig?;
24266
+ private spmAPos?;
24267
+ private spmBPos?;
24268
+ private funnelAuto?;
24269
+ private userPathAuto?;
24270
+ private cachePath;
24271
+ private userPathLength;
24272
+ private pathUserMeta;
24273
+ private isMarmot;
24274
+ protected appId?: string;
24275
+ protected compatibleAppId?: string;
24276
+ private plugin;
24277
+ private sprintId?;
24278
+ private userId;
24279
+ protected deviceId?: Promise<string>;
24280
+ protected programVersion?: string;
24281
+ private language?;
24282
+ protected bizType?: string;
24283
+ protected productId?: string;
24284
+ private whiteScreenConfig?;
24285
+ private performance?;
24286
+ protected isReport?: boolean;
24287
+ protected server?: string;
24288
+ protected servers?: string[];
24289
+ protected platform?: string;
24290
+ private env?;
24291
+ private immediate?;
24292
+ enableScreenshot: boolean | undefined | {
24293
+ rate: number;
24294
+ };
24295
+ private enableResourceAnalysis?;
24296
+ private _lag?;
24297
+ private spmCheckCover?;
24298
+ private enableBehavior?;
24299
+ private behavior?;
24300
+ private enableRequestHook?;
24301
+ private enableJSAPIReport?;
24302
+ private customizedPerformanceMark?;
24303
+ constructor(Plugin: new (context: PluginContext) => PluginShape);
24304
+ init(options: TrackerInitOptions): Promise<boolean>;
24305
+ /**
24306
+ * 业务侧可以拦截发送日志的请求,用于手动过滤
24307
+ * 当前仅对浏览器环境生效
24308
+ * rawData 是 intl-tracker 内部格式的数据,为对象
24309
+ * data 是最终发送到服务端的数据,为字符串形式
24310
+ */
24311
+ onSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
24312
+ /**
24313
+ * 业务侧可以取消拦截发送日志的请求
24314
+ * 当前仅对浏览器环境生效
24315
+ */
24316
+ offSendData(callback: (rawData: ReportData & BaseInfo, data: string) => boolean): void;
24317
+ private startReportSnapshot;
24318
+ /**
24319
+ * 用于上报自定义性能指标,单次仅上报一个指标
24320
+ * @param key m1 - m20
24321
+ * @param num 耗时,数字,一定要 >= 0,否则无统计意义
24322
+ */
24323
+ reportCustomizedPerformance(key: CustomizedPerformanceKey, num: number): void | undefined;
24324
+ /**
24325
+ * 上报自定义性能指标
24326
+ * @param data 适合单次合并上报多个指标的场景
24327
+ * 请注意,使用 reportCustomizedPerformance 上报时,每次上报会发送一次日志请求
24328
+ * 不同阶段的数据量会有差异,这些差异可以作为页面流失漏斗的数据源
24329
+ * 但合并上报时,同时上报的多个指标数量是相同的
24330
+ */
24331
+ reportCustomizedPerformanceData(data: Partial<Record<CustomizedPerformanceKey, number>>): void | undefined;
24332
+ /**
24333
+ * 用于显式上报小程序性能指标
24334
+ * 由于小程序的性能指标仅在“使用 schema 打开页面”时有效,原来的自动上报未区分场景,会导致脏数据较多
24335
+ * 改为数据自动采集、仅在必要时由业务方手动调用接口上报
24336
+ */
24337
+ reportMiniProgramPerformance(): Promise<void> | undefined;
24338
+ getMiniProgramPerformanceData(): Promise<{
24339
+ s1: number;
24340
+ s2: number;
24341
+ s3: number;
24342
+ s4: number;
24343
+ s5: number;
24344
+ s6: number;
24345
+ s7: number;
24346
+ s8: number;
24347
+ } | undefined> | undefined;
24348
+ /**
24349
+ * 用于显式上报网页性能指标,一般用不上
24350
+ * 1. tracker.onPageLoad() 会自动上报
24351
+ * 2. tracker.reportCustomizedPerformanceData() 会自动上报
24352
+ * 3. tracker.reportCustomizedPerformance() 会自动上报
24353
+ * 4. tracker.reportMiniProgramPerformance() 会自动上报
24354
+ * 5. 以上方法仅会上报一次网页性能指标,多次调用不受影响
24355
+ * 6. 仅当以上所有方法均未调用时,才需要手动调用此方法
24356
+ */
24357
+ reportPagePerformance(): Promise<void> | undefined;
24358
+ private handleReportSnapShot;
24359
+ get lag(): {
24360
+ log: (msg: string) => Promise<void>;
24361
+ fps: () => Promise<void>;
24362
+ };
24363
+ onPageLoad(options?: string | {
24364
+ title?: string;
24365
+ fmpIgnoreElements?: string[];
24366
+ }): Promise<void>;
24367
+ reportPerformance(title?: string): void;
24368
+ reportDetailPerformance(): void;
24369
+ onError(): Promise<(() => void) | undefined>;
24370
+ fmp(time: number): void;
24371
+ flushBehavior(): void;
24372
+ /**
24373
+ * 内部使用
24374
+ *
24375
+ * @param error
24376
+ */
24377
+ private reportError;
24378
+ private triggerPreCaptureReport;
24379
+ onHTTPError(): Promise<void>;
24380
+ private reportAPI;
24381
+ /**
24382
+ * 内部使用,业务项目不要调用
24383
+ *
24384
+ * @param options
24385
+ */
24386
+ reportHTTPError(options: HTTPErrorCallbackOptions): void;
24387
+ set(options: Record<string, any>): void;
24388
+ log(item: LogItem): void;
24389
+ /**
24390
+ * @deprecated Compatible with old APIs. Use `Tracker#log` instead.
24391
+ * @param info
24392
+ * @param extra
24393
+ */
24394
+ logInfo(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
24395
+ /**
24396
+ * @deprecated Compatible with old APIs. Use `Tracker#log` instead.
24397
+ * @param info
24398
+ * @param extra
24399
+ */
24400
+ logError(info: LogInfo, extra?: Record<string, number | boolean | string>): Promise<void>;
24401
+ reportFunnel(title: string, config?: {
24402
+ [prop: string]: string | number;
24403
+ name: string;
24404
+ level: number;
24405
+ label: string;
24406
+ } | undefined): Promise<void>;
24407
+ reportRPC(rpcInfo: {
24408
+ name: string;
24409
+ label: string;
24410
+ code?: string | undefined;
24411
+ msg?: string | Error | Record<string, string | number> | undefined;
24412
+ success?: boolean | undefined;
24413
+ result?: number | undefined;
24414
+ traceId?: string | undefined;
24415
+ httpStatus?: string | undefined;
24416
+ time?: number | undefined;
24417
+ }): void;
24418
+ logJSBridgeError(info: LogInfo): void;
24419
+ pageMonitor(page: string, extraParams?: Record<string, any>, autoPv?: boolean): void;
24420
+ expo(code: string, extra?: Record<string, string | number | boolean> | undefined): void;
24421
+ click(code: string, extra?: Record<string, string | number | boolean>): void;
24422
+ pv(): void;
24423
+ /**
24424
+ * 指定点位白屏的监控 - 用于监控目标点位的白屏
24425
+ * 页面白屏和目标点位白屏的通用监控逻辑
24426
+ *
24427
+ * @param selector 目标点位选择器
24428
+ * @param options 配置项
24429
+ * {
24430
+ * 检测延时,单位 second,即启动白屏检测后多久开始执行白屏识别
24431
+ * NOTE: 设置时间时要考虑业务平均加载时间,太短可能会误报
24432
+ * delay
24433
+ *
24434
+ * 是否持续监测, 即初始化白屏检测结束之后是否继续监控业务运行中白屏, default: true
24435
+ * persistent
24436
+ * }
24437
+ */
24438
+ startCheckingDOMWhiteScreen(selector: string, options: Omit<BlankMonitorConfig, 'selector'>): void;
24439
+ private getRequester;
24440
+ protected getDefaultExtraInfo(): Promise<BaseInfo>;
24441
+ private request;
24442
+ private formatExtra;
24443
+ private reportLog;
24444
+ /**
24445
+ * 解析成功率上报参数
24446
+ * @param key p_ page c_ click expo r l -info或者-error结尾是前端日志
24447
+ * @param funnelConfig 标准漏斗上报参数
24448
+ * @returns 扩展参数数据
24449
+ */
24450
+ private parseUserPathExtra;
24451
+ /**
24452
+ * 获取成功率上报参数
24453
+ * 用于去冲
24454
+ */
24455
+ private getUserPathExtra;
24456
+ /**
24457
+ * 恢复存储的用户路径
24458
+ */
24459
+ private reStoreUserPath;
24460
+ private reStoreUserPathMeta;
24461
+ private reStoreSessionId;
24462
+ /**
24463
+ * 重置session id
24464
+ */
24465
+ resetSessionId(): void;
24466
+ /**
24467
+ * 重置用户路径
24468
+ */
24469
+ resetUserPath(): void;
24470
+ private normalizeServer;
24471
+ private normalizeServers;
24472
+ }
24473
+
24474
+ declare interface TrackerInitOptions {
24475
+ spmConfig?: SpmConfig;
24476
+ marmotId: string;
24477
+ compatibleAppId?: string;
24478
+ userId?: string;
24479
+ server?: IMDAP_SERVER | string;
24480
+ servers?: (IMDAP_SERVER | string)[];
24481
+ env?: Env_2;
24482
+ sprintId?: string;
24483
+ whiteScreen?: BlankMonitorConfig | boolean;
24484
+ immediate?: boolean;
24485
+ autoExpo?: boolean;
24486
+ autoClick?: boolean;
24487
+ expoOnce?: boolean;
24488
+ enableScreenshot?: boolean | {
24489
+ rate: number;
24490
+ };
24491
+ enableResourceAnalysis?: boolean;
24492
+ spmCheckCover?: string;
24493
+ enableBehavior?: BehaviorConfig | boolean;
24494
+ enableRequestHook?: RequestHookConfig | boolean;
24495
+ enableJSAPIReport?: boolean;
24496
+ /**
24497
+ * 白名单配置源,仅浏览器环境支持
24498
+ * 不传值时,与旧版功能相同,所有日志都会发送
24499
+ * 1. 值为 REMOTE 时,表示从远程服务器获取白名单配置
24500
+ * 2. 值为 NONE 时,表示不使用白名单配置,所有日志都会发送
24501
+ */
24502
+ whiteListConfigSource?: WHITE_LIST_CONFIG_SOURCE;
24503
+ /**
24504
+ * 当且仅当 whiteListConfigSource 为 REMOTE 时有效
24505
+ * 在有效期内,不重复加载 json 请求
24506
+ */
24507
+ remoteConfigValidDuration?: number;
24508
+ productId?: string;
24509
+ bizType?: string;
24510
+ }
24253
24511
 
24254
24512
  /**
24255
24513
  * @description 交易信息
@@ -24329,8 +24587,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
24329
24587
  export declare type VaultingAppearanceProps = {
24330
24588
  displaySetting: 'showCardBrandIcon';
24331
24589
  theme: AntomTheme;
24332
- variables: AntomVariables;
24333
- fonts?: FontSource[];
24590
+ variables: 'background-secondary' | 'radius-module' | 'wrapper-padding' | 'content-primary' | 'border-primary' | 'action-hover' | 'border-disable' | 'content-tertiary' | 'background-primary' | 'background-disable' | 'radius-component' | 'state-failure' | 'action-normal' | 'content-secondary';
24334
24591
  };
24335
24592
 
24336
24593
  /**
@@ -24353,7 +24610,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
24353
24610
  declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
24354
24611
  }
24355
24612
 
24356
- export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
24613
+ export declare interface VaultingElementEvents extends AntomBridgeEventMap<VaultingAppConfig, VaultingSubmitParams> {
24357
24614
  }
24358
24615
 
24359
24616
  /**
@@ -27993,9 +28250,16 @@ declare interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, T
27993
28250
 
27994
28251
  declare type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>;
27995
28252
 
28253
+ declare type WHITE_LIST_CONFIG_SOURCE = 'REMOTE' | 'NONE';
28254
+
27996
28255
  declare type WithAppURL<T> = T & {
27997
28256
  appUrl: string;
27998
28257
  isMainElement: boolean;
27999
28258
  };
28000
28259
 
28260
+ declare type XHRResponse = {
28261
+ headers: ReturnType<XMLHttpRequest['getAllResponseHeaders']>;
28262
+ body: XMLHttpRequest['response'];
28263
+ };
28264
+
28001
28265
  export { }