@alipay/ams-checkout 0.0.1726734012-dev.0 → 0.0.1726734012-dev.2
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/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.d.ts +19 -0
- package/esm/component/channel.js +87 -0
- package/esm/component/component.inline.style.d.ts +10 -0
- package/esm/component/component.inline.style.js +121 -0
- package/esm/component/component.popup.style.d.ts +25 -0
- package/esm/component/component.popup.style.js +203 -0
- package/esm/component/popupWindow.style.d.ts +11 -0
- package/esm/component/popupWindow.style.js +121 -0
- package/esm/config/index.d.ts +11 -0
- package/esm/config/index.js +20 -1
- package/esm/constant/index.d.ts +25 -0
- package/esm/constant/index.js +28 -0
- package/esm/core/bus/index.d.ts +3 -3
- package/esm/core/bus/index.js +14 -14
- package/esm/core/component/address.d.ts +8 -0
- package/esm/core/component/address.js +72 -0
- package/esm/core/component/appPreloadProcessing.js +2 -2
- package/esm/core/component/ckp/index.js +12 -8
- package/esm/core/component/element/components/address.d.ts +19 -0
- package/esm/core/component/element/components/address.js +68 -0
- package/esm/core/component/element/components/auth.d.ts +17 -0
- package/esm/core/component/element/components/auth.js +60 -0
- package/esm/core/component/element/components/payment.d.ts +19 -0
- package/esm/core/component/element/components/payment.js +74 -0
- package/esm/core/component/element/index.d.ts +47 -0
- package/esm/core/component/element/index.js +817 -0
- package/esm/core/component/element/mock.d.ts +4 -0
- package/esm/core/component/element/mock.js +491 -0
- package/esm/core/component/element/type.d.ts +191 -0
- package/esm/core/component/element/type.js +36 -0
- package/esm/core/component/element/utils.d.ts +13 -0
- package/esm/core/component/element/utils.js +6 -0
- package/esm/core/component/index.d.ts +12 -7
- package/esm/core/component/index.js +132 -78
- package/esm/core/drop-in/index.js +2 -2
- package/esm/core/instance/index.d.ts +1 -0
- package/esm/core/instance/index.js +24 -11
- package/esm/foundation/core/index.d.ts +28 -0
- package/esm/foundation/core/index.js +396 -0
- package/esm/foundation/index.d.ts +75 -0
- package/esm/foundation/index.js +42 -0
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
- package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
- package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
- package/esm/foundation/product-processor/easysafepay/index.js +464 -0
- package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
- package/esm/foundation/service/api-bus/ability/callback.js +55 -0
- package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
- package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
- package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
- package/esm/foundation/service/api-bus/ability/request.js +151 -0
- package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
- package/esm/foundation/service/api-bus/ability/security.js +161 -0
- package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
- package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
- package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
- package/esm/foundation/service/api-bus/busManager.js +398 -0
- package/esm/foundation/service/api-bus/index.d.ts +20 -0
- package/esm/foundation/service/api-bus/index.js +88 -0
- package/esm/foundation/service/api-bus/interface.d.ts +48 -0
- package/esm/foundation/service/api-bus/interface.js +54 -0
- package/esm/foundation/service/container/index.d.ts +32 -0
- package/esm/foundation/service/container/index.js +330 -0
- package/esm/foundation/service/container/popup.d.ts +17 -0
- package/esm/foundation/service/container/popup.js +103 -0
- package/esm/foundation/service/container/utils.d.ts +7 -0
- package/esm/foundation/service/container/utils.js +48 -0
- package/esm/foundation/service/event-center.d.ts +82 -0
- package/esm/foundation/service/event-center.js +274 -0
- package/esm/foundation/service/global-data/index.d.ts +11 -0
- package/esm/foundation/service/global-data/index.js +68 -0
- package/esm/foundation/service/index.d.ts +19 -0
- package/esm/foundation/service/index.js +82 -0
- package/esm/foundation/service/log/index.d.ts +43 -0
- package/esm/foundation/service/log/index.js +250 -0
- package/esm/foundation/service/log/keys.d.ts +13 -0
- package/esm/foundation/service/log/keys.js +103 -0
- package/esm/foundation/service/log/processor.d.ts +9 -0
- package/esm/foundation/service/log/processor.js +148 -0
- package/esm/foundation/service/log/types.d.ts +32 -0
- package/esm/foundation/service/log/types.js +1 -0
- package/esm/foundation/service/requester/deps.d.ts +17 -0
- package/esm/foundation/service/requester/deps.js +11 -0
- package/esm/foundation/service/requester/requester.d.ts +22 -0
- package/esm/foundation/service/requester/requester.js +217 -0
- package/esm/foundation/service/security/index.d.ts +28 -0
- package/esm/foundation/service/security/index.js +284 -0
- package/esm/foundation/service/security/security.d.ts +33 -0
- package/esm/foundation/service/security/security.js +182 -0
- package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
- package/esm/foundation/utils/gray_scale_utils.js +40 -0
- package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
- package/esm/foundation/utils/payment_context_utils.js +57 -0
- package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
- package/esm/foundation/utils/payment_product_utils.js +38 -0
- package/esm/foundation/utils/redirect_utils.d.ts +11 -0
- package/esm/foundation/utils/redirect_utils.js +262 -0
- package/esm/foundation/utils/system_events.d.ts +4 -0
- package/esm/foundation/utils/system_events.js +66 -0
- package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
- package/esm/foundation/utils/web_app_url_utils.js +112 -0
- package/esm/index.d.ts +19 -12
- package/esm/index.js +110 -56
- package/esm/plugin/applepay/component.js +13 -11
- package/esm/plugin/applepay/index.js +10 -6
- package/esm/plugin/applepay/service.d.ts +2 -2
- package/esm/plugin/applepay/service.js +26 -18
- package/esm/plugin/component/cashierApp.d.ts +10 -8
- package/esm/plugin/component/cashierApp.js +48 -11
- package/esm/plugin/component/channel.d.ts +4 -3
- package/esm/plugin/component/channel.js +39 -2
- package/esm/plugin/component/component.inline.style.d.ts +9 -10
- package/esm/plugin/component/component.inline.style.js +93 -10
- package/esm/plugin/component/component.popup.style.d.ts +15 -6
- package/esm/plugin/component/component.popup.style.js +30 -7
- package/esm/plugin/component/index.d.ts +14 -8
- package/esm/plugin/component/index.js +383 -187
- package/esm/plugin/component/popupWindow.style.d.ts +5 -2
- package/esm/plugin/component/popupWindow.style.js +70 -14
- package/esm/plugin/const.js +5 -5
- package/esm/plugin/drop-in/index.d.ts +5 -5
- package/esm/plugin/drop-in/index.js +7 -7
- package/esm/plugin/payment-element/utils.d.ts +2 -0
- package/esm/plugin/payment-element/utils.js +6 -0
- package/esm/plugin/paypal/index.js +2 -1
- package/esm/plugin/type.d.ts +4 -3
- package/esm/service/element.d.ts +4 -0
- package/esm/service/element.js +51 -0
- package/esm/service/index.d.ts +1 -0
- package/esm/service/index.js +6 -2
- package/esm/types/index.d.ts +337 -40
- package/esm/types/index.js +119 -55
- package/esm/util/createIframeNode.d.ts +2 -2
- package/esm/util/createIframeNode.js +3 -3
- package/esm/util/getBackScheme.d.ts +5 -0
- package/esm/util/getBackScheme.js +133 -0
- package/esm/util/index.js +4 -8
- package/esm/util/logger.d.ts +3 -3
- package/esm/util/logger.js +49 -13
- package/esm/util/security.d.ts +3 -2
- package/esm/util/security.js +2 -2
- package/esm/util/spm-map.d.ts +172 -0
- package/esm/util/spm-map.js +172 -0
- package/package.json +3 -1
package/esm/types/index.d.ts
CHANGED
@@ -5,6 +5,18 @@
|
|
5
5
|
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
6
6
|
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
7
7
|
*/
|
8
|
+
export * from '../core/component/element/type';
|
9
|
+
export type onChange = () => onCnageResult;
|
10
|
+
interface onCnageResult {
|
11
|
+
complete: boolean;
|
12
|
+
addressValue: AddressItem[];
|
13
|
+
selectIndex: number | string;
|
14
|
+
}
|
15
|
+
export type getValue = (hasValidate: boolean) => Promise<AddressValueResult>;
|
16
|
+
interface AddressValueResult {
|
17
|
+
complete: boolean;
|
18
|
+
value: AddressItem;
|
19
|
+
}
|
8
20
|
/**
|
9
21
|
* SDK options
|
10
22
|
*/
|
@@ -17,18 +29,19 @@ export interface IoptionsParams {
|
|
17
29
|
onLog?: callOnLog;
|
18
30
|
onEventCallback?: callOnEventCallback;
|
19
31
|
onClose?: callOnClose;
|
20
|
-
|
21
|
-
mode?: string;
|
32
|
+
onChange?: onChange;
|
22
33
|
analytics?: {
|
23
34
|
enabled: boolean;
|
24
35
|
};
|
25
|
-
product?: string;
|
26
36
|
onBeforeSubmit?: callOnBeforeSubmit;
|
37
|
+
product?: string;
|
38
|
+
networkMode?: string;
|
39
|
+
mode?: string;
|
27
40
|
}
|
28
41
|
export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
|
29
42
|
}
|
30
43
|
export type Iselector = string;
|
31
|
-
export declare enum
|
44
|
+
export declare enum DisplayTypeEnum {
|
32
45
|
'popup' = "popup",
|
33
46
|
'inline' = "inline"
|
34
47
|
}
|
@@ -41,7 +54,11 @@ export interface IcreatePaymentParams {
|
|
41
54
|
backgroundColor?: string;
|
42
55
|
};
|
43
56
|
}
|
44
|
-
export declare enum
|
57
|
+
export declare enum ComponentSignEnumV2 {
|
58
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
59
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
|
60
|
+
}
|
61
|
+
export declare enum ComponentSignEnum {
|
45
62
|
'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
|
46
63
|
'EASY_PAY_APM' = "EASY_PAY_APM",
|
47
64
|
'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
|
@@ -51,9 +68,11 @@ export declare enum componentSignEnum {
|
|
51
68
|
'AUTO_DEBIT_PAY_WALLET' = "AUTO_DEBIT_PAY_WALLET",
|
52
69
|
'NONE' = "NONE",
|
53
70
|
'VAULTING_CARD' = "VAULTING_CARD",
|
54
|
-
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
71
|
+
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT",
|
72
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
73
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
|
55
74
|
}
|
56
|
-
export declare enum
|
75
|
+
export declare enum ProductSceneEnum {
|
57
76
|
'EASY_PAY' = "EASY_PAY",
|
58
77
|
'CASHIER_PAYMENT' = "CASHIER_PAYMENT",
|
59
78
|
'AUTO_DEBIT' = "AUTO_DEBIT",
|
@@ -61,34 +80,98 @@ export declare enum productSceneEnum {
|
|
61
80
|
'VAULTING' = "VAULTING",
|
62
81
|
'FLASH_BUY' = "FLASH_BUY",
|
63
82
|
'CARD_APPLE_PAY' = "CARD_APPLE_PAY",
|
83
|
+
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT",
|
84
|
+
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS",
|
64
85
|
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
|
65
86
|
}
|
66
|
-
export declare enum
|
87
|
+
export declare enum PaymentMethodCategoryTypeEnum {
|
67
88
|
'CARD' = "CARD",
|
68
89
|
'WALLET' = "WALLET",
|
69
90
|
'BANK' = "BANK",
|
70
|
-
'APM' = "APM"
|
91
|
+
'APM' = "APM",
|
92
|
+
'ALL' = "ALL"
|
71
93
|
}
|
72
94
|
export interface DeviceIdParameter {
|
73
95
|
scene?: string;
|
74
|
-
productScene?:
|
75
|
-
paymentMethodCategoryType?:
|
96
|
+
productScene?: ProductSceneEnum;
|
97
|
+
paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
|
76
98
|
tokenCollectTime?: string;
|
77
99
|
dataPollingInterval?: string;
|
78
100
|
}
|
79
101
|
export interface IcreateComponent {
|
80
102
|
sessionData: string;
|
81
103
|
paymentSessionData?: string;
|
104
|
+
elementProps?: {
|
105
|
+
elementLink: string;
|
106
|
+
};
|
107
|
+
appendAliasContainerId?: boolean;
|
82
108
|
notRedirectAfterComplete?: boolean;
|
83
|
-
appearance?:
|
109
|
+
appearance?: {
|
110
|
+
[x: string]: any;
|
111
|
+
themeType?: string;
|
112
|
+
accentColor?: string;
|
113
|
+
};
|
114
|
+
isAppWebview?: boolean;
|
84
115
|
merchantAppointParam?: IMerchantAppointParam;
|
85
116
|
}
|
86
117
|
export interface IappendIframeNodesParams extends IcreateComponent {
|
87
|
-
paymentSessionMetaData:
|
88
|
-
renderDisplayType:
|
118
|
+
paymentSessionMetaData: IPaymentSessionMetaData;
|
119
|
+
renderDisplayType: DisplayTypeEnum;
|
89
120
|
selector?: Iselector;
|
90
121
|
paypalConfiguration?: IPaypalConfiguration;
|
91
|
-
|
122
|
+
/** 将address-element参数定义合入原参数定义 */
|
123
|
+
configParams?: {
|
124
|
+
hideFields?: string[];
|
125
|
+
addressAutoSuggestDisabled?: addressAutoSuggestDisabledType;
|
126
|
+
};
|
127
|
+
prefillValue?: AddressItem[];
|
128
|
+
componentSession?: string;
|
129
|
+
loca?: string;
|
130
|
+
}
|
131
|
+
/** 表单地址数据 */
|
132
|
+
export interface AddressItem {
|
133
|
+
shippingName: {
|
134
|
+
firstName: string;
|
135
|
+
lastName: string;
|
136
|
+
};
|
137
|
+
/** 手机号 */
|
138
|
+
shippingPhoneNo: string;
|
139
|
+
/** 地址 */
|
140
|
+
shippingAddress: {
|
141
|
+
/** 国家 */
|
142
|
+
region: string;
|
143
|
+
/** 地址1 */
|
144
|
+
address1: string;
|
145
|
+
/** 地址2 */
|
146
|
+
address2: string;
|
147
|
+
/** 省份 */
|
148
|
+
province?: string;
|
149
|
+
/** 城市 */
|
150
|
+
city?: string;
|
151
|
+
/** 地址级联 四层 【province,city,district,subDistrict】 */
|
152
|
+
district?: string[];
|
153
|
+
/** 邮政编码 */
|
154
|
+
zipCode: string;
|
155
|
+
/** 对应地址级联数据对象 */
|
156
|
+
districtValues?: {
|
157
|
+
/** 城市 */
|
158
|
+
city?: string;
|
159
|
+
/** 区/县 */
|
160
|
+
district?: string;
|
161
|
+
/** 省份 */
|
162
|
+
province?: string;
|
163
|
+
/** 子区域 */
|
164
|
+
subDistrict?: string;
|
165
|
+
};
|
166
|
+
};
|
167
|
+
/** 备注 */
|
168
|
+
notes?: string;
|
169
|
+
open?: boolean;
|
170
|
+
/** 是否默认地址 */
|
171
|
+
prefer?: '1' | '0';
|
172
|
+
shippingId?: string;
|
173
|
+
}
|
174
|
+
type addressAutoSuggestDisabledType = 0 | 1;
|
92
175
|
export interface IPaypalConfiguration {
|
93
176
|
style?: object;
|
94
177
|
blockPayPalCreditButton?: boolean;
|
@@ -119,8 +202,8 @@ export interface Isubmit {
|
|
119
202
|
billingAddress?: IbillingAddress;
|
120
203
|
}
|
121
204
|
export interface IpaymentSessionConfig {
|
122
|
-
productScene:
|
123
|
-
paymentMethodCategoryType
|
205
|
+
productScene: ProductSceneEnum;
|
206
|
+
paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
|
124
207
|
productSceneVersion: string;
|
125
208
|
}
|
126
209
|
export interface IpaymentSecurityConfig {
|
@@ -138,14 +221,28 @@ export interface IsecurityConfig {
|
|
138
221
|
h5gateway: string;
|
139
222
|
}
|
140
223
|
export interface InitSecurityConfig {
|
141
|
-
product:
|
224
|
+
product: ProductSceneEnum;
|
142
225
|
region?: string;
|
143
226
|
}
|
144
227
|
export interface frontModulesToBeLoadedInterface {
|
145
228
|
acquirerName: string;
|
146
229
|
scriptUrl: string;
|
147
230
|
}
|
148
|
-
export interface
|
231
|
+
export interface PaymentSessionActionData {
|
232
|
+
amountConfirmRequired?: boolean;
|
233
|
+
autoDebitWithToken: boolean;
|
234
|
+
enableSignAgreement?: boolean;
|
235
|
+
skipSdkQuery: boolean;
|
236
|
+
requireFastSdk: boolean;
|
237
|
+
nonCompliant?: boolean;
|
238
|
+
nonInitSecuritySDK?: boolean;
|
239
|
+
skipSdkQueryForm?: {
|
240
|
+
value: boolean;
|
241
|
+
version: string;
|
242
|
+
platform: string;
|
243
|
+
};
|
244
|
+
}
|
245
|
+
export interface IPaymentSessionMetaData {
|
149
246
|
clientId?: string;
|
150
247
|
renderDisplayType?: string;
|
151
248
|
paymentSessionConfig?: IpaymentSessionConfig;
|
@@ -153,18 +250,8 @@ export interface IpaymentSessionMetaData {
|
|
153
250
|
moneyView?: any;
|
154
251
|
extendInfo?: string;
|
155
252
|
paymentMethodInfoView?: any;
|
156
|
-
|
157
|
-
|
158
|
-
autoDebitWithToken: boolean;
|
159
|
-
enableSignAgreement?: boolean;
|
160
|
-
skipSdkQuery: boolean;
|
161
|
-
requireFastSdk: boolean;
|
162
|
-
skipSdkQueryForm?: {
|
163
|
-
value: boolean;
|
164
|
-
version: string;
|
165
|
-
platform: string;
|
166
|
-
};
|
167
|
-
};
|
253
|
+
paymentView?: any;
|
254
|
+
action?: PaymentSessionActionData;
|
168
255
|
authUrlInfo?: {
|
169
256
|
appIdentifier?: string;
|
170
257
|
applinkUrl?: string;
|
@@ -235,6 +322,9 @@ export interface IpaymentSessionMetaData {
|
|
235
322
|
};
|
236
323
|
frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
|
237
324
|
};
|
325
|
+
connectFactor?: {
|
326
|
+
enableConnect?: boolean;
|
327
|
+
};
|
238
328
|
}
|
239
329
|
export interface IPaymentSessionFactor {
|
240
330
|
merchantInfo?: IMerchantInfo;
|
@@ -281,7 +371,7 @@ export declare enum networkModeEnum {
|
|
281
371
|
export interface IcheckoutState {
|
282
372
|
paymentMethodType?: string;
|
283
373
|
}
|
284
|
-
export declare enum
|
374
|
+
export declare enum EnvironmentEnum {
|
285
375
|
sandbox = "sandbox",
|
286
376
|
prod = "prod",
|
287
377
|
light_sandbox = "light_sandbox"
|
@@ -302,7 +392,7 @@ export interface Ienv {
|
|
302
392
|
terminalType: terminalTypeEnum;
|
303
393
|
environment: string;
|
304
394
|
}
|
305
|
-
export declare enum
|
395
|
+
export declare enum PlatformEnum {
|
306
396
|
desktop = "desktop",
|
307
397
|
mobile = "mobile"
|
308
398
|
}
|
@@ -356,19 +446,19 @@ export type callOnBeforeSubmit = (state?: Record<string, any>) => Promise<onBefo
|
|
356
446
|
* @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
|
357
447
|
*/
|
358
448
|
export type callOnClose = () => void;
|
359
|
-
export declare enum
|
449
|
+
export declare enum MessageName {
|
360
450
|
SDK_TO_APP = "SDK_TO_APP",
|
361
451
|
APP_TO_SDK = "APP_TO_SDK",
|
362
452
|
APP_TO_APP = "APP_TO_APP"
|
363
453
|
}
|
364
|
-
export interface
|
365
|
-
name:
|
454
|
+
export interface EventPayload {
|
455
|
+
name: MessageName;
|
366
456
|
mode?: string;
|
367
457
|
appId?: string;
|
368
458
|
instanceId: string;
|
369
|
-
context:
|
459
|
+
context: EventPayloadContext;
|
370
460
|
}
|
371
|
-
export interface
|
461
|
+
export interface EventPayloadContext {
|
372
462
|
event: string;
|
373
463
|
data: any;
|
374
464
|
eventCallbackId?: string;
|
@@ -384,7 +474,7 @@ export interface AMSCheckoutOptions {
|
|
384
474
|
export interface Ianalytics {
|
385
475
|
enabled: boolean;
|
386
476
|
}
|
387
|
-
export declare enum
|
477
|
+
export declare enum TargetEnum {
|
388
478
|
BLANK = "_blank",
|
389
479
|
SELF = "_self",
|
390
480
|
REPLACE = "_replace"
|
@@ -515,6 +605,7 @@ export interface CashierSubmitPayResult {
|
|
515
605
|
normalUrl?: string;
|
516
606
|
errorStatus?: string;
|
517
607
|
message?: string;
|
608
|
+
traceId?: string;
|
518
609
|
}
|
519
610
|
export declare enum eventCodeEnum {
|
520
611
|
SDK_START_OF_LOADING = "SDK_START_OF_LOADING",
|
@@ -569,6 +660,212 @@ export declare enum ProductSceneVersion {
|
|
569
660
|
V2 = "2.0"
|
570
661
|
}
|
571
662
|
export type IAppendParams = {
|
572
|
-
componentSign:
|
663
|
+
componentSign: ComponentSignEnum;
|
573
664
|
iframeNodesParams: IappendIframeNodesParams;
|
574
665
|
};
|
666
|
+
export declare enum AccountStatusEnum {
|
667
|
+
EFFECTIVE = "EFFECTIVE",
|
668
|
+
UNREGISTERED = "UNREGISTERED"
|
669
|
+
}
|
670
|
+
export type IAccountInfo = {
|
671
|
+
email?: string;
|
672
|
+
verifyId?: string;
|
673
|
+
accountStatus?: AccountStatusEnum;
|
674
|
+
oneAccountId?: string;
|
675
|
+
needOtp?: boolean;
|
676
|
+
errorMsg?: string;
|
677
|
+
inputStatus?: 'success' | 'loading' | 'error' | 'focused' | '';
|
678
|
+
resendLeftTimes?: number;
|
679
|
+
};
|
680
|
+
export interface AccountQueryRequest {
|
681
|
+
paymentSessionData: string;
|
682
|
+
paymentSessionConfig: any;
|
683
|
+
accountInfo: IAccountInfo;
|
684
|
+
}
|
685
|
+
export interface ShippingsItem {
|
686
|
+
shippingName: {
|
687
|
+
firstName: string;
|
688
|
+
lastName: string;
|
689
|
+
};
|
690
|
+
prefer: '1' | '0';
|
691
|
+
shippingId: string;
|
692
|
+
shippingPhoneNo: string;
|
693
|
+
shippingAddress: {
|
694
|
+
region: string;
|
695
|
+
state: string;
|
696
|
+
city: string;
|
697
|
+
address1: string;
|
698
|
+
address2: string;
|
699
|
+
zipCode: string;
|
700
|
+
};
|
701
|
+
}
|
702
|
+
export interface ISubPaymentElementView {
|
703
|
+
defaultText: string;
|
704
|
+
defaultValue: string;
|
705
|
+
elementMandatory: boolean;
|
706
|
+
elementRegx?: string;
|
707
|
+
elementType: string;
|
708
|
+
extendInfo: string;
|
709
|
+
paramIllegalText: string;
|
710
|
+
paymentElementKey: string;
|
711
|
+
title: string;
|
712
|
+
validateFunction?: string;
|
713
|
+
isPart?: boolean;
|
714
|
+
isPartEnd?: boolean;
|
715
|
+
}
|
716
|
+
export interface IPaymentElement {
|
717
|
+
defaultValue: string;
|
718
|
+
elementMandatory: boolean;
|
719
|
+
elementType: string;
|
720
|
+
extendInfo: string;
|
721
|
+
paymentElementKey: string;
|
722
|
+
subPaymentElementView: ISubPaymentElementView[];
|
723
|
+
title: string;
|
724
|
+
}
|
725
|
+
export declare enum InterActionTypeEnum {
|
726
|
+
COLLECT_REDIRECT = "COLLECT_REDIRECT",
|
727
|
+
SHOW_CODE = "SHOW_CODE",
|
728
|
+
COLLECT_SHOW_CODE = "COLLECT_SHOW_CODE",
|
729
|
+
REDIRECT = "REDIRECT"
|
730
|
+
}
|
731
|
+
export interface IAmount {
|
732
|
+
amount?: string;
|
733
|
+
currency: string;
|
734
|
+
currencyLabel: string;
|
735
|
+
formattedAmount?: string;
|
736
|
+
formattedAmountWithCurrency?: string;
|
737
|
+
value: string;
|
738
|
+
}
|
739
|
+
export interface IAmountView {
|
740
|
+
currency: string;
|
741
|
+
currencyDivider: string;
|
742
|
+
currencyLabel: string;
|
743
|
+
currencySymbolPosition: 'L' | 'R';
|
744
|
+
formattedValue: string;
|
745
|
+
value: string;
|
746
|
+
}
|
747
|
+
export interface IPaymentMethod {
|
748
|
+
paymentMethodKey?: string;
|
749
|
+
antomPage?: string;
|
750
|
+
redirectUrl?: string;
|
751
|
+
icon?: string;
|
752
|
+
iconName?: string;
|
753
|
+
logoList?: Array<{
|
754
|
+
cardBrand: string;
|
755
|
+
logoUrl: string;
|
756
|
+
}>;
|
757
|
+
paymentMethod?: string;
|
758
|
+
paymentMethodName: string;
|
759
|
+
paymentMethodType: string;
|
760
|
+
category?: string;
|
761
|
+
paymentElements?: IPaymentElement[];
|
762
|
+
paymentMethodId?: string;
|
763
|
+
paymentMethodDetail?: {
|
764
|
+
last4?: string;
|
765
|
+
requireIssuerAuthentication?: string;
|
766
|
+
};
|
767
|
+
interActionType?: InterActionTypeEnum;
|
768
|
+
recommend?: boolean;
|
769
|
+
expressCheckout?: boolean;
|
770
|
+
webRedirectType?: string;
|
771
|
+
paymentCurrencyList?: string[];
|
772
|
+
paymentAmount?: IAmount;
|
773
|
+
paymentAmountView?: IAmountView;
|
774
|
+
paymentQuoteId?: string;
|
775
|
+
}
|
776
|
+
interface Estimate {
|
777
|
+
unit: string;
|
778
|
+
value: number;
|
779
|
+
}
|
780
|
+
interface DeliveryEstimate {
|
781
|
+
maximum: Estimate;
|
782
|
+
minimum: Estimate;
|
783
|
+
}
|
784
|
+
interface FixedAmount {
|
785
|
+
amount: number;
|
786
|
+
currency: string;
|
787
|
+
}
|
788
|
+
interface ShippingRateData {
|
789
|
+
displayName: string;
|
790
|
+
deliveryEstimate: DeliveryEstimate;
|
791
|
+
fixedAmount: FixedAmount;
|
792
|
+
}
|
793
|
+
export interface ShippingAddress {
|
794
|
+
address1: string;
|
795
|
+
address2: string;
|
796
|
+
city: string;
|
797
|
+
region: string;
|
798
|
+
state: string;
|
799
|
+
zipCode: string;
|
800
|
+
}
|
801
|
+
export interface IUserName {
|
802
|
+
firstName: string;
|
803
|
+
middleName?: string;
|
804
|
+
lastName: string;
|
805
|
+
fullName?: string;
|
806
|
+
}
|
807
|
+
export type Shippings = ShippingsItem[];
|
808
|
+
export type IPaymentMethods = IPaymentMethod[];
|
809
|
+
export interface CKPShipping {
|
810
|
+
shippingRateId?: string;
|
811
|
+
shippingRateData?: ShippingRateData;
|
812
|
+
shippingAddress: ShippingAddress;
|
813
|
+
shippingFee?: IAmount;
|
814
|
+
shippingFeeView?: IAmountView;
|
815
|
+
shippingDescription?: string;
|
816
|
+
deliveryEstimate?: DeliveryEstimate;
|
817
|
+
shippingFeeId?: string;
|
818
|
+
shippingName?: IUserName;
|
819
|
+
shippingPhoneNo?: string;
|
820
|
+
shipToEmail?: string;
|
821
|
+
notes?: string;
|
822
|
+
}
|
823
|
+
export interface AccountQueryResult {
|
824
|
+
accountInfo: IAccountInfo;
|
825
|
+
actionForm?: ActionForm;
|
826
|
+
paymentMethods: IPaymentMethods;
|
827
|
+
shippings: Shippings;
|
828
|
+
success: boolean;
|
829
|
+
errorCode?: string;
|
830
|
+
errorMessage?: string;
|
831
|
+
errorStatus?: string;
|
832
|
+
shippingInfo?: CKPShipping;
|
833
|
+
}
|
834
|
+
export declare enum ElementPaymentMethod {
|
835
|
+
CONTAINER_ELEMENT = "CONTAINER_ELEMENT",
|
836
|
+
AUTH_ELEMENT = "AUTH_ELEMENT",
|
837
|
+
ADDRESS_ELEMENT = "ADDRESS_ELEMENT",
|
838
|
+
PAYMENT_ELEMENT = "PAYMENT_ELEMENT"
|
839
|
+
}
|
840
|
+
export declare enum ElementPaymentEvent {
|
841
|
+
INITIAL_DATA_READY = "initialDataReady",
|
842
|
+
CAPTURE_ASSET = "onCaptureAsset",
|
843
|
+
SIGN_OUT = "onSignout",
|
844
|
+
BLUR = "onBlur",
|
845
|
+
VALIDATE = "validate",
|
846
|
+
SUBMIT_RISK = "onSubmitRisk",
|
847
|
+
AFTER_SUBMIT = "onAfterSubmit",
|
848
|
+
SIZE_CHANGE = "onSizeChange",
|
849
|
+
LAUNCH = "onLaunch",
|
850
|
+
CALLBACK = "callback",
|
851
|
+
LOG = "log"
|
852
|
+
}
|
853
|
+
export declare enum ConnectErrorCode {
|
854
|
+
RISK_REJECT = "RISK_REJECT",
|
855
|
+
USER_AUTH_VERIFICATION_FAILED = "USER_AUTH_VERIFICATION_FAILED",
|
856
|
+
USER_NOT_EXISTS = "USER_NOT_EXISTS"
|
857
|
+
}
|
858
|
+
export interface IoptionsAddressParams {
|
859
|
+
environment?: string;
|
860
|
+
locale?: string;
|
861
|
+
onSizeChanged?: callOnSizeChanged;
|
862
|
+
onChange?: onChange;
|
863
|
+
analytics?: {
|
864
|
+
enabled: boolean;
|
865
|
+
};
|
866
|
+
product?: string;
|
867
|
+
}
|
868
|
+
export declare enum RiskSdkInfoEnum {
|
869
|
+
NEED = "need",
|
870
|
+
NO_NEED = "noneed"
|
871
|
+
}
|