@alipay/ams-checkout 0.0.1779094014-dev.11 → 0.0.1779094014-dev.13
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 +3 -3
- package/dist/ams-checkout.min.js +1 -1
- package/dist/ams-checkout.min.js.map +1 -1
- package/esm/component/popupWindow.style.js +2 -1
- package/esm/config/index.js +1 -1
- package/esm/constant/index.d.ts +1 -0
- package/esm/constant/index.js +1 -0
- package/esm/core/component/element/elementContainerService/containerService.js +3 -2
- package/esm/core/component/element/index.js +2 -4
- package/esm/core/component/element/modernElementController/adapter.d.ts +5 -4
- package/esm/core/component/element/modernElementController/adapter.js +23 -19
- package/esm/core/component/element/modernElementController/index.d.ts +2 -1
- package/esm/core/component/element/modernElementController/index.js +5 -9
- package/esm/foundation/service/container/utils.js +3 -1
- package/esm/modern/global.d.ts +3 -0
- package/esm/modern/tools.d.ts +3 -2
- package/esm/modern/tools.js +1 -1
- package/esm/util/logger.js +1 -1
- package/package.json +4 -1
- package/types.d.ts +350 -25
- package/types.untrimmed.d.ts +491 -30
package/types.untrimmed.d.ts
CHANGED
|
@@ -143,7 +143,88 @@ declare interface AmountLimitInfo {
|
|
|
143
143
|
/**
|
|
144
144
|
* AntomBridge事件类型,包含了SDK与webapp通信的所有事件类型
|
|
145
145
|
*/
|
|
146
|
-
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any
|
|
146
|
+
export declare interface AntomBridgeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends BaseBridgeEventMap<AppConfig, SR, SubmitParams, string, AntomOpenModalConfig> {
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
|
|
151
|
+
*/
|
|
152
|
+
export declare interface AntomBridgeWithNativeEventMap<AppConfig extends Record<string, any> = Record<string, any>, SubmitParams extends Record<string, any> = Record<string, any>, SR extends SubmitResult = SubmitResult> extends AntomBridgeEventMap<AppConfig, SubmitParams, SR> {
|
|
153
|
+
/**
|
|
154
|
+
* @internal 展示半浮层
|
|
155
|
+
*/
|
|
156
|
+
showPopup: {
|
|
157
|
+
mode: string;
|
|
158
|
+
showAnimation: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* @internal 隐藏loading
|
|
162
|
+
*/
|
|
163
|
+
dismissLoading: Record<string, never>;
|
|
164
|
+
/**
|
|
165
|
+
* @internal 通知APP 收银台已经ready
|
|
166
|
+
*/
|
|
167
|
+
webAppReady: {
|
|
168
|
+
source: string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* @internal 通知app 应用已启动
|
|
172
|
+
*/
|
|
173
|
+
onLaunch: {
|
|
174
|
+
success: boolean;
|
|
175
|
+
source: string;
|
|
176
|
+
target: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* @internal 收到客户端返回action query的数据和商户的配置
|
|
180
|
+
*/
|
|
181
|
+
renderComponent: {
|
|
182
|
+
sessionResult?: Record<string, unknown>;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* @internal 心跳事件
|
|
186
|
+
*/
|
|
187
|
+
appHeartBeat: {
|
|
188
|
+
success: boolean;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* @internal 客户端 展示toast弹窗
|
|
192
|
+
*/
|
|
193
|
+
showToast: {
|
|
194
|
+
icon: string;
|
|
195
|
+
message: string;
|
|
196
|
+
source: string;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* @internal 客户端eventCallback 事件
|
|
200
|
+
*/
|
|
201
|
+
onEventCallback: {
|
|
202
|
+
code: string;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* @internal 发送回调码事件
|
|
206
|
+
*/
|
|
207
|
+
onSubmitPayCallback: CallbackReturnData;
|
|
208
|
+
/**
|
|
209
|
+
* @internal 重置收银台
|
|
210
|
+
*/
|
|
211
|
+
reset: Record<string, never>;
|
|
212
|
+
/**
|
|
213
|
+
* @internal 销毁收银台
|
|
214
|
+
*/
|
|
215
|
+
destroy: Record<string, never>;
|
|
216
|
+
/**
|
|
217
|
+
* @internal 关闭收银台
|
|
218
|
+
*/
|
|
219
|
+
onClose: Record<string, never>;
|
|
220
|
+
/**
|
|
221
|
+
* @internal 重定向
|
|
222
|
+
*/
|
|
223
|
+
onRedirect: {
|
|
224
|
+
normalUrl: string;
|
|
225
|
+
isDestroy: boolean;
|
|
226
|
+
needReset: boolean;
|
|
227
|
+
};
|
|
147
228
|
}
|
|
148
229
|
|
|
149
230
|
/**
|
|
@@ -178,6 +259,8 @@ declare interface AntomErrorResponse {
|
|
|
178
259
|
extendInfo?: Record<string, any>;
|
|
179
260
|
}
|
|
180
261
|
|
|
262
|
+
export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
263
|
+
|
|
181
264
|
/**
|
|
182
265
|
* 给中间页使用的桥接事件类型
|
|
183
266
|
* @internal 内部使用,不暴露到外部
|
|
@@ -194,13 +277,6 @@ export declare interface AntomMiddlePageEventMap extends AntomBridgeEventMap {
|
|
|
194
277
|
auto_close_modal: void;
|
|
195
278
|
}
|
|
196
279
|
|
|
197
|
-
/**
|
|
198
|
-
* 给modal和webapp页面messagePort使用的桥接事件类型
|
|
199
|
-
* @internal 内部使用,不暴露到外部
|
|
200
|
-
*/
|
|
201
|
-
export declare interface AntomModalEventMap extends AntomBridgeEventMap {
|
|
202
|
-
}
|
|
203
|
-
|
|
204
280
|
/**
|
|
205
281
|
* modal打开参数类型
|
|
206
282
|
* @internal 内部使用,不暴露到外部
|
|
@@ -229,9 +305,11 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
229
305
|
getContentWindow: () => Window;
|
|
230
306
|
}>;
|
|
231
307
|
elements(): Elements;
|
|
308
|
+
createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
232
309
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
233
310
|
createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
234
311
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
312
|
+
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
235
313
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
236
314
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
237
315
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
@@ -240,18 +318,8 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
240
318
|
* @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
|
|
241
319
|
*/
|
|
242
320
|
private extractMainElement;
|
|
243
|
-
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult
|
|
244
|
-
|
|
245
|
-
message: string;
|
|
246
|
-
status: string;
|
|
247
|
-
userCancel3D: boolean;
|
|
248
|
-
}>;
|
|
249
|
-
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult | {
|
|
250
|
-
code: string;
|
|
251
|
-
message: string;
|
|
252
|
-
userCancel3D: boolean;
|
|
253
|
-
status: string;
|
|
254
|
-
}>;
|
|
321
|
+
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult>;
|
|
322
|
+
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
|
|
255
323
|
}
|
|
256
324
|
|
|
257
325
|
/**
|
|
@@ -331,6 +399,8 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
|
|
|
331
399
|
|
|
332
400
|
export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
|
|
333
401
|
|
|
402
|
+
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';
|
|
403
|
+
|
|
334
404
|
declare interface APICallbackOptions {
|
|
335
405
|
requestType: 'fetch' | 'xhr';
|
|
336
406
|
time: number;
|
|
@@ -1355,6 +1425,42 @@ declare interface C2PProps {
|
|
|
1355
1425
|
merchantTransactionId?: string;
|
|
1356
1426
|
}
|
|
1357
1427
|
|
|
1428
|
+
/**
|
|
1429
|
+
* @description native回调错误信息格式
|
|
1430
|
+
* @internal
|
|
1431
|
+
*/
|
|
1432
|
+
export declare interface CallbackErrorInfo {
|
|
1433
|
+
code: string;
|
|
1434
|
+
message?: string;
|
|
1435
|
+
needChangeSessionForRetry?: boolean;
|
|
1436
|
+
traceId?: string;
|
|
1437
|
+
context?: string;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* @description native回调返回数据
|
|
1442
|
+
* @internal
|
|
1443
|
+
*/
|
|
1444
|
+
export declare interface CallbackReturnData {
|
|
1445
|
+
status?: string;
|
|
1446
|
+
userCanceled3D?: boolean;
|
|
1447
|
+
isExposed?: boolean;
|
|
1448
|
+
error?: CallbackErrorInfo;
|
|
1449
|
+
session?: {
|
|
1450
|
+
nextAction?: CallbackSessionNextAction;
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* @description native回调会话下一步操作,包含了回调的url
|
|
1456
|
+
* @internal
|
|
1457
|
+
*/
|
|
1458
|
+
export declare interface CallbackSessionNextAction {
|
|
1459
|
+
normalUrl?: string;
|
|
1460
|
+
schemeUrl?: string;
|
|
1461
|
+
applinkUrl?: string;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1358
1464
|
declare interface CardIssuerAuthentication {
|
|
1359
1465
|
/**
|
|
1360
1466
|
* @description 卡售卖单元
|
|
@@ -2599,7 +2705,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2599
2705
|
|
|
2600
2706
|
export declare type CVVAppearanceProps = {
|
|
2601
2707
|
theme: AntomTheme;
|
|
2602
|
-
variables:
|
|
2708
|
+
variables: AntomVariables;
|
|
2603
2709
|
};
|
|
2604
2710
|
|
|
2605
2711
|
/**
|
|
@@ -3784,6 +3890,11 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
3784
3890
|
promotionDetails?: PromotionDetail[];
|
|
3785
3891
|
}
|
|
3786
3892
|
|
|
3893
|
+
declare interface FrontModulesToBeLoadedInterface {
|
|
3894
|
+
acquirerName: string;
|
|
3895
|
+
scriptUrl: string;
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3787
3898
|
/**
|
|
3788
3899
|
* @description 分期银行展示模型
|
|
3789
3900
|
*/
|
|
@@ -4429,6 +4540,14 @@ declare interface HTTPErrorCallbackOptions {
|
|
|
4429
4540
|
aborted?: 0 | 1;
|
|
4430
4541
|
}
|
|
4431
4542
|
|
|
4543
|
+
declare interface IApplePayContactField {
|
|
4544
|
+
email: string;
|
|
4545
|
+
name: string;
|
|
4546
|
+
phone: string;
|
|
4547
|
+
postalAddress: string;
|
|
4548
|
+
phoneticName: string;
|
|
4549
|
+
}
|
|
4550
|
+
|
|
4432
4551
|
declare interface iBaseElementClass {
|
|
4433
4552
|
new (name: string, config: BaseElementConfig): BaseElement;
|
|
4434
4553
|
elementType: string;
|
|
@@ -4596,6 +4715,96 @@ declare interface IOptions {
|
|
|
4596
4715
|
stayTime?: number;
|
|
4597
4716
|
}
|
|
4598
4717
|
|
|
4718
|
+
declare interface IPaymentSessionMetaData {
|
|
4719
|
+
clientId?: string;
|
|
4720
|
+
renderDisplayType?: string;
|
|
4721
|
+
paymentSessionConfig?: PaymentSessionConfig;
|
|
4722
|
+
securityConfig?: SessionSecurityConfig;
|
|
4723
|
+
moneyView?: any;
|
|
4724
|
+
extendInfo?: string;
|
|
4725
|
+
paymentMethodInfoView?: any;
|
|
4726
|
+
paymentView?: any;
|
|
4727
|
+
modernWeb?: boolean;
|
|
4728
|
+
action?: PaymentSessionAction;
|
|
4729
|
+
authUrlInfo?: {
|
|
4730
|
+
appIdentifier?: string;
|
|
4731
|
+
applinkUrl?: string;
|
|
4732
|
+
normalUrl?: string;
|
|
4733
|
+
schemeUrl?: string;
|
|
4734
|
+
authUrl?: string;
|
|
4735
|
+
};
|
|
4736
|
+
paymentSessionFactor?: {
|
|
4737
|
+
externalRiskTimeout?: number;
|
|
4738
|
+
extendInfo?: {
|
|
4739
|
+
merchantCapabilities?: string[];
|
|
4740
|
+
supportedNetworks?: string[];
|
|
4741
|
+
requiredBillingContactFields: IApplePayContactField[];
|
|
4742
|
+
requiredShippingContactFields: IApplePayContactField[];
|
|
4743
|
+
};
|
|
4744
|
+
merchantInfo?: {
|
|
4745
|
+
registeredCountry?: string;
|
|
4746
|
+
partnerId?: string;
|
|
4747
|
+
merchantName?: string;
|
|
4748
|
+
};
|
|
4749
|
+
order?: {
|
|
4750
|
+
orderDescription: string;
|
|
4751
|
+
};
|
|
4752
|
+
paymentAmount?: {
|
|
4753
|
+
value?: string;
|
|
4754
|
+
currency?: string;
|
|
4755
|
+
};
|
|
4756
|
+
paymentMethodInfo?: {
|
|
4757
|
+
paymentMethodType?: string;
|
|
4758
|
+
};
|
|
4759
|
+
paymentMethodViewMetaData?: any;
|
|
4760
|
+
paymentRequestId?: string;
|
|
4761
|
+
supportedLanguages?: any;
|
|
4762
|
+
/**
|
|
4763
|
+
* 当前为苹果分期场景的信息
|
|
4764
|
+
*/
|
|
4765
|
+
recurringInfo?: {
|
|
4766
|
+
/**
|
|
4767
|
+
* 代扣协议开始日期 不传为当前系统时间
|
|
4768
|
+
*/
|
|
4769
|
+
startDate?: number;
|
|
4770
|
+
/**
|
|
4771
|
+
* 代扣协议结束日期 不传不限制结束时间
|
|
4772
|
+
*/
|
|
4773
|
+
endDate?: number;
|
|
4774
|
+
/**
|
|
4775
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
4776
|
+
*/
|
|
4777
|
+
intervalUnit?: string;
|
|
4778
|
+
/**
|
|
4779
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
4780
|
+
*/
|
|
4781
|
+
intervalCount?: number;
|
|
4782
|
+
/**
|
|
4783
|
+
* 分期标题信息
|
|
4784
|
+
*/
|
|
4785
|
+
title?: string;
|
|
4786
|
+
/**
|
|
4787
|
+
* 分期管理页面
|
|
4788
|
+
*/
|
|
4789
|
+
managementURL?: string;
|
|
4790
|
+
/**
|
|
4791
|
+
* 苹果通知ipay MAPN信息变更的地址
|
|
4792
|
+
*/
|
|
4793
|
+
tokenNotificationURL?: string;
|
|
4794
|
+
/**
|
|
4795
|
+
* 分期协议描述
|
|
4796
|
+
*/
|
|
4797
|
+
agreementDescription?: string;
|
|
4798
|
+
};
|
|
4799
|
+
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
4800
|
+
};
|
|
4801
|
+
connectFactor?: {
|
|
4802
|
+
enableConnect?: boolean;
|
|
4803
|
+
};
|
|
4804
|
+
skipRenderPaymentMethod?: boolean;
|
|
4805
|
+
needAccountConfirmPage?: boolean;
|
|
4806
|
+
}
|
|
4807
|
+
|
|
4599
4808
|
declare interface ISystemInfo {
|
|
4600
4809
|
readonly pixelRatio: number;
|
|
4601
4810
|
readonly windowWidth: number;
|
|
@@ -7095,6 +7304,68 @@ declare interface OneAccountInfo {
|
|
|
7095
7304
|
accountStatus?: string;
|
|
7096
7305
|
}
|
|
7097
7306
|
|
|
7307
|
+
/**
|
|
7308
|
+
* @description one account 账户信息查询结果
|
|
7309
|
+
*/
|
|
7310
|
+
declare interface OneAccountQueryResult {
|
|
7311
|
+
/**
|
|
7312
|
+
* @description 是否业务处理成功
|
|
7313
|
+
*/
|
|
7314
|
+
success?: boolean;
|
|
7315
|
+
/**
|
|
7316
|
+
* @description 错误上下文
|
|
7317
|
+
*/
|
|
7318
|
+
errorContext?: ErrorContext;
|
|
7319
|
+
/**
|
|
7320
|
+
* @description 返回结果码
|
|
7321
|
+
*/
|
|
7322
|
+
resultCode?: string;
|
|
7323
|
+
/**
|
|
7324
|
+
* @description 返回结果信息
|
|
7325
|
+
*/
|
|
7326
|
+
resultMessage?: string;
|
|
7327
|
+
/**
|
|
7328
|
+
* @description error actions
|
|
7329
|
+
*/
|
|
7330
|
+
errorActions?: Record<string, string>;
|
|
7331
|
+
/**
|
|
7332
|
+
* @description error code
|
|
7333
|
+
*/
|
|
7334
|
+
errorCode?: string;
|
|
7335
|
+
/**
|
|
7336
|
+
* @description error status
|
|
7337
|
+
*/
|
|
7338
|
+
errorStatus?: string;
|
|
7339
|
+
/**
|
|
7340
|
+
* @description error message
|
|
7341
|
+
*/
|
|
7342
|
+
errorMessage?: string;
|
|
7343
|
+
/**
|
|
7344
|
+
* @description extend info
|
|
7345
|
+
*/
|
|
7346
|
+
extendInfo?: Record<string, string>;
|
|
7347
|
+
/**
|
|
7348
|
+
* @description one account 账户信息
|
|
7349
|
+
*/
|
|
7350
|
+
accountInfo?: OneAccountInfo;
|
|
7351
|
+
/**
|
|
7352
|
+
* @description action form 下一步动作
|
|
7353
|
+
*/
|
|
7354
|
+
actionForm?: OtpChallengeActionForm;
|
|
7355
|
+
/**
|
|
7356
|
+
* @description 支付方式列表
|
|
7357
|
+
*/
|
|
7358
|
+
paymentMethods?: PaymentMethodView[];
|
|
7359
|
+
/**
|
|
7360
|
+
* @description 物流信息
|
|
7361
|
+
*/
|
|
7362
|
+
shippings?: ShippingInfo[];
|
|
7363
|
+
/**
|
|
7364
|
+
* @description 支付金额 (订单金额 + 物流费)
|
|
7365
|
+
*/
|
|
7366
|
+
paymentAmount?: MobileMoneyView;
|
|
7367
|
+
}
|
|
7368
|
+
|
|
7098
7369
|
/**
|
|
7099
7370
|
* @description OpenModal的返回值类型
|
|
7100
7371
|
*/
|
|
@@ -7301,6 +7572,56 @@ declare interface OSInfo {
|
|
|
7301
7572
|
osVer?: string;
|
|
7302
7573
|
}
|
|
7303
7574
|
|
|
7575
|
+
declare interface OtpChallengeActionForm {
|
|
7576
|
+
/**
|
|
7577
|
+
* @description action form type
|
|
7578
|
+
*/
|
|
7579
|
+
actionFormType?: string;
|
|
7580
|
+
/**
|
|
7581
|
+
* @description type of challenge
|
|
7582
|
+
*/
|
|
7583
|
+
challengeType?: string;
|
|
7584
|
+
/**
|
|
7585
|
+
* @description The actual render value
|
|
7586
|
+
*/
|
|
7587
|
+
challengeRenderValue?: string;
|
|
7588
|
+
/**
|
|
7589
|
+
* @description Describe the challenge is required by AAC or external party
|
|
7590
|
+
*/
|
|
7591
|
+
triggerSource?: string;
|
|
7592
|
+
/**
|
|
7593
|
+
* @description is support retry challenge
|
|
7594
|
+
* @default true
|
|
7595
|
+
*/
|
|
7596
|
+
isChallengeRetrySupported?: boolean;
|
|
7597
|
+
/**
|
|
7598
|
+
* @description is fist otp auto triggered
|
|
7599
|
+
* @default false
|
|
7600
|
+
*/
|
|
7601
|
+
isChallengeAutoTriggered?: boolean;
|
|
7602
|
+
/**
|
|
7603
|
+
* @description estimated challenge response duration
|
|
7604
|
+
* @default 0
|
|
7605
|
+
*/
|
|
7606
|
+
estimatedDuration?: number;
|
|
7607
|
+
/**
|
|
7608
|
+
* @description url - like h5 sdk challenge need to call back url
|
|
7609
|
+
*/
|
|
7610
|
+
challengeUrl?: string;
|
|
7611
|
+
/**
|
|
7612
|
+
* @description extend information
|
|
7613
|
+
*/
|
|
7614
|
+
extendInfo?: string;
|
|
7615
|
+
/**
|
|
7616
|
+
* @description verify Id
|
|
7617
|
+
*/
|
|
7618
|
+
verifyId?: string;
|
|
7619
|
+
/**
|
|
7620
|
+
* @description 重发次数
|
|
7621
|
+
*/
|
|
7622
|
+
resendLeftTimes?: number;
|
|
7623
|
+
}
|
|
7624
|
+
|
|
7304
7625
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
7305
7626
|
|
|
7306
7627
|
declare interface PayByLinkInfo {
|
|
@@ -7322,6 +7643,99 @@ declare interface PayByLinkInfo {
|
|
|
7322
7643
|
linkVersion?: number;
|
|
7323
7644
|
}
|
|
7324
7645
|
|
|
7646
|
+
/**
|
|
7647
|
+
* @description Payment element app config type
|
|
7648
|
+
*/
|
|
7649
|
+
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7650
|
+
/**
|
|
7651
|
+
* @description sessionData,无法通过updateConfig更新
|
|
7652
|
+
*/
|
|
7653
|
+
sessionData?: string;
|
|
7654
|
+
/**
|
|
7655
|
+
* @internal sdk所在hostname
|
|
7656
|
+
*/
|
|
7657
|
+
merchantDomain: string;
|
|
7658
|
+
/**
|
|
7659
|
+
* @internal 渲染数据
|
|
7660
|
+
*/
|
|
7661
|
+
renderData?: CashierSdkActionQueryResult;
|
|
7662
|
+
/**
|
|
7663
|
+
* @internal connect时有这个数据
|
|
7664
|
+
*/
|
|
7665
|
+
connectAccount?: OneAccountQueryResult;
|
|
7666
|
+
/**
|
|
7667
|
+
* @internal sessionData解析后的数据
|
|
7668
|
+
*/
|
|
7669
|
+
sessionMetaData?: IPaymentSessionMetaData;
|
|
7670
|
+
/**
|
|
7671
|
+
* @internal 渲染数据错误信息
|
|
7672
|
+
*/
|
|
7673
|
+
renderDataError?: ErrorPayload;
|
|
7674
|
+
/**
|
|
7675
|
+
* @internal sdk 版本号
|
|
7676
|
+
*/
|
|
7677
|
+
sdkVersion?: string;
|
|
7678
|
+
/**
|
|
7679
|
+
* @internal 内部联调使用,生产环境传递无效
|
|
7680
|
+
*/
|
|
7681
|
+
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7682
|
+
/**
|
|
7683
|
+
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7684
|
+
*/
|
|
7685
|
+
logMetaData?: {
|
|
7686
|
+
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7687
|
+
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7688
|
+
trackId: string;
|
|
7689
|
+
merchantId?: string;
|
|
7690
|
+
paymentMethodType?: string;
|
|
7691
|
+
};
|
|
7692
|
+
/**
|
|
7693
|
+
* @internal 内部使用,无需用户传递,高度信息
|
|
7694
|
+
*/
|
|
7695
|
+
heightOfVisible?: number;
|
|
7696
|
+
}
|
|
7697
|
+
|
|
7698
|
+
/**
|
|
7699
|
+
* @description Payment element appearance type
|
|
7700
|
+
*/
|
|
7701
|
+
export declare type PaymentAppearance = PickAppearance<{
|
|
7702
|
+
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7703
|
+
theme: AntomTheme;
|
|
7704
|
+
variables: AntomVariables;
|
|
7705
|
+
layout: AntomLayouts;
|
|
7706
|
+
}>;
|
|
7707
|
+
|
|
7708
|
+
/**
|
|
7709
|
+
* @description Payment element
|
|
7710
|
+
*/
|
|
7711
|
+
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7712
|
+
static elementType: string;
|
|
7713
|
+
constructor(name: string, config: PaymentElementConfig);
|
|
7714
|
+
/**
|
|
7715
|
+
* @internal
|
|
7716
|
+
*/
|
|
7717
|
+
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7718
|
+
/**
|
|
7719
|
+
* @internal
|
|
7720
|
+
*/
|
|
7721
|
+
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7722
|
+
protected focus(): void;
|
|
7723
|
+
protected blur(): void;
|
|
7724
|
+
protected clear(): void;
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
/**
|
|
7728
|
+
* @description Payment element config type
|
|
7729
|
+
*/
|
|
7730
|
+
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7731
|
+
}
|
|
7732
|
+
|
|
7733
|
+
/**
|
|
7734
|
+
* @description Payment element events
|
|
7735
|
+
*/
|
|
7736
|
+
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7737
|
+
}
|
|
7738
|
+
|
|
7325
7739
|
declare interface PaymentElementView {
|
|
7326
7740
|
/**
|
|
7327
7741
|
* @description payment element key
|
|
@@ -7923,6 +8337,32 @@ declare interface PaymentSessionConfig {
|
|
|
7923
8337
|
productSceneVersion?: string;
|
|
7924
8338
|
}
|
|
7925
8339
|
|
|
8340
|
+
/**
|
|
8341
|
+
* @description The submit params
|
|
8342
|
+
*/
|
|
8343
|
+
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8344
|
+
}
|
|
8345
|
+
|
|
8346
|
+
/**
|
|
8347
|
+
* @description Payment element submit result
|
|
8348
|
+
*/
|
|
8349
|
+
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8350
|
+
paymentSession?: {
|
|
8351
|
+
/**
|
|
8352
|
+
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8353
|
+
*/
|
|
8354
|
+
returnUrl: string;
|
|
8355
|
+
/**
|
|
8356
|
+
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8357
|
+
*/
|
|
8358
|
+
returnAppUrl?: string;
|
|
8359
|
+
/**
|
|
8360
|
+
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8361
|
+
*/
|
|
8362
|
+
returnAppScheme?: string;
|
|
8363
|
+
};
|
|
8364
|
+
}
|
|
8365
|
+
|
|
7926
8366
|
declare interface PaymentView {
|
|
7927
8367
|
/**
|
|
7928
8368
|
* @description 金额,以元为单位的金额
|
|
@@ -24269,22 +24709,43 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
24269
24709
|
|
|
24270
24710
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
24271
24711
|
|
|
24712
|
+
export declare type SubmitParams = {
|
|
24713
|
+
redirect?: 'always' | 'if_required';
|
|
24714
|
+
};
|
|
24715
|
+
|
|
24272
24716
|
/**
|
|
24273
|
-
* @description
|
|
24717
|
+
* @description 成功时的数据类型
|
|
24274
24718
|
*/
|
|
24275
24719
|
export declare type SubmitResult = {
|
|
24276
24720
|
/**
|
|
24277
|
-
*
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
/**
|
|
24281
|
-
* 查询到的结果码或者错误码, 在SUCCESS和CANCELLED无该字段
|
|
24721
|
+
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
24722
|
+
* @deprecated 已废弃请读取error中的code
|
|
24723
|
+
* @internal
|
|
24282
24724
|
*/
|
|
24283
24725
|
code?: string;
|
|
24284
24726
|
/**
|
|
24285
|
-
* 查询到的结果消息, 在SUCCESS
|
|
24727
|
+
* 查询到的结果消息, 在SUCCESS无该字段
|
|
24728
|
+
* @deprecated 已废弃请读取error中的message
|
|
24729
|
+
* @internal
|
|
24286
24730
|
*/
|
|
24287
24731
|
message?: string;
|
|
24732
|
+
/**
|
|
24733
|
+
* 查询到的状态
|
|
24734
|
+
*/
|
|
24735
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
24736
|
+
/**
|
|
24737
|
+
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
24738
|
+
*/
|
|
24739
|
+
error?: {
|
|
24740
|
+
/**
|
|
24741
|
+
* 查询到的结果码或者错误码
|
|
24742
|
+
*/
|
|
24743
|
+
code?: string;
|
|
24744
|
+
/**
|
|
24745
|
+
* 查询到的结果消息
|
|
24746
|
+
*/
|
|
24747
|
+
message?: string;
|
|
24748
|
+
};
|
|
24288
24749
|
/**
|
|
24289
24750
|
* 是否是用户手动取消3D
|
|
24290
24751
|
*/
|
|
@@ -25086,7 +25547,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
25086
25547
|
export declare type VaultingAppearanceProps = {
|
|
25087
25548
|
displaySetting: 'showCardBrandIcon';
|
|
25088
25549
|
theme: AntomTheme;
|
|
25089
|
-
variables:
|
|
25550
|
+
variables: AntomVariables;
|
|
25090
25551
|
};
|
|
25091
25552
|
|
|
25092
25553
|
/**
|
|
@@ -25115,7 +25576,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
25115
25576
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
25116
25577
|
}
|
|
25117
25578
|
|
|
25118
|
-
export declare interface VaultingElementEvents extends
|
|
25579
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
25119
25580
|
}
|
|
25120
25581
|
|
|
25121
25582
|
/**
|