@rebuy/rebuy 3.32.0 → 3.33.0

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 (47) hide show
  1. package/dist/index.cjs +1138 -923
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.mjs +1138 -923
  4. package/dist/pricing/postPurchaseSubscriptionDisplay.d.ts +5 -0
  5. package/dist/schema/index.d.ts +8 -0
  6. package/dist/schema/postPurchaseChoice.d.ts +25 -0
  7. package/dist/schema/postPurchaseDiscount.d.ts +22 -0
  8. package/dist/schema/postPurchasePlanAdjustment.d.ts +11 -0
  9. package/dist/schema/postPurchasePlanCatalog.d.ts +42 -0
  10. package/dist/schema/postPurchaseProduct.d.ts +260 -0
  11. package/dist/schema/postPurchaseProductSettings.d.ts +1 -1
  12. package/dist/schema/postPurchaseProductSource.d.ts +2 -2
  13. package/dist/schema/postPurchaseSubscription.d.ts +21 -0
  14. package/dist/schema/postPurchaseSubscriptionDisplay.d.ts +10 -0
  15. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +224 -0
  16. package/dist/schema/postPurchaseSubscriptionSettings.d.ts +22 -0
  17. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +1 -1
  18. package/dist/schema/widgets/checkout-and-beyond/carousel.d.ts +1 -1
  19. package/dist/schema/widgets/checkout-and-beyond/cartLine.d.ts +1 -1
  20. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +1 -1
  21. package/dist/schema/widgets/checkout-and-beyond/dataSource.d.ts +2 -2
  22. package/dist/schema/widgets/checkout-and-beyond/discount.d.ts +1 -1
  23. package/dist/schema/widgets/checkout-and-beyond/icons.d.ts +1 -1
  24. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +2 -2
  25. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +1 -1
  26. package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +1 -1
  27. package/dist/schema/widgets/post-purchase-offer/postPurchaseOffer.d.ts +2 -2
  28. package/dist/schema/widgets/post-purchase-offer/postPurchaseSettings.d.ts +2 -2
  29. package/dist/schema/widgets/post-purchase-offer/postPurchaseWidget.d.ts +2 -2
  30. package/dist/server/__fixtures__/postPurchaseLegacyPlans.d.ts +35 -0
  31. package/dist/server/__fixtures__/postPurchaseSubscription.d.ts +75 -0
  32. package/dist/server/index.cjs +802 -118
  33. package/dist/server/index.d.ts +3 -1
  34. package/dist/server/index.mjs +802 -118
  35. package/dist/server/normalizePostPurchaseCollection.d.ts +16 -16
  36. package/dist/server/normalizePostPurchaseProduct.d.ts +9 -9
  37. package/dist/server/postPurchaseLegacyPlans.d.ts +3 -0
  38. package/dist/server/postPurchaseModernPlans.d.ts +7 -0
  39. package/dist/server/postPurchasePlanAdjustment.d.ts +3 -0
  40. package/dist/server/postPurchasePlanCatalog.d.ts +5 -0
  41. package/dist/server/postPurchaseSubscriptionEligibility.d.ts +5 -0
  42. package/dist/server/prepareNormalizedSubscription.d.ts +11 -0
  43. package/dist/server/preparePostPurchaseSubscription.d.ts +102 -0
  44. package/dist/server/projectPostPurchaseProduct.d.ts +7 -7
  45. package/dist/server/requestSchemas.d.ts +1 -1
  46. package/dist/server/selectPostPurchaseChoice.d.ts +43 -0
  47. package/package.json +1 -1
@@ -4,7 +4,8 @@
4
4
  * and input types), `convertWidgetSettings` (fetch one widget's settings → CAB tree), the offers data rail
5
5
  * (`fetchUserConfig` → shop publishable key, `fetchDataSourceResults` → engine-evaluated products for the
6
6
  * live cart), gift validation (`validateGifts`), Monetize offers (`fetchMonetizeOffers`), analytics
7
- * forwarding (`postAnalyticsEvents`), and the centralized `/cab/*` request schemas rebuy-api validates
7
+ * forwarding (`postAnalyticsEvents`), standalone post-purchase subscription preparation
8
+ * (`preparePostPurchaseSubscription`), and the centralized `/cab/*` request schemas rebuy-api validates
8
9
  * against. Internal composition modules (`adsEngine`, `composeOffer`, `salvageSections`,
9
10
  * `b2bAvailability`) stay unexported — they're reached through the orchestrators above.
10
11
  */
@@ -13,6 +14,7 @@ export { convertWidgetSettings } from '../server/widgetSettings';
13
14
  export { fetchUserConfig } from '../server/userConfig';
14
15
  export { validateGifts } from '../server/giftValidation';
15
16
  export { fetchMonetizeOffers, type MonetizeOffers } from '../server/monetizeOffers';
17
+ export { preparePostPurchaseSubscription } from '../server/preparePostPurchaseSubscription';
16
18
  export { postAnalyticsEvents, translateAnalyticsEvent, type CabAnalyticsEventName } from '../server/analytics';
17
19
  export { AnalyticsEventInputSchema, AnalyticsInputSchema, AnalyticsSegmentsInputSchema, CartInputSchema, CartLineInputSchema, DataSourceInputSchema, GiftAdjustmentSchema, GiftInputSchema, GiftValidationInputSchema, GiftValidationResponseSchema, MonetizeInputSchema, MonetizeTransactionItemSchema, REQUEST_BOUNDS, UserConfigInputSchema, WidgetSettingsInputSchema, } from '../server/requestSchemas';
18
20
  export { NotFoundError, REBUY_ENGINE_HOST, UpstreamError, type AnalyticsEventInput, type AnalyticsInput, type AnalyticsSegmentsInput, type CartInput, type CartLineInput, type DataSourceInput, type GiftAdjustment, type GiftInput, type GiftValidationInput, type GiftValidationResponse, type MonetizeInput, type MonetizeTransactionItem, type ServerContext, type ServerDrift, type UpstreamFetch, type UserConfigInput, type WidgetSettingsInput, } from '../server/shared';