@alipay/ams-checkout 0.0.1725951289-dev.3 → 0.0.1726046231-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.
Files changed (123) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/constant/index.d.ts +6 -3
  3. package/esm/constant/index.js +8 -3
  4. package/esm/core/bus/ability/globalData.d.ts +10 -0
  5. package/esm/core/bus/ability/globalData.js +89 -0
  6. package/esm/core/bus/ability/request.d.ts +10 -0
  7. package/esm/core/bus/ability/request.js +151 -0
  8. package/esm/core/bus/interface.d.ts +12 -0
  9. package/esm/core/bus/interface.js +16 -2
  10. package/esm/core/component/address.d.ts +2 -2
  11. package/esm/core/component/appPreloadProcessing.js +2 -0
  12. package/esm/core/component/ckp/index.d.ts +3 -3
  13. package/esm/core/component/ckp/index.js +3 -3
  14. package/esm/core/component/element/components/address.d.ts +17 -0
  15. package/esm/core/component/element/components/address.js +63 -0
  16. package/esm/core/component/element/components/auth.d.ts +17 -0
  17. package/esm/core/component/element/components/auth.js +54 -0
  18. package/esm/core/component/element/components/payment.d.ts +17 -0
  19. package/esm/core/component/element/components/payment.js +67 -0
  20. package/esm/core/component/element/index.d.ts +44 -0
  21. package/esm/core/component/element/index.js +615 -0
  22. package/esm/core/component/element/mock.d.ts +3 -0
  23. package/esm/core/component/element/mock.js +1156 -0
  24. package/esm/core/component/element/type.d.ts +120 -0
  25. package/esm/core/component/element/type.js +14 -0
  26. package/esm/core/component/element/utils.d.ts +13 -0
  27. package/esm/core/component/element/utils.js +6 -0
  28. package/esm/core/component/index.d.ts +5 -5
  29. package/esm/core/component/index.js +20 -16
  30. package/esm/core/drop-in/index.d.ts +2 -2
  31. package/esm/core/drop-in/index.js +2 -2
  32. package/esm/core/instance/index.d.ts +5 -5
  33. package/esm/core/instance/index.js +11 -10
  34. package/esm/foundation/core/index.d.ts +26 -0
  35. package/esm/foundation/core/index.js +301 -0
  36. package/esm/foundation/index.d.ts +71 -0
  37. package/esm/foundation/index.js +42 -0
  38. package/esm/foundation/product-processor/easysafepay/deps.d.ts +15 -0
  39. package/esm/foundation/product-processor/easysafepay/deps.js +9 -0
  40. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  41. package/esm/foundation/product-processor/easysafepay/index.js +536 -0
  42. package/esm/foundation/service/container/index.d.ts +28 -0
  43. package/esm/foundation/service/container/index.js +255 -0
  44. package/esm/foundation/service/container/popup.d.ts +17 -0
  45. package/esm/foundation/service/container/popup.js +103 -0
  46. package/esm/foundation/service/container/utils.d.ts +7 -0
  47. package/esm/foundation/service/container/utils.js +48 -0
  48. package/esm/foundation/service/event-bus/ability/callback.d.ts +9 -0
  49. package/esm/foundation/service/event-bus/ability/callback.js +55 -0
  50. package/esm/foundation/service/event-bus/ability/globalData.d.ts +10 -0
  51. package/esm/foundation/service/event-bus/ability/globalData.js +89 -0
  52. package/esm/foundation/service/event-bus/ability/request.d.ts +10 -0
  53. package/esm/foundation/service/event-bus/ability/request.js +151 -0
  54. package/esm/foundation/service/event-bus/ability/security.d.ts +12 -0
  55. package/esm/foundation/service/event-bus/ability/security.js +151 -0
  56. package/esm/foundation/service/event-bus/ability/tracker.d.ts +9 -0
  57. package/esm/foundation/service/event-bus/ability/tracker.js +80 -0
  58. package/esm/foundation/service/event-bus/busManager.d.ts +127 -0
  59. package/esm/foundation/service/event-bus/busManager.js +398 -0
  60. package/esm/foundation/service/event-bus/index.d.ts +20 -0
  61. package/esm/foundation/service/event-bus/index.js +88 -0
  62. package/esm/foundation/service/event-center.d.ts +75 -0
  63. package/esm/foundation/service/event-center.js +244 -0
  64. package/esm/foundation/service/global-data/index.d.ts +11 -0
  65. package/esm/foundation/service/global-data/index.js +69 -0
  66. package/esm/foundation/service/index.d.ts +19 -0
  67. package/esm/foundation/service/index.js +82 -0
  68. package/esm/foundation/service/log/index.d.ts +43 -0
  69. package/esm/foundation/service/log/index.js +235 -0
  70. package/esm/foundation/service/log/types.d.ts +32 -0
  71. package/esm/foundation/service/log/types.js +1 -0
  72. package/esm/foundation/service/requester/deps.d.ts +17 -0
  73. package/esm/foundation/service/requester/deps.js +11 -0
  74. package/esm/foundation/service/requester/requester.d.ts +22 -0
  75. package/esm/foundation/service/requester/requester.js +211 -0
  76. package/esm/foundation/service/security/index.d.ts +26 -0
  77. package/esm/foundation/service/security/index.js +216 -0
  78. package/esm/{util → foundation/service/security}/security.d.ts +2 -2
  79. package/esm/{util → foundation/service/security}/security.js +3 -3
  80. package/esm/foundation/types/index.d.ts +4 -0
  81. package/esm/foundation/types/index.js +4 -0
  82. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  83. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  84. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  85. package/esm/foundation/utils/payment_context_utils.js +57 -0
  86. package/esm/foundation/utils/redirect_utils.d.ts +6 -0
  87. package/esm/foundation/utils/redirect_utils.js +99 -0
  88. package/esm/foundation/utils/system_events.d.ts +4 -0
  89. package/esm/foundation/utils/system_events.js +71 -0
  90. package/esm/foundation/utils/web_app_url_utils.d.ts +37 -0
  91. package/esm/foundation/utils/web_app_url_utils.js +97 -0
  92. package/esm/index.d.ts +16 -10
  93. package/esm/index.js +70 -59
  94. package/esm/plugin/applepay/component.js +3 -3
  95. package/esm/plugin/applepay/service.d.ts +2 -2
  96. package/esm/plugin/applepay/service.js +2 -2
  97. package/esm/plugin/component/cashierApp.d.ts +7 -5
  98. package/esm/plugin/component/cashierApp.js +16 -8
  99. package/esm/plugin/component/channel.d.ts +3 -4
  100. package/esm/plugin/component/channel.js +1 -37
  101. package/esm/plugin/component/component.inline.style.d.ts +4 -4
  102. package/esm/plugin/component/component.inline.style.js +10 -7
  103. package/esm/plugin/component/component.popup.style.d.ts +15 -6
  104. package/esm/plugin/component/component.popup.style.js +33 -15
  105. package/esm/plugin/component/index.d.ts +7 -7
  106. package/esm/plugin/component/index.js +123 -126
  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/payment-element/utils.d.ts +1 -1
  111. package/esm/plugin/payment-element/utils.js +2 -1
  112. package/esm/plugin/type.d.ts +4 -4
  113. package/esm/service/element.d.ts +4 -0
  114. package/esm/service/element.js +51 -0
  115. package/esm/service/index.d.ts +1 -0
  116. package/esm/service/index.js +2 -0
  117. package/esm/types/index.d.ts +257 -38
  118. package/esm/types/index.js +107 -59
  119. package/esm/util/createIframeNode.d.ts +2 -2
  120. package/esm/util/createIframeNode.js +3 -3
  121. package/esm/util/index.d.ts +1 -1
  122. package/esm/util/index.js +3 -4
  123. package/package.json +2 -1
@@ -5,6 +5,7 @@
5
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
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
7
  */
8
+ export * from '../core/component/element/type';
8
9
  export type onChange = () => onCnageResult;
9
10
  interface onCnageResult {
10
11
  complete: boolean;
@@ -19,7 +20,7 @@ interface AddressValueResult {
19
20
  /**
20
21
  * SDK options
21
22
  */
22
- export interface IoptionsParams {
23
+ export interface IOptionsParams {
23
24
  environment?: string;
24
25
  locale?: string;
25
26
  onError?: callOnError;
@@ -37,10 +38,10 @@ export interface IoptionsParams {
37
38
  product?: string;
38
39
  onBeforeSubmit?: callOnBeforeSubmit;
39
40
  }
40
- export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
41
+ export interface IApplePayOptionsParams extends Pick<IOptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
41
42
  }
42
43
  export type Iselector = string;
43
- export declare enum renderDisplayTypeEnum {
44
+ export declare enum DisplayTypeEnum {
44
45
  'popup' = "popup",
45
46
  'inline' = "inline"
46
47
  }
@@ -57,7 +58,7 @@ export declare enum ComponentSignEnumV2 {
57
58
  'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
58
59
  'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
59
60
  }
60
- export declare enum componentSignEnum {
61
+ export declare enum ComponentSignEnum {
61
62
  'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
62
63
  'EASY_PAY_APM' = "EASY_PAY_APM",
63
64
  'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
@@ -68,10 +69,9 @@ export declare enum componentSignEnum {
68
69
  'NONE' = "NONE",
69
70
  'VAULTING_CARD' = "VAULTING_CARD",
70
71
  'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
71
- 'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL",
72
- 'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
72
+ 'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
73
73
  }
74
- export declare enum productSceneEnum {
74
+ export declare enum ProductSceneEnum {
75
75
  'EASY_PAY' = "EASY_PAY",
76
76
  'CASHIER_PAYMENT' = "CASHIER_PAYMENT",
77
77
  'AUTO_DEBIT' = "AUTO_DEBIT",
@@ -83,7 +83,7 @@ export declare enum productSceneEnum {
83
83
  'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS",
84
84
  'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
85
85
  }
86
- export declare enum paymentMethodCategoryTypeEnum {
86
+ export declare enum PaymentMethodCategoryTypeEnum {
87
87
  'CARD' = "CARD",
88
88
  'WALLET' = "WALLET",
89
89
  'BANK' = "BANK",
@@ -92,14 +92,18 @@ export declare enum paymentMethodCategoryTypeEnum {
92
92
  }
93
93
  export interface DeviceIdParameter {
94
94
  scene?: string;
95
- productScene?: productSceneEnum;
96
- paymentMethodCategoryType?: paymentMethodCategoryTypeEnum;
95
+ productScene?: ProductSceneEnum;
96
+ paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
97
97
  tokenCollectTime?: string;
98
98
  dataPollingInterval?: string;
99
99
  }
100
100
  export interface IcreateComponent {
101
101
  sessionData: string;
102
102
  paymentSessionData?: string;
103
+ debugProps?: {
104
+ localLink: string;
105
+ };
106
+ appendAliasContainerId?: boolean;
103
107
  notRedirectAfterComplete?: boolean;
104
108
  appearance?: {
105
109
  [x: string]: any;
@@ -109,10 +113,13 @@ export interface IcreateComponent {
109
113
  merchantAppointParam?: IMerchantAppointParam;
110
114
  }
111
115
  export interface IappendIframeNodesParams extends IcreateComponent {
112
- paymentSessionMetaData: IpaymentSessionMetaData;
113
- renderDisplayType: renderDisplayTypeEnum;
116
+ paymentSessionMetaData: IPaymentSessionMetaData;
117
+ renderDisplayType: DisplayTypeEnum;
114
118
  selector?: Iselector;
115
119
  paypalConfiguration?: IPaypalConfiguration;
120
+ connectFactor?: {
121
+ enableConnect: boolean;
122
+ };
116
123
  /** 将address-element参数定义合入原参数定义 */
117
124
  configParams?: {
118
125
  hideFields?: string[];
@@ -196,8 +203,8 @@ export interface Isubmit {
196
203
  billingAddress?: IbillingAddress;
197
204
  }
198
205
  export interface IpaymentSessionConfig {
199
- productScene: productSceneEnum;
200
- paymentMethodCategoryType?: paymentMethodCategoryTypeEnum;
206
+ productScene: ProductSceneEnum;
207
+ paymentMethodCategoryType: PaymentMethodCategoryTypeEnum;
201
208
  productSceneVersion: string;
202
209
  }
203
210
  export interface IpaymentSecurityConfig {
@@ -215,14 +222,26 @@ export interface IsecurityConfig {
215
222
  h5gateway: string;
216
223
  }
217
224
  export interface InitSecurityConfig {
218
- product: productSceneEnum;
225
+ product: ProductSceneEnum;
219
226
  region?: string;
220
227
  }
221
228
  export interface frontModulesToBeLoadedInterface {
222
229
  acquirerName: string;
223
230
  scriptUrl: string;
224
231
  }
225
- export interface IpaymentSessionMetaData {
232
+ export interface PaymentSessionActionData {
233
+ amountConfirmRequired?: boolean;
234
+ autoDebitWithToken: boolean;
235
+ enableSignAgreement?: boolean;
236
+ skipSdkQuery: boolean;
237
+ requireFastSdk: boolean;
238
+ skipSdkQueryForm?: {
239
+ value: boolean;
240
+ version: string;
241
+ platform: string;
242
+ };
243
+ }
244
+ export interface IPaymentSessionMetaData {
226
245
  clientId?: string;
227
246
  renderDisplayType?: string;
228
247
  paymentSessionConfig?: IpaymentSessionConfig;
@@ -230,18 +249,7 @@ export interface IpaymentSessionMetaData {
230
249
  moneyView?: any;
231
250
  extendInfo?: string;
232
251
  paymentMethodInfoView?: any;
233
- action?: {
234
- amountConfirmRequired?: boolean;
235
- autoDebitWithToken: boolean;
236
- enableSignAgreement?: boolean;
237
- skipSdkQuery: boolean;
238
- requireFastSdk: boolean;
239
- skipSdkQueryForm?: {
240
- value: boolean;
241
- version: string;
242
- platform: string;
243
- };
244
- };
252
+ action?: PaymentSessionActionData;
245
253
  authUrlInfo?: {
246
254
  appIdentifier?: string;
247
255
  applinkUrl?: string;
@@ -312,6 +320,9 @@ export interface IpaymentSessionMetaData {
312
320
  };
313
321
  frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
314
322
  };
323
+ connectFactor?: {
324
+ enableConnect?: boolean;
325
+ };
315
326
  }
316
327
  export interface IPaymentSessionFactor {
317
328
  merchantInfo?: IMerchantInfo;
@@ -358,7 +369,7 @@ export declare enum networkModeEnum {
358
369
  export interface IcheckoutState {
359
370
  paymentMethodType?: string;
360
371
  }
361
- export declare enum environmentEnum {
372
+ export declare enum EnvironmentEnum {
362
373
  sandbox = "sandbox",
363
374
  prod = "prod",
364
375
  light_sandbox = "light_sandbox"
@@ -379,7 +390,7 @@ export interface Ienv {
379
390
  terminalType: terminalTypeEnum;
380
391
  environment: string;
381
392
  }
382
- export declare enum platformEnum {
393
+ export declare enum PlatformEnum {
383
394
  desktop = "desktop",
384
395
  mobile = "mobile"
385
396
  }
@@ -433,19 +444,19 @@ export type callOnBeforeSubmit = (state?: Record<string, any>) => Promise<onBefo
433
444
  * @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
434
445
  */
435
446
  export type callOnClose = () => void;
436
- export declare enum messageName {
447
+ export declare enum MessageName {
437
448
  SDK_TO_APP = "SDK_TO_APP",
438
449
  APP_TO_SDK = "APP_TO_SDK",
439
450
  APP_TO_APP = "APP_TO_APP"
440
451
  }
441
- export interface eventPayload {
442
- name: messageName;
452
+ export interface EventPayload {
453
+ name: MessageName;
443
454
  mode?: string;
444
455
  appId?: string;
445
456
  instanceId: string;
446
- context: eventPayloadContext;
457
+ context: EventPayloadContext;
447
458
  }
448
- export interface eventPayloadContext {
459
+ export interface EventPayloadContext {
449
460
  event: string;
450
461
  data: any;
451
462
  eventCallbackId?: string;
@@ -461,7 +472,7 @@ export interface AMSCheckoutOptions {
461
472
  export interface Ianalytics {
462
473
  enabled: boolean;
463
474
  }
464
- export declare enum targetEnum {
475
+ export declare enum TargetEnum {
465
476
  BLANK = "_blank",
466
477
  SELF = "_self",
467
478
  REPLACE = "_replace"
@@ -646,9 +657,218 @@ export declare enum ProductSceneVersion {
646
657
  V2 = "2.0"
647
658
  }
648
659
  export type IAppendParams = {
649
- componentSign: componentSignEnum;
660
+ componentSign: ComponentSignEnum;
650
661
  iframeNodesParams: IappendIframeNodesParams;
651
662
  };
663
+ export declare enum EventCallbackCode {
664
+ Failed = "Failed",
665
+ Completed = "Completed"
666
+ }
667
+ export interface IElementOptions {
668
+ sessionData: string;
669
+ environment?: string;
670
+ locale?: string;
671
+ mode?: string;
672
+ onEventCallback?: ({ code, message }: {
673
+ code: EventCallbackCode;
674
+ message: string;
675
+ }) => void;
676
+ loading?: {
677
+ onStartLoading: () => void;
678
+ onEndLoading: () => void;
679
+ };
680
+ }
681
+ export declare enum AccountStatusEnum {
682
+ EFFECTIVE = "EFFECTIVE",
683
+ UNREGISTERED = "UNREGISTERED"
684
+ }
685
+ export type IAccountInfo = {
686
+ email?: string;
687
+ verifyId?: string;
688
+ accountStatus?: AccountStatusEnum;
689
+ oneAccountId?: string;
690
+ needOtp?: boolean;
691
+ errorMsg?: string;
692
+ inputStatus?: 'success' | 'loading' | 'error' | 'focused' | '';
693
+ resendLeftTimes?: number;
694
+ };
695
+ export interface AccountQueryRequest {
696
+ paymentSessionData: string;
697
+ paymentSessionConfig: any;
698
+ accountInfo: IAccountInfo;
699
+ }
700
+ export interface ShippingsItem {
701
+ shippingName: {
702
+ firstName: string;
703
+ lastName: string;
704
+ };
705
+ prefer: '1' | '0';
706
+ shippingId: string;
707
+ shippingPhoneNo: string;
708
+ shippingAddress: {
709
+ region: string;
710
+ state: string;
711
+ city: string;
712
+ address1: string;
713
+ address2: string;
714
+ zipCode: string;
715
+ };
716
+ }
717
+ export interface ISubPaymentElementView {
718
+ defaultText: string;
719
+ defaultValue: string;
720
+ elementMandatory: boolean;
721
+ elementRegx?: string;
722
+ elementType: string;
723
+ extendInfo: string;
724
+ paramIllegalText: string;
725
+ paymentElementKey: string;
726
+ title: string;
727
+ validateFunction?: string;
728
+ isPart?: boolean;
729
+ isPartEnd?: boolean;
730
+ }
731
+ export interface IPaymentElement {
732
+ defaultValue: string;
733
+ elementMandatory: boolean;
734
+ elementType: string;
735
+ extendInfo: string;
736
+ paymentElementKey: string;
737
+ subPaymentElementView: ISubPaymentElementView[];
738
+ title: string;
739
+ }
740
+ export declare enum InterActionTypeEnum {
741
+ COLLECT_REDIRECT = "COLLECT_REDIRECT",
742
+ SHOW_CODE = "SHOW_CODE",
743
+ COLLECT_SHOW_CODE = "COLLECT_SHOW_CODE",
744
+ REDIRECT = "REDIRECT"
745
+ }
746
+ export interface IAmount {
747
+ amount?: string;
748
+ currency: string;
749
+ currencyLabel: string;
750
+ formattedAmount?: string;
751
+ formattedAmountWithCurrency?: string;
752
+ value: string;
753
+ }
754
+ export interface IAmountView {
755
+ currency: string;
756
+ currencyDivider: string;
757
+ currencyLabel: string;
758
+ currencySymbolPosition: 'L' | 'R';
759
+ formattedValue: string;
760
+ value: string;
761
+ }
762
+ export interface IPaymentMethod {
763
+ paymentMethodKey?: string;
764
+ antomPage?: string;
765
+ redirectUrl?: string;
766
+ icon?: string;
767
+ iconName?: string;
768
+ logoList?: Array<{
769
+ cardBrand: string;
770
+ logoUrl: string;
771
+ }>;
772
+ paymentMethod?: string;
773
+ paymentMethodName: string;
774
+ paymentMethodType: string;
775
+ category?: string;
776
+ paymentElements?: IPaymentElement[];
777
+ paymentMethodId?: string;
778
+ paymentMethodDetail?: {
779
+ last4?: string;
780
+ requireIssuerAuthentication?: string;
781
+ };
782
+ interActionType?: InterActionTypeEnum;
783
+ recommend?: boolean;
784
+ expressCheckout?: boolean;
785
+ webRedirectType?: string;
786
+ paymentCurrencyList?: string[];
787
+ paymentAmount?: IAmount;
788
+ paymentAmountView?: IAmountView;
789
+ paymentQuoteId?: string;
790
+ }
791
+ interface Estimate {
792
+ unit: string;
793
+ value: number;
794
+ }
795
+ interface DeliveryEstimate {
796
+ maximum: Estimate;
797
+ minimum: Estimate;
798
+ }
799
+ interface FixedAmount {
800
+ amount: number;
801
+ currency: string;
802
+ }
803
+ interface ShippingRateData {
804
+ displayName: string;
805
+ deliveryEstimate: DeliveryEstimate;
806
+ fixedAmount: FixedAmount;
807
+ }
808
+ export interface ShippingAddress {
809
+ address1: string;
810
+ address2: string;
811
+ city: string;
812
+ region: string;
813
+ state: string;
814
+ zipCode: string;
815
+ }
816
+ export interface IUserName {
817
+ firstName: string;
818
+ middleName?: string;
819
+ lastName: string;
820
+ fullName?: string;
821
+ }
822
+ export type Shippings = ShippingsItem[];
823
+ export type IPaymentMethods = IPaymentMethod[];
824
+ export interface CKPShipping {
825
+ shippingRateId?: string;
826
+ shippingRateData?: ShippingRateData;
827
+ shippingAddress: ShippingAddress;
828
+ shippingFee?: IAmount;
829
+ shippingFeeView?: IAmountView;
830
+ shippingDescription?: string;
831
+ deliveryEstimate?: DeliveryEstimate;
832
+ shippingFeeId?: string;
833
+ shippingName?: IUserName;
834
+ shippingPhoneNo?: string;
835
+ shipToEmail?: string;
836
+ notes?: string;
837
+ }
838
+ export interface AccountQueryResult {
839
+ accountInfo: IAccountInfo;
840
+ actionForm?: ActionForm;
841
+ paymentMethods: IPaymentMethods;
842
+ shippings: Shippings;
843
+ success: boolean;
844
+ errorCode?: string;
845
+ errorMessage?: string;
846
+ errorStatus?: string;
847
+ shippingInfo?: CKPShipping;
848
+ }
849
+ export declare enum ElementPaymentMethod {
850
+ CONTAINER_ELEMENT = "CONTAINER_ELEMENT",
851
+ AUTH_ELEMENT = "AUTH_ELEMENT",
852
+ ADDRESS_ELEMENT = "ADDRESS_ELEMENT",
853
+ PAYMENT_ELEMENT = "PAYMENT_ELEMENT"
854
+ }
855
+ export declare enum ElementPaymentEvent {
856
+ INITIAL_DATA_READY = "initialDataReady",
857
+ CAPTURE_ASSET = "onCaptureAsset",
858
+ SIGN_OUT = "onSignout",
859
+ BLUR = "onBlur",
860
+ VALIDATE = "validate",
861
+ SUBMIT_RISK = "onSubmitRisk",
862
+ AFTER_SUBMIT = "onAfterSubmit",
863
+ SIZE_CHANGE = "onSizeChange",
864
+ LAUNCH = "onLaunch",
865
+ CALLBACK = "callback"
866
+ }
867
+ export declare enum ConnectErrorCode {
868
+ RISK_REJECT = "RISK_REJECT",
869
+ USER_AUTH_VERIFICATION_FAILED = "USER_AUTH_VERIFICATION_FAILED",
870
+ USER_NOT_EXISTS = "USER_NOT_EXISTS"
871
+ }
652
872
  export interface IoptionsAddressParams {
653
873
  environment?: string;
654
874
  locale?: string;
@@ -659,4 +879,3 @@ export interface IoptionsAddressParams {
659
879
  };
660
880
  product?: string;
661
881
  }
662
- export {};
@@ -6,56 +6,56 @@
6
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
7
  */
8
8
  /* eslint-disable @typescript-eslint/no-explicit-any */
9
+ export * from "../core/component/element/type";
9
10
 
10
11
  /**
11
12
  * SDK options
12
13
  */
13
14
 
14
- export var renderDisplayTypeEnum = /*#__PURE__*/function (renderDisplayTypeEnum) {
15
- renderDisplayTypeEnum["popup"] = "popup";
16
- renderDisplayTypeEnum["inline"] = "inline";
17
- return renderDisplayTypeEnum;
15
+ export var DisplayTypeEnum = /*#__PURE__*/function (DisplayTypeEnum) {
16
+ DisplayTypeEnum["popup"] = "popup";
17
+ DisplayTypeEnum["inline"] = "inline";
18
+ return DisplayTypeEnum;
18
19
  }({});
19
20
  export var ComponentSignEnumV2 = /*#__PURE__*/function (ComponentSignEnumV2) {
20
21
  ComponentSignEnumV2["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
21
22
  ComponentSignEnumV2["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
22
23
  return ComponentSignEnumV2;
23
24
  }({});
24
- export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) {
25
- componentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET";
26
- componentSignEnum["EASY_PAY_APM"] = "EASY_PAY_APM";
27
- componentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD";
28
- componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
29
- componentSignEnum["CASHIER_PAYMENT_APM"] = "CASHIER_PAYMENT_APM";
30
- componentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET";
31
- componentSignEnum["AUTO_DEBIT_PAY_WALLET"] = "AUTO_DEBIT_PAY_WALLET";
32
- componentSignEnum["NONE"] = "NONE";
33
- componentSignEnum["VAULTING_CARD"] = "VAULTING_CARD";
34
- componentSignEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
35
- componentSignEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
36
- componentSignEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
37
- return componentSignEnum;
38
- }({});
39
- export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
40
- productSceneEnum["EASY_PAY"] = "EASY_PAY";
41
- productSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
42
- productSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
43
- productSceneEnum["AUTO_DEBIT_PAY"] = "AUTO_DEBIT_PAY";
44
- productSceneEnum["VAULTING"] = "VAULTING";
45
- productSceneEnum["FLASH_BUY"] = "FLASH_BUY";
46
- productSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
47
- productSceneEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT";
48
- productSceneEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS";
49
- productSceneEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
50
- return productSceneEnum;
51
- }({});
52
- export var paymentMethodCategoryTypeEnum = /*#__PURE__*/function (paymentMethodCategoryTypeEnum) {
53
- paymentMethodCategoryTypeEnum["CARD"] = "CARD";
54
- paymentMethodCategoryTypeEnum["WALLET"] = "WALLET";
55
- paymentMethodCategoryTypeEnum["BANK"] = "BANK";
56
- paymentMethodCategoryTypeEnum["APM"] = "APM";
57
- paymentMethodCategoryTypeEnum["ALL"] = "ALL";
58
- return paymentMethodCategoryTypeEnum;
25
+ export var ComponentSignEnum = /*#__PURE__*/function (ComponentSignEnum) {
26
+ ComponentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET";
27
+ ComponentSignEnum["EASY_PAY_APM"] = "EASY_PAY_APM";
28
+ ComponentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD";
29
+ ComponentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
30
+ ComponentSignEnum["CASHIER_PAYMENT_APM"] = "CASHIER_PAYMENT_APM";
31
+ ComponentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET";
32
+ ComponentSignEnum["AUTO_DEBIT_PAY_WALLET"] = "AUTO_DEBIT_PAY_WALLET";
33
+ ComponentSignEnum["NONE"] = "NONE";
34
+ ComponentSignEnum["VAULTING_CARD"] = "VAULTING_CARD";
35
+ ComponentSignEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
36
+ ComponentSignEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
37
+ return ComponentSignEnum;
38
+ }({}); // 'CHECKOUT_PAYMENT' = 'CHECKOUT_PAYMENT',
39
+ export var ProductSceneEnum = /*#__PURE__*/function (ProductSceneEnum) {
40
+ ProductSceneEnum["EASY_PAY"] = "EASY_PAY";
41
+ ProductSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
42
+ ProductSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
43
+ ProductSceneEnum["AUTO_DEBIT_PAY"] = "AUTO_DEBIT_PAY";
44
+ ProductSceneEnum["VAULTING"] = "VAULTING";
45
+ ProductSceneEnum["FLASH_BUY"] = "FLASH_BUY";
46
+ ProductSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
47
+ ProductSceneEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT";
48
+ ProductSceneEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS";
49
+ ProductSceneEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
50
+ return ProductSceneEnum;
51
+ }({});
52
+ export var PaymentMethodCategoryTypeEnum = /*#__PURE__*/function (PaymentMethodCategoryTypeEnum) {
53
+ PaymentMethodCategoryTypeEnum["CARD"] = "CARD";
54
+ PaymentMethodCategoryTypeEnum["WALLET"] = "WALLET";
55
+ PaymentMethodCategoryTypeEnum["BANK"] = "BANK";
56
+ PaymentMethodCategoryTypeEnum["APM"] = "APM";
57
+ PaymentMethodCategoryTypeEnum["ALL"] = "ALL";
58
+ return PaymentMethodCategoryTypeEnum;
59
59
  }({});
60
60
 
61
61
  /** 表单地址数据 */
@@ -88,11 +88,11 @@ export var networkModeEnum = /*#__PURE__*/function (networkModeEnum) {
88
88
  networkModeEnum["session"] = "session";
89
89
  return networkModeEnum;
90
90
  }({});
91
- export var environmentEnum = /*#__PURE__*/function (environmentEnum) {
92
- environmentEnum["sandbox"] = "sandbox";
93
- environmentEnum["prod"] = "prod";
94
- environmentEnum["light_sandbox"] = "light_sandbox";
95
- return environmentEnum;
91
+ export var EnvironmentEnum = /*#__PURE__*/function (EnvironmentEnum) {
92
+ EnvironmentEnum["sandbox"] = "sandbox";
93
+ EnvironmentEnum["prod"] = "prod";
94
+ EnvironmentEnum["light_sandbox"] = "light_sandbox";
95
+ return EnvironmentEnum;
96
96
  }({});
97
97
  export var osTypeEnum = /*#__PURE__*/function (osTypeEnum) {
98
98
  osTypeEnum["IOS"] = "IOS";
@@ -107,10 +107,10 @@ export var terminalTypeEnum = /*#__PURE__*/function (terminalTypeEnum) {
107
107
  terminalTypeEnum["MINI_APP"] = "MINI_APP";
108
108
  return terminalTypeEnum;
109
109
  }({});
110
- export var platformEnum = /*#__PURE__*/function (platformEnum) {
111
- platformEnum["desktop"] = "desktop";
112
- platformEnum["mobile"] = "mobile";
113
- return platformEnum;
110
+ export var PlatformEnum = /*#__PURE__*/function (PlatformEnum) {
111
+ PlatformEnum["desktop"] = "desktop";
112
+ PlatformEnum["mobile"] = "mobile";
113
+ return PlatformEnum;
114
114
  }({});
115
115
 
116
116
  /**
@@ -129,17 +129,17 @@ export var platformEnum = /*#__PURE__*/function (platformEnum) {
129
129
  * @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
130
130
  */
131
131
 
132
- export var messageName = /*#__PURE__*/function (messageName) {
133
- messageName["SDK_TO_APP"] = "SDK_TO_APP";
134
- messageName["APP_TO_SDK"] = "APP_TO_SDK";
135
- messageName["APP_TO_APP"] = "APP_TO_APP";
136
- return messageName;
137
- }({});
138
- export var targetEnum = /*#__PURE__*/function (targetEnum) {
139
- targetEnum["BLANK"] = "_blank";
140
- targetEnum["SELF"] = "_self";
141
- targetEnum["REPLACE"] = "_replace";
142
- return targetEnum;
132
+ export var MessageName = /*#__PURE__*/function (MessageName) {
133
+ MessageName["SDK_TO_APP"] = "SDK_TO_APP";
134
+ MessageName["APP_TO_SDK"] = "APP_TO_SDK";
135
+ MessageName["APP_TO_APP"] = "APP_TO_APP";
136
+ return MessageName;
137
+ }({});
138
+ export var TargetEnum = /*#__PURE__*/function (TargetEnum) {
139
+ TargetEnum["BLANK"] = "_blank";
140
+ TargetEnum["SELF"] = "_self";
141
+ TargetEnum["REPLACE"] = "_replace";
142
+ return TargetEnum;
143
143
  }({});
144
144
  export var errorEnum = /*#__PURE__*/function (errorEnum) {
145
145
  errorEnum["PARAMS"] = "PARAMS";
@@ -208,4 +208,52 @@ export var ProductSceneVersion = /*#__PURE__*/function (ProductSceneVersion) {
208
208
  ProductSceneVersion["V1"] = "1.0";
209
209
  ProductSceneVersion["V2"] = "2.0";
210
210
  return ProductSceneVersion;
211
+ }({});
212
+ export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
213
+ EventCallbackCode["Failed"] = "Failed";
214
+ EventCallbackCode["Completed"] = "Completed";
215
+ return EventCallbackCode;
216
+ }({});
217
+ export var AccountStatusEnum = /*#__PURE__*/function (AccountStatusEnum) {
218
+ AccountStatusEnum["EFFECTIVE"] = "EFFECTIVE";
219
+ AccountStatusEnum["UNREGISTERED"] = "UNREGISTERED";
220
+ return AccountStatusEnum;
221
+ }({});
222
+
223
+ // element 接口start
224
+
225
+ export var InterActionTypeEnum = /*#__PURE__*/function (InterActionTypeEnum) {
226
+ InterActionTypeEnum["COLLECT_REDIRECT"] = "COLLECT_REDIRECT";
227
+ InterActionTypeEnum["SHOW_CODE"] = "SHOW_CODE";
228
+ InterActionTypeEnum["COLLECT_SHOW_CODE"] = "COLLECT_SHOW_CODE";
229
+ InterActionTypeEnum["REDIRECT"] = "REDIRECT";
230
+ return InterActionTypeEnum;
231
+ }({});
232
+ // element 接口end
233
+
234
+ export var ElementPaymentMethod = /*#__PURE__*/function (ElementPaymentMethod) {
235
+ ElementPaymentMethod["CONTAINER_ELEMENT"] = "CONTAINER_ELEMENT";
236
+ ElementPaymentMethod["AUTH_ELEMENT"] = "AUTH_ELEMENT";
237
+ ElementPaymentMethod["ADDRESS_ELEMENT"] = "ADDRESS_ELEMENT";
238
+ ElementPaymentMethod["PAYMENT_ELEMENT"] = "PAYMENT_ELEMENT";
239
+ return ElementPaymentMethod;
240
+ }({});
241
+ export var ElementPaymentEvent = /*#__PURE__*/function (ElementPaymentEvent) {
242
+ ElementPaymentEvent["INITIAL_DATA_READY"] = "initialDataReady";
243
+ ElementPaymentEvent["CAPTURE_ASSET"] = "onCaptureAsset";
244
+ ElementPaymentEvent["SIGN_OUT"] = "onSignout";
245
+ ElementPaymentEvent["BLUR"] = "onBlur";
246
+ ElementPaymentEvent["VALIDATE"] = "validate";
247
+ ElementPaymentEvent["SUBMIT_RISK"] = "onSubmitRisk";
248
+ ElementPaymentEvent["AFTER_SUBMIT"] = "onAfterSubmit";
249
+ ElementPaymentEvent["SIZE_CHANGE"] = "onSizeChange";
250
+ ElementPaymentEvent["LAUNCH"] = "onLaunch";
251
+ ElementPaymentEvent["CALLBACK"] = "callback";
252
+ return ElementPaymentEvent;
253
+ }({});
254
+ export var ConnectErrorCode = /*#__PURE__*/function (ConnectErrorCode) {
255
+ ConnectErrorCode["RISK_REJECT"] = "RISK_REJECT";
256
+ ConnectErrorCode["USER_AUTH_VERIFICATION_FAILED"] = "USER_AUTH_VERIFICATION_FAILED";
257
+ ConnectErrorCode["USER_NOT_EXISTS"] = "USER_NOT_EXISTS";
258
+ return ConnectErrorCode;
211
259
  }({});
@@ -1,6 +1,6 @@
1
- import { Iselector, renderDisplayTypeEnum } from '../types';
1
+ import { Iselector, DisplayTypeEnum } from '../types';
2
2
  /**
3
3
  * @description context中需要包含app节点,用于插入selector中
4
4
  */
5
- export declare const createIframeNode: (context: any, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
5
+ export declare const createIframeNode: (context: any, selector: Iselector, renderDisplayType: DisplayTypeEnum) => Promise<void>;
6
6
  export declare const createPreloadIframeNode: (virtualPreloadIframe: any) => void;
@@ -7,7 +7,7 @@
7
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
8
8
  import { getType } from '.';
9
9
  import { ERRORMESSAGE, EVENT } from "../constant";
10
- import { messageName, renderDisplayTypeEnum } from "../types";
10
+ import { MessageName, DisplayTypeEnum } from "../types";
11
11
  /**
12
12
  * @description context中需要包含app节点,用于插入selector中
13
13
  */
@@ -24,7 +24,7 @@ export var createIframeNode = function createIframeNode(context, selector, rende
24
24
  };
25
25
  reject(error);
26
26
  context._dispatchToSDK({
27
- name: messageName.APP_TO_SDK,
27
+ name: MessageName.APP_TO_SDK,
28
28
  instanceId: context.AMSSDK._instanceId,
29
29
  context: {
30
30
  event: EVENT.error.name,
@@ -33,7 +33,7 @@ export var createIframeNode = function createIframeNode(context, selector, rende
33
33
  });
34
34
  return;
35
35
  }
36
- if (renderDisplayType === renderDisplayTypeEnum.popup) dorpinDom.innerHTML = '';
36
+ if (renderDisplayType === DisplayTypeEnum.popup) dorpinDom.innerHTML = '';
37
37
  if (context.app) {
38
38
  dorpinDom.appendChild(context.app);
39
39
  }