@alipay/ams-checkout 0.0.1763724075-dev.0 → 0.0.1763724075-dev.4

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 (130) hide show
  1. package/ams-checkout.js +1 -1
  2. package/dist/umd/ams-checkout.min.js +1 -1
  3. package/esm/constant/element.js +1 -1
  4. package/esm/index.js +0 -16
  5. package/package.json +1 -1
  6. package/LEGAL.md +0 -6
  7. package/LICENSE +0 -6
  8. package/README.md +0 -49
  9. package/esm/component/channel.d.ts +0 -21
  10. package/esm/component/component.inline.style.d.ts +0 -10
  11. package/esm/component/component.popup.style.d.ts +0 -26
  12. package/esm/component/popupWindow.style.d.ts +0 -24
  13. package/esm/config/index.d.ts +0 -16
  14. package/esm/config/request.d.ts +0 -21
  15. package/esm/constant/auto-debit.d.ts +0 -12
  16. package/esm/constant/easysafepay.d.ts +0 -16
  17. package/esm/constant/element.d.ts +0 -26
  18. package/esm/constant/index.d.ts +0 -344
  19. package/esm/core/bus/ability/callback.d.ts +0 -9
  20. package/esm/core/bus/ability/security.d.ts +0 -10
  21. package/esm/core/bus/ability/tracker.d.ts +0 -9
  22. package/esm/core/bus/index.d.ts +0 -125
  23. package/esm/core/bus/interface.d.ts +0 -36
  24. package/esm/core/component/address.d.ts +0 -8
  25. package/esm/core/component/appPreloadProcessing.d.ts +0 -1
  26. package/esm/core/component/ckp/index.d.ts +0 -29
  27. package/esm/core/component/element/EventCenter/index.d.ts +0 -31
  28. package/esm/core/component/element/elementContainerService/containerService.d.ts +0 -34
  29. package/esm/core/component/element/elementContainerService/index.d.ts +0 -20
  30. package/esm/core/component/element/elementController/index.d.ts +0 -48
  31. package/esm/core/component/element/elementProcessor/addressProcessor.d.ts +0 -20
  32. package/esm/core/component/element/elementProcessor/authProcessor.d.ts +0 -20
  33. package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +0 -41
  34. package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +0 -22
  35. package/esm/core/component/element/index.d.ts +0 -13
  36. package/esm/core/component/element/mock.d.ts +0 -10
  37. package/esm/core/component/element/type.d.ts +0 -443
  38. package/esm/core/component/element/util.d.ts +0 -85
  39. package/esm/core/component/index.d.ts +0 -58
  40. package/esm/core/drop-in/index.d.ts +0 -22
  41. package/esm/core/instance/index.d.ts +0 -89
  42. package/esm/foundation/core/index.d.ts +0 -36
  43. package/esm/foundation/index.d.ts +0 -97
  44. package/esm/foundation/product-processor/autoDebit/deps.d.ts +0 -14
  45. package/esm/foundation/product-processor/autoDebit/index.d.ts +0 -48
  46. package/esm/foundation/product-processor/easysafepay/deps.d.ts +0 -20
  47. package/esm/foundation/product-processor/easysafepay/index.d.ts +0 -29
  48. package/esm/foundation/product-processor/element/index.d.ts +0 -7
  49. package/esm/foundation/service/api-bus/ability/callback.d.ts +0 -9
  50. package/esm/foundation/service/api-bus/ability/globalData.d.ts +0 -10
  51. package/esm/foundation/service/api-bus/ability/request.d.ts +0 -10
  52. package/esm/foundation/service/api-bus/ability/security.d.ts +0 -12
  53. package/esm/foundation/service/api-bus/ability/tracker.d.ts +0 -9
  54. package/esm/foundation/service/api-bus/busManager.d.ts +0 -127
  55. package/esm/foundation/service/api-bus/index.d.ts +0 -20
  56. package/esm/foundation/service/api-bus/interface.d.ts +0 -48
  57. package/esm/foundation/service/container/index.d.ts +0 -42
  58. package/esm/foundation/service/container/popup.d.ts +0 -31
  59. package/esm/foundation/service/container/utils.d.ts +0 -7
  60. package/esm/foundation/service/event-center.d.ts +0 -82
  61. package/esm/foundation/service/global-data/index.d.ts +0 -11
  62. package/esm/foundation/service/index.d.ts +0 -19
  63. package/esm/foundation/service/log/index.d.ts +0 -43
  64. package/esm/foundation/service/log/keys.d.ts +0 -13
  65. package/esm/foundation/service/log/processor.d.ts +0 -9
  66. package/esm/foundation/service/log/types.d.ts +0 -33
  67. package/esm/foundation/service/requester/deps.d.ts +0 -17
  68. package/esm/foundation/service/requester/requester.d.ts +0 -22
  69. package/esm/foundation/service/security/index.d.ts +0 -28
  70. package/esm/foundation/service/security/security.d.ts +0 -33
  71. package/esm/foundation/utils/gray_scale_utils.d.ts +0 -7
  72. package/esm/foundation/utils/payment_context_utils.d.ts +0 -13
  73. package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
  74. package/esm/foundation/utils/preload_helper.d.ts +0 -21
  75. package/esm/foundation/utils/redirect_utils.d.ts +0 -11
  76. package/esm/foundation/utils/system_events.d.ts +0 -4
  77. package/esm/foundation/utils/web_app_url_utils.d.ts +0 -114
  78. package/esm/index.d.ts +0 -15
  79. package/esm/loader/Proxy.d.ts +0 -5
  80. package/esm/loader/constant.d.ts +0 -36
  81. package/esm/loader/index.d.ts +0 -20
  82. package/esm/loader/utils/common.d.ts +0 -13
  83. package/esm/loader/utils/debugger.d.ts +0 -7
  84. package/esm/loader/utils/loadSDK.d.ts +0 -8
  85. package/esm/loader/utils/logger.d.ts +0 -10
  86. package/esm/loader/utils/proxyPerformance.d.ts +0 -20
  87. package/esm/main.d.ts +0 -45
  88. package/esm/plugin/applepay/component.d.ts +0 -50
  89. package/esm/plugin/applepay/index.d.ts +0 -17
  90. package/esm/plugin/applepay/interface.d.ts +0 -161
  91. package/esm/plugin/applepay/service.d.ts +0 -54
  92. package/esm/plugin/component/cashierApp.d.ts +0 -38
  93. package/esm/plugin/component/channel.d.ts +0 -57
  94. package/esm/plugin/component/component.inline.style.d.ts +0 -10
  95. package/esm/plugin/component/component.popup.style.d.ts +0 -25
  96. package/esm/plugin/component/index.d.ts +0 -133
  97. package/esm/plugin/component/popupWindow.style.d.ts +0 -11
  98. package/esm/plugin/const.d.ts +0 -2
  99. package/esm/plugin/drop-in/index.d.ts +0 -71
  100. package/esm/plugin/payment-element/utils.d.ts +0 -2
  101. package/esm/plugin/paypal/index.d.ts +0 -20
  102. package/esm/plugin/type.d.ts +0 -34
  103. package/esm/plugin/utils.d.ts +0 -6
  104. package/esm/request/index.d.ts +0 -9
  105. package/esm/request/utils.d.ts +0 -28
  106. package/esm/service/index.d.ts +0 -13
  107. package/esm/types/index.d.ts +0 -854
  108. package/esm/util/createIframeNode.d.ts +0 -6
  109. package/esm/util/debug.d.ts +0 -1
  110. package/esm/util/get.d.ts +0 -25
  111. package/esm/util/getBackScheme.d.ts +0 -5
  112. package/esm/util/index.d.ts +0 -61
  113. package/esm/util/integrationType.d.ts +0 -21
  114. package/esm/util/intl-callapp/es/browser.d.ts +0 -21
  115. package/esm/util/intl-callapp/es/evoke.d.ts +0 -13
  116. package/esm/util/intl-callapp/es/generate.d.ts +0 -29
  117. package/esm/util/intl-callapp/es/index.d.ts +0 -43
  118. package/esm/util/intl-callapp/es/main.d.ts +0 -41
  119. package/esm/util/intl-callapp/es/openWallet.d.ts +0 -15
  120. package/esm/util/intl-callapp/es/types.d.ts +0 -46
  121. package/esm/util/intl-callapp/es/utils/config.d.ts +0 -24
  122. package/esm/util/intl-callapp/es/utils/index.d.ts +0 -15
  123. package/esm/util/logger.d.ts +0 -66
  124. package/esm/util/mock.d.ts +0 -1
  125. package/esm/util/redirect.d.ts +0 -6
  126. package/esm/util/security.d.ts +0 -34
  127. package/esm/util/spm-map.d.ts +0 -211
  128. package/esm/util/storage.d.ts +0 -2
  129. package/esm/util/upgrade.d.ts +0 -39
  130. package/esm/util/versionCompare.d.ts +0 -15
@@ -1,71 +0,0 @@
1
- import type AMSCheckout from '../../core/instance';
2
- import type { IcreatePaymentParams, EventPayload } from '../../types';
3
- export default class CheckoutApp {
4
- app: any;
5
- paymentMethodsResult: any;
6
- appDomain: string;
7
- AMSSDK: AMSCheckout;
8
- private _render;
9
- private _selector;
10
- private _version;
11
- constructor();
12
- /**
13
- * @description When SDK registers plug-ins, it is a required function to receive SDK instances
14
- */
15
- applyPlugin(AMSSDK: AMSCheckout): void;
16
- /**
17
- * @description Set the rendering capability of the cashier plug-in. Different technology stacks have some differences in the packaging and use of rendering functions
18
- */
19
- setRender(createIframeNode: any): void;
20
- /**
21
- * @description High order function of rendering capability
22
- */
23
- render(renderParams: IcreatePaymentParams): Promise<void>;
24
- /**
25
- * @description Cancel listening and destroy the dom
26
- */
27
- logoutPlugin(): void;
28
- /**
29
- * @description Create app
30
- */
31
- private _createApp;
32
- private _getIframeUrl;
33
- /**
34
- * @description Create iframe
35
- */
36
- private _createIframe;
37
- /**
38
- * @description Get iftame id
39
- */
40
- private _getIframeId;
41
- _listener(e: any): void;
42
- /**
43
- * @description Initialize subscription iframe message
44
- */
45
- _addEventListener(): void;
46
- _removeEventListener(): void;
47
- /**
48
- * @description Processing messages from iframe
49
- */
50
- _handleAppMessage(data: EventPayload): void;
51
- /**
52
- * @description Send message to SDK
53
- */
54
- _dispatchToSDK(data: EventPayload): void;
55
- /**
56
- * @description Send message to iframe
57
- */
58
- _dispatchToApp(data: EventPayload): void;
59
- /**
60
- * @description Subscribe to messages from SDK
61
- */
62
- _subscribeFromSDK(): void;
63
- /**
64
- * @description Send rendering events to iframe
65
- */
66
- _renderPaymentMethods(paymentResult: any): void;
67
- /**
68
- * @description Send the post submission processing event, and the cashier applies the consumption result
69
- */
70
- _handleRequestPayment(data: EventPayload): void;
71
- }
@@ -1,2 +0,0 @@
1
- import type { IpaymentSessionConfig } from '../../types';
2
- export declare const handlePaymentSessionConfig: (config: IpaymentSessionConfig) => Pick<IpaymentSessionConfig, 'productScene' | 'productSceneVersion'>;
@@ -1,20 +0,0 @@
1
- import { BusContext, BusMessage, BusSubscriber } from '../../core/bus';
2
- import { Logger } from '../../util/logger';
3
- export declare class PaypalBusSubscriber extends BusSubscriber {
4
- logger: Logger;
5
- constructor(logger: Logger);
6
- actionNames(): string[];
7
- private onEventCallback;
8
- protected renderPaypalButton(context: BusContext, message: BusMessage): Promise<never>;
9
- private appendPaypalLoading;
10
- private removePaypalLoading;
11
- private preCheck;
12
- private loadPaypalResource;
13
- private createPaypalScript;
14
- private onShippingChange;
15
- private createOrder;
16
- private onApprove;
17
- private onCancel;
18
- private destroyComponent;
19
- onMessage(context: BusContext, message: BusMessage): void;
20
- }
@@ -1,34 +0,0 @@
1
- import { BusSubscriber } from '../core/bus';
2
- import { PaymentMethodCategoryTypeEnum, ProductSceneEnum, ProductSceneVersion } from '../types';
3
- export type IExtendPlugin = IExtendPluginItem[];
4
- export interface ComponentActionNamesType {
5
- canMakePayments?: string;
6
- optional_init?: string;
7
- createComponent?: string;
8
- mountComponent?: string;
9
- submit?: string;
10
- destroyComponent?: string;
11
- getValue?: string;
12
- }
13
- export type IExtendPluginItem = {
14
- /**
15
- * 以下为sessionData匹配的场景
16
- */
17
- sessionMatcher?: {
18
- productScene: ProductSceneEnum;
19
- productSceneVersion: ProductSceneVersion;
20
- paymentMethodCategoryType: PaymentMethodCategoryTypeEnum;
21
- paymentMethodTypes: string[];
22
- };
23
- /**
24
- * 用于无sessionData场景,比如:canMakePayments
25
- */
26
- paymentChannelMatcher?: {
27
- paymentMethod: string;
28
- };
29
- /**
30
- * 以下plugin 实现的定义
31
- */
32
- busActionNames: ComponentActionNamesType;
33
- busSubscriber?: BusSubscriber;
34
- };
@@ -1,6 +0,0 @@
1
- export declare const appendLoadingIcon: (props: {
2
- htmlElement: HTMLElement;
3
- loadingWidth: string;
4
- loadingHeight: string;
5
- }) => void;
6
- export declare const isShowLoading: (showLoading?: boolean) => boolean;
@@ -1,9 +0,0 @@
1
- import { RequestConfig } from '../types';
2
- import type { Logger } from '../util/logger';
3
- /**
4
- *
5
- * @param requestData 请求参数
6
- * @param options 请求配置
7
- * @example request({ name: 'test' }, { operation-type: 'xxx.xxx.xxx' })
8
- */
9
- export declare function request<T>(requestData: Record<string, any> | undefined, options: RequestConfig, logger: Logger): Promise<T>;
@@ -1,28 +0,0 @@
1
- /**
2
- * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
3
- *
4
- * 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:
5
- * 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
6
- * 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.
7
- */
8
- import { errorEnum } from '../types';
9
- export declare const safeJson: (data: any, obj: any) => any;
10
- export declare const fomatGetwayError: (headers: Record<string, any>, traceId: string) => {
11
- success: boolean;
12
- traceId: string;
13
- errorCode: errorEnum;
14
- resultStatus: any;
15
- errorMessage?: undefined;
16
- result?: undefined;
17
- } | {
18
- success: boolean;
19
- traceId: string;
20
- errorCode: errorEnum;
21
- errorMessage: string;
22
- result: {
23
- resultStatus: any;
24
- tips: string;
25
- memo: string;
26
- };
27
- resultStatus: any;
28
- };
@@ -1,13 +0,0 @@
1
- import { ApplePayPaymentSessionRequest, ApplePayPaymentSessionResult, CashierSdkActionQueryRequest, CashierSdkActionQueryResult, CashierSubmitPayRequest, CashierSubmitPayResult, RequestConfig } from '../types';
2
- import type { Logger } from '../util/logger';
3
- export declare function queryPaymentInfo(params: CashierSdkActionQueryRequest, options: RequestConfig, logger: Logger): Promise<CashierSdkActionQueryResult>;
4
- export declare function antomConfig(options: RequestConfig, logger: Logger): Promise<any>;
5
- export declare function submitPayInfo(params: CashierSubmitPayRequest, options: RequestConfig, logger: Logger): Promise<CashierSubmitPayResult>;
6
- /**
7
- * Get merchant session by Apple Pay
8
- * @param paymentSessionData
9
- * @param params
10
- * @param options
11
- * @param logger
12
- */
13
- export declare function getApplePayPaymentSession(paymentSessionData: string, params: ApplePayPaymentSessionRequest, options: RequestConfig, logger: Logger): Promise<ApplePayPaymentSessionResult>;