@alipay/ams-checkout 1.23.0 → 1.25.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.
Files changed (128) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/component/channel.d.ts +19 -0
  3. package/esm/component/channel.js +87 -0
  4. package/esm/component/component.inline.style.d.ts +10 -0
  5. package/esm/component/component.inline.style.js +121 -0
  6. package/esm/component/component.popup.style.d.ts +23 -0
  7. package/esm/component/component.popup.style.js +190 -0
  8. package/esm/component/popupWindow.style.d.ts +11 -0
  9. package/esm/component/popupWindow.style.js +121 -0
  10. package/esm/config/index.d.ts +7 -7
  11. package/esm/config/index.js +10 -10
  12. package/esm/constant/index.d.ts +9 -5
  13. package/esm/constant/index.js +12 -78
  14. package/esm/core/component/ckp/index.js +6 -5
  15. package/esm/core/component/element/components/address.d.ts +19 -0
  16. package/esm/core/component/element/components/address.js +68 -0
  17. package/esm/core/component/element/components/auth.d.ts +17 -0
  18. package/esm/core/component/element/components/auth.js +60 -0
  19. package/esm/core/component/element/components/payment.d.ts +19 -0
  20. package/esm/core/component/element/components/payment.js +74 -0
  21. package/esm/core/component/element/index.d.ts +47 -0
  22. package/esm/core/component/element/index.js +816 -0
  23. package/esm/core/component/element/mock.d.ts +4 -0
  24. package/esm/core/component/element/mock.js +491 -0
  25. package/esm/core/component/element/type.d.ts +190 -0
  26. package/esm/core/component/element/type.js +35 -0
  27. package/esm/core/component/element/utils.d.ts +13 -0
  28. package/esm/core/component/element/utils.js +6 -0
  29. package/esm/core/component/index.d.ts +4 -4
  30. package/esm/core/component/index.js +14 -14
  31. package/esm/core/drop-in/index.js +2 -2
  32. package/esm/core/instance/index.js +9 -9
  33. package/esm/foundation/core/index.d.ts +26 -0
  34. package/esm/foundation/core/index.js +366 -0
  35. package/esm/foundation/index.d.ts +75 -0
  36. package/esm/foundation/index.js +42 -0
  37. package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
  38. package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
  39. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  40. package/esm/foundation/product-processor/easysafepay/index.js +463 -0
  41. package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
  42. package/esm/foundation/service/api-bus/ability/callback.js +55 -0
  43. package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
  44. package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
  45. package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
  46. package/esm/foundation/service/api-bus/ability/request.js +151 -0
  47. package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
  48. package/esm/foundation/service/api-bus/ability/security.js +161 -0
  49. package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
  50. package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
  51. package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
  52. package/esm/foundation/service/api-bus/busManager.js +398 -0
  53. package/esm/foundation/service/api-bus/index.d.ts +20 -0
  54. package/esm/foundation/service/api-bus/index.js +88 -0
  55. package/esm/foundation/service/api-bus/interface.d.ts +48 -0
  56. package/esm/foundation/service/api-bus/interface.js +54 -0
  57. package/esm/foundation/service/container/index.d.ts +30 -0
  58. package/esm/foundation/service/container/index.js +298 -0
  59. package/esm/foundation/service/container/popup.d.ts +17 -0
  60. package/esm/foundation/service/container/popup.js +103 -0
  61. package/esm/foundation/service/container/utils.d.ts +7 -0
  62. package/esm/foundation/service/container/utils.js +48 -0
  63. package/esm/foundation/service/event-center.d.ts +76 -0
  64. package/esm/foundation/service/event-center.js +243 -0
  65. package/esm/foundation/service/global-data/index.d.ts +11 -0
  66. package/esm/foundation/service/global-data/index.js +68 -0
  67. package/esm/foundation/service/index.d.ts +19 -0
  68. package/esm/foundation/service/index.js +82 -0
  69. package/esm/foundation/service/log/index.d.ts +43 -0
  70. package/esm/foundation/service/log/index.js +235 -0
  71. package/esm/foundation/service/log/types.d.ts +32 -0
  72. package/esm/foundation/service/log/types.js +1 -0
  73. package/esm/foundation/service/requester/deps.d.ts +17 -0
  74. package/esm/foundation/service/requester/deps.js +11 -0
  75. package/esm/foundation/service/requester/requester.d.ts +22 -0
  76. package/esm/foundation/service/requester/requester.js +214 -0
  77. package/esm/foundation/service/security/index.d.ts +28 -0
  78. package/esm/foundation/service/security/index.js +286 -0
  79. package/esm/foundation/service/security/security.d.ts +33 -0
  80. package/esm/foundation/service/security/security.js +182 -0
  81. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  82. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  83. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  84. package/esm/foundation/utils/payment_context_utils.js +57 -0
  85. package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
  86. package/esm/foundation/utils/payment_product_utils.js +38 -0
  87. package/esm/foundation/utils/redirect_utils.d.ts +11 -0
  88. package/esm/foundation/utils/redirect_utils.js +263 -0
  89. package/esm/foundation/utils/system_events.d.ts +4 -0
  90. package/esm/foundation/utils/system_events.js +66 -0
  91. package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
  92. package/esm/foundation/utils/web_app_url_utils.js +112 -0
  93. package/esm/index.d.ts +12 -6
  94. package/esm/index.js +75 -64
  95. package/esm/plugin/applepay/component.js +3 -3
  96. package/esm/plugin/applepay/service.d.ts +2 -2
  97. package/esm/plugin/applepay/service.js +2 -2
  98. package/esm/plugin/component/cashierApp.d.ts +7 -5
  99. package/esm/plugin/component/cashierApp.js +15 -8
  100. package/esm/plugin/component/channel.d.ts +4 -4
  101. package/esm/plugin/component/component.inline.style.d.ts +4 -4
  102. package/esm/plugin/component/component.inline.style.js +10 -8
  103. package/esm/plugin/component/component.popup.style.d.ts +6 -6
  104. package/esm/plugin/component/component.popup.style.js +6 -6
  105. package/esm/plugin/component/index.d.ts +8 -7
  106. package/esm/plugin/component/index.js +160 -103
  107. package/esm/plugin/const.js +5 -5
  108. package/esm/plugin/drop-in/index.d.ts +5 -5
  109. package/esm/plugin/drop-in/index.js +7 -7
  110. package/esm/plugin/type.d.ts +3 -3
  111. package/esm/service/element.d.ts +4 -0
  112. package/esm/service/element.js +51 -0
  113. package/esm/service/index.d.ts +1 -0
  114. package/esm/service/index.js +2 -0
  115. package/esm/types/index.d.ts +247 -39
  116. package/esm/types/index.js +109 -59
  117. package/esm/util/createIframeNode.d.ts +2 -2
  118. package/esm/util/createIframeNode.js +3 -3
  119. package/esm/util/getBackScheme.js +95 -3
  120. package/esm/util/security.d.ts +2 -2
  121. package/esm/util/security.js +2 -2
  122. package/package.json +2 -1
  123. package/esm/util/ua/index.d.ts +0 -2
  124. package/esm/util/ua/index.js +0 -2
  125. package/esm/util/ua/isAndroid.d.ts +0 -4
  126. package/esm/util/ua/isAndroid.js +0 -7
  127. package/esm/util/ua/isIOS.d.ts +0 -4
  128. package/esm/util/ua/isIOS.js +0 -7
@@ -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
+ export var ThemeType = /*#__PURE__*/function (ThemeType) {
6
+ ThemeType["NostalgicGray"] = "nostalgicGray";
7
+ ThemeType["Default"] = "default";
8
+ ThemeType["Night"] = "night";
9
+ ThemeType["CherryBlossomPink"] = "cherryBlossomPink";
10
+ ThemeType["GamingPurple"] = "gamingPurple";
11
+ ThemeType["AgateGreen"] = "agateGreen";
12
+ return ThemeType;
13
+ }({});
14
+ export var addressTheme = _defineProperty(_defineProperty({}, ThemeType.Default, 'LIGHT'), ThemeType.Night, 'NIGHT');
15
+ export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
16
+ EventCallbackCode["Failed"] = "Failed";
17
+ EventCallbackCode["Completed"] = "Completed";
18
+ return EventCallbackCode;
19
+ }({});
20
+ export var ELEMENT_ENVIRONMENT = /*#__PURE__*/function (ELEMENT_ENVIRONMENT) {
21
+ ELEMENT_ENVIRONMENT["DEV"] = "DEV";
22
+ ELEMENT_ENVIRONMENT["TEST"] = "TEST";
23
+ ELEMENT_ENVIRONMENT["SIT"] = "SIT";
24
+ ELEMENT_ENVIRONMENT["PRE"] = "PRE";
25
+ ELEMENT_ENVIRONMENT["PROD"] = "PROD";
26
+ return ELEMENT_ENVIRONMENT;
27
+ }({});
28
+ // export type IMountOptions = AddressMountOptions | LinkAuthMountOptions | PaymentMountOptions;
29
+
30
+ export var AddressEventCallbackName = /*#__PURE__*/function (AddressEventCallbackName) {
31
+ AddressEventCallbackName["SHIPPING_CHANGE"] = "SHIPPING_CHANGE";
32
+ return AddressEventCallbackName;
33
+ }({});
34
+
35
+ // export type IMountResult = AddressMountResult | LinkAuthMountResult | PaymentMountResult;
@@ -0,0 +1,13 @@
1
+ export interface ISessionDataExtendInfo {
2
+ displayLayout: 'LEFT_ORDER_AND_RIGHT_PAYMENT' | 'LEFT_PAYMENT_AND_RIGHT_ORDER';
3
+ displayAntomLogo: string;
4
+ themeType: 'LIGHT' | 'NIGHT' | 'CUSTOMIZE';
5
+ OPEN_MULTI_PAYMENT_ABILITY: boolean;
6
+ [key: string]: any;
7
+ }
8
+ export interface LinkData {
9
+ linkId: string;
10
+ region: string;
11
+ displaySetting?: ISessionDataExtendInfo;
12
+ }
13
+ export declare const displayIframe: (selector: string) => void;
@@ -0,0 +1,6 @@
1
+ export var displayIframe = function displayIframe(selector) {
2
+ var dom = document.querySelector(selector);
3
+ dom.style.opacity = '1';
4
+ dom.style.overflow = 'visible';
5
+ dom.style.height = '110px';
6
+ };
@@ -1,14 +1,14 @@
1
1
  import ComponentApp from '../../plugin/component';
2
- import { componentSignEnum, IcreateComponent, IoptionsParams, IpaymentSessionMetaData, Iselector, Isubmit, PaymentMethodTypeEnum, SubPaymentMethodTypeEnum } from '../../types';
2
+ import { ComponentSignEnum, IcreateComponent, IoptionsParams, IPaymentSessionMetaData, Iselector, Isubmit, PaymentMethodTypeEnum, SubPaymentMethodTypeEnum } from '../../types';
3
3
  import CoreInstance from '../instance/index';
4
- export declare const getComponentSign: (params: IpaymentSessionMetaData) => componentSignEnum;
5
- export declare const parseSessionData: (sessionData: string) => [IpaymentSessionMetaData, string];
4
+ export declare const getComponentSign: (params: IPaymentSessionMetaData) => ComponentSignEnum;
5
+ export declare const parseSessionData: (sessionData: string) => [IPaymentSessionMetaData, string];
6
6
  export type IAMSComponentOptions = IoptionsParams & {
7
7
  appVersion: string;
8
8
  };
9
9
  export declare class AMSComponent extends CoreInstance {
10
10
  _componentApp: ComponentApp;
11
- channelType: componentSignEnum[];
11
+ channelType: ComponentSignEnum[];
12
12
  productSceneVersion: string;
13
13
  timer: any;
14
14
  constructor(options: IAMSComponentOptions);
@@ -40,7 +40,7 @@ import { ApplePayBusSubscriber } from "../../plugin/applepay";
40
40
  import ComponentApp from "../../plugin/component";
41
41
  import { ExtendPlugin } from "../../plugin/const";
42
42
  import { PaypalBusSubscriber } from "../../plugin/paypal";
43
- import { componentSignEnum, ComponentSignEnumV2, environmentEnum, modeEnum, networkModeEnum, productSceneEnum, renderDisplayTypeEnum } from "../../types";
43
+ import { ComponentSignEnum, ComponentSignEnumV2, EnvironmentEnum, modeEnum, networkModeEnum, ProductSceneEnum, DisplayTypeEnum } from "../../types";
44
44
  import { getOrSetStorageId, isPC, parseBase64ToString } from "../../util";
45
45
  import { createIframeNode, createPreloadIframeNode } from "../../util/createIframeNode";
46
46
  import { getSecurityConfigStorageKey } from "../../util/security";
@@ -59,7 +59,7 @@ export var getComponentSign = function getComponentSign(params) {
59
59
  paymentMethodCategoryType = _params$paymentSessio4 === void 0 ? '' : _params$paymentSessio4;
60
60
  if (productScene && paymentMethodCategoryType) return "".concat(productScene, "_").concat(paymentMethodCategoryType);
61
61
  if (productScene) return "".concat(productScene);
62
- return componentSignEnum.NONE;
62
+ return ComponentSignEnum.NONE;
63
63
  };
64
64
  export var parseSessionData = function parseSessionData(sessionData) {
65
65
  try {
@@ -74,7 +74,7 @@ export var parseSessionData = function parseSessionData(sessionData) {
74
74
  var resetEasyPaySceneVersion = function resetEasyPaySceneVersion(parseData) {
75
75
  if (isPC() && parseData !== null && parseData !== void 0 && parseData.paymentSessionConfig) {
76
76
  var productScene = parseData.paymentSessionConfig.productScene;
77
- if (productScene === productSceneEnum.EASY_PAY) {
77
+ if (productScene === ProductSceneEnum.EASY_PAY) {
78
78
  var _parseData$paymentMet;
79
79
  // 非TOSS渠道,在PC场景需要改成1.0
80
80
  if ('BANKTRANSFER_QUICKPAY' !== (parseData === null || parseData === void 0 || (_parseData$paymentMet = parseData.paymentMethodInfoView) === null || _parseData$paymentMet === void 0 ? void 0 : _parseData$paymentMet.paymentMethodType)) {
@@ -94,23 +94,23 @@ var handleSessionData = function handleSessionData(originSessionData) {
94
94
  var handleParams = function handleParams(params, _this) {
95
95
  var _params = Object.assign({
96
96
  paymentSessionMetaData: {},
97
- renderDisplayType: renderDisplayTypeEnum.popup
97
+ renderDisplayType: DisplayTypeEnum.popup
98
98
  }, params);
99
99
  var _handleSessionData = handleSessionData(_params.sessionData || (_params === null || _params === void 0 ? void 0 : _params.paymentSessionData)),
100
100
  _handleSessionData2 = _slicedToArray(_handleSessionData, 2),
101
101
  parseData = _handleSessionData2[0],
102
102
  sessionData = _handleSessionData2[1];
103
103
  var componentSign = getComponentSign(parseData);
104
- if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign) && _params.renderDisplayType === renderDisplayTypeEnum.popup) {
104
+ if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign) && _params.renderDisplayType === DisplayTypeEnum.popup) {
105
105
  return Promise.reject({
106
106
  code: ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.code,
107
107
  message: "unsupported payment method"
108
108
  });
109
109
  }
110
- if (_this.options.product === productSceneEnum.ELEMENT_ADDRESS) {
111
- componentSign = componentSignEnum.ELEMENT_ADDRESS;
110
+ if (_this.options.product === ProductSceneEnum.ELEMENT_ADDRESS) {
111
+ componentSign = ComponentSignEnum.ELEMENT_ADDRESS;
112
112
  }
113
- if (componentSign === componentSignEnum.NONE) {
113
+ if (componentSign === ComponentSignEnum.NONE) {
114
114
  // eslint-disable-next-line prefer-promise-reject-errors
115
115
  return Promise.reject({
116
116
  code: ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.code,
@@ -163,7 +163,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
163
163
  selector: selector,
164
164
  renderDisplayType: renderDisplayType
165
165
  }, params);
166
- if (this.options.product !== productSceneEnum.ELEMENT_ADDRESS && _params && !_params.sessionData && !(_params !== null && _params !== void 0 && _params.paymentSessionData)) {
166
+ if (this.options.product !== ProductSceneEnum.ELEMENT_ADDRESS && _params && !_params.sessionData && !(_params !== null && _params !== void 0 && _params.paymentSessionData)) {
167
167
  return Promise.reject(ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR);
168
168
  }
169
169
  if (this.options.networkMode === networkModeEnum.proxy) {
@@ -235,7 +235,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
235
235
  });
236
236
  }
237
237
  var previousChannel = {
238
- channelType: channelType === componentSignEnum.VAULTING_CARD ? componentSignEnum.CASHIER_PAYMENT_CARD : channelType,
238
+ channelType: channelType === ComponentSignEnum.VAULTING_CARD ? ComponentSignEnum.CASHIER_PAYMENT_CARD : channelType,
239
239
  productSceneVersion: productSceneVersion
240
240
  };
241
241
  localStorage.setItem('antom_checkout_previousChannel', JSON.stringify(previousChannel));
@@ -249,7 +249,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
249
249
  value: function registerBusAbility() {
250
250
  var _this$originOptions,
251
251
  _this3 = this;
252
- BusManager.debugTrace(((_this$originOptions = this.originOptions) === null || _this$originOptions === void 0 ? void 0 : _this$originOptions.environment) !== environmentEnum.prod, this.logger);
252
+ BusManager.debugTrace(((_this$originOptions = this.originOptions) === null || _this$originOptions === void 0 ? void 0 : _this$originOptions.environment) !== EnvironmentEnum.prod, this.logger);
253
253
  BusManager.clear();
254
254
  BusManager.addInterceptor({
255
255
  onPublishException: function onPublishException(message, e) {
@@ -353,7 +353,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
353
353
  this.logger.setComponentStartTime(Date.now());
354
354
  return this.parameterInitAndCheck({
355
355
  params: params,
356
- renderDisplayType: renderDisplayTypeEnum.popup
356
+ renderDisplayType: DisplayTypeEnum.popup
357
357
  }).then(function (_params) {
358
358
  return handleParams(_params, _this5);
359
359
  }).catch(function (error) {
@@ -444,7 +444,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
444
444
  this.logger.setComponentStartTime(Date.now());
445
445
  return this.parameterInitAndCheck({
446
446
  params: params,
447
- renderDisplayType: renderDisplayTypeEnum.inline,
447
+ renderDisplayType: DisplayTypeEnum.inline,
448
448
  selector: selector
449
449
  }).then(function (_params) {
450
450
  return handleParams(_params, _this7);
@@ -477,7 +477,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
477
477
  return Promise.resolve();
478
478
  }
479
479
  var iframeNodesParams = appendParams.iframeNodesParams;
480
- if (this.options.product !== productSceneEnum.ELEMENT_ADDRESS) {
480
+ if (this.options.product !== ProductSceneEnum.ELEMENT_ADDRESS) {
481
481
  this.savePreviousChannel(iframeNodesParams);
482
482
  }
483
483
  return this.pluginAppendIframe(appendParams);
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
11
11
  /* eslint-disable @typescript-eslint/no-explicit-any */
12
12
  import { BASEPLUGINID, ERRORMESSAGE, EVENT } from "../../constant";
13
13
  import CheckoutApp from "../../plugin/drop-in";
14
- import { messageName, networkModeEnum } from "../../types";
14
+ import { MessageName, networkModeEnum } from "../../types";
15
15
  import { createIframeNode } from "../../util/createIframeNode";
16
16
  export var mixinDropInConstructor = function mixinDropInConstructor(options, context) {
17
17
  // Instantiate the plug-in and set render
@@ -57,7 +57,7 @@ export var confirmPayment = function confirmPayment(result) {
57
57
  });
58
58
  });
59
59
  _this2.eventCenter.emit("".concat(BASEPLUGINID, "-handleRequestPayment"), {
60
- name: messageName.SDK_TO_APP,
60
+ name: MessageName.SDK_TO_APP,
61
61
  mode: _this2.options.mode,
62
62
  appId: BASEPLUGINID,
63
63
  instanceId: _this2._instanceId,
@@ -24,7 +24,7 @@ import { v4 as uuid } from 'uuid';
24
24
  import { sdkVersion } from "../../config/index";
25
25
  import { ERRORMESSAGE, EVENT } from "../../constant";
26
26
  import { antomConfig } from "../../service";
27
- import { environmentEnum, modeEnum, networkModeEnum, osTypeEnum, productSceneEnum, terminalTypeEnum } from "../../types/index";
27
+ import { EnvironmentEnum, modeEnum, networkModeEnum, osTypeEnum, ProductSceneEnum, terminalTypeEnum } from "../../types/index";
28
28
  import { checkTimeElapsed, device, EventCenter, getOrSetStorageId, getType, queryParse, safeJson } from "../../util/index";
29
29
  import CallApp from "../../util/intl-callapp/es/main";
30
30
  import { LogConfig, Logger } from "../../util/logger";
@@ -61,7 +61,7 @@ var AMSSDK = /*#__PURE__*/function () {
61
61
  this._storageId = _storageId;
62
62
 
63
63
  // TODO Consumption data analysis control parameters
64
- this.logger = new Logger(LogConfig, ![environmentEnum.prod, environmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment));
64
+ this.logger = new Logger(LogConfig, ![EnvironmentEnum.prod, EnvironmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment));
65
65
  Logger.setInstance(this.logger);
66
66
  this.logger.setMedta({
67
67
  instanceId: this._instanceId
@@ -81,7 +81,7 @@ var AMSSDK = /*#__PURE__*/function () {
81
81
  var _this$options;
82
82
  var antomSDKConfigKey = 'antomSDKConfigKey';
83
83
  var config = safeJson(getOrSetStorageId(antomSDKConfigKey), {});
84
- if (![environmentEnum.prod, environmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment)) return;
84
+ if (![EnvironmentEnum.prod, EnvironmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment)) return;
85
85
  if (checkTimeElapsed()) {
86
86
  antomConfig({
87
87
  env: this.options.env.environment
@@ -89,7 +89,7 @@ var AMSSDK = /*#__PURE__*/function () {
89
89
  getOrSetStorageId(antomSDKConfigKey, JSON.stringify(res));
90
90
  });
91
91
  }
92
- var product = ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.product) || productSceneEnum.EASY_PAY;
92
+ var product = ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.product) || ProductSceneEnum.EASY_PAY;
93
93
  var enable = true;
94
94
  try {
95
95
  var matchingConfig = config['pl_sec'].find(function (item) {
@@ -157,9 +157,9 @@ var AMSSDK = /*#__PURE__*/function () {
157
157
  value: function initSecurity(_ref) {
158
158
  var _this = this;
159
159
  var _ref$product = _ref.product,
160
- product = _ref$product === void 0 ? productSceneEnum.EASY_PAY : _ref$product,
160
+ product = _ref$product === void 0 ? ProductSceneEnum.EASY_PAY : _ref$product,
161
161
  _ref$scene = _ref.scene,
162
- scene = _ref$scene === void 0 ? productSceneEnum.EASY_PAY : _ref$scene;
162
+ scene = _ref$scene === void 0 ? ProductSceneEnum.EASY_PAY : _ref$scene;
163
163
  this.logger.logInfo({
164
164
  title: 'sdk_event_securitySdkPreInit'
165
165
  }, {
@@ -258,7 +258,7 @@ var AMSSDK = /*#__PURE__*/function () {
258
258
  value: function _setEnv(options) {
259
259
  var _queryParse = queryParse(),
260
260
  _moreEnv = _queryParse._moreEnv;
261
- if (options !== null && options !== void 0 && options.environment && !((options === null || options === void 0 ? void 0 : options.environment) in environmentEnum) && _moreEnv !== 'true') {
261
+ if (options !== null && options !== void 0 && options.environment && !((options === null || options === void 0 ? void 0 : options.environment) in EnvironmentEnum) && _moreEnv !== 'true') {
262
262
  console.warn(ERRORMESSAGE.INIT_PARAMETER_ERROR.ENVIRONMENT_ERROR.message);
263
263
  options.environment = 'prod';
264
264
  }
@@ -488,8 +488,8 @@ var AMSSDK = /*#__PURE__*/function () {
488
488
  }
489
489
  actionNames = this._getPlugin(pluginKey);
490
490
  }
491
- if (this.options.product === productSceneEnum.ELEMENT_ADDRESS) {
492
- actionNames = this._getPlugin(productSceneEnum.ELEMENT_ADDRESS);
491
+ if (this.options.product === ProductSceneEnum.ELEMENT_ADDRESS) {
492
+ actionNames = this._getPlugin(ProductSceneEnum.ELEMENT_ADDRESS);
493
493
  }
494
494
  return actionNames;
495
495
  }
@@ -0,0 +1,26 @@
1
+ import { IoptionsParams, ProductSceneEnum } from '../../types';
2
+ import { BizFlowStartBehavior, PaymentContext, ProductProcessor, StartBizFlowOptions } from '../index';
3
+ import { ServiceProvider } from '../service';
4
+ /**
5
+ * @author 谦彧 <zhangmian.zm@alipay.com>
6
+ * @date 2024/9/17
7
+ */
8
+ export declare class AntomSDKCore {
9
+ private bizFlowStartBehavior;
10
+ private initOptions;
11
+ private paymentContext;
12
+ private instanceId;
13
+ private sdkMetaData;
14
+ private productProcessors;
15
+ constructor();
16
+ registerProcessor(productScene: string, paymentMethod: string, processor: ProductProcessor): void;
17
+ init(options: IoptionsParams, productScene: ProductSceneEnum): void;
18
+ private prepare;
19
+ startBizFlow(options: StartBizFlowOptions): Promise<void>;
20
+ getServiceProvider(): ServiceProvider;
21
+ getBizFlowBehavior(): BizFlowStartBehavior;
22
+ getPaymentContext(): PaymentContext;
23
+ destroy(): void;
24
+ private handleBehaviorRender;
25
+ private cleanRender;
26
+ }