@alipay/ams-checkout 2.0.25 → 2.0.27

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.
@@ -289,12 +289,14 @@ export declare interface AntomOpenModalConfig extends OpenModalParams {
289
289
  */
290
290
  export declare class AntomSDK extends BaseElementsFactory {
291
291
  static version: string;
292
+ private stopModalMessageMonitor;
292
293
  constructor(config?: AntomSDKConfig);
293
294
  protected canUseElements(): Array<ElementListItemType>;
294
295
  /**
295
296
  * @description 更新配置
296
297
  */
297
298
  updateConfig(config: Partial<BaseFactoryConfig>): void;
299
+ destroy(): void;
298
300
  /**
299
301
  * @internal
300
302
  * @param payload
@@ -404,9 +406,6 @@ export declare const AntomSDKErrorCodes: {
404
406
  readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
405
407
  readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
406
408
  readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
407
- /**
408
- * 查询到的结果消息
409
- */
410
409
  readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
411
410
  readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
412
411
  readonly API_MISS_PARAMS: "API_MISS_PARAMS";
@@ -424,28 +423,100 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
424
423
 
425
424
  export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
426
425
 
427
- 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
+ /**
427
+ * @deprecated Use {@link AppearanceVariables} (Token 2.0) instead.
428
+ * 保留仅为向后兼容,将在下一个 major 版本中删除。
429
+ */
430
+ export declare type AntomVariables = LegacyAppearanceVariables;
428
431
 
429
432
  /**
430
433
  * @description SDK UI组件的外观配置。
431
434
  * 控制主题、CSS变量、布局规则及显示设置。
432
435
  * @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
433
436
  */
434
- declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
437
+ declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps, Rules extends CSS_2.Properties<string, number> = CSS_2.Properties<string, number>> {
435
438
  theme?: Props['theme'];
436
439
  variables?: PartialSpeKey<Props['variables'], string>;
437
- rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
440
+ rules?: PartialSpeKey<Props['rules'], Rules>;
438
441
  displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
439
442
  layout?: Props['layout'];
440
443
  fonts?: FontSource[];
441
444
  }
442
445
 
443
- export declare type AppearanceSetting = {
444
- displaySetting: Record<'showCardBrandIcon', boolean>;
445
- theme: 'light' | 'dark';
446
- layout: 'accordion' | 'tabs';
446
+ /** Target-level layout declarations admitted before runtime capability intersection. */
447
+ export declare type AppearanceLayoutDeclarations = {
448
+ [Property in Exclude<AppearanceLayoutProperty, 'height'>]?: AppearanceSpacingValue;
449
+ } & {
450
+ /** Exact integer-pixel enum allocated by the target contract. */
451
+ readonly height?: `${number}px`;
447
452
  };
448
453
 
454
+ /** Controlled layout longhands intersected with the concrete Part at runtime. */
455
+ export declare type AppearanceLayoutProperty = 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'height';
456
+
457
+ /** Paint declarations accepted before WebApp and Components runtime validation. */
458
+ declare type AppearancePaintDeclarations = Partial<Record<Exclude<AppearancePaintProperty, 'fillOpacity' | 'strokeOpacity' | 'strokeWidth' | 'textDecorationStyle' | 'outlineStyle'>, string> & Record<'fillOpacity' | 'strokeOpacity' | 'strokeWidth', string | number> & {
459
+ textDecorationStyle: '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset' | 'dashed' | 'dotted' | 'double' | 'solid' | 'wavy';
460
+ outlineStyle: '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset' | 'auto' | 'dashed' | 'dotted' | 'double' | 'groove' | 'inset' | 'none' | 'outset' | 'ridge' | 'solid';
461
+ }>;
462
+
463
+ /** Paint-only property names exposed by the SDK contract. */
464
+ export declare type AppearancePaintProperty = 'color' | 'WebkitTextFillColor' | 'textDecorationColor' | 'textDecorationLine' | 'textDecorationStyle' | 'textShadow' | 'backgroundColor' | 'borderColor' | 'borderTopColor' | 'borderRightColor' | 'borderBottomColor' | 'borderLeftColor' | 'borderRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius' | 'borderStyle' | 'boxShadow' | 'fill' | 'stroke' | 'fillOpacity' | 'strokeOpacity' | 'strokeWidth' | 'outlineColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'caretColor' | 'accentColor';
465
+
466
+ /** Paint declarations plus controlled typography and target-level layout fields. */
467
+ declare type AppearanceRuleDeclarations = AppearancePaintDeclarations & AppearanceLayoutDeclarations & {
468
+ /** Single font family identifier admitted only for authorized targets at runtime. */
469
+ readonly fontFamily?: string;
470
+ /** Integer pixel size admitted only for authorized text targets at runtime. */
471
+ readonly fontSize?: `${number}px`;
472
+ /** Controlled font weight admitted only for authorized text targets at runtime. */
473
+ readonly fontWeight?: 400 | 500 | 600 | 700;
474
+ /** Controlled font style admitted only for authorized text targets at runtime. */
475
+ readonly fontStyle?: 'normal' | 'italic';
476
+ };
477
+
478
+ /** Controlled pseudo-class accepted by the merchant selector grammar. */
479
+ declare type AppearanceRulePseudoClass = 'autofill';
480
+
481
+ /** Controlled pseudo-element accepted by the merchant selector grammar. */
482
+ declare type AppearanceRulePseudoElement = 'placeholder' | 'selection';
483
+
484
+ /**
485
+ * Optional state or controlled pseudo suffix on one alias.
486
+ */
487
+ export declare type AppearanceRuleScopeSuffix = '' | `:${AppearanceRuleState | AppearanceRulePseudoClass}` | `::${AppearanceRulePseudoElement}`;
488
+
489
+ /** One merchant alias with an optional semantic suffix. */
490
+ export declare type AppearanceRuleSelector<RuleAlias extends string> = `${RuleAlias}${AppearanceRuleScopeSuffix}`;
491
+
492
+ /** Semantic states accepted by the merchant selector grammar. */
493
+ declare type AppearanceRuleState = 'hover' | 'focus' | 'focus-visible' | 'active' | 'disabled' | 'loading' | 'selected' | 'checked' | 'expanded' | 'invalid' | 'success' | 'error';
494
+
495
+ /** Backward-compatible name for the Express appearance configuration. */
496
+ export declare type AppearanceSetting = ExpressAppearance;
497
+
498
+ /** Exact official spacing Token accepted by controlled margin and padding. */
499
+ export declare type AppearanceSpacingToken = `var(--spacing-${'base' | 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'})`;
500
+
501
+ /** Runtime-constrained non-negative integer pixel value for spacing longhands. */
502
+ export declare type AppearanceSpacingValue = '0' | `${number}px` | AppearanceSpacingToken;
503
+
504
+ /**
505
+ * 对客公开 appearance variables 类型(Token 2.x,figma-v4「3 层 + 状态」命名)。
506
+ * 字段名为新 CSS 变量名去掉 '--' 前缀(如 color-text-primary)。
507
+ *
508
+ * 权威源:`antom-web-checkout-v2/packages/elements2/src/utils/themeConfig.ts` 的 `PUBLIC_TOKENS`
509
+ * (54 color + 4 radius + 10 spacing = 68 项)。本 union 是该清单的手工镜像,
510
+ * 增删 token 时必须两侧同步,否则商户会遇到「类型报错但运行时可用」的错位。
511
+ *
512
+ * 命名规则:`--color-<scene>-<level>[-<state>]`;brand 场景并入 scene 段的 camelCase
513
+ * (如 `color-backgroundBrand-primary-hover`),CSS 变量大小写敏感,不可改写为 kebab。
514
+ *
515
+ * @example
516
+ * variables: { 'color-text-primary': '#2a3a52', 'radius-sm': '4px' }
517
+ */
518
+ export declare type AppearanceVariables = 'color-background-primary' | 'color-background-primary-hover' | 'color-background-primary-active' | 'color-background-secondary' | 'color-background-secondary-hover' | 'color-background-secondary-active' | 'color-background-layout' | 'color-background-inverse' | 'color-background-disabled' | 'color-background-transparency' | 'color-background-mask' | 'color-background-success' | 'color-background-warning' | 'color-background-danger' | 'color-background-info' | 'color-background-neutral' | 'color-background-promotional' | 'color-backgroundBrand-primary' | 'color-backgroundBrand-primary-hover' | 'color-backgroundBrand-secondary' | 'color-backgroundBrand-secondary-hover' | 'color-backgroundBrand-tertiary' | 'color-backgroundBrand-disabled' | 'color-text-primary' | 'color-text-secondary' | 'color-text-tertiary' | 'color-text-inverse' | 'color-text-active' | 'color-text-disabled' | 'color-text-success' | 'color-text-warning' | 'color-text-danger' | 'color-text-info' | 'color-text-neutral' | 'color-text-promotional' | 'color-textBrand-primary' | 'color-textBrand-secondary' | 'color-textBrand-secondary-hover' | 'color-textBrand-disabled' | 'color-border-primary' | 'color-border-secondary' | 'color-border-inverse' | 'color-border-active' | 'color-border-subtle' | 'color-border-disabled' | 'color-border-success' | 'color-border-warning' | 'color-border-danger' | 'color-border-info' | 'color-border-neutral' | 'color-border-promotional' | 'color-borderBrand-primary' | 'color-borderBrand-primary-hover' | 'color-borderBrand-disabled' | 'radius-sm' | 'radius-md' | 'radius-lg' | 'radius-xl' | 'spacing-base' | 'spacing-none' | 'spacing-2xs' | 'spacing-xs' | 'spacing-sm' | 'spacing-md' | 'spacing-lg' | 'spacing-xl' | 'spacing-2xl' | 'spacing-3xl';
519
+
449
520
  declare interface AppleMerchantInfo {
450
521
  /**
451
522
  * @description Apple商户ID
@@ -834,10 +905,6 @@ declare interface BankInfo {
834
905
  hasSchemaUrl?: boolean;
835
906
  }
836
907
 
837
- declare interface BaseAppearance<A extends Partial<Appearance>> {
838
- appearance?: A;
839
- }
840
-
841
908
  /**
842
909
  * @description 内置基础的桥接事件映射类型
843
910
  */
@@ -2605,7 +2672,9 @@ declare interface CustomFontSource {
2605
2672
  * @public
2606
2673
  * @description CVV element app config type
2607
2674
  */
2608
- export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
2675
+ export declare interface CVVAppConfig extends BaseElementAppConfig {
2676
+ /** CVV appearance configuration including optional alias-only Rules. */
2677
+ appearance?: CVVAppearance;
2609
2678
  /**
2610
2679
  * @description sessionData
2611
2680
  */
@@ -2639,12 +2708,13 @@ export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, Bas
2639
2708
  paymentFlow?: 'automatic' | 'cvv';
2640
2709
  }
2641
2710
 
2642
- export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
2711
+ export declare type CVVAppearance = PickAntomAppearance<CVVAppearanceProps>;
2643
2712
 
2644
2713
  export declare type CVVAppearanceProps = {
2645
2714
  theme: AntomTheme;
2646
- variables: AntomVariables;
2715
+ variables: AppearanceVariables | AntomVariables;
2647
2716
  fonts?: FontSource[];
2717
+ rules: AppearanceRuleSelector<string>;
2648
2718
  };
2649
2719
 
2650
2720
  /**
@@ -2657,6 +2727,12 @@ export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVEle
2657
2727
  * @internal
2658
2728
  */
2659
2729
  setup(): Promise<Partial<CVVAppConfig> | undefined>;
2730
+ /**
2731
+ * Updates CVV configuration while preserving the public Rules clear semantics.
2732
+ * @param newConfig Partial CVV configuration patch.
2733
+ * @returns The WebApp update acknowledgement.
2734
+ */
2735
+ updateConfig(newConfig: Partial<CVVAppConfig>): Promise<CVVElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
2660
2736
  /**
2661
2737
  * @internal
2662
2738
  */
@@ -3544,11 +3620,11 @@ declare interface ExpPaymentOptionDetail {
3544
3620
  * @public
3545
3621
  * @description Express element app config type
3546
3622
  */
3547
- export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
3623
+ export declare interface ExpressAppConfig extends BaseElementAppConfig {
3624
+ /** Express appearance configuration. */
3625
+ appearance?: ExpressAppearance;
3548
3626
  /** payment SessionData */
3549
3627
  sessionData?: string;
3550
- /** Business division (country/region) */
3551
- businessDivision?: string;
3552
3628
  /**
3553
3629
  * Amount & Currency
3554
3630
  *
@@ -3611,6 +3687,17 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3611
3687
  doMain?: string;
3612
3688
  }
3613
3689
 
3690
+ /** Express element appearance configuration. */
3691
+ declare type ExpressAppearance = PickAntomAppearance<ExpressAppearanceProps>;
3692
+
3693
+ /** Express element appearance properties. */
3694
+ export declare type ExpressAppearanceProps = {
3695
+ displaySetting: 'showCardBrandIcon';
3696
+ theme: 'light' | 'dark';
3697
+ layout: 'accordion' | 'tabs';
3698
+ rules: AppearanceRuleSelector<string>;
3699
+ };
3700
+
3614
3701
  /** cancel 事件负载 */
3615
3702
  export declare interface ExpressCancelEvent {
3616
3703
  expressPaymentType: string;
@@ -3697,7 +3784,7 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3697
3784
  * 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
3698
3785
  */
3699
3786
  private _emit;
3700
- updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3787
+ updateConfig(newConfig: ExpressAppConfig): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3701
3788
  /**
3702
3789
  * 商户在 confirm 回调内调用,触发实际支付提交。
3703
3790
  * iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
@@ -3712,6 +3799,7 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3712
3799
  };
3713
3800
  /** 用户是否手动关闭 3D 弹窗(透传 webapp COMPLETE_PAYMENT_RESULT.userCanceled3D) */
3714
3801
  userCanceled3D?: boolean;
3802
+ status?: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
3715
3803
  }>;
3716
3804
  setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3717
3805
  private registerInternalListeners;
@@ -4746,6 +4834,58 @@ declare interface Language {
4746
4834
  country?: string;
4747
4835
  }
4748
4836
 
4837
+ /**
4838
+ * @deprecated Token 1.0 老字段类型 — 请迁移到 {@link AppearanceVariables}。
4839
+ * 所有字段均已废弃,运行时由 WebApp 侧 LEGACY_TO_NEW_TOKEN_MAP 翻译为新 token。
4840
+ *
4841
+ * @deprecated 'content-primary' → color-text-primary
4842
+ * @deprecated 'content-secondary' → color-text-secondary
4843
+ * @deprecated 'content-tertiary' → color-text-tertiary
4844
+ * @deprecated 'content-quaternary' → color-text-inverse
4845
+ * @deprecated 'background-primary' → color-background-primary
4846
+ * @deprecated 'background-secondary' → color-background-secondary
4847
+ * @deprecated 'background-disable' → color-background-disabled
4848
+ * @deprecated 'background-transparency' → color-background-transparency
4849
+ * @deprecated 'border-primary' → color-border-primary
4850
+ * @deprecated 'border-secondary' → color-border-secondary
4851
+ * @deprecated 'border-disable' → color-border-disabled
4852
+ * @deprecated 'border-active' → color-border-active
4853
+ * @deprecated 'action-normal' → 一对多 fan-out(无单值映射;运行时展开为 3 个新 token,老 key 不再注入):
4854
+ * - background/background-color → color-backgroundBrand-primary
4855
+ * - border/border-color/box-shadow → color-border-active
4856
+ * - color/文本/图标/勾选态 → color-text-active
4857
+ * @deprecated 'action-hover' → 一对多 fan-out(运行时展开为 2 个新 token,老 key 不再注入):
4858
+ * - background → color-backgroundBrand-primary-hover
4859
+ * - border → color-borderBrand-primary-hover
4860
+ * 文字色 color-textBrand-secondary-hover 不参与派生
4861
+ * (设计稿中与 bg/border 不同色阶),需要时请显式传入该新 token 键
4862
+ * @deprecated 'action-secondary' → color-backgroundBrand-secondary
4863
+ * @deprecated 'action-disable' → 一对多 fan-out(运行时展开为 2 个新 token,老 key 不再注入):
4864
+ * - background/background-color → color-backgroundBrand-disabled
4865
+ * - border/border-color → color-borderBrand-disabled
4866
+ * 文字色 color-textBrand-disabled 不参与派生
4867
+ * (设计稿中全部主题均与 bg/border 不同色阶),需要时请显式传入该新 token 键
4868
+ * @deprecated 'state-success' → color-text-success
4869
+ * @deprecated 'state-failure' → color-text-danger
4870
+ * @deprecated 'state-warning' → color-text-warning
4871
+ * @deprecated 'state-info' → color-text-info
4872
+ * @deprecated 'state-conventional' → color-text-neutral
4873
+ * @deprecated 'state-marketing' → color-text-promotional(color 上下文;background 上下文由 CSS 层直接迁移)
4874
+ * @deprecated 'radius-backup' → radius-sm
4875
+ * @deprecated 'radius-component' → radius-md
4876
+ * @deprecated 'radius-module' → radius-lg
4877
+ * @deprecated 'radius-button' → radius-lg(与 radius-module 同档合并)
4878
+ * @deprecated 'wrapper-padding' → spacing-lg
4879
+ * @deprecated 'stroke-default' → 由 Rules 机制接管
4880
+ * @deprecated 'stroke-active' → 由 Rules 机制接管
4881
+ *
4882
+ * 注:fan-out 展开基数以 figma-v4 设计稿的色阶一致性为准,故 action-hover / action-disable
4883
+ * 为 1→2 而非 1→3;三者合计派生 7 项。
4884
+ */
4885
+ export declare type LegacyAppearanceVariables = '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'
4886
+ /** 非 Token 体系字段,由 WebApp 侧展开为 design-font-family-* 系列 */
4887
+ | 'fontFamily';
4888
+
4749
4889
  declare interface Link {
4750
4890
  /**
4751
4891
  * @description 发起关联的父元素,如国家
@@ -7312,7 +7452,7 @@ declare interface OtpChallengeActionForm {
7312
7452
  resendLeftTimes?: number;
7313
7453
  }
7314
7454
 
7315
- declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
7455
+ declare type PartialSpeKey<T extends string | undefined, V> = Partial<Record<T extends string ? T : string, V>>;
7316
7456
 
7317
7457
  declare interface PayByLinkInfo {
7318
7458
  /**
@@ -7336,7 +7476,9 @@ declare interface PayByLinkInfo {
7336
7476
  /**
7337
7477
  * @description Payment element app config type
7338
7478
  */
7339
- export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
7479
+ export declare interface PaymentAppConfig extends BaseElementAppConfig {
7480
+ /** Payment appearance configuration including optional alias-only Rules. */
7481
+ appearance?: PaymentAppearance;
7340
7482
  /**
7341
7483
  * @description sessionData,无法通过updateConfig更新
7342
7484
  */
@@ -7398,12 +7540,18 @@ export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearan
7398
7540
  /**
7399
7541
  * @description Payment element appearance type
7400
7542
  */
7401
- export declare type PaymentAppearance = PickAppearance<{
7543
+ export declare type PaymentAppearance = PickAntomAppearance<PaymentAppearanceProps>;
7544
+
7545
+ /**
7546
+ * @description Payment element appearance properties
7547
+ */
7548
+ export declare type PaymentAppearanceProps = {
7402
7549
  displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
7403
7550
  theme: AntomTheme;
7404
- variables: AntomVariables;
7551
+ variables: AppearanceVariables | AntomVariables;
7405
7552
  layout: AntomLayouts;
7406
- }>;
7553
+ rules: AppearanceRuleSelector<string>;
7554
+ };
7407
7555
 
7408
7556
  /**
7409
7557
  * @description Payment element
@@ -7417,9 +7565,9 @@ export declare class PaymentElement extends BaseMainElement<PaymentElementConfig
7417
7565
  */
7418
7566
  setup(): Promise<Partial<PaymentAppConfig> | undefined>;
7419
7567
  /**
7420
- * @description Update payment element configuration with amount validation
7568
+ * @description Update payment element configuration with amount validation and appearance Rules support
7421
7569
  */
7422
- updateConfig(newConfig: Pick<PaymentAppConfig, 'amount'>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
7570
+ updateConfig(newConfig: Partial<PaymentAppConfig>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
7423
7571
  /**
7424
7572
  * @internal
7425
7573
  */
@@ -8130,6 +8278,7 @@ export declare interface PayPalConfig {
8130
8278
  channelMerchantAccountId?: string;
8131
8279
  /** Button style (fine-grained override) */
8132
8280
  style?: PayPalButtonStyle;
8281
+ businessDivision?: string;
8133
8282
  /** Callback to create PayPal order, no params, returns sessionData */
8134
8283
  createOrder?: () => Promise<string>;
8135
8284
  /** Callback when user changes shipping address, data is raw data returned by PayPal */
@@ -8149,12 +8298,15 @@ declare interface PeriodRule {
8149
8298
  periodCount?: number;
8150
8299
  }
8151
8300
 
8301
+ /** Builds an Antom appearance type with the restricted Rules declaration contract. */
8302
+ declare type PickAntomAppearance<T extends Record<string, any>> = PickAppearance<T, AppearanceRuleDeclarations>;
8303
+
8152
8304
  /**
8153
8305
  * @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
8154
8306
  * 返回受 Props 中存在的键约束的部分外观对象。
8155
8307
  * @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
8156
8308
  */
8157
- declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
8309
+ declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>, Rules extends CSS_2.Properties<string, number> = CSS_2.Properties<string, number>> = Partial<Pick<Appearance<Props, Rules>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
8158
8310
 
8159
8311
  /**
8160
8312
  * @description 政策信息,例如隐私链接,免责声明等
@@ -24862,7 +25014,9 @@ declare interface UserName {
24862
25014
  * @public
24863
25015
  * @description Vaulting element app config type
24864
25016
  */
24865
- export declare interface VaultingAppConfig extends BaseAppearance<VaultingAppearance>, BaseElementAppConfig {
25017
+ export declare interface VaultingAppConfig extends BaseElementAppConfig {
25018
+ /** Vaulting appearance configuration including optional alias-only Rules. */
25019
+ appearance?: VaultingAppearance;
24866
25020
  /**
24867
25021
  * @description sessionData,无法通过updateConfig更新
24868
25022
  */
@@ -24889,13 +25043,14 @@ export declare interface VaultingAppConfig extends BaseAppearance<VaultingAppear
24889
25043
  _requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
24890
25044
  }
24891
25045
 
24892
- export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>;
25046
+ export declare type VaultingAppearance = PickAntomAppearance<VaultingAppearanceProps>;
24893
25047
 
24894
25048
  export declare type VaultingAppearanceProps = {
24895
25049
  displaySetting: 'showCardBrandIcon';
24896
25050
  theme: AntomTheme;
24897
- variables: AntomVariables;
25051
+ variables: AppearanceVariables | AntomVariables;
24898
25052
  fonts?: FontSource[];
25053
+ rules: AppearanceRuleSelector<string>;
24899
25054
  };
24900
25055
 
24901
25056
  /**
@@ -24908,6 +25063,12 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
24908
25063
  * @internal
24909
25064
  */
24910
25065
  setup(): Promise<Partial<VaultingAppConfig> | undefined>;
25066
+ /**
25067
+ * Updates Vaulting configuration while preserving the public Rules clear semantics.
25068
+ * @param newConfig Partial Vaulting configuration patch.
25069
+ * @returns The WebApp update acknowledgement.
25070
+ */
25071
+ updateConfig(newConfig: Partial<VaultingAppConfig>): Promise<VaultingElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
24911
25072
  /**
24912
25073
  * @internal
24913
25074
  */