@getopenpay/openpay-js-react 0.1.21 → 0.2.1-alpha.129d519

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,16 @@ declare type CustomInitParams = {
72
72
  */
73
73
  doNotMountOnInit?: boolean;
74
74
  };
75
+
76
+ googlePay?: {
77
+ env: 'demo' | 'prod';
78
+ doNotMountOnInit?: boolean;
79
+ };
80
+
81
+ applePay?: {
82
+ env: 'demo' | 'prod';
83
+ doNotMountOnInit?: boolean;
84
+ };
75
85
  };
76
86
 
77
87
  export declare type DynamicPreview = {
@@ -101,6 +111,10 @@ export declare type ElementsFormChildrenProps = {
101
111
  applePay: PaymentRequestStatus;
102
112
  googlePay: PaymentRequestStatus;
103
113
  stripeLink: StripeLinkController | null;
114
+ airwallex: {
115
+ googlePay: InitGooglePayFlowResult | null;
116
+ applePay: InitApplePayFlowResult | null;
117
+ };
104
118
  loaded: boolean;
105
119
  preview: DynamicPreview;
106
120
  };
@@ -175,6 +189,24 @@ export declare enum FieldName {
175
189
  PROMOTION_CODE = 'promotionCode',
176
190
  }
177
191
 
192
+ declare type InitApplePayFlowResult =
193
+ | {
194
+ isAvailable: true;
195
+ startFlow: () => Promise<void>;
196
+ }
197
+ | {
198
+ isAvailable: false;
199
+ };
200
+
201
+ declare type InitGooglePayFlowResult =
202
+ | {
203
+ isAvailable: true;
204
+ startFlow: () => Promise<void>;
205
+ }
206
+ | {
207
+ isAvailable: false;
208
+ };
209
+
178
210
  declare type OnCheckoutError = (message: string) => void;
179
211
 
180
212
  declare type OnCheckoutStarted = () => void;
@@ -211,7 +243,7 @@ declare type StripeLinkController = {
211
243
  waitForButtonToMount: () => Promise<HTMLElement>;
212
244
  };
213
245
 
214
- declare type SubmitMethod = 'pockyt-paypal';
246
+ declare type SubmitMethod = 'pockyt-paypal' | 'airwallex-google-pay' | 'airwallex-apple-pay';
215
247
 
216
248
  export declare const useOpenPayElements: () => ElementsContextValue;
217
249