@alipay/ams-checkout 0.0.1730107332-dev.4 → 0.0.1730441340-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/config/index.d.ts +7 -7
- package/esm/config/index.js +7 -7
- package/esm/constant/index.d.ts +6 -7
- package/esm/constant/index.js +80 -11
- package/esm/{foundation/service/api-bus → core/bus}/ability/callback.d.ts +2 -2
- package/esm/{foundation/service/api-bus → core/bus}/ability/callback.js +1 -1
- package/esm/{foundation/service/api-bus → core/bus}/ability/security.d.ts +4 -6
- package/esm/{foundation/service/api-bus → core/bus}/ability/security.js +35 -92
- package/esm/{foundation/service/api-bus → core/bus}/ability/tracker.d.ts +4 -4
- package/esm/{foundation/service/api-bus → core/bus}/ability/tracker.js +3 -6
- package/esm/{foundation/service/api-bus/busManager.d.ts → core/bus/index.d.ts} +15 -17
- package/esm/{foundation/service/api-bus/busManager.js → core/bus/index.js} +35 -67
- package/esm/{foundation/service/api-bus → core/bus}/interface.d.ts +0 -12
- package/esm/{foundation/service/api-bus → core/bus}/interface.js +2 -16
- package/esm/core/component/address.d.ts +8 -0
- package/esm/{foundation/service/api-bus/ability/globalData.js → core/component/address.js} +58 -75
- package/esm/core/component/appPreloadProcessing.d.ts +1 -0
- package/esm/{foundation/service/container/popup.js → core/component/appPreloadProcessing.js} +83 -97
- package/esm/core/component/ckp/index.d.ts +27 -0
- package/esm/core/component/ckp/index.js +166 -0
- package/esm/core/component/index.d.ts +51 -0
- package/esm/core/component/index.js +531 -0
- package/esm/core/drop-in/index.d.ts +22 -0
- package/esm/core/drop-in/index.js +104 -0
- package/esm/core/instance/index.d.ts +89 -0
- package/esm/core/instance/index.js +499 -0
- package/esm/index.d.ts +28 -5
- package/esm/index.js +158 -29
- package/esm/plugin/applepay/component.d.ts +50 -0
- package/esm/plugin/applepay/component.js +339 -0
- package/esm/plugin/applepay/index.d.ts +17 -0
- package/esm/plugin/applepay/index.js +117 -0
- package/esm/plugin/applepay/interface.d.ts +161 -0
- package/esm/plugin/applepay/interface.js +69 -0
- package/esm/plugin/applepay/service.d.ts +54 -0
- package/esm/plugin/applepay/service.js +289 -0
- package/esm/plugin/component/cashierApp.d.ts +34 -0
- package/esm/plugin/component/cashierApp.js +237 -0
- package/esm/{component → plugin/component}/channel.d.ts +4 -3
- package/esm/{component → plugin/component}/channel.js +37 -1
- package/esm/plugin/component/component.inline.style.d.ts +10 -0
- package/esm/{component → plugin/component}/component.inline.style.js +9 -11
- package/esm/{component → plugin/component}/component.popup.style.d.ts +6 -15
- package/esm/{component → plugin/component}/component.popup.style.js +18 -36
- package/esm/plugin/component/index.d.ts +126 -0
- package/esm/plugin/component/index.js +1839 -0
- package/esm/{component → plugin/component}/popupWindow.style.js +2 -2
- package/esm/plugin/const.d.ts +2 -0
- package/esm/plugin/const.js +33 -0
- package/esm/plugin/drop-in/index.d.ts +71 -0
- package/esm/plugin/drop-in/index.js +324 -0
- package/esm/plugin/payment-element/utils.d.ts +2 -0
- package/esm/plugin/payment-element/utils.js +6 -0
- package/esm/plugin/paypal/index.d.ts +20 -0
- package/esm/plugin/paypal/index.js +390 -0
- package/esm/plugin/type.d.ts +34 -0
- package/esm/plugin/utils.d.ts +6 -0
- package/esm/plugin/utils.js +21 -0
- package/esm/types/index.d.ts +55 -61
- package/esm/types/index.js +62 -63
- package/esm/util/createIframeNode.d.ts +6 -0
- package/esm/util/createIframeNode.js +48 -0
- package/esm/util/getBackScheme.d.ts +2 -2
- package/esm/util/getBackScheme.js +2 -94
- package/esm/util/index.d.ts +11 -1
- package/esm/util/index.js +84 -3
- package/esm/util/intl-callapp/es/index.js +0 -1
- package/esm/{foundation/service/security → util}/security.d.ts +2 -2
- package/esm/{foundation/service/security → util}/security.js +3 -3
- package/esm/util/ua/index.d.ts +2 -0
- package/esm/util/ua/index.js +2 -0
- package/esm/util/ua/isAndroid.d.ts +4 -0
- package/esm/util/ua/isAndroid.js +7 -0
- package/esm/util/ua/isIOS.d.ts +4 -0
- package/esm/util/ua/isIOS.js +7 -0
- package/package.json +2 -2
- package/esm/component/component.inline.style.d.ts +0 -10
- package/esm/foundation/core/index.d.ts +0 -26
- package/esm/foundation/core/index.js +0 -364
- package/esm/foundation/index.d.ts +0 -74
- package/esm/foundation/index.js +0 -42
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +0 -18
- package/esm/foundation/product-processor/easysafepay/deps.js +0 -12
- package/esm/foundation/product-processor/easysafepay/index.d.ts +0 -27
- package/esm/foundation/product-processor/easysafepay/index.js +0 -596
- package/esm/foundation/service/api-bus/ability/globalData.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/request.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/request.js +0 -151
- package/esm/foundation/service/api-bus/index.d.ts +0 -20
- package/esm/foundation/service/api-bus/index.js +0 -88
- package/esm/foundation/service/container/index.d.ts +0 -28
- package/esm/foundation/service/container/index.js +0 -256
- package/esm/foundation/service/container/popup.d.ts +0 -17
- package/esm/foundation/service/container/utils.d.ts +0 -7
- package/esm/foundation/service/container/utils.js +0 -48
- package/esm/foundation/service/event-center.d.ts +0 -74
- package/esm/foundation/service/event-center.js +0 -213
- package/esm/foundation/service/global-data/index.d.ts +0 -11
- package/esm/foundation/service/global-data/index.js +0 -68
- package/esm/foundation/service/index.d.ts +0 -19
- package/esm/foundation/service/index.js +0 -82
- package/esm/foundation/service/log/index.d.ts +0 -43
- package/esm/foundation/service/log/index.js +0 -235
- package/esm/foundation/service/log/types.d.ts +0 -32
- package/esm/foundation/service/requester/deps.d.ts +0 -17
- package/esm/foundation/service/requester/deps.js +0 -11
- package/esm/foundation/service/requester/requester.d.ts +0 -22
- package/esm/foundation/service/requester/requester.js +0 -214
- package/esm/foundation/service/security/index.d.ts +0 -28
- package/esm/foundation/service/security/index.js +0 -285
- package/esm/foundation/types/index.d.ts +0 -4
- package/esm/foundation/types/index.js +0 -4
- package/esm/foundation/utils/gray_scale_utils.d.ts +0 -7
- package/esm/foundation/utils/gray_scale_utils.js +0 -40
- package/esm/foundation/utils/payment_context_utils.d.ts +0 -13
- package/esm/foundation/utils/payment_context_utils.js +0 -57
- package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
- package/esm/foundation/utils/payment_product_utils.js +0 -38
- package/esm/foundation/utils/redirect_utils.d.ts +0 -6
- package/esm/foundation/utils/redirect_utils.js +0 -115
- package/esm/foundation/utils/system_events.d.ts +0 -4
- package/esm/foundation/utils/system_events.js +0 -71
- package/esm/foundation/utils/web_app_url_utils.d.ts +0 -46
- package/esm/foundation/utils/web_app_url_utils.js +0 -112
- /package/esm/{component → plugin/component}/popupWindow.style.d.ts +0 -0
- /package/esm/{foundation/service/log/types.js → plugin/type.js} +0 -0
package/esm/config/index.d.ts
CHANGED
@@ -5,10 +5,10 @@ export declare const sdkVersion: string;
|
|
5
5
|
/**
|
6
6
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
7
7
|
*/
|
8
|
-
export declare const AMSCheckoutAppVersion = "1.
|
9
|
-
export declare const AMSAutoDebitAppVersion = "1.
|
10
|
-
export declare const AMSEasyPayAppVersion = "1.
|
11
|
-
export declare const AMSCashierPaymentAppVersion = "1.
|
12
|
-
export declare const AMSVaultingAppVersion = "1.
|
13
|
-
export declare const AMSPaymentElementAppVersion = "1.
|
14
|
-
export declare const ADDRESSElementAppVersion = "1.
|
8
|
+
export declare const AMSCheckoutAppVersion = "1.23.1";
|
9
|
+
export declare const AMSAutoDebitAppVersion = "1.23.0";
|
10
|
+
export declare const AMSEasyPayAppVersion = "1.23.0";
|
11
|
+
export declare const AMSCashierPaymentAppVersion = "1.23.0";
|
12
|
+
export declare const AMSVaultingAppVersion = "1.23.0";
|
13
|
+
export declare const AMSPaymentElementAppVersion = "1.23.1";
|
14
|
+
export declare const ADDRESSElementAppVersion = "1.23.0";
|
package/esm/config/index.js
CHANGED
@@ -35,10 +35,10 @@ export var sdkVersion = json.version;
|
|
35
35
|
/**
|
36
36
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
37
37
|
*/
|
38
|
-
export var AMSCheckoutAppVersion = '1.
|
39
|
-
export var AMSAutoDebitAppVersion = '1.
|
40
|
-
export var AMSEasyPayAppVersion = '1.
|
41
|
-
export var AMSCashierPaymentAppVersion = '1.
|
42
|
-
export var AMSVaultingAppVersion = '1.
|
43
|
-
export var AMSPaymentElementAppVersion = '1.
|
44
|
-
export var ADDRESSElementAppVersion = '1.
|
38
|
+
export var AMSCheckoutAppVersion = '1.23.1'; // 兜底版本号
|
39
|
+
export var AMSAutoDebitAppVersion = '1.23.0'; // 代扣
|
40
|
+
export var AMSEasyPayAppVersion = '1.23.0'; // easypay
|
41
|
+
export var AMSCashierPaymentAppVersion = '1.23.0'; // 收银台(卡、apm)
|
42
|
+
export var AMSVaultingAppVersion = '1.23.0'; // 绑卡
|
43
|
+
export var AMSPaymentElementAppVersion = '1.23.1'; // payment element
|
44
|
+
export var ADDRESSElementAppVersion = '1.23.0'; // address element
|
package/esm/constant/index.d.ts
CHANGED
@@ -161,12 +161,6 @@ export declare const EVENT: {
|
|
161
161
|
receiveMuitiAppFromSdk: {
|
162
162
|
name: string;
|
163
163
|
};
|
164
|
-
sendBroadcast: {
|
165
|
-
name: string;
|
166
|
-
};
|
167
|
-
receiveBroadcast: {
|
168
|
-
name: string;
|
169
|
-
};
|
170
164
|
getUserAgentFromSdk: {
|
171
165
|
name: string;
|
172
166
|
};
|
@@ -185,7 +179,7 @@ export declare const EVENT: {
|
|
185
179
|
name: string;
|
186
180
|
uniqueKey: string;
|
187
181
|
};
|
188
|
-
|
182
|
+
getGooglePayToken: {
|
189
183
|
name: string;
|
190
184
|
};
|
191
185
|
};
|
@@ -208,3 +202,8 @@ export declare const TIMEOUT_WEB_APP_HEART_BEAT = 6000;
|
|
208
202
|
export declare const TIME_DELAY_SEND_HEART_BEAT = 1000;
|
209
203
|
export declare const closeImg = "https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg";
|
210
204
|
export declare const LOADINGIMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACEBAMAAACjap6UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAITgAACE4AUWWMWAAAAAqUExURUdwTKe3zKGxyK27z7K/05ytxLbD1bvH2Jaowb/K28DL3JCjvYueucDL2xLcxpgAAAAOdFJOUwCKoHRft0w5zCgY4fYKKSYvdQAABvtJREFUaN6lmt+LG1UUx6fddbcZHOgkpWutBTPbVBEfNp1xS6uF2oQURUGnBBbqw7YdsooV2ipZ06c+uBBZCistDRMUqgV1gnnwJ4HMg2jBh+Qh1bW1A/lfPOfcO9lkNz/m3j3dh2XT+eznfM+dmTvTKsroUovpeGotbyetlXuKTH17vFxeKq9R5fOJG8KAR6+Uy2vlJag8ALDmxSDa2TLWEhos5UPKnEA7sy8yALNYyod1/mpUwiYpQB9MYy1sJZWybwgRgLGGDLRAhg1ftn0qIqHBkijzefBO7HwKRN6cTJguNxoho38gjGHb7y5PTHJpvdyLgsaap3UBSdjISKWMCZlqzzTBosGj4CMJC+LEmh8/20+b62jRM+EGjIAQsLDnxhH+IQduUS7P50p1RQk85zgRwCIPhJTx9pjz6gIev84k1o59tfVJ7HIKw0iRRio5upX3GaGBjPMbg5/FjnOAYRvGC6MIU83mOkGAcHLnx7cxC8O2ETNqsofhcIgT2xja7WOmYRsp4+hwwt9NKErz1xG/ZJYRsE4PXRIX0GAdwxi5AGfjNrYCiGRnyMf/kgRgGmNm9ihl8DoyVAKOxzxfGrdy7vOZGPM7NfaiBDI+G38KXDK4yMKOj16lNiDKCVc3Nc47OTpkTRCjeWTi9SRMY3voHzZZ/TL5inKJAPHtS1TlhMZyhIszk4hvm+t/HPF5lEvjNyRhxAd7PuwziY0oCJV3cqz/hzPNph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YEAUfS/4dVIwouqsZkFBjQysGcOPA/DiKahZqky5wZ/ShIRNUACB5IdfFOtQRSIiKIRy/La9ncDzLPqetUI4+B9vLG9P48sXG/iEp1lgGx2xzMMt3DdSQN1eBvndsbMCJ47oZW7WSdHiCGvXTBMtHDHtvI4yy1yQ4IHDbfquuMZMcfJMYmPhn3sIQE13JGTVaEJsHCGS6CGy6o0ykN1CrkcWjjDJVDDIwm34g69McUKSIDjnSHj4PNiEpWKWyoNWelewXEoCuhj5EPpEzeEVFa3L3X1bgHaKOQcjOOD0YFXqYtSCRkDEPW7ApbjMJExZ5LasyCIW8M9mBZ4FQLkHB7G2MfzJ3Q8eKyGtVIsFlcKvBwayfh/ldW8Ck4Va7USEorFAkEoi1zu3KQrEu+Ca6wwi54GpFmYeC6ruLRAgffCLVgv2EchwkuGgGVZWe15bElAL5FeUwSUBR1f5AQUESCQR2mVh1FkjfAkohJgLj1GEVtZIRFACP0fCm/AgmdREnzYqIRhFHkvq+J77MBFQpEPpCQOYPcntwIWeK6Mu0P9D9pzJq4u5hj+AAAAAElFTkSuQmCC";
|
205
|
+
export declare const RULES: {
|
206
|
+
matchRule: string;
|
207
|
+
iosScheme: string;
|
208
|
+
andScheme: string;
|
209
|
+
}[];
|
package/esm/constant/index.js
CHANGED
@@ -155,20 +155,12 @@ export var EVENT = {
|
|
155
155
|
getGlobalData: {
|
156
156
|
name: 'getGlobalData'
|
157
157
|
},
|
158
|
-
// deprecated
|
159
158
|
sendMuitiAppEventToSdk: {
|
160
159
|
name: 'sendMuitiAppEventToSdk'
|
161
160
|
},
|
162
|
-
// deprecated
|
163
161
|
receiveMuitiAppFromSdk: {
|
164
162
|
name: 'receiveMuitiAppFromSdk'
|
165
163
|
},
|
166
|
-
sendBroadcast: {
|
167
|
-
name: 'sendBroadcast'
|
168
|
-
},
|
169
|
-
receiveBroadcast: {
|
170
|
-
name: 'receiveBroadcast'
|
171
|
-
},
|
172
164
|
getUserAgentFromSdk: {
|
173
165
|
name: 'getUserAgentFromSdk'
|
174
166
|
},
|
@@ -187,8 +179,8 @@ export var EVENT = {
|
|
187
179
|
name: 'onChange',
|
188
180
|
uniqueKey: 'userChange'
|
189
181
|
},
|
190
|
-
|
191
|
-
name: '
|
182
|
+
getGooglePayToken: {
|
183
|
+
name: 'getGooglePayToken'
|
192
184
|
}
|
193
185
|
};
|
194
186
|
export var COMPONENT_CONTAINER_ID = 'ams-component-container';
|
@@ -209,4 +201,81 @@ export var ANIMATION_TIME = 300;
|
|
209
201
|
export var TIMEOUT_WEB_APP_HEART_BEAT = 6000;
|
210
202
|
export var TIME_DELAY_SEND_HEART_BEAT = 1000;
|
211
203
|
export var closeImg = 'https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg';
|
212
|
-
export var LOADINGIMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACEBAMAAACjap6UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAITgAACE4AUWWMWAAAAAqUExURUdwTKe3zKGxyK27z7K/05ytxLbD1bvH2Jaowb/K28DL3JCjvYueucDL2xLcxpgAAAAOdFJOUwCKoHRft0w5zCgY4fYKKSYvdQAABvtJREFUaN6lmt+LG1UUx6fddbcZHOgkpWutBTPbVBEfNp1xS6uF2oQURUGnBBbqw7YdsooV2ipZ06c+uBBZCistDRMUqgV1gnnwJ4HMg2jBh+Qh1bW1A/lfPOfcO9lkNz/m3j3dh2XT+eznfM+dmTvTKsroUovpeGotbyetlXuKTH17vFxeKq9R5fOJG8KAR6+Uy2vlJag8ALDmxSDa2TLWEhos5UPKnEA7sy8yALNYyod1/mpUwiYpQB9MYy1sJZWybwgRgLGGDLRAhg1ftn0qIqHBkijzefBO7HwKRN6cTJguNxoho38gjGHb7y5PTHJpvdyLgsaap3UBSdjISKWMCZlqzzTBosGj4CMJC+LEmh8/20+b62jRM+EGjIAQsLDnxhH+IQduUS7P50p1RQk85zgRwCIP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oNWelewXEoCuhj5EPpEzeEVFa3L3X1bgHaKOQcjOOD0YFXqYtSCRkDEPW7ApbjMJExZ5LasyCIW8M9mBZ4FQLkHB7G2MfzJ3Q8eKyGtVIsFlcKvBwayfh/ldW8Ck4Va7USEorFAkEoi1zu3KQrEu+Ca6wwi54GpFmYeC6ruLRAgffCLVgv2EchwkuGgGVZWe15bElAL5FeUwSUBR1f5AQUESCQR2mVh1FkjfAkohJgLj1GEVtZIRFACP0fCm/AgmdREnzYqIRhFHkvq+J77MBFQpEPpCQOYPcntwIWeK6Mu0P9D9pzJq4u5hj+AAAAAElFTkSuQmCC';
|
205
|
+
export var RULES = [{
|
206
|
+
matchRule: 'AppleWebKit\\/([0-9\\.]+).* Version\\/([0-9\\._]+) Mobile\\/([0-9\\._A-Z]+) Safari\\/([0-9\\._]+)$',
|
207
|
+
iosScheme: 'https',
|
208
|
+
andScheme: ''
|
209
|
+
}, {
|
210
|
+
matchRule: 'HeyTapBrowser',
|
211
|
+
iosScheme: '',
|
212
|
+
andScheme: ''
|
213
|
+
}, {
|
214
|
+
matchRule: 'HuaweiBrowser',
|
215
|
+
iosScheme: '',
|
216
|
+
andScheme: ''
|
217
|
+
}, {
|
218
|
+
matchRule: 'Kwai',
|
219
|
+
iosScheme: 'kwai',
|
220
|
+
andScheme: ''
|
221
|
+
}, {
|
222
|
+
matchRule: 'MQQBrowser',
|
223
|
+
iosScheme: 'mttbrowser',
|
224
|
+
andScheme: ''
|
225
|
+
}, {
|
226
|
+
matchRule: 'MicroMessenger',
|
227
|
+
iosScheme: '',
|
228
|
+
andScheme: ''
|
229
|
+
}, {
|
230
|
+
matchRule: 'MiuiBrowser',
|
231
|
+
iosScheme: '',
|
232
|
+
andScheme: ''
|
233
|
+
}, {
|
234
|
+
matchRule: 'Mozilla\\/([0-9\\.]+).* AppleWebKit\\/([0-9\\.]+).* CriOS\\/([0-9\\._]+) Mobile\\/([0-9\\._A-Z\\._a-z]+) Safari\\/([0-9\\._]+)$',
|
235
|
+
iosScheme: 'googlechrome',
|
236
|
+
andScheme: ''
|
237
|
+
}, {
|
238
|
+
matchRule: 'Mozilla\\/([0-9\\.]+).* AppleWebKit\\/([0-9\\.]+).* Version\\/([0-9\\._]+) Mobile Safari\\/([0-9\\._]+)$',
|
239
|
+
iosScheme: 'googlechrome',
|
240
|
+
andScheme: ''
|
241
|
+
}, {
|
242
|
+
matchRule: 'NewsArticle',
|
243
|
+
iosScheme: 'snssdk141',
|
244
|
+
andScheme: ''
|
245
|
+
}, {
|
246
|
+
matchRule: 'UCBrowser',
|
247
|
+
iosScheme: 'ucbrowser',
|
248
|
+
andScheme: ''
|
249
|
+
}, {
|
250
|
+
matchRule: 'VideoArticle',
|
251
|
+
iosScheme: 'snssdk32',
|
252
|
+
andScheme: ''
|
253
|
+
}, {
|
254
|
+
matchRule: 'VivoBrowser',
|
255
|
+
iosScheme: '',
|
256
|
+
andScheme: ''
|
257
|
+
}, {
|
258
|
+
matchRule: 'ZhongAnWebView',
|
259
|
+
iosScheme: 'zaapp',
|
260
|
+
andScheme: ''
|
261
|
+
}, {
|
262
|
+
matchRule: 'aweme',
|
263
|
+
iosScheme: 'snssdk1128',
|
264
|
+
andScheme: ''
|
265
|
+
}, {
|
266
|
+
matchRule: 'aweme_lite',
|
267
|
+
iosScheme: 'snssdk2329',
|
268
|
+
andScheme: ''
|
269
|
+
}, {
|
270
|
+
matchRule: 'com.xs.fm',
|
271
|
+
iosScheme: 'novelfm3040',
|
272
|
+
andScheme: ''
|
273
|
+
}, {
|
274
|
+
matchRule: 'netdisk',
|
275
|
+
iosScheme: '',
|
276
|
+
andScheme: ''
|
277
|
+
}, {
|
278
|
+
matchRule: 'qqnews',
|
279
|
+
iosScheme: 'qqnews',
|
280
|
+
andScheme: ''
|
281
|
+
}];
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { BusContext, BusMessage, BusSubscriber } from "../
|
2
|
-
import { callOnEventCallback } from "
|
1
|
+
import { BusContext, BusMessage, BusSubscriber } from "../index";
|
2
|
+
import { callOnEventCallback } from "../../../types";
|
3
3
|
export declare class SDKCallbackBusSubscriber extends BusSubscriber {
|
4
4
|
private _onEventCallback?;
|
5
5
|
constructor(onEventCallback?: callOnEventCallback);
|
@@ -13,7 +13,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
14
14
|
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); }
|
15
15
|
import { SDKCallbackActionEnum } from "../interface";
|
16
|
-
import { BusSubscriber } from "../
|
16
|
+
import { BusSubscriber } from "../index";
|
17
17
|
export var SDKCallbackBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
18
18
|
_inherits(SDKCallbackBusSubscriber, _BusSubscriber);
|
19
19
|
var _super = _createSuper(SDKCallbackBusSubscriber);
|
@@ -1,12 +1,10 @@
|
|
1
|
-
import { DeviceIdParameter } from
|
2
|
-
import { BusContext, BusMessage, BusSubscriber } from '../
|
1
|
+
import { DeviceIdParameter } from '../../../types';
|
2
|
+
import { BusContext, BusMessage, BusSubscriber } from '../index';
|
3
3
|
export type onDeviceIdCallback = (deviceIdParameter?: DeviceIdParameter, isPolling?: boolean) => Promise<string>;
|
4
4
|
export declare class SecurityBusSubscriber extends BusSubscriber {
|
5
|
-
private
|
6
|
-
constructor(
|
5
|
+
private _onDeviceIdCallback?;
|
6
|
+
constructor(onDeviceIdCallback?: onDeviceIdCallback);
|
7
7
|
actionNames(): string[];
|
8
|
-
protected preInitSecurity(context: BusContext, message: BusMessage): Promise<void>;
|
9
|
-
protected initSecurity(context: BusContext, message: BusMessage): Promise<void>;
|
10
8
|
protected getSecurityDeviceId(context: BusContext, message: BusMessage): Promise<void>;
|
11
9
|
onMessage(context: BusContext, message: BusMessage): void;
|
12
10
|
}
|
@@ -15,18 +15,17 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
15
15
|
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; }
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
17
17
|
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); }
|
18
|
-
import { BusSubscriber } from "../
|
18
|
+
import { BusSubscriber } from "../index";
|
19
19
|
import { SecuritySDKActionEnum } from "../interface";
|
20
|
-
import { ServiceProvider } from "../../../../foundation/service";
|
21
20
|
export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
22
21
|
_inherits(SecurityBusSubscriber, _BusSubscriber);
|
23
22
|
var _super = _createSuper(SecurityBusSubscriber);
|
24
|
-
function SecurityBusSubscriber(
|
23
|
+
function SecurityBusSubscriber(onDeviceIdCallback) {
|
25
24
|
var _this;
|
26
25
|
_classCallCheck(this, SecurityBusSubscriber);
|
27
26
|
_this = _super.call(this);
|
28
|
-
_defineProperty(_assertThisInitialized(_this), "
|
29
|
-
_this.
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "_onDeviceIdCallback", void 0);
|
28
|
+
_this._onDeviceIdCallback = onDeviceIdCallback;
|
30
29
|
return _this;
|
31
30
|
}
|
32
31
|
_createClass(SecurityBusSubscriber, [{
|
@@ -35,108 +34,56 @@ export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
35
34
|
return Object.values(SecuritySDKActionEnum);
|
36
35
|
}
|
37
36
|
}, {
|
38
|
-
key: "
|
37
|
+
key: "getSecurityDeviceId",
|
39
38
|
value: function () {
|
40
|
-
var
|
41
|
-
var
|
39
|
+
var _getSecurityDeviceId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(context, message) {
|
40
|
+
var data, deviceId, _deviceId;
|
42
41
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
43
42
|
while (1) switch (_context.prev = _context.next) {
|
44
|
-
case 0:
|
45
|
-
console.log('preInitSecurity', message);
|
46
|
-
_context.prev = 1;
|
47
|
-
securityService = ServiceProvider.getInstance(this.instanceId).getService('Security');
|
48
|
-
_context.next = 5;
|
49
|
-
return securityService.preInitSecurity();
|
50
|
-
case 5:
|
51
|
-
context === null || context === void 0 || context.onCallBack(message.result(true));
|
52
|
-
_context.next = 11;
|
53
|
-
break;
|
54
|
-
case 8:
|
55
|
-
_context.prev = 8;
|
56
|
-
_context.t0 = _context["catch"](1);
|
57
|
-
context === null || context === void 0 || context.onCallBack(message.result(false));
|
58
|
-
case 11:
|
59
|
-
case "end":
|
60
|
-
return _context.stop();
|
61
|
-
}
|
62
|
-
}, _callee, this, [[1, 8]]);
|
63
|
-
}));
|
64
|
-
function preInitSecurity(_x, _x2) {
|
65
|
-
return _preInitSecurity.apply(this, arguments);
|
66
|
-
}
|
67
|
-
return preInitSecurity;
|
68
|
-
}()
|
69
|
-
}, {
|
70
|
-
key: "initSecurity",
|
71
|
-
value: function () {
|
72
|
-
var _initSecurity = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(context, message) {
|
73
|
-
var securityService;
|
74
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
75
|
-
while (1) switch (_context2.prev = _context2.next) {
|
76
|
-
case 0:
|
77
|
-
console.log('initSecurity', message);
|
78
|
-
_context2.prev = 1;
|
79
|
-
securityService = ServiceProvider.getInstance(this.instanceId).getService('Security');
|
80
|
-
_context2.next = 5;
|
81
|
-
return securityService.initSecurity();
|
82
|
-
case 5:
|
83
|
-
context === null || context === void 0 || context.onCallBack(message.result(true));
|
84
|
-
_context2.next = 11;
|
85
|
-
break;
|
86
|
-
case 8:
|
87
|
-
_context2.prev = 8;
|
88
|
-
_context2.t0 = _context2["catch"](1);
|
89
|
-
context === null || context === void 0 || context.onCallBack(message.result(false));
|
90
|
-
case 11:
|
91
|
-
case "end":
|
92
|
-
return _context2.stop();
|
93
|
-
}
|
94
|
-
}, _callee2, this, [[1, 8]]);
|
95
|
-
}));
|
96
|
-
function initSecurity(_x3, _x4) {
|
97
|
-
return _initSecurity.apply(this, arguments);
|
98
|
-
}
|
99
|
-
return initSecurity;
|
100
|
-
}()
|
101
|
-
}, {
|
102
|
-
key: "getSecurityDeviceId",
|
103
|
-
value: function () {
|
104
|
-
var _getSecurityDeviceId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(context, message) {
|
105
|
-
var data, securityService, deviceId;
|
106
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
107
|
-
while (1) switch (_context3.prev = _context3.next) {
|
108
43
|
case 0:
|
109
44
|
console.log('getSecurityDeviceId', message);
|
45
|
+
if (!this._onDeviceIdCallback) {
|
46
|
+
_context.next = 22;
|
47
|
+
break;
|
48
|
+
}
|
110
49
|
data = message.getJSONObject();
|
111
|
-
|
112
|
-
securityService = ServiceProvider.getInstance(this.instanceId).getService('Security');
|
50
|
+
_context.prev = 3;
|
113
51
|
if (!(data && data !== null && data !== void 0 && data.deviceIdParameter)) {
|
114
|
-
|
52
|
+
_context.next = 11;
|
115
53
|
break;
|
116
54
|
}
|
117
|
-
|
118
|
-
return
|
55
|
+
_context.next = 7;
|
56
|
+
return this._onDeviceIdCallback(data === null || data === void 0 ? void 0 : data.deviceIdParameter, true === (data === null || data === void 0 ? void 0 : data.isPolling));
|
119
57
|
case 7:
|
120
|
-
deviceId =
|
58
|
+
deviceId = _context.sent;
|
121
59
|
context === null || context === void 0 || context.onCallBack(message.result(deviceId !== null && deviceId !== void 0 ? deviceId : ""));
|
122
|
-
|
60
|
+
_context.next = 15;
|
123
61
|
break;
|
124
62
|
case 11:
|
63
|
+
_context.next = 13;
|
64
|
+
return this._onDeviceIdCallback();
|
65
|
+
case 13:
|
66
|
+
_deviceId = _context.sent;
|
67
|
+
context === null || context === void 0 || context.onCallBack(message.result(_deviceId !== null && _deviceId !== void 0 ? _deviceId : ""));
|
68
|
+
case 15:
|
69
|
+
_context.next = 20;
|
70
|
+
break;
|
71
|
+
case 17:
|
72
|
+
_context.prev = 17;
|
73
|
+
_context.t0 = _context["catch"](3);
|
125
74
|
context === null || context === void 0 || context.onCallBack(message.result(""));
|
126
|
-
case
|
127
|
-
|
75
|
+
case 20:
|
76
|
+
_context.next = 23;
|
128
77
|
break;
|
129
|
-
case
|
130
|
-
_context3.prev = 14;
|
131
|
-
_context3.t0 = _context3["catch"](2);
|
78
|
+
case 22:
|
132
79
|
context === null || context === void 0 || context.onCallBack(message.result(""));
|
133
|
-
case
|
80
|
+
case 23:
|
134
81
|
case "end":
|
135
|
-
return
|
82
|
+
return _context.stop();
|
136
83
|
}
|
137
|
-
},
|
84
|
+
}, _callee, this, [[3, 17]]);
|
138
85
|
}));
|
139
|
-
function getSecurityDeviceId(
|
86
|
+
function getSecurityDeviceId(_x, _x2) {
|
140
87
|
return _getSecurityDeviceId.apply(this, arguments);
|
141
88
|
}
|
142
89
|
return getSecurityDeviceId;
|
@@ -145,10 +92,6 @@ export var SecurityBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
145
92
|
key: "onMessage",
|
146
93
|
value: function onMessage(context, message) {
|
147
94
|
switch (message.getAction()) {
|
148
|
-
case SecuritySDKActionEnum.preInitSecurity:
|
149
|
-
this.preInitSecurity(context, message);
|
150
|
-
case SecuritySDKActionEnum.initSecurity:
|
151
|
-
this.initSecurity(context, message);
|
152
95
|
case SecuritySDKActionEnum.getSecurityDeviceId:
|
153
96
|
this.getSecurityDeviceId(context, message);
|
154
97
|
break;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import type { Logger } from '../../../util/logger';
|
2
|
+
import { BusContext, BusMessage, BusSubscriber } from '../index';
|
2
3
|
export declare class TrackerBusSubscriber extends BusSubscriber {
|
3
|
-
|
4
|
-
|
5
|
-
constructor(instanceId: string);
|
4
|
+
logger: Logger;
|
5
|
+
constructor(logger: Logger);
|
6
6
|
actionNames(): string[];
|
7
7
|
protected reportAnalytics(context: BusContext, message: BusMessage): Promise<void>;
|
8
8
|
onMessage(context: BusContext, message: BusMessage): void;
|
@@ -15,20 +15,17 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
15
15
|
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; }
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
17
17
|
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); }
|
18
|
-
import { BusSubscriber } from "../
|
18
|
+
import { BusSubscriber } from "../index";
|
19
19
|
import { TrackerActionEnum } from "../interface";
|
20
|
-
import { ServiceProvider } from "../../../../foundation/service";
|
21
20
|
export var TrackerBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
22
21
|
_inherits(TrackerBusSubscriber, _BusSubscriber);
|
23
22
|
var _super = _createSuper(TrackerBusSubscriber);
|
24
|
-
function TrackerBusSubscriber(
|
23
|
+
function TrackerBusSubscriber(logger) {
|
25
24
|
var _this;
|
26
25
|
_classCallCheck(this, TrackerBusSubscriber);
|
27
26
|
_this = _super.call(this);
|
28
|
-
_defineProperty(_assertThisInitialized(_this), "instanceId", void 0);
|
29
27
|
_defineProperty(_assertThisInitialized(_this), "logger", void 0);
|
30
|
-
_this.
|
31
|
-
_this.logger = ServiceProvider.getInstance(_this.instanceId).getService('Log');
|
28
|
+
_this.logger = logger;
|
32
29
|
return _this;
|
33
30
|
}
|
34
31
|
_createClass(TrackerBusSubscriber, [{
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Logger } from '../../util/logger';
|
1
2
|
/**
|
2
3
|
* Bus 埋点内容定义
|
3
4
|
*/
|
@@ -102,26 +103,23 @@ export interface BusInterceptor {
|
|
102
103
|
* 发送者 和 接收者的关系: 一对多,可能有,埋点多重上报?不需要callback,业务场景应该是一个广播场景
|
103
104
|
*/
|
104
105
|
export declare class BusManager {
|
105
|
-
private static interceptors;
|
106
|
-
private static subscribersMap;
|
107
106
|
private static TAG;
|
108
107
|
private static _logSplit;
|
109
|
-
private
|
110
|
-
private
|
111
|
-
private
|
112
|
-
|
113
|
-
debugTrace(enable: boolean): void;
|
114
|
-
private traceLog;
|
115
|
-
private traceError;
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
publishForResult(message: BusMessage, config?: {
|
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?: {
|
120
118
|
timeoutMs?: number;
|
121
119
|
fallback?: any;
|
122
120
|
}): Promise<BusMessage>;
|
123
|
-
publish(message: BusMessage, callback?: OnBusCallback): void;
|
124
|
-
subscribe(subscriber: BusSubscriber): void;
|
125
|
-
unsubscribe(subscriber: BusSubscriber): void;
|
126
|
-
isSubscribed(actionName: string): boolean;
|
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;
|
127
125
|
}
|