@alipay/ams-checkout 0.0.1690894389-dev.1 → 0.0.1691379784-dev.0
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/esm/config/index.d.ts +2 -22
- package/dist/esm/config/index.js +9 -61
- package/dist/esm/config/request.d.ts +21 -0
- package/dist/esm/config/request.js +67 -0
- package/dist/esm/constant/index.d.ts +1 -0
- package/dist/esm/constant/index.js +1 -0
- package/dist/esm/core/component/index.d.ts +3 -3
- package/dist/esm/core/component/index.js +42 -88
- package/dist/esm/core/instance/index.d.ts +2 -10
- package/dist/esm/core/instance/index.js +0 -22
- package/dist/esm/plugin/component/cashierApp.d.ts +23 -0
- package/dist/esm/plugin/component/cashierApp.js +122 -0
- package/dist/esm/plugin/component/component.style.js +1 -1
- package/dist/esm/plugin/component/index.d.ts +9 -15
- package/dist/esm/plugin/component/index.js +116 -144
- package/dist/esm/request/index.d.ts +1 -1
- package/dist/esm/request/index.js +5 -5
- package/dist/esm/service/index.d.ts +2 -2
- package/dist/esm/types/index.d.ts +42 -13
- package/dist/esm/types/index.js +8 -5
- package/dist/esm/util/index.js +1 -1
- package/dist/umd/ams-checkout.min.js +1 -1
- package/package.json +1 -1
- package/dist/esm/plugin/component/appPath.d.ts +0 -2
- package/dist/esm/plugin/component/appPath.js +0 -75
@@ -11,7 +11,6 @@
|
|
11
11
|
export interface optionsParams {
|
12
12
|
environment?: string;
|
13
13
|
locale?: string;
|
14
|
-
onReady?: any;
|
15
14
|
onError?: callOnError;
|
16
15
|
onSizeChanged?: callOnSizeChanged;
|
17
16
|
onPaymentMethodSelected?: callonPaymentMethodSelected;
|
@@ -33,10 +32,12 @@ export interface createPaymentParams {
|
|
33
32
|
backgroundColor?: string;
|
34
33
|
};
|
35
34
|
}
|
36
|
-
export declare enum
|
37
|
-
'
|
38
|
-
'
|
39
|
-
'
|
35
|
+
export declare enum componentSignEnum {
|
36
|
+
'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
|
37
|
+
'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
|
38
|
+
'CASHIER_PAYMENT_BANK' = "CASHIER_PAYMENT_BANK",
|
39
|
+
'AUTO_DEBIT_WALLET' = "AUTO_DEBIT_WALLET",
|
40
|
+
'NONE' = "NONE"
|
40
41
|
}
|
41
42
|
export declare enum productSceneEnum {
|
42
43
|
'EASY_PAY' = "EASY_PAY",
|
@@ -45,7 +46,8 @@ export declare enum productSceneEnum {
|
|
45
46
|
}
|
46
47
|
export declare enum paymentMethodCategoryTypeEnum {
|
47
48
|
'CARD' = "CARD",
|
48
|
-
'WALLET' = "WALLET"
|
49
|
+
'WALLET' = "WALLET",
|
50
|
+
'BANK' = "BANK"
|
49
51
|
}
|
50
52
|
export interface IcreateComponent {
|
51
53
|
paymentSessionData: string;
|
@@ -55,12 +57,13 @@ export interface IcreateComponent {
|
|
55
57
|
export interface IappendIframeNodesParams extends IcreateComponent {
|
56
58
|
paymentSessionMetaData?: IpaymentSessionMetaData;
|
57
59
|
}
|
60
|
+
interface IpaymentSessionConfig {
|
61
|
+
productScene: productSceneEnum;
|
62
|
+
paymentMethodCategoryType: paymentMethodCategoryTypeEnum;
|
63
|
+
productSceneVersion: string;
|
64
|
+
}
|
58
65
|
export interface IpaymentSessionMetaData {
|
59
|
-
paymentSessionConfig?:
|
60
|
-
productScene: productSceneEnum;
|
61
|
-
paymentMethodCategoryType: paymentMethodCategoryTypeEnum;
|
62
|
-
productSceneVersion?: string;
|
63
|
-
};
|
66
|
+
paymentSessionConfig?: IpaymentSessionConfig;
|
64
67
|
moneyView?: any;
|
65
68
|
extendInfo?: string;
|
66
69
|
paymentMethodInfoView?: any;
|
@@ -119,7 +122,10 @@ export type callOnSizeChanged = (state: {
|
|
119
122
|
width: string;
|
120
123
|
height: string;
|
121
124
|
}) => void;
|
122
|
-
export type callOnLog = (
|
125
|
+
export type callOnLog = (state: {
|
126
|
+
code: string;
|
127
|
+
message: string;
|
128
|
+
}) => void;
|
123
129
|
export declare enum messageName {
|
124
130
|
SDK_TO_APP = "SDK_TO_APP",
|
125
131
|
APP_TO_SDK = "APP_TO_SDK",
|
@@ -142,7 +148,7 @@ export interface AMSCheckoutOptions {
|
|
142
148
|
mode: string;
|
143
149
|
analytics?: Ianalytics;
|
144
150
|
}
|
145
|
-
interface Ianalytics {
|
151
|
+
export interface Ianalytics {
|
146
152
|
enabled: boolean;
|
147
153
|
}
|
148
154
|
export declare enum ERROR {
|
@@ -175,6 +181,29 @@ export interface RequestConfig {
|
|
175
181
|
locale?: string;
|
176
182
|
hostSign?: string;
|
177
183
|
}
|
184
|
+
export interface CashierSdkActionQueryRequest {
|
185
|
+
paymentSessionData: string;
|
186
|
+
paymentSessionConfig?: IpaymentSessionConfig;
|
187
|
+
paymentMethodType?: string;
|
188
|
+
extParams?: any;
|
189
|
+
}
|
190
|
+
export interface CashierSdkActionQueryResult {
|
191
|
+
supportedLanguages?: any[];
|
192
|
+
amountConfirmRequired?: boolean;
|
193
|
+
orderAmount?: Record<string, string>;
|
194
|
+
paymentMethodView?: Record<string, string>;
|
195
|
+
autoDebitWithToken?: boolean;
|
196
|
+
success: boolean;
|
197
|
+
errorCode?: string;
|
198
|
+
errorMessage?: string;
|
199
|
+
message?: string;
|
200
|
+
errorStatus?: string;
|
201
|
+
redirectUrl?: string;
|
202
|
+
normalUrl?: string;
|
203
|
+
applinkUrl?: string;
|
204
|
+
schemeUrl?: string;
|
205
|
+
authUrl?: string;
|
206
|
+
}
|
178
207
|
declare global {
|
179
208
|
interface Window {
|
180
209
|
[key: string]: any;
|
package/dist/esm/types/index.js
CHANGED
@@ -10,11 +10,13 @@
|
|
10
10
|
* SDK options
|
11
11
|
*/
|
12
12
|
|
13
|
-
export var
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) {
|
14
|
+
componentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET";
|
15
|
+
componentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD";
|
16
|
+
componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
|
17
|
+
componentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET";
|
18
|
+
componentSignEnum["NONE"] = "NONE";
|
19
|
+
return componentSignEnum;
|
18
20
|
}({});
|
19
21
|
export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
|
20
22
|
productSceneEnum["EASY_PAY"] = "EASY_PAY";
|
@@ -25,6 +27,7 @@ export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
|
|
25
27
|
export var paymentMethodCategoryTypeEnum = /*#__PURE__*/function (paymentMethodCategoryTypeEnum) {
|
26
28
|
paymentMethodCategoryTypeEnum["CARD"] = "CARD";
|
27
29
|
paymentMethodCategoryTypeEnum["WALLET"] = "WALLET";
|
30
|
+
paymentMethodCategoryTypeEnum["BANK"] = "BANK";
|
28
31
|
return paymentMethodCategoryTypeEnum;
|
29
32
|
}({});
|
30
33
|
export var localeEnum = /*#__PURE__*/function (localeEnum) {
|
package/dist/esm/util/index.js
CHANGED
@@ -230,6 +230,6 @@ var queryParse = function queryParse(url) {
|
|
230
230
|
var getDesignFontSize = function getDesignFontSize() {
|
231
231
|
var screenWidth = document.documentElement.clientWidth;
|
232
232
|
var currentFontSize = isPC() ? 100 : screenWidth * 100 / 390;
|
233
|
-
return currentFontSize;
|
233
|
+
return Math.min(currentFontSize, 100);
|
234
234
|
};
|
235
235
|
export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, device, fomatGetwayError, safeJson, isPC, queryParse, getDesignFontSize };
|