@getopenpay/openpay-js 0.2.7 → 0.2.8

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/index.d.ts CHANGED
@@ -72,6 +72,10 @@ declare const CheckoutPaymentMethod = z.object({
72
72
 
73
73
  declare type CheckoutPaymentMethod = z.infer<typeof CheckoutPaymentMethod>;
74
74
 
75
+ declare type CommonSubmitSettings = {
76
+ defaultFieldValues?: DefaultFieldValues;
77
+ };
78
+
75
79
  export declare type Config = ElementsFormProps & AllCallbacks;
76
80
 
77
81
  declare type CurrentStatus<T> = InitialStatus | SuccessStatus<T> | ErrorStatus;
@@ -643,6 +647,12 @@ declare type PaymentRequestStatus = {
643
647
  startFlow: (params?: PaymentRequestStartParams) => Promise<void>;
644
648
  };
645
649
 
650
+ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMethod> = {
651
+ 'pockyt-paypal': { useRedirectFlow?: boolean };
652
+ 'airwallex-google-pay': AirwallexGooglePayFlowCustomParams;
653
+ 'airwallex-apple-pay': AirwallexApplePayFlowCustomParams;
654
+ }[T];
655
+
646
656
  declare type PRStatuses = Record<PaymentRequestProvider, PaymentRequestStatus>;
647
657
 
648
658
  declare type RegisteredElement = {
@@ -663,11 +673,8 @@ declare type StripeLinkController = {
663
673
 
664
674
  declare type SubmitMethod = 'pockyt-paypal' | 'airwallex-google-pay' | 'airwallex-apple-pay';
665
675
 
666
- declare type SubmitSettings<T extends SubmitMethod = SubmitMethod> = {
667
- 'pockyt-paypal': { defaultFieldValues?: DefaultFieldValues };
668
- 'airwallex-google-pay': AirwallexGooglePayFlowCustomParams;
669
- 'airwallex-apple-pay': AirwallexApplePayFlowCustomParams;
670
- }[T];
676
+ declare type SubmitSettings<T extends SubmitMethod = SubmitMethod> = ProcessorSpecificSubmitSettings<T> &
677
+ CommonSubmitSettings;
671
678
 
672
679
  declare type SuccessStatus<T> = {
673
680
  status: 'success';