@alipay/ams-checkout 0.0.1783663570-dev.4 → 0.0.1783663570-dev.6

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.
@@ -143,7 +143,88 @@ declare interface AmountLimitInfo {
143
143
  /**
144
144
  * AntomBridge事件类型,包含了SDK与webapp通信的所有事件类型
145
145
  */
146
- export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>> extends BaseBridgeEventMap<AppConfig, SubmitResult, SubmitParams, string, OpenModalParams> {
146
+ export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends BaseBridgeEventMap<AppConfig, SR, SubmitParams, string, AntomOpenModalConfig> {
147
+ }
148
+
149
+ /**
150
+ * @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
151
+ */
152
+ export declare interface AntomBridgeWithNativeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends AntomBridgeEventMap<AppConfig, SubmitParams, SR> {
153
+ /**
154
+ * @internal 展示半浮层
155
+ */
156
+ showPopup: {
157
+ mode: string;
158
+ showAnimation: string;
159
+ };
160
+ /**
161
+ * @internal 隐藏loading
162
+ */
163
+ dismissLoading: Record<string, never>;
164
+ /**
165
+ * @internal 通知APP 收银台已经ready
166
+ */
167
+ webAppReady: {
168
+ source: string;
169
+ };
170
+ /**
171
+ * @internal 通知app 应用已启动
172
+ */
173
+ onLaunch: {
174
+ success: boolean;
175
+ source: string;
176
+ target: string;
177
+ };
178
+ /**
179
+ * @internal 收到客户端返回action query的数据和商户的配置
180
+ */
181
+ renderComponent: {
182
+ sessionResult?: Record<string, unknown>;
183
+ };
184
+ /**
185
+ * @internal 心跳事件
186
+ */
187
+ appHeartBeat: {
188
+ success: boolean;
189
+ };
190
+ /**
191
+ * @internal 客户端 展示toast弹窗
192
+ */
193
+ showToast: {
194
+ icon: string;
195
+ message: string;
196
+ source: string;
197
+ };
198
+ /**
199
+ * @internal 客户端eventCallback 事件
200
+ */
201
+ onEventCallback: {
202
+ code: string;
203
+ };
204
+ /**
205
+ * @internal 发送回调码事件
206
+ */
207
+ onSubmitPayCallback: CallbackReturnData;
208
+ /**
209
+ * @internal 重置收银台
210
+ */
211
+ reset: Record<string, never>;
212
+ /**
213
+ * @internal 销毁收银台
214
+ */
215
+ destroy: Record<string, never>;
216
+ /**
217
+ * @internal 关闭收银台
218
+ */
219
+ onClose: Record<string, never>;
220
+ /**
221
+ * @internal 重定向
222
+ */
223
+ onRedirect: {
224
+ normalUrl: string;
225
+ isDestroy: boolean;
226
+ needReset: boolean;
227
+ };
147
228
  }
148
229
 
149
230
  /**
@@ -178,6 +259,8 @@ declare interface AntomErrorResponse {
178
259
  extendInfo?: Record<string, any>;
179
260
  }
180
261
 
262
+ export declare type AntomLayouts = 'tabs' | 'accordion';
263
+
181
264
  /**
182
265
  * 给中间页使用的桥接事件类型
183
266
  * @internal 内部使用,不暴露到外部
@@ -185,15 +268,13 @@ declare interface AntomErrorResponse {
185
268
  export declare interface AntomMiddlePageEventMap extends AntomBridgeEventMap {
186
269
  /**
187
270
  * @description 3DS流程完成
271
+ * @deprecated 使用auto_close_modal
188
272
  */
189
273
  three_ds_end: void;
190
- }
191
-
192
- /**
193
- * 给modal和webapp页面messagePort使用的桥接事件类型
194
- * @internal 内部使用,不暴露到外部
195
- */
196
- export declare interface AntomModalEventMap extends AntomBridgeEventMap {
274
+ /**
275
+ * @description 正常结束自动关闭事件
276
+ */
277
+ auto_close_modal: void;
197
278
  }
198
279
 
199
280
  /**
@@ -214,6 +295,11 @@ export declare class AntomSDK extends BaseElementsFactory {
214
295
  * @description 更新配置
215
296
  */
216
297
  updateConfig(config: Partial<BaseFactoryConfig>): void;
298
+ /**
299
+ * @internal
300
+ * @param payload
301
+ */
302
+ protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
217
303
  /**
218
304
  * @internal
219
305
  * 这个方法为内部调用方法
@@ -224,9 +310,11 @@ export declare class AntomSDK extends BaseElementsFactory {
224
310
  getContentWindow: () => Window;
225
311
  }>;
226
312
  elements(): Elements;
313
+ createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
227
314
  createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
228
315
  createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
229
316
  createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
317
+ getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
230
318
  getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
231
319
  getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
232
320
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
@@ -283,6 +371,22 @@ export declare const AntomSDKErrorCodes: {
283
371
  * @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
284
372
  */
285
373
  readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
374
+ /**
375
+ * @description checkout 页面未加载成功,不允许 updateConfig
376
+ */
377
+ readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
378
+ /**
379
+ * @description 支付进行中,不允许更新金额
380
+ */
381
+ readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
382
+ /**
383
+ * @description 金额不能为空
384
+ */
385
+ readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
386
+ /**
387
+ * @description 金额格式非法(仅允许整数和小数)
388
+ */
389
+ readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
286
390
  readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
287
391
  readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
288
392
  readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
@@ -299,6 +403,8 @@ export declare const AntomSDKErrorCodes: {
299
403
  readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
300
404
  readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
301
405
  readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
406
+ readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
407
+ readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
302
408
  readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
303
409
  readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
304
410
  readonly API_MISS_PARAMS: "API_MISS_PARAMS";
@@ -316,6 +422,8 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
316
422
 
317
423
  export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
318
424
 
425
+ 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';
426
+
319
427
  declare interface APICallbackOptions {
320
428
  requestType: 'fetch' | 'xhr';
321
429
  time: number;
@@ -330,15 +438,21 @@ declare interface APICallbackOptions {
330
438
  errorMsg?: string;
331
439
  }
332
440
 
441
+ /**
442
+ * @description SDK UI组件的外观配置。
443
+ * 控制主题、CSS变量、布局规则及显示设置。
444
+ * @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
445
+ */
333
446
  declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
334
447
  theme?: Props['theme'];
335
448
  variables?: PartialSpeKey<Props['variables'], string>;
336
449
  rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
337
450
  displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
338
451
  layout?: Props['layout'];
452
+ fonts?: FontSource[];
339
453
  }
340
454
 
341
- declare type AppearanceSetting = {
455
+ export declare type AppearanceSetting = {
342
456
  displaySetting: Record<'showCardBrandIcon', boolean>;
343
457
  theme: 'light' | 'dark';
344
458
  layout: 'accordion' | 'tabs';
@@ -751,6 +865,16 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
751
865
  merged: AppConfig;
752
866
  updated: Partial<AppConfig>;
753
867
  };
868
+ /**
869
+ * 更新配置时的回复事件,包含可能发生的错误信息。
870
+ * 如果 error 为 undefined,则表示没有错误发生。
871
+ */
872
+ "OPENSDK@UPDATE_CONFIG_REPLY": {
873
+ /**
874
+ * 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
875
+ */
876
+ error?: ErrorPayload<string>;
877
+ } | undefined;
754
878
  /**
755
879
  * @internal 内部事件 不暴露给商户
756
880
  */
@@ -789,6 +913,10 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
789
913
  * @internal 内部事件 不暴露给商户
790
914
  */
791
915
  "OPENSDK@TRANSFER_MODAL_APPEARANCE": Appearance;
916
+ /**
917
+ * @internal 内部事件 不暴露给商户
918
+ */
919
+ "OPENSDK@TRANSFER_MODAL_INITIALDATA": Record<string, any>;
792
920
  /**
793
921
  * @internal 内部事件 不暴露给商户
794
922
  */
@@ -816,6 +944,12 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
816
944
  * @internal 内部高度变化,同步到sdk更新iframe
817
945
  */
818
946
  "OPENSDK@HEIGHT_UPDATE": number;
947
+ /**
948
+ * @internal 内部销毁元素,同步到sdk销毁元素
949
+ */
950
+ "OPENSDK@DESTROY_ELEMENT": {
951
+ elementKey: string;
952
+ };
819
953
  }
820
954
 
821
955
  declare interface BaseConfig {
@@ -840,6 +974,12 @@ declare interface BaseConfig {
840
974
  * @internal 不透出到用户
841
975
  */
842
976
  version: string;
977
+ /**
978
+ * @description iframe 的 color-scheme CSS 属性,用于阻止商户页面的 color-scheme 传播到 iframe
979
+ * 默认值 'light dark',确保 iframe 透明背景在商户页面设置 color-scheme: dark 时正常工作
980
+ * @internal 内部使用,不暴露给商户
981
+ */
982
+ colorScheme?: string;
843
983
  }
844
984
 
845
985
  /**
@@ -888,6 +1028,8 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
888
1028
  * @internal 外部不要访问
889
1029
  */
890
1030
  private cachedSend;
1031
+ /** Reuses the pending reply for concurrent submit calls. */
1032
+ private submitPromise?;
891
1033
  constructor(name: string, config: WithAppURL<Config>);
892
1034
  /**
893
1035
  * @internal 外部不能直接调用
@@ -899,9 +1041,9 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
899
1041
  */
900
1042
  setup(): Promise<Partial<BaseElementAppConfig> | undefined>;
901
1043
  /**
902
- * @param {string | HTMLElement} containerId 如果给字符串id不要带#号
1044
+ * @param {HTMLElement} container
903
1045
  */
904
- mount(containerId: HTMLElement): Promise<void>;
1046
+ mount(container: HTMLElement): Promise<void>;
905
1047
  /**
906
1048
  * @description 内部使用,挂载iframe
907
1049
  * @internal 外部不能直接调用
@@ -911,7 +1053,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
911
1053
  * 更新webapp配置
912
1054
  * @param {Partial<BaseElementAppConfig>} newConfig
913
1055
  */
914
- updateConfig(newConfig: Partial<Config['appConfig']>): void;
1056
+ updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
915
1057
  /**
916
1058
  * 卸载元素
917
1059
  */
@@ -975,20 +1117,28 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
975
1117
  }
976
1118
 
977
1119
  declare interface BaseElementAppConfig {
1120
+ /**
1121
+ * @internal 不透出给商户,统一从loadAntom获取
1122
+ */
978
1123
  locale?: string;
979
1124
  /**
980
- * @internal 不透出给商户
1125
+ * @internal 不透出给商户,统一从loadAntom获取
981
1126
  */
982
1127
  env?: 'sandbox' | 'prod';
983
1128
  /**
984
- * @description 商户的唯一标识
1129
+ * @description 商户的唯一标识,用于监控
985
1130
  * @internal 不透出到用户
986
1131
  */
987
1132
  merchantId?: string;
988
1133
  [key: string]: any;
989
1134
  }
990
1135
 
991
- declare interface BaseElementConfig<T extends BaseElementAppConfig = Record<string, any>> extends BaseConfig {
1136
+ declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
1137
+ /**
1138
+ * @description Session id forwarded to the iframe as the track_id query parameter.
1139
+ * @internal Internal element config only.
1140
+ */
1141
+ trackId?: string;
992
1142
  appConfig: T;
993
1143
  elementMode: ElementMode;
994
1144
  }
@@ -1084,6 +1234,7 @@ declare abstract class BaseFactory {
1084
1234
  */
1085
1235
  constructor(config: BaseFactoryConfig);
1086
1236
  protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
1237
+ protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
1087
1238
  /**
1088
1239
  * @description 子类必须实现此方法,返回工厂可用的元素类列表
1089
1240
  * @internal
@@ -1209,6 +1360,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
1209
1360
  _submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
1210
1361
  }
1211
1362
 
1363
+ /**
1364
+ * @description 打开模态框的配置项。
1365
+ * 包含显示选项、关闭行为、外观设置及初始化数据。
1366
+ */
1212
1367
  declare interface BaseOpenModalConfig {
1213
1368
  /**
1214
1369
  * 无需手动传递,app的唯一scope
@@ -1232,10 +1387,21 @@ declare interface BaseOpenModalConfig {
1232
1387
  onClose?: () => void;
1233
1388
  url: string;
1234
1389
  /**
1235
- * 关闭时,是否需要app页面二次确认,默认为false,即直接关闭
1390
+ * @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
1236
1391
  */
1237
1392
  closeConfirm?: boolean;
1393
+ /**
1394
+ * @description 需要同步的外观配置
1395
+ */
1238
1396
  appearance?: Appearance;
1397
+ /**
1398
+ * @description 需要传递的初始化数据
1399
+ */
1400
+ initialData?: Record<string, any>;
1401
+ /**
1402
+ * @description 无需手动传递, 模态框的唯一标识
1403
+ */
1404
+ modalId?: string;
1239
1405
  }
1240
1406
 
1241
1407
  declare type BehaviorConfig = {
@@ -1333,6 +1499,42 @@ declare interface C2PProps {
1333
1499
  merchantTransactionId?: string;
1334
1500
  }
1335
1501
 
1502
+ /**
1503
+ * @description native回调错误信息格式
1504
+ * @internal
1505
+ */
1506
+ export declare interface CallbackErrorInfo {
1507
+ code: string;
1508
+ message?: string;
1509
+ needChangeSessionForRetry?: boolean;
1510
+ traceId?: string;
1511
+ context?: string;
1512
+ }
1513
+
1514
+ /**
1515
+ * @description native回调返回数据
1516
+ * @internal
1517
+ */
1518
+ export declare interface CallbackReturnData {
1519
+ status?: string;
1520
+ userCanceled3D?: boolean;
1521
+ isExposed?: boolean;
1522
+ error?: CallbackErrorInfo;
1523
+ session?: {
1524
+ nextAction?: CallbackSessionNextAction;
1525
+ };
1526
+ }
1527
+
1528
+ /**
1529
+ * @description native回调会话下一步操作,包含了回调的url
1530
+ * @internal
1531
+ */
1532
+ export declare interface CallbackSessionNextAction {
1533
+ normalUrl?: string;
1534
+ schemeUrl?: string;
1535
+ applinkUrl?: string;
1536
+ }
1537
+
1336
1538
  declare interface CardIssuerAuthentication {
1337
1539
  /**
1338
1540
  * @description 卡售卖单元
@@ -1750,7 +1952,7 @@ declare interface CashierSdkActionQueryResult {
1750
1952
  /**
1751
1953
  * @description 物流信息, 包含物流地址和物流费
1752
1954
  */
1753
- shippingInfo?: ShippingInfo;
1955
+ shippingInfo?: ShippingInfo_2;
1754
1956
  /**
1755
1957
  * @description 用户已绑资产信息
1756
1958
  */
@@ -1783,28 +1985,6 @@ declare interface ChargeInfo {
1783
1985
  chargeActualAmountView?: PaymentView;
1784
1986
  }
1785
1987
 
1786
- /** click 事件 resolve 参数 */
1787
- export declare interface ClickResolveOptions {
1788
- amount?: {
1789
- currency: string;
1790
- value: string;
1791
- };
1792
- shippingAddressRequired?: boolean;
1793
- allowedShippingCountries?: string[];
1794
- shippingRates?: Array<{
1795
- id: string;
1796
- displayName: string;
1797
- amount: string;
1798
- }>;
1799
- lineItems?: Array<{
1800
- name: string;
1801
- amount: string;
1802
- }>;
1803
- business?: {
1804
- name: string;
1805
- };
1806
- }
1807
-
1808
1988
  declare interface CodeFormView {
1809
1989
  /**
1810
1990
  * @description title
@@ -1830,6 +2010,11 @@ declare interface CodeFormView {
1830
2010
  * @description label
1831
2011
  */
1832
2012
  label?: string;
2013
+ /**
2014
+ * @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
2015
+ * when appLinkUrlForWeb is populated
2016
+ */
2017
+ paymentGuideInfo?: PaymentGuideInfo;
1833
2018
  /**
1834
2019
  * @description 提醒事项
1835
2020
  */
@@ -1846,6 +2031,10 @@ declare interface CodeFormView {
1846
2031
  * @description 码过期时间
1847
2032
  */
1848
2033
  codeExpireTime?: string;
2034
+ /**
2035
+ * @description QR code configuration including renderStyle, centerIcon and cornerIcon
2036
+ */
2037
+ qrcodeConfig?: QrCodeConfig;
1849
2038
  }
1850
2039
 
1851
2040
  /**
@@ -2402,10 +2591,14 @@ export declare interface ConfirmCardSetupOptions {
2402
2591
  export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'> {
2403
2592
  sessionData: string;
2404
2593
  /**
2405
- * @description 传入已挂载的 CVVElement 或 Elements 实例,不传则使用无 UI 自动提交模式
2594
+ * @description 传入已挂载的 CVVElement / PaymentElement / Elements 实例,不传则使用无 UI 自动提交模式
2406
2595
  */
2407
2596
  elements?: BaseMainElement | BaseElements;
2408
2597
  appearance?: CVVAppearance;
2598
+ /**
2599
+ * @description 集成用户自定义信息(如 cardHolderName)
2600
+ */
2601
+ params?: Record<string, unknown>;
2409
2602
  }
2410
2603
 
2411
2604
  /**
@@ -2477,6 +2670,13 @@ declare namespace CSS_2 {
2477
2670
  }
2478
2671
  }
2479
2672
 
2673
+ /**
2674
+ * CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
2675
+ */
2676
+ declare interface CssFontSource {
2677
+ cssSrc: string;
2678
+ }
2679
+
2480
2680
  declare interface CurrencyInfo {
2481
2681
  /**
2482
2682
  * @description Getter method for property <tt>currencyCode</tt>.
@@ -2521,6 +2721,17 @@ declare interface CustomerFxInfo {
2521
2721
  useMarketPrice?: boolean;
2522
2722
  }
2523
2723
 
2724
+ /**
2725
+ * 自定义字体源 — 通过 @font-face 加载自托管字体
2726
+ */
2727
+ declare interface CustomFontSource {
2728
+ family: string;
2729
+ src: string;
2730
+ weight?: string;
2731
+ style?: string;
2732
+ unicodeRange?: string;
2733
+ }
2734
+
2524
2735
  /**
2525
2736
  * CustomizedPerformanceKey 是给业务使用的自定义指标,共 20 个,页面之间互相独立
2526
2737
  */
@@ -2530,7 +2741,7 @@ declare type CustomizedPerformanceKey = 'm1' | 'm2' | 'm3' | 'm4' | 'm5' | 'm6'
2530
2741
  * @public
2531
2742
  * @description CVV element app config type
2532
2743
  */
2533
- export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance> {
2744
+ export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
2534
2745
  /**
2535
2746
  * @description sessionData
2536
2747
  */
@@ -2568,7 +2779,8 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
2568
2779
 
2569
2780
  export declare type CVVAppearanceProps = {
2570
2781
  theme: AntomTheme;
2571
- 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';
2782
+ variables: AntomVariables;
2783
+ fonts?: FontSource[];
2572
2784
  };
2573
2785
 
2574
2786
  /**
@@ -2660,6 +2872,10 @@ export declare interface CVVSubmitParams {
2660
2872
  * 重定向策略
2661
2873
  */
2662
2874
  redirect?: 'always' | 'if_required';
2875
+ /**
2876
+ * 集成用户自定义信息(如 cardHolderName)
2877
+ */
2878
+ params?: Record<string, unknown>;
2663
2879
  }
2664
2880
 
2665
2881
  declare interface DanaSofCouponInfo {
@@ -3378,7 +3594,7 @@ declare class Elements extends BaseElements {
3378
3594
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
3379
3595
  }
3380
3596
 
3381
- 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';
3597
+ 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';
3382
3598
 
3383
3599
  declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
3384
3600
 
@@ -3469,6 +3685,22 @@ declare interface ExpCardPlan {
3469
3685
  * @description 每个月分期利息
3470
3686
  */
3471
3687
  monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
3688
+ /**
3689
+ * @description 分期有效期开始时间
3690
+ */
3691
+ validStartTime?: string;
3692
+ /**
3693
+ * @description 分期有效期结束时间
3694
+ */
3695
+ validEndTime?: string;
3696
+ /**
3697
+ * @description 支持的银行信息
3698
+ *
3699
+ * 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
3700
+ * 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
3701
+ * 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
3702
+ */
3703
+ supportedBank?: ExpSupportIppBank;
3472
3704
  }
3473
3705
 
3474
3706
  declare interface ExpInstallmentInfo {
@@ -3493,12 +3725,18 @@ declare interface ExpPaymentOptionDetail {
3493
3725
  * @public
3494
3726
  * @description Express element app config type
3495
3727
  */
3496
- export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting> {
3728
+ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
3497
3729
  /** payment SessionData */
3498
3730
  sessionData?: string;
3499
3731
  /** Business division (country/region) */
3500
3732
  businessDivision?: string;
3501
- /** Amount & Currency */
3733
+ /**
3734
+ * Amount & Currency
3735
+ *
3736
+ * Only effective via `updateConfig({ amount })` at runtime.
3737
+ * Passing amount at creation time is ignored; the initial amount
3738
+ * comes from the server-side sdkQuery result (renderData.paymentAmount).
3739
+ */
3502
3740
  amount?: {
3503
3741
  currency: string;
3504
3742
  value: string;
@@ -3507,20 +3745,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3507
3745
  paypal?: PayPalConfig;
3508
3746
  /**
3509
3747
  * Button text type (following Stripe Express Checkout Element design)
3510
- * Each payment method can independently set the button display text
3511
- * Reserved index signature for future payment method integration
3748
+ * Each payment method can independently set the button display text.
3512
3749
  */
3513
3750
  buttonType?: {
3514
3751
  /** PayPal: paypal | checkout | buynow | pay */
3515
3752
  paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
3516
3753
  [method: string]: string | undefined;
3517
3754
  };
3518
- /** Unified height for all buttons (px) */
3755
+ /**
3756
+ * Unified height for all buttons (px)
3757
+ */
3519
3758
  buttonHeight?: number;
3520
3759
  /**
3521
3760
  * Button color theme (following Stripe Express Checkout Element design)
3522
- * Each payment method can independently set the theme color
3523
- * Reserved index signature for future payment method integration
3761
+ * Each payment method can independently set the theme color.
3524
3762
  */
3525
3763
  buttonTheme?: {
3526
3764
  /** PayPal: gold | blue | silver | white | black */
@@ -3541,6 +3779,15 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3541
3779
  * Locale for internationalization, passed from entry params (loadAntom), default to en_US
3542
3780
  */
3543
3781
  locale?: string;
3782
+ /**
3783
+ * 是否运行在 Native App 的 WebView 中。
3784
+ * 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
3785
+ */
3786
+ isNativeAppWebview?: boolean;
3787
+ /** @internal SDK host 侧商户域名,供 Apple Pay merchant validation 使用 */
3788
+ merchantDomain?: string;
3789
+ /** @internal Elements2 历史协议字段,含义同 merchantDomain */
3790
+ doMain?: string;
3544
3791
  }
3545
3792
 
3546
3793
  /** cancel 事件负载 */
@@ -3549,24 +3796,54 @@ export declare interface ExpressCancelEvent {
3549
3796
  data?: any;
3550
3797
  }
3551
3798
 
3552
- /** click 事件负载 */
3799
+ /** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
3553
3800
  export declare interface ExpressClickEvent {
3554
3801
  expressPaymentType: string;
3555
- resolve: (options: ClickResolveOptions) => void;
3556
3802
  }
3557
3803
 
3558
3804
  /** confirm 事件负载(统一终态,替代 approve) */
3559
3805
  export declare interface ExpressConfirmData {
3560
3806
  expressPaymentType: string;
3561
- paymentData: any;
3562
- billingDetails?: any;
3563
- shippingAddress?: any;
3564
- sessionData?: string;
3807
+ billingDetails?: {
3808
+ name?: string;
3809
+ email?: string;
3810
+ phone?: string;
3811
+ address?: {
3812
+ line1?: string;
3813
+ line2?: string;
3814
+ city?: string;
3815
+ state?: string;
3816
+ postalCode?: string;
3817
+ country?: string;
3818
+ };
3819
+ };
3820
+ shippingAddress?: {
3821
+ name?: string;
3822
+ phone?: string;
3823
+ address?: {
3824
+ line1?: string;
3825
+ line2?: string;
3826
+ city?: string;
3827
+ state?: string;
3828
+ postalCode?: string;
3829
+ country?: string;
3830
+ };
3831
+ };
3832
+ /** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
3833
+ paymentData?: unknown;
3834
+ /**
3835
+ * 商户主动拒绝本次支付(如库存不足、价格变动等)。
3836
+ * 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
3837
+ */
3838
+ paymentFailed: () => void;
3565
3839
  }
3566
3840
 
3567
3841
  /**
3568
3842
  * @public
3569
3843
  * @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
3844
+ *
3845
+ * Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
3846
+ * AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
3570
3847
  */
3571
3848
  export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
3572
3849
  static elementType: string;
@@ -3574,15 +3851,44 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3574
3851
  * Store all function-type callbacks locally, not involved in postMessage serialization
3575
3852
  */
3576
3853
  private _callbacks;
3854
+ /** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
3855
+ private _renderData;
3856
+ private _hostSign;
3857
+ /**
3858
+ * 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
3859
+ * bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
3860
+ */
3861
+ private _localHandlers;
3862
+ /** 支付流程进行中标志(click → confirm/error/cancel 之间) */
3863
+ private _paymentInProgress;
3864
+ private _paypalOverlay;
3577
3865
  constructor(name: string, config: ExpressElementConfig);
3578
- setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3579
3866
  /**
3580
- * Register internal event listeners (iframe communication)
3867
+ * 重写 on:
3868
+ * 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
3869
+ * 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
3870
+ */
3871
+ on(event: string, handler: (...args: any[]) => void): void;
3872
+ /**
3873
+ * SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
3874
+ * 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
3875
+ */
3876
+ private _emit;
3877
+ updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3878
+ /**
3879
+ * 商户在 confirm 回调内调用,触发实际支付提交。
3880
+ * iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
3881
+ * 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
3581
3882
  */
3582
- /** Overlay DOM node, created on click, removed after payment ends */
3583
- private _overlay;
3584
- private _showOverlay;
3585
- private _hideOverlay;
3883
+ completePayment(redirect?: 'always' | 'if_required'): Promise<{
3884
+ success: boolean;
3885
+ result?: any;
3886
+ error?: {
3887
+ code: string;
3888
+ message: string;
3889
+ };
3890
+ }>;
3891
+ setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3586
3892
  private registerInternalListeners;
3587
3893
  protected focus(): void;
3588
3894
  protected blur(): void;
@@ -3600,84 +3906,83 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
3600
3906
  * @public
3601
3907
  * @description Express element events type
3602
3908
  */
3603
- export declare interface ExpressElementEvents extends AntomBridgeEventMap<ExpressAppConfig> {
3604
- /**
3605
- * @description Element ready event — 上报可用支付方式
3606
- */
3909
+ export declare interface ExpressElementEvents extends AntomBridgeWithNativeEventMap<ExpressAppConfig> {
3607
3910
  ready: {
3608
3911
  availablePaymentMethods: Record<string, boolean>;
3609
3912
  };
3610
- /**
3611
- * @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
3612
- * 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
3613
- */
3614
3913
  click: ExpressClickEvent;
3615
- /**
3616
- * @description 统一支付完成事件(替代 approve)
3617
- * 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
3618
- */
3619
3914
  confirm: ExpressConfirmData;
3620
- /**
3621
- * @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
3622
- */
3623
3915
  error: ErrorPayload & {
3624
3916
  expressPaymentType: string;
3625
3917
  };
3626
- /**
3627
- * @description 用户取消支付
3628
- */
3629
3918
  cancel: ExpressCancelEvent;
3630
- /**
3631
- * @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
3632
- */
3633
3919
  shippingaddresschange: {
3634
3920
  expressPaymentType: string;
3635
3921
  address: any;
3636
3922
  resolve: (options: ShippingResolveOptions) => void;
3637
3923
  reject: (reason: string) => void;
3638
3924
  };
3639
- /**
3640
- * @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
3641
- */
3642
3925
  shippingratechange: {
3643
3926
  expressPaymentType: string;
3644
3927
  shippingRate: any;
3645
3928
  resolve: (options: RateResolveOptions) => void;
3646
3929
  };
3647
- /** @internal iframe 内容高度变化 */
3648
3930
  contentHeightChanged: {
3649
3931
  height: number;
3650
3932
  };
3651
- /** @internal PayPal 请求商户创建订单 */
3652
- 'paypal:createOrder': {
3933
+ 'OPENSDK@CLICK': {
3934
+ expressPaymentType: string;
3935
+ };
3936
+ 'OPENSDK@CLICK_RESOLVE': Record<string, never>;
3937
+ 'OPENSDK@PAYPAL_CREATE_ORDER': {
3653
3938
  requestId: string;
3654
3939
  };
3655
- /** @internal PayPal createOrder 响应 */
3656
- 'paypal:createOrder:reply': {
3940
+ 'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
3657
3941
  requestId: string;
3658
3942
  sessionData?: string;
3659
3943
  error?: string;
3660
3944
  };
3661
- /** @internal PayPal 用户变更收货地址 */
3662
- 'paypal:onShippingAddressChange': {
3945
+ 'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
3663
3946
  requestId: string;
3664
3947
  shippingData: any;
3665
3948
  };
3666
- /** @internal PayPal 收货地址变更响应 */
3667
- 'paypal:onShippingAddressChange:reply': {
3949
+ 'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
3668
3950
  requestId: string;
3669
3951
  error?: string;
3670
3952
  };
3671
- /** @internal PayPal 用户变更配送方式 */
3672
- 'paypal:onShippingOptionsChange': {
3953
+ 'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
3673
3954
  requestId: string;
3674
3955
  shippingData: any;
3675
3956
  };
3676
- /** @internal PayPal 配送方式变更响应 */
3677
- 'paypal:onShippingOptionsChange:reply': {
3957
+ 'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
3678
3958
  requestId: string;
3679
3959
  error?: string;
3680
3960
  };
3961
+ 'OPENSDK@GET_APPLE_PAY_TOKEN': {
3962
+ requestId: string;
3963
+ expressPaymentType: string;
3964
+ };
3965
+ /** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
3966
+ 'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
3967
+ requestId: string;
3968
+ success: boolean;
3969
+ result?: any;
3970
+ errorCode?: string;
3971
+ errorMessage?: string;
3972
+ billingDetails?: any;
3973
+ shippingAddress?: any;
3974
+ };
3975
+ 'OPENSDK@UPDATE_CONFIG_REPLY': {
3976
+ error?: ErrorPayload<string>;
3977
+ };
3978
+ 'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
3979
+ onRedirect: {
3980
+ normalUrl: string;
3981
+ applinkUrl?: string;
3982
+ schemaUrl?: string;
3983
+ isDestroy: boolean;
3984
+ needReset: boolean;
3985
+ };
3681
3986
  }
3682
3987
 
3683
3988
  declare interface ExpSupportBank {
@@ -3702,6 +4007,24 @@ declare interface ExpSupportCardBrand {
3702
4007
  logo?: Logo;
3703
4008
  }
3704
4009
 
4010
+ /**
4011
+ * @description 支持的分期银行信息
4012
+ */
4013
+ declare interface ExpSupportIppBank {
4014
+ /**
4015
+ * @description bank short name or bank code
4016
+ */
4017
+ bankShortName?: string;
4018
+ /**
4019
+ * @description logo
4020
+ */
4021
+ logo?: Logo;
4022
+ /**
4023
+ * @description bins
4024
+ */
4025
+ bins?: string[];
4026
+ }
4027
+
3705
4028
  declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
3706
4029
 
3707
4030
  declare interface FirstPhaseSubscriptionDetail {
@@ -3719,6 +4042,27 @@ declare interface FirstPhaseSubscriptionDetail {
3719
4042
  promotionDetails?: PromotionDetail[];
3720
4043
  }
3721
4044
 
4045
+ declare type FontSource = CssFontSource | CustomFontSource;
4046
+
4047
+ declare interface FrontModulesToBeLoadedInterface {
4048
+ acquirerName: string;
4049
+ scriptUrl: string;
4050
+ }
4051
+
4052
+ /**
4053
+ * @description 分期银行展示模型
4054
+ */
4055
+ declare interface FrontSupportIppBank {
4056
+ /**
4057
+ * @description bank short name or bank code
4058
+ */
4059
+ bankShortName?: string;
4060
+ /**
4061
+ * @description logo
4062
+ */
4063
+ logo?: Logo;
4064
+ }
4065
+
3722
4066
  declare type GetI18nQueryParam = string | {
3723
4067
  /**
3724
4068
  * 多语言文案的 key
@@ -4350,6 +4694,14 @@ declare interface HTTPErrorCallbackOptions {
4350
4694
  aborted?: 0 | 1;
4351
4695
  }
4352
4696
 
4697
+ declare interface IApplePayContactField {
4698
+ email: string;
4699
+ name: string;
4700
+ phone: string;
4701
+ postalAddress: string;
4702
+ phoneticName: string;
4703
+ }
4704
+
4353
4705
  declare interface iBaseElementClass {
4354
4706
  new (name: string, config: BaseElementConfig): BaseElement;
4355
4707
  elementType: string;
@@ -4517,6 +4869,100 @@ declare interface IOptions {
4517
4869
  stayTime?: number;
4518
4870
  }
4519
4871
 
4872
+ declare interface IPaymentSessionMetaData {
4873
+ clientId?: string;
4874
+ renderDisplayType?: string;
4875
+ paymentSessionConfig?: PaymentSessionConfig;
4876
+ securityConfig?: SessionSecurityConfig;
4877
+ moneyView?: any;
4878
+ extendInfo?: string;
4879
+ paymentMethodInfoView?: any;
4880
+ paymentView?: any;
4881
+ modernWeb?: boolean;
4882
+ action?: PaymentSessionAction;
4883
+ /**
4884
+ * @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
4885
+ */
4886
+ flowSwitchTags?: string;
4887
+ authUrlInfo?: {
4888
+ appIdentifier?: string;
4889
+ applinkUrl?: string;
4890
+ normalUrl?: string;
4891
+ schemeUrl?: string;
4892
+ authUrl?: string;
4893
+ };
4894
+ paymentSessionFactor?: {
4895
+ externalRiskTimeout?: number;
4896
+ extendInfo?: {
4897
+ merchantCapabilities?: string[];
4898
+ supportedNetworks?: string[];
4899
+ requiredBillingContactFields: IApplePayContactField[];
4900
+ requiredShippingContactFields: IApplePayContactField[];
4901
+ };
4902
+ merchantInfo?: {
4903
+ registeredCountry?: string;
4904
+ partnerId?: string;
4905
+ merchantName?: string;
4906
+ };
4907
+ order?: {
4908
+ orderDescription: string;
4909
+ };
4910
+ paymentAmount?: {
4911
+ value?: string;
4912
+ currency?: string;
4913
+ };
4914
+ paymentMethodInfo?: {
4915
+ paymentMethodType?: string;
4916
+ };
4917
+ paymentMethodViewMetaData?: any;
4918
+ paymentRequestId?: string;
4919
+ supportedLanguages?: any;
4920
+ /**
4921
+ * 当前为苹果分期场景的信息
4922
+ */
4923
+ recurringInfo?: {
4924
+ /**
4925
+ * 代扣协议开始日期 不传为当前系统时间
4926
+ */
4927
+ startDate?: number;
4928
+ /**
4929
+ * 代扣协议结束日期 不传不限制结束时间
4930
+ */
4931
+ endDate?: number;
4932
+ /**
4933
+ * 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
4934
+ */
4935
+ intervalUnit?: string;
4936
+ /**
4937
+ * 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
4938
+ */
4939
+ intervalCount?: number;
4940
+ /**
4941
+ * 分期标题信息
4942
+ */
4943
+ title?: string;
4944
+ /**
4945
+ * 分期管理页面
4946
+ */
4947
+ managementURL?: string;
4948
+ /**
4949
+ * 苹果通知ipay MAPN信息变更的地址
4950
+ */
4951
+ tokenNotificationURL?: string;
4952
+ /**
4953
+ * 分期协议描述
4954
+ */
4955
+ agreementDescription?: string;
4956
+ };
4957
+ frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
4958
+ };
4959
+ connectFactor?: {
4960
+ enableConnect?: boolean;
4961
+ };
4962
+ skipRenderPaymentMethod?: boolean;
4963
+ needAccountConfirmPage?: boolean;
4964
+ }
4965
+
4520
4966
  declare interface ISystemInfo {
4521
4967
  readonly pixelRatio: number;
4522
4968
  readonly windowWidth: number;
@@ -7016,6 +7462,68 @@ declare interface OneAccountInfo {
7016
7462
  accountStatus?: string;
7017
7463
  }
7018
7464
 
7465
+ /**
7466
+ * @description one account 账户信息查询结果
7467
+ */
7468
+ declare interface OneAccountQueryResult {
7469
+ /**
7470
+ * @description 是否业务处理成功
7471
+ */
7472
+ success?: boolean;
7473
+ /**
7474
+ * @description 错误上下文
7475
+ */
7476
+ errorContext?: ErrorContext;
7477
+ /**
7478
+ * @description 返回结果码
7479
+ */
7480
+ resultCode?: string;
7481
+ /**
7482
+ * @description 返回结果信息
7483
+ */
7484
+ resultMessage?: string;
7485
+ /**
7486
+ * @description error actions
7487
+ */
7488
+ errorActions?: Record<string, string>;
7489
+ /**
7490
+ * @description error code
7491
+ */
7492
+ errorCode?: string;
7493
+ /**
7494
+ * @description error status
7495
+ */
7496
+ errorStatus?: string;
7497
+ /**
7498
+ * @description error message
7499
+ */
7500
+ errorMessage?: string;
7501
+ /**
7502
+ * @description extend info
7503
+ */
7504
+ extendInfo?: Record<string, string>;
7505
+ /**
7506
+ * @description one account 账户信息
7507
+ */
7508
+ accountInfo?: OneAccountInfo;
7509
+ /**
7510
+ * @description action form 下一步动作
7511
+ */
7512
+ actionForm?: OtpChallengeActionForm;
7513
+ /**
7514
+ * @description 支付方式列表
7515
+ */
7516
+ paymentMethods?: PaymentMethodView[];
7517
+ /**
7518
+ * @description 物流信息
7519
+ */
7520
+ shippings?: ShippingInfo_2[];
7521
+ /**
7522
+ * @description 支付金额 (订单金额 + 物流费)
7523
+ */
7524
+ paymentAmount?: MobileMoneyView;
7525
+ }
7526
+
7019
7527
  /**
7020
7528
  * @description OpenModal的返回值类型
7021
7529
  */
@@ -7222,6 +7730,56 @@ declare interface OSInfo {
7222
7730
  osVer?: string;
7223
7731
  }
7224
7732
 
7733
+ declare interface OtpChallengeActionForm {
7734
+ /**
7735
+ * @description action form type
7736
+ */
7737
+ actionFormType?: string;
7738
+ /**
7739
+ * @description type of challenge
7740
+ */
7741
+ challengeType?: string;
7742
+ /**
7743
+ * @description The actual render value
7744
+ */
7745
+ challengeRenderValue?: string;
7746
+ /**
7747
+ * @description Describe the challenge is required by AAC or external party
7748
+ */
7749
+ triggerSource?: string;
7750
+ /**
7751
+ * @description is support retry challenge
7752
+ * @default true
7753
+ */
7754
+ isChallengeRetrySupported?: boolean;
7755
+ /**
7756
+ * @description is fist otp auto triggered
7757
+ * @default false
7758
+ */
7759
+ isChallengeAutoTriggered?: boolean;
7760
+ /**
7761
+ * @description estimated challenge response duration
7762
+ * @default 0
7763
+ */
7764
+ estimatedDuration?: number;
7765
+ /**
7766
+ * @description url - like h5 sdk challenge need to call back url
7767
+ */
7768
+ challengeUrl?: string;
7769
+ /**
7770
+ * @description extend information
7771
+ */
7772
+ extendInfo?: string;
7773
+ /**
7774
+ * @description verify Id
7775
+ */
7776
+ verifyId?: string;
7777
+ /**
7778
+ * @description 重发次数
7779
+ */
7780
+ resendLeftTimes?: number;
7781
+ }
7782
+
7225
7783
  declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
7226
7784
 
7227
7785
  declare interface PayByLinkInfo {
@@ -7243,6 +7801,99 @@ declare interface PayByLinkInfo {
7243
7801
  linkVersion?: number;
7244
7802
  }
7245
7803
 
7804
+ /**
7805
+ * @description Payment element app config type
7806
+ */
7807
+ export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
7808
+ /**
7809
+ * @description sessionData,无法通过updateConfig更新
7810
+ */
7811
+ sessionData?: string;
7812
+ /**
7813
+ * @internal sdk所在hostname
7814
+ */
7815
+ merchantDomain?: string;
7816
+ /**
7817
+ * @internal 渲染数据
7818
+ */
7819
+ renderData?: CashierSdkActionQueryResult;
7820
+ /**
7821
+ * @internal connect时有这个数据
7822
+ */
7823
+ connectAccount?: OneAccountQueryResult;
7824
+ /**
7825
+ * @internal sessionData解析后的数据
7826
+ */
7827
+ sessionMetaData?: IPaymentSessionMetaData;
7828
+ /**
7829
+ * @internal 渲染数据错误信息
7830
+ */
7831
+ renderDataError?: ErrorPayload;
7832
+ /**
7833
+ * @internal sdk 版本号
7834
+ */
7835
+ sdkVersion?: string;
7836
+ /**
7837
+ * @internal 内部联调使用,生产环境传递无效
7838
+ */
7839
+ _requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
7840
+ /**
7841
+ * @internal 内部使用,无需用户传递,用于log日志原数据
7842
+ */
7843
+ logMetaData?: {
7844
+ paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
7845
+ productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
7846
+ trackId: string;
7847
+ merchantId?: string;
7848
+ paymentMethodType?: string;
7849
+ };
7850
+ /**
7851
+ * @internal 内部使用,无需用户传递,高度信息
7852
+ */
7853
+ heightOfVisible?: number;
7854
+ }
7855
+
7856
+ /**
7857
+ * @description Payment element appearance type
7858
+ */
7859
+ export declare type PaymentAppearance = PickAppearance<{
7860
+ displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
7861
+ theme: AntomTheme;
7862
+ variables: AntomVariables;
7863
+ layout: AntomLayouts;
7864
+ }>;
7865
+
7866
+ /**
7867
+ * @description Payment element
7868
+ */
7869
+ export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
7870
+ static elementType: string;
7871
+ constructor(name: string, config: PaymentElementConfig);
7872
+ /**
7873
+ * @internal
7874
+ */
7875
+ setup(): Promise<Partial<PaymentAppConfig> | undefined>;
7876
+ /**
7877
+ * @internal
7878
+ */
7879
+ submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
7880
+ protected focus(): void;
7881
+ protected blur(): void;
7882
+ protected clear(): void;
7883
+ }
7884
+
7885
+ /**
7886
+ * @description Payment element config type
7887
+ */
7888
+ declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
7889
+ }
7890
+
7891
+ /**
7892
+ * @description Payment element events
7893
+ */
7894
+ export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
7895
+ }
7896
+
7246
7897
  declare interface PaymentElementView {
7247
7898
  /**
7248
7899
  * @description payment element key
@@ -7344,6 +7995,36 @@ declare interface PaymentEvaluationResult {
7344
7995
  paymentBalanceInfo?: DanaSofPayMethodView[];
7345
7996
  }
7346
7997
 
7998
+ /**
7999
+ * @description Payment guidance information (CKP scenario)
8000
+ *
8001
+ * <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
8002
+ * bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
8003
+ * via Map, dynamically addable)
8004
+ */
8005
+ declare interface PaymentGuideInfo {
8006
+ /**
8007
+ * @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
8008
+ * payment guide button when this field is populated
8009
+ */
8010
+ appLinkUrlForWeb?: string;
8011
+ /**
8012
+ * @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
8013
+ * text fields
8014
+ *
8015
+ * <p>Example configuration:
8016
+ *
8017
+ * <pre>
8018
+ * {
8019
+ * "dividerText": "or pay using",
8020
+ * "directPayButtonText": "Pay directly with online banking",
8021
+ * "ctoPButtonText": "Continue to payment"
8022
+ * }
8023
+ * </pre>
8024
+ */
8025
+ copyWriting?: Record<string, any>;
8026
+ }
8027
+
7347
8028
  /**
7348
8029
  * @description 支付方式余额检查结果信息
7349
8030
  */
@@ -7406,6 +8087,10 @@ declare interface PaymentMethodView {
7406
8087
  * @description icon
7407
8088
  */
7408
8089
  icon?: string;
8090
+ /**
8091
+ * @description adaptive icon for PAYME payment method
8092
+ */
8093
+ adaptiveIcon?: string;
7409
8094
  /**
7410
8095
  * @description icon对应的名称
7411
8096
  */
@@ -7414,6 +8099,10 @@ declare interface PaymentMethodView {
7414
8099
  * @description 支付方式描述
7415
8100
  */
7416
8101
  description?: string;
8102
+ /**
8103
+ * @description 支付方式点击后的描述
8104
+ */
8105
+ descriptionAfterClick?: string;
7417
8106
  /**
7418
8107
  * @description category
7419
8108
  */
@@ -7548,6 +8237,10 @@ declare interface PaymentMethodView {
7548
8237
  * @description 账单地址收集模式
7549
8238
  */
7550
8239
  billingAddressCollectionMode?: string;
8240
+ /**
8241
+ * @description 分期银行信息列表
8242
+ */
8243
+ supportIppBankList?: FrontSupportIppBank[];
7551
8244
  }
7552
8245
 
7553
8246
  declare interface PaymentOption {
@@ -7615,6 +8308,10 @@ declare interface PaymentOption {
7615
8308
  * @description 支付选项Logo信息
7616
8309
  */
7617
8310
  logo?: Logo;
8311
+ /**
8312
+ * @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
8313
+ */
8314
+ description?: Record<string, string>;
7618
8315
  /**
7619
8316
  * @description extendInfo extendInfo information
7620
8317
  */
@@ -7682,6 +8379,13 @@ declare interface PaymentQuoteInfo {
7682
8379
  * @description payment amount view
7683
8380
  */
7684
8381
  paymentAmountView?: PaymentView;
8382
+ /**
8383
+ * @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
8384
+ * places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
8385
+ * price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
8386
+ * MYR/SGD currency pair
8387
+ */
8388
+ quotePrice?: any;
7685
8389
  }
7686
8390
 
7687
8391
  /**
@@ -7791,6 +8495,45 @@ declare interface PaymentSessionConfig {
7791
8495
  productSceneVersion?: string;
7792
8496
  }
7793
8497
 
8498
+ /**
8499
+ * @description The submit params
8500
+ */
8501
+ export declare interface PaymentSubmitParams extends SubmitParams {
8502
+ /**
8503
+ * @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
8504
+ * 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
8505
+ */
8506
+ handleActions?: boolean;
8507
+ /**
8508
+ * @description 收件地址信息
8509
+ */
8510
+ shippingInfo?: ShippingInfo;
8511
+ /**
8512
+ * @description 集成用户自定义信息(如 cardHolderName)
8513
+ */
8514
+ params?: Record<string, unknown>;
8515
+ }
8516
+
8517
+ /**
8518
+ * @description Payment element submit result
8519
+ */
8520
+ export declare interface PaymentSubmitResult extends SubmitResult {
8521
+ paymentSession?: {
8522
+ /**
8523
+ * @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
8524
+ */
8525
+ returnUrl: string;
8526
+ /**
8527
+ * @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
8528
+ */
8529
+ returnAppUrl?: string;
8530
+ /**
8531
+ * @description 回调页面唤起app的scheme链接,比如 alipay://xxx
8532
+ */
8533
+ returnAppScheme?: string;
8534
+ };
8535
+ }
8536
+
7794
8537
  declare interface PaymentView {
7795
8538
  /**
7796
8539
  * @description 金额,以元为单位的金额
@@ -7909,6 +8652,11 @@ declare interface PeriodRule {
7909
8652
  periodCount?: number;
7910
8653
  }
7911
8654
 
8655
+ /**
8656
+ * @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
8657
+ * 返回受 Props 中存在的键约束的部分外观对象。
8658
+ * @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
8659
+ */
7912
8660
  declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
7913
8661
 
7914
8662
  declare interface PluginContext {
@@ -9881,6 +10629,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
9881
10629
 
9882
10630
  declare type Pseudos = AdvancedPseudos | SimplePseudos;
9883
10631
 
10632
+ /**
10633
+ * @description QR code configuration for code form view
10634
+ */
10635
+ declare interface QrCodeConfig {
10636
+ /**
10637
+ * @description QR code render style, e.g. "rounded"
10638
+ */
10639
+ renderStyle?: string;
10640
+ /**
10641
+ * @description QR code center icon, can be URL or Base64 format
10642
+ */
10643
+ centerIcon?: string;
10644
+ /**
10645
+ * @description QR code corner icon, can be URL or Base64 format
10646
+ */
10647
+ cornerIcon?: string;
10648
+ }
10649
+
9884
10650
  declare interface Rate {
9885
10651
  /**
9886
10652
  * @description rate label value
@@ -9950,13 +10716,31 @@ declare class ReceivePort {
9950
10716
  }): Promise<Record<string, any> | undefined>;
9951
10717
  }
9952
10718
 
10719
+ /**
10720
+ * @description 从webapp重定向到新URL的配置项。
10721
+ * 支持浏览器重定向、app link唤端及schema唤端。
10722
+ */
9953
10723
  declare interface RedirectOption {
10724
+ /**
10725
+ * @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
10726
+ */
9954
10727
  url: string;
10728
+ /**
10729
+ * @description 唤端到url地址,http或https的地址
10730
+ */
10731
+ appLinkUrl?: string;
10732
+ /**
10733
+ * @description 唤端到schema地址, schema://的地址
10734
+ */
10735
+ schemaUrl?: string;
10736
+ /**
10737
+ * @description 重定向模式,默认为redirect
10738
+ */
9955
10739
  mode?: 'redirect' | 'replace';
9956
10740
  /**
9957
10741
  * @description 是否重定向后销毁实例,默认为true
9958
10742
  */
9959
- destory?: boolean;
10743
+ destroy?: boolean;
9960
10744
  }
9961
10745
 
9962
10746
  declare type ReportData = {
@@ -10187,7 +10971,25 @@ declare interface SharePayInfo {
10187
10971
  securityText?: string;
10188
10972
  }
10189
10973
 
10190
- declare interface ShippingInfo {
10974
+ export declare interface ShippingInfo {
10975
+ shippingName: {
10976
+ firstName: string;
10977
+ lastName: string;
10978
+ middleName?: string;
10979
+ fullName?: string;
10980
+ };
10981
+ shippingPhoneNo: string;
10982
+ shippingAddress: {
10983
+ region: string;
10984
+ address1: string;
10985
+ address2: string;
10986
+ city?: string;
10987
+ state?: string;
10988
+ zipCode: string;
10989
+ };
10990
+ }
10991
+
10992
+ declare interface ShippingInfo_2 {
10191
10993
  /**
10192
10994
  * @description The unique ID to identify the shipping info
10193
10995
  */
@@ -24105,14 +24907,14 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
24105
24907
 
24106
24908
  declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
24107
24909
 
24910
+ export declare type SubmitParams = {
24911
+ redirect?: 'always' | 'if_required';
24912
+ };
24913
+
24108
24914
  /**
24109
- * @description 成功时的data数据类型
24915
+ * @description 成功时的数据类型
24110
24916
  */
24111
24917
  export declare type SubmitResult = {
24112
- /**
24113
- * 查询到的状态
24114
- */
24115
- status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
24116
24918
  /**
24117
24919
  * 查询到的结果码或者错误码, 在SUCCESS无该字段
24118
24920
  * @deprecated 已废弃请读取error中的code
@@ -24125,6 +24927,10 @@ export declare type SubmitResult = {
24125
24927
  * @internal
24126
24928
  */
24127
24929
  message?: string;
24930
+ /**
24931
+ * 查询到的状态
24932
+ */
24933
+ status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
24128
24934
  /**
24129
24935
  * @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
24130
24936
  */
@@ -24137,6 +24943,10 @@ export declare type SubmitResult = {
24137
24943
  * 查询到的结果消息
24138
24944
  */
24139
24945
  message?: string;
24946
+ /**
24947
+ * @description 是否需要更换 session 重试
24948
+ */
24949
+ needChangeSessionForRetry?: boolean;
24140
24950
  };
24141
24951
  /**
24142
24952
  * 是否是用户手动取消3D
@@ -24595,6 +25405,16 @@ declare interface TerminalTypeAction {
24595
25405
  interactionType?: string;
24596
25406
  }
24597
25407
 
25408
+ /**
25409
+ * 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
25410
+ * 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
25411
+ * 确保两条路径的弹窗 loading 表现一致。
25412
+ */
25413
+ export declare const themeColorMap: Record<AntomTheme, {
25414
+ theme: 'dark' | 'light';
25415
+ backgroundColor: string;
25416
+ }>;
25417
+
24598
25418
  declare class Tracker {
24599
25419
  protected requesterCacheWrapper?: RequesterCacheWrapper;
24600
25420
  private initPromise;
@@ -24939,7 +25759,8 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
24939
25759
  export declare type VaultingAppearanceProps = {
24940
25760
  displaySetting: 'showCardBrandIcon';
24941
25761
  theme: AntomTheme;
24942
- 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';
25762
+ variables: AntomVariables;
25763
+ fonts?: FontSource[];
24943
25764
  };
24944
25765
 
24945
25766
  /**
@@ -24968,7 +25789,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
24968
25789
  declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
24969
25790
  }
24970
25791
 
24971
- export declare interface VaultingElementEvents extends AntomBridgeEventMap<VaultingAppConfig, VaultingSubmitParams> {
25792
+ export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
24972
25793
  }
24973
25794
 
24974
25795
  /**