@getopenpay/openpay-js 0.1.1-alpha.3 → 0.1.2

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
@@ -48,10 +48,7 @@ declare const CheckoutPaymentMethod: z.ZodObject<{
48
48
 
49
49
  declare type CheckoutPaymentMethod = z.infer<typeof CheckoutPaymentMethod>;
50
50
 
51
- export declare type Config = Omit<ElementsFormProps, 'children'> & {
52
- formTarget?: string;
53
- onPaymentRequestLoad?: (paymentRequests: Record<'apple_pay' | 'google_pay', PaymentRequestStatus>) => void;
54
- };
51
+ export declare type Config = ElementsFormProps;
55
52
 
56
53
  declare class ConnectionManager {
57
54
  private connections;
@@ -64,17 +61,9 @@ declare type ElementProps<PlaceholderType extends z.ZodTypeAny = z.ZodString> =
64
61
  styles?: ElementsStyle<z.ZodOptional<PlaceholderType>>;
65
62
  };
66
63
 
67
- declare type ElementsFormChildrenProps = {
68
- submit: () => void;
69
- applePay: PaymentRequestStatus;
70
- googlePay: PaymentRequestStatus;
71
- loaded: boolean;
72
- };
73
-
74
- declare type ElementsFormProps = {
64
+ export declare type ElementsFormProps = {
75
65
  className?: string;
76
66
  checkoutSecureToken: string;
77
- children: (props: ElementsFormChildrenProps) => JSX.Element;
78
67
  onFocus?: (elementId: string) => void;
79
68
  onBlur?: (elementId: string) => void;
80
69
  onChange?: (elementId: string) => void;
@@ -86,6 +75,8 @@ declare type ElementsFormProps = {
86
75
  onSetupPaymentMethodSuccess?: (paymentMethodId: string) => void;
87
76
  onCheckoutError?: (message: string) => void;
88
77
  baseUrl?: string;
78
+ formTarget?: string;
79
+ onPaymentRequestLoad?: (paymentRequests: Record<'apple_pay' | 'google_pay', PaymentRequestStatus>) => void;
89
80
  };
90
81
 
91
82
  declare const ElementsStyle: <T extends z.ZodTypeAny>(placeholderType: T) => z.ZodObject<z.objectUtil.extendShape<{
@@ -194,7 +185,10 @@ export declare class OpenPayForm {
194
185
  }
195
186
 
196
187
  declare type PaymentRequestStartParams = {
197
- amountToDisplayForSetupMode?: Amount;
188
+ overridePaymentRequest?: {
189
+ amount: Amount;
190
+ pending: boolean;
191
+ };
198
192
  };
199
193
 
200
194
  declare type PaymentRequestStatus = {