@carlonicora/nextjs-jsonapi 3.24.0 → 3.24.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.
Files changed (92) hide show
  1. package/dist/{BlockNoteEditor-PTD2V4CH.js → BlockNoteEditor-35D4R7HJ.js} +21 -21
  2. package/dist/{BlockNoteEditor-PTD2V4CH.js.map → BlockNoteEditor-35D4R7HJ.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-Q2WEDMKJ.mjs → BlockNoteEditor-65HR6ULV.mjs} +6 -6
  4. package/dist/{BlockNoteViewer-WO6GTDSI.mjs → BlockNoteViewer-KDKGUIG5.mjs} +4 -4
  5. package/dist/{BlockNoteViewer-WOXEJ6RM.js → BlockNoteViewer-QDXDVYEM.js} +5 -5
  6. package/dist/{BlockNoteViewer-WOXEJ6RM.js.map → BlockNoteViewer-QDXDVYEM.js.map} +1 -1
  7. package/dist/JsonApiRequest-G625QAH5.js +26 -0
  8. package/dist/{JsonApiRequest-E4PZPH3N.js.map → JsonApiRequest-G625QAH5.js.map} +1 -1
  9. package/dist/{JsonApiRequest-7AEQWMLJ.mjs → JsonApiRequest-RRMNV7YE.mjs} +2 -2
  10. package/dist/billing/index.d.mts +57 -2
  11. package/dist/billing/index.d.ts +57 -2
  12. package/dist/billing/index.js +408 -403
  13. package/dist/billing/index.js.map +1 -1
  14. package/dist/billing/index.mjs +10 -5
  15. package/dist/{chunk-3YJF7QY4.js → chunk-2XCUAHQT.js} +834 -834
  16. package/dist/{chunk-3YJF7QY4.js.map → chunk-2XCUAHQT.js.map} +1 -1
  17. package/dist/{chunk-3D2MCVRZ.js → chunk-3AR4KA5D.js} +13 -13
  18. package/dist/{chunk-3D2MCVRZ.js.map → chunk-3AR4KA5D.js.map} +1 -1
  19. package/dist/{chunk-GJHKOG5L.mjs → chunk-4O7R2Z2O.mjs} +10 -10
  20. package/dist/chunk-4O7R2Z2O.mjs.map +1 -0
  21. package/dist/{chunk-IOLU4ASD.js → chunk-5TRFNKJS.js} +3 -2
  22. package/dist/chunk-5TRFNKJS.js.map +1 -0
  23. package/dist/{chunk-2O3SFHQ7.mjs → chunk-IBVKPLHT.mjs} +14 -8
  24. package/dist/chunk-IBVKPLHT.mjs.map +1 -0
  25. package/dist/{chunk-IBS6NI7D.js → chunk-JTPRJNT2.js} +3 -2
  26. package/dist/chunk-JTPRJNT2.js.map +1 -0
  27. package/dist/{chunk-C7C7VY4F.mjs → chunk-PI56A4DG.mjs} +3 -2
  28. package/dist/{chunk-C7C7VY4F.mjs.map → chunk-PI56A4DG.mjs.map} +1 -1
  29. package/dist/{chunk-IEJYBQ6J.mjs → chunk-SJLXPHK5.mjs} +3 -2
  30. package/dist/{chunk-IEJYBQ6J.mjs.map → chunk-SJLXPHK5.mjs.map} +1 -1
  31. package/dist/{chunk-BMVA2IM5.mjs → chunk-T76WLDE5.mjs} +3 -3
  32. package/dist/{chunk-IV4DTYXN.js → chunk-U7QVISQS.js} +46 -40
  33. package/dist/chunk-U7QVISQS.js.map +1 -0
  34. package/dist/{chunk-LU7DJ4QF.js → chunk-YXRVPEEJ.js} +3 -3
  35. package/dist/{chunk-LU7DJ4QF.js.map → chunk-YXRVPEEJ.js.map} +1 -1
  36. package/dist/{chunk-HAI7G6MD.mjs → chunk-ZJI5ZZW5.mjs} +3 -3
  37. package/dist/client/index.js +6 -6
  38. package/dist/client/index.mjs +5 -5
  39. package/dist/components/index.js +6 -6
  40. package/dist/components/index.mjs +5 -5
  41. package/dist/contexts/index.js +6 -6
  42. package/dist/contexts/index.mjs +5 -5
  43. package/dist/core/index.d.mts +2 -2
  44. package/dist/core/index.d.ts +2 -2
  45. package/dist/core/index.js +4 -4
  46. package/dist/core/index.mjs +3 -3
  47. package/dist/features/help/index.js +39 -39
  48. package/dist/features/help/index.mjs +5 -5
  49. package/dist/features/tokenusage/index.js +103 -103
  50. package/dist/features/tokenusage/index.mjs +5 -5
  51. package/dist/index.d.mts +1 -1
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +5 -5
  54. package/dist/index.mjs +4 -4
  55. package/dist/{request-FYMQK5CX.mjs → request-5RLK2AM3.mjs} +2 -2
  56. package/dist/request-EUGTI3BE.js +9 -0
  57. package/dist/{request-ZYY6RI5X.js.map → request-EUGTI3BE.js.map} +1 -1
  58. package/dist/{request-6VYDNP5T.mjs → request-FXF63NSQ.mjs} +2 -2
  59. package/dist/request-ZTX6I63X.js +8 -0
  60. package/dist/request-ZTX6I63X.js.map +1 -0
  61. package/dist/{s3.service-DJHqEZAp.d.ts → s3.service-Bqr-fQmi.d.ts} +1 -0
  62. package/dist/{s3.service-DaRFLnrX.d.mts → s3.service-Buiy1ncj.d.mts} +1 -0
  63. package/dist/server/index.d.mts +1 -1
  64. package/dist/server/index.d.ts +1 -1
  65. package/dist/server/index.js +21 -21
  66. package/dist/server/index.mjs +4 -4
  67. package/package.json +1 -1
  68. package/src/client/__tests__/request.test.ts +29 -0
  69. package/src/client/request.ts +5 -1
  70. package/src/features/billing/stripe-customer/data/stripe-customer.service.ts +5 -0
  71. package/src/features/billing/stripe-subscription/components/index.ts +1 -0
  72. package/src/features/notification/contexts/NotificationContext.tsx +5 -2
  73. package/src/features/notification/contexts/__tests__/NotificationContext.spec.tsx +32 -0
  74. package/src/features/notification/data/notification.service.ts +6 -1
  75. package/src/server/__tests__/request.test.ts +17 -0
  76. package/src/server/request.ts +5 -1
  77. package/dist/JsonApiRequest-E4PZPH3N.js +0 -26
  78. package/dist/chunk-2O3SFHQ7.mjs.map +0 -1
  79. package/dist/chunk-GJHKOG5L.mjs.map +0 -1
  80. package/dist/chunk-IBS6NI7D.js.map +0 -1
  81. package/dist/chunk-IOLU4ASD.js.map +0 -1
  82. package/dist/chunk-IV4DTYXN.js.map +0 -1
  83. package/dist/request-UR7VPG3G.js +0 -8
  84. package/dist/request-UR7VPG3G.js.map +0 -1
  85. package/dist/request-ZYY6RI5X.js +0 -9
  86. /package/dist/{BlockNoteEditor-Q2WEDMKJ.mjs.map → BlockNoteEditor-65HR6ULV.mjs.map} +0 -0
  87. /package/dist/{BlockNoteViewer-WO6GTDSI.mjs.map → BlockNoteViewer-KDKGUIG5.mjs.map} +0 -0
  88. /package/dist/{JsonApiRequest-7AEQWMLJ.mjs.map → JsonApiRequest-RRMNV7YE.mjs.map} +0 -0
  89. /package/dist/{chunk-BMVA2IM5.mjs.map → chunk-T76WLDE5.mjs.map} +0 -0
  90. /package/dist/{chunk-HAI7G6MD.mjs.map → chunk-ZJI5ZZW5.mjs.map} +0 -0
  91. /package/dist/{request-6VYDNP5T.mjs.map → request-5RLK2AM3.mjs.map} +0 -0
  92. /package/dist/{request-FYMQK5CX.mjs.map → request-FXF63NSQ.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { j as StripeSubscriptionInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, o as MeterSummaryInterface, d as StripePriceInterface, f as StripePriceInput, g as StripeProductInterface, h as StripeProductInput, I as InvoiceStatus, b as ProrationPreviewInterface, i as SubscriptionStatus, n as StripeUsageInterface, q as PromotionCodeValidationResult } from '../stripe-promotion-code.interface-ClZ7DxS9.mjs';
3
+ import { j as StripeSubscriptionInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, o as MeterSummaryInterface, d as StripePriceInterface, f as StripePriceInput, g as StripeProductInterface, h as StripeProductInput, I as InvoiceStatus, b as ProrationPreviewInterface, i as SubscriptionStatus, q as PromotionCodeValidationResult, n as StripeUsageInterface } from '../stripe-promotion-code.interface-ClZ7DxS9.mjs';
4
4
  import { J as JsonApiHydratedDataInterface } from '../ApiDataInterface-BcZeXy5X.mjs';
5
5
  import '../feature.interface-CXb1-vNq.mjs';
6
6
 
@@ -407,6 +407,61 @@ type SubscriptionConfirmationProps = {
407
407
  };
408
408
  declare function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }: SubscriptionConfirmationProps): React.JSX.Element;
409
409
 
410
+ type SubscriptionWizardProps = {
411
+ open: boolean;
412
+ onOpenChange: (open: boolean) => void;
413
+ onSuccess: () => void;
414
+ hasActiveRecurringSubscription: boolean;
415
+ subscription?: StripeSubscriptionInterface;
416
+ };
417
+ declare function SubscriptionWizard({ open, onOpenChange, onSuccess, hasActiveRecurringSubscription, subscription, }: SubscriptionWizardProps): React.JSX.Element;
418
+
419
+ type WizardStep = "plan-selection" | "review" | "payment-method";
420
+
421
+ type WizardProgressIndicatorProps = {
422
+ currentStep: WizardStep;
423
+ };
424
+ declare function WizardProgressIndicator({ currentStep }: WizardProgressIndicatorProps): React.JSX.Element;
425
+
426
+ type WizardStepPlanSelectionProps = {
427
+ selectedPrice: StripePriceInterface | null;
428
+ selectedInterval: BillingInterval;
429
+ currentPriceId?: string;
430
+ hideRecurringPrices: boolean;
431
+ hideOneTimePrices: boolean;
432
+ onSelectPrice: (price: StripePriceInterface) => void;
433
+ onIntervalChange: (interval: BillingInterval) => void;
434
+ onNext: () => void;
435
+ isProcessing: boolean;
436
+ };
437
+ declare function WizardStepPlanSelection({ selectedPrice, selectedInterval, currentPriceId, hideRecurringPrices, hideOneTimePrices, onSelectPrice, onIntervalChange, onNext, isProcessing, }: WizardStepPlanSelectionProps): React.JSX.Element;
438
+
439
+ type WizardStepReviewProps = {
440
+ selectedPrice: StripePriceInterface | null;
441
+ subscription?: StripeSubscriptionInterface;
442
+ prorationPreview: ProrationPreviewInterface | null;
443
+ hasPaymentMethod: boolean;
444
+ error: string | null;
445
+ isProcessing: boolean;
446
+ onBack: () => void;
447
+ onAddPaymentMethod: () => void;
448
+ onConfirm: () => void;
449
+ promotionCode: PromotionCodeValidationResult | null;
450
+ isValidatingPromoCode: boolean;
451
+ promoCodeError: string | null;
452
+ onApplyPromoCode: (code: string) => void;
453
+ onRemovePromoCode: () => void;
454
+ isTrialUpgrade: boolean;
455
+ };
456
+ declare function WizardStepReview({ selectedPrice, subscription, prorationPreview, hasPaymentMethod, error, isProcessing, onBack, onAddPaymentMethod, onConfirm, promotionCode, isValidatingPromoCode, promoCodeError, onApplyPromoCode, onRemovePromoCode, isTrialUpgrade, }: WizardStepReviewProps): React.JSX.Element;
457
+
458
+ type WizardStepPaymentMethodProps = {
459
+ onBack: () => void;
460
+ onSuccess: () => void;
461
+ isProcessing: boolean;
462
+ };
463
+ declare function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }: WizardStepPaymentMethodProps): React.JSX.Element;
464
+
410
465
  declare function UsageContainer(): React.JSX.Element | null;
411
466
 
412
467
  type UsageSummaryCardProps = {
@@ -436,4 +491,4 @@ type PromoCodeInputProps = {
436
491
  };
437
492
  declare function PromoCodeInput({ appliedCode, isValidating, error, onApply, onRemove, disabled, }: PromoCodeInputProps): React.JSX.Element;
438
493
 
439
- export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, formatCurrency, formatDate, formatInterval, isStripeConfigured, priceLabel, usePriceContext, useProductContext };
494
+ export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionWizard, type SubscriptionWizardProps, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, WizardProgressIndicator, WizardStepPaymentMethod, WizardStepPlanSelection, WizardStepReview, formatCurrency, formatDate, formatInterval, isStripeConfigured, priceLabel, usePriceContext, useProductContext };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { j as StripeSubscriptionInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, o as MeterSummaryInterface, d as StripePriceInterface, f as StripePriceInput, g as StripeProductInterface, h as StripeProductInput, I as InvoiceStatus, b as ProrationPreviewInterface, i as SubscriptionStatus, n as StripeUsageInterface, q as PromotionCodeValidationResult } from '../stripe-promotion-code.interface-C3qqh3mi.js';
3
+ import { j as StripeSubscriptionInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, o as MeterSummaryInterface, d as StripePriceInterface, f as StripePriceInput, g as StripeProductInterface, h as StripeProductInput, I as InvoiceStatus, b as ProrationPreviewInterface, i as SubscriptionStatus, q as PromotionCodeValidationResult, n as StripeUsageInterface } from '../stripe-promotion-code.interface-C3qqh3mi.js';
4
4
  import { J as JsonApiHydratedDataInterface } from '../ApiDataInterface-BcZeXy5X.js';
5
5
  import '../feature.interface-BO25VLlx.js';
6
6
 
@@ -407,6 +407,61 @@ type SubscriptionConfirmationProps = {
407
407
  };
408
408
  declare function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }: SubscriptionConfirmationProps): React.JSX.Element;
409
409
 
410
+ type SubscriptionWizardProps = {
411
+ open: boolean;
412
+ onOpenChange: (open: boolean) => void;
413
+ onSuccess: () => void;
414
+ hasActiveRecurringSubscription: boolean;
415
+ subscription?: StripeSubscriptionInterface;
416
+ };
417
+ declare function SubscriptionWizard({ open, onOpenChange, onSuccess, hasActiveRecurringSubscription, subscription, }: SubscriptionWizardProps): React.JSX.Element;
418
+
419
+ type WizardStep = "plan-selection" | "review" | "payment-method";
420
+
421
+ type WizardProgressIndicatorProps = {
422
+ currentStep: WizardStep;
423
+ };
424
+ declare function WizardProgressIndicator({ currentStep }: WizardProgressIndicatorProps): React.JSX.Element;
425
+
426
+ type WizardStepPlanSelectionProps = {
427
+ selectedPrice: StripePriceInterface | null;
428
+ selectedInterval: BillingInterval;
429
+ currentPriceId?: string;
430
+ hideRecurringPrices: boolean;
431
+ hideOneTimePrices: boolean;
432
+ onSelectPrice: (price: StripePriceInterface) => void;
433
+ onIntervalChange: (interval: BillingInterval) => void;
434
+ onNext: () => void;
435
+ isProcessing: boolean;
436
+ };
437
+ declare function WizardStepPlanSelection({ selectedPrice, selectedInterval, currentPriceId, hideRecurringPrices, hideOneTimePrices, onSelectPrice, onIntervalChange, onNext, isProcessing, }: WizardStepPlanSelectionProps): React.JSX.Element;
438
+
439
+ type WizardStepReviewProps = {
440
+ selectedPrice: StripePriceInterface | null;
441
+ subscription?: StripeSubscriptionInterface;
442
+ prorationPreview: ProrationPreviewInterface | null;
443
+ hasPaymentMethod: boolean;
444
+ error: string | null;
445
+ isProcessing: boolean;
446
+ onBack: () => void;
447
+ onAddPaymentMethod: () => void;
448
+ onConfirm: () => void;
449
+ promotionCode: PromotionCodeValidationResult | null;
450
+ isValidatingPromoCode: boolean;
451
+ promoCodeError: string | null;
452
+ onApplyPromoCode: (code: string) => void;
453
+ onRemovePromoCode: () => void;
454
+ isTrialUpgrade: boolean;
455
+ };
456
+ declare function WizardStepReview({ selectedPrice, subscription, prorationPreview, hasPaymentMethod, error, isProcessing, onBack, onAddPaymentMethod, onConfirm, promotionCode, isValidatingPromoCode, promoCodeError, onApplyPromoCode, onRemovePromoCode, isTrialUpgrade, }: WizardStepReviewProps): React.JSX.Element;
457
+
458
+ type WizardStepPaymentMethodProps = {
459
+ onBack: () => void;
460
+ onSuccess: () => void;
461
+ isProcessing: boolean;
462
+ };
463
+ declare function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }: WizardStepPaymentMethodProps): React.JSX.Element;
464
+
410
465
  declare function UsageContainer(): React.JSX.Element | null;
411
466
 
412
467
  type UsageSummaryCardProps = {
@@ -436,4 +491,4 @@ type PromoCodeInputProps = {
436
491
  };
437
492
  declare function PromoCodeInput({ appliedCode, isValidating, error, onApply, onRemove, disabled, }: PromoCodeInputProps): React.JSX.Element;
438
493
 
439
- export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, formatCurrency, formatDate, formatInterval, isStripeConfigured, priceLabel, usePriceContext, useProductContext };
494
+ export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionWizard, type SubscriptionWizardProps, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, WizardProgressIndicator, WizardStepPaymentMethod, WizardStepPlanSelection, WizardStepReview, formatCurrency, formatDate, formatInterval, isStripeConfigured, priceLabel, usePriceContext, useProductContext };