@alipay/ams-checkout 0.0.1779094014-dev.2 → 0.0.1779094014-dev.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/ams-checkout.js +3 -3
  2. package/dist/ams-checkout.min.js +1 -1
  3. package/dist/ams-checkout.min.js.map +1 -1
  4. package/esm/component/popupWindow.style.js +2 -1
  5. package/esm/config/index.d.ts +7 -0
  6. package/esm/config/index.js +2 -2
  7. package/esm/constant/index.d.ts +1 -0
  8. package/esm/constant/index.js +1 -0
  9. package/esm/core/component/element/elementContainerService/containerService.js +3 -2
  10. package/esm/core/component/element/elementProcessor/paymentProcessor.js +42 -4
  11. package/esm/core/component/element/index.d.ts +3 -0
  12. package/esm/core/component/element/index.js +13 -8
  13. package/esm/core/component/element/modernElementController/adapter.d.ts +5 -5
  14. package/esm/core/component/element/modernElementController/adapter.js +23 -19
  15. package/esm/core/component/element/modernElementController/index.d.ts +43 -13
  16. package/esm/core/component/element/modernElementController/index.js +585 -263
  17. package/esm/core/component/element/type.d.ts +6 -18
  18. package/esm/foundation/service/container/utils.js +3 -1
  19. package/esm/modern/global.d.ts +3 -0
  20. package/esm/modern/index.d.ts +5 -1
  21. package/esm/modern/index.js +1 -51
  22. package/esm/modern/tools.js +1 -0
  23. package/esm/plugin/component/channel.d.ts +4 -1
  24. package/esm/plugin/component/channel.js +6 -2
  25. package/esm/plugin/component/index.js +7 -6
  26. package/esm/tsdoc-metadata.json +1 -1
  27. package/esm/types/index.d.ts +1 -0
  28. package/esm/util/logger.js +1 -2
  29. package/package.json +23 -10
  30. package/types.d.ts +896 -71
  31. package/types.untrimmed.d.ts +1203 -113
  32. package/esm/modern/oneapi/iexpfront/PaymentSessionService.d.ts +0 -23
  33. package/esm/modern/oneapi/iexpfront/PaymentSessionService.js +0 -55
  34. package/esm/modern/oneapi/iexpfront/definitions.d.ts +0 -3656
  35. package/esm/modern/oneapi/iexpfront/definitions.js +0 -1
  36. package/esm/modern/tools/AntomSDKError.d.ts +0 -47
  37. package/esm/modern/tools/AntomSDKError.js +0 -47
  38. package/esm/modern/tools/buildPageUrl.d.ts +0 -4
  39. package/esm/modern/tools/buildPageUrl.js +0 -19
  40. package/esm/modern/tools/getDevReqConfig.d.ts +0 -2
  41. package/esm/modern/tools/getDevReqConfig.js +0 -16
  42. package/esm/modern/tools/getLocaleFromRenderData.d.ts +0 -6
  43. package/esm/modern/tools/getLocaleFromRenderData.js +0 -20
  44. package/esm/modern/tools/getMetaData.d.ts +0 -102
  45. package/esm/modern/tools/getMetaData.js +0 -7
  46. package/esm/modern/tools/openModal.d.ts +0 -20
  47. package/esm/modern/tools/openModal.js +0 -221
package/types.d.ts CHANGED
@@ -143,12 +143,63 @@ 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
147
  }
148
148
 
149
- /* Excluded from this release type: AntomMiddlePageEventMap */
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 */
166
+ }
167
+
168
+ /**
169
+ * @description Antom的错误基类,直接使用则无错误码校验。
170
+ */
171
+ declare class AntomError<T extends string = string> extends OpenSDKError<T> {
172
+ name: string;
173
+ response?: AntomErrorResponse;
174
+ static isError(error: unknown): error is AntomError;
175
+ /**
176
+ * @description 统一转换error为AntomError
177
+ */
178
+ static unificationError(error: unknown, source?: ErrorSource): AntomError;
179
+ }
180
+
181
+ /**
182
+ * @description success为false的response
183
+ */
184
+ declare interface AntomErrorResponse {
185
+ traceId?: string;
186
+ errorMessage?: string;
187
+ errorCode?: string;
188
+ resultMessage?: string;
189
+ errorContext?: {
190
+ errorStack?: {
191
+ errorName?: string;
192
+ errorMessage?: string;
193
+ }[];
194
+ };
195
+ success?: false;
196
+ errorStatus?: 'F' | 'U';
197
+ extendInfo?: Record<string, any>;
198
+ }
150
199
 
151
- /* Excluded from this release type: AntomModalEventMap */
200
+ export declare type AntomLayouts = 'tabs' | 'accordion';
201
+
202
+ /* Excluded from this release type: AntomMiddlePageEventMap */
152
203
 
153
204
  /* Excluded from this release type: AntomOpenModalConfig */
154
205
 
@@ -165,9 +216,11 @@ export declare class AntomSDK extends BaseElementsFactory {
165
216
  updateConfig(config: Partial<BaseFactoryConfig>): void;
166
217
  /* Excluded from this release type: openModal */
167
218
  elements(): Elements;
219
+ createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
168
220
  createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
169
221
  createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
170
222
  createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
223
+ getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
171
224
  getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
172
225
  getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
173
226
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
@@ -176,18 +229,8 @@ export declare class AntomSDK extends BaseElementsFactory {
176
229
  * @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
177
230
  */
178
231
  private extractMainElement;
179
- confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult | {
180
- code: string;
181
- message: string;
182
- status: string;
183
- userCancel3D: boolean;
184
- }>;
185
- confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult | {
186
- code: string;
187
- message: string;
188
- userCancel3D: boolean;
189
- status: string;
190
- }>;
232
+ confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult>;
233
+ confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
191
234
  }
192
235
 
193
236
  /**
@@ -197,7 +240,93 @@ export declare interface AntomSDKConfig extends Omit<BaseFactoryConfig, 'version
197
240
  version?: string;
198
241
  }
199
242
 
200
- export declare type AntomTheme = "default" | "agateGreen" | "night" | "nostalgicGray" | "gamingPurple" | "cherryBlossomPink" | "light";
243
+ export declare class AntomSDKError extends AntomError<AntomSDKErrorCodes> {
244
+ name: string;
245
+ }
246
+
247
+ export declare const AntomSDKErrorCodes: {
248
+ /**
249
+ * @description 找不到主元素
250
+ */
251
+ readonly NOT_FIND_MAINELEMENT: "NOT_FIND_MAINELEMENT";
252
+ /**
253
+ * @description sessionData无效
254
+ */
255
+ readonly SESSION_DATA_INVALID: "SESSION_DATA_INVALID";
256
+ /**
257
+ * @description WebApp 初始化超时
258
+ */
259
+ readonly SDK_LAUNCH_PAYMENT_APP_ERROR: "SDK_LAUNCH_PAYMENT_APP_ERROR";
260
+ /**
261
+ * @description 参数非法,缺少必填参数或参数值不合法
262
+ */
263
+ readonly PARAM_INVALID: "PARAM_INVALID";
264
+ /**
265
+ * @description channelClientId 查询接口超时
266
+ */
267
+ readonly CHANNEL_CLIENT_ID_QUERY_TIMEOUT: "CHANNEL_CLIENT_ID_QUERY_TIMEOUT";
268
+ /**
269
+ * @description channelClientId 查询返回 success=true 但缺少 channelClientId
270
+ */
271
+ readonly CHANNEL_CLIENT_ID_MISSING: "CHANNEL_CLIENT_ID_MISSING";
272
+ /**
273
+ * @description channelClientId 查询失败(success=false 或其他异常)
274
+ */
275
+ readonly CHANNEL_CLIENT_ID_QUERY_FAILED: "CHANNEL_CLIENT_ID_QUERY_FAILED";
276
+ /**
277
+ * @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
278
+ */
279
+ readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
280
+ /**
281
+ * @description checkout 页面未加载成功,不允许 updateConfig
282
+ */
283
+ readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
284
+ /**
285
+ * @description 支付进行中,不允许更新金额
286
+ */
287
+ readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
288
+ /**
289
+ * @description 金额不能为空
290
+ */
291
+ readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
292
+ /**
293
+ * @description 金额格式非法(仅允许整数和小数)
294
+ */
295
+ readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
296
+ readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
297
+ readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
298
+ readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
299
+ readonly MOUNT_MISSING_CONTAINER: "MOUNT_MISSING_CONTAINER";
300
+ readonly MOUNT_IFRAME_LOAD_ERROR: "MOUNT_IFRAME_LOAD_ERROR";
301
+ readonly MOUNT_NOT_MAINELEMENT_WITH_SINGLE_MODE: "MOUNT_NOT_MAINELEMENT_WITH_SINGLE_MODE";
302
+ readonly MOUNT_NOT_SUPPORT: "MOUNT_NOT_SUPPORT";
303
+ readonly MOUNT_INITIAL_FAILED: "MOUNT_INITIAL_FAILED";
304
+ readonly ELEMENT_INSTANCE_DESTROYED: "ELEMENT_INSTANCE_DESTROYED";
305
+ readonly ELEMENT_DEFINE_ERROR: "ELEMENT_DEFINE_ERROR";
306
+ readonly ELEMENT_ALREADY_REGISTERED: "ELEMENT_ALREADY_REGISTERED";
307
+ readonly CANNOT_CREATE_SAME_ELEMENT_TWICE: "CANNOT_CREATE_SAME_ELEMENT_TWICE";
308
+ readonly GROUPS_ONLY_ONE_MAIN_ELEMENT: "GROUPS_ONLY_ONE_MAIN_ELEMENT";
309
+ readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
310
+ readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
311
+ readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
312
+ readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
313
+ readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
314
+ readonly API_MISS_PARAMS: "API_MISS_PARAMS";
315
+ readonly API_GATEWAY_TIMEOUT: "API_GATEWAY_TIMEOUT";
316
+ readonly API_SYSTEM_ERROR: "API_SYSTEM_ERROR";
317
+ readonly API_TIMEOUT: "API_TIMEOUT";
318
+ readonly API_NOT_LOGIN: "API_NOT_LOGIN";
319
+ readonly API_GATEWAY_ERROR: "API_GATEWAY_ERROR";
320
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
321
+ readonly NO_PORTS_ERROR: "NO_PORTS_ERROR";
322
+ readonly INVALID_REDIRECT_URL: "INVALID_REDIRECT_URL";
323
+ };
324
+
325
+ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeof AntomSDKErrorCodes];
326
+
327
+ export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
328
+
329
+ 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';
201
330
 
202
331
  declare interface APICallbackOptions {
203
332
  requestType: 'fetch' | 'xhr';
@@ -213,6 +342,11 @@ declare interface APICallbackOptions {
213
342
  errorMsg?: string;
214
343
  }
215
344
 
345
+ /**
346
+ * @description SDK UI组件的外观配置。
347
+ * 控制主题、CSS变量、布局规则及显示设置。
348
+ * @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
349
+ */
216
350
  declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
217
351
  theme?: Props['theme'];
218
352
  variables?: PartialSpeKey<Props['variables'], string>;
@@ -531,7 +665,9 @@ declare class AxiosHeaders {
531
665
  ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
532
666
  ): AxiosHeaders;
533
667
 
534
- toJSON(asStrings?: boolean): RawAxiosHeaders;
668
+ toJSON(asStrings: true): Record<string, string>;
669
+ toJSON(asStrings?: false): Record<string, string | string[]>;
670
+ toJSON(asStrings?: boolean): Record<string, string | string[]>;
535
671
 
536
672
  static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
537
673
 
@@ -617,6 +753,7 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
617
753
  /* Excluded from this release type: "OPENSDK@HANDSHAKE" */
618
754
  /* Excluded from this release type: "OPENSDK@READY_HANDSHAKE" */
619
755
  /* Excluded from this release type: "OPENSDK@UPDATE_CONFIG" */
756
+ /* Excluded from this release type: "OPENSDK@UPDATE_CONFIG_REPLY" */
620
757
  /* Excluded from this release type: "OPENSDK@HANDSHAKE_ACK" */
621
758
  /* Excluded from this release type: "OPENSDK@SUBMIT" */
622
759
  /* Excluded from this release type: "OPENSDK@SUBMIT_REPLY" */
@@ -626,12 +763,14 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
626
763
  /* Excluded from this release type: "OPENSDK@REDIRECT" */
627
764
  /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_PORT" */
628
765
  /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_APPEARANCE" */
766
+ /* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_INITIALDATA" */
629
767
  /* Excluded from this release type: "OPENSDK@TRANSFER_APP_PORT" */
630
768
  /* Excluded from this release type: "OPENSDK@ERROR" */
631
769
  /* Excluded from this release type: "OPENSDK@TRANSFER_RECEIVE_PORT" */
632
770
  /* Excluded from this release type: "OPENSDK@TRANSFER_SEND_PORT" */
633
771
  /* Excluded from this release type: "OPENSDK@MESSAGE" */
634
772
  /* Excluded from this release type: "OPENSDK@HEIGHT_UPDATE" */
773
+ /* Excluded from this release type: "OPENSDK@DESTORY_ELEMENT" */
635
774
  }
636
775
 
637
776
  declare interface BaseConfig {
@@ -672,15 +811,15 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
672
811
  /* Excluded from this release type: submit */
673
812
  /* Excluded from this release type: setup */
674
813
  /**
675
- * @param {string | HTMLElement} containerId 如果给字符串id不要带#号
814
+ * @param {HTMLElement} container
676
815
  */
677
- mount(containerId: HTMLElement): Promise<void>;
816
+ mount(container: HTMLElement): Promise<void>;
678
817
  /* Excluded from this release type: _mount */
679
818
  /**
680
819
  * 更新webapp配置
681
820
  * @param {Partial<BaseElementAppConfig>} newConfig
682
821
  */
683
- updateConfig(newConfig: Partial<Config['appConfig']>): void;
822
+ updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
684
823
  /**
685
824
  * 卸载元素
686
825
  */
@@ -713,13 +852,13 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
713
852
  }
714
853
 
715
854
  declare interface BaseElementAppConfig {
716
- locale?: string;
855
+ /* Excluded from this release type: locale */
717
856
  /* Excluded from this release type: env */
718
857
  /* Excluded from this release type: merchantId */
719
858
  [key: string]: any;
720
859
  }
721
860
 
722
- declare interface BaseElementConfig<T extends BaseElementAppConfig = Record<string, any>> extends BaseConfig {
861
+ declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
723
862
  appConfig: T;
724
863
  elementMode: ElementMode;
725
864
  }
@@ -770,6 +909,7 @@ declare abstract class BaseFactory {
770
909
  */
771
910
  constructor(config: BaseFactoryConfig);
772
911
  protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
912
+ protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
773
913
  /* Excluded from this release type: canUseElements */
774
914
  /**
775
915
  * @description 无需手动调用
@@ -801,6 +941,7 @@ declare abstract class BaseFactory {
801
941
  /* Excluded from this release type: _createElement */
802
942
  /* Excluded from this release type: _addElement */
803
943
  /* Excluded from this release type: _removeElement */
944
+ /* Excluded from this release type: _removeElementByKey */
804
945
  /* Excluded from this release type: _getElement */
805
946
  /* Excluded from this release type: _getElementSize */
806
947
  }
@@ -844,6 +985,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
844
985
  /* Excluded from this release type: _submit */
845
986
  }
846
987
 
988
+ /**
989
+ * @description 打开模态框的配置项。
990
+ * 包含显示选项、关闭行为、外观设置及初始化数据。
991
+ */
847
992
  declare interface BaseOpenModalConfig {
848
993
  /**
849
994
  * 无需手动传递,app的唯一scope
@@ -867,10 +1012,21 @@ declare interface BaseOpenModalConfig {
867
1012
  onClose?: () => void;
868
1013
  url: string;
869
1014
  /**
870
- * 关闭时,是否需要app页面二次确认,默认为false,即直接关闭
1015
+ * @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
871
1016
  */
872
1017
  closeConfirm?: boolean;
1018
+ /**
1019
+ * @description 需要同步的外观配置
1020
+ */
873
1021
  appearance?: Appearance;
1022
+ /**
1023
+ * @description 需要传递的初始化数据
1024
+ */
1025
+ initialData?: Record<string, any>;
1026
+ /**
1027
+ * @description 无需手动传递, 模态框的唯一标识
1028
+ */
1029
+ modalId?: string;
874
1030
  }
875
1031
 
876
1032
  declare type BehaviorConfig = {
@@ -968,6 +1124,12 @@ declare interface C2PProps {
968
1124
  merchantTransactionId?: string;
969
1125
  }
970
1126
 
1127
+ /* Excluded from this release type: CallbackErrorInfo */
1128
+
1129
+ /* Excluded from this release type: CallbackReturnData */
1130
+
1131
+ /* Excluded from this release type: CallbackSessionNextAction */
1132
+
971
1133
  declare interface CardIssuerAuthentication {
972
1134
  /**
973
1135
  * @description 卡售卖单元
@@ -1385,7 +1547,7 @@ declare interface CashierSdkActionQueryResult {
1385
1547
  /**
1386
1548
  * @description 物流信息, 包含物流地址和物流费
1387
1549
  */
1388
- shippingInfo?: ShippingInfo;
1550
+ shippingInfo?: ShippingInfo_2;
1389
1551
  /**
1390
1552
  * @description 用户已绑资产信息
1391
1553
  */
@@ -1418,28 +1580,6 @@ declare interface ChargeInfo {
1418
1580
  chargeActualAmountView?: PaymentView;
1419
1581
  }
1420
1582
 
1421
- /** click 事件 resolve 参数 */
1422
- export declare interface ClickResolveOptions {
1423
- amount?: {
1424
- currency: string;
1425
- value: string;
1426
- };
1427
- shippingAddressRequired?: boolean;
1428
- allowedShippingCountries?: string[];
1429
- shippingRates?: Array<{
1430
- id: string;
1431
- displayName: string;
1432
- amount: string;
1433
- }>;
1434
- lineItems?: Array<{
1435
- name: string;
1436
- amount: string;
1437
- }>;
1438
- business?: {
1439
- name: string;
1440
- };
1441
- }
1442
-
1443
1583
  declare interface CodeFormView {
1444
1584
  /**
1445
1585
  * @description title
@@ -1465,6 +1605,11 @@ declare interface CodeFormView {
1465
1605
  * @description label
1466
1606
  */
1467
1607
  label?: string;
1608
+ /**
1609
+ * @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
1610
+ * when appLinkUrlForWeb is populated
1611
+ */
1612
+ paymentGuideInfo?: PaymentGuideInfo;
1468
1613
  /**
1469
1614
  * @description 提醒事项
1470
1615
  */
@@ -1481,6 +1626,10 @@ declare interface CodeFormView {
1481
1626
  * @description 码过期时间
1482
1627
  */
1483
1628
  codeExpireTime?: string;
1629
+ /**
1630
+ * @description QR code configuration including renderStyle, centerIcon and cornerIcon
1631
+ */
1632
+ qrcodeConfig?: QrCodeConfig;
1484
1633
  }
1485
1634
 
1486
1635
  /**
@@ -2185,7 +2334,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
2185
2334
 
2186
2335
  export declare type CVVAppearanceProps = {
2187
2336
  theme: AntomTheme;
2188
- 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';
2337
+ variables: AntomVariables;
2189
2338
  };
2190
2339
 
2191
2340
  /**
@@ -2989,7 +3138,7 @@ declare class Elements extends BaseElements {
2989
3138
  getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
2990
3139
  }
2991
3140
 
2992
- 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';
3141
+ 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';
2993
3142
 
2994
3143
  declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
2995
3144
 
@@ -3080,6 +3229,22 @@ declare interface ExpCardPlan {
3080
3229
  * @description 每个月分期利息
3081
3230
  */
3082
3231
  monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
3232
+ /**
3233
+ * @description 分期有效期开始时间
3234
+ */
3235
+ validStartTime?: string;
3236
+ /**
3237
+ * @description 分期有效期结束时间
3238
+ */
3239
+ validEndTime?: string;
3240
+ /**
3241
+ * @description 支持的银行信息
3242
+ *
3243
+ * 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
3244
+ * 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
3245
+ * 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
3246
+ */
3247
+ supportedBank?: ExpSupportIppBank;
3083
3248
  }
3084
3249
 
3085
3250
  declare interface ExpInstallmentInfo {
@@ -3109,7 +3274,16 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3109
3274
  sessionData?: string;
3110
3275
  /** Business division (country/region) */
3111
3276
  businessDivision?: string;
3112
- /** Amount & Currency */
3277
+ /**
3278
+ * Amount & Currency
3279
+ *
3280
+ * Only effective via `updateConfig({ amount })` at runtime.
3281
+ * Passing amount at creation time is ignored — the initial amount
3282
+ * comes from the server-side sdkQuery result (renderData.paymentAmount).
3283
+ *
3284
+ * `value` must be a positive integer string in **minor currency units** (ISO 4217).
3285
+ * Examples: USD $1.00 → "100", JPY ¥1 → "1", EUR €9.99 → "999"
3286
+ */
3113
3287
  amount?: {
3114
3288
  currency: string;
3115
3289
  value: string;
@@ -3157,19 +3331,44 @@ export declare interface ExpressCancelEvent {
3157
3331
  data?: any;
3158
3332
  }
3159
3333
 
3160
- /** click 事件负载 */
3334
+ /** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
3161
3335
  export declare interface ExpressClickEvent {
3162
3336
  expressPaymentType: string;
3163
- resolve: (options: ClickResolveOptions) => void;
3164
3337
  }
3165
3338
 
3166
3339
  /** confirm 事件负载(统一终态,替代 approve) */
3167
3340
  export declare interface ExpressConfirmData {
3168
3341
  expressPaymentType: string;
3169
- paymentData: any;
3170
- billingDetails?: any;
3171
- shippingAddress?: any;
3172
- sessionData?: string;
3342
+ billingDetails?: {
3343
+ name?: string;
3344
+ email?: string;
3345
+ phone?: string;
3346
+ address?: {
3347
+ line1?: string;
3348
+ line2?: string;
3349
+ city?: string;
3350
+ state?: string;
3351
+ postalCode?: string;
3352
+ country?: string;
3353
+ };
3354
+ };
3355
+ shippingAddress?: {
3356
+ name?: string;
3357
+ phone?: string;
3358
+ address?: {
3359
+ line1?: string;
3360
+ line2?: string;
3361
+ city?: string;
3362
+ state?: string;
3363
+ postalCode?: string;
3364
+ country?: string;
3365
+ };
3366
+ };
3367
+ /**
3368
+ * 商户主动拒绝本次支付(如库存不足、价格变动等)。
3369
+ * 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
3370
+ */
3371
+ paymentFailed: () => void;
3173
3372
  }
3174
3373
 
3175
3374
  /**
@@ -3182,7 +3381,38 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3182
3381
  * Store all function-type callbacks locally, not involved in postMessage serialization
3183
3382
  */
3184
3383
  private _callbacks;
3384
+ /** AP/GP 渲染数据(setup 阶段从 sdkQuery 拉取,host 端 Apple Pay handler 需要用) */
3385
+ private _renderData;
3386
+ private _hostSign;
3387
+ /** AlipayCN QR modal destroy function (from openModal utility) */
3388
+ private _alipayCnModalDestroy;
3389
+ /** AlipayCN 轮询定时器 */
3390
+ private _alipayCnPollingTimer;
3391
+ /** Guard flag: false after cancel/timeout so in-flight poll callbacks become no-ops */
3392
+ private _alipayCnPollingActive;
3393
+ /** 支付流程进行中标志(click → confirm/error/cancel 之间) */
3394
+ private _paymentInProgress;
3395
+ /** completePayment 传入的 redirect 参数,用于控制 submit 后是否跳转 */
3396
+ private _redirect;
3185
3397
  constructor(name: string, config: ExpressElementConfig);
3398
+ /**
3399
+ * 重写 on:对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
3400
+ */
3401
+ on(event: string, handler: (...args: any[]) => void): void;
3402
+ updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3403
+ /**
3404
+ * 商户在 confirm 回调内调用,触发实际支付提交。
3405
+ * iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
3406
+ * 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
3407
+ */
3408
+ completePayment(redirect?: 'always' | 'if_required'): Promise<{
3409
+ success: boolean;
3410
+ result?: any;
3411
+ error?: {
3412
+ code: string;
3413
+ message: string;
3414
+ };
3415
+ }>;
3186
3416
  setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3187
3417
  /**
3188
3418
  * Register internal event listeners (iframe communication)
@@ -3192,6 +3422,41 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3192
3422
  private _showOverlay;
3193
3423
  private _hideOverlay;
3194
3424
  private registerInternalListeners;
3425
+ /**
3426
+ * Open the AlipayCN QR modal via openModal() (host-document-level, not clipped by iframe).
3427
+ * The modal renders the alipaycn-code-view React page which uses the QrCodeOtc/CodeOrText component.
3428
+ * Polling stays here in the host; the modal is destroyed programmatically when a terminal status arrives.
3429
+ */
3430
+ private _handleAlipayCnQrcodeAtHost;
3431
+ private _closeAlipayCnModal;
3432
+ /**
3433
+ * 轮询 inquiryPaymentBySession,每 2s 一次,最多 150 次(5 分钟)
3434
+ * 支付到达终态后关闭 modal,通过 OPENSDK@ALIPAY_CN_RESULT 通知 iframe
3435
+ */
3436
+ private _startAlipayCnPolling;
3437
+ private _stopAlipayCnPolling;
3438
+ /**
3439
+ * host 端跑完整 Apple Pay 流程(对齐原版 ApplePayLaunchSpecificPaymentMethodHandler 内的 ApplePayService)
3440
+ * - 加载 apple-pay-sdk.js(注入到 host document)
3441
+ * - new ApplePaySession(version, request)
3442
+ * - onvalidatemerchant: 直接调 getApplePayPaymentSession(不走 bridge)
3443
+ * - onpaymentauthorized: 调 submitPayInfo 拿到下单结果 → completePayment(SUCCESS/FAILURE)
3444
+ * 并把结果通过 bridge 回包给 iframe(iframe 走 confirm 或 3DS)
3445
+ * - oncancel: 取消事件回包给 iframe
3446
+ */
3447
+ private _handleApplePayAtHost;
3448
+ /**
3449
+ * 从 sessionData 解析 recurringInfo,构造 Apple Pay recurringPaymentRequest。
3450
+ * 订阅数据只在 sessionData.paymentSessionFactor 里,renderData 不含此字段。
3451
+ * 非订阅场景返回 null。
3452
+ */
3453
+ private _buildRecurringPaymentRequest;
3454
+ /**
3455
+ * 3DS redirect 后在 host 侧轮询 inquiryPaymentBySession
3456
+ * 结果出来后通过 OPENSDK@APGP_3DS_RESULT 下发 iframe,iframe 再触发商户事件
3457
+ * 每 2s 轮询,最多 150 次(5 分钟)
3458
+ */
3459
+ private _startThreeDSPolling;
3195
3460
  protected focus(): void;
3196
3461
  protected blur(): void;
3197
3462
  protected clear(): void;
@@ -3253,12 +3518,26 @@ export declare interface ExpressElementEvents extends AntomBridgeEventMap<Expres
3253
3518
  resolve: (options: RateResolveOptions) => void;
3254
3519
  };
3255
3520
  /* Excluded from this release type: contentHeightChanged */
3256
- /* Excluded from this release type: "paypal:createOrder" */
3257
- /* Excluded from this release type: "paypal:createOrder:reply" */
3258
- /* Excluded from this release type: "paypal:onShippingAddressChange" */
3259
- /* Excluded from this release type: "paypal:onShippingAddressChange:reply" */
3260
- /* Excluded from this release type: "paypal:onShippingOptionsChange" */
3261
- /* Excluded from this release type: "paypal:onShippingOptionsChange:reply" */
3521
+ /* Excluded from this release type: "OPENSDK@CLICK" */
3522
+ /* Excluded from this release type: "OPENSDK@CLICK_RESOLVE" */
3523
+ /* Excluded from this release type: "OPENSDK@PAYPAL_CREATE_ORDER" */
3524
+ /* Excluded from this release type: "OPENSDK@PAYPAL_CREATE_ORDER_REPLY" */
3525
+ /* Excluded from this release type: "OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE" */
3526
+ /* Excluded from this release type: "OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY" */
3527
+ /* Excluded from this release type: "OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE" */
3528
+ /* Excluded from this release type: "OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY" */
3529
+ /* Excluded from this release type: "OPENSDK@APGP_SUBMIT" */
3530
+ /* Excluded from this release type: "OPENSDK@APGP_SUBMIT_REPLY" */
3531
+ /* Excluded from this release type: "OPENSDK@APGP_3DS_RESULT" */
3532
+ /* Excluded from this release type: "OPENSDK@APGP_3DS_REDIRECT" */
3533
+ /* Excluded from this release type: "OPENSDK@APPLE_PAY_VALIDATE_MERCHANT" */
3534
+ /* Excluded from this release type: "OPENSDK@APPLE_PAY_VALIDATE_MERCHANT_REPLY" */
3535
+ /* Excluded from this release type: "OPENSDK@GET_APPLE_PAY_TOKEN" */
3536
+ /* Excluded from this release type: "OPENSDK@GET_APPLE_PAY_TOKEN_REPLY" */
3537
+ /* Excluded from this release type: "OPENSDK@ALIPAY_CN_SUBMIT" */
3538
+ /* Excluded from this release type: "OPENSDK@ALIPAY_CN_SHOW_CODE" */
3539
+ /* Excluded from this release type: "OPENSDK@ALIPAY_CN_RESULT" */
3540
+ /* Excluded from this release type: "OPENSDK@UPDATE_CONFIG_REPLY" */
3262
3541
  }
3263
3542
 
3264
3543
  declare interface ExpSupportBank {
@@ -3283,6 +3562,24 @@ declare interface ExpSupportCardBrand {
3283
3562
  logo?: Logo;
3284
3563
  }
3285
3564
 
3565
+ /**
3566
+ * @description 支持的分期银行信息
3567
+ */
3568
+ declare interface ExpSupportIppBank {
3569
+ /**
3570
+ * @description bank short name or bank code
3571
+ */
3572
+ bankShortName?: string;
3573
+ /**
3574
+ * @description logo
3575
+ */
3576
+ logo?: Logo;
3577
+ /**
3578
+ * @description bins
3579
+ */
3580
+ bins?: string[];
3581
+ }
3582
+
3286
3583
  declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
3287
3584
 
3288
3585
  declare interface FirstPhaseSubscriptionDetail {
@@ -3300,6 +3597,42 @@ declare interface FirstPhaseSubscriptionDetail {
3300
3597
  promotionDetails?: PromotionDetail[];
3301
3598
  }
3302
3599
 
3600
+ declare interface FrontModulesToBeLoadedInterface {
3601
+ acquirerName: string;
3602
+ scriptUrl: string;
3603
+ }
3604
+
3605
+ /**
3606
+ * @description 分期银行展示模型
3607
+ */
3608
+ declare interface FrontSupportIppBank {
3609
+ /**
3610
+ * @description bank short name or bank code
3611
+ */
3612
+ bankShortName?: string;
3613
+ /**
3614
+ * @description logo
3615
+ */
3616
+ logo?: Logo;
3617
+ }
3618
+
3619
+ declare type GetI18nQueryParam = string | {
3620
+ /**
3621
+ * 多语言文案的 key
3622
+ */
3623
+ id: string;
3624
+ /**
3625
+ * 多语言文案的默认值
3626
+ */
3627
+ dm?: string;
3628
+ /**
3629
+ * 多语言文案的默认值,defaultMessage 和 dm 只需要一个就行
3630
+ * 推荐使用 dm
3631
+ * defaultMessage 是为了兼容中后台原来的开发习惯
3632
+ */
3633
+ defaultMessage?: string;
3634
+ };
3635
+
3303
3636
  declare function getMiniPerformance(): Promise<{
3304
3637
  performance: {
3305
3638
  appLaunch: number;
@@ -3334,6 +3667,12 @@ declare interface GetWhiteScreenInfoOptions {
3334
3667
  ignoreNotInViewport?: boolean;
3335
3668
  }
3336
3669
 
3670
+ declare type GlobalOptions = {
3671
+ i18n?: SimpleI18n;
3672
+ i18nPrefix: string;
3673
+ getDefaultMessage?: () => string;
3674
+ };
3675
+
3337
3676
  declare type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset";
3338
3677
 
3339
3678
  declare interface Goods {
@@ -3908,6 +4247,14 @@ declare interface HTTPErrorCallbackOptions {
3908
4247
  aborted?: 0 | 1;
3909
4248
  }
3910
4249
 
4250
+ declare interface IApplePayContactField {
4251
+ email: string;
4252
+ name: string;
4253
+ phone: string;
4254
+ postalAddress: string;
4255
+ phoneticName: string;
4256
+ }
4257
+
3911
4258
  declare interface iBaseElementClass {
3912
4259
  new (name: string, config: BaseElementConfig): BaseElement;
3913
4260
  elementType: string;
@@ -4075,6 +4422,100 @@ declare interface IOptions {
4075
4422
  stayTime?: number;
4076
4423
  }
4077
4424
 
4425
+ declare interface IPaymentSessionMetaData {
4426
+ clientId?: string;
4427
+ renderDisplayType?: string;
4428
+ paymentSessionConfig?: PaymentSessionConfig;
4429
+ securityConfig?: SessionSecurityConfig;
4430
+ moneyView?: any;
4431
+ extendInfo?: string;
4432
+ paymentMethodInfoView?: any;
4433
+ paymentView?: any;
4434
+ modernWeb?: boolean;
4435
+ action?: PaymentSessionAction;
4436
+ /**
4437
+ * @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
4438
+ */
4439
+ flowSwitchTags?: string;
4440
+ authUrlInfo?: {
4441
+ appIdentifier?: string;
4442
+ applinkUrl?: string;
4443
+ normalUrl?: string;
4444
+ schemeUrl?: string;
4445
+ authUrl?: string;
4446
+ };
4447
+ paymentSessionFactor?: {
4448
+ externalRiskTimeout?: number;
4449
+ extendInfo?: {
4450
+ merchantCapabilities?: string[];
4451
+ supportedNetworks?: string[];
4452
+ requiredBillingContactFields: IApplePayContactField[];
4453
+ requiredShippingContactFields: IApplePayContactField[];
4454
+ };
4455
+ merchantInfo?: {
4456
+ registeredCountry?: string;
4457
+ partnerId?: string;
4458
+ merchantName?: string;
4459
+ };
4460
+ order?: {
4461
+ orderDescription: string;
4462
+ };
4463
+ paymentAmount?: {
4464
+ value?: string;
4465
+ currency?: string;
4466
+ };
4467
+ paymentMethodInfo?: {
4468
+ paymentMethodType?: string;
4469
+ };
4470
+ paymentMethodViewMetaData?: any;
4471
+ paymentRequestId?: string;
4472
+ supportedLanguages?: any;
4473
+ /**
4474
+ * 当前为苹果分期场景的信息
4475
+ */
4476
+ recurringInfo?: {
4477
+ /**
4478
+ * 代扣协议开始日期 不传为当前系统时间
4479
+ */
4480
+ startDate?: number;
4481
+ /**
4482
+ * 代扣协议结束日期 不传不限制结束时间
4483
+ */
4484
+ endDate?: number;
4485
+ /**
4486
+ * 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
4487
+ */
4488
+ intervalUnit?: string;
4489
+ /**
4490
+ * 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
4491
+ */
4492
+ intervalCount?: number;
4493
+ /**
4494
+ * 分期标题信息
4495
+ */
4496
+ title?: string;
4497
+ /**
4498
+ * 分期管理页面
4499
+ */
4500
+ managementURL?: string;
4501
+ /**
4502
+ * 苹果通知ipay MAPN信息变更的地址
4503
+ */
4504
+ tokenNotificationURL?: string;
4505
+ /**
4506
+ * 分期协议描述
4507
+ */
4508
+ agreementDescription?: string;
4509
+ };
4510
+ frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
4511
+ };
4512
+ connectFactor?: {
4513
+ enableConnect?: boolean;
4514
+ };
4515
+ skipRenderPaymentMethod?: boolean;
4516
+ needAccountConfirmPage?: boolean;
4517
+ }
4518
+
4078
4519
  declare interface ISystemInfo {
4079
4520
  readonly pixelRatio: number;
4080
4521
  readonly windowWidth: number;
@@ -6574,6 +7015,68 @@ declare interface OneAccountInfo {
6574
7015
  accountStatus?: string;
6575
7016
  }
6576
7017
 
7018
+ /**
7019
+ * @description one account 账户信息查询结果
7020
+ */
7021
+ declare interface OneAccountQueryResult {
7022
+ /**
7023
+ * @description 是否业务处理成功
7024
+ */
7025
+ success?: boolean;
7026
+ /**
7027
+ * @description 错误上下文
7028
+ */
7029
+ errorContext?: ErrorContext;
7030
+ /**
7031
+ * @description 返回结果码
7032
+ */
7033
+ resultCode?: string;
7034
+ /**
7035
+ * @description 返回结果信息
7036
+ */
7037
+ resultMessage?: string;
7038
+ /**
7039
+ * @description error actions
7040
+ */
7041
+ errorActions?: Record<string, string>;
7042
+ /**
7043
+ * @description error code
7044
+ */
7045
+ errorCode?: string;
7046
+ /**
7047
+ * @description error status
7048
+ */
7049
+ errorStatus?: string;
7050
+ /**
7051
+ * @description error message
7052
+ */
7053
+ errorMessage?: string;
7054
+ /**
7055
+ * @description extend info
7056
+ */
7057
+ extendInfo?: Record<string, string>;
7058
+ /**
7059
+ * @description one account 账户信息
7060
+ */
7061
+ accountInfo?: OneAccountInfo;
7062
+ /**
7063
+ * @description action form 下一步动作
7064
+ */
7065
+ actionForm?: OtpChallengeActionForm;
7066
+ /**
7067
+ * @description 支付方式列表
7068
+ */
7069
+ paymentMethods?: PaymentMethodView[];
7070
+ /**
7071
+ * @description 物流信息
7072
+ */
7073
+ shippings?: ShippingInfo_2[];
7074
+ /**
7075
+ * @description 支付金额 (订单金额 + 物流费)
7076
+ */
7077
+ paymentAmount?: MobileMoneyView;
7078
+ }
7079
+
6577
7080
  /**
6578
7081
  * @description OpenModal的返回值类型
6579
7082
  */
@@ -6592,6 +7095,46 @@ declare interface OpenModalParams extends BaseOpenModalConfig {
6592
7095
  textDirection?: 'ltr' | 'rtl';
6593
7096
  }
6594
7097
 
7098
+ declare class OpenSDKError<Code extends string = string> extends Error {
7099
+ code: Code | OpenSDKInternalErrorCodes;
7100
+ name: string;
7101
+ /* Excluded from this release type: _openSDKErrorFlag */
7102
+ source: ErrorSource;
7103
+ traceId?: string;
7104
+ /**
7105
+ * @description 用于存储原始错误信息的,给内部调试
7106
+ */
7107
+ reason: string;
7108
+ static isError(error: any): error is OpenSDKError;
7109
+ /**
7110
+ * @description 统一转换error为OpenSDKError
7111
+ */
7112
+ static unificationError(error: unknown, source?: ErrorSource): OpenSDKError;
7113
+ static initConfig(config: Partial<GlobalOptions>): void;
7114
+ constructor(_message: string | {
7115
+ message: string;
7116
+ params?: Record<string, any>;
7117
+ }, code: Code | OpenSDKInternalErrorCodes, source: ErrorSource, _traceId?: string, serverAPIWithoutI18n?: boolean);
7118
+ toJSON(): ErrorPayload<Code | OpenSDKInternalErrorCodes>;
7119
+ }
7120
+
7121
+ declare const OpenSDKInternalErrorCodes: {
7122
+ /**
7123
+ * @description 未知错误
7124
+ */
7125
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
7126
+ /**
7127
+ * @description 无端口错误,通常发生在模态通信中,SDK期望接收一个MessagePort但未收到
7128
+ */
7129
+ readonly NO_PORTS_ERROR: "NO_PORTS_ERROR";
7130
+ /**
7131
+ * @description 非法的URL
7132
+ */
7133
+ readonly INVALID_REDIRECT_URL: "INVALID_REDIRECT_URL";
7134
+ };
7135
+
7136
+ declare type OpenSDKInternalErrorCodes = (typeof OpenSDKInternalErrorCodes)[keyof typeof OpenSDKInternalErrorCodes];
7137
+
6595
7138
  declare class OpenSDKTracker {
6596
7139
  private options?;
6597
7140
  private tracker?;
@@ -6737,6 +7280,56 @@ declare interface OSInfo {
6737
7280
  osVer?: string;
6738
7281
  }
6739
7282
 
7283
+ declare interface OtpChallengeActionForm {
7284
+ /**
7285
+ * @description action form type
7286
+ */
7287
+ actionFormType?: string;
7288
+ /**
7289
+ * @description type of challenge
7290
+ */
7291
+ challengeType?: string;
7292
+ /**
7293
+ * @description The actual render value
7294
+ */
7295
+ challengeRenderValue?: string;
7296
+ /**
7297
+ * @description Describe the challenge is required by AAC or external party
7298
+ */
7299
+ triggerSource?: string;
7300
+ /**
7301
+ * @description is support retry challenge
7302
+ * @default true
7303
+ */
7304
+ isChallengeRetrySupported?: boolean;
7305
+ /**
7306
+ * @description is fist otp auto triggered
7307
+ * @default false
7308
+ */
7309
+ isChallengeAutoTriggered?: boolean;
7310
+ /**
7311
+ * @description estimated challenge response duration
7312
+ * @default 0
7313
+ */
7314
+ estimatedDuration?: number;
7315
+ /**
7316
+ * @description url - like h5 sdk challenge need to call back url
7317
+ */
7318
+ challengeUrl?: string;
7319
+ /**
7320
+ * @description extend information
7321
+ */
7322
+ extendInfo?: string;
7323
+ /**
7324
+ * @description verify Id
7325
+ */
7326
+ verifyId?: string;
7327
+ /**
7328
+ * @description 重发次数
7329
+ */
7330
+ resendLeftTimes?: number;
7331
+ }
7332
+
6740
7333
  declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
6741
7334
 
6742
7335
  declare interface PayByLinkInfo {
@@ -6758,6 +7351,66 @@ declare interface PayByLinkInfo {
6758
7351
  linkVersion?: number;
6759
7352
  }
6760
7353
 
7354
+ /**
7355
+ * @description Payment element app config type
7356
+ */
7357
+ export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
7358
+ /**
7359
+ * @description sessionData,无法通过updateConfig更新
7360
+ */
7361
+ sessionData?: string;
7362
+ /* Excluded from this release type: merchantDomain */
7363
+ /* Excluded from this release type: renderData */
7364
+ /* Excluded from this release type: connectAccount */
7365
+ /* Excluded from this release type: sessionMetaData */
7366
+ /* Excluded from this release type: renderDataError */
7367
+ /* Excluded from this release type: sdkVersion */
7368
+ /* Excluded from this release type: _requestConfig */
7369
+ /* Excluded from this release type: logMetaData */
7370
+ /* Excluded from this release type: heightOfVisible */
7371
+ }
7372
+
7373
+ /**
7374
+ * @description Payment element appearance type
7375
+ */
7376
+ export declare type PaymentAppearance = PickAppearance<{
7377
+ displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
7378
+ theme: AntomTheme;
7379
+ variables: AntomVariables;
7380
+ layout: AntomLayouts;
7381
+ }>;
7382
+
7383
+ /**
7384
+ * @description Payment element
7385
+ */
7386
+ export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
7387
+ static elementType: string;
7388
+ private _submitting;
7389
+ constructor(name: string, config: PaymentElementConfig);
7390
+ /* Excluded from this release type: setup */
7391
+ /**
7392
+ * 更新 webapp 配置,对 amount 字段增加校验。
7393
+ * 其他字段透传基类 updateConfig 不做额外拦截。
7394
+ */
7395
+ updateConfig(newConfig: Partial<PaymentAppConfig>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
7396
+ /* Excluded from this release type: submit */
7397
+ protected focus(): void;
7398
+ protected blur(): void;
7399
+ protected clear(): void;
7400
+ }
7401
+
7402
+ /**
7403
+ * @description Payment element config type
7404
+ */
7405
+ declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
7406
+ }
7407
+
7408
+ /**
7409
+ * @description Payment element events
7410
+ */
7411
+ export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
7412
+ }
7413
+
6761
7414
  declare interface PaymentElementView {
6762
7415
  /**
6763
7416
  * @description payment element key
@@ -6859,6 +7512,36 @@ declare interface PaymentEvaluationResult {
6859
7512
  paymentBalanceInfo?: DanaSofPayMethodView[];
6860
7513
  }
6861
7514
 
7515
+ /**
7516
+ * @description Payment guidance information (CKP scenario)
7517
+ *
7518
+ * <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
7519
+ * bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
7520
+ * via Map, dynamically addable)
7521
+ */
7522
+ declare interface PaymentGuideInfo {
7523
+ /**
7524
+ * @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
7525
+ * payment guide button when this field is populated
7526
+ */
7527
+ appLinkUrlForWeb?: string;
7528
+ /**
7529
+ * @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
7530
+ * text fields
7531
+ *
7532
+ * <p>Example configuration:
7533
+ *
7534
+ * <pre>
7535
+ * {
7536
+ * "dividerText": "or pay using",
7537
+ * "directPayButtonText": "Pay directly with online banking",
7538
+ * "ctoPButtonText": "Continue to payment"
7539
+ * }
7540
+ * </pre>
7541
+ */
7542
+ copyWriting?: Record<string, any>;
7543
+ }
7544
+
6862
7545
  /**
6863
7546
  * @description 支付方式余额检查结果信息
6864
7547
  */
@@ -6921,6 +7604,10 @@ declare interface PaymentMethodView {
6921
7604
  * @description icon
6922
7605
  */
6923
7606
  icon?: string;
7607
+ /**
7608
+ * @description adaptive icon for PAYME payment method
7609
+ */
7610
+ adaptiveIcon?: string;
6924
7611
  /**
6925
7612
  * @description icon对应的名称
6926
7613
  */
@@ -6929,6 +7616,10 @@ declare interface PaymentMethodView {
6929
7616
  * @description 支付方式描述
6930
7617
  */
6931
7618
  description?: string;
7619
+ /**
7620
+ * @description 支付方式点击后的描述
7621
+ */
7622
+ descriptionAfterClick?: string;
6932
7623
  /**
6933
7624
  * @description category
6934
7625
  */
@@ -7063,6 +7754,10 @@ declare interface PaymentMethodView {
7063
7754
  * @description 账单地址收集模式
7064
7755
  */
7065
7756
  billingAddressCollectionMode?: string;
7757
+ /**
7758
+ * @description 分期银行信息列表
7759
+ */
7760
+ supportIppBankList?: FrontSupportIppBank[];
7066
7761
  }
7067
7762
 
7068
7763
  declare interface PaymentOption {
@@ -7130,6 +7825,10 @@ declare interface PaymentOption {
7130
7825
  * @description 支付选项Logo信息
7131
7826
  */
7132
7827
  logo?: Logo;
7828
+ /**
7829
+ * @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
7830
+ */
7831
+ description?: Record<string, string>;
7133
7832
  /**
7134
7833
  * @description extendInfo extendInfo information
7135
7834
  */
@@ -7197,6 +7896,13 @@ declare interface PaymentQuoteInfo {
7197
7896
  * @description payment amount view
7198
7897
  */
7199
7898
  paymentAmountView?: PaymentView;
7899
+ /**
7900
+ * @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
7901
+ * places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
7902
+ * price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
7903
+ * MYR/SGD currency pair
7904
+ */
7905
+ quotePrice?: any;
7200
7906
  }
7201
7907
 
7202
7908
  /**
@@ -7306,6 +8012,41 @@ declare interface PaymentSessionConfig {
7306
8012
  productSceneVersion?: string;
7307
8013
  }
7308
8014
 
8015
+ /**
8016
+ * @description The submit params
8017
+ */
8018
+ export declare interface PaymentSubmitParams extends SubmitParams {
8019
+ /**
8020
+ * @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
8021
+ * 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
8022
+ */
8023
+ handleActions?: boolean;
8024
+ /**
8025
+ * @description 收件地址信息
8026
+ */
8027
+ shippingInfo?: ShippingInfo;
8028
+ }
8029
+
8030
+ /**
8031
+ * @description Payment element submit result
8032
+ */
8033
+ export declare interface PaymentSubmitResult extends SubmitResult {
8034
+ paymentSession?: {
8035
+ /**
8036
+ * @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
8037
+ */
8038
+ returnUrl: string;
8039
+ /**
8040
+ * @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
8041
+ */
8042
+ returnAppUrl?: string;
8043
+ /**
8044
+ * @description 回调页面唤起app的scheme链接,比如 alipay://xxx
8045
+ */
8046
+ returnAppScheme?: string;
8047
+ };
8048
+ }
8049
+
7309
8050
  declare interface PaymentView {
7310
8051
  /**
7311
8052
  * @description 金额,以元为单位的金额
@@ -7424,6 +8165,11 @@ declare interface PeriodRule {
7424
8165
  periodCount?: number;
7425
8166
  }
7426
8167
 
8168
+ /**
8169
+ * @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
8170
+ * 返回受 Props 中存在的键约束的部分外观对象。
8171
+ * @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
8172
+ */
7427
8173
  declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
7428
8174
 
7429
8175
  declare interface PluginContext {
@@ -9396,6 +10142,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
9396
10142
 
9397
10143
  declare type Pseudos = AdvancedPseudos | SimplePseudos;
9398
10144
 
10145
+ /**
10146
+ * @description QR code configuration for code form view
10147
+ */
10148
+ declare interface QrCodeConfig {
10149
+ /**
10150
+ * @description QR code render style, e.g. "rounded"
10151
+ */
10152
+ renderStyle?: string;
10153
+ /**
10154
+ * @description QR code center icon, can be URL or Base64 format
10155
+ */
10156
+ centerIcon?: string;
10157
+ /**
10158
+ * @description QR code corner icon, can be URL or Base64 format
10159
+ */
10160
+ cornerIcon?: string;
10161
+ }
10162
+
9399
10163
  declare interface Rate {
9400
10164
  /**
9401
10165
  * @description rate label value
@@ -9465,8 +10229,26 @@ declare class ReceivePort {
9465
10229
  }): Promise<Record<string, any> | undefined>;
9466
10230
  }
9467
10231
 
10232
+ /**
10233
+ * @description 从webapp重定向到新URL的配置项。
10234
+ * 支持浏览器重定向、app link唤端及schema唤端。
10235
+ */
9468
10236
  declare interface RedirectOption {
10237
+ /**
10238
+ * @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
10239
+ */
9469
10240
  url: string;
10241
+ /**
10242
+ * @description 唤端到url地址,http或https的地址
10243
+ */
10244
+ appLinkUrl?: string;
10245
+ /**
10246
+ * @description 唤端到schema地址, schema://的地址
10247
+ */
10248
+ schemaUrl?: string;
10249
+ /**
10250
+ * @description 重定向模式,默认为redirect
10251
+ */
9470
10252
  mode?: 'redirect' | 'replace';
9471
10253
  /**
9472
10254
  * @description 是否重定向后销毁实例,默认为true
@@ -9702,7 +10484,25 @@ declare interface SharePayInfo {
9702
10484
  securityText?: string;
9703
10485
  }
9704
10486
 
9705
- declare interface ShippingInfo {
10487
+ export declare interface ShippingInfo {
10488
+ shippingName: {
10489
+ firstName: string;
10490
+ lastName: string;
10491
+ middleName?: string;
10492
+ fullName?: string;
10493
+ };
10494
+ shippingPhoneNo: string;
10495
+ shippingAddress: {
10496
+ region: string;
10497
+ address1: string;
10498
+ address2: string;
10499
+ city?: string;
10500
+ state?: string;
10501
+ zipCode: string;
10502
+ };
10503
+ }
10504
+
10505
+ declare interface ShippingInfo_2 {
9706
10506
  /**
9707
10507
  * @description The unique ID to identify the shipping info
9708
10508
  */
@@ -9778,6 +10578,10 @@ export declare interface ShippingResolveOptions {
9778
10578
  }>;
9779
10579
  }
9780
10580
 
10581
+ declare type SimpleI18n = {
10582
+ get(id: GetI18nQueryParam, variable?: Record<string, any>, localeCode?: string): string;
10583
+ };
10584
+
9781
10585
  declare type SimplePseudos =
9782
10586
  | ":-khtml-any-link"
9783
10587
  | ":-moz-any-link"
@@ -23616,22 +24420,33 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
23616
24420
 
23617
24421
  declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
23618
24422
 
24423
+ export declare type SubmitParams = {
24424
+ redirect?: 'always' | 'if_required';
24425
+ };
24426
+
23619
24427
  /**
23620
- * @description 成功时的data数据类型
24428
+ * @description 成功时的数据类型
23621
24429
  */
23622
24430
  export declare type SubmitResult = {
24431
+ /* Excluded from this release type: code */
24432
+ /* Excluded from this release type: message */
23623
24433
  /**
23624
24434
  * 查询到的状态
23625
24435
  */
23626
24436
  status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
23627
24437
  /**
23628
- * 查询到的结果码或者错误码, SUCCESS和CANCELLED无该字段
23629
- */
23630
- code?: string;
23631
- /**
23632
- * 查询到的结果消息, 在SUCCESS和CANCELLED无该字段
24438
+ * @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
23633
24439
  */
23634
- message?: string;
24440
+ error?: {
24441
+ /**
24442
+ * 查询到的结果码或者错误码
24443
+ */
24444
+ code?: string;
24445
+ /**
24446
+ * 查询到的结果消息
24447
+ */
24448
+ message?: string;
24449
+ };
23635
24450
  /**
23636
24451
  * 是否是用户手动取消3D
23637
24452
  */
@@ -24089,6 +24904,16 @@ declare interface TerminalTypeAction {
24089
24904
  interactionType?: string;
24090
24905
  }
24091
24906
 
24907
+ /**
24908
+ * 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
24909
+ * 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
24910
+ * 确保两条路径的弹窗 loading 表现一致。
24911
+ */
24912
+ export declare const themeColorMap: Record<AntomTheme, {
24913
+ theme: 'dark' | 'light';
24914
+ backgroundColor: string;
24915
+ }>;
24916
+
24092
24917
  declare class Tracker {
24093
24918
  protected requesterCacheWrapper?: RequesterCacheWrapper;
24094
24919
  private initPromise;
@@ -24418,7 +25243,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
24418
25243
  export declare type VaultingAppearanceProps = {
24419
25244
  displaySetting: 'showCardBrandIcon';
24420
25245
  theme: AntomTheme;
24421
- 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';
25246
+ variables: AntomVariables;
24422
25247
  };
24423
25248
 
24424
25249
  /**
@@ -24441,7 +25266,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
24441
25266
  declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
24442
25267
  }
24443
25268
 
24444
- export declare interface VaultingElementEvents extends AntomBridgeEventMap<VaultingAppConfig, VaultingSubmitParams> {
25269
+ export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
24445
25270
  }
24446
25271
 
24447
25272
  /**