@alipay/ams-checkout 0.0.1788166152-dev.6 → 0.0.1788166152-dev.7
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/config/index.js +1 -1
- package/esm/core/component/element/modernElementController/index.d.ts +1 -1
- package/esm/core/component/element/modernElementController/index.js +9 -9
- package/esm/modern/{modern/index.d.ts → index.d.ts} +1 -1
- package/esm/modern/index.js +1 -1
- package/esm/modern/tools.js +1 -1
- package/esm/util/logger.js +1 -1
- package/package.json +1 -2
- package/types.d.ts +2 -17
- package/types.untrimmed.d.ts +2 -35
- package/esm/modern/component/channel.d.ts +0 -21
- package/esm/modern/component/component.inline.style.d.ts +0 -10
- package/esm/modern/component/component.popup.style.d.ts +0 -26
- package/esm/modern/component/popupWindow.style.d.ts +0 -27
- package/esm/modern/config/index.d.ts +0 -23
- package/esm/modern/config/request.d.ts +0 -21
- package/esm/modern/constant/auto-debit.d.ts +0 -12
- package/esm/modern/constant/easysafepay.d.ts +0 -16
- package/esm/modern/constant/element.d.ts +0 -27
- package/esm/modern/constant/index.d.ts +0 -331
- package/esm/modern/core/bus/ability/callback.d.ts +0 -9
- package/esm/modern/core/bus/ability/security.d.ts +0 -10
- package/esm/modern/core/bus/ability/tracker.d.ts +0 -9
- package/esm/modern/core/bus/index.d.ts +0 -125
- package/esm/modern/core/bus/interface.d.ts +0 -36
- package/esm/modern/core/component/address.d.ts +0 -8
- package/esm/modern/core/component/appPreloadProcessing.d.ts +0 -1
- package/esm/modern/core/component/ckp/index.d.ts +0 -29
- package/esm/modern/core/component/element/EventCenter/index.d.ts +0 -41
- package/esm/modern/core/component/element/config.d.ts +0 -10
- package/esm/modern/core/component/element/elementContainerService/containerService.d.ts +0 -34
- package/esm/modern/core/component/element/elementContainerService/index.d.ts +0 -20
- package/esm/modern/core/component/element/elementController/index.d.ts +0 -54
- package/esm/modern/core/component/element/elementProcessor/addressProcessor.d.ts +0 -20
- package/esm/modern/core/component/element/elementProcessor/authProcessor.d.ts +0 -20
- package/esm/modern/core/component/element/elementProcessor/baseElementProcessor.d.ts +0 -42
- package/esm/modern/core/component/element/elementProcessor/convertPaymentMethods.d.ts +0 -22
- package/esm/modern/core/component/element/elementProcessor/paymentProcessor.d.ts +0 -37
- package/esm/modern/core/component/element/index.d.ts +0 -17
- package/esm/modern/core/component/element/mock.d.ts +0 -10
- package/esm/modern/core/component/element/modernElementController/adapter.d.ts +0 -19
- package/esm/modern/core/component/element/modernElementController/index.d.ts +0 -172
- package/esm/modern/core/component/element/type.d.ts +0 -586
- package/esm/modern/core/component/element/util.d.ts +0 -93
- package/esm/modern/core/component/index.d.ts +0 -58
- package/esm/modern/core/instance/index.d.ts +0 -97
- package/esm/modern/core/utils/connectConfig.d.ts +0 -11
- package/esm/modern/foundation/core/index.d.ts +0 -36
- package/esm/modern/foundation/index.d.ts +0 -93
- package/esm/modern/foundation/product-processor/autoDebit/deps.d.ts +0 -14
- package/esm/modern/foundation/product-processor/autoDebit/index.d.ts +0 -48
- package/esm/modern/foundation/product-processor/easysafepay/deps.d.ts +0 -20
- package/esm/modern/foundation/product-processor/easysafepay/index.d.ts +0 -29
- package/esm/modern/foundation/product-processor/element/index.d.ts +0 -7
- package/esm/modern/foundation/service/api-bus/ability/globalData.d.ts +0 -10
- package/esm/modern/foundation/service/api-bus/ability/request.d.ts +0 -10
- package/esm/modern/foundation/service/api-bus/ability/security.d.ts +0 -12
- package/esm/modern/foundation/service/api-bus/ability/tracker.d.ts +0 -9
- package/esm/modern/foundation/service/api-bus/busManager.d.ts +0 -127
- package/esm/modern/foundation/service/api-bus/index.d.ts +0 -20
- package/esm/modern/foundation/service/api-bus/interface.d.ts +0 -48
- package/esm/modern/foundation/service/container/index.d.ts +0 -42
- package/esm/modern/foundation/service/container/popup.d.ts +0 -31
- package/esm/modern/foundation/service/container/utils.d.ts +0 -7
- package/esm/modern/foundation/service/event-center.d.ts +0 -82
- package/esm/modern/foundation/service/global-data/index.d.ts +0 -11
- package/esm/modern/foundation/service/index.d.ts +0 -19
- package/esm/modern/foundation/service/log/index.d.ts +0 -44
- package/esm/modern/foundation/service/log/keys.d.ts +0 -13
- package/esm/modern/foundation/service/log/processor.d.ts +0 -9
- package/esm/modern/foundation/service/log/types.d.ts +0 -33
- package/esm/modern/foundation/service/requester/deps.d.ts +0 -17
- package/esm/modern/foundation/service/requester/requester.d.ts +0 -22
- package/esm/modern/foundation/service/security/index.d.ts +0 -33
- package/esm/modern/foundation/service/security/security.d.ts +0 -54
- package/esm/modern/foundation/utils/gray_scale_utils.d.ts +0 -7
- package/esm/modern/foundation/utils/payment_context_utils.d.ts +0 -13
- package/esm/modern/foundation/utils/payment_product_utils.d.ts +0 -13
- package/esm/modern/foundation/utils/preload_helper.d.ts +0 -24
- package/esm/modern/foundation/utils/redirect_utils.d.ts +0 -11
- package/esm/modern/foundation/utils/system_events.d.ts +0 -4
- package/esm/modern/foundation/utils/web_app_url_utils.d.ts +0 -114
- package/esm/modern/loader/constant.d.ts +0 -36
- package/esm/modern/loader/utils/proxyPerformance.d.ts +0 -20
- package/esm/modern/main.d.ts +0 -54
- package/esm/modern/modern/loadAntomTracker.d.ts +0 -7
- package/esm/modern/modern/preload/antomManifestAdapter.d.ts +0 -11
- package/esm/modern/modern/preload/config.d.ts +0 -10
- package/esm/modern/modern/preload/gatewayPreconnection.d.ts +0 -53
- package/esm/modern/modern/preload/preloadAntomElements.d.ts +0 -9
- package/esm/modern/modern/preload/startAntomPreload.d.ts +0 -2
- package/esm/modern/modern/sdk/applepay-core/ApplePayHostService.d.ts +0 -102
- package/esm/modern/modern/sdk/elements/CVVElement.d.ts +0 -144
- package/esm/modern/modern/sdk/elements/PaymentElement.d.ts +0 -204
- package/esm/modern/modern/sdk/elements/appearanceRules.d.ts +0 -59
- package/esm/modern/modern/sdk/elements/appearanceRulesDefaults.d.ts +0 -2
- package/esm/modern/modern/sdk/eventsMap.d.ts +0 -135
- package/esm/modern/modern/sdk/oneapi/iexpfront/PaymentSessionService.d.ts +0 -69
- package/esm/modern/modern/sdk/oneapi/iexpfront/definitions.d.ts +0 -5311
- package/esm/modern/modern/sdk/oneapi/iexpfront/preConnection.d.ts +0 -6
- package/esm/modern/modern/sdk/stageName.d.ts +0 -3
- package/esm/modern/modern/sdk/tools/awaitWrap.d.ts +0 -14
- package/esm/modern/modern/sdk/tools/buildPageUrl.d.ts +0 -4
- package/esm/modern/modern/sdk/tools/checkSessionData.d.ts +0 -1
- package/esm/modern/modern/sdk/tools/expressElement/applePay.d.ts +0 -9
- package/esm/modern/modern/sdk/tools/expressElement/applePayHostToken.d.ts +0 -32
- package/esm/modern/modern/sdk/tools/expressElement/types.d.ts +0 -277
- package/esm/modern/modern/sdk/tools/getDevReqConfig.d.ts +0 -2
- package/esm/modern/modern/sdk/tools/getLocaleFromRenderData.d.ts +0 -6
- package/esm/modern/modern/sdk/tools/getMetaData.d.ts +0 -126
- package/esm/modern/modern/sdk/tools/modalMessageMonitor.d.ts +0 -41
- package/esm/modern/modern/sdk/tools/openModal.d.ts +0 -20
- package/esm/modern/modern/sdk/tools/paymentElement/applePayHostToken.d.ts +0 -38
- package/esm/modern/modern/sdk/tools/paymentElement/googlePayHostToken.d.ts +0 -38
- package/esm/modern/modern/sdk/tools/paymentElement/tracker.d.ts +0 -16
- package/esm/modern/modern/sdk/tools/paymentElement/walletHostListeners.d.ts +0 -19
- package/esm/modern/modern/sdk/tools/preloadTracking.d.ts +0 -5
- package/esm/modern/modern/sdk/tools/showToast.d.ts +0 -33
- package/esm/modern/modern/sdk/tools/validatePaymentAmount.d.ts +0 -19
- package/esm/modern/modern/sdk/tracking/elementTracker.d.ts +0 -65
- package/esm/modern/modern/sdk/types.d.ts +0 -310
- package/esm/modern/modern/tools.d.ts +0 -26
- package/esm/modern/plugin/applepay/component.d.ts +0 -50
- package/esm/modern/plugin/applepay/index.d.ts +0 -17
- package/esm/modern/plugin/applepay/interface.d.ts +0 -161
- package/esm/modern/plugin/applepay/service.d.ts +0 -54
- package/esm/modern/plugin/component/cashierApp.d.ts +0 -38
- package/esm/modern/plugin/component/channel.d.ts +0 -73
- package/esm/modern/plugin/component/component.inline.style.d.ts +0 -10
- package/esm/modern/plugin/component/component.popup.style.d.ts +0 -25
- package/esm/modern/plugin/component/index.d.ts +0 -133
- package/esm/modern/plugin/component/popupWindow.style.d.ts +0 -11
- package/esm/modern/plugin/const.d.ts +0 -2
- package/esm/modern/plugin/payment-element/utils.d.ts +0 -2
- package/esm/modern/plugin/paypal/index.d.ts +0 -20
- package/esm/modern/plugin/type.d.ts +0 -34
- package/esm/modern/plugin/utils.d.ts +0 -6
- package/esm/modern/preload/antomManifestAdapter.d.ts +0 -11
- package/esm/modern/preload/antomManifestAdapter.js +0 -117
- package/esm/modern/preload/config.d.ts +0 -10
- package/esm/modern/preload/config.js +0 -37
- package/esm/modern/preload/gatewayPreconnection.d.ts +0 -53
- package/esm/modern/preload/gatewayPreconnection.js +0 -213
- package/esm/modern/preload/preloadAntomElements.d.ts +0 -9
- package/esm/modern/preload/preloadAntomElements.js +0 -95
- package/esm/modern/preload/startAntomPreload.d.ts +0 -2
- package/esm/modern/preload/startAntomPreload.js +0 -9
- package/esm/modern/request/index.d.ts +0 -9
- package/esm/modern/request/utils.d.ts +0 -28
- package/esm/modern/service/index.d.ts +0 -13
- package/esm/modern/types/index.d.ts +0 -856
- package/esm/modern/util/beforeConfirm.d.ts +0 -14
- package/esm/modern/util/createIframeNode.d.ts +0 -6
- package/esm/modern/util/debug.d.ts +0 -1
- package/esm/modern/util/get.d.ts +0 -25
- package/esm/modern/util/getBackScheme.d.ts +0 -5
- package/esm/modern/util/index.d.ts +0 -61
- package/esm/modern/util/jshield-apdid/apdid-loader.d.ts +0 -89
- package/esm/modern/util/jshield-apdid/index.d.ts +0 -21
- package/esm/modern/util/logger.d.ts +0 -67
- package/esm/modern/util/mock.d.ts +0 -1
- package/esm/modern/util/redirect.d.ts +0 -6
- package/esm/modern/util/security-registry.d.ts +0 -72
- package/esm/modern/util/security.d.ts +0 -55
- package/esm/modern/util/spm-map.d.ts +0 -217
- package/esm/modern/util/storage.d.ts +0 -2
- package/esm/modern/util/timezone.d.ts +0 -1
- package/esm/modern/util/upgrade.d.ts +0 -39
- package/esm/modern/util/versionCompare.d.ts +0 -15
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
|
3
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
* 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
|
|
5
|
-
* 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.
|
|
6
|
-
*/
|
|
7
|
-
import { eventCodeEnum } from '../types';
|
|
8
|
-
export declare const ERRORMESSAGE: {
|
|
9
|
-
DOMAIN_NOT_IN_WHITE_LIST: {
|
|
10
|
-
code: eventCodeEnum;
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
NOT_JSON_FORMAT: {
|
|
14
|
-
code: eventCodeEnum;
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
|
-
SDK_COMPATIBILITY_ISSUES: {
|
|
18
|
-
code: eventCodeEnum;
|
|
19
|
-
BROWSER_NOT_SUPPORT_POSTMESSAGE: {
|
|
20
|
-
code: eventCodeEnum;
|
|
21
|
-
message: string;
|
|
22
|
-
};
|
|
23
|
-
FAILED_TO_CREATE_IFRAME: {
|
|
24
|
-
code: eventCodeEnum;
|
|
25
|
-
message: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
INIT_PARAMETER_ERROR: {
|
|
29
|
-
code: eventCodeEnum;
|
|
30
|
-
UI_MODE_NOT_SUPPORTED: {
|
|
31
|
-
code: eventCodeEnum;
|
|
32
|
-
message: string;
|
|
33
|
-
};
|
|
34
|
-
ENVIRONMENT_ERROR: {
|
|
35
|
-
code: eventCodeEnum;
|
|
36
|
-
message: string;
|
|
37
|
-
};
|
|
38
|
-
MODE_ERROR: {
|
|
39
|
-
code: eventCodeEnum;
|
|
40
|
-
message: string;
|
|
41
|
-
};
|
|
42
|
-
LOCALE_ERROR: {
|
|
43
|
-
code: eventCodeEnum;
|
|
44
|
-
message: string;
|
|
45
|
-
};
|
|
46
|
-
NET_MODE_NOT_SUPPORT: {
|
|
47
|
-
code: eventCodeEnum;
|
|
48
|
-
message: string;
|
|
49
|
-
};
|
|
50
|
-
EVENT_ERROR: {
|
|
51
|
-
code: eventCodeEnum;
|
|
52
|
-
message: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
CREATEPAYMENT_PARAMETER_ERROR: {
|
|
56
|
-
code: eventCodeEnum;
|
|
57
|
-
};
|
|
58
|
-
CREATECOMPONENT_ERROR: {
|
|
59
|
-
code: eventCodeEnum;
|
|
60
|
-
message: string;
|
|
61
|
-
SINGLETON_COMPONENT_ERROR: {
|
|
62
|
-
code: eventCodeEnum;
|
|
63
|
-
message: string;
|
|
64
|
-
};
|
|
65
|
-
LOAD_APP_TIMEOUT: {
|
|
66
|
-
code: eventCodeEnum;
|
|
67
|
-
message: string;
|
|
68
|
-
};
|
|
69
|
-
NETWORK_REQUEST_ERROR: {
|
|
70
|
-
code: eventCodeEnum;
|
|
71
|
-
message: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
SDK_LAUNCH_PAYMENT_APP_ERROR: {
|
|
75
|
-
code: eventCodeEnum;
|
|
76
|
-
CALL_APP_URL_ERROR: {
|
|
77
|
-
code: eventCodeEnum;
|
|
78
|
-
message: string;
|
|
79
|
-
};
|
|
80
|
-
LOAD_APP_TIME_OUT: {
|
|
81
|
-
code: eventCodeEnum;
|
|
82
|
-
message: string;
|
|
83
|
-
};
|
|
84
|
-
CONTAINER_NOT_EXIST: {
|
|
85
|
-
code: eventCodeEnum;
|
|
86
|
-
message: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
SDK_SUBMIT_ERROR: {
|
|
90
|
-
code: eventCodeEnum;
|
|
91
|
-
message: string;
|
|
92
|
-
};
|
|
93
|
-
PARAM_INVALID: {
|
|
94
|
-
code: string;
|
|
95
|
-
message: string;
|
|
96
|
-
};
|
|
97
|
-
UI_STATE_ERROR: {
|
|
98
|
-
code: string;
|
|
99
|
-
message: string;
|
|
100
|
-
};
|
|
101
|
-
INITIALIZE_TIMEOUT: {
|
|
102
|
-
code: string;
|
|
103
|
-
API: {
|
|
104
|
-
code: string;
|
|
105
|
-
message: string;
|
|
106
|
-
};
|
|
107
|
-
WEB: {
|
|
108
|
-
code: string;
|
|
109
|
-
message: string;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
ERR_DATA_STRUCT_UNRECOGNIZED: {
|
|
113
|
-
code: string;
|
|
114
|
-
message: string;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
@deprecated 已废弃 请使用SDK_LAUNCH_PAYMENT_APP_ERROR
|
|
118
|
-
*/
|
|
119
|
-
SDK_CALL_URL_ERROR: {
|
|
120
|
-
code: eventCodeEnum;
|
|
121
|
-
REDIRECT_ERROR: {
|
|
122
|
-
code: eventCodeEnum;
|
|
123
|
-
message: string;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
export declare const BASEPLUGINID = "CHECKOUT";
|
|
128
|
-
export declare const COMPONENTPLUGINID = "COMPONENT";
|
|
129
|
-
export declare const EVENT: {
|
|
130
|
-
ready: {
|
|
131
|
-
name: string;
|
|
132
|
-
uniqueKey: string;
|
|
133
|
-
};
|
|
134
|
-
error: {
|
|
135
|
-
name: string;
|
|
136
|
-
uniqueKey: string;
|
|
137
|
-
};
|
|
138
|
-
paymentMethodSelected: {
|
|
139
|
-
name: string;
|
|
140
|
-
uniqueKey: string;
|
|
141
|
-
};
|
|
142
|
-
sizeChanged: {
|
|
143
|
-
name: string;
|
|
144
|
-
uniqueKey: string;
|
|
145
|
-
};
|
|
146
|
-
log: {
|
|
147
|
-
name: string;
|
|
148
|
-
uniqueKey: string;
|
|
149
|
-
};
|
|
150
|
-
launch: {
|
|
151
|
-
name: string;
|
|
152
|
-
};
|
|
153
|
-
redirect: {
|
|
154
|
-
name: string;
|
|
155
|
-
};
|
|
156
|
-
close: {
|
|
157
|
-
name: string;
|
|
158
|
-
uniqueKey: string;
|
|
159
|
-
};
|
|
160
|
-
destroy: {
|
|
161
|
-
name: string;
|
|
162
|
-
};
|
|
163
|
-
closeCallback: {
|
|
164
|
-
name: string;
|
|
165
|
-
uniqueKey: string;
|
|
166
|
-
};
|
|
167
|
-
eventCallback: {
|
|
168
|
-
name: string;
|
|
169
|
-
uniqueKey: string;
|
|
170
|
-
};
|
|
171
|
-
submitForm: {
|
|
172
|
-
name: string;
|
|
173
|
-
};
|
|
174
|
-
hideCloseButton: {
|
|
175
|
-
name: string;
|
|
176
|
-
};
|
|
177
|
-
showCloseButton: {
|
|
178
|
-
name: string;
|
|
179
|
-
};
|
|
180
|
-
setMaskCloseButton: {
|
|
181
|
-
name: string;
|
|
182
|
-
};
|
|
183
|
-
setAllowRetention: {
|
|
184
|
-
name: string;
|
|
185
|
-
};
|
|
186
|
-
declareCheckoutInfo: {
|
|
187
|
-
name: string;
|
|
188
|
-
};
|
|
189
|
-
showPopup: {
|
|
190
|
-
name: string;
|
|
191
|
-
};
|
|
192
|
-
dismissLoading: {
|
|
193
|
-
name: string;
|
|
194
|
-
};
|
|
195
|
-
popupWindow: {
|
|
196
|
-
name: string;
|
|
197
|
-
};
|
|
198
|
-
popWindow: {
|
|
199
|
-
name: string;
|
|
200
|
-
};
|
|
201
|
-
getDeviceId: {
|
|
202
|
-
name: string;
|
|
203
|
-
};
|
|
204
|
-
declareEventCallbackInfo: {
|
|
205
|
-
name: string;
|
|
206
|
-
};
|
|
207
|
-
setGlobalData: {
|
|
208
|
-
name: string;
|
|
209
|
-
};
|
|
210
|
-
getGlobalData: {
|
|
211
|
-
name: string;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* @deprecated 已废弃 请使用eventCallback
|
|
215
|
-
*/
|
|
216
|
-
sendMuitiAppEventToSdk: {
|
|
217
|
-
name: string;
|
|
218
|
-
};
|
|
219
|
-
receiveMuitiAppFromSdk: {
|
|
220
|
-
name: string;
|
|
221
|
-
};
|
|
222
|
-
sendBroadcast: {
|
|
223
|
-
name: string;
|
|
224
|
-
};
|
|
225
|
-
receiveBroadcast: {
|
|
226
|
-
name: string;
|
|
227
|
-
};
|
|
228
|
-
getUserAgentFromSdk: {
|
|
229
|
-
name: string;
|
|
230
|
-
};
|
|
231
|
-
appHeartBeat: {
|
|
232
|
-
name: string;
|
|
233
|
-
};
|
|
234
|
-
beforeSubmit: {
|
|
235
|
-
name: string;
|
|
236
|
-
uniqueKey: string;
|
|
237
|
-
};
|
|
238
|
-
beforeSubmitDone: {
|
|
239
|
-
name: string;
|
|
240
|
-
uniqueKey: string;
|
|
241
|
-
};
|
|
242
|
-
onChange: {
|
|
243
|
-
name: string;
|
|
244
|
-
uniqueKey: string;
|
|
245
|
-
};
|
|
246
|
-
getGooglePayToken: {
|
|
247
|
-
name: string;
|
|
248
|
-
};
|
|
249
|
-
initSecuritySDK: {
|
|
250
|
-
name: string;
|
|
251
|
-
};
|
|
252
|
-
closePaymentPolling: {
|
|
253
|
-
name: string;
|
|
254
|
-
};
|
|
255
|
-
onPollingEnd: {
|
|
256
|
-
name: string;
|
|
257
|
-
};
|
|
258
|
-
getApplePayToken: {
|
|
259
|
-
name: string;
|
|
260
|
-
};
|
|
261
|
-
updated: {
|
|
262
|
-
name: string;
|
|
263
|
-
};
|
|
264
|
-
webAppReady: {
|
|
265
|
-
name: string;
|
|
266
|
-
};
|
|
267
|
-
showToast: {
|
|
268
|
-
name: string;
|
|
269
|
-
};
|
|
270
|
-
getSdkVersion: {
|
|
271
|
-
name: string;
|
|
272
|
-
};
|
|
273
|
-
inputFocus: {
|
|
274
|
-
name: string;
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* 通过SDK转发web应用消息给其他web应用(用于iframe之间消息互通)
|
|
278
|
-
* TODO 推荐使用BusManager
|
|
279
|
-
*/
|
|
280
|
-
messageForward: {
|
|
281
|
-
name: string;
|
|
282
|
-
};
|
|
283
|
-
submitPromiseCallback: {
|
|
284
|
-
name: string;
|
|
285
|
-
};
|
|
286
|
-
beforeConfirm: {
|
|
287
|
-
name: string;
|
|
288
|
-
};
|
|
289
|
-
validateFieldsResult: {
|
|
290
|
-
name: string;
|
|
291
|
-
forwardName: string;
|
|
292
|
-
uniqueKey: string;
|
|
293
|
-
};
|
|
294
|
-
canIUse: {
|
|
295
|
-
name: string;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
export declare const SENDEVENT: {
|
|
299
|
-
validateFields: {
|
|
300
|
-
name: string;
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
export declare const COMPONENT_CONTAINER_ID = "ams-component-container";
|
|
304
|
-
export declare const COMPONENT_SECTION_ID = "ams-component-section";
|
|
305
|
-
export declare const COMPONENT_IFRAME_TAG_ID = "ams-checkout-component";
|
|
306
|
-
export declare const COMPONENT_CLOSE_BLOCK_ID = "asm-component-close-block";
|
|
307
|
-
export declare const COMPONENT_CLOSE_MASK_BLOCK_ID = "ams-component-mask-close-block";
|
|
308
|
-
export declare const COMPONENT_RETENTION_ID = "ams-component-retention";
|
|
309
|
-
export declare const MOCKUP_ID = "ams-component-mockup";
|
|
310
|
-
export declare const LOADING_ID = "ams-component-loading";
|
|
311
|
-
export declare const POPUPLOADING_ID = "ams-component-popup-loading";
|
|
312
|
-
export declare const LISTENER_PREFIX = "_ams_sdk_component_listener";
|
|
313
|
-
export declare const INLINE_BASE_STYLE_ID = "ams-inline-component-style";
|
|
314
|
-
export declare const INLINE_IMG_CLASSNAME = "inline-loading";
|
|
315
|
-
export declare const AMSPOPUP_PREFIX = "ams-popup";
|
|
316
|
-
export declare const DEFAULT_IFRAME_COLOR_SCHEME = "light dark";
|
|
317
|
-
export declare const LOADTIME_LIMIT = 15000;
|
|
318
|
-
export declare const POPUP_LOADTIME_LOG_LIMIT = 3000;
|
|
319
|
-
export declare const ANIMATION_TIME = 300;
|
|
320
|
-
export declare const TIMEOUT_WEB_APP_HEART_BEAT = 6000;
|
|
321
|
-
export declare const TIME_DELAY_SEND_HEART_BEAT = 1000;
|
|
322
|
-
export declare const closeImg = "https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg";
|
|
323
|
-
export declare const closeImgLight = "https://cdn.marmot-cloud.com/storage/2025/05/24/50891cd3-7a4a-47c0-b550-2e2ce6187c31.svg";
|
|
324
|
-
export declare const LOADINGIMG = "data:image/png;base64,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";
|
|
325
|
-
/**
|
|
326
|
-
* @description Promise回调code映射
|
|
327
|
-
*/
|
|
328
|
-
export declare const PROMISE_CALLBACK_CODE: Record<string, {
|
|
329
|
-
code: string;
|
|
330
|
-
message?: string;
|
|
331
|
-
}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BusContext, BusMessage, BusSubscriber } from "../index";
|
|
2
|
-
import { callOnEventCallback } from "../../../types";
|
|
3
|
-
export declare class SDKCallbackBusSubscriber extends BusSubscriber {
|
|
4
|
-
private _onEventCallback?;
|
|
5
|
-
constructor(onEventCallback?: callOnEventCallback);
|
|
6
|
-
actionNames(): string[];
|
|
7
|
-
protected onEventCallback(message: BusMessage): void;
|
|
8
|
-
onMessage(context: BusContext, message: BusMessage): void;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DeviceIdParameter } from '../../../types';
|
|
2
|
-
import { BusContext, BusMessage, BusSubscriber } from '../index';
|
|
3
|
-
export type onDeviceIdCallback = (deviceIdParameter?: DeviceIdParameter, isPolling?: boolean) => Promise<string>;
|
|
4
|
-
export declare class SecurityBusSubscriber extends BusSubscriber {
|
|
5
|
-
private _onDeviceIdCallback?;
|
|
6
|
-
constructor(onDeviceIdCallback?: onDeviceIdCallback);
|
|
7
|
-
actionNames(): string[];
|
|
8
|
-
protected getSecurityDeviceId(context: BusContext, message: BusMessage): Promise<void>;
|
|
9
|
-
onMessage(context: BusContext, message: BusMessage): void;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '../../../util/logger';
|
|
2
|
-
import { BusContext, BusMessage, BusSubscriber } from '../index';
|
|
3
|
-
export declare class TrackerBusSubscriber extends BusSubscriber {
|
|
4
|
-
logger: Logger;
|
|
5
|
-
constructor(logger: Logger);
|
|
6
|
-
actionNames(): string[];
|
|
7
|
-
protected reportAnalytics(context: BusContext, message: BusMessage): Promise<void>;
|
|
8
|
-
onMessage(context: BusContext, message: BusMessage): void;
|
|
9
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '../../util/logger';
|
|
2
|
-
/**
|
|
3
|
-
* Bus 埋点内容定义
|
|
4
|
-
*/
|
|
5
|
-
export declare enum BusLogEventEnum {
|
|
6
|
-
/**
|
|
7
|
-
* 发送消息
|
|
8
|
-
* action:string
|
|
9
|
-
*/
|
|
10
|
-
sdk_event_busPublishMessage = "sdk_event_busPublishMessage",
|
|
11
|
-
/**
|
|
12
|
-
* 发送消息时,返回事件结果(Web)
|
|
13
|
-
* action:string
|
|
14
|
-
*/
|
|
15
|
-
sdk_event_busPublishCallback = "sdk_event_busPublishCallback",
|
|
16
|
-
/**
|
|
17
|
-
* 查询是否订阅
|
|
18
|
-
* action:string
|
|
19
|
-
* sub (processResult): bool
|
|
20
|
-
*/
|
|
21
|
-
sdk_event_busIsSubscribe = "sdk_event_busIsSubscribe",
|
|
22
|
-
/**
|
|
23
|
-
* 订阅协议
|
|
24
|
-
* actions (actionNames): string[] , 用逗号拼接
|
|
25
|
-
*/
|
|
26
|
-
sdk_event_busSubscribe = "sdk_event_busSubscribe",
|
|
27
|
-
/**
|
|
28
|
-
* 退订协议
|
|
29
|
-
* actions (actionNames): string[] , 用逗号拼接
|
|
30
|
-
*/
|
|
31
|
-
sdk_event_busUnsubscribe = "sdk_event_busUnsubscribe",
|
|
32
|
-
/**
|
|
33
|
-
* 清除缓存(Web/Android)
|
|
34
|
-
*/
|
|
35
|
-
sdk_event_busClear = "sdk_event_busClear",
|
|
36
|
-
/**
|
|
37
|
-
* 添加拦截器(Web/Android)
|
|
38
|
-
*/
|
|
39
|
-
sdk_event_busAddInterceptor = "sdk_event_busAddInterceptor",
|
|
40
|
-
/**
|
|
41
|
-
* 发送消息时,对应aciton未订阅
|
|
42
|
-
*/
|
|
43
|
-
sdk_error_busPublishUnsubscribeError = "sdk_error_busPublishUnsubscribeError",
|
|
44
|
-
/**
|
|
45
|
-
* 发送消息时异常
|
|
46
|
-
*/
|
|
47
|
-
sdk_error_busPublishError = "sdk_error_busPublishError",
|
|
48
|
-
/**
|
|
49
|
-
* 发送消息无结果(Web)
|
|
50
|
-
*/
|
|
51
|
-
sdk_error_busPublishNoResult = "sdk_error_busPublishNoResult"
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 扩展协议可序列化的消息定义
|
|
55
|
-
*/
|
|
56
|
-
export declare class BusMessage {
|
|
57
|
-
private action;
|
|
58
|
-
private data;
|
|
59
|
-
private jsonData;
|
|
60
|
-
constructor(action: string, data?: string);
|
|
61
|
-
getAction(): string;
|
|
62
|
-
getData(): string;
|
|
63
|
-
isJSONData(): boolean;
|
|
64
|
-
getJSONObject(): any;
|
|
65
|
-
private parseJSONData;
|
|
66
|
-
result(result?: any): BusMessage;
|
|
67
|
-
}
|
|
68
|
-
export type OnBusCallback = (message: BusMessage) => void;
|
|
69
|
-
/**
|
|
70
|
-
* 扩展总线可选的Context参数,在Web端用于实时回调
|
|
71
|
-
*/
|
|
72
|
-
export declare class BusContext {
|
|
73
|
-
private callback;
|
|
74
|
-
constructor(callback: OnBusCallback);
|
|
75
|
-
onCallBack(message: BusMessage): void;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 扩展能力的能力定义,基于此协议实现扩展能力
|
|
79
|
-
*/
|
|
80
|
-
export declare abstract class BusSubscriber {
|
|
81
|
-
abstract actionNames(): string[];
|
|
82
|
-
abstract onMessage(context: BusContext, message: BusMessage): void;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 拦截器,可增加扩展性
|
|
86
|
-
*/
|
|
87
|
-
export interface BusInterceptor {
|
|
88
|
-
/**
|
|
89
|
-
* 未订阅场景拦截
|
|
90
|
-
* @param actionName
|
|
91
|
-
*/
|
|
92
|
-
onUnsubscribedAction?(actionName: string): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* 分发消息场景处理异常
|
|
95
|
-
* @param message
|
|
96
|
-
*/
|
|
97
|
-
onPublishException?(message: BusMessage, e: any): void;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 事件总线入口,支持的关系为:
|
|
101
|
-
* 发送者 和 接收者的关系: 一对一,大多数场景,支持callback
|
|
102
|
-
* 发送者 和 接收者的关系: 多对一, 设计上多一对,但是同一时间点,只会一个发送者,支持callback
|
|
103
|
-
* 发送者 和 接收者的关系: 一对多,可能有,埋点多重上报?不需要callback,业务场景应该是一个广播场景
|
|
104
|
-
*/
|
|
105
|
-
export declare class BusManager {
|
|
106
|
-
private static TAG;
|
|
107
|
-
private static _logSplit;
|
|
108
|
-
private static interceptors;
|
|
109
|
-
private static subscribersMap;
|
|
110
|
-
private static isDebug;
|
|
111
|
-
private static logger;
|
|
112
|
-
static debugTrace(enable: boolean, logger: Logger): void;
|
|
113
|
-
private static traceLog;
|
|
114
|
-
private static traceError;
|
|
115
|
-
static clear(): void;
|
|
116
|
-
static addInterceptor(interceptor: BusInterceptor): void;
|
|
117
|
-
static publishForResult(message: BusMessage, config?: {
|
|
118
|
-
timeoutMs?: number;
|
|
119
|
-
fallback?: any;
|
|
120
|
-
}): Promise<BusMessage>;
|
|
121
|
-
static publish(message: BusMessage, callback?: OnBusCallback): void;
|
|
122
|
-
static subscribe(subscriber: BusSubscriber): void;
|
|
123
|
-
static unsubscribe(subscriber: BusSubscriber): void;
|
|
124
|
-
static isSubscribed(actionName: string): boolean;
|
|
125
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare enum PaymentActionEnum {
|
|
2
|
-
optional_init = "plugin_optional_init"
|
|
3
|
-
}
|
|
4
|
-
export declare enum ApplePayActionEnum {
|
|
5
|
-
canMakePayments = "plugin_CARD_APPLE_PAY_available",
|
|
6
|
-
createComponent = "plugin_CARD_APPLE_PAY_createComponent",
|
|
7
|
-
destroyComponent = "plugin_CARD_APPLE_PAY_destroyComponent"
|
|
8
|
-
}
|
|
9
|
-
export declare enum PaypalActionEnum {
|
|
10
|
-
mountComponent = "plugin_Paypal_mountComponent",
|
|
11
|
-
destroyComponent = "plugin_Paypal_destroyComponent"
|
|
12
|
-
}
|
|
13
|
-
export declare enum SDKCallbackActionEnum {
|
|
14
|
-
onEventCallback = "onEventCallback"
|
|
15
|
-
}
|
|
16
|
-
export declare enum SecuritySDKActionEnum {
|
|
17
|
-
getSecurityDeviceId = "getSecurityDeviceId"
|
|
18
|
-
}
|
|
19
|
-
export declare enum TrackerActionEnum {
|
|
20
|
-
/**
|
|
21
|
-
* level: string info/error
|
|
22
|
-
* basic: json object
|
|
23
|
-
* extra: json object
|
|
24
|
-
*/
|
|
25
|
-
reportAnalytics = "reportAnalytics"
|
|
26
|
-
}
|
|
27
|
-
export declare enum ComponentActiontEnum {
|
|
28
|
-
onDestory = "onDestory"
|
|
29
|
-
}
|
|
30
|
-
export declare enum RequestActiontEnum {
|
|
31
|
-
onDestory = "httpRequest"
|
|
32
|
-
}
|
|
33
|
-
export declare enum LoadingActiontEnum {
|
|
34
|
-
showLoading = "showLoading",
|
|
35
|
-
dismissLoading = "dismissLoading"
|
|
36
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IoptionsParams } from '../../types';
|
|
2
|
-
import { AMSComponent } from './index';
|
|
3
|
-
export declare class AddressComponent extends AMSComponent {
|
|
4
|
-
constructor(options: IoptionsParams & {
|
|
5
|
-
appVersion: string;
|
|
6
|
-
});
|
|
7
|
-
getValue(hasValidate?: boolean): Promise<unknown>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function loadChannelPneumaticControl(paymentSessionFactor: any, logger: any): Promise<unknown>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IcreateComponent, IoptionsParams } from '../../../types';
|
|
2
|
-
import { Logger } from '../../../util/logger';
|
|
3
|
-
type LOCAL_URL = string;
|
|
4
|
-
export type CKPEmbeddedAppEnv = 'dev' | 'sit' | 'pre' | 'prod';
|
|
5
|
-
export type CKPEmbeddedEventType = 'SDK_PAYMENT_SUCCESSFUL' | 'SDK_PAYMENT_FAIL' | 'SDK_PAYMENT_CANCEL' | 'SDK_PAYMENT_CLICK_BACK_TO_MERCHANT';
|
|
6
|
-
export declare const getCKPPageAddress: (env: IoptionsParams["environment"] | LOCAL_URL) => string;
|
|
7
|
-
export declare class AMSCheckoutPage {
|
|
8
|
-
logger: Logger;
|
|
9
|
-
private _instanceId;
|
|
10
|
-
private iframe;
|
|
11
|
-
private originOptions;
|
|
12
|
-
private readonly APP_IFRAME_ID;
|
|
13
|
-
private eventListener?;
|
|
14
|
-
constructor(options: Pick<IoptionsParams, 'environment' | 'locale' | 'onEventCallback'>);
|
|
15
|
-
private generateIframeSrc;
|
|
16
|
-
private eventListenerWrapper;
|
|
17
|
-
private addListener;
|
|
18
|
-
private removeListener;
|
|
19
|
-
private dispatchToApp;
|
|
20
|
-
/**
|
|
21
|
-
* 挂载组件
|
|
22
|
-
*/
|
|
23
|
-
mountComponent(params: Pick<IcreateComponent, 'sessionData' | 'isDemoMode'>, selector: string): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* 卸载组件
|
|
26
|
-
*/
|
|
27
|
-
unmount(): void;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { LogService } from '../../../../foundation/service/log';
|
|
2
|
-
export declare class EventCenter {
|
|
3
|
-
private activeEvents;
|
|
4
|
-
private heartbeatIntervalId;
|
|
5
|
-
private readonly HEARTBEAT_INTERVAL;
|
|
6
|
-
private uniqueId;
|
|
7
|
-
private readonly logger;
|
|
8
|
-
constructor({ logger }: {
|
|
9
|
-
logger: LogService;
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* 注册事件
|
|
13
|
-
* @param {string} functionName 函数名称
|
|
14
|
-
* @returns {string} 返回事件起始ID
|
|
15
|
-
*/
|
|
16
|
-
registerEvent(functionName: string, sessionData?: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* 结束事件
|
|
19
|
-
* @param startId 事件起始ID
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
endEvent(startId: string, extra?: any): void;
|
|
23
|
-
/**
|
|
24
|
-
* Cancels a single active event and reports it as an ended event with canceled=true.
|
|
25
|
-
* This is used when the mount flow is terminated early (for example, on destroy or abnormal exit).
|
|
26
|
-
*/
|
|
27
|
-
cancelEvent(startId: string, extra?: any): void;
|
|
28
|
-
/**
|
|
29
|
-
* Cancels all active events whose event id starts with the given prefix.
|
|
30
|
-
* For example, prefix 'mount' will cancel events like mount_1_start.
|
|
31
|
-
*/
|
|
32
|
-
cancelByPrefix(prefix: string, extra?: any): void;
|
|
33
|
-
private startHeartbeat;
|
|
34
|
-
private stopHeartbeat;
|
|
35
|
-
private sendHeartbeat;
|
|
36
|
-
private sendLog;
|
|
37
|
-
private buildId;
|
|
38
|
-
private getEventName;
|
|
39
|
-
private buildIdFromStart;
|
|
40
|
-
private getEventNameFromStart;
|
|
41
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum ProductScene {
|
|
2
|
-
EXPRESS_CHECKOUT = "EXPRESS_CHECKOUT",
|
|
3
|
-
ELEMENT_PAYMENT = "ELEMENT_PAYMENT"
|
|
4
|
-
}
|
|
5
|
-
interface EventScenario {
|
|
6
|
-
eventName: ProductScene;
|
|
7
|
-
supportedEvents: string[];
|
|
8
|
-
}
|
|
9
|
-
export declare const productEventScenarios: EventScenario[];
|
|
10
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import BaseElementProcessor from '../elementProcessor/baseElementProcessor';
|
|
2
|
-
import { ContainerService } from './../../../../foundation/service/container';
|
|
3
|
-
import { EventCenter } from './../../../../foundation/service/event-center';
|
|
4
|
-
export declare enum IContainerStatus {
|
|
5
|
-
UNINIT = "UNINIT",
|
|
6
|
-
INITING = "INITING",
|
|
7
|
-
READY = "READY",
|
|
8
|
-
IN_BIZ_FLOW = "IN_BIZ_FLOW",
|
|
9
|
-
DESTROYED = "DESTROYED"
|
|
10
|
-
}
|
|
11
|
-
export declare class ContainerController {
|
|
12
|
-
private containerStatus;
|
|
13
|
-
private instanceId;
|
|
14
|
-
private containerService;
|
|
15
|
-
private eventService;
|
|
16
|
-
private containerElement;
|
|
17
|
-
private _globalData?;
|
|
18
|
-
constructor({ type, instanceId, selector, processor, options, }: {
|
|
19
|
-
type: string;
|
|
20
|
-
instanceId: string;
|
|
21
|
-
selector: string;
|
|
22
|
-
processor: BaseElementProcessor;
|
|
23
|
-
options: any;
|
|
24
|
-
});
|
|
25
|
-
private addEventListener;
|
|
26
|
-
getContainerElement(): HTMLDivElement;
|
|
27
|
-
createWebLaunchPromise(): Promise<unknown>;
|
|
28
|
-
switchContainerStatus(status: IContainerStatus): void;
|
|
29
|
-
getContainerStatus(): IContainerStatus;
|
|
30
|
-
getEventService(): EventCenter;
|
|
31
|
-
destroy(): void;
|
|
32
|
-
getContainerService(): ContainerService;
|
|
33
|
-
getInstanceId(): string;
|
|
34
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ElementType } from '../type';
|
|
2
|
-
import { ContainerController } from './containerService';
|
|
3
|
-
export declare class ElementContainerService {
|
|
4
|
-
private containerServices;
|
|
5
|
-
private instanceId;
|
|
6
|
-
constructor({ instanceId }: {
|
|
7
|
-
instanceId: any;
|
|
8
|
-
});
|
|
9
|
-
addContainerService(name: ElementType, service: ContainerController): void;
|
|
10
|
-
getContainerService(name: ElementType): ContainerController | undefined;
|
|
11
|
-
getContainerServices(): Map<ElementType, ContainerController>;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
mount({ type, selector, processor, options }: {
|
|
14
|
-
type: any;
|
|
15
|
-
selector: any;
|
|
16
|
-
processor: any;
|
|
17
|
-
options: any;
|
|
18
|
-
}): void;
|
|
19
|
-
getEventService(name: ElementType): import("../../../../foundation/service/event-center").EventCenter;
|
|
20
|
-
}
|