@bunnyapp/components 1.6.0-beta.19 → 1.6.0-beta.20
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/cjs/index.js +1529 -1321
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/CreditCard.d.ts +17 -13
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +27 -0
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/components/CardImage.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/index.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayForm.d.ts +1 -6
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -4
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +7 -16
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +5 -6
- package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -6
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -4
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/useSave.d.ts +4 -5
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodSelector.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/context/CustomCheckoutFunctionContext.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/context/OverrideTokenContext.d.ts +4 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +31 -0
- package/dist/cjs/types/src/components/PaymentForm/context/SelectedPaymentPluginContext.d.ts +6 -0
- package/dist/cjs/types/src/components/PaymentForm/context/SelectedPluginProvider.d.ts +16 -0
- package/dist/cjs/types/src/components/PaymentForm/context/ShowPaymentDetailsContext.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +10 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/useAutoSetDefaultPaymentMethod.d.ts +2 -5
- package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +24 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +6 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/useSetDefaultPaymentMethod.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +3 -4
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuantityInput.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +1 -1
- package/dist/cjs/types/src/graphql/queries/getCurrentUserData.d.ts +11 -7
- package/dist/cjs/types/src/hooks/useCurrentUserData.d.ts +11 -7
- package/dist/cjs/types/src/hooks/useIsMobile.d.ts +9 -0
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +47 -6
- package/dist/cjs/types/src/hooks/usePaymentPlugins.d.ts +13 -27
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +1 -0
- package/dist/cjs/types/src/utils/apiUtils/invokePlugin.d.ts +10 -0
- package/dist/esm/index.js +1549 -1341
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/CreditCard.d.ts +17 -13
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +27 -0
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/components/CardImage.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/index.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayForm.d.ts +1 -6
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -4
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +7 -16
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +5 -6
- package/dist/esm/types/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -6
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -4
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/useSave.d.ts +4 -5
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodSelector.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/context/CustomCheckoutFunctionContext.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/context/OverrideTokenContext.d.ts +4 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +31 -0
- package/dist/esm/types/src/components/PaymentForm/context/SelectedPaymentPluginContext.d.ts +6 -0
- package/dist/esm/types/src/components/PaymentForm/context/SelectedPluginProvider.d.ts +16 -0
- package/dist/esm/types/src/components/PaymentForm/context/ShowPaymentDetailsContext.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +10 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/useAutoSetDefaultPaymentMethod.d.ts +2 -5
- package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +24 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +6 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/useSetDefaultPaymentMethod.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +3 -4
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuantityInput.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +1 -1
- package/dist/esm/types/src/graphql/queries/getCurrentUserData.d.ts +11 -7
- package/dist/esm/types/src/hooks/useCurrentUserData.d.ts +11 -7
- package/dist/esm/types/src/hooks/useIsMobile.d.ts +9 -0
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +47 -6
- package/dist/esm/types/src/hooks/usePaymentPlugins.d.ts +13 -27
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +1 -0
- package/dist/esm/types/src/utils/apiUtils/invokePlugin.d.ts +10 -0
- package/dist/index.d.ts +26 -9
- package/package.json +1 -1
- package/dist/cjs/types/src/components/PaymentForm/CheckoutFooter.d.ts +0 -13
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/LargCardIcon.d.ts +0 -2
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/PlusIcon.d.ts +0 -4
- package/dist/cjs/types/src/components/PaymentForm/PaymentMethodDetails.d.ts +0 -7
- package/dist/cjs/types/src/components/PaymentForm/PaymentMethodSelector.d.ts +0 -7
- package/dist/cjs/types/src/components/PaymentForm/SavePaymentMethodFooter.d.ts +0 -6
- package/dist/cjs/types/src/components/PaymentForm/Stripe/PaymentMethodForm.d.ts +0 -7
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentMethodSelectorPlugin.d.ts +0 -10
- package/dist/cjs/types/src/components/PaymentForm/useRemovePaymentMethod.d.ts +0 -3
- package/dist/cjs/types/src/components/PaymentForm/useSetDefaultPaymentMethod.d.ts +0 -6
- package/dist/cjs/types/src/contexts/PaymentContext.d.ts +0 -10
- package/dist/esm/types/src/components/PaymentForm/CheckoutFooter.d.ts +0 -13
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/LargCardIcon.d.ts +0 -2
- package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/PlusIcon.d.ts +0 -4
- package/dist/esm/types/src/components/PaymentForm/PaymentMethodDetails.d.ts +0 -7
- package/dist/esm/types/src/components/PaymentForm/PaymentMethodSelector.d.ts +0 -7
- package/dist/esm/types/src/components/PaymentForm/SavePaymentMethodFooter.d.ts +0 -6
- package/dist/esm/types/src/components/PaymentForm/Stripe/PaymentMethodForm.d.ts +0 -7
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentMethodSelectorPlugin.d.ts +0 -10
- package/dist/esm/types/src/components/PaymentForm/useRemovePaymentMethod.d.ts +0 -3
- package/dist/esm/types/src/components/PaymentForm/useSetDefaultPaymentMethod.d.ts +0 -6
- package/dist/esm/types/src/contexts/PaymentContext.d.ts +0 -10
- /package/dist/cjs/types/src/components/PaymentForm/{CouponEditor.d.ts → components/CouponEditor.d.ts} +0 -0
- /package/dist/cjs/types/src/components/PaymentForm/{PaymentFormTypes.d.ts → types/PaymentFormTypes.d.ts} +0 -0
- /package/dist/cjs/types/src/utils/{apiUtils.d.ts → apiUtils/apiUtils.d.ts} +0 -0
- /package/dist/esm/types/src/components/PaymentForm/{CouponEditor.d.ts → components/CouponEditor.d.ts} +0 -0
- /package/dist/esm/types/src/components/PaymentForm/{PaymentFormTypes.d.ts → types/PaymentFormTypes.d.ts} +0 -0
- /package/dist/esm/types/src/utils/{apiUtils.d.ts → apiUtils/apiUtils.d.ts} +0 -0
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
scenarios: string[];
|
|
15
|
-
}[];
|
|
16
|
-
backend: {
|
|
17
|
-
name: string;
|
|
18
|
-
access: string[];
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare const usePaymentPlugins: ({ apiHost, token, accountId, }: {
|
|
23
|
-
apiHost: string;
|
|
24
|
-
token?: string;
|
|
25
|
-
accountId?: string;
|
|
26
|
-
}) => {
|
|
27
|
-
paymentPlugins: PaymentPlugin[];
|
|
1
|
+
export declare const usePaymentPlugins: (accountId: string | undefined) => {
|
|
2
|
+
paymentPlugins: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
entities: string[];
|
|
5
|
+
guid: string;
|
|
6
|
+
hidden: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
status: string;
|
|
10
|
+
type: string;
|
|
11
|
+
webhookEnabled: boolean;
|
|
12
|
+
components: unknown;
|
|
13
|
+
}[];
|
|
28
14
|
isFetched: boolean;
|
|
29
15
|
};
|
|
30
16
|
export default usePaymentPlugins;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
export declare const invokePlugin: ({ method, payload, plugin, token, apiHost, componentsVersion, }: {
|
|
3
|
+
method: string;
|
|
4
|
+
payload?: Record<string, any>;
|
|
5
|
+
plugin: PluginData;
|
|
6
|
+
token?: string;
|
|
7
|
+
apiHost: string;
|
|
8
|
+
componentsVersion?: string;
|
|
9
|
+
}) => Promise<any>;
|
|
10
|
+
export default invokePlugin;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { FormattedInvoice, FormattedQuote, Transaction, Invoice as Invoice$1, Quote as Quote$1,
|
|
2
|
+
import { FormattedInvoice, FormattedQuote, Transaction, Invoice as Invoice$1, Quote as Quote$1, TransactionKind, Subscription } from '@bunnyapp/common';
|
|
3
3
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { ThemeConfig } from 'antd';
|
|
5
5
|
import react from 'react';
|
|
6
|
+
import * as gql_tada from 'gql.tada';
|
|
7
|
+
import { FragmentOf } from 'gql.tada';
|
|
6
8
|
|
|
7
9
|
type ShadowType = "shadow-none" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl";
|
|
8
10
|
|
|
@@ -74,23 +76,22 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
|
|
|
74
76
|
noQuotesMessage?: string;
|
|
75
77
|
}): react_jsx_runtime.JSX.Element;
|
|
76
78
|
|
|
77
|
-
declare
|
|
79
|
+
declare function PaymentForm({ invoice, quote, onPaymentSuccess, onPaymentHoldSuccess, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
|
|
78
80
|
invoice?: FormattedInvoice | Invoice$1;
|
|
79
81
|
quote?: Quote$1;
|
|
80
|
-
|
|
81
|
-
onPaymentSuccess?: () => void;
|
|
82
|
+
onPaymentSuccess?: (response: any) => void;
|
|
82
83
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
83
84
|
onSavePaymentMethod?: (response: any) => void;
|
|
84
85
|
onRemovePaymentMethod?: () => void;
|
|
85
86
|
onSetDefaultPaymentMethod?: () => void;
|
|
86
87
|
accountId?: string;
|
|
87
88
|
overrideToken?: string;
|
|
88
|
-
customCheckoutFunction?: (
|
|
89
|
+
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
89
90
|
paymentHoldOptions?: {
|
|
90
91
|
payToAccept?: boolean;
|
|
91
92
|
amountToHold?: number;
|
|
92
93
|
};
|
|
93
|
-
})
|
|
94
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
94
95
|
|
|
95
96
|
declare function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, defaultFirstName, defaultLastName, defaultEmail, defaultCompanyName, defaultBillingCountry, }: {
|
|
96
97
|
/** The company name to display on the signup page */
|
|
@@ -221,15 +222,31 @@ declare const Footer: ({ className }: {
|
|
|
221
222
|
className?: string;
|
|
222
223
|
}) => react_jsx_runtime.JSX.Element;
|
|
223
224
|
|
|
224
|
-
declare const
|
|
225
|
+
declare const MiniCreditCard_PaymentMethodFragment: gql_tada.TadaDocumentNode<{
|
|
226
|
+
[$tada.fragmentRefs]: {
|
|
227
|
+
CardImage_PaymentMethodFragment: "PaymentMethod";
|
|
228
|
+
};
|
|
229
|
+
isDefault: boolean | null;
|
|
230
|
+
metadata: {
|
|
231
|
+
issuer: string | null;
|
|
232
|
+
type: string | null;
|
|
233
|
+
identifier: string | null;
|
|
234
|
+
} | null;
|
|
235
|
+
id: string;
|
|
236
|
+
}, {}, {
|
|
237
|
+
fragment: "MiniCreditCard_PaymentMethodFragment";
|
|
238
|
+
on: "PaymentMethod";
|
|
239
|
+
masked: true;
|
|
240
|
+
}>;
|
|
241
|
+
declare function MiniCreditCard({ className, buttons, hideDropdownMenu, hideDefaultTag, onClickRemove, paymentMethod: maskedPaymentMethod, onClickSetDefault, id, }: {
|
|
225
242
|
className?: string;
|
|
226
243
|
buttons?: React.ReactNode;
|
|
227
244
|
hideDropdownMenu?: boolean;
|
|
228
245
|
hideDefaultTag?: boolean;
|
|
229
246
|
onClickRemove?: () => void;
|
|
230
|
-
|
|
247
|
+
paymentMethod?: FragmentOf<typeof MiniCreditCard_PaymentMethodFragment>;
|
|
231
248
|
onClickSetDefault?: () => void;
|
|
232
249
|
id?: string;
|
|
233
|
-
})
|
|
250
|
+
}): react_jsx_runtime.JSX.Element;
|
|
234
251
|
|
|
235
252
|
export { BillingDetails, BunnyProvider, Footer, Invoice, MiniCreditCard, PaymentForm, Quote, Quotes, Signup, SubscriptionsWrapper as Subscriptions, Transactions, UpgradeWrapper as Upgrade };
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
|
-
declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
|
|
3
|
-
quote?: Quote;
|
|
4
|
-
invoice?: FormattedInvoice | Invoice;
|
|
5
|
-
onPaymentSuccess?: (response: any) => void;
|
|
6
|
-
onPaymentHoldSuccess?: (response: any) => void;
|
|
7
|
-
plugin: PluginData | undefined;
|
|
8
|
-
paymentHoldOptions?: {
|
|
9
|
-
payToAccept?: boolean;
|
|
10
|
-
amountToHold?: number;
|
|
11
|
-
};
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export default CheckoutFooter;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodDetails: ({ onFail, plugin, onSavePaymentMethod, }: {
|
|
3
|
-
onFail: (error: any) => void;
|
|
4
|
-
plugin: PluginData;
|
|
5
|
-
onSavePaymentMethod: (response: any) => void;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodDetails;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodSelector: ({ paymentMethodAllowedPlugins, onSelect, value, }: {
|
|
3
|
-
onSelect: (paymentPlugin?: PluginData) => void;
|
|
4
|
-
paymentMethodAllowedPlugins?: PluginData[];
|
|
5
|
-
value?: PluginData | null;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodSelector;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodForm: ({ plugin, onFail, onSavePaymentMethod, }: {
|
|
3
|
-
plugin: PluginData;
|
|
4
|
-
onFail: (error: any) => void;
|
|
5
|
-
onSavePaymentMethod: (response: any) => void;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodForm;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PaymentMethod, PluginData } from "@bunnyapp/common";
|
|
2
|
-
declare const usePaymentMethodSelectorPlugin: ({ defaultPaymentMethod, defaultPaymentMethodPlugin, paymentMethodAllowedPlugins, }: {
|
|
3
|
-
defaultPaymentMethod: PaymentMethod | undefined;
|
|
4
|
-
defaultPaymentMethodPlugin: PluginData | undefined;
|
|
5
|
-
paymentMethodAllowedPlugins: PluginData[] | undefined;
|
|
6
|
-
}) => {
|
|
7
|
-
selectorPaymentMethodPlugin: PluginData | undefined;
|
|
8
|
-
setSelectorPaymentMethodPlugin: import("react").Dispatch<import("react").SetStateAction<PluginData | undefined>>;
|
|
9
|
-
};
|
|
10
|
-
export default usePaymentMethodSelectorPlugin;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare function useRemovePaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onRemovePaymentMethod?: () => void, onError?: (message: string) => void): (data: any) => Promise<void>;
|
|
3
|
-
export default useRemovePaymentMethod;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare function useSetDefaultPaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onError?: (message: string) => void, onSuccess?: () => void): {
|
|
3
|
-
setDefaultPaymentMethod: (data: any) => Promise<void>;
|
|
4
|
-
loading: boolean;
|
|
5
|
-
};
|
|
6
|
-
export default useSetDefaultPaymentMethod;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PaymentMethod, PluginData } from '@bunnyapp/common';
|
|
2
|
-
export type PaymentContextValues = {
|
|
3
|
-
onClickCancel?: () => void;
|
|
4
|
-
accountId?: string;
|
|
5
|
-
overrideToken?: string;
|
|
6
|
-
storedPaymentMethods?: PaymentMethod[];
|
|
7
|
-
defaultPaymentMethod?: PaymentMethod;
|
|
8
|
-
customCheckoutFunction?: (plugin: PluginData | undefined) => Promise<any>;
|
|
9
|
-
};
|
|
10
|
-
export declare const PaymentContext: import("react").Context<PaymentContextValues>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
|
-
declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
|
|
3
|
-
quote?: Quote;
|
|
4
|
-
invoice?: FormattedInvoice | Invoice;
|
|
5
|
-
onPaymentSuccess?: (response: any) => void;
|
|
6
|
-
onPaymentHoldSuccess?: (response: any) => void;
|
|
7
|
-
plugin: PluginData | undefined;
|
|
8
|
-
paymentHoldOptions?: {
|
|
9
|
-
payToAccept?: boolean;
|
|
10
|
-
amountToHold?: number;
|
|
11
|
-
};
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export default CheckoutFooter;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodDetails: ({ onFail, plugin, onSavePaymentMethod, }: {
|
|
3
|
-
onFail: (error: any) => void;
|
|
4
|
-
plugin: PluginData;
|
|
5
|
-
onSavePaymentMethod: (response: any) => void;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodDetails;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodSelector: ({ paymentMethodAllowedPlugins, onSelect, value, }: {
|
|
3
|
-
onSelect: (paymentPlugin?: PluginData) => void;
|
|
4
|
-
paymentMethodAllowedPlugins?: PluginData[];
|
|
5
|
-
value?: PluginData | null;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodSelector;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare const PaymentMethodForm: ({ plugin, onFail, onSavePaymentMethod, }: {
|
|
3
|
-
plugin: PluginData;
|
|
4
|
-
onFail: (error: any) => void;
|
|
5
|
-
onSavePaymentMethod: (response: any) => void;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default PaymentMethodForm;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PaymentMethod, PluginData } from "@bunnyapp/common";
|
|
2
|
-
declare const usePaymentMethodSelectorPlugin: ({ defaultPaymentMethod, defaultPaymentMethodPlugin, paymentMethodAllowedPlugins, }: {
|
|
3
|
-
defaultPaymentMethod: PaymentMethod | undefined;
|
|
4
|
-
defaultPaymentMethodPlugin: PluginData | undefined;
|
|
5
|
-
paymentMethodAllowedPlugins: PluginData[] | undefined;
|
|
6
|
-
}) => {
|
|
7
|
-
selectorPaymentMethodPlugin: PluginData | undefined;
|
|
8
|
-
setSelectorPaymentMethodPlugin: import("react").Dispatch<import("react").SetStateAction<PluginData | undefined>>;
|
|
9
|
-
};
|
|
10
|
-
export default usePaymentMethodSelectorPlugin;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare function useRemovePaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onRemovePaymentMethod?: () => void, onError?: (message: string) => void): (data: any) => Promise<void>;
|
|
3
|
-
export default useRemovePaymentMethod;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PluginData } from '@bunnyapp/common';
|
|
2
|
-
declare function useSetDefaultPaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onError?: (message: string) => void, onSuccess?: () => void): {
|
|
3
|
-
setDefaultPaymentMethod: (data: any) => Promise<void>;
|
|
4
|
-
loading: boolean;
|
|
5
|
-
};
|
|
6
|
-
export default useSetDefaultPaymentMethod;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PaymentMethod, PluginData } from '@bunnyapp/common';
|
|
2
|
-
export type PaymentContextValues = {
|
|
3
|
-
onClickCancel?: () => void;
|
|
4
|
-
accountId?: string;
|
|
5
|
-
overrideToken?: string;
|
|
6
|
-
storedPaymentMethods?: PaymentMethod[];
|
|
7
|
-
defaultPaymentMethod?: PaymentMethod;
|
|
8
|
-
customCheckoutFunction?: (plugin: PluginData | undefined) => Promise<any>;
|
|
9
|
-
};
|
|
10
|
-
export declare const PaymentContext: import("react").Context<PaymentContextValues>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|