@bunnyapp/components 1.0.54 → 1.0.56

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 (50) hide show
  1. package/dist/cjs/index.js +43 -32
  2. package/dist/cjs/src/components/BunnyProvider.d.ts +2 -2
  3. package/dist/cjs/src/components/Checkout/Checkout.d.ts +1 -1
  4. package/dist/cjs/src/components/Checkout/QuoteCheckout.d.ts +1 -1
  5. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +2 -1
  6. package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -1
  7. package/dist/cjs/src/components/PaymentForm/useRemovePaymentMethod.d.ts +1 -1
  8. package/dist/cjs/src/components/Quote/Quote.stories.d.ts +10 -10
  9. package/dist/cjs/src/components/Subscriptions/SubscriptionRequests.d.ts +2 -2
  10. package/dist/cjs/src/graphql/QuoteRequests.d.ts +3 -3
  11. package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +1 -1
  12. package/dist/cjs/src/graphql/mutations/quoteCompose.d.ts +1 -1
  13. package/dist/cjs/src/graphql/mutations/quoteRecalculateTaxes.d.ts +2 -2
  14. package/dist/cjs/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -1
  15. package/dist/cjs/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +2 -2
  16. package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -1
  17. package/dist/cjs/src/hooks/quotes/useSigningComplete.d.ts +1 -1
  18. package/dist/cjs/src/hooks/useHasTaxPlugin.d.ts +1 -1
  19. package/dist/cjs/src/hooks/usePaymentMethod.d.ts +1 -1
  20. package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +1 -1
  21. package/dist/cjs/src/hooks/usePlugins.d.ts +2 -2
  22. package/dist/cjs/src/hooks/useSigningPlugins.d.ts +1 -1
  23. package/dist/cjs/src/hooks/useToken.d.ts +1 -1
  24. package/dist/cjs/src/utils/apiUtils.d.ts +1 -1
  25. package/dist/esm/index.js +43 -32
  26. package/dist/esm/src/components/BunnyProvider.d.ts +2 -2
  27. package/dist/esm/src/components/Checkout/Checkout.d.ts +1 -1
  28. package/dist/esm/src/components/Checkout/QuoteCheckout.d.ts +1 -1
  29. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +2 -1
  30. package/dist/esm/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -1
  31. package/dist/esm/src/components/PaymentForm/useRemovePaymentMethod.d.ts +1 -1
  32. package/dist/esm/src/components/Quote/Quote.stories.d.ts +10 -10
  33. package/dist/esm/src/components/Subscriptions/SubscriptionRequests.d.ts +2 -2
  34. package/dist/esm/src/graphql/QuoteRequests.d.ts +3 -3
  35. package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +1 -1
  36. package/dist/esm/src/graphql/mutations/quoteCompose.d.ts +1 -1
  37. package/dist/esm/src/graphql/mutations/quoteRecalculateTaxes.d.ts +2 -2
  38. package/dist/esm/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -1
  39. package/dist/esm/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +2 -2
  40. package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -1
  41. package/dist/esm/src/hooks/quotes/useSigningComplete.d.ts +1 -1
  42. package/dist/esm/src/hooks/useHasTaxPlugin.d.ts +1 -1
  43. package/dist/esm/src/hooks/usePaymentMethod.d.ts +1 -1
  44. package/dist/esm/src/hooks/usePaymentPlugins.d.ts +1 -1
  45. package/dist/esm/src/hooks/usePlugins.d.ts +2 -2
  46. package/dist/esm/src/hooks/useSigningPlugins.d.ts +1 -1
  47. package/dist/esm/src/hooks/useToken.d.ts +1 -1
  48. package/dist/esm/src/utils/apiUtils.d.ts +1 -1
  49. package/dist/index.d.ts +3 -2
  50. package/package.json +1 -1
@@ -3,7 +3,7 @@ declare const useSendAcceptQuote: ({ onTokenExpired, quoteId, apiHost, token, }:
3
3
  onTokenExpired?: (() => void) | undefined;
4
4
  quoteId?: string | undefined;
5
5
  apiHost: string;
6
- token: string;
6
+ token?: string | undefined;
7
7
  }) => {
8
8
  acceptBoxVisible: boolean;
9
9
  isAccepting: boolean;
@@ -1,5 +1,5 @@
1
1
  declare const useSigningComplete: ({ data, token }: {
2
2
  data: any;
3
- token: string;
3
+ token?: string | undefined;
4
4
  }) => void;
5
5
  export default useSigningComplete;
@@ -1,5 +1,5 @@
1
1
  declare const useHasTaxPlugin: ({ apiHost, token, }: {
2
2
  apiHost: string;
3
- token: string;
3
+ token?: string | undefined;
4
4
  }) => boolean;
5
5
  export default useHasTaxPlugin;
@@ -2,7 +2,7 @@ import { GraphQLClient } from "graphql-request";
2
2
  export declare const usePaymentMethod: ({ accountId, graphQLClient, token, }: {
3
3
  accountId?: string | undefined;
4
4
  graphQLClient: GraphQLClient;
5
- token: string;
5
+ token?: string | undefined;
6
6
  }) => {
7
7
  data: any;
8
8
  isLoading: boolean;
@@ -1,7 +1,7 @@
1
1
  import { PluginData } from "@bunnyapp/common";
2
2
  export declare const usePaymentPlugins: ({ apiHost, token, }: {
3
3
  apiHost: string;
4
- token: string;
4
+ token?: string | undefined;
5
5
  }) => {
6
6
  paymentPlugins: PluginData[] | undefined;
7
7
  paymentMethodAllowedPlugins: PluginData[] | undefined;
@@ -1,5 +1,5 @@
1
- declare const usePlugins: ({ apiHost, token }: {
1
+ declare const usePlugins: ({ apiHost, token, }: {
2
2
  apiHost: string;
3
- token: string;
3
+ token?: string | undefined;
4
4
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<any, Error>;
5
5
  export default usePlugins;
@@ -1,5 +1,5 @@
1
1
  import { PluginData } from "@bunnyapp/common";
2
2
  export declare const useSigningPlugins: ({ apiHost, token, }: {
3
3
  apiHost: string;
4
- token: string;
4
+ token?: string | undefined;
5
5
  }) => PluginData[] | undefined;
@@ -1,2 +1,2 @@
1
- declare function useToken(): string;
1
+ declare function useToken(): string | undefined;
2
2
  export default useToken;
@@ -1,2 +1,2 @@
1
1
  export declare const getGraphQLBaseURL: (apiHost: string) => string;
2
- export declare const useGraphQLRequest: () => (query: string, token: string, apiHost: string, variables?: any) => Promise<unknown>;
2
+ export declare const useGraphQLRequest: () => (query: string, apiHost: string, token?: string, variables?: any) => Promise<unknown>;
package/dist/index.d.ts CHANGED
@@ -79,12 +79,13 @@ declare const PaymentMethod: ({ className, shadow, cardEnabled, useModal, }: {
79
79
  useModal?: boolean | undefined;
80
80
  }) => react_jsx_runtime.JSX.Element;
81
81
 
82
- declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, accountId, onSavePaymentMethod, overrideToken, graphQLClient, customCheckoutFunction, currencyId: currencyIdFromProps, customPaymentForms, useAllPaymentPlugins, }: {
82
+ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, overrideToken, graphQLClient, customCheckoutFunction, currencyId: currencyIdFromProps, customPaymentForms, useAllPaymentPlugins, }: {
83
83
  invoice?: FormattedInvoice | undefined;
84
84
  quote?: Quote$1 | undefined;
85
85
  onFail: (error: any) => void;
86
86
  onPaymentSuccess?: (() => void) | undefined;
87
87
  onSavePaymentMethod?: (() => void) | undefined;
88
+ onRemovePaymentMethod?: (() => void) | undefined;
88
89
  accountId?: string | undefined;
89
90
  overrideToken?: string | undefined;
90
91
  graphQLClient: GraphQLClient;
@@ -118,7 +119,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
118
119
  darkMode?: boolean;
119
120
  queryClient?: QueryClient;
120
121
  apiHost: string;
121
- token: string;
122
+ token?: string;
122
123
  onTokenExpired?: () => void;
123
124
  configProviderProps?: ThemeConfig | undefined;
124
125
  }): react_jsx_runtime.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",