@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.
- package/ams-checkout.js +4 -3
- package/dist/ams-checkout.min.js +2 -1
- package/dist/ams-checkout.min.js.map +1 -0
- package/esm/config/index.d.ts +7 -0
- package/esm/config/index.js +2 -2
- package/esm/constant/element.d.ts +2 -1
- package/esm/constant/element.js +1 -0
- package/esm/constant/index.d.ts +4 -21
- package/esm/core/component/element/elementController/index.d.ts +3 -3
- package/esm/core/component/element/index.d.ts +4 -1
- package/esm/core/component/element/index.js +19 -4
- package/esm/core/component/element/mock.js +1 -1
- package/esm/core/component/element/modernElementController/adapter.d.ts +19 -0
- package/esm/core/component/element/modernElementController/adapter.js +73 -0
- package/esm/core/component/element/modernElementController/index.d.ts +149 -0
- package/esm/core/component/element/modernElementController/index.js +1665 -0
- package/esm/core/component/element/type.d.ts +14 -17
- package/esm/foundation/service/event-center.js +1 -1
- package/esm/modern/global.d.ts +3 -0
- package/esm/modern/index.d.ts +5 -1
- package/esm/modern/index.js +1 -51
- package/esm/modern/tools.js +1 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/util/logger.js +1 -2
- package/package.json +15 -9
- package/types.d.ts +785 -94
- package/types.untrimmed.d.ts +929 -108
- package/esm/modern/stageName.d.ts +0 -3
- package/esm/modern/stageName.js +0 -1
package/types.d.ts
CHANGED
|
@@ -143,7 +143,26 @@ 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
|
|
146
|
+
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends BaseBridgeEventMap<AppConfig, SR, SubmitParams, string, AntomOpenModalConfig> {
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
|
|
151
|
+
*/
|
|
152
|
+
export declare interface AntomBridgeWithNativeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends AntomBridgeEventMap<AppConfig, SubmitParams, SR> {
|
|
153
|
+
/* Excluded from this release type: showPopup */
|
|
154
|
+
/* Excluded from this release type: dismissLoading */
|
|
155
|
+
/* Excluded from this release type: webAppReady */
|
|
156
|
+
/* Excluded from this release type: onLaunch */
|
|
157
|
+
/* Excluded from this release type: renderComponent */
|
|
158
|
+
/* Excluded from this release type: appHeartBeat */
|
|
159
|
+
/* Excluded from this release type: showToast */
|
|
160
|
+
/* Excluded from this release type: onEventCallback */
|
|
161
|
+
/* Excluded from this release type: onSubmitPayCallback */
|
|
162
|
+
/* Excluded from this release type: reset */
|
|
163
|
+
/* Excluded from this release type: destroy */
|
|
164
|
+
/* Excluded from this release type: onClose */
|
|
165
|
+
/* Excluded from this release type: onRedirect */
|
|
147
166
|
}
|
|
148
167
|
|
|
149
168
|
/**
|
|
@@ -178,9 +197,9 @@ declare interface AntomErrorResponse {
|
|
|
178
197
|
extendInfo?: Record<string, any>;
|
|
179
198
|
}
|
|
180
199
|
|
|
181
|
-
|
|
200
|
+
export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
182
201
|
|
|
183
|
-
/* Excluded from this release type:
|
|
202
|
+
/* Excluded from this release type: AntomMiddlePageEventMap */
|
|
184
203
|
|
|
185
204
|
/* Excluded from this release type: AntomOpenModalConfig */
|
|
186
205
|
|
|
@@ -195,11 +214,14 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
195
214
|
* @description 更新配置
|
|
196
215
|
*/
|
|
197
216
|
updateConfig(config: Partial<BaseFactoryConfig>): void;
|
|
217
|
+
/* Excluded from this release type: redirect */
|
|
198
218
|
/* Excluded from this release type: openModal */
|
|
199
219
|
elements(): Elements;
|
|
220
|
+
createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
200
221
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
201
222
|
createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
202
223
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
224
|
+
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
203
225
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
204
226
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
205
227
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
@@ -256,6 +278,22 @@ export declare const AntomSDKErrorCodes: {
|
|
|
256
278
|
* @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
|
|
257
279
|
*/
|
|
258
280
|
readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
|
|
281
|
+
/**
|
|
282
|
+
* @description checkout 页面未加载成功,不允许 updateConfig
|
|
283
|
+
*/
|
|
284
|
+
readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
|
|
285
|
+
/**
|
|
286
|
+
* @description 支付进行中,不允许更新金额
|
|
287
|
+
*/
|
|
288
|
+
readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
|
|
289
|
+
/**
|
|
290
|
+
* @description 金额不能为空
|
|
291
|
+
*/
|
|
292
|
+
readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
|
|
293
|
+
/**
|
|
294
|
+
* @description 金额格式非法(仅允许整数和小数)
|
|
295
|
+
*/
|
|
296
|
+
readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
|
|
259
297
|
readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
|
|
260
298
|
readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
|
|
261
299
|
readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
|
|
@@ -272,6 +310,8 @@ export declare const AntomSDKErrorCodes: {
|
|
|
272
310
|
readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
|
|
273
311
|
readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
|
|
274
312
|
readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
|
|
313
|
+
readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
|
|
314
|
+
readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
|
|
275
315
|
readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
|
|
276
316
|
readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
|
|
277
317
|
readonly API_MISS_PARAMS: "API_MISS_PARAMS";
|
|
@@ -289,6 +329,8 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
|
|
|
289
329
|
|
|
290
330
|
export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
|
|
291
331
|
|
|
332
|
+
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';
|
|
333
|
+
|
|
292
334
|
declare interface APICallbackOptions {
|
|
293
335
|
requestType: 'fetch' | 'xhr';
|
|
294
336
|
time: number;
|
|
@@ -303,15 +345,21 @@ declare interface APICallbackOptions {
|
|
|
303
345
|
errorMsg?: string;
|
|
304
346
|
}
|
|
305
347
|
|
|
348
|
+
/**
|
|
349
|
+
* @description SDK UI组件的外观配置。
|
|
350
|
+
* 控制主题、CSS变量、布局规则及显示设置。
|
|
351
|
+
* @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
|
|
352
|
+
*/
|
|
306
353
|
declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
|
|
307
354
|
theme?: Props['theme'];
|
|
308
355
|
variables?: PartialSpeKey<Props['variables'], string>;
|
|
309
356
|
rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
|
|
310
357
|
displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
|
|
311
358
|
layout?: Props['layout'];
|
|
359
|
+
fonts?: FontSource[];
|
|
312
360
|
}
|
|
313
361
|
|
|
314
|
-
declare type AppearanceSetting = {
|
|
362
|
+
export declare type AppearanceSetting = {
|
|
315
363
|
displaySetting: Record<'showCardBrandIcon', boolean>;
|
|
316
364
|
theme: 'light' | 'dark';
|
|
317
365
|
layout: 'accordion' | 'tabs';
|
|
@@ -712,6 +760,16 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
712
760
|
/* Excluded from this release type: "OPENSDK@HANDSHAKE" */
|
|
713
761
|
/* Excluded from this release type: "OPENSDK@READY_HANDSHAKE" */
|
|
714
762
|
/* Excluded from this release type: "OPENSDK@UPDATE_CONFIG" */
|
|
763
|
+
/**
|
|
764
|
+
* 更新配置时的回复事件,包含可能发生的错误信息。
|
|
765
|
+
* 如果 error 为 undefined,则表示没有错误发生。
|
|
766
|
+
*/
|
|
767
|
+
"OPENSDK@UPDATE_CONFIG_REPLY": {
|
|
768
|
+
/**
|
|
769
|
+
* 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
|
|
770
|
+
*/
|
|
771
|
+
error?: ErrorPayload<string>;
|
|
772
|
+
} | undefined;
|
|
715
773
|
/* Excluded from this release type: "OPENSDK@HANDSHAKE_ACK" */
|
|
716
774
|
/* Excluded from this release type: "OPENSDK@SUBMIT" */
|
|
717
775
|
/* Excluded from this release type: "OPENSDK@SUBMIT_REPLY" */
|
|
@@ -721,12 +779,14 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
721
779
|
/* Excluded from this release type: "OPENSDK@REDIRECT" */
|
|
722
780
|
/* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_PORT" */
|
|
723
781
|
/* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_APPEARANCE" */
|
|
782
|
+
/* Excluded from this release type: "OPENSDK@TRANSFER_MODAL_INITIALDATA" */
|
|
724
783
|
/* Excluded from this release type: "OPENSDK@TRANSFER_APP_PORT" */
|
|
725
784
|
/* Excluded from this release type: "OPENSDK@ERROR" */
|
|
726
785
|
/* Excluded from this release type: "OPENSDK@TRANSFER_RECEIVE_PORT" */
|
|
727
786
|
/* Excluded from this release type: "OPENSDK@TRANSFER_SEND_PORT" */
|
|
728
787
|
/* Excluded from this release type: "OPENSDK@MESSAGE" */
|
|
729
788
|
/* Excluded from this release type: "OPENSDK@HEIGHT_UPDATE" */
|
|
789
|
+
/* Excluded from this release type: "OPENSDK@DESTROY_ELEMENT" */
|
|
730
790
|
}
|
|
731
791
|
|
|
732
792
|
declare interface BaseConfig {
|
|
@@ -747,6 +807,7 @@ declare interface BaseConfig {
|
|
|
747
807
|
*/
|
|
748
808
|
locale?: string;
|
|
749
809
|
/* Excluded from this release type: version */
|
|
810
|
+
/* Excluded from this release type: colorScheme */
|
|
750
811
|
}
|
|
751
812
|
|
|
752
813
|
/**
|
|
@@ -763,19 +824,21 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
763
824
|
/* Excluded from this release type: iframe */
|
|
764
825
|
status: 'initialized' | 'mounting' | 'mounted' | 'ready' | 'destroyed' | 'unmounted';
|
|
765
826
|
/* Excluded from this release type: cachedSend */
|
|
827
|
+
/** Reuses the pending reply for concurrent submit calls. */
|
|
828
|
+
private submitPromise?;
|
|
766
829
|
constructor(name: string, config: WithAppURL<Config>);
|
|
767
830
|
/* Excluded from this release type: submit */
|
|
768
831
|
/* Excluded from this release type: setup */
|
|
769
832
|
/**
|
|
770
|
-
* @param {
|
|
833
|
+
* @param {HTMLElement} container
|
|
771
834
|
*/
|
|
772
|
-
mount(
|
|
835
|
+
mount(container: HTMLElement): Promise<void>;
|
|
773
836
|
/* Excluded from this release type: _mount */
|
|
774
837
|
/**
|
|
775
838
|
* 更新webapp配置
|
|
776
839
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
777
840
|
*/
|
|
778
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
841
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
|
|
779
842
|
/**
|
|
780
843
|
* 卸载元素
|
|
781
844
|
*/
|
|
@@ -808,13 +871,14 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
808
871
|
}
|
|
809
872
|
|
|
810
873
|
declare interface BaseElementAppConfig {
|
|
811
|
-
locale
|
|
874
|
+
/* Excluded from this release type: locale */
|
|
812
875
|
/* Excluded from this release type: env */
|
|
813
876
|
/* Excluded from this release type: merchantId */
|
|
814
877
|
[key: string]: any;
|
|
815
878
|
}
|
|
816
879
|
|
|
817
|
-
declare interface BaseElementConfig<T extends BaseElementAppConfig =
|
|
880
|
+
declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
|
|
881
|
+
/* Excluded from this release type: trackId */
|
|
818
882
|
appConfig: T;
|
|
819
883
|
elementMode: ElementMode;
|
|
820
884
|
}
|
|
@@ -865,6 +929,7 @@ declare abstract class BaseFactory {
|
|
|
865
929
|
*/
|
|
866
930
|
constructor(config: BaseFactoryConfig);
|
|
867
931
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
932
|
+
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
868
933
|
/* Excluded from this release type: canUseElements */
|
|
869
934
|
/**
|
|
870
935
|
* @description 无需手动调用
|
|
@@ -939,6 +1004,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
939
1004
|
/* Excluded from this release type: _submit */
|
|
940
1005
|
}
|
|
941
1006
|
|
|
1007
|
+
/**
|
|
1008
|
+
* @description 打开模态框的配置项。
|
|
1009
|
+
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1010
|
+
*/
|
|
942
1011
|
declare interface BaseOpenModalConfig {
|
|
943
1012
|
/**
|
|
944
1013
|
* 无需手动传递,app的唯一scope
|
|
@@ -962,10 +1031,21 @@ declare interface BaseOpenModalConfig {
|
|
|
962
1031
|
onClose?: () => void;
|
|
963
1032
|
url: string;
|
|
964
1033
|
/**
|
|
965
|
-
*
|
|
1034
|
+
* @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
|
|
966
1035
|
*/
|
|
967
1036
|
closeConfirm?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* @description 需要同步的外观配置
|
|
1039
|
+
*/
|
|
968
1040
|
appearance?: Appearance;
|
|
1041
|
+
/**
|
|
1042
|
+
* @description 需要传递的初始化数据
|
|
1043
|
+
*/
|
|
1044
|
+
initialData?: Record<string, any>;
|
|
1045
|
+
/**
|
|
1046
|
+
* @description 无需手动传递, 模态框的唯一标识
|
|
1047
|
+
*/
|
|
1048
|
+
modalId?: string;
|
|
969
1049
|
}
|
|
970
1050
|
|
|
971
1051
|
declare type BehaviorConfig = {
|
|
@@ -1063,6 +1143,12 @@ declare interface C2PProps {
|
|
|
1063
1143
|
merchantTransactionId?: string;
|
|
1064
1144
|
}
|
|
1065
1145
|
|
|
1146
|
+
/* Excluded from this release type: CallbackErrorInfo */
|
|
1147
|
+
|
|
1148
|
+
/* Excluded from this release type: CallbackReturnData */
|
|
1149
|
+
|
|
1150
|
+
/* Excluded from this release type: CallbackSessionNextAction */
|
|
1151
|
+
|
|
1066
1152
|
declare interface CardIssuerAuthentication {
|
|
1067
1153
|
/**
|
|
1068
1154
|
* @description 卡售卖单元
|
|
@@ -1480,7 +1566,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1480
1566
|
/**
|
|
1481
1567
|
* @description 物流信息, 包含物流地址和物流费
|
|
1482
1568
|
*/
|
|
1483
|
-
shippingInfo?:
|
|
1569
|
+
shippingInfo?: ShippingInfo_2;
|
|
1484
1570
|
/**
|
|
1485
1571
|
* @description 用户已绑资产信息
|
|
1486
1572
|
*/
|
|
@@ -1513,28 +1599,6 @@ declare interface ChargeInfo {
|
|
|
1513
1599
|
chargeActualAmountView?: PaymentView;
|
|
1514
1600
|
}
|
|
1515
1601
|
|
|
1516
|
-
/** click 事件 resolve 参数 */
|
|
1517
|
-
export declare interface ClickResolveOptions {
|
|
1518
|
-
amount?: {
|
|
1519
|
-
currency: string;
|
|
1520
|
-
value: string;
|
|
1521
|
-
};
|
|
1522
|
-
shippingAddressRequired?: boolean;
|
|
1523
|
-
allowedShippingCountries?: string[];
|
|
1524
|
-
shippingRates?: Array<{
|
|
1525
|
-
id: string;
|
|
1526
|
-
displayName: string;
|
|
1527
|
-
amount: string;
|
|
1528
|
-
}>;
|
|
1529
|
-
lineItems?: Array<{
|
|
1530
|
-
name: string;
|
|
1531
|
-
amount: string;
|
|
1532
|
-
}>;
|
|
1533
|
-
business?: {
|
|
1534
|
-
name: string;
|
|
1535
|
-
};
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
1602
|
declare interface CodeFormView {
|
|
1539
1603
|
/**
|
|
1540
1604
|
* @description title
|
|
@@ -1560,6 +1624,11 @@ declare interface CodeFormView {
|
|
|
1560
1624
|
* @description label
|
|
1561
1625
|
*/
|
|
1562
1626
|
label?: string;
|
|
1627
|
+
/**
|
|
1628
|
+
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
1629
|
+
* when appLinkUrlForWeb is populated
|
|
1630
|
+
*/
|
|
1631
|
+
paymentGuideInfo?: PaymentGuideInfo;
|
|
1563
1632
|
/**
|
|
1564
1633
|
* @description 提醒事项
|
|
1565
1634
|
*/
|
|
@@ -1576,6 +1645,10 @@ declare interface CodeFormView {
|
|
|
1576
1645
|
* @description 码过期时间
|
|
1577
1646
|
*/
|
|
1578
1647
|
codeExpireTime?: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
1650
|
+
*/
|
|
1651
|
+
qrcodeConfig?: QrCodeConfig;
|
|
1579
1652
|
}
|
|
1580
1653
|
|
|
1581
1654
|
/**
|
|
@@ -2132,10 +2205,14 @@ export declare interface ConfirmCardSetupOptions {
|
|
|
2132
2205
|
export declare interface ConfirmPaymentOptions extends Omit<ConfirmCardSetupOptions, 'elements'> {
|
|
2133
2206
|
sessionData: string;
|
|
2134
2207
|
/**
|
|
2135
|
-
* @description 传入已挂载的 CVVElement
|
|
2208
|
+
* @description 传入已挂载的 CVVElement / PaymentElement / Elements 实例,不传则使用无 UI 自动提交模式
|
|
2136
2209
|
*/
|
|
2137
2210
|
elements?: BaseMainElement | BaseElements;
|
|
2138
2211
|
appearance?: CVVAppearance;
|
|
2212
|
+
/**
|
|
2213
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
2214
|
+
*/
|
|
2215
|
+
params?: Record<string, unknown>;
|
|
2139
2216
|
}
|
|
2140
2217
|
|
|
2141
2218
|
/**
|
|
@@ -2207,6 +2284,13 @@ declare namespace CSS_2 {
|
|
|
2207
2284
|
}
|
|
2208
2285
|
}
|
|
2209
2286
|
|
|
2287
|
+
/**
|
|
2288
|
+
* CSS 字体源 — 通过 <link> 标签加载外部 CSS(如 Google Fonts)
|
|
2289
|
+
*/
|
|
2290
|
+
declare interface CssFontSource {
|
|
2291
|
+
cssSrc: string;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2210
2294
|
declare interface CurrencyInfo {
|
|
2211
2295
|
/**
|
|
2212
2296
|
* @description Getter method for property <tt>currencyCode</tt>.
|
|
@@ -2251,6 +2335,17 @@ declare interface CustomerFxInfo {
|
|
|
2251
2335
|
useMarketPrice?: boolean;
|
|
2252
2336
|
}
|
|
2253
2337
|
|
|
2338
|
+
/**
|
|
2339
|
+
* 自定义字体源 — 通过 @font-face 加载自托管字体
|
|
2340
|
+
*/
|
|
2341
|
+
declare interface CustomFontSource {
|
|
2342
|
+
family: string;
|
|
2343
|
+
src: string;
|
|
2344
|
+
weight?: string;
|
|
2345
|
+
style?: string;
|
|
2346
|
+
unicodeRange?: string;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2254
2349
|
/**
|
|
2255
2350
|
* CustomizedPerformanceKey 是给业务使用的自定义指标,共 20 个,页面之间互相独立
|
|
2256
2351
|
*/
|
|
@@ -2260,7 +2355,7 @@ declare type CustomizedPerformanceKey = 'm1' | 'm2' | 'm3' | 'm4' | 'm5' | 'm6'
|
|
|
2260
2355
|
* @public
|
|
2261
2356
|
* @description CVV element app config type
|
|
2262
2357
|
*/
|
|
2263
|
-
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance
|
|
2358
|
+
export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
|
|
2264
2359
|
/**
|
|
2265
2360
|
* @description sessionData
|
|
2266
2361
|
*/
|
|
@@ -2280,7 +2375,8 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2280
2375
|
|
|
2281
2376
|
export declare type CVVAppearanceProps = {
|
|
2282
2377
|
theme: AntomTheme;
|
|
2283
|
-
variables:
|
|
2378
|
+
variables: AntomVariables;
|
|
2379
|
+
fonts?: FontSource[];
|
|
2284
2380
|
};
|
|
2285
2381
|
|
|
2286
2382
|
/**
|
|
@@ -2366,6 +2462,10 @@ export declare interface CVVSubmitParams {
|
|
|
2366
2462
|
* 重定向策略
|
|
2367
2463
|
*/
|
|
2368
2464
|
redirect?: 'always' | 'if_required';
|
|
2465
|
+
/**
|
|
2466
|
+
* 集成用户自定义信息(如 cardHolderName)
|
|
2467
|
+
*/
|
|
2468
|
+
params?: Record<string, unknown>;
|
|
2369
2469
|
}
|
|
2370
2470
|
|
|
2371
2471
|
declare interface DanaSofCouponInfo {
|
|
@@ -3084,7 +3184,7 @@ declare class Elements extends BaseElements {
|
|
|
3084
3184
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3085
3185
|
}
|
|
3086
3186
|
|
|
3087
|
-
declare type ElementTypeEnum = 'TEXT' | 'DIGIT_6' | 'DIGIT_18' | 'DIGIT_32' | 'DIGIT_11' | 'DIGIT_4' | 'DIGIT_10' | 'CHECKBOX' | 'SELECT' | 'SWITCH' | 'PASSWORD_2' | 'DATE_PICKER' | 'CHECKLIST' | 'ADDRESS' | 'DROPBOX' | 'DIGIT_13' | 'GRIDLIST' | 'TENOR_SELECT_KR' | 'STORELIST' | 'GRIDBANKLIST' | 'SUB_QR_CODE' | 'GRIDBANKTOP' | 'PHONE_TEXT_AREA_CODE';
|
|
3187
|
+
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';
|
|
3088
3188
|
|
|
3089
3189
|
declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
|
|
3090
3190
|
|
|
@@ -3175,6 +3275,22 @@ declare interface ExpCardPlan {
|
|
|
3175
3275
|
* @description 每个月分期利息
|
|
3176
3276
|
*/
|
|
3177
3277
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3278
|
+
/**
|
|
3279
|
+
* @description 分期有效期开始时间
|
|
3280
|
+
*/
|
|
3281
|
+
validStartTime?: string;
|
|
3282
|
+
/**
|
|
3283
|
+
* @description 分期有效期结束时间
|
|
3284
|
+
*/
|
|
3285
|
+
validEndTime?: string;
|
|
3286
|
+
/**
|
|
3287
|
+
* @description 支持的银行信息
|
|
3288
|
+
*
|
|
3289
|
+
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3290
|
+
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3291
|
+
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3292
|
+
*/
|
|
3293
|
+
supportedBank?: ExpSupportIppBank;
|
|
3178
3294
|
}
|
|
3179
3295
|
|
|
3180
3296
|
declare interface ExpInstallmentInfo {
|
|
@@ -3199,12 +3315,18 @@ declare interface ExpPaymentOptionDetail {
|
|
|
3199
3315
|
* @public
|
|
3200
3316
|
* @description Express element app config type
|
|
3201
3317
|
*/
|
|
3202
|
-
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting
|
|
3318
|
+
export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
|
|
3203
3319
|
/** payment SessionData */
|
|
3204
3320
|
sessionData?: string;
|
|
3205
3321
|
/** Business division (country/region) */
|
|
3206
3322
|
businessDivision?: string;
|
|
3207
|
-
/**
|
|
3323
|
+
/**
|
|
3324
|
+
* Amount & Currency
|
|
3325
|
+
*
|
|
3326
|
+
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3327
|
+
* Passing amount at creation time is ignored; the initial amount
|
|
3328
|
+
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3329
|
+
*/
|
|
3208
3330
|
amount?: {
|
|
3209
3331
|
currency: string;
|
|
3210
3332
|
value: string;
|
|
@@ -3213,20 +3335,20 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3213
3335
|
paypal?: PayPalConfig;
|
|
3214
3336
|
/**
|
|
3215
3337
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3216
|
-
* Each payment method can independently set the button display text
|
|
3217
|
-
* Reserved index signature for future payment method integration
|
|
3338
|
+
* Each payment method can independently set the button display text.
|
|
3218
3339
|
*/
|
|
3219
3340
|
buttonType?: {
|
|
3220
3341
|
/** PayPal: paypal | checkout | buynow | pay */
|
|
3221
3342
|
paypal?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
3222
3343
|
[method: string]: string | undefined;
|
|
3223
3344
|
};
|
|
3224
|
-
/**
|
|
3345
|
+
/**
|
|
3346
|
+
* Unified height for all buttons (px)
|
|
3347
|
+
*/
|
|
3225
3348
|
buttonHeight?: number;
|
|
3226
3349
|
/**
|
|
3227
3350
|
* Button color theme (following Stripe Express Checkout Element design)
|
|
3228
|
-
* Each payment method can independently set the theme color
|
|
3229
|
-
* Reserved index signature for future payment method integration
|
|
3351
|
+
* Each payment method can independently set the theme color.
|
|
3230
3352
|
*/
|
|
3231
3353
|
buttonTheme?: {
|
|
3232
3354
|
/** PayPal: gold | blue | silver | white | black */
|
|
@@ -3244,6 +3366,13 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3244
3366
|
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3245
3367
|
*/
|
|
3246
3368
|
locale?: string;
|
|
3369
|
+
/**
|
|
3370
|
+
* 是否运行在 Native App 的 WebView 中。
|
|
3371
|
+
* 为 true 时,跳转通过 onRedirect 事件委托给 Native 端处理。
|
|
3372
|
+
*/
|
|
3373
|
+
isNativeAppWebview?: boolean;
|
|
3374
|
+
/* Excluded from this release type: merchantDomain */
|
|
3375
|
+
/* Excluded from this release type: doMain */
|
|
3247
3376
|
}
|
|
3248
3377
|
|
|
3249
3378
|
/** cancel 事件负载 */
|
|
@@ -3252,24 +3381,54 @@ export declare interface ExpressCancelEvent {
|
|
|
3252
3381
|
data?: any;
|
|
3253
3382
|
}
|
|
3254
3383
|
|
|
3255
|
-
/** click
|
|
3384
|
+
/** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
|
|
3256
3385
|
export declare interface ExpressClickEvent {
|
|
3257
3386
|
expressPaymentType: string;
|
|
3258
|
-
resolve: (options: ClickResolveOptions) => void;
|
|
3259
3387
|
}
|
|
3260
3388
|
|
|
3261
3389
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3262
3390
|
export declare interface ExpressConfirmData {
|
|
3263
3391
|
expressPaymentType: string;
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3392
|
+
billingDetails?: {
|
|
3393
|
+
name?: string;
|
|
3394
|
+
email?: string;
|
|
3395
|
+
phone?: string;
|
|
3396
|
+
address?: {
|
|
3397
|
+
line1?: string;
|
|
3398
|
+
line2?: string;
|
|
3399
|
+
city?: string;
|
|
3400
|
+
state?: string;
|
|
3401
|
+
postalCode?: string;
|
|
3402
|
+
country?: string;
|
|
3403
|
+
};
|
|
3404
|
+
};
|
|
3405
|
+
shippingAddress?: {
|
|
3406
|
+
name?: string;
|
|
3407
|
+
phone?: string;
|
|
3408
|
+
address?: {
|
|
3409
|
+
line1?: string;
|
|
3410
|
+
line2?: string;
|
|
3411
|
+
city?: string;
|
|
3412
|
+
state?: string;
|
|
3413
|
+
postalCode?: string;
|
|
3414
|
+
country?: string;
|
|
3415
|
+
};
|
|
3416
|
+
};
|
|
3417
|
+
/** 支付方式返回的原始支付数据(如 alipayCn、applePay 等) */
|
|
3418
|
+
paymentData?: unknown;
|
|
3419
|
+
/**
|
|
3420
|
+
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3421
|
+
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3422
|
+
*/
|
|
3423
|
+
paymentFailed: () => void;
|
|
3268
3424
|
}
|
|
3269
3425
|
|
|
3270
3426
|
/**
|
|
3271
3427
|
* @public
|
|
3272
3428
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
3429
|
+
*
|
|
3430
|
+
* Host 侧只保留 Element 生命周期、商户事件包装和 bridge 连接。
|
|
3431
|
+
* AP/GP/AlipayCN 的 submit、2DS/3DS、polling 结果处理都由 express_element webapp 承接。
|
|
3273
3432
|
*/
|
|
3274
3433
|
export declare class ExpressElement extends BaseMainElement<ExpressElementConfig, ExpressElementEvents> {
|
|
3275
3434
|
static elementType: string;
|
|
@@ -3277,15 +3436,44 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3277
3436
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3278
3437
|
*/
|
|
3279
3438
|
private _callbacks;
|
|
3439
|
+
/** setup 阶段的 renderData,仅供非 Safari PC Apple Pay host-token 路径读取 paymentRequest。 */
|
|
3440
|
+
private _renderData;
|
|
3441
|
+
private _hostSign;
|
|
3442
|
+
/**
|
|
3443
|
+
* 本地事件处理器(绕过 bridge 的 host→webapp 方向限制)。
|
|
3444
|
+
* bridge.on 只能监听 iframe 发来的消息;SDK host 主动推送事件给商户时走 _emit → _localHandlers。
|
|
3445
|
+
*/
|
|
3446
|
+
private _localHandlers;
|
|
3447
|
+
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3448
|
+
private _paymentInProgress;
|
|
3449
|
+
private _paypalOverlay;
|
|
3280
3450
|
constructor(name: string, config: ExpressElementConfig);
|
|
3281
|
-
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3282
3451
|
/**
|
|
3283
|
-
*
|
|
3452
|
+
* 重写 on:
|
|
3453
|
+
* 1. 对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3454
|
+
* 2. 对 onRedirect 事件同步注册到 _localHandlers(SDK host 主动推送时商户能收到)
|
|
3455
|
+
*/
|
|
3456
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
3457
|
+
/**
|
|
3458
|
+
* SDK host 主动推送事件给商户(不走 bridge postMessage,直接调用本地注册的 handler)。
|
|
3459
|
+
* 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
|
|
3460
|
+
*/
|
|
3461
|
+
private _emit;
|
|
3462
|
+
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3463
|
+
/**
|
|
3464
|
+
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3465
|
+
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3466
|
+
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3284
3467
|
*/
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3468
|
+
completePayment(redirect?: 'always' | 'if_required'): Promise<{
|
|
3469
|
+
success: boolean;
|
|
3470
|
+
result?: any;
|
|
3471
|
+
error?: {
|
|
3472
|
+
code: string;
|
|
3473
|
+
message: string;
|
|
3474
|
+
};
|
|
3475
|
+
}>;
|
|
3476
|
+
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3289
3477
|
private registerInternalListeners;
|
|
3290
3478
|
protected focus(): void;
|
|
3291
3479
|
protected blur(): void;
|
|
@@ -3303,57 +3491,83 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3303
3491
|
* @public
|
|
3304
3492
|
* @description Express element events type
|
|
3305
3493
|
*/
|
|
3306
|
-
export declare interface ExpressElementEvents extends
|
|
3307
|
-
/**
|
|
3308
|
-
* @description Element ready event — 上报可用支付方式
|
|
3309
|
-
*/
|
|
3494
|
+
export declare interface ExpressElementEvents extends AntomBridgeWithNativeEventMap<ExpressAppConfig> {
|
|
3310
3495
|
ready: {
|
|
3311
3496
|
availablePaymentMethods: Record<string, boolean>;
|
|
3312
3497
|
};
|
|
3313
|
-
/**
|
|
3314
|
-
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3315
|
-
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3316
|
-
*/
|
|
3317
3498
|
click: ExpressClickEvent;
|
|
3318
|
-
/**
|
|
3319
|
-
* @description 统一支付完成事件(替代 approve)
|
|
3320
|
-
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3321
|
-
*/
|
|
3322
3499
|
confirm: ExpressConfirmData;
|
|
3323
|
-
/**
|
|
3324
|
-
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3325
|
-
*/
|
|
3326
3500
|
error: ErrorPayload & {
|
|
3327
3501
|
expressPaymentType: string;
|
|
3328
3502
|
};
|
|
3329
|
-
/**
|
|
3330
|
-
* @description 用户取消支付
|
|
3331
|
-
*/
|
|
3332
3503
|
cancel: ExpressCancelEvent;
|
|
3333
|
-
/**
|
|
3334
|
-
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3335
|
-
*/
|
|
3336
3504
|
shippingaddresschange: {
|
|
3337
3505
|
expressPaymentType: string;
|
|
3338
3506
|
address: any;
|
|
3339
3507
|
resolve: (options: ShippingResolveOptions) => void;
|
|
3340
3508
|
reject: (reason: string) => void;
|
|
3341
3509
|
};
|
|
3342
|
-
/**
|
|
3343
|
-
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3344
|
-
*/
|
|
3345
3510
|
shippingratechange: {
|
|
3346
3511
|
expressPaymentType: string;
|
|
3347
3512
|
shippingRate: any;
|
|
3348
3513
|
resolve: (options: RateResolveOptions) => void;
|
|
3349
3514
|
};
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3515
|
+
contentHeightChanged: {
|
|
3516
|
+
height: number;
|
|
3517
|
+
};
|
|
3518
|
+
'OPENSDK@CLICK': {
|
|
3519
|
+
expressPaymentType: string;
|
|
3520
|
+
};
|
|
3521
|
+
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3522
|
+
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3523
|
+
requestId: string;
|
|
3524
|
+
};
|
|
3525
|
+
'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
|
|
3526
|
+
requestId: string;
|
|
3527
|
+
sessionData?: string;
|
|
3528
|
+
error?: string;
|
|
3529
|
+
};
|
|
3530
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
|
|
3531
|
+
requestId: string;
|
|
3532
|
+
shippingData: any;
|
|
3533
|
+
};
|
|
3534
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
|
|
3535
|
+
requestId: string;
|
|
3536
|
+
error?: string;
|
|
3537
|
+
};
|
|
3538
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
|
|
3539
|
+
requestId: string;
|
|
3540
|
+
shippingData: any;
|
|
3541
|
+
};
|
|
3542
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
|
|
3543
|
+
requestId: string;
|
|
3544
|
+
error?: string;
|
|
3545
|
+
};
|
|
3546
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
3547
|
+
requestId: string;
|
|
3548
|
+
expressPaymentType: string;
|
|
3549
|
+
};
|
|
3550
|
+
/** host 完成 Apple Pay token 获取后回包给 iframe,submit/3DS/polling 均由 webapp 完成 */
|
|
3551
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
3552
|
+
requestId: string;
|
|
3553
|
+
success: boolean;
|
|
3554
|
+
result?: any;
|
|
3555
|
+
errorCode?: string;
|
|
3556
|
+
errorMessage?: string;
|
|
3557
|
+
billingDetails?: any;
|
|
3558
|
+
shippingAddress?: any;
|
|
3559
|
+
};
|
|
3560
|
+
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
3561
|
+
error?: ErrorPayload<string>;
|
|
3562
|
+
};
|
|
3563
|
+
'OPENSDK@COMPLETE_PAYMENT_REJECT': Record<string, never>;
|
|
3564
|
+
onRedirect: {
|
|
3565
|
+
normalUrl: string;
|
|
3566
|
+
applinkUrl?: string;
|
|
3567
|
+
schemaUrl?: string;
|
|
3568
|
+
isDestroy: boolean;
|
|
3569
|
+
needReset: boolean;
|
|
3570
|
+
};
|
|
3357
3571
|
}
|
|
3358
3572
|
|
|
3359
3573
|
declare interface ExpSupportBank {
|
|
@@ -3378,6 +3592,24 @@ declare interface ExpSupportCardBrand {
|
|
|
3378
3592
|
logo?: Logo;
|
|
3379
3593
|
}
|
|
3380
3594
|
|
|
3595
|
+
/**
|
|
3596
|
+
* @description 支持的分期银行信息
|
|
3597
|
+
*/
|
|
3598
|
+
declare interface ExpSupportIppBank {
|
|
3599
|
+
/**
|
|
3600
|
+
* @description bank short name or bank code
|
|
3601
|
+
*/
|
|
3602
|
+
bankShortName?: string;
|
|
3603
|
+
/**
|
|
3604
|
+
* @description logo
|
|
3605
|
+
*/
|
|
3606
|
+
logo?: Logo;
|
|
3607
|
+
/**
|
|
3608
|
+
* @description bins
|
|
3609
|
+
*/
|
|
3610
|
+
bins?: string[];
|
|
3611
|
+
}
|
|
3612
|
+
|
|
3381
3613
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
3382
3614
|
|
|
3383
3615
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -3395,6 +3627,27 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
3395
3627
|
promotionDetails?: PromotionDetail[];
|
|
3396
3628
|
}
|
|
3397
3629
|
|
|
3630
|
+
declare type FontSource = CssFontSource | CustomFontSource;
|
|
3631
|
+
|
|
3632
|
+
declare interface FrontModulesToBeLoadedInterface {
|
|
3633
|
+
acquirerName: string;
|
|
3634
|
+
scriptUrl: string;
|
|
3635
|
+
}
|
|
3636
|
+
|
|
3637
|
+
/**
|
|
3638
|
+
* @description 分期银行展示模型
|
|
3639
|
+
*/
|
|
3640
|
+
declare interface FrontSupportIppBank {
|
|
3641
|
+
/**
|
|
3642
|
+
* @description bank short name or bank code
|
|
3643
|
+
*/
|
|
3644
|
+
bankShortName?: string;
|
|
3645
|
+
/**
|
|
3646
|
+
* @description logo
|
|
3647
|
+
*/
|
|
3648
|
+
logo?: Logo;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3398
3651
|
declare type GetI18nQueryParam = string | {
|
|
3399
3652
|
/**
|
|
3400
3653
|
* 多语言文案的 key
|
|
@@ -4026,6 +4279,14 @@ declare interface HTTPErrorCallbackOptions {
|
|
|
4026
4279
|
aborted?: 0 | 1;
|
|
4027
4280
|
}
|
|
4028
4281
|
|
|
4282
|
+
declare interface IApplePayContactField {
|
|
4283
|
+
email: string;
|
|
4284
|
+
name: string;
|
|
4285
|
+
phone: string;
|
|
4286
|
+
postalAddress: string;
|
|
4287
|
+
phoneticName: string;
|
|
4288
|
+
}
|
|
4289
|
+
|
|
4029
4290
|
declare interface iBaseElementClass {
|
|
4030
4291
|
new (name: string, config: BaseElementConfig): BaseElement;
|
|
4031
4292
|
elementType: string;
|
|
@@ -4193,6 +4454,100 @@ declare interface IOptions {
|
|
|
4193
4454
|
stayTime?: number;
|
|
4194
4455
|
}
|
|
4195
4456
|
|
|
4457
|
+
declare interface IPaymentSessionMetaData {
|
|
4458
|
+
clientId?: string;
|
|
4459
|
+
renderDisplayType?: string;
|
|
4460
|
+
paymentSessionConfig?: PaymentSessionConfig;
|
|
4461
|
+
securityConfig?: SessionSecurityConfig;
|
|
4462
|
+
moneyView?: any;
|
|
4463
|
+
extendInfo?: string;
|
|
4464
|
+
paymentMethodInfoView?: any;
|
|
4465
|
+
paymentView?: any;
|
|
4466
|
+
modernWeb?: boolean;
|
|
4467
|
+
action?: PaymentSessionAction;
|
|
4468
|
+
/**
|
|
4469
|
+
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4470
|
+
*/
|
|
4471
|
+
flowSwitchTags?: string;
|
|
4472
|
+
authUrlInfo?: {
|
|
4473
|
+
appIdentifier?: string;
|
|
4474
|
+
applinkUrl?: string;
|
|
4475
|
+
normalUrl?: string;
|
|
4476
|
+
schemeUrl?: string;
|
|
4477
|
+
authUrl?: string;
|
|
4478
|
+
};
|
|
4479
|
+
paymentSessionFactor?: {
|
|
4480
|
+
externalRiskTimeout?: number;
|
|
4481
|
+
extendInfo?: {
|
|
4482
|
+
merchantCapabilities?: string[];
|
|
4483
|
+
supportedNetworks?: string[];
|
|
4484
|
+
requiredBillingContactFields: IApplePayContactField[];
|
|
4485
|
+
requiredShippingContactFields: IApplePayContactField[];
|
|
4486
|
+
};
|
|
4487
|
+
merchantInfo?: {
|
|
4488
|
+
registeredCountry?: string;
|
|
4489
|
+
partnerId?: string;
|
|
4490
|
+
merchantName?: string;
|
|
4491
|
+
};
|
|
4492
|
+
order?: {
|
|
4493
|
+
orderDescription: string;
|
|
4494
|
+
};
|
|
4495
|
+
paymentAmount?: {
|
|
4496
|
+
value?: string;
|
|
4497
|
+
currency?: string;
|
|
4498
|
+
};
|
|
4499
|
+
paymentMethodInfo?: {
|
|
4500
|
+
paymentMethodType?: string;
|
|
4501
|
+
};
|
|
4502
|
+
paymentMethodViewMetaData?: any;
|
|
4503
|
+
paymentRequestId?: string;
|
|
4504
|
+
supportedLanguages?: any;
|
|
4505
|
+
/**
|
|
4506
|
+
* 当前为苹果分期场景的信息
|
|
4507
|
+
*/
|
|
4508
|
+
recurringInfo?: {
|
|
4509
|
+
/**
|
|
4510
|
+
* 代扣协议开始日期 不传为当前系统时间
|
|
4511
|
+
*/
|
|
4512
|
+
startDate?: number;
|
|
4513
|
+
/**
|
|
4514
|
+
* 代扣协议结束日期 不传不限制结束时间
|
|
4515
|
+
*/
|
|
4516
|
+
endDate?: number;
|
|
4517
|
+
/**
|
|
4518
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4519
|
+
*/
|
|
4520
|
+
intervalUnit?: string;
|
|
4521
|
+
/**
|
|
4522
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4523
|
+
*/
|
|
4524
|
+
intervalCount?: number;
|
|
4525
|
+
/**
|
|
4526
|
+
* 分期标题信息
|
|
4527
|
+
*/
|
|
4528
|
+
title?: string;
|
|
4529
|
+
/**
|
|
4530
|
+
* 分期管理页面
|
|
4531
|
+
*/
|
|
4532
|
+
managementURL?: string;
|
|
4533
|
+
/**
|
|
4534
|
+
* 苹果通知ipay MAPN信息变更的地址
|
|
4535
|
+
*/
|
|
4536
|
+
tokenNotificationURL?: string;
|
|
4537
|
+
/**
|
|
4538
|
+
* 分期协议描述
|
|
4539
|
+
*/
|
|
4540
|
+
agreementDescription?: string;
|
|
4541
|
+
};
|
|
4542
|
+
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4543
|
+
};
|
|
4544
|
+
connectFactor?: {
|
|
4545
|
+
enableConnect?: boolean;
|
|
4546
|
+
};
|
|
4547
|
+
skipRenderPaymentMethod?: boolean;
|
|
4548
|
+
needAccountConfirmPage?: boolean;
|
|
4549
|
+
}
|
|
4550
|
+
|
|
4196
4551
|
declare interface ISystemInfo {
|
|
4197
4552
|
readonly pixelRatio: number;
|
|
4198
4553
|
readonly windowWidth: number;
|
|
@@ -6692,6 +7047,68 @@ declare interface OneAccountInfo {
|
|
|
6692
7047
|
accountStatus?: string;
|
|
6693
7048
|
}
|
|
6694
7049
|
|
|
7050
|
+
/**
|
|
7051
|
+
* @description one account 账户信息查询结果
|
|
7052
|
+
*/
|
|
7053
|
+
declare interface OneAccountQueryResult {
|
|
7054
|
+
/**
|
|
7055
|
+
* @description 是否业务处理成功
|
|
7056
|
+
*/
|
|
7057
|
+
success?: boolean;
|
|
7058
|
+
/**
|
|
7059
|
+
* @description 错误上下文
|
|
7060
|
+
*/
|
|
7061
|
+
errorContext?: ErrorContext;
|
|
7062
|
+
/**
|
|
7063
|
+
* @description 返回结果码
|
|
7064
|
+
*/
|
|
7065
|
+
resultCode?: string;
|
|
7066
|
+
/**
|
|
7067
|
+
* @description 返回结果信息
|
|
7068
|
+
*/
|
|
7069
|
+
resultMessage?: string;
|
|
7070
|
+
/**
|
|
7071
|
+
* @description error actions
|
|
7072
|
+
*/
|
|
7073
|
+
errorActions?: Record<string, string>;
|
|
7074
|
+
/**
|
|
7075
|
+
* @description error code
|
|
7076
|
+
*/
|
|
7077
|
+
errorCode?: string;
|
|
7078
|
+
/**
|
|
7079
|
+
* @description error status
|
|
7080
|
+
*/
|
|
7081
|
+
errorStatus?: string;
|
|
7082
|
+
/**
|
|
7083
|
+
* @description error message
|
|
7084
|
+
*/
|
|
7085
|
+
errorMessage?: string;
|
|
7086
|
+
/**
|
|
7087
|
+
* @description extend info
|
|
7088
|
+
*/
|
|
7089
|
+
extendInfo?: Record<string, string>;
|
|
7090
|
+
/**
|
|
7091
|
+
* @description one account 账户信息
|
|
7092
|
+
*/
|
|
7093
|
+
accountInfo?: OneAccountInfo;
|
|
7094
|
+
/**
|
|
7095
|
+
* @description action form 下一步动作
|
|
7096
|
+
*/
|
|
7097
|
+
actionForm?: OtpChallengeActionForm;
|
|
7098
|
+
/**
|
|
7099
|
+
* @description 支付方式列表
|
|
7100
|
+
*/
|
|
7101
|
+
paymentMethods?: PaymentMethodView[];
|
|
7102
|
+
/**
|
|
7103
|
+
* @description 物流信息
|
|
7104
|
+
*/
|
|
7105
|
+
shippings?: ShippingInfo_2[];
|
|
7106
|
+
/**
|
|
7107
|
+
* @description 支付金额 (订单金额 + 物流费)
|
|
7108
|
+
*/
|
|
7109
|
+
paymentAmount?: MobileMoneyView;
|
|
7110
|
+
}
|
|
7111
|
+
|
|
6695
7112
|
/**
|
|
6696
7113
|
* @description OpenModal的返回值类型
|
|
6697
7114
|
*/
|
|
@@ -6895,6 +7312,56 @@ declare interface OSInfo {
|
|
|
6895
7312
|
osVer?: string;
|
|
6896
7313
|
}
|
|
6897
7314
|
|
|
7315
|
+
declare interface OtpChallengeActionForm {
|
|
7316
|
+
/**
|
|
7317
|
+
* @description action form type
|
|
7318
|
+
*/
|
|
7319
|
+
actionFormType?: string;
|
|
7320
|
+
/**
|
|
7321
|
+
* @description type of challenge
|
|
7322
|
+
*/
|
|
7323
|
+
challengeType?: string;
|
|
7324
|
+
/**
|
|
7325
|
+
* @description The actual render value
|
|
7326
|
+
*/
|
|
7327
|
+
challengeRenderValue?: string;
|
|
7328
|
+
/**
|
|
7329
|
+
* @description Describe the challenge is required by AAC or external party
|
|
7330
|
+
*/
|
|
7331
|
+
triggerSource?: string;
|
|
7332
|
+
/**
|
|
7333
|
+
* @description is support retry challenge
|
|
7334
|
+
* @default true
|
|
7335
|
+
*/
|
|
7336
|
+
isChallengeRetrySupported?: boolean;
|
|
7337
|
+
/**
|
|
7338
|
+
* @description is fist otp auto triggered
|
|
7339
|
+
* @default false
|
|
7340
|
+
*/
|
|
7341
|
+
isChallengeAutoTriggered?: boolean;
|
|
7342
|
+
/**
|
|
7343
|
+
* @description estimated challenge response duration
|
|
7344
|
+
* @default 0
|
|
7345
|
+
*/
|
|
7346
|
+
estimatedDuration?: number;
|
|
7347
|
+
/**
|
|
7348
|
+
* @description url - like h5 sdk challenge need to call back url
|
|
7349
|
+
*/
|
|
7350
|
+
challengeUrl?: string;
|
|
7351
|
+
/**
|
|
7352
|
+
* @description extend information
|
|
7353
|
+
*/
|
|
7354
|
+
extendInfo?: string;
|
|
7355
|
+
/**
|
|
7356
|
+
* @description verify Id
|
|
7357
|
+
*/
|
|
7358
|
+
verifyId?: string;
|
|
7359
|
+
/**
|
|
7360
|
+
* @description 重发次数
|
|
7361
|
+
*/
|
|
7362
|
+
resendLeftTimes?: number;
|
|
7363
|
+
}
|
|
7364
|
+
|
|
6898
7365
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
6899
7366
|
|
|
6900
7367
|
declare interface PayByLinkInfo {
|
|
@@ -6916,6 +7383,60 @@ declare interface PayByLinkInfo {
|
|
|
6916
7383
|
linkVersion?: number;
|
|
6917
7384
|
}
|
|
6918
7385
|
|
|
7386
|
+
/**
|
|
7387
|
+
* @description Payment element app config type
|
|
7388
|
+
*/
|
|
7389
|
+
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7390
|
+
/**
|
|
7391
|
+
* @description sessionData,无法通过updateConfig更新
|
|
7392
|
+
*/
|
|
7393
|
+
sessionData?: string;
|
|
7394
|
+
/* Excluded from this release type: merchantDomain */
|
|
7395
|
+
/* Excluded from this release type: renderData */
|
|
7396
|
+
/* Excluded from this release type: connectAccount */
|
|
7397
|
+
/* Excluded from this release type: sessionMetaData */
|
|
7398
|
+
/* Excluded from this release type: renderDataError */
|
|
7399
|
+
/* Excluded from this release type: sdkVersion */
|
|
7400
|
+
/* Excluded from this release type: _requestConfig */
|
|
7401
|
+
/* Excluded from this release type: logMetaData */
|
|
7402
|
+
/* Excluded from this release type: heightOfVisible */
|
|
7403
|
+
}
|
|
7404
|
+
|
|
7405
|
+
/**
|
|
7406
|
+
* @description Payment element appearance type
|
|
7407
|
+
*/
|
|
7408
|
+
export declare type PaymentAppearance = PickAppearance<{
|
|
7409
|
+
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7410
|
+
theme: AntomTheme;
|
|
7411
|
+
variables: AntomVariables;
|
|
7412
|
+
layout: AntomLayouts;
|
|
7413
|
+
}>;
|
|
7414
|
+
|
|
7415
|
+
/**
|
|
7416
|
+
* @description Payment element
|
|
7417
|
+
*/
|
|
7418
|
+
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7419
|
+
static elementType: string;
|
|
7420
|
+
constructor(name: string, config: PaymentElementConfig);
|
|
7421
|
+
/* Excluded from this release type: setup */
|
|
7422
|
+
/* Excluded from this release type: submit */
|
|
7423
|
+
protected focus(): void;
|
|
7424
|
+
protected blur(): void;
|
|
7425
|
+
protected clear(): void;
|
|
7426
|
+
}
|
|
7427
|
+
|
|
7428
|
+
/**
|
|
7429
|
+
* @description Payment element config type
|
|
7430
|
+
*/
|
|
7431
|
+
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7432
|
+
}
|
|
7433
|
+
|
|
7434
|
+
/**
|
|
7435
|
+
* @description Payment element events
|
|
7436
|
+
*/
|
|
7437
|
+
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7438
|
+
}
|
|
7439
|
+
|
|
6919
7440
|
declare interface PaymentElementView {
|
|
6920
7441
|
/**
|
|
6921
7442
|
* @description payment element key
|
|
@@ -7017,6 +7538,36 @@ declare interface PaymentEvaluationResult {
|
|
|
7017
7538
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7018
7539
|
}
|
|
7019
7540
|
|
|
7541
|
+
/**
|
|
7542
|
+
* @description Payment guidance information (CKP scenario)
|
|
7543
|
+
*
|
|
7544
|
+
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
7545
|
+
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
7546
|
+
* via Map, dynamically addable)
|
|
7547
|
+
*/
|
|
7548
|
+
declare interface PaymentGuideInfo {
|
|
7549
|
+
/**
|
|
7550
|
+
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
7551
|
+
* payment guide button when this field is populated
|
|
7552
|
+
*/
|
|
7553
|
+
appLinkUrlForWeb?: string;
|
|
7554
|
+
/**
|
|
7555
|
+
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
7556
|
+
* text fields
|
|
7557
|
+
*
|
|
7558
|
+
* <p>Example configuration:
|
|
7559
|
+
*
|
|
7560
|
+
* <pre>
|
|
7561
|
+
* {
|
|
7562
|
+
* "dividerText": "or pay using",
|
|
7563
|
+
* "directPayButtonText": "Pay directly with online banking",
|
|
7564
|
+
* "ctoPButtonText": "Continue to payment"
|
|
7565
|
+
* }
|
|
7566
|
+
* </pre>
|
|
7567
|
+
*/
|
|
7568
|
+
copyWriting?: Record<string, any>;
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7020
7571
|
/**
|
|
7021
7572
|
* @description 支付方式余额检查结果信息
|
|
7022
7573
|
*/
|
|
@@ -7079,6 +7630,10 @@ declare interface PaymentMethodView {
|
|
|
7079
7630
|
* @description icon
|
|
7080
7631
|
*/
|
|
7081
7632
|
icon?: string;
|
|
7633
|
+
/**
|
|
7634
|
+
* @description adaptive icon for PAYME payment method
|
|
7635
|
+
*/
|
|
7636
|
+
adaptiveIcon?: string;
|
|
7082
7637
|
/**
|
|
7083
7638
|
* @description icon对应的名称
|
|
7084
7639
|
*/
|
|
@@ -7087,6 +7642,10 @@ declare interface PaymentMethodView {
|
|
|
7087
7642
|
* @description 支付方式描述
|
|
7088
7643
|
*/
|
|
7089
7644
|
description?: string;
|
|
7645
|
+
/**
|
|
7646
|
+
* @description 支付方式点击后的描述
|
|
7647
|
+
*/
|
|
7648
|
+
descriptionAfterClick?: string;
|
|
7090
7649
|
/**
|
|
7091
7650
|
* @description category
|
|
7092
7651
|
*/
|
|
@@ -7221,6 +7780,10 @@ declare interface PaymentMethodView {
|
|
|
7221
7780
|
* @description 账单地址收集模式
|
|
7222
7781
|
*/
|
|
7223
7782
|
billingAddressCollectionMode?: string;
|
|
7783
|
+
/**
|
|
7784
|
+
* @description 分期银行信息列表
|
|
7785
|
+
*/
|
|
7786
|
+
supportIppBankList?: FrontSupportIppBank[];
|
|
7224
7787
|
}
|
|
7225
7788
|
|
|
7226
7789
|
declare interface PaymentOption {
|
|
@@ -7288,6 +7851,10 @@ declare interface PaymentOption {
|
|
|
7288
7851
|
* @description 支付选项Logo信息
|
|
7289
7852
|
*/
|
|
7290
7853
|
logo?: Logo;
|
|
7854
|
+
/**
|
|
7855
|
+
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
7856
|
+
*/
|
|
7857
|
+
description?: Record<string, string>;
|
|
7291
7858
|
/**
|
|
7292
7859
|
* @description extendInfo extendInfo information
|
|
7293
7860
|
*/
|
|
@@ -7355,6 +7922,13 @@ declare interface PaymentQuoteInfo {
|
|
|
7355
7922
|
* @description payment amount view
|
|
7356
7923
|
*/
|
|
7357
7924
|
paymentAmountView?: PaymentView;
|
|
7925
|
+
/**
|
|
7926
|
+
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
7927
|
+
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
7928
|
+
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
7929
|
+
* MYR/SGD currency pair
|
|
7930
|
+
*/
|
|
7931
|
+
quotePrice?: any;
|
|
7358
7932
|
}
|
|
7359
7933
|
|
|
7360
7934
|
/**
|
|
@@ -7464,6 +8038,45 @@ declare interface PaymentSessionConfig {
|
|
|
7464
8038
|
productSceneVersion?: string;
|
|
7465
8039
|
}
|
|
7466
8040
|
|
|
8041
|
+
/**
|
|
8042
|
+
* @description The submit params
|
|
8043
|
+
*/
|
|
8044
|
+
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8045
|
+
/**
|
|
8046
|
+
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8047
|
+
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8048
|
+
*/
|
|
8049
|
+
handleActions?: boolean;
|
|
8050
|
+
/**
|
|
8051
|
+
* @description 收件地址信息
|
|
8052
|
+
*/
|
|
8053
|
+
shippingInfo?: ShippingInfo;
|
|
8054
|
+
/**
|
|
8055
|
+
* @description 集成用户自定义信息(如 cardHolderName)
|
|
8056
|
+
*/
|
|
8057
|
+
params?: Record<string, unknown>;
|
|
8058
|
+
}
|
|
8059
|
+
|
|
8060
|
+
/**
|
|
8061
|
+
* @description Payment element submit result
|
|
8062
|
+
*/
|
|
8063
|
+
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8064
|
+
paymentSession?: {
|
|
8065
|
+
/**
|
|
8066
|
+
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8067
|
+
*/
|
|
8068
|
+
returnUrl: string;
|
|
8069
|
+
/**
|
|
8070
|
+
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8071
|
+
*/
|
|
8072
|
+
returnAppUrl?: string;
|
|
8073
|
+
/**
|
|
8074
|
+
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8075
|
+
*/
|
|
8076
|
+
returnAppScheme?: string;
|
|
8077
|
+
};
|
|
8078
|
+
}
|
|
8079
|
+
|
|
7467
8080
|
declare interface PaymentView {
|
|
7468
8081
|
/**
|
|
7469
8082
|
* @description 金额,以元为单位的金额
|
|
@@ -7582,6 +8195,11 @@ declare interface PeriodRule {
|
|
|
7582
8195
|
periodCount?: number;
|
|
7583
8196
|
}
|
|
7584
8197
|
|
|
8198
|
+
/**
|
|
8199
|
+
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8200
|
+
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8201
|
+
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8202
|
+
*/
|
|
7585
8203
|
declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
|
|
7586
8204
|
|
|
7587
8205
|
declare interface PluginContext {
|
|
@@ -9554,6 +10172,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
9554
10172
|
|
|
9555
10173
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
9556
10174
|
|
|
10175
|
+
/**
|
|
10176
|
+
* @description QR code configuration for code form view
|
|
10177
|
+
*/
|
|
10178
|
+
declare interface QrCodeConfig {
|
|
10179
|
+
/**
|
|
10180
|
+
* @description QR code render style, e.g. "rounded"
|
|
10181
|
+
*/
|
|
10182
|
+
renderStyle?: string;
|
|
10183
|
+
/**
|
|
10184
|
+
* @description QR code center icon, can be URL or Base64 format
|
|
10185
|
+
*/
|
|
10186
|
+
centerIcon?: string;
|
|
10187
|
+
/**
|
|
10188
|
+
* @description QR code corner icon, can be URL or Base64 format
|
|
10189
|
+
*/
|
|
10190
|
+
cornerIcon?: string;
|
|
10191
|
+
}
|
|
10192
|
+
|
|
9557
10193
|
declare interface Rate {
|
|
9558
10194
|
/**
|
|
9559
10195
|
* @description rate label value
|
|
@@ -9623,13 +10259,31 @@ declare class ReceivePort {
|
|
|
9623
10259
|
}): Promise<Record<string, any> | undefined>;
|
|
9624
10260
|
}
|
|
9625
10261
|
|
|
10262
|
+
/**
|
|
10263
|
+
* @description 从webapp重定向到新URL的配置项。
|
|
10264
|
+
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10265
|
+
*/
|
|
9626
10266
|
declare interface RedirectOption {
|
|
10267
|
+
/**
|
|
10268
|
+
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10269
|
+
*/
|
|
9627
10270
|
url: string;
|
|
10271
|
+
/**
|
|
10272
|
+
* @description 唤端到url地址,http或https的地址
|
|
10273
|
+
*/
|
|
10274
|
+
appLinkUrl?: string;
|
|
10275
|
+
/**
|
|
10276
|
+
* @description 唤端到schema地址, schema://的地址
|
|
10277
|
+
*/
|
|
10278
|
+
schemaUrl?: string;
|
|
10279
|
+
/**
|
|
10280
|
+
* @description 重定向模式,默认为redirect
|
|
10281
|
+
*/
|
|
9628
10282
|
mode?: 'redirect' | 'replace';
|
|
9629
10283
|
/**
|
|
9630
10284
|
* @description 是否重定向后销毁实例,默认为true
|
|
9631
10285
|
*/
|
|
9632
|
-
|
|
10286
|
+
destroy?: boolean;
|
|
9633
10287
|
}
|
|
9634
10288
|
|
|
9635
10289
|
declare type ReportData = {
|
|
@@ -9860,7 +10514,25 @@ declare interface SharePayInfo {
|
|
|
9860
10514
|
securityText?: string;
|
|
9861
10515
|
}
|
|
9862
10516
|
|
|
9863
|
-
declare interface ShippingInfo {
|
|
10517
|
+
export declare interface ShippingInfo {
|
|
10518
|
+
shippingName: {
|
|
10519
|
+
firstName: string;
|
|
10520
|
+
lastName: string;
|
|
10521
|
+
middleName?: string;
|
|
10522
|
+
fullName?: string;
|
|
10523
|
+
};
|
|
10524
|
+
shippingPhoneNo: string;
|
|
10525
|
+
shippingAddress: {
|
|
10526
|
+
region: string;
|
|
10527
|
+
address1: string;
|
|
10528
|
+
address2: string;
|
|
10529
|
+
city?: string;
|
|
10530
|
+
state?: string;
|
|
10531
|
+
zipCode: string;
|
|
10532
|
+
};
|
|
10533
|
+
}
|
|
10534
|
+
|
|
10535
|
+
declare interface ShippingInfo_2 {
|
|
9864
10536
|
/**
|
|
9865
10537
|
* @description The unique ID to identify the shipping info
|
|
9866
10538
|
*/
|
|
@@ -23778,16 +24450,20 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
23778
24450
|
|
|
23779
24451
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
23780
24452
|
|
|
24453
|
+
export declare type SubmitParams = {
|
|
24454
|
+
redirect?: 'always' | 'if_required';
|
|
24455
|
+
};
|
|
24456
|
+
|
|
23781
24457
|
/**
|
|
23782
|
-
* @description
|
|
24458
|
+
* @description 成功时的数据类型
|
|
23783
24459
|
*/
|
|
23784
24460
|
export declare type SubmitResult = {
|
|
24461
|
+
/* Excluded from this release type: code */
|
|
24462
|
+
/* Excluded from this release type: message */
|
|
23785
24463
|
/**
|
|
23786
24464
|
* 查询到的状态
|
|
23787
24465
|
*/
|
|
23788
24466
|
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
23789
|
-
/* Excluded from this release type: code */
|
|
23790
|
-
/* Excluded from this release type: message */
|
|
23791
24467
|
/**
|
|
23792
24468
|
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
23793
24469
|
*/
|
|
@@ -23800,6 +24476,10 @@ export declare type SubmitResult = {
|
|
|
23800
24476
|
* 查询到的结果消息
|
|
23801
24477
|
*/
|
|
23802
24478
|
message?: string;
|
|
24479
|
+
/**
|
|
24480
|
+
* @description 是否需要更换 session 重试
|
|
24481
|
+
*/
|
|
24482
|
+
needChangeSessionForRetry?: boolean;
|
|
23803
24483
|
};
|
|
23804
24484
|
/**
|
|
23805
24485
|
* 是否是用户手动取消3D
|
|
@@ -24258,6 +24938,16 @@ declare interface TerminalTypeAction {
|
|
|
24258
24938
|
interactionType?: string;
|
|
24259
24939
|
}
|
|
24260
24940
|
|
|
24941
|
+
/**
|
|
24942
|
+
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
24943
|
+
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
24944
|
+
* 确保两条路径的弹窗 loading 表现一致。
|
|
24945
|
+
*/
|
|
24946
|
+
export declare const themeColorMap: Record<AntomTheme, {
|
|
24947
|
+
theme: 'dark' | 'light';
|
|
24948
|
+
backgroundColor: string;
|
|
24949
|
+
}>;
|
|
24950
|
+
|
|
24261
24951
|
declare class Tracker {
|
|
24262
24952
|
protected requesterCacheWrapper?: RequesterCacheWrapper;
|
|
24263
24953
|
private initPromise;
|
|
@@ -24587,7 +25277,8 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
24587
25277
|
export declare type VaultingAppearanceProps = {
|
|
24588
25278
|
displaySetting: 'showCardBrandIcon';
|
|
24589
25279
|
theme: AntomTheme;
|
|
24590
|
-
variables:
|
|
25280
|
+
variables: AntomVariables;
|
|
25281
|
+
fonts?: FontSource[];
|
|
24591
25282
|
};
|
|
24592
25283
|
|
|
24593
25284
|
/**
|
|
@@ -24610,7 +25301,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
24610
25301
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
24611
25302
|
}
|
|
24612
25303
|
|
|
24613
|
-
export declare interface VaultingElementEvents extends
|
|
25304
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
24614
25305
|
}
|
|
24615
25306
|
|
|
24616
25307
|
/**
|