@alipay/ams-checkout 0.0.1761013649-dev.0 → 0.0.1761220900-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/umd/ams-checkout.min.js +1 -1
- package/esm/constant/auto-debit.d.ts +12 -0
- package/esm/constant/auto-debit.js +15 -0
- package/esm/constant/element.d.ts +26 -0
- package/esm/constant/element.js +30 -0
- package/esm/constant/index.d.ts +1 -1
- package/esm/constant/index.js +4 -4
- package/esm/core/component/element/elementController/index.js +2 -2
- package/esm/core/component/element/elementProcessor/addressProcessor.js +2 -3
- package/esm/core/component/element/elementProcessor/authProcessor.js +2 -3
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +1 -1
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +30 -28
- package/esm/foundation/utils/web_app_url_utils.d.ts +0 -2
- package/esm/foundation/utils/web_app_url_utils.js +10 -15
- package/esm/index.d.ts +13 -52
- package/esm/index.js +19 -339
- package/esm/loader/Proxy.d.ts +5 -0
- package/esm/loader/Proxy.js +244 -0
- package/esm/loader/constant.d.ts +33 -0
- package/esm/loader/constant.js +35 -0
- package/esm/loader/index.d.ts +18 -0
- package/esm/loader/index.js +23 -0
- package/esm/loader/utils/common.d.ts +9 -0
- package/esm/loader/utils/common.js +53 -0
- package/esm/loader/utils/debugger.d.ts +7 -0
- package/esm/loader/utils/debugger.js +15 -0
- package/esm/loader/utils/loadSDK.d.ts +3 -0
- package/esm/loader/utils/loadSDK.js +75 -0
- package/esm/loader/utils/logger.d.ts +10 -0
- package/esm/loader/utils/logger.js +59 -0
- package/esm/main.d.ts +45 -0
- package/esm/main.js +329 -0
- package/esm/plugin/component/cashierApp.js +5 -4
- package/esm/util/integrationType.d.ts +21 -0
- package/esm/util/integrationType.js +51 -0
- package/esm/util/logger.d.ts +2 -0
- package/esm/util/logger.js +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AMSCashierPayment, AMSEasyPay, AMSElement } from '../main';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
AMSCashierPayment?: typeof AMSCashierPayment;
|
|
5
|
+
AMSElement?: typeof AMSElement;
|
|
6
|
+
AMSEasyPay?: typeof AMSEasyPay;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 产品类型
|
|
11
|
+
*/
|
|
12
|
+
export type ProductType = AMSCashierPayment | AMSEasyPay | AMSElement;
|
|
13
|
+
/**
|
|
14
|
+
* 产品构造函数
|
|
15
|
+
*/
|
|
16
|
+
export type ProductConstructor = typeof AMSCashierPayment | typeof AMSEasyPay | typeof AMSElement;
|
|
17
|
+
/**
|
|
18
|
+
* 产品构造函数名称枚举
|
|
19
|
+
*/
|
|
20
|
+
export declare enum EConstructorName {
|
|
21
|
+
AMSCashierPayment = "AMSCashierPayment",
|
|
22
|
+
AMSEasyPay = "AMSEasyPay",
|
|
23
|
+
AMSElement = "AMSElement"
|
|
24
|
+
}
|
|
25
|
+
export declare const instanceApiMap: Record<EConstructorName, string[]>;
|
|
26
|
+
/**
|
|
27
|
+
* SDK 集成类型枚举
|
|
28
|
+
*/
|
|
29
|
+
export type AntomWebSDKIntegrationType = 'CDN' | 'NPM';
|
|
30
|
+
export declare const SDK_URL: {
|
|
31
|
+
DEV: string;
|
|
32
|
+
PROD: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
/**
|
|
6
|
+
* 产品类型
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 产品构造函数
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 产品构造函数名称枚举
|
|
15
|
+
*/
|
|
16
|
+
export var EConstructorName = /*#__PURE__*/function (EConstructorName) {
|
|
17
|
+
EConstructorName["AMSCashierPayment"] = "AMSCashierPayment";
|
|
18
|
+
EConstructorName["AMSEasyPay"] = "AMSEasyPay";
|
|
19
|
+
EConstructorName["AMSElement"] = "AMSElement";
|
|
20
|
+
return EConstructorName;
|
|
21
|
+
}({});
|
|
22
|
+
|
|
23
|
+
// 这里维护各产品实例需要拦截的api列表,部分场景需要使用 (1.Polyfill需要预定义需要拦截的属性)
|
|
24
|
+
export var instanceApiMap = _defineProperty(_defineProperty(_defineProperty({}, EConstructorName.AMSCashierPayment, ['canMakePayments', 'createComponent', 'preloadComponent', 'mountComponent', 'submit']), EConstructorName.AMSEasyPay, ['createComponent', 'unmount']), EConstructorName.AMSElement, ['updatePayment', 'mount', 'submitPayment', 'destroy']);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* SDK 集成类型枚举
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
// TODO SDK 地址
|
|
31
|
+
export var SDK_URL = {
|
|
32
|
+
DEV: 'https://sdk-dev.marmot-cloud.com/package/ams-checkout/dev-1753362745/dist/umd/ams-checkout.min.js',
|
|
33
|
+
// marmot测试用sdk地址 待正式上线前替换
|
|
34
|
+
PROD: 'https://er-test.marmot-cloud.com/1.0.0/dist/umd/ams-checkout.min.js'
|
|
35
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 业务中间层
|
|
3
|
+
* 1.用于加载SDK & 实例化真实实例对象
|
|
4
|
+
* 2.解耦Proxy层与Wrapper层
|
|
5
|
+
* 3.预留给业务定制逻辑
|
|
6
|
+
* 4.类型适配
|
|
7
|
+
*/
|
|
8
|
+
import { AMSCashierPayment, AMSEasyPay, AMSElement } from '../main';
|
|
9
|
+
interface AMSCashierPaymentWrapper extends AMSCashierPayment {
|
|
10
|
+
}
|
|
11
|
+
interface AMSEasyPayWrapper extends AMSEasyPay {
|
|
12
|
+
}
|
|
13
|
+
interface AMSElementWrapper extends AMSElement {
|
|
14
|
+
}
|
|
15
|
+
declare const AMSCashierPaymentWrapper: typeof AMSCashierPayment;
|
|
16
|
+
declare const AMSEasyPayWrapper: typeof AMSEasyPay;
|
|
17
|
+
declare const AMSElementWrapper: typeof AMSElement;
|
|
18
|
+
export { AMSCashierPaymentWrapper, AMSEasyPayWrapper, AMSElementWrapper };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 业务中间层
|
|
3
|
+
* 1.用于加载SDK & 实例化真实实例对象
|
|
4
|
+
* 2.解耦Proxy层与Wrapper层
|
|
5
|
+
* 3.预留给业务定制逻辑
|
|
6
|
+
* 4.类型适配
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { AMSCashierPayment, AMSEasyPay } from "../main";
|
|
10
|
+
import { EConstructorName } from "./constant";
|
|
11
|
+
import { createBaseProxy } from "./Proxy";
|
|
12
|
+
|
|
13
|
+
// 合并接口声明,让各Wrapper既是类型又是值,模拟class
|
|
14
|
+
|
|
15
|
+
// 真实创建proxy类
|
|
16
|
+
var AMSCashierPaymentWrapper = createBaseProxy(EConstructorName.AMSCashierPayment);
|
|
17
|
+
var AMSEasyPayWrapper = createBaseProxy(EConstructorName.AMSEasyPay);
|
|
18
|
+
var AMSElementWrapper = createBaseProxy(EConstructorName.AMSElement);
|
|
19
|
+
|
|
20
|
+
// 由于preload是静态方法, 需要直接挂载到构造函数上,这里不进行代理直接进行调用
|
|
21
|
+
AMSCashierPaymentWrapper.preload = AMSCashierPayment.preload;
|
|
22
|
+
AMSEasyPayWrapper.preload = AMSEasyPay.preload;
|
|
23
|
+
export { AMSCashierPaymentWrapper, AMSEasyPayWrapper, AMSElementWrapper };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 检测浏览器是否兼容Proxy对象
|
|
3
|
+
*/
|
|
4
|
+
export declare function supportsProxy(): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* @description 尝试调用window.tracker上报m5性能数据
|
|
7
|
+
* @param options 自定义性能埋点 m1-m20, m1-资源加载耗时,m2-首屏数据请求耗时,m3-首屏数据请求完成耗时,m4-首屏渲染完成耗时
|
|
8
|
+
*/
|
|
9
|
+
export declare const reportCustomizedPerformance: (options: any) => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { logger } from "./logger";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 检测浏览器是否兼容Proxy对象
|
|
5
|
+
*/
|
|
6
|
+
export function supportsProxy() {
|
|
7
|
+
try {
|
|
8
|
+
// 检查 Proxy 构造函数是否存在
|
|
9
|
+
if (typeof Proxy === 'undefined') {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 尝试创建一个简单的 Proxy
|
|
14
|
+
var testProxy = new Proxy({}, {
|
|
15
|
+
get: function get() {
|
|
16
|
+
return 'test';
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// 测试 Proxy 是否正常工作
|
|
21
|
+
return (testProxy === null || testProxy === void 0 ? void 0 : testProxy.anyProperty) === 'test';
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description 尝试调用window.tracker上报m5性能数据
|
|
29
|
+
* @param options 自定义性能埋点 m1-m20, m1-资源加载耗时,m2-首屏数据请求耗时,m3-首屏数据请求完成耗时,m4-首屏渲染完成耗时
|
|
30
|
+
*/
|
|
31
|
+
export var reportCustomizedPerformance = function reportCustomizedPerformance(options) {
|
|
32
|
+
var retryCount = 0;
|
|
33
|
+
var maxRetries = 5;
|
|
34
|
+
var intervalId = setInterval(function () {
|
|
35
|
+
var _window;
|
|
36
|
+
retryCount++;
|
|
37
|
+
if ((_window = window) !== null && _window !== void 0 && _window.tracker) {
|
|
38
|
+
var _window2;
|
|
39
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.tracker) === null || _window2 === void 0 || _window2.reportCustomizedPerformanceData(options);
|
|
40
|
+
clearInterval(intervalId);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (retryCount >= maxRetries) {
|
|
44
|
+
clearInterval(intervalId);
|
|
45
|
+
logger.logError({
|
|
46
|
+
title: 'report_customized_performance_error'
|
|
47
|
+
}, {
|
|
48
|
+
options: options
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}, 3000);
|
|
53
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 全局debug上下文
|
|
3
|
+
* */
|
|
4
|
+
import { SDK_URL } from "../constant";
|
|
5
|
+
var debugContext = {
|
|
6
|
+
debugMode: false,
|
|
7
|
+
showLogger: true,
|
|
8
|
+
sdkUrl: SDK_URL.PROD // 默认为prod url
|
|
9
|
+
};
|
|
10
|
+
export var setDebugContext = function setDebugContext(props) {
|
|
11
|
+
Object.assign(debugContext, props || {});
|
|
12
|
+
};
|
|
13
|
+
export var getDebugContext = function getDebugContext() {
|
|
14
|
+
return debugContext;
|
|
15
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { SDK_URL } from "../constant";
|
|
2
|
+
import { getDebugContext } from "./debugger";
|
|
3
|
+
import { consoleLogger, logger } from "./logger";
|
|
4
|
+
export function loadSdk() {
|
|
5
|
+
return new Promise(function (resolve, reject) {
|
|
6
|
+
// 获取src
|
|
7
|
+
var sdkSrc = SDK_URL.PROD;
|
|
8
|
+
|
|
9
|
+
// debug模式动态传入sdkUrl
|
|
10
|
+
var debugContext = getDebugContext();
|
|
11
|
+
if ((debugContext === null || debugContext === void 0 ? void 0 : debugContext.debugMode) === true) {
|
|
12
|
+
sdkSrc = (debugContext === null || debugContext === void 0 ? void 0 : debugContext.sdkUrl) || SDK_URL.PROD;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 检查 SDK URL 是否存在
|
|
16
|
+
if (!sdkSrc) {
|
|
17
|
+
consoleLogger.error("SDK URL not found for: ".concat(sdkSrc));
|
|
18
|
+
reject(false);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 检查是否已经加载过该脚本
|
|
23
|
+
var existingScript = document.querySelector("script[src=\"".concat(sdkSrc, "\"]"));
|
|
24
|
+
if (existingScript) {
|
|
25
|
+
consoleLogger.log("SDK already loaded: ".concat(sdkSrc));
|
|
26
|
+
resolve(true);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 注入脚本到html
|
|
31
|
+
var script = document.createElement('script');
|
|
32
|
+
script.src = sdkSrc;
|
|
33
|
+
document.head.appendChild(script);
|
|
34
|
+
|
|
35
|
+
// 定义onload和onerror事件
|
|
36
|
+
script.onload = function () {
|
|
37
|
+
consoleLogger.log("Load SDK Success , SDK URL: ".concat(sdkSrc));
|
|
38
|
+
resolve(false);
|
|
39
|
+
};
|
|
40
|
+
script.onerror = function () {
|
|
41
|
+
consoleLogger.log("Failed to load SDK: ".concat(sdkSrc));
|
|
42
|
+
logger.logError({
|
|
43
|
+
title: 'load_sdk_resource_error'
|
|
44
|
+
}, {
|
|
45
|
+
sdkSrc: sdkSrc
|
|
46
|
+
});
|
|
47
|
+
reject(false);
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export function newActualInstance(constructorName, newProps) {
|
|
52
|
+
try {
|
|
53
|
+
var _window;
|
|
54
|
+
// 获取构造函数
|
|
55
|
+
if (!constructorName) {
|
|
56
|
+
consoleLogger.error("Load SDK failed: constructorName not found, please check constructorName: ".concat(constructorName));
|
|
57
|
+
logger.logError({
|
|
58
|
+
title: 'load_constructor_resource_error'
|
|
59
|
+
}, {
|
|
60
|
+
constructorName: constructorName
|
|
61
|
+
});
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
var Constructor = (_window = window) === null || _window === void 0 ? void 0 : _window[constructorName];
|
|
65
|
+
if (!Constructor) {
|
|
66
|
+
consoleLogger.error("".concat(constructorName, " not found after SDK load"));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 实例化对象
|
|
70
|
+
return new Constructor(newProps);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
consoleLogger.error('Load SDK failed:', error);
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Logger } from '../../util/logger';
|
|
2
|
+
export declare class ConsoleLogger {
|
|
3
|
+
show: boolean;
|
|
4
|
+
constructor(options: any);
|
|
5
|
+
log(message: string, ...args: any[]): void;
|
|
6
|
+
warn(message: string, ...args: any[]): void;
|
|
7
|
+
error(message: string, ...args: any[]): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const consoleLogger: ConsoleLogger;
|
|
10
|
+
export declare const logger: Logger;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
import { LogConfig, Logger } from "../../util/logger";
|
|
9
|
+
import { getDebugContext } from "./debugger";
|
|
10
|
+
export var ConsoleLogger = /*#__PURE__*/function () {
|
|
11
|
+
function ConsoleLogger(options) {
|
|
12
|
+
_classCallCheck(this, ConsoleLogger);
|
|
13
|
+
_defineProperty(this, "show", false);
|
|
14
|
+
this.show = options.show;
|
|
15
|
+
}
|
|
16
|
+
_createClass(ConsoleLogger, [{
|
|
17
|
+
key: "log",
|
|
18
|
+
value: function log(message) {
|
|
19
|
+
var _console;
|
|
20
|
+
if (!this.show) return;
|
|
21
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22
|
+
args[_key - 1] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
(_console = console).log.apply(_console, ["[sdk-loader] ".concat(message)].concat(args));
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
key: "warn",
|
|
28
|
+
value: function warn(message) {
|
|
29
|
+
var _console2;
|
|
30
|
+
if (!this.show) return;
|
|
31
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
32
|
+
args[_key2 - 1] = arguments[_key2];
|
|
33
|
+
}
|
|
34
|
+
(_console2 = console).warn.apply(_console2, ["[sdk-loader] ".concat(message)].concat(args));
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "error",
|
|
38
|
+
value: function error(message) {
|
|
39
|
+
var _console3;
|
|
40
|
+
if (!this.show) return;
|
|
41
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
42
|
+
args[_key3 - 1] = arguments[_key3];
|
|
43
|
+
}
|
|
44
|
+
(_console3 = console).error.apply(_console3, ["[sdk-loader] ".concat(message)].concat(args));
|
|
45
|
+
}
|
|
46
|
+
}]);
|
|
47
|
+
return ConsoleLogger;
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
// consoleLogger仅用于控制台打印
|
|
51
|
+
var _getDebugContext = getDebugContext(),
|
|
52
|
+
debugMode = _getDebugContext.debugMode,
|
|
53
|
+
showLogger = _getDebugContext.showLogger;
|
|
54
|
+
export var consoleLogger = new ConsoleLogger({
|
|
55
|
+
show: debugMode ? showLogger : true
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// SPM日志上报用logger 先全部收口到这里,后续loader单独拆包后进行解耦
|
|
59
|
+
export var logger = new Logger(LogConfig, true);
|
package/esm/main.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AddressComponent } from './core/component/address';
|
|
2
|
+
import { ElementComponent } from './core/component/element';
|
|
3
|
+
import { AMSComponent } from './core/component/index';
|
|
4
|
+
import { ComponentSignEnum, IcreateComponent, IElementOptions, IoptionsAddressParams, IoptionsParams, IPreloadOptions } from './types';
|
|
5
|
+
export { AMSCheckoutPage } from './core/component/ckp';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export declare class AMSCheckout extends AMSComponent {
|
|
8
|
+
constructor(_options: IoptionsParams, channelType?: ComponentSignEnum[], productSceneVersion?: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class AMSAutoDebitPay extends AMSCheckout {
|
|
11
|
+
constructor(options: IoptionsParams);
|
|
12
|
+
static preload(options?: IPreloadOptions): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class AMSCashierPayment extends AMSCheckout {
|
|
15
|
+
constructor(options: IoptionsParams);
|
|
16
|
+
static preload(options?: IPreloadOptions): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class AMSVaulting extends AMSCheckout {
|
|
19
|
+
constructor(options: IoptionsParams);
|
|
20
|
+
static preload(options?: IPreloadOptions): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class AntomElement extends AMSCheckout {
|
|
23
|
+
constructor(options: IoptionsParams);
|
|
24
|
+
}
|
|
25
|
+
export declare class AddressElement extends AddressComponent {
|
|
26
|
+
constructor(options: IoptionsAddressParams);
|
|
27
|
+
}
|
|
28
|
+
export declare class AMSElement extends ElementComponent {
|
|
29
|
+
constructor(options: IElementOptions);
|
|
30
|
+
}
|
|
31
|
+
export declare class AMSEasyPay {
|
|
32
|
+
private core;
|
|
33
|
+
constructor(options: IoptionsParams);
|
|
34
|
+
static preload(options?: IPreloadOptions): void;
|
|
35
|
+
createComponent(params: IcreateComponent): void;
|
|
36
|
+
unmount(): void;
|
|
37
|
+
}
|
|
38
|
+
export declare class AMSAutoDebit {
|
|
39
|
+
private core;
|
|
40
|
+
constructor(options: IoptionsParams);
|
|
41
|
+
createComponent(params: IcreateComponent): Promise<void>;
|
|
42
|
+
unmount(): void;
|
|
43
|
+
static preload(options?: IPreloadOptions): void;
|
|
44
|
+
}
|
|
45
|
+
export default AMSCheckout;
|