@rebuy/rebuy 2.15.0 → 2.16.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.
package/dist/index.js CHANGED
@@ -80,6 +80,7 @@ __export(src_exports, {
80
80
  PostPurchaseOffer: () => PostPurchaseOffer,
81
81
  PostPurchaseSettings: () => PostPurchaseSettings,
82
82
  PostPurchaseWidget: () => PostPurchaseWidget,
83
+ PostPurchaseWidgetLinkedFlow: () => PostPurchaseWidgetLinkedFlow,
83
84
  Product: () => Product,
84
85
  ProductInformationBlock: () => ProductInformationBlock,
85
86
  ProductType: () => ProductType,
@@ -2305,6 +2306,7 @@ var PostPurchaseSettings = import_v435.z.object({
2305
2306
  free: import_v435.z.string().optional().default("Free"),
2306
2307
  notAvailable: import_v435.z.string().optional().default("Not available"),
2307
2308
  payNow: import_v435.z.string().default("Pay Now"),
2309
+ payNowUpgradeToSubscription: import_v435.z.string().optional().default("Upgrade to Subscription"),
2308
2310
  quantity: import_v435.z.string().default("Quantity"),
2309
2311
  /** This isn't configurable in the admin-nextjs editor */
2310
2312
  recurringShipping: import_v435.z.string().optional().default("Recurring shipping"),
@@ -2322,6 +2324,7 @@ var PostPurchaseSettings = import_v435.z.object({
2322
2324
  free: "Free",
2323
2325
  notAvailable: "Not available",
2324
2326
  payNow: "Pay Now",
2327
+ payNowUpgradeToSubscription: "Upgrade to Subscription",
2325
2328
  quantity: "Quantity",
2326
2329
  /** This isn't configurable in the admin-nextjs editor */
2327
2330
  recurringShipping: "Recurring shipping",
@@ -2418,10 +2421,25 @@ var PostPurchaseSettings = import_v435.z.object({
2418
2421
  subscriptionIsDefault: import_v435.z.boolean().optional(),
2419
2422
  /** This isn't configurable in the admin-nextjs editor */
2420
2423
  template: import_v435.z.string().optional().default(""),
2421
- type: import_v435.z.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension")
2424
+ type: import_v435.z.literal("shopify_post_purchase_extension").default("shopify_post_purchase_extension"),
2425
+ upgradeToSubscription: import_v435.z.object({
2426
+ acceptButtonText: import_v435.z.string().optional().default("Upgrade"),
2427
+ allow: import_v435.z.boolean().optional().default(false),
2428
+ emailRefundNotice: import_v435.z.boolean().optional().default(false),
2429
+ errorBannerText: import_v435.z.string().optional().default("This subscription cannot be added - limit one per order")
2430
+ }).optional().default(() => ({
2431
+ acceptButtonText: "Upgrade",
2432
+ allow: false,
2433
+ emailRefundNotice: false,
2434
+ errorBannerText: "This subscription cannot be added - limit one per order"
2435
+ }))
2422
2436
  });
2423
2437
 
2424
2438
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
2439
+ var PostPurchaseWidgetLinkedFlow = import_v436.z.object({
2440
+ id: import_v436.z.number(),
2441
+ name: import_v436.z.string()
2442
+ });
2425
2443
  var PostPurchaseWidget = import_v436.z.object({
2426
2444
  classification: import_v436.z.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
2427
2445
  createdAtTime: import_v436.z.iso.datetime({ offset: true }).optional(),
@@ -2429,6 +2447,7 @@ var PostPurchaseWidget = import_v436.z.object({
2429
2447
  id: import_v436.z.number().default(0),
2430
2448
  lastViewed: import_v436.z.iso.datetime({ offset: true }).nullish(),
2431
2449
  linkedCustomEndpointId: import_v436.z.number().nullish(),
2450
+ linkedFlows: import_v436.z.array(PostPurchaseWidgetLinkedFlow).optional(),
2432
2451
  name: import_v436.z.string().default(""),
2433
2452
  owner: import_v436.z.number().nullish(),
2434
2453
  settings: PostPurchaseSettings