@alipay/ams-checkout 0.0.1779094014-dev.2 → 0.0.1779094014-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts +7 -0
- package/esm/config/index.js +2 -2
- 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/elementProcessor/paymentProcessor.js +42 -4
- package/esm/core/component/element/index.d.ts +3 -0
- package/esm/core/component/element/index.js +13 -8
- package/esm/core/component/element/modernElementController/adapter.d.ts +5 -5
- package/esm/core/component/element/modernElementController/adapter.js +23 -19
- package/esm/core/component/element/modernElementController/index.d.ts +43 -13
- package/esm/core/component/element/modernElementController/index.js +585 -263
- package/esm/core/component/element/type.d.ts +6 -18
- package/esm/foundation/service/container/utils.js +3 -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/plugin/component/channel.d.ts +4 -1
- package/esm/plugin/component/channel.js +6 -2
- package/esm/plugin/component/index.js +7 -6
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/types/index.d.ts +1 -0
- package/esm/util/logger.js +1 -2
- package/package.json +23 -10
- package/types.d.ts +896 -71
- package/types.untrimmed.d.ts +1203 -113
- package/esm/modern/oneapi/iexpfront/PaymentSessionService.d.ts +0 -23
- package/esm/modern/oneapi/iexpfront/PaymentSessionService.js +0 -55
- package/esm/modern/oneapi/iexpfront/definitions.d.ts +0 -3656
- package/esm/modern/oneapi/iexpfront/definitions.js +0 -1
- package/esm/modern/tools/AntomSDKError.d.ts +0 -47
- package/esm/modern/tools/AntomSDKError.js +0 -47
- package/esm/modern/tools/buildPageUrl.d.ts +0 -4
- package/esm/modern/tools/buildPageUrl.js +0 -19
- package/esm/modern/tools/getDevReqConfig.d.ts +0 -2
- package/esm/modern/tools/getDevReqConfig.js +0 -16
- package/esm/modern/tools/getLocaleFromRenderData.d.ts +0 -6
- package/esm/modern/tools/getLocaleFromRenderData.js +0 -20
- package/esm/modern/tools/getMetaData.d.ts +0 -102
- package/esm/modern/tools/getMetaData.js +0 -7
- package/esm/modern/tools/openModal.d.ts +0 -20
- package/esm/modern/tools/openModal.js +0 -221
package/types.untrimmed.d.ts
CHANGED
|
@@ -143,25 +143,138 @@ 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
147
|
}
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
151
|
-
* @internal 内部使用,不暴露到外部
|
|
150
|
+
* @description 整合了native事件的eventMap,如果你的业务element需要支持native,事件请继承这个类型
|
|
152
151
|
*/
|
|
153
|
-
export declare interface
|
|
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> {
|
|
154
153
|
/**
|
|
155
|
-
* @
|
|
154
|
+
* @internal 展示半浮层
|
|
156
155
|
*/
|
|
157
|
-
|
|
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
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @description Antom的错误基类,直接使用则无错误码校验。
|
|
232
|
+
*/
|
|
233
|
+
declare class AntomError<T extends string = string> extends OpenSDKError<T> {
|
|
234
|
+
name: string;
|
|
235
|
+
response?: AntomErrorResponse;
|
|
236
|
+
static isError(error: unknown): error is AntomError;
|
|
237
|
+
/**
|
|
238
|
+
* @description 统一转换error为AntomError
|
|
239
|
+
*/
|
|
240
|
+
static unificationError(error: unknown, source?: ErrorSource): AntomError;
|
|
158
241
|
}
|
|
159
242
|
|
|
160
243
|
/**
|
|
161
|
-
*
|
|
244
|
+
* @description success为false的response
|
|
245
|
+
*/
|
|
246
|
+
declare interface AntomErrorResponse {
|
|
247
|
+
traceId?: string;
|
|
248
|
+
errorMessage?: string;
|
|
249
|
+
errorCode?: string;
|
|
250
|
+
resultMessage?: string;
|
|
251
|
+
errorContext?: {
|
|
252
|
+
errorStack?: {
|
|
253
|
+
errorName?: string;
|
|
254
|
+
errorMessage?: string;
|
|
255
|
+
}[];
|
|
256
|
+
};
|
|
257
|
+
success?: false;
|
|
258
|
+
errorStatus?: 'F' | 'U';
|
|
259
|
+
extendInfo?: Record<string, any>;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare type AntomLayouts = 'tabs' | 'accordion';
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* 给中间页使用的桥接事件类型
|
|
162
266
|
* @internal 内部使用,不暴露到外部
|
|
163
267
|
*/
|
|
164
|
-
export declare interface
|
|
268
|
+
export declare interface AntomMiddlePageEventMap extends AntomBridgeEventMap {
|
|
269
|
+
/**
|
|
270
|
+
* @description 3DS流程完成
|
|
271
|
+
* @deprecated 使用auto_close_modal
|
|
272
|
+
*/
|
|
273
|
+
three_ds_end: void;
|
|
274
|
+
/**
|
|
275
|
+
* @description 正常结束自动关闭事件
|
|
276
|
+
*/
|
|
277
|
+
auto_close_modal: void;
|
|
165
278
|
}
|
|
166
279
|
|
|
167
280
|
/**
|
|
@@ -192,9 +305,11 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
192
305
|
getContentWindow: () => Window;
|
|
193
306
|
}>;
|
|
194
307
|
elements(): Elements;
|
|
308
|
+
createElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
195
309
|
createElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
196
310
|
createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
197
311
|
createElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
312
|
+
getElement(elementType: 'payment', options?: PaymentAppConfig): PaymentElement;
|
|
198
313
|
getElement(elementType: 'vaulting', options?: VaultingAppConfig): VaultingElement;
|
|
199
314
|
getElement(elementType: 'CVV', options?: CVVAppConfig): CVVElement;
|
|
200
315
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
@@ -203,18 +318,8 @@ export declare class AntomSDK extends BaseElementsFactory {
|
|
|
203
318
|
* @throws {AntomSDKError} 当无法找到有效的主元素时抛出错误
|
|
204
319
|
*/
|
|
205
320
|
private extractMainElement;
|
|
206
|
-
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult
|
|
207
|
-
|
|
208
|
-
message: string;
|
|
209
|
-
status: string;
|
|
210
|
-
userCancel3D: boolean;
|
|
211
|
-
}>;
|
|
212
|
-
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult | {
|
|
213
|
-
code: string;
|
|
214
|
-
message: string;
|
|
215
|
-
userCancel3D: boolean;
|
|
216
|
-
status: string;
|
|
217
|
-
}>;
|
|
321
|
+
confirmCardSetup(options: ConfirmCardSetupOptions): Promise<SubmitResult>;
|
|
322
|
+
confirmPayment(options: ConfirmPaymentOptions): Promise<SubmitResult>;
|
|
218
323
|
}
|
|
219
324
|
|
|
220
325
|
/**
|
|
@@ -224,7 +329,93 @@ export declare interface AntomSDKConfig extends Omit<BaseFactoryConfig, 'version
|
|
|
224
329
|
version?: string;
|
|
225
330
|
}
|
|
226
331
|
|
|
227
|
-
export declare
|
|
332
|
+
export declare class AntomSDKError extends AntomError<AntomSDKErrorCodes> {
|
|
333
|
+
name: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export declare const AntomSDKErrorCodes: {
|
|
337
|
+
/**
|
|
338
|
+
* @description 找不到主元素
|
|
339
|
+
*/
|
|
340
|
+
readonly NOT_FIND_MAINELEMENT: "NOT_FIND_MAINELEMENT";
|
|
341
|
+
/**
|
|
342
|
+
* @description sessionData无效
|
|
343
|
+
*/
|
|
344
|
+
readonly SESSION_DATA_INVALID: "SESSION_DATA_INVALID";
|
|
345
|
+
/**
|
|
346
|
+
* @description WebApp 初始化超时
|
|
347
|
+
*/
|
|
348
|
+
readonly SDK_LAUNCH_PAYMENT_APP_ERROR: "SDK_LAUNCH_PAYMENT_APP_ERROR";
|
|
349
|
+
/**
|
|
350
|
+
* @description 参数非法,缺少必填参数或参数值不合法
|
|
351
|
+
*/
|
|
352
|
+
readonly PARAM_INVALID: "PARAM_INVALID";
|
|
353
|
+
/**
|
|
354
|
+
* @description channelClientId 查询接口超时
|
|
355
|
+
*/
|
|
356
|
+
readonly CHANNEL_CLIENT_ID_QUERY_TIMEOUT: "CHANNEL_CLIENT_ID_QUERY_TIMEOUT";
|
|
357
|
+
/**
|
|
358
|
+
* @description channelClientId 查询返回 success=true 但缺少 channelClientId
|
|
359
|
+
*/
|
|
360
|
+
readonly CHANNEL_CLIENT_ID_MISSING: "CHANNEL_CLIENT_ID_MISSING";
|
|
361
|
+
/**
|
|
362
|
+
* @description channelClientId 查询失败(success=false 或其他异常)
|
|
363
|
+
*/
|
|
364
|
+
readonly CHANNEL_CLIENT_ID_QUERY_FAILED: "CHANNEL_CLIENT_ID_QUERY_FAILED";
|
|
365
|
+
/**
|
|
366
|
+
* @description channelClientId 查询失败(请求异常,如网络错误、服务器错误等)
|
|
367
|
+
*/
|
|
368
|
+
readonly CHANNEL_CLIENT_ID_QUERY_ERROR: "CHANNEL_CLIENT_ID_QUERY_ERROR";
|
|
369
|
+
/**
|
|
370
|
+
* @description checkout 页面未加载成功,不允许 updateConfig
|
|
371
|
+
*/
|
|
372
|
+
readonly CHECKOUT_NOT_READY: "CHECKOUT_NOT_READY";
|
|
373
|
+
/**
|
|
374
|
+
* @description 支付进行中,不允许更新金额
|
|
375
|
+
*/
|
|
376
|
+
readonly PAYMENT_IN_PROGRESS: "PAYMENT_IN_PROGRESS";
|
|
377
|
+
/**
|
|
378
|
+
* @description 金额不能为空
|
|
379
|
+
*/
|
|
380
|
+
readonly AMOUNT_VALUE_EMPTY: "AMOUNT_VALUE_EMPTY";
|
|
381
|
+
/**
|
|
382
|
+
* @description 金额格式非法(仅允许整数和小数)
|
|
383
|
+
*/
|
|
384
|
+
readonly AMOUNT_VALUE_INVALID: "AMOUNT_VALUE_INVALID";
|
|
385
|
+
readonly GENERATE_ELEMENT_KEY_FAILED: "GENERATE_ELEMENT_KEY_FAILED";
|
|
386
|
+
readonly ELEMENT_INIT_FAILED: "ELEMENT_INIT_FAILED";
|
|
387
|
+
readonly MOUNT_TIMEOUT: "MOUNT_TIMEOUT";
|
|
388
|
+
readonly MOUNT_MISSING_CONTAINER: "MOUNT_MISSING_CONTAINER";
|
|
389
|
+
readonly MOUNT_IFRAME_LOAD_ERROR: "MOUNT_IFRAME_LOAD_ERROR";
|
|
390
|
+
readonly MOUNT_NOT_MAINELEMENT_WITH_SINGLE_MODE: "MOUNT_NOT_MAINELEMENT_WITH_SINGLE_MODE";
|
|
391
|
+
readonly MOUNT_NOT_SUPPORT: "MOUNT_NOT_SUPPORT";
|
|
392
|
+
readonly MOUNT_INITIAL_FAILED: "MOUNT_INITIAL_FAILED";
|
|
393
|
+
readonly ELEMENT_INSTANCE_DESTROYED: "ELEMENT_INSTANCE_DESTROYED";
|
|
394
|
+
readonly ELEMENT_DEFINE_ERROR: "ELEMENT_DEFINE_ERROR";
|
|
395
|
+
readonly ELEMENT_ALREADY_REGISTERED: "ELEMENT_ALREADY_REGISTERED";
|
|
396
|
+
readonly CANNOT_CREATE_SAME_ELEMENT_TWICE: "CANNOT_CREATE_SAME_ELEMENT_TWICE";
|
|
397
|
+
readonly GROUPS_ONLY_ONE_MAIN_ELEMENT: "GROUPS_ONLY_ONE_MAIN_ELEMENT";
|
|
398
|
+
readonly GROUPS_NOT_FOUND_MAIN_ELEMENT: "GROUPS_NOT_FOUND_MAIN_ELEMENT";
|
|
399
|
+
readonly NOT_SUPPORT_ELEMENT: "NOT_SUPPORT_ELEMENT";
|
|
400
|
+
readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
|
|
401
|
+
readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
|
|
402
|
+
readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
|
|
403
|
+
readonly API_MISS_PARAMS: "API_MISS_PARAMS";
|
|
404
|
+
readonly API_GATEWAY_TIMEOUT: "API_GATEWAY_TIMEOUT";
|
|
405
|
+
readonly API_SYSTEM_ERROR: "API_SYSTEM_ERROR";
|
|
406
|
+
readonly API_TIMEOUT: "API_TIMEOUT";
|
|
407
|
+
readonly API_NOT_LOGIN: "API_NOT_LOGIN";
|
|
408
|
+
readonly API_GATEWAY_ERROR: "API_GATEWAY_ERROR";
|
|
409
|
+
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
410
|
+
readonly NO_PORTS_ERROR: "NO_PORTS_ERROR";
|
|
411
|
+
readonly INVALID_REDIRECT_URL: "INVALID_REDIRECT_URL";
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeof AntomSDKErrorCodes];
|
|
415
|
+
|
|
416
|
+
export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
|
|
417
|
+
|
|
418
|
+
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';
|
|
228
419
|
|
|
229
420
|
declare interface APICallbackOptions {
|
|
230
421
|
requestType: 'fetch' | 'xhr';
|
|
@@ -240,6 +431,11 @@ declare interface APICallbackOptions {
|
|
|
240
431
|
errorMsg?: string;
|
|
241
432
|
}
|
|
242
433
|
|
|
434
|
+
/**
|
|
435
|
+
* @description SDK UI组件的外观配置。
|
|
436
|
+
* 控制主题、CSS变量、布局规则及显示设置。
|
|
437
|
+
* @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
|
|
438
|
+
*/
|
|
243
439
|
declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
|
|
244
440
|
theme?: Props['theme'];
|
|
245
441
|
variables?: PartialSpeKey<Props['variables'], string>;
|
|
@@ -558,7 +754,9 @@ declare class AxiosHeaders {
|
|
|
558
754
|
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
559
755
|
): AxiosHeaders;
|
|
560
756
|
|
|
561
|
-
toJSON(asStrings
|
|
757
|
+
toJSON(asStrings: true): Record<string, string>;
|
|
758
|
+
toJSON(asStrings?: false): Record<string, string | string[]>;
|
|
759
|
+
toJSON(asStrings?: boolean): Record<string, string | string[]>;
|
|
562
760
|
|
|
563
761
|
static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
|
|
564
762
|
|
|
@@ -656,6 +854,15 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
656
854
|
merged: AppConfig;
|
|
657
855
|
updated: Partial<AppConfig>;
|
|
658
856
|
};
|
|
857
|
+
/**
|
|
858
|
+
* @internal 内部事件 不暴露给商户
|
|
859
|
+
*/
|
|
860
|
+
"OPENSDK@UPDATE_CONFIG_REPLY": {
|
|
861
|
+
/**
|
|
862
|
+
* 更新配置时发生的错误,如果error为undefined,则表示没有错误发生
|
|
863
|
+
*/
|
|
864
|
+
error?: ErrorPayload<string>;
|
|
865
|
+
} | undefined;
|
|
659
866
|
/**
|
|
660
867
|
* @internal 内部事件 不暴露给商户
|
|
661
868
|
*/
|
|
@@ -694,6 +901,10 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
694
901
|
* @internal 内部事件 不暴露给商户
|
|
695
902
|
*/
|
|
696
903
|
"OPENSDK@TRANSFER_MODAL_APPEARANCE": Appearance;
|
|
904
|
+
/**
|
|
905
|
+
* @internal 内部事件 不暴露给商户
|
|
906
|
+
*/
|
|
907
|
+
"OPENSDK@TRANSFER_MODAL_INITIALDATA": Record<string, any>;
|
|
697
908
|
/**
|
|
698
909
|
* @internal 内部事件 不暴露给商户
|
|
699
910
|
*/
|
|
@@ -721,6 +932,12 @@ declare interface BaseBridgeEventMap<AppConfig extends Record<string, any> = Rec
|
|
|
721
932
|
* @internal 内部高度变化,同步到sdk更新iframe
|
|
722
933
|
*/
|
|
723
934
|
"OPENSDK@HEIGHT_UPDATE": number;
|
|
935
|
+
/**
|
|
936
|
+
* @internal 内部销毁元素,同步到sdk销毁元素
|
|
937
|
+
*/
|
|
938
|
+
"OPENSDK@DESTORY_ELEMENT": {
|
|
939
|
+
elementKey: string;
|
|
940
|
+
};
|
|
724
941
|
}
|
|
725
942
|
|
|
726
943
|
declare interface BaseConfig {
|
|
@@ -804,9 +1021,9 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
804
1021
|
*/
|
|
805
1022
|
setup(): Promise<Partial<BaseElementAppConfig> | undefined>;
|
|
806
1023
|
/**
|
|
807
|
-
* @param {
|
|
1024
|
+
* @param {HTMLElement} container
|
|
808
1025
|
*/
|
|
809
|
-
mount(
|
|
1026
|
+
mount(container: HTMLElement): Promise<void>;
|
|
810
1027
|
/**
|
|
811
1028
|
* @description 内部使用,挂载iframe
|
|
812
1029
|
* @internal 外部不能直接调用
|
|
@@ -816,7 +1033,7 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
816
1033
|
* 更新webapp配置
|
|
817
1034
|
* @param {Partial<BaseElementAppConfig>} newConfig
|
|
818
1035
|
*/
|
|
819
|
-
updateConfig(newConfig: Partial<Config['appConfig']>):
|
|
1036
|
+
updateConfig(newConfig: Partial<Config['appConfig']>): Promise<EventMap["OPENSDK@UPDATE_CONFIG_REPLY"]>;
|
|
820
1037
|
/**
|
|
821
1038
|
* 卸载元素
|
|
822
1039
|
*/
|
|
@@ -880,20 +1097,23 @@ declare abstract class BaseElement<Config extends BaseElementConfig = BaseElemen
|
|
|
880
1097
|
}
|
|
881
1098
|
|
|
882
1099
|
declare interface BaseElementAppConfig {
|
|
1100
|
+
/**
|
|
1101
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
1102
|
+
*/
|
|
883
1103
|
locale?: string;
|
|
884
1104
|
/**
|
|
885
|
-
* @internal
|
|
1105
|
+
* @internal 不透出给商户,统一从loadAntom获取
|
|
886
1106
|
*/
|
|
887
1107
|
env?: 'sandbox' | 'prod';
|
|
888
1108
|
/**
|
|
889
|
-
* @description
|
|
1109
|
+
* @description 商户的唯一标识,用于监控
|
|
890
1110
|
* @internal 不透出到用户
|
|
891
1111
|
*/
|
|
892
1112
|
merchantId?: string;
|
|
893
1113
|
[key: string]: any;
|
|
894
1114
|
}
|
|
895
1115
|
|
|
896
|
-
declare interface BaseElementConfig<T extends BaseElementAppConfig =
|
|
1116
|
+
declare interface BaseElementConfig<T extends BaseElementAppConfig = BaseElementAppConfig> extends BaseConfig {
|
|
897
1117
|
appConfig: T;
|
|
898
1118
|
elementMode: ElementMode;
|
|
899
1119
|
}
|
|
@@ -989,6 +1209,7 @@ declare abstract class BaseFactory {
|
|
|
989
1209
|
*/
|
|
990
1210
|
constructor(config: BaseFactoryConfig);
|
|
991
1211
|
protected openModal(payload: BaseBridgeEventMap['OPENSDK@OPEN_MODAL']): Promise<OpenModalHandle>;
|
|
1212
|
+
protected redirect(payload: BaseBridgeEventMap['OPENSDK@REDIRECT']): void | Promise<void>;
|
|
992
1213
|
/**
|
|
993
1214
|
* @description 子类必须实现此方法,返回工厂可用的元素类列表
|
|
994
1215
|
* @internal
|
|
@@ -1051,6 +1272,13 @@ declare abstract class BaseFactory {
|
|
|
1051
1272
|
* @internal
|
|
1052
1273
|
*/
|
|
1053
1274
|
protected _removeElement(elementType: string, options?: BaseElementAppConfig): void;
|
|
1275
|
+
/**
|
|
1276
|
+
* @description 删除元素实例
|
|
1277
|
+
* @param {string} elementType 类型
|
|
1278
|
+
* @param {BaseElementConfig} options 选项
|
|
1279
|
+
* @internal
|
|
1280
|
+
*/
|
|
1281
|
+
protected _removeElementByKey(key: string): void;
|
|
1054
1282
|
/**
|
|
1055
1283
|
* @description 获取元素实例
|
|
1056
1284
|
* @param {string} elementType 类型
|
|
@@ -1114,6 +1342,10 @@ declare abstract class BaseMainElement<Config extends BaseElementConfig = BaseEl
|
|
|
1114
1342
|
_submit(data?: EventMap['OPENSDK@SUBMIT'] | undefined): Promise<EventMap['OPENSDK@SUBMIT_REPLY']>;
|
|
1115
1343
|
}
|
|
1116
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* @description 打开模态框的配置项。
|
|
1347
|
+
* 包含显示选项、关闭行为、外观设置及初始化数据。
|
|
1348
|
+
*/
|
|
1117
1349
|
declare interface BaseOpenModalConfig {
|
|
1118
1350
|
/**
|
|
1119
1351
|
* 无需手动传递,app的唯一scope
|
|
@@ -1137,10 +1369,21 @@ declare interface BaseOpenModalConfig {
|
|
|
1137
1369
|
onClose?: () => void;
|
|
1138
1370
|
url: string;
|
|
1139
1371
|
/**
|
|
1140
|
-
*
|
|
1372
|
+
* @description 关闭时,是否需要告知webapp页面来进行关闭 链路为 modalApp 告知-> webapp 关闭-> sdk,默认为false,即直接在modal中进行关闭 modalApp 关闭-> sdk,
|
|
1141
1373
|
*/
|
|
1142
1374
|
closeConfirm?: boolean;
|
|
1375
|
+
/**
|
|
1376
|
+
* @description 需要同步的外观配置
|
|
1377
|
+
*/
|
|
1143
1378
|
appearance?: Appearance;
|
|
1379
|
+
/**
|
|
1380
|
+
* @description 需要传递的初始化数据
|
|
1381
|
+
*/
|
|
1382
|
+
initialData?: Record<string, any>;
|
|
1383
|
+
/**
|
|
1384
|
+
* @description 无需手动传递, 模态框的唯一标识
|
|
1385
|
+
*/
|
|
1386
|
+
modalId?: string;
|
|
1144
1387
|
}
|
|
1145
1388
|
|
|
1146
1389
|
declare type BehaviorConfig = {
|
|
@@ -1238,6 +1481,42 @@ declare interface C2PProps {
|
|
|
1238
1481
|
merchantTransactionId?: string;
|
|
1239
1482
|
}
|
|
1240
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* @description native回调错误信息格式
|
|
1486
|
+
* @internal
|
|
1487
|
+
*/
|
|
1488
|
+
export declare interface CallbackErrorInfo {
|
|
1489
|
+
code: string;
|
|
1490
|
+
message?: string;
|
|
1491
|
+
needChangeSessionForRetry?: boolean;
|
|
1492
|
+
traceId?: string;
|
|
1493
|
+
context?: string;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* @description native回调返回数据
|
|
1498
|
+
* @internal
|
|
1499
|
+
*/
|
|
1500
|
+
export declare interface CallbackReturnData {
|
|
1501
|
+
status?: string;
|
|
1502
|
+
userCanceled3D?: boolean;
|
|
1503
|
+
isExposed?: boolean;
|
|
1504
|
+
error?: CallbackErrorInfo;
|
|
1505
|
+
session?: {
|
|
1506
|
+
nextAction?: CallbackSessionNextAction;
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* @description native回调会话下一步操作,包含了回调的url
|
|
1512
|
+
* @internal
|
|
1513
|
+
*/
|
|
1514
|
+
export declare interface CallbackSessionNextAction {
|
|
1515
|
+
normalUrl?: string;
|
|
1516
|
+
schemeUrl?: string;
|
|
1517
|
+
applinkUrl?: string;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1241
1520
|
declare interface CardIssuerAuthentication {
|
|
1242
1521
|
/**
|
|
1243
1522
|
* @description 卡售卖单元
|
|
@@ -1655,7 +1934,7 @@ declare interface CashierSdkActionQueryResult {
|
|
|
1655
1934
|
/**
|
|
1656
1935
|
* @description 物流信息, 包含物流地址和物流费
|
|
1657
1936
|
*/
|
|
1658
|
-
shippingInfo?:
|
|
1937
|
+
shippingInfo?: ShippingInfo_2;
|
|
1659
1938
|
/**
|
|
1660
1939
|
* @description 用户已绑资产信息
|
|
1661
1940
|
*/
|
|
@@ -1688,28 +1967,6 @@ declare interface ChargeInfo {
|
|
|
1688
1967
|
chargeActualAmountView?: PaymentView;
|
|
1689
1968
|
}
|
|
1690
1969
|
|
|
1691
|
-
/** click 事件 resolve 参数 */
|
|
1692
|
-
export declare interface ClickResolveOptions {
|
|
1693
|
-
amount?: {
|
|
1694
|
-
currency: string;
|
|
1695
|
-
value: string;
|
|
1696
|
-
};
|
|
1697
|
-
shippingAddressRequired?: boolean;
|
|
1698
|
-
allowedShippingCountries?: string[];
|
|
1699
|
-
shippingRates?: Array<{
|
|
1700
|
-
id: string;
|
|
1701
|
-
displayName: string;
|
|
1702
|
-
amount: string;
|
|
1703
|
-
}>;
|
|
1704
|
-
lineItems?: Array<{
|
|
1705
|
-
name: string;
|
|
1706
|
-
amount: string;
|
|
1707
|
-
}>;
|
|
1708
|
-
business?: {
|
|
1709
|
-
name: string;
|
|
1710
|
-
};
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
1970
|
declare interface CodeFormView {
|
|
1714
1971
|
/**
|
|
1715
1972
|
* @description title
|
|
@@ -1735,6 +1992,11 @@ declare interface CodeFormView {
|
|
|
1735
1992
|
* @description label
|
|
1736
1993
|
*/
|
|
1737
1994
|
label?: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* @description Payment guidance information (CKP scenario) The frontend only displays the payment guide button
|
|
1997
|
+
* when appLinkUrlForWeb is populated
|
|
1998
|
+
*/
|
|
1999
|
+
paymentGuideInfo?: PaymentGuideInfo;
|
|
1738
2000
|
/**
|
|
1739
2001
|
* @description 提醒事项
|
|
1740
2002
|
*/
|
|
@@ -1751,6 +2013,10 @@ declare interface CodeFormView {
|
|
|
1751
2013
|
* @description 码过期时间
|
|
1752
2014
|
*/
|
|
1753
2015
|
codeExpireTime?: string;
|
|
2016
|
+
/**
|
|
2017
|
+
* @description QR code configuration including renderStyle, centerIcon and cornerIcon
|
|
2018
|
+
*/
|
|
2019
|
+
qrcodeConfig?: QrCodeConfig;
|
|
1754
2020
|
}
|
|
1755
2021
|
|
|
1756
2022
|
/**
|
|
@@ -2473,7 +2739,7 @@ export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
|
|
|
2473
2739
|
|
|
2474
2740
|
export declare type CVVAppearanceProps = {
|
|
2475
2741
|
theme: AntomTheme;
|
|
2476
|
-
variables:
|
|
2742
|
+
variables: AntomVariables;
|
|
2477
2743
|
};
|
|
2478
2744
|
|
|
2479
2745
|
/**
|
|
@@ -3283,7 +3549,7 @@ declare class Elements extends BaseElements {
|
|
|
3283
3549
|
getElement(elementType: 'express', options?: ExpressAppConfig): ExpressElement;
|
|
3284
3550
|
}
|
|
3285
3551
|
|
|
3286
|
-
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';
|
|
3552
|
+
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';
|
|
3287
3553
|
|
|
3288
3554
|
declare type Env = 'local' | 'dev' | 'sit' | 'pre' | 'prod';
|
|
3289
3555
|
|
|
@@ -3374,6 +3640,22 @@ declare interface ExpCardPlan {
|
|
|
3374
3640
|
* @description 每个月分期利息
|
|
3375
3641
|
*/
|
|
3376
3642
|
monthlyInterest?: ComIpayIexpprodServiceFacadeCommonAmount;
|
|
3643
|
+
/**
|
|
3644
|
+
* @description 分期有效期开始时间
|
|
3645
|
+
*/
|
|
3646
|
+
validStartTime?: string;
|
|
3647
|
+
/**
|
|
3648
|
+
* @description 分期有效期结束时间
|
|
3649
|
+
*/
|
|
3650
|
+
validEndTime?: string;
|
|
3651
|
+
/**
|
|
3652
|
+
* @description 支持的银行信息
|
|
3653
|
+
*
|
|
3654
|
+
* 包含该分期计划支持的银行详细信息,包括银行简称、logo等。
|
|
3655
|
+
* 该字段从 installmentBanks 数据中通过 bankShortName 关联而来,
|
|
3656
|
+
* 若分期计划无银行限制或未匹配到银行信息,该字段可能为null。@see ExpSupportIppBank
|
|
3657
|
+
*/
|
|
3658
|
+
supportedBank?: ExpSupportIppBank;
|
|
3377
3659
|
}
|
|
3378
3660
|
|
|
3379
3661
|
declare interface ExpInstallmentInfo {
|
|
@@ -3403,7 +3685,16 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3403
3685
|
sessionData?: string;
|
|
3404
3686
|
/** Business division (country/region) */
|
|
3405
3687
|
businessDivision?: string;
|
|
3406
|
-
/**
|
|
3688
|
+
/**
|
|
3689
|
+
* Amount & Currency
|
|
3690
|
+
*
|
|
3691
|
+
* Only effective via `updateConfig({ amount })` at runtime.
|
|
3692
|
+
* Passing amount at creation time is ignored — the initial amount
|
|
3693
|
+
* comes from the server-side sdkQuery result (renderData.paymentAmount).
|
|
3694
|
+
*
|
|
3695
|
+
* `value` must be a positive integer string in **minor currency units** (ISO 4217).
|
|
3696
|
+
* Examples: USD $1.00 → "100", JPY ¥1 → "1", EUR €9.99 → "999"
|
|
3697
|
+
*/
|
|
3407
3698
|
amount?: {
|
|
3408
3699
|
currency: string;
|
|
3409
3700
|
value: string;
|
|
@@ -3454,19 +3745,44 @@ export declare interface ExpressCancelEvent {
|
|
|
3454
3745
|
data?: any;
|
|
3455
3746
|
}
|
|
3456
3747
|
|
|
3457
|
-
/** click
|
|
3748
|
+
/** click 事件负载(纯通知,商户可用于埋点,SDK 不等待响应) */
|
|
3458
3749
|
export declare interface ExpressClickEvent {
|
|
3459
3750
|
expressPaymentType: string;
|
|
3460
|
-
resolve: (options: ClickResolveOptions) => void;
|
|
3461
3751
|
}
|
|
3462
3752
|
|
|
3463
3753
|
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3464
3754
|
export declare interface ExpressConfirmData {
|
|
3465
3755
|
expressPaymentType: string;
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3756
|
+
billingDetails?: {
|
|
3757
|
+
name?: string;
|
|
3758
|
+
email?: string;
|
|
3759
|
+
phone?: string;
|
|
3760
|
+
address?: {
|
|
3761
|
+
line1?: string;
|
|
3762
|
+
line2?: string;
|
|
3763
|
+
city?: string;
|
|
3764
|
+
state?: string;
|
|
3765
|
+
postalCode?: string;
|
|
3766
|
+
country?: string;
|
|
3767
|
+
};
|
|
3768
|
+
};
|
|
3769
|
+
shippingAddress?: {
|
|
3770
|
+
name?: string;
|
|
3771
|
+
phone?: string;
|
|
3772
|
+
address?: {
|
|
3773
|
+
line1?: string;
|
|
3774
|
+
line2?: string;
|
|
3775
|
+
city?: string;
|
|
3776
|
+
state?: string;
|
|
3777
|
+
postalCode?: string;
|
|
3778
|
+
country?: string;
|
|
3779
|
+
};
|
|
3780
|
+
};
|
|
3781
|
+
/**
|
|
3782
|
+
* 商户主动拒绝本次支付(如库存不足、价格变动等)。
|
|
3783
|
+
* 调用后 SDK 立即取消支付流程,confirmPayment() 无需调用。
|
|
3784
|
+
*/
|
|
3785
|
+
paymentFailed: () => void;
|
|
3470
3786
|
}
|
|
3471
3787
|
|
|
3472
3788
|
/**
|
|
@@ -3479,7 +3795,38 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3479
3795
|
* Store all function-type callbacks locally, not involved in postMessage serialization
|
|
3480
3796
|
*/
|
|
3481
3797
|
private _callbacks;
|
|
3798
|
+
/** AP/GP 渲染数据(setup 阶段从 sdkQuery 拉取,host 端 Apple Pay handler 需要用) */
|
|
3799
|
+
private _renderData;
|
|
3800
|
+
private _hostSign;
|
|
3801
|
+
/** AlipayCN QR modal destroy function (from openModal utility) */
|
|
3802
|
+
private _alipayCnModalDestroy;
|
|
3803
|
+
/** AlipayCN 轮询定时器 */
|
|
3804
|
+
private _alipayCnPollingTimer;
|
|
3805
|
+
/** Guard flag: false after cancel/timeout so in-flight poll callbacks become no-ops */
|
|
3806
|
+
private _alipayCnPollingActive;
|
|
3807
|
+
/** 支付流程进行中标志(click → confirm/error/cancel 之间) */
|
|
3808
|
+
private _paymentInProgress;
|
|
3809
|
+
/** completePayment 传入的 redirect 参数,用于控制 submit 后是否跳转 */
|
|
3810
|
+
private _redirect;
|
|
3482
3811
|
constructor(name: string, config: ExpressElementConfig);
|
|
3812
|
+
/**
|
|
3813
|
+
* 重写 on:对 confirm 事件拦截,在商户回调执行前注入 paymentFailed()
|
|
3814
|
+
*/
|
|
3815
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
3816
|
+
updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
3817
|
+
/**
|
|
3818
|
+
* 商户在 confirm 回调内调用,触发实际支付提交。
|
|
3819
|
+
* iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
|
|
3820
|
+
* 完成后通过 OPENSDK@COMPLETE_PAYMENT_RESULT 回包,Promise resolve。
|
|
3821
|
+
*/
|
|
3822
|
+
completePayment(redirect?: 'always' | 'if_required'): Promise<{
|
|
3823
|
+
success: boolean;
|
|
3824
|
+
result?: any;
|
|
3825
|
+
error?: {
|
|
3826
|
+
code: string;
|
|
3827
|
+
message: string;
|
|
3828
|
+
};
|
|
3829
|
+
}>;
|
|
3483
3830
|
setup(): Promise<Partial<ExpressAppConfig> | undefined>;
|
|
3484
3831
|
/**
|
|
3485
3832
|
* Register internal event listeners (iframe communication)
|
|
@@ -3489,6 +3836,41 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
|
|
|
3489
3836
|
private _showOverlay;
|
|
3490
3837
|
private _hideOverlay;
|
|
3491
3838
|
private registerInternalListeners;
|
|
3839
|
+
/**
|
|
3840
|
+
* Open the AlipayCN QR modal via openModal() (host-document-level, not clipped by iframe).
|
|
3841
|
+
* The modal renders the alipaycn-code-view React page which uses the QrCodeOtc/CodeOrText component.
|
|
3842
|
+
* Polling stays here in the host; the modal is destroyed programmatically when a terminal status arrives.
|
|
3843
|
+
*/
|
|
3844
|
+
private _handleAlipayCnQrcodeAtHost;
|
|
3845
|
+
private _closeAlipayCnModal;
|
|
3846
|
+
/**
|
|
3847
|
+
* 轮询 inquiryPaymentBySession,每 2s 一次,最多 150 次(5 分钟)
|
|
3848
|
+
* 支付到达终态后关闭 modal,通过 OPENSDK@ALIPAY_CN_RESULT 通知 iframe
|
|
3849
|
+
*/
|
|
3850
|
+
private _startAlipayCnPolling;
|
|
3851
|
+
private _stopAlipayCnPolling;
|
|
3852
|
+
/**
|
|
3853
|
+
* host 端跑完整 Apple Pay 流程(对齐原版 ApplePayLaunchSpecificPaymentMethodHandler 内的 ApplePayService)
|
|
3854
|
+
* - 加载 apple-pay-sdk.js(注入到 host document)
|
|
3855
|
+
* - new ApplePaySession(version, request)
|
|
3856
|
+
* - onvalidatemerchant: 直接调 getApplePayPaymentSession(不走 bridge)
|
|
3857
|
+
* - onpaymentauthorized: 调 submitPayInfo 拿到下单结果 → completePayment(SUCCESS/FAILURE)
|
|
3858
|
+
* 并把结果通过 bridge 回包给 iframe(iframe 走 confirm 或 3DS)
|
|
3859
|
+
* - oncancel: 取消事件回包给 iframe
|
|
3860
|
+
*/
|
|
3861
|
+
private _handleApplePayAtHost;
|
|
3862
|
+
/**
|
|
3863
|
+
* 从 sessionData 解析 recurringInfo,构造 Apple Pay recurringPaymentRequest。
|
|
3864
|
+
* 订阅数据只在 sessionData.paymentSessionFactor 里,renderData 不含此字段。
|
|
3865
|
+
* 非订阅场景返回 null。
|
|
3866
|
+
*/
|
|
3867
|
+
private _buildRecurringPaymentRequest;
|
|
3868
|
+
/**
|
|
3869
|
+
* 3DS redirect 后在 host 侧轮询 inquiryPaymentBySession
|
|
3870
|
+
* 结果出来后通过 OPENSDK@APGP_3DS_RESULT 下发 iframe,iframe 再触发商户事件
|
|
3871
|
+
* 每 2s 轮询,最多 150 次(5 分钟)
|
|
3872
|
+
*/
|
|
3873
|
+
private _startThreeDSPolling;
|
|
3492
3874
|
protected focus(): void;
|
|
3493
3875
|
protected blur(): void;
|
|
3494
3876
|
protected clear(): void;
|
|
@@ -3553,36 +3935,146 @@ export declare interface ExpressElementEvents extends AntomBridgeEventMap<Expres
|
|
|
3553
3935
|
contentHeightChanged: {
|
|
3554
3936
|
height: number;
|
|
3555
3937
|
};
|
|
3938
|
+
/** @internal iframe → host:按钮点击(线上 wire event,仅 expressPaymentType) */
|
|
3939
|
+
'OPENSDK@CLICK': {
|
|
3940
|
+
expressPaymentType: string;
|
|
3941
|
+
};
|
|
3942
|
+
/**
|
|
3943
|
+
* @internal host → iframe:click 事件通知商户后立即发送,继续支付流程
|
|
3944
|
+
*/
|
|
3945
|
+
'OPENSDK@CLICK_RESOLVE': Record<string, never>;
|
|
3556
3946
|
/** @internal PayPal 请求商户创建订单 */
|
|
3557
|
-
'
|
|
3947
|
+
'OPENSDK@PAYPAL_CREATE_ORDER': {
|
|
3558
3948
|
requestId: string;
|
|
3559
3949
|
};
|
|
3560
3950
|
/** @internal PayPal createOrder 响应 */
|
|
3561
|
-
'
|
|
3951
|
+
'OPENSDK@PAYPAL_CREATE_ORDER_REPLY': {
|
|
3562
3952
|
requestId: string;
|
|
3563
3953
|
sessionData?: string;
|
|
3564
3954
|
error?: string;
|
|
3565
3955
|
};
|
|
3566
3956
|
/** @internal PayPal 用户变更收货地址 */
|
|
3567
|
-
'
|
|
3957
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE': {
|
|
3568
3958
|
requestId: string;
|
|
3569
3959
|
shippingData: any;
|
|
3570
3960
|
};
|
|
3571
3961
|
/** @internal PayPal 收货地址变更响应 */
|
|
3572
|
-
'
|
|
3962
|
+
'OPENSDK@PAYPAL_SHIPPING_ADDRESS_CHANGE_REPLY': {
|
|
3573
3963
|
requestId: string;
|
|
3574
3964
|
error?: string;
|
|
3575
3965
|
};
|
|
3576
3966
|
/** @internal PayPal 用户变更配送方式 */
|
|
3577
|
-
'
|
|
3967
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE': {
|
|
3578
3968
|
requestId: string;
|
|
3579
3969
|
shippingData: any;
|
|
3580
3970
|
};
|
|
3581
3971
|
/** @internal PayPal 配送方式变更响应 */
|
|
3582
|
-
'
|
|
3972
|
+
'OPENSDK@PAYPAL_SHIPPING_OPTIONS_CHANGE_REPLY': {
|
|
3583
3973
|
requestId: string;
|
|
3584
3974
|
error?: string;
|
|
3585
3975
|
};
|
|
3976
|
+
/** @internal AP/GP 用户授权完成,请求 SDK 提交支付 */
|
|
3977
|
+
'OPENSDK@APGP_SUBMIT': {
|
|
3978
|
+
requestId: string;
|
|
3979
|
+
expressPaymentType: string;
|
|
3980
|
+
paymentData: any;
|
|
3981
|
+
billingDetails?: any;
|
|
3982
|
+
shippingAddress?: any;
|
|
3983
|
+
};
|
|
3984
|
+
/**
|
|
3985
|
+
* @internal SDK 提交支付结果
|
|
3986
|
+
* threeDSHandled=true 表示 host 已在主页面发起 3DS redirect 并开始 polling,
|
|
3987
|
+
* iframe 无需再处理;等 'OPENSDK@APGP_3DS_RESULT' 事件即可
|
|
3988
|
+
*/
|
|
3989
|
+
'OPENSDK@APGP_SUBMIT_REPLY': {
|
|
3990
|
+
requestId: string;
|
|
3991
|
+
success: boolean;
|
|
3992
|
+
result?: any;
|
|
3993
|
+
error?: string;
|
|
3994
|
+
threeDSHandled?: boolean;
|
|
3995
|
+
};
|
|
3996
|
+
/**
|
|
3997
|
+
* @internal host 3DS polling 结果 → iframe 侧据此触发 confirm / error / cancel
|
|
3998
|
+
*/
|
|
3999
|
+
'OPENSDK@APGP_3DS_RESULT': {
|
|
4000
|
+
expressPaymentType: string;
|
|
4001
|
+
paymentStatus: string;
|
|
4002
|
+
paymentData?: any;
|
|
4003
|
+
billingDetails?: any;
|
|
4004
|
+
shippingAddress?: any;
|
|
4005
|
+
errorCode?: string;
|
|
4006
|
+
errorMessage?: string;
|
|
4007
|
+
};
|
|
4008
|
+
/** @internal host DDC 完成后,把真正的 3DS redirect URL 发给 iframe 弹窗 */
|
|
4009
|
+
'OPENSDK@APGP_3DS_REDIRECT': {
|
|
4010
|
+
expressPaymentType: string;
|
|
4011
|
+
redirectUrl: string;
|
|
4012
|
+
method?: string;
|
|
4013
|
+
bodyData?: Record<string, unknown>;
|
|
4014
|
+
};
|
|
4015
|
+
/** @internal Apple Pay 商户验证请求(Safari 路径,iframe 内 ApplePaySession 触发) */
|
|
4016
|
+
'OPENSDK@APPLE_PAY_VALIDATE_MERCHANT': {
|
|
4017
|
+
requestId: string;
|
|
4018
|
+
validationURL: string;
|
|
4019
|
+
merchantIdentifier?: string;
|
|
4020
|
+
displayName?: string;
|
|
4021
|
+
sessionData?: string;
|
|
4022
|
+
};
|
|
4023
|
+
/** @internal Apple Pay 商户验证结果 */
|
|
4024
|
+
'OPENSDK@APPLE_PAY_VALIDATE_MERCHANT_REPLY': {
|
|
4025
|
+
requestId: string;
|
|
4026
|
+
merchantSession?: any;
|
|
4027
|
+
error?: string;
|
|
4028
|
+
};
|
|
4029
|
+
/**
|
|
4030
|
+
* @internal 非 Safari PC:iframe 把 Apple Pay 整条链路委托给 host 处理
|
|
4031
|
+
* host 在自己 document 上拉起 ApplePaySession(apple-pay-modal QR 弹框不会被 iframe 裁切)
|
|
4032
|
+
*/
|
|
4033
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN': {
|
|
4034
|
+
requestId: string;
|
|
4035
|
+
expressPaymentType: string;
|
|
4036
|
+
};
|
|
4037
|
+
/**
|
|
4038
|
+
* @internal host 完成 Apple Pay 全流程后回包给 iframe
|
|
4039
|
+
* threeDSHandled=true 表示 host 已做 3DS redirect + polling,iframe 等 'OPENSDK@APGP_3DS_RESULT'
|
|
4040
|
+
*/
|
|
4041
|
+
'OPENSDK@GET_APPLE_PAY_TOKEN_REPLY': {
|
|
4042
|
+
requestId: string;
|
|
4043
|
+
success: boolean;
|
|
4044
|
+
result?: any;
|
|
4045
|
+
errorCode?: string;
|
|
4046
|
+
errorMessage?: string;
|
|
4047
|
+
billingDetails?: any;
|
|
4048
|
+
shippingAddress?: any;
|
|
4049
|
+
threeDSHandled?: boolean;
|
|
4050
|
+
};
|
|
4051
|
+
/**
|
|
4052
|
+
* @internal iframe → host:用户点击 Alipay CN 按钮后,委托 host 提交支付、展码/跳转、轮询
|
|
4053
|
+
* host 完成全流程后通过 OPENSDK@ALIPAY_CN_RESULT 回包,iframe 据此触发 confirm / error / cancel
|
|
4054
|
+
*/
|
|
4055
|
+
'OPENSDK@ALIPAY_CN_SUBMIT': {
|
|
4056
|
+
requestId: string;
|
|
4057
|
+
};
|
|
4058
|
+
/**
|
|
4059
|
+
* @internal host → iframe:submit 返回 SHOW_CODE 时,把展码数据发回 iframe
|
|
4060
|
+
* iframe 使用 bridge.openModal 拉起 code-view 页面展示二维码
|
|
4061
|
+
*/
|
|
4062
|
+
'OPENSDK@ALIPAY_CN_SHOW_CODE': Record<string, unknown>;
|
|
4063
|
+
/**
|
|
4064
|
+
* @internal host → iframe:AlipayCN 全流程最终结果
|
|
4065
|
+
*/
|
|
4066
|
+
'OPENSDK@ALIPAY_CN_RESULT': {
|
|
4067
|
+
paymentStatus: 'SUCCESS' | 'FAIL' | 'CANCELLED';
|
|
4068
|
+
paymentData?: any;
|
|
4069
|
+
errorCode?: string;
|
|
4070
|
+
errorMessage?: string;
|
|
4071
|
+
};
|
|
4072
|
+
/**
|
|
4073
|
+
* @internal iframe → host:updateConfig 处理结果回包
|
|
4074
|
+
*/
|
|
4075
|
+
'OPENSDK@UPDATE_CONFIG_REPLY': {
|
|
4076
|
+
error?: ErrorPayload<string>;
|
|
4077
|
+
};
|
|
3586
4078
|
}
|
|
3587
4079
|
|
|
3588
4080
|
declare interface ExpSupportBank {
|
|
@@ -3607,6 +4099,24 @@ declare interface ExpSupportCardBrand {
|
|
|
3607
4099
|
logo?: Logo;
|
|
3608
4100
|
}
|
|
3609
4101
|
|
|
4102
|
+
/**
|
|
4103
|
+
* @description 支持的分期银行信息
|
|
4104
|
+
*/
|
|
4105
|
+
declare interface ExpSupportIppBank {
|
|
4106
|
+
/**
|
|
4107
|
+
* @description bank short name or bank code
|
|
4108
|
+
*/
|
|
4109
|
+
bankShortName?: string;
|
|
4110
|
+
/**
|
|
4111
|
+
* @description logo
|
|
4112
|
+
*/
|
|
4113
|
+
logo?: Logo;
|
|
4114
|
+
/**
|
|
4115
|
+
* @description bins
|
|
4116
|
+
*/
|
|
4117
|
+
bins?: string[];
|
|
4118
|
+
}
|
|
4119
|
+
|
|
3610
4120
|
declare type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] };
|
|
3611
4121
|
|
|
3612
4122
|
declare interface FirstPhaseSubscriptionDetail {
|
|
@@ -3624,6 +4134,42 @@ declare interface FirstPhaseSubscriptionDetail {
|
|
|
3624
4134
|
promotionDetails?: PromotionDetail[];
|
|
3625
4135
|
}
|
|
3626
4136
|
|
|
4137
|
+
declare interface FrontModulesToBeLoadedInterface {
|
|
4138
|
+
acquirerName: string;
|
|
4139
|
+
scriptUrl: string;
|
|
4140
|
+
}
|
|
4141
|
+
|
|
4142
|
+
/**
|
|
4143
|
+
* @description 分期银行展示模型
|
|
4144
|
+
*/
|
|
4145
|
+
declare interface FrontSupportIppBank {
|
|
4146
|
+
/**
|
|
4147
|
+
* @description bank short name or bank code
|
|
4148
|
+
*/
|
|
4149
|
+
bankShortName?: string;
|
|
4150
|
+
/**
|
|
4151
|
+
* @description logo
|
|
4152
|
+
*/
|
|
4153
|
+
logo?: Logo;
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
declare type GetI18nQueryParam = string | {
|
|
4157
|
+
/**
|
|
4158
|
+
* 多语言文案的 key
|
|
4159
|
+
*/
|
|
4160
|
+
id: string;
|
|
4161
|
+
/**
|
|
4162
|
+
* 多语言文案的默认值
|
|
4163
|
+
*/
|
|
4164
|
+
dm?: string;
|
|
4165
|
+
/**
|
|
4166
|
+
* 多语言文案的默认值,defaultMessage 和 dm 只需要一个就行
|
|
4167
|
+
* 推荐使用 dm
|
|
4168
|
+
* defaultMessage 是为了兼容中后台原来的开发习惯
|
|
4169
|
+
*/
|
|
4170
|
+
defaultMessage?: string;
|
|
4171
|
+
};
|
|
4172
|
+
|
|
3627
4173
|
declare function getMiniPerformance(): Promise<{
|
|
3628
4174
|
performance: {
|
|
3629
4175
|
appLaunch: number;
|
|
@@ -3658,6 +4204,12 @@ declare interface GetWhiteScreenInfoOptions {
|
|
|
3658
4204
|
ignoreNotInViewport?: boolean;
|
|
3659
4205
|
}
|
|
3660
4206
|
|
|
4207
|
+
declare type GlobalOptions = {
|
|
4208
|
+
i18n?: SimpleI18n;
|
|
4209
|
+
i18nPrefix: string;
|
|
4210
|
+
getDefaultMessage?: () => string;
|
|
4211
|
+
};
|
|
4212
|
+
|
|
3661
4213
|
declare type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset";
|
|
3662
4214
|
|
|
3663
4215
|
declare interface Goods {
|
|
@@ -4232,6 +4784,14 @@ declare interface HTTPErrorCallbackOptions {
|
|
|
4232
4784
|
aborted?: 0 | 1;
|
|
4233
4785
|
}
|
|
4234
4786
|
|
|
4787
|
+
declare interface IApplePayContactField {
|
|
4788
|
+
email: string;
|
|
4789
|
+
name: string;
|
|
4790
|
+
phone: string;
|
|
4791
|
+
postalAddress: string;
|
|
4792
|
+
phoneticName: string;
|
|
4793
|
+
}
|
|
4794
|
+
|
|
4235
4795
|
declare interface iBaseElementClass {
|
|
4236
4796
|
new (name: string, config: BaseElementConfig): BaseElement;
|
|
4237
4797
|
elementType: string;
|
|
@@ -4399,6 +4959,100 @@ declare interface IOptions {
|
|
|
4399
4959
|
stayTime?: number;
|
|
4400
4960
|
}
|
|
4401
4961
|
|
|
4962
|
+
declare interface IPaymentSessionMetaData {
|
|
4963
|
+
clientId?: string;
|
|
4964
|
+
renderDisplayType?: string;
|
|
4965
|
+
paymentSessionConfig?: PaymentSessionConfig;
|
|
4966
|
+
securityConfig?: SessionSecurityConfig;
|
|
4967
|
+
moneyView?: any;
|
|
4968
|
+
extendInfo?: string;
|
|
4969
|
+
paymentMethodInfoView?: any;
|
|
4970
|
+
paymentView?: any;
|
|
4971
|
+
modernWeb?: boolean;
|
|
4972
|
+
action?: PaymentSessionAction;
|
|
4973
|
+
/**
|
|
4974
|
+
* @description 是一个string,灰度开关,格式为 flag1,flag2,flag3
|
|
4975
|
+
*/
|
|
4976
|
+
flowSwitchTags?: string;
|
|
4977
|
+
authUrlInfo?: {
|
|
4978
|
+
appIdentifier?: string;
|
|
4979
|
+
applinkUrl?: string;
|
|
4980
|
+
normalUrl?: string;
|
|
4981
|
+
schemeUrl?: string;
|
|
4982
|
+
authUrl?: string;
|
|
4983
|
+
};
|
|
4984
|
+
paymentSessionFactor?: {
|
|
4985
|
+
externalRiskTimeout?: number;
|
|
4986
|
+
extendInfo?: {
|
|
4987
|
+
merchantCapabilities?: string[];
|
|
4988
|
+
supportedNetworks?: string[];
|
|
4989
|
+
requiredBillingContactFields: IApplePayContactField[];
|
|
4990
|
+
requiredShippingContactFields: IApplePayContactField[];
|
|
4991
|
+
};
|
|
4992
|
+
merchantInfo?: {
|
|
4993
|
+
registeredCountry?: string;
|
|
4994
|
+
partnerId?: string;
|
|
4995
|
+
merchantName?: string;
|
|
4996
|
+
};
|
|
4997
|
+
order?: {
|
|
4998
|
+
orderDescription: string;
|
|
4999
|
+
};
|
|
5000
|
+
paymentAmount?: {
|
|
5001
|
+
value?: string;
|
|
5002
|
+
currency?: string;
|
|
5003
|
+
};
|
|
5004
|
+
paymentMethodInfo?: {
|
|
5005
|
+
paymentMethodType?: string;
|
|
5006
|
+
};
|
|
5007
|
+
paymentMethodViewMetaData?: any;
|
|
5008
|
+
paymentRequestId?: string;
|
|
5009
|
+
supportedLanguages?: any;
|
|
5010
|
+
/**
|
|
5011
|
+
* 当前为苹果分期场景的信息
|
|
5012
|
+
*/
|
|
5013
|
+
recurringInfo?: {
|
|
5014
|
+
/**
|
|
5015
|
+
* 代扣协议开始日期 不传为当前系统时间
|
|
5016
|
+
*/
|
|
5017
|
+
startDate?: number;
|
|
5018
|
+
/**
|
|
5019
|
+
* 代扣协议结束日期 不传不限制结束时间
|
|
5020
|
+
*/
|
|
5021
|
+
endDate?: number;
|
|
5022
|
+
/**
|
|
5023
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
|
5024
|
+
*/
|
|
5025
|
+
intervalUnit?: string;
|
|
5026
|
+
/**
|
|
5027
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
|
5028
|
+
*/
|
|
5029
|
+
intervalCount?: number;
|
|
5030
|
+
/**
|
|
5031
|
+
* 分期标题信息
|
|
5032
|
+
*/
|
|
5033
|
+
title?: string;
|
|
5034
|
+
/**
|
|
5035
|
+
* 分期管理页面
|
|
5036
|
+
*/
|
|
5037
|
+
managementURL?: string;
|
|
5038
|
+
/**
|
|
5039
|
+
* 苹果通知ipay MAPN信息变更的地址
|
|
5040
|
+
*/
|
|
5041
|
+
tokenNotificationURL?: string;
|
|
5042
|
+
/**
|
|
5043
|
+
* 分期协议描述
|
|
5044
|
+
*/
|
|
5045
|
+
agreementDescription?: string;
|
|
5046
|
+
};
|
|
5047
|
+
frontModulesToBeLoaded?: FrontModulesToBeLoadedInterface[];
|
|
5048
|
+
};
|
|
5049
|
+
connectFactor?: {
|
|
5050
|
+
enableConnect?: boolean;
|
|
5051
|
+
};
|
|
5052
|
+
skipRenderPaymentMethod?: boolean;
|
|
5053
|
+
needAccountConfirmPage?: boolean;
|
|
5054
|
+
}
|
|
5055
|
+
|
|
4402
5056
|
declare interface ISystemInfo {
|
|
4403
5057
|
readonly pixelRatio: number;
|
|
4404
5058
|
readonly windowWidth: number;
|
|
@@ -6848,54 +7502,116 @@ declare interface ObsoletePropertiesHyphen<TLength = (string & {}) | 0, TTime =
|
|
|
6848
7502
|
*
|
|
6849
7503
|
* @deprecated
|
|
6850
7504
|
*/
|
|
6851
|
-
"-webkit-box-lines"?: Property.BoxLines | undefined;
|
|
7505
|
+
"-webkit-box-lines"?: Property.BoxLines | undefined;
|
|
7506
|
+
/**
|
|
7507
|
+
* The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group.
|
|
7508
|
+
*
|
|
7509
|
+
* **Syntax**: `<integer>`
|
|
7510
|
+
*
|
|
7511
|
+
* **Initial value**: `1`
|
|
7512
|
+
*
|
|
7513
|
+
* @deprecated
|
|
7514
|
+
*/
|
|
7515
|
+
"-webkit-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined;
|
|
7516
|
+
/**
|
|
7517
|
+
* The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically.
|
|
7518
|
+
*
|
|
7519
|
+
* **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit`
|
|
7520
|
+
*
|
|
7521
|
+
* **Initial value**: `inline-axis`
|
|
7522
|
+
*
|
|
7523
|
+
* @deprecated
|
|
7524
|
+
*/
|
|
7525
|
+
"-webkit-box-orient"?: Property.BoxOrient | undefined;
|
|
7526
|
+
/**
|
|
7527
|
+
* The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.
|
|
7528
|
+
*
|
|
7529
|
+
* **Syntax**: `start | center | end | justify`
|
|
7530
|
+
*
|
|
7531
|
+
* **Initial value**: `start`
|
|
7532
|
+
*
|
|
7533
|
+
* @deprecated
|
|
7534
|
+
*/
|
|
7535
|
+
"-webkit-box-pack"?: Property.BoxPack | undefined;
|
|
7536
|
+
}
|
|
7537
|
+
|
|
7538
|
+
declare type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>;
|
|
7539
|
+
|
|
7540
|
+
declare interface OneAccountInfo {
|
|
7541
|
+
/**
|
|
7542
|
+
* @description accountId
|
|
7543
|
+
*/
|
|
7544
|
+
oneAccountId?: string;
|
|
7545
|
+
/**
|
|
7546
|
+
* @description 邮箱
|
|
7547
|
+
*/
|
|
7548
|
+
email?: string;
|
|
7549
|
+
/**
|
|
7550
|
+
* @description 账号状态
|
|
7551
|
+
*/
|
|
7552
|
+
accountStatus?: string;
|
|
7553
|
+
}
|
|
7554
|
+
|
|
7555
|
+
/**
|
|
7556
|
+
* @description one account 账户信息查询结果
|
|
7557
|
+
*/
|
|
7558
|
+
declare interface OneAccountQueryResult {
|
|
7559
|
+
/**
|
|
7560
|
+
* @description 是否业务处理成功
|
|
7561
|
+
*/
|
|
7562
|
+
success?: boolean;
|
|
7563
|
+
/**
|
|
7564
|
+
* @description 错误上下文
|
|
7565
|
+
*/
|
|
7566
|
+
errorContext?: ErrorContext;
|
|
7567
|
+
/**
|
|
7568
|
+
* @description 返回结果码
|
|
7569
|
+
*/
|
|
7570
|
+
resultCode?: string;
|
|
7571
|
+
/**
|
|
7572
|
+
* @description 返回结果信息
|
|
7573
|
+
*/
|
|
7574
|
+
resultMessage?: string;
|
|
7575
|
+
/**
|
|
7576
|
+
* @description error actions
|
|
7577
|
+
*/
|
|
7578
|
+
errorActions?: Record<string, string>;
|
|
7579
|
+
/**
|
|
7580
|
+
* @description error code
|
|
7581
|
+
*/
|
|
7582
|
+
errorCode?: string;
|
|
7583
|
+
/**
|
|
7584
|
+
* @description error status
|
|
7585
|
+
*/
|
|
7586
|
+
errorStatus?: string;
|
|
6852
7587
|
/**
|
|
6853
|
-
*
|
|
6854
|
-
*
|
|
6855
|
-
* **Syntax**: `<integer>`
|
|
6856
|
-
*
|
|
6857
|
-
* **Initial value**: `1`
|
|
6858
|
-
*
|
|
6859
|
-
* @deprecated
|
|
7588
|
+
* @description error message
|
|
6860
7589
|
*/
|
|
6861
|
-
|
|
7590
|
+
errorMessage?: string;
|
|
6862
7591
|
/**
|
|
6863
|
-
*
|
|
6864
|
-
*
|
|
6865
|
-
* **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit`
|
|
6866
|
-
*
|
|
6867
|
-
* **Initial value**: `inline-axis`
|
|
6868
|
-
*
|
|
6869
|
-
* @deprecated
|
|
7592
|
+
* @description extend info
|
|
6870
7593
|
*/
|
|
6871
|
-
|
|
7594
|
+
extendInfo?: Record<string, string>;
|
|
6872
7595
|
/**
|
|
6873
|
-
*
|
|
6874
|
-
*
|
|
6875
|
-
* **Syntax**: `start | center | end | justify`
|
|
6876
|
-
*
|
|
6877
|
-
* **Initial value**: `start`
|
|
6878
|
-
*
|
|
6879
|
-
* @deprecated
|
|
7596
|
+
* @description one account 账户信息
|
|
6880
7597
|
*/
|
|
6881
|
-
|
|
6882
|
-
}
|
|
6883
|
-
|
|
6884
|
-
declare type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>;
|
|
6885
|
-
|
|
6886
|
-
declare interface OneAccountInfo {
|
|
7598
|
+
accountInfo?: OneAccountInfo;
|
|
6887
7599
|
/**
|
|
6888
|
-
* @description
|
|
7600
|
+
* @description action form 下一步动作
|
|
6889
7601
|
*/
|
|
6890
|
-
|
|
7602
|
+
actionForm?: OtpChallengeActionForm;
|
|
6891
7603
|
/**
|
|
6892
|
-
* @description
|
|
7604
|
+
* @description 支付方式列表
|
|
6893
7605
|
*/
|
|
6894
|
-
|
|
7606
|
+
paymentMethods?: PaymentMethodView[];
|
|
6895
7607
|
/**
|
|
6896
|
-
* @description
|
|
7608
|
+
* @description 物流信息
|
|
6897
7609
|
*/
|
|
6898
|
-
|
|
7610
|
+
shippings?: ShippingInfo_2[];
|
|
7611
|
+
/**
|
|
7612
|
+
* @description 支付金额 (订单金额 + 物流费)
|
|
7613
|
+
*/
|
|
7614
|
+
paymentAmount?: MobileMoneyView;
|
|
6899
7615
|
}
|
|
6900
7616
|
|
|
6901
7617
|
/**
|
|
@@ -6916,6 +7632,49 @@ declare interface OpenModalParams extends BaseOpenModalConfig {
|
|
|
6916
7632
|
textDirection?: 'ltr' | 'rtl';
|
|
6917
7633
|
}
|
|
6918
7634
|
|
|
7635
|
+
declare class OpenSDKError<Code extends string = string> extends Error {
|
|
7636
|
+
code: Code | OpenSDKInternalErrorCodes;
|
|
7637
|
+
name: string;
|
|
7638
|
+
/**
|
|
7639
|
+
* @internal
|
|
7640
|
+
*/
|
|
7641
|
+
protected _openSDKErrorFlag: string;
|
|
7642
|
+
source: ErrorSource;
|
|
7643
|
+
traceId?: string;
|
|
7644
|
+
/**
|
|
7645
|
+
* @description 用于存储原始错误信息的,给内部调试
|
|
7646
|
+
*/
|
|
7647
|
+
reason: string;
|
|
7648
|
+
static isError(error: any): error is OpenSDKError;
|
|
7649
|
+
/**
|
|
7650
|
+
* @description 统一转换error为OpenSDKError
|
|
7651
|
+
*/
|
|
7652
|
+
static unificationError(error: unknown, source?: ErrorSource): OpenSDKError;
|
|
7653
|
+
static initConfig(config: Partial<GlobalOptions>): void;
|
|
7654
|
+
constructor(_message: string | {
|
|
7655
|
+
message: string;
|
|
7656
|
+
params?: Record<string, any>;
|
|
7657
|
+
}, code: Code | OpenSDKInternalErrorCodes, source: ErrorSource, _traceId?: string, serverAPIWithoutI18n?: boolean);
|
|
7658
|
+
toJSON(): ErrorPayload<Code | OpenSDKInternalErrorCodes>;
|
|
7659
|
+
}
|
|
7660
|
+
|
|
7661
|
+
declare const OpenSDKInternalErrorCodes: {
|
|
7662
|
+
/**
|
|
7663
|
+
* @description 未知错误
|
|
7664
|
+
*/
|
|
7665
|
+
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
7666
|
+
/**
|
|
7667
|
+
* @description 无端口错误,通常发生在模态通信中,SDK期望接收一个MessagePort但未收到
|
|
7668
|
+
*/
|
|
7669
|
+
readonly NO_PORTS_ERROR: "NO_PORTS_ERROR";
|
|
7670
|
+
/**
|
|
7671
|
+
* @description 非法的URL
|
|
7672
|
+
*/
|
|
7673
|
+
readonly INVALID_REDIRECT_URL: "INVALID_REDIRECT_URL";
|
|
7674
|
+
};
|
|
7675
|
+
|
|
7676
|
+
declare type OpenSDKInternalErrorCodes = (typeof OpenSDKInternalErrorCodes)[keyof typeof OpenSDKInternalErrorCodes];
|
|
7677
|
+
|
|
6919
7678
|
declare class OpenSDKTracker {
|
|
6920
7679
|
private options?;
|
|
6921
7680
|
private tracker?;
|
|
@@ -7061,6 +7820,56 @@ declare interface OSInfo {
|
|
|
7061
7820
|
osVer?: string;
|
|
7062
7821
|
}
|
|
7063
7822
|
|
|
7823
|
+
declare interface OtpChallengeActionForm {
|
|
7824
|
+
/**
|
|
7825
|
+
* @description action form type
|
|
7826
|
+
*/
|
|
7827
|
+
actionFormType?: string;
|
|
7828
|
+
/**
|
|
7829
|
+
* @description type of challenge
|
|
7830
|
+
*/
|
|
7831
|
+
challengeType?: string;
|
|
7832
|
+
/**
|
|
7833
|
+
* @description The actual render value
|
|
7834
|
+
*/
|
|
7835
|
+
challengeRenderValue?: string;
|
|
7836
|
+
/**
|
|
7837
|
+
* @description Describe the challenge is required by AAC or external party
|
|
7838
|
+
*/
|
|
7839
|
+
triggerSource?: string;
|
|
7840
|
+
/**
|
|
7841
|
+
* @description is support retry challenge
|
|
7842
|
+
* @default true
|
|
7843
|
+
*/
|
|
7844
|
+
isChallengeRetrySupported?: boolean;
|
|
7845
|
+
/**
|
|
7846
|
+
* @description is fist otp auto triggered
|
|
7847
|
+
* @default false
|
|
7848
|
+
*/
|
|
7849
|
+
isChallengeAutoTriggered?: boolean;
|
|
7850
|
+
/**
|
|
7851
|
+
* @description estimated challenge response duration
|
|
7852
|
+
* @default 0
|
|
7853
|
+
*/
|
|
7854
|
+
estimatedDuration?: number;
|
|
7855
|
+
/**
|
|
7856
|
+
* @description url - like h5 sdk challenge need to call back url
|
|
7857
|
+
*/
|
|
7858
|
+
challengeUrl?: string;
|
|
7859
|
+
/**
|
|
7860
|
+
* @description extend information
|
|
7861
|
+
*/
|
|
7862
|
+
extendInfo?: string;
|
|
7863
|
+
/**
|
|
7864
|
+
* @description verify Id
|
|
7865
|
+
*/
|
|
7866
|
+
verifyId?: string;
|
|
7867
|
+
/**
|
|
7868
|
+
* @description 重发次数
|
|
7869
|
+
*/
|
|
7870
|
+
resendLeftTimes?: number;
|
|
7871
|
+
}
|
|
7872
|
+
|
|
7064
7873
|
declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
|
|
7065
7874
|
|
|
7066
7875
|
declare interface PayByLinkInfo {
|
|
@@ -7082,6 +7891,105 @@ declare interface PayByLinkInfo {
|
|
|
7082
7891
|
linkVersion?: number;
|
|
7083
7892
|
}
|
|
7084
7893
|
|
|
7894
|
+
/**
|
|
7895
|
+
* @description Payment element app config type
|
|
7896
|
+
*/
|
|
7897
|
+
export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
|
|
7898
|
+
/**
|
|
7899
|
+
* @description sessionData,无法通过updateConfig更新
|
|
7900
|
+
*/
|
|
7901
|
+
sessionData?: string;
|
|
7902
|
+
/**
|
|
7903
|
+
* @internal sdk所在hostname
|
|
7904
|
+
*/
|
|
7905
|
+
merchantDomain?: string;
|
|
7906
|
+
/**
|
|
7907
|
+
* @internal 渲染数据
|
|
7908
|
+
*/
|
|
7909
|
+
renderData?: CashierSdkActionQueryResult;
|
|
7910
|
+
/**
|
|
7911
|
+
* @internal connect时有这个数据
|
|
7912
|
+
*/
|
|
7913
|
+
connectAccount?: OneAccountQueryResult;
|
|
7914
|
+
/**
|
|
7915
|
+
* @internal sessionData解析后的数据
|
|
7916
|
+
*/
|
|
7917
|
+
sessionMetaData?: IPaymentSessionMetaData;
|
|
7918
|
+
/**
|
|
7919
|
+
* @internal 渲染数据错误信息
|
|
7920
|
+
*/
|
|
7921
|
+
renderDataError?: ErrorPayload;
|
|
7922
|
+
/**
|
|
7923
|
+
* @internal sdk 版本号
|
|
7924
|
+
*/
|
|
7925
|
+
sdkVersion?: string;
|
|
7926
|
+
/**
|
|
7927
|
+
* @internal 内部联调使用,生产环境传递无效
|
|
7928
|
+
*/
|
|
7929
|
+
_requestConfig?: Partial<Omit<RequestOptions, 'scope' | 'tracker'>>;
|
|
7930
|
+
/**
|
|
7931
|
+
* @internal 内部使用,无需用户传递,用于log日志原数据
|
|
7932
|
+
*/
|
|
7933
|
+
logMetaData?: {
|
|
7934
|
+
paymentMethodCategoryType?: PaymentSessionConfig['paymentMethodCategoryType'];
|
|
7935
|
+
productSceneVersion?: PaymentSessionConfig['productSceneVersion'];
|
|
7936
|
+
trackId: string;
|
|
7937
|
+
merchantId?: string;
|
|
7938
|
+
paymentMethodType?: string;
|
|
7939
|
+
};
|
|
7940
|
+
/**
|
|
7941
|
+
* @internal 内部使用,无需用户传递,高度信息
|
|
7942
|
+
*/
|
|
7943
|
+
heightOfVisible?: number;
|
|
7944
|
+
}
|
|
7945
|
+
|
|
7946
|
+
/**
|
|
7947
|
+
* @description Payment element appearance type
|
|
7948
|
+
*/
|
|
7949
|
+
export declare type PaymentAppearance = PickAppearance<{
|
|
7950
|
+
displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
|
|
7951
|
+
theme: AntomTheme;
|
|
7952
|
+
variables: AntomVariables;
|
|
7953
|
+
layout: AntomLayouts;
|
|
7954
|
+
}>;
|
|
7955
|
+
|
|
7956
|
+
/**
|
|
7957
|
+
* @description Payment element
|
|
7958
|
+
*/
|
|
7959
|
+
export declare class PaymentElement extends BaseMainElement<PaymentElementConfig, PaymentElementEvents> {
|
|
7960
|
+
static elementType: string;
|
|
7961
|
+
private _submitting;
|
|
7962
|
+
constructor(name: string, config: PaymentElementConfig);
|
|
7963
|
+
/**
|
|
7964
|
+
* @internal
|
|
7965
|
+
*/
|
|
7966
|
+
setup(): Promise<Partial<PaymentAppConfig> | undefined>;
|
|
7967
|
+
/**
|
|
7968
|
+
* 更新 webapp 配置,对 amount 字段增加校验。
|
|
7969
|
+
* 其他字段透传基类 updateConfig 不做额外拦截。
|
|
7970
|
+
*/
|
|
7971
|
+
updateConfig(newConfig: Partial<PaymentAppConfig>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
|
|
7972
|
+
/**
|
|
7973
|
+
* @internal
|
|
7974
|
+
*/
|
|
7975
|
+
submit(data?: PaymentSubmitParams): Promise<PaymentSubmitResult>;
|
|
7976
|
+
protected focus(): void;
|
|
7977
|
+
protected blur(): void;
|
|
7978
|
+
protected clear(): void;
|
|
7979
|
+
}
|
|
7980
|
+
|
|
7981
|
+
/**
|
|
7982
|
+
* @description Payment element config type
|
|
7983
|
+
*/
|
|
7984
|
+
declare interface PaymentElementConfig extends BaseElementConfig<PaymentAppConfig> {
|
|
7985
|
+
}
|
|
7986
|
+
|
|
7987
|
+
/**
|
|
7988
|
+
* @description Payment element events
|
|
7989
|
+
*/
|
|
7990
|
+
export declare interface PaymentElementEvents extends AntomBridgeWithNativeEventMap<PaymentAppConfig, PaymentSubmitParams, PaymentSubmitResult> {
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7085
7993
|
declare interface PaymentElementView {
|
|
7086
7994
|
/**
|
|
7087
7995
|
* @description payment element key
|
|
@@ -7183,6 +8091,36 @@ declare interface PaymentEvaluationResult {
|
|
|
7183
8091
|
paymentBalanceInfo?: DanaSofPayMethodView[];
|
|
7184
8092
|
}
|
|
7185
8093
|
|
|
8094
|
+
/**
|
|
8095
|
+
* @description Payment guidance information (CKP scenario)
|
|
8096
|
+
*
|
|
8097
|
+
* <p>Displays payment guide buttons on the checkout page, including: - Deep link: For launching the
|
|
8098
|
+
* bank application (required) - Copy configuration: Divider text, button labels, etc. (extensible
|
|
8099
|
+
* via Map, dynamically addable)
|
|
8100
|
+
*/
|
|
8101
|
+
declare interface PaymentGuideInfo {
|
|
8102
|
+
/**
|
|
8103
|
+
* @description The deep link (from iexpprod, used to launch the bank app) The frontend only displays the
|
|
8104
|
+
* payment guide button when this field is populated
|
|
8105
|
+
*/
|
|
8106
|
+
appLinkUrlForWeb?: string;
|
|
8107
|
+
/**
|
|
8108
|
+
* @description Copy configuration (from the config center) Stored in a Map to support dynamic extension of
|
|
8109
|
+
* text fields
|
|
8110
|
+
*
|
|
8111
|
+
* <p>Example configuration:
|
|
8112
|
+
*
|
|
8113
|
+
* <pre>
|
|
8114
|
+
* {
|
|
8115
|
+
* "dividerText": "or pay using",
|
|
8116
|
+
* "directPayButtonText": "Pay directly with online banking",
|
|
8117
|
+
* "ctoPButtonText": "Continue to payment"
|
|
8118
|
+
* }
|
|
8119
|
+
* </pre>
|
|
8120
|
+
*/
|
|
8121
|
+
copyWriting?: Record<string, any>;
|
|
8122
|
+
}
|
|
8123
|
+
|
|
7186
8124
|
/**
|
|
7187
8125
|
* @description 支付方式余额检查结果信息
|
|
7188
8126
|
*/
|
|
@@ -7245,6 +8183,10 @@ declare interface PaymentMethodView {
|
|
|
7245
8183
|
* @description icon
|
|
7246
8184
|
*/
|
|
7247
8185
|
icon?: string;
|
|
8186
|
+
/**
|
|
8187
|
+
* @description adaptive icon for PAYME payment method
|
|
8188
|
+
*/
|
|
8189
|
+
adaptiveIcon?: string;
|
|
7248
8190
|
/**
|
|
7249
8191
|
* @description icon对应的名称
|
|
7250
8192
|
*/
|
|
@@ -7253,6 +8195,10 @@ declare interface PaymentMethodView {
|
|
|
7253
8195
|
* @description 支付方式描述
|
|
7254
8196
|
*/
|
|
7255
8197
|
description?: string;
|
|
8198
|
+
/**
|
|
8199
|
+
* @description 支付方式点击后的描述
|
|
8200
|
+
*/
|
|
8201
|
+
descriptionAfterClick?: string;
|
|
7256
8202
|
/**
|
|
7257
8203
|
* @description category
|
|
7258
8204
|
*/
|
|
@@ -7387,6 +8333,10 @@ declare interface PaymentMethodView {
|
|
|
7387
8333
|
* @description 账单地址收集模式
|
|
7388
8334
|
*/
|
|
7389
8335
|
billingAddressCollectionMode?: string;
|
|
8336
|
+
/**
|
|
8337
|
+
* @description 分期银行信息列表
|
|
8338
|
+
*/
|
|
8339
|
+
supportIppBankList?: FrontSupportIppBank[];
|
|
7390
8340
|
}
|
|
7391
8341
|
|
|
7392
8342
|
declare interface PaymentOption {
|
|
@@ -7454,6 +8404,10 @@ declare interface PaymentOption {
|
|
|
7454
8404
|
* @description 支付选项Logo信息
|
|
7455
8405
|
*/
|
|
7456
8406
|
logo?: Logo;
|
|
8407
|
+
/**
|
|
8408
|
+
* @description 支付描述多语言列表。如果入参有locale,且入参的locale有对应语言,则这里只返回locale对应的语言。
|
|
8409
|
+
*/
|
|
8410
|
+
description?: Record<string, string>;
|
|
7457
8411
|
/**
|
|
7458
8412
|
* @description extendInfo extendInfo information
|
|
7459
8413
|
*/
|
|
@@ -7521,6 +8475,13 @@ declare interface PaymentQuoteInfo {
|
|
|
7521
8475
|
* @description payment amount view
|
|
7522
8476
|
*/
|
|
7523
8477
|
paymentAmountView?: PaymentView;
|
|
8478
|
+
/**
|
|
8479
|
+
* @description Display exchange rate from FX domain Quote, direction-adjusted and formatted to 2 decimal
|
|
8480
|
+
* places. - BID direction: value = 1/price, setScale(2, HALF_UP) - OFFER direction: value =
|
|
8481
|
+
* price, setScale(2, HALF_UP) Used for direct frontend access to exchange rate. Example: 3.16 for
|
|
8482
|
+
* MYR/SGD currency pair
|
|
8483
|
+
*/
|
|
8484
|
+
quotePrice?: any;
|
|
7524
8485
|
}
|
|
7525
8486
|
|
|
7526
8487
|
/**
|
|
@@ -7630,6 +8591,41 @@ declare interface PaymentSessionConfig {
|
|
|
7630
8591
|
productSceneVersion?: string;
|
|
7631
8592
|
}
|
|
7632
8593
|
|
|
8594
|
+
/**
|
|
8595
|
+
* @description The submit params
|
|
8596
|
+
*/
|
|
8597
|
+
export declare interface PaymentSubmitParams extends SubmitParams {
|
|
8598
|
+
/**
|
|
8599
|
+
* @description 是否由antom sdk自动处理唤端逻辑,默认为true,由sdk自动处理。
|
|
8600
|
+
* 如果antom sdk唤起客户端失败,建议设置为false,商家自行唤端
|
|
8601
|
+
*/
|
|
8602
|
+
handleActions?: boolean;
|
|
8603
|
+
/**
|
|
8604
|
+
* @description 收件地址信息
|
|
8605
|
+
*/
|
|
8606
|
+
shippingInfo?: ShippingInfo;
|
|
8607
|
+
}
|
|
8608
|
+
|
|
8609
|
+
/**
|
|
8610
|
+
* @description Payment element submit result
|
|
8611
|
+
*/
|
|
8612
|
+
export declare interface PaymentSubmitResult extends SubmitResult {
|
|
8613
|
+
paymentSession?: {
|
|
8614
|
+
/**
|
|
8615
|
+
* @description 回调页面的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8616
|
+
*/
|
|
8617
|
+
returnUrl: string;
|
|
8618
|
+
/**
|
|
8619
|
+
* @description 回调页面唤起app的url链接,使用浏览器可直接打开,比如 http://xxx.app.com/xxx
|
|
8620
|
+
*/
|
|
8621
|
+
returnAppUrl?: string;
|
|
8622
|
+
/**
|
|
8623
|
+
* @description 回调页面唤起app的scheme链接,比如 alipay://xxx
|
|
8624
|
+
*/
|
|
8625
|
+
returnAppScheme?: string;
|
|
8626
|
+
};
|
|
8627
|
+
}
|
|
8628
|
+
|
|
7633
8629
|
declare interface PaymentView {
|
|
7634
8630
|
/**
|
|
7635
8631
|
* @description 金额,以元为单位的金额
|
|
@@ -7748,6 +8744,11 @@ declare interface PeriodRule {
|
|
|
7748
8744
|
periodCount?: number;
|
|
7749
8745
|
}
|
|
7750
8746
|
|
|
8747
|
+
/**
|
|
8748
|
+
* @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
|
|
8749
|
+
* 返回受 Props 中存在的键约束的部分外观对象。
|
|
8750
|
+
* @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
|
|
8751
|
+
*/
|
|
7751
8752
|
declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
|
|
7752
8753
|
|
|
7753
8754
|
declare interface PluginContext {
|
|
@@ -9720,6 +10721,24 @@ TValue extends Array<infer AValue> ? Array<AValue extends infer TUnpacked & {} ?
|
|
|
9720
10721
|
|
|
9721
10722
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
9722
10723
|
|
|
10724
|
+
/**
|
|
10725
|
+
* @description QR code configuration for code form view
|
|
10726
|
+
*/
|
|
10727
|
+
declare interface QrCodeConfig {
|
|
10728
|
+
/**
|
|
10729
|
+
* @description QR code render style, e.g. "rounded"
|
|
10730
|
+
*/
|
|
10731
|
+
renderStyle?: string;
|
|
10732
|
+
/**
|
|
10733
|
+
* @description QR code center icon, can be URL or Base64 format
|
|
10734
|
+
*/
|
|
10735
|
+
centerIcon?: string;
|
|
10736
|
+
/**
|
|
10737
|
+
* @description QR code corner icon, can be URL or Base64 format
|
|
10738
|
+
*/
|
|
10739
|
+
cornerIcon?: string;
|
|
10740
|
+
}
|
|
10741
|
+
|
|
9723
10742
|
declare interface Rate {
|
|
9724
10743
|
/**
|
|
9725
10744
|
* @description rate label value
|
|
@@ -9789,8 +10808,26 @@ declare class ReceivePort {
|
|
|
9789
10808
|
}): Promise<Record<string, any> | undefined>;
|
|
9790
10809
|
}
|
|
9791
10810
|
|
|
10811
|
+
/**
|
|
10812
|
+
* @description 从webapp重定向到新URL的配置项。
|
|
10813
|
+
* 支持浏览器重定向、app link唤端及schema唤端。
|
|
10814
|
+
*/
|
|
9792
10815
|
declare interface RedirectOption {
|
|
10816
|
+
/**
|
|
10817
|
+
* @description 浏览器重定向到兜底的url,通常在唤端失败时会走这个,或者你不需要唤端,只需要跳转到某个url
|
|
10818
|
+
*/
|
|
9793
10819
|
url: string;
|
|
10820
|
+
/**
|
|
10821
|
+
* @description 唤端到url地址,http或https的地址
|
|
10822
|
+
*/
|
|
10823
|
+
appLinkUrl?: string;
|
|
10824
|
+
/**
|
|
10825
|
+
* @description 唤端到schema地址, schema://的地址
|
|
10826
|
+
*/
|
|
10827
|
+
schemaUrl?: string;
|
|
10828
|
+
/**
|
|
10829
|
+
* @description 重定向模式,默认为redirect
|
|
10830
|
+
*/
|
|
9794
10831
|
mode?: 'redirect' | 'replace';
|
|
9795
10832
|
/**
|
|
9796
10833
|
* @description 是否重定向后销毁实例,默认为true
|
|
@@ -10026,7 +11063,25 @@ declare interface SharePayInfo {
|
|
|
10026
11063
|
securityText?: string;
|
|
10027
11064
|
}
|
|
10028
11065
|
|
|
10029
|
-
declare interface ShippingInfo {
|
|
11066
|
+
export declare interface ShippingInfo {
|
|
11067
|
+
shippingName: {
|
|
11068
|
+
firstName: string;
|
|
11069
|
+
lastName: string;
|
|
11070
|
+
middleName?: string;
|
|
11071
|
+
fullName?: string;
|
|
11072
|
+
};
|
|
11073
|
+
shippingPhoneNo: string;
|
|
11074
|
+
shippingAddress: {
|
|
11075
|
+
region: string;
|
|
11076
|
+
address1: string;
|
|
11077
|
+
address2: string;
|
|
11078
|
+
city?: string;
|
|
11079
|
+
state?: string;
|
|
11080
|
+
zipCode: string;
|
|
11081
|
+
};
|
|
11082
|
+
}
|
|
11083
|
+
|
|
11084
|
+
declare interface ShippingInfo_2 {
|
|
10030
11085
|
/**
|
|
10031
11086
|
* @description The unique ID to identify the shipping info
|
|
10032
11087
|
*/
|
|
@@ -10102,6 +11157,10 @@ export declare interface ShippingResolveOptions {
|
|
|
10102
11157
|
}>;
|
|
10103
11158
|
}
|
|
10104
11159
|
|
|
11160
|
+
declare type SimpleI18n = {
|
|
11161
|
+
get(id: GetI18nQueryParam, variable?: Record<string, any>, localeCode?: string): string;
|
|
11162
|
+
};
|
|
11163
|
+
|
|
10105
11164
|
declare type SimplePseudos =
|
|
10106
11165
|
| ":-khtml-any-link"
|
|
10107
11166
|
| ":-moz-any-link"
|
|
@@ -23940,22 +24999,43 @@ declare interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0,
|
|
|
23940
24999
|
|
|
23941
25000
|
declare type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>;
|
|
23942
25001
|
|
|
25002
|
+
export declare type SubmitParams = {
|
|
25003
|
+
redirect?: 'always' | 'if_required';
|
|
25004
|
+
};
|
|
25005
|
+
|
|
23943
25006
|
/**
|
|
23944
|
-
* @description
|
|
25007
|
+
* @description 成功时的数据类型
|
|
23945
25008
|
*/
|
|
23946
25009
|
export declare type SubmitResult = {
|
|
23947
25010
|
/**
|
|
23948
|
-
*
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
/**
|
|
23952
|
-
* 查询到的结果码或者错误码, 在SUCCESS和CANCELLED无该字段
|
|
25011
|
+
* 查询到的结果码或者错误码, 在SUCCESS无该字段
|
|
25012
|
+
* @deprecated 已废弃请读取error中的code
|
|
25013
|
+
* @internal
|
|
23953
25014
|
*/
|
|
23954
25015
|
code?: string;
|
|
23955
25016
|
/**
|
|
23956
|
-
* 查询到的结果消息, 在SUCCESS
|
|
25017
|
+
* 查询到的结果消息, 在SUCCESS无该字段
|
|
25018
|
+
* @deprecated 已废弃请读取error中的message
|
|
25019
|
+
* @internal
|
|
23957
25020
|
*/
|
|
23958
25021
|
message?: string;
|
|
25022
|
+
/**
|
|
25023
|
+
* 查询到的状态
|
|
25024
|
+
*/
|
|
25025
|
+
status: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
|
|
25026
|
+
/**
|
|
25027
|
+
* @description 对结果的详细结果码和结果信息,在status为SUCCESS时无该字段
|
|
25028
|
+
*/
|
|
25029
|
+
error?: {
|
|
25030
|
+
/**
|
|
25031
|
+
* 查询到的结果码或者错误码
|
|
25032
|
+
*/
|
|
25033
|
+
code?: string;
|
|
25034
|
+
/**
|
|
25035
|
+
* 查询到的结果消息
|
|
25036
|
+
*/
|
|
25037
|
+
message?: string;
|
|
25038
|
+
};
|
|
23959
25039
|
/**
|
|
23960
25040
|
* 是否是用户手动取消3D
|
|
23961
25041
|
*/
|
|
@@ -24413,6 +25493,16 @@ declare interface TerminalTypeAction {
|
|
|
24413
25493
|
interactionType?: string;
|
|
24414
25494
|
}
|
|
24415
25495
|
|
|
25496
|
+
/**
|
|
25497
|
+
* 主题色映射表 — 将 AntomTheme 映射到 loading 阶段的明暗模式和背景色。
|
|
25498
|
+
* 被 antom.ts(老架构入口)和 modernElementController(新架构入口)共用,
|
|
25499
|
+
* 确保两条路径的弹窗 loading 表现一致。
|
|
25500
|
+
*/
|
|
25501
|
+
export declare const themeColorMap: Record<AntomTheme, {
|
|
25502
|
+
theme: 'dark' | 'light';
|
|
25503
|
+
backgroundColor: string;
|
|
25504
|
+
}>;
|
|
25505
|
+
|
|
24416
25506
|
declare class Tracker {
|
|
24417
25507
|
protected requesterCacheWrapper?: RequesterCacheWrapper;
|
|
24418
25508
|
private initPromise;
|
|
@@ -24757,7 +25847,7 @@ export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>
|
|
|
24757
25847
|
export declare type VaultingAppearanceProps = {
|
|
24758
25848
|
displaySetting: 'showCardBrandIcon';
|
|
24759
25849
|
theme: AntomTheme;
|
|
24760
|
-
variables:
|
|
25850
|
+
variables: AntomVariables;
|
|
24761
25851
|
};
|
|
24762
25852
|
|
|
24763
25853
|
/**
|
|
@@ -24786,7 +25876,7 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
|
|
|
24786
25876
|
declare interface VaultingElementConfig extends BaseElementConfig<VaultingAppConfig> {
|
|
24787
25877
|
}
|
|
24788
25878
|
|
|
24789
|
-
export declare interface VaultingElementEvents extends
|
|
25879
|
+
export declare interface VaultingElementEvents extends AntomBridgeWithNativeEventMap<VaultingAppConfig, VaultingSubmitParams> {
|
|
24790
25880
|
}
|
|
24791
25881
|
|
|
24792
25882
|
/**
|