@bunnyapp/components 1.7.0-beta.32 → 1.7.0-beta.34

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 (31) hide show
  1. package/dist/cjs/index.js +1621 -1663
  2. package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +29 -3
  3. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +1 -1
  4. package/dist/cjs/types/src/components/Signup/PriceListDisplay.d.ts +2 -0
  5. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +1 -0
  6. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +17 -0
  7. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  8. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  9. package/dist/cjs/types/src/{graphql → components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  10. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  11. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  12. package/dist/cjs/types/src/utils/couponUtils.d.ts +2 -1
  13. package/dist/esm/index.js +1623 -1665
  14. package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +29 -3
  15. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +1 -1
  16. package/dist/esm/types/src/components/Signup/PriceListDisplay.d.ts +2 -0
  17. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +1 -0
  18. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +17 -0
  19. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  20. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  21. package/dist/esm/types/src/{graphql → components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  22. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  23. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  24. package/dist/esm/types/src/utils/couponUtils.d.ts +2 -1
  25. package/package.json +2 -2
  26. package/dist/cjs/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  27. package/dist/cjs/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  28. package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +0 -36
  29. package/dist/esm/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  30. package/dist/esm/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  31. package/dist/esm/types/src/graphql/queries/getQuote.d.ts +0 -36
@@ -1,4 +1,3 @@
1
- import { Quote } from '@/types/Quote';
2
1
  import { FragmentOf } from 'gql.tada';
3
2
  export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaDocumentNode<{
4
3
  product: {
@@ -10,8 +9,35 @@ export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaD
10
9
  on: "PriceList";
11
10
  masked: true;
12
11
  }>;
13
- export default function CheckoutSummary({ quote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceList: maskedPriceList, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
14
- quote: Quote;
12
+ export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
13
+ id: string | null;
14
+ amountDue: number | null;
15
+ subtotal: number;
16
+ taxAmount: number;
17
+ currencyId: string;
18
+ quoteChanges: {
19
+ charges: {
20
+ id: string | null;
21
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
22
+ name: string | null;
23
+ coupon: {
24
+ couponCode: string;
25
+ } | null;
26
+ quantity: number | null;
27
+ subtotal: number | null;
28
+ currencyId: string;
29
+ }[];
30
+ }[] | null;
31
+ [$tada.fragmentRefs]: {
32
+ shouldShowCouponEditor_QuoteFragment: "Quote";
33
+ };
34
+ }, {}, {
35
+ fragment: "CheckoutSummary_QuoteFragment";
36
+ on: "Quote";
37
+ masked: true;
38
+ }>;
39
+ export default function CheckoutSummary({ quote: maskedQuote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceList: maskedPriceList, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
40
+ quote: FragmentOf<typeof CheckoutSummary_QuoteFragment>;
15
41
  className?: string;
16
42
  onAddCoupon: (couponCode: string) => void;
17
43
  onRemoveCoupon: (couponCode: string) => void;
@@ -9,7 +9,7 @@ export declare const PaymentForms_QuoteFragment: import("gql.tada").TadaDocument
9
9
  masked: true;
10
10
  }>;
11
11
  export default function PaymentForms({ quote: maskedQuote, handlePaymentSuccess, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
12
- quote?: FragmentOf<typeof PaymentForms_QuoteFragment>;
12
+ quote?: FragmentOf<typeof PaymentForms_QuoteFragment> | null;
13
13
  handlePaymentSuccess: () => void;
14
14
  handleSubmit: (formData: FormData) => void;
15
15
  proceedingToPayment: boolean;
@@ -6,6 +6,8 @@ export declare const PriceListDisplay_PriceListFragment: import("gql.tada").Tada
6
6
  name: string;
7
7
  basePrice: number | null;
8
8
  currencyId: string;
9
+ trialAllowed: boolean;
10
+ trialLengthDays: number | null;
9
11
  }, {}, {
10
12
  fragment: "PriceListDisplay_PriceListFragment";
11
13
  on: "PriceList";
@@ -9,6 +9,7 @@ export declare const Signup_PriceListFragment: import("gql.tada").TadaDocumentNo
9
9
  plan: {
10
10
  selfServiceBuy: boolean | null;
11
11
  } | null;
12
+ trialAllowed: boolean;
12
13
  }, {}, {
13
14
  fragment: "Signup_PriceListFragment";
14
15
  on: "PriceList";
@@ -0,0 +1,17 @@
1
+ export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ CheckoutSummary_QuoteFragment: "Quote";
4
+ } & {
5
+ PaymentForms_QuoteFragment: "Quote";
6
+ };
7
+ id: string | null;
8
+ currencyId: string;
9
+ amountDue: number | null;
10
+ quoteChanges: {
11
+ id: string | null;
12
+ }[] | null;
13
+ }, {}, {
14
+ fragment: "Signup_QuoteFragment";
15
+ on: "Quote";
16
+ masked: true;
17
+ }>;
@@ -0,0 +1,58 @@
1
+ declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
2
+ token: string;
3
+ apiHost: string;
4
+ accountId: string;
5
+ quoteId: string;
6
+ paymentToken?: string;
7
+ paymentMethodId?: string;
8
+ pluginId: string;
9
+ priceListCode: string;
10
+ }) => Promise<{
11
+ errors: string[] | null;
12
+ quote: {
13
+ accountId: string;
14
+ amount: number;
15
+ amountDue: number | null;
16
+ applicationDate: unknown;
17
+ applied: boolean;
18
+ backdatedPeriods: boolean | null;
19
+ backdatedQuote: boolean | null;
20
+ billingDay: number | null;
21
+ contactId: string | null;
22
+ createdAt: unknown;
23
+ credits: number | null;
24
+ currencyId: string;
25
+ dealId: string | null;
26
+ discount: number | null;
27
+ discountValue: number;
28
+ endDate: unknown;
29
+ evergreen: boolean | null;
30
+ expiresAt: unknown;
31
+ id: string | null;
32
+ invoiceImmediately: boolean | null;
33
+ invoiceImmediatelyAvailable: boolean | null;
34
+ invoiceUntil: unknown;
35
+ isPendingApprovalRequest: boolean;
36
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
37
+ message: string | null;
38
+ name: string | null;
39
+ netPaymentDays: number | null;
40
+ notes: string | null;
41
+ number: string | null;
42
+ ownerId: string | null;
43
+ payableId: string | null;
44
+ periodAmount: number | null;
45
+ poNumber: string | null;
46
+ requiresApproval: boolean;
47
+ smallUnitAmountDue: number | null;
48
+ splitInvoice: boolean | null;
49
+ startDate: unknown;
50
+ state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
51
+ subtotal: number;
52
+ taxAmount: number;
53
+ taxCode: string | null;
54
+ updatedAt: unknown;
55
+ uuid: string;
56
+ } | null;
57
+ } | null>;
58
+ export default accountSignup;
@@ -0,0 +1,31 @@
1
+ import BillingDetails from '@/types/billingDetails';
2
+ type BillingContact = {
3
+ firstName: string;
4
+ lastName: string;
5
+ email: string;
6
+ };
7
+ declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, billingDetails, trial, }: {
8
+ token?: string;
9
+ apiHost: string;
10
+ priceListCode: string;
11
+ accountName: string;
12
+ billingContact: BillingContact;
13
+ billingDetails?: BillingDetails;
14
+ trial: boolean;
15
+ }) => Promise<{
16
+ account: {
17
+ id: string;
18
+ } | null;
19
+ quote: {
20
+ [$tada.fragmentRefs]: {
21
+ Signup_QuoteFragment: "Quote";
22
+ };
23
+ id: string | null;
24
+ } | null;
25
+ tenant: {
26
+ code: string | null;
27
+ } | null;
28
+ portalSessionToken: string | null;
29
+ errors: string[] | null;
30
+ } | null>;
31
+ export default quoteAccountSignup;
@@ -2,5 +2,9 @@ declare const quoteRecalculateTaxes: ({ quoteId, apiHost, token, }: {
2
2
  quoteId: string;
3
3
  apiHost: string;
4
4
  token?: string;
5
- }) => Promise<any>;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_QuoteFragment: "Quote";
8
+ };
9
+ } | null | undefined>;
6
10
  export default quoteRecalculateTaxes;
@@ -0,0 +1,10 @@
1
+ declare const getQuote: ({ id, token, apiHost, }: {
2
+ id: string;
3
+ token?: string;
4
+ apiHost: string;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_QuoteFragment: "Quote";
8
+ };
9
+ } | null>;
10
+ export default getQuote;
@@ -3,14 +3,19 @@ import { FragmentOf } from 'gql.tada';
3
3
  export declare const CheckoutPrice_QuoteFragment: import("gql.tada").TadaDocumentNode<{
4
4
  periodAmount: number | null;
5
5
  amountDue: number | null;
6
+ quoteChanges: {
7
+ charges: {
8
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
9
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
10
+ }[];
11
+ }[] | null;
6
12
  }, {}, {
7
13
  fragment: "CheckoutPrice_QuoteFragment";
8
14
  on: "Quote";
9
15
  masked: true;
10
16
  }>;
11
- declare const CheckoutPrice: ({ isUsage, quote: maskedQuote, selectedPriceList, }: {
12
- isUsage: boolean;
17
+ declare const CheckoutPrice: ({ quote: maskedQuote, selectedPriceList, }: {
13
18
  quote?: FragmentOf<typeof CheckoutPrice_QuoteFragment>;
14
19
  selectedPriceList: PriceList;
15
- }) => import("react/jsx-runtime").JSX.Element | null;
20
+ }) => import("react/jsx-runtime").JSX.Element;
16
21
  export default CheckoutPrice;
@@ -2,6 +2,7 @@ import { FragmentOf } from 'gql.tada';
2
2
  export declare const shouldShowCouponEditor_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
3
  id: string | null;
4
4
  kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
5
+ amountDue: number | null;
5
6
  }, {}, {
6
7
  fragment: "shouldShowCouponEditor_QuoteFragment";
7
8
  on: "Quote";
@@ -18,4 +19,4 @@ export declare const shouldShowCouponEditor_SubscriptionFragment: import("gql.ta
18
19
  on: "Subscription";
19
20
  masked: true;
20
21
  }>;
21
- export declare function shouldShowCouponEditor(maskedQuote: FragmentOf<typeof shouldShowCouponEditor_QuoteFragment>, activeCouponsExist: boolean, maskedUpgradingSubscription: FragmentOf<typeof shouldShowCouponEditor_SubscriptionFragment>): boolean;
22
+ export declare function shouldShowCouponEditor(maskedQuote: FragmentOf<typeof shouldShowCouponEditor_QuoteFragment>, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof shouldShowCouponEditor_SubscriptionFragment>): boolean;