@alipay/ams-checkout 0.0.1726046231-dev.10 → 0.0.1726046231-dev.12

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.
@@ -40,14 +40,24 @@ export interface IElementOptions {
40
40
  onEndLoading: () => void;
41
41
  };
42
42
  }
43
+ export interface AddressMountComponentsParams {
44
+ configParams?: AddressMountConfig;
45
+ prefillValue: Array<AddressSubmitData>;
46
+ appearance: {
47
+ themeType: string;
48
+ };
49
+ debugProps?: {
50
+ localLink: string;
51
+ };
52
+ }
43
53
  interface BaseMountOptions<T = void> {
44
- config?: {};
54
+ configParams?: T;
45
55
  debugProps?: {
46
56
  localLink: string;
47
57
  };
48
58
  }
49
59
  type HideField = 'shippingCountry' | 'shippingName' | 'shippingPhoneNo' | 'shippingRegion' | 'shippingAddress1' | 'shippingZipCode' | 'shippingAddress2';
50
- export interface AddressMountOptions extends BaseMountOptions<{
60
+ interface AddressMountConfig {
51
61
  /**
52
62
  * 是否开启地址联想功能
53
63
  * 0 开启
@@ -58,8 +68,10 @@ export interface AddressMountOptions extends BaseMountOptions<{
58
68
  * 隐藏部分地址要素
59
69
  */
60
70
  hideFields?: Array<HideField>;
61
- }> {
71
+ }
72
+ export interface AddressMountOptions extends BaseMountOptions<AddressMountConfig> {
62
73
  type: 'address';
74
+ prefillValue: Array<AddressSubmitData>;
63
75
  appearance?: {
64
76
  theme: ThemeType.Default | ThemeType.Night;
65
77
  };
@@ -144,7 +156,7 @@ export interface AddressSubmitData {
144
156
  notes: string;
145
157
  prefer: '1' | '0';
146
158
  shippingId: string;
147
- actionFlag: 'I' | 'U' | 'D';
159
+ actionFlag?: 'I' | 'U' | 'D';
148
160
  }
149
161
  export interface SubmitServiceParams extends PaymentSubmitData {
150
162
  accountInfo: AuthSubmitData['accountInfo'];
@@ -845,7 +845,8 @@ export declare enum ElementPaymentEvent {
845
845
  AFTER_SUBMIT = "onAfterSubmit",
846
846
  SIZE_CHANGE = "onSizeChange",
847
847
  LAUNCH = "onLaunch",
848
- CALLBACK = "callback"
848
+ CALLBACK = "callback",
849
+ LOG = "log"
849
850
  }
850
851
  export declare enum ConnectErrorCode {
851
852
  RISK_REJECT = "RISK_REJECT",
@@ -244,6 +244,7 @@ export var ElementPaymentEvent = /*#__PURE__*/function (ElementPaymentEvent) {
244
244
  ElementPaymentEvent["SIZE_CHANGE"] = "onSizeChange";
245
245
  ElementPaymentEvent["LAUNCH"] = "onLaunch";
246
246
  ElementPaymentEvent["CALLBACK"] = "callback";
247
+ ElementPaymentEvent["LOG"] = "log";
247
248
  return ElementPaymentEvent;
248
249
  }({});
249
250
  export var ConnectErrorCode = /*#__PURE__*/function (ConnectErrorCode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1726046231-dev.10",
3
+ "version": "0.0.1726046231-dev.12",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",