@sonordev/site-kit 1.4.5 → 1.4.7

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
@@ -5,8 +5,8 @@ var chunkX4J33XQD_js = require('./chunk-X4J33XQD.js');
5
5
  var chunkG6VGUAK2_js = require('./chunk-G6VGUAK2.js');
6
6
  var chunkTKQLH33E_js = require('./chunk-TKQLH33E.js');
7
7
  require('./chunk-DY4K6X3A.js');
8
- var chunk7VZBMQNR_js = require('./chunk-7VZBMQNR.js');
9
- var chunkV2WSPLCN_js = require('./chunk-V2WSPLCN.js');
8
+ var chunkWAY6CT4A_js = require('./chunk-WAY6CT4A.js');
9
+ var chunkIJ2LWZID_js = require('./chunk-IJ2LWZID.js');
10
10
  var chunkIFAW7JFO_js = require('./chunk-IFAW7JFO.js');
11
11
  require('./chunk-EUNL6GAL.js');
12
12
  var chunkYBQT623Y_js = require('./chunk-YBQT623Y.js');
@@ -1585,147 +1585,147 @@ Object.defineProperty(exports, "fetchReviews", {
1585
1585
  });
1586
1586
  Object.defineProperty(exports, "CalendarView", {
1587
1587
  enumerable: true,
1588
- get: function () { return chunk7VZBMQNR_js.CalendarView; }
1588
+ get: function () { return chunkWAY6CT4A_js.CalendarView; }
1589
1589
  });
1590
1590
  Object.defineProperty(exports, "CheckoutForm", {
1591
1591
  enumerable: true,
1592
- get: function () { return chunk7VZBMQNR_js.CheckoutForm; }
1592
+ get: function () { return chunkWAY6CT4A_js.CheckoutForm; }
1593
1593
  });
1594
1594
  Object.defineProperty(exports, "EventCalendar", {
1595
1595
  enumerable: true,
1596
- get: function () { return chunk7VZBMQNR_js.EventCalendar; }
1596
+ get: function () { return chunkWAY6CT4A_js.EventCalendar; }
1597
1597
  });
1598
1598
  Object.defineProperty(exports, "EventEmbed", {
1599
1599
  enumerable: true,
1600
- get: function () { return chunk7VZBMQNR_js.EventEmbed; }
1600
+ get: function () { return chunkWAY6CT4A_js.EventEmbed; }
1601
1601
  });
1602
1602
  Object.defineProperty(exports, "EventModal", {
1603
1603
  enumerable: true,
1604
- get: function () { return chunk7VZBMQNR_js.EventModal; }
1604
+ get: function () { return chunkWAY6CT4A_js.EventModal; }
1605
1605
  });
1606
1606
  Object.defineProperty(exports, "EventTile", {
1607
1607
  enumerable: true,
1608
- get: function () { return chunk7VZBMQNR_js.EventTile; }
1608
+ get: function () { return chunkWAY6CT4A_js.EventTile; }
1609
1609
  });
1610
1610
  Object.defineProperty(exports, "OfferingCard", {
1611
1611
  enumerable: true,
1612
- get: function () { return chunk7VZBMQNR_js.OfferingCard; }
1612
+ get: function () { return chunkWAY6CT4A_js.OfferingCard; }
1613
1613
  });
1614
1614
  Object.defineProperty(exports, "OfferingList", {
1615
1615
  enumerable: true,
1616
- get: function () { return chunk7VZBMQNR_js.OfferingList; }
1616
+ get: function () { return chunkWAY6CT4A_js.OfferingList; }
1617
1617
  });
1618
1618
  Object.defineProperty(exports, "ProductEmbed", {
1619
1619
  enumerable: true,
1620
- get: function () { return chunk7VZBMQNR_js.ProductEmbed; }
1620
+ get: function () { return chunkWAY6CT4A_js.ProductEmbed; }
1621
1621
  });
1622
1622
  Object.defineProperty(exports, "RegistrationForm", {
1623
1623
  enumerable: true,
1624
- get: function () { return chunk7VZBMQNR_js.RegistrationForm; }
1624
+ get: function () { return chunkWAY6CT4A_js.RegistrationForm; }
1625
1625
  });
1626
1626
  Object.defineProperty(exports, "UpcomingEvents", {
1627
1627
  enumerable: true,
1628
- get: function () { return chunk7VZBMQNR_js.UpcomingEvents; }
1628
+ get: function () { return chunkWAY6CT4A_js.UpcomingEvents; }
1629
1629
  });
1630
1630
  Object.defineProperty(exports, "createCheckoutSession", {
1631
1631
  enumerable: true,
1632
- get: function () { return chunk7VZBMQNR_js.createCheckoutSession; }
1632
+ get: function () { return chunkWAY6CT4A_js.createCheckoutSession; }
1633
1633
  });
1634
1634
  Object.defineProperty(exports, "fetchNextEvent", {
1635
1635
  enumerable: true,
1636
- get: function () { return chunk7VZBMQNR_js.fetchNextEvent; }
1636
+ get: function () { return chunkWAY6CT4A_js.fetchNextEvent; }
1637
1637
  });
1638
1638
  Object.defineProperty(exports, "fetchOffering", {
1639
1639
  enumerable: true,
1640
- get: function () { return chunk7VZBMQNR_js.fetchOffering; }
1640
+ get: function () { return chunkWAY6CT4A_js.fetchOffering; }
1641
1641
  });
1642
1642
  Object.defineProperty(exports, "fetchOfferings", {
1643
1643
  enumerable: true,
1644
- get: function () { return chunk7VZBMQNR_js.fetchOfferings; }
1644
+ get: function () { return chunkWAY6CT4A_js.fetchOfferings; }
1645
1645
  });
1646
1646
  Object.defineProperty(exports, "fetchProducts", {
1647
1647
  enumerable: true,
1648
- get: function () { return chunk7VZBMQNR_js.fetchProducts; }
1648
+ get: function () { return chunkWAY6CT4A_js.fetchProducts; }
1649
1649
  });
1650
1650
  Object.defineProperty(exports, "fetchServices", {
1651
1651
  enumerable: true,
1652
- get: function () { return chunk7VZBMQNR_js.fetchServices; }
1652
+ get: function () { return chunkWAY6CT4A_js.fetchServices; }
1653
1653
  });
1654
1654
  Object.defineProperty(exports, "fetchUpcomingEvents", {
1655
1655
  enumerable: true,
1656
- get: function () { return chunk7VZBMQNR_js.fetchUpcomingEvents; }
1656
+ get: function () { return chunkWAY6CT4A_js.fetchUpcomingEvents; }
1657
1657
  });
1658
1658
  Object.defineProperty(exports, "formatDate", {
1659
1659
  enumerable: true,
1660
- get: function () { return chunk7VZBMQNR_js.formatDate; }
1660
+ get: function () { return chunkWAY6CT4A_js.formatDate; }
1661
1661
  });
1662
1662
  Object.defineProperty(exports, "formatDateTime", {
1663
1663
  enumerable: true,
1664
- get: function () { return chunk7VZBMQNR_js.formatDateTime; }
1664
+ get: function () { return chunkWAY6CT4A_js.formatDateTime; }
1665
1665
  });
1666
1666
  Object.defineProperty(exports, "formatPrice", {
1667
1667
  enumerable: true,
1668
- get: function () { return chunk7VZBMQNR_js.formatPrice; }
1668
+ get: function () { return chunkWAY6CT4A_js.formatPrice; }
1669
1669
  });
1670
1670
  Object.defineProperty(exports, "getOfferingUrl", {
1671
1671
  enumerable: true,
1672
- get: function () { return chunk7VZBMQNR_js.getOfferingUrl; }
1672
+ get: function () { return chunkWAY6CT4A_js.getOfferingUrl; }
1673
1673
  });
1674
1674
  Object.defineProperty(exports, "registerForEvent", {
1675
1675
  enumerable: true,
1676
- get: function () { return chunk7VZBMQNR_js.registerForEvent; }
1676
+ get: function () { return chunkWAY6CT4A_js.registerForEvent; }
1677
1677
  });
1678
1678
  Object.defineProperty(exports, "useEventModal", {
1679
1679
  enumerable: true,
1680
- get: function () { return chunk7VZBMQNR_js.useEventModal; }
1680
+ get: function () { return chunkWAY6CT4A_js.useEventModal; }
1681
1681
  });
1682
1682
  Object.defineProperty(exports, "BookingWidget", {
1683
1683
  enumerable: true,
1684
- get: function () { return chunkV2WSPLCN_js.BookingWidget; }
1684
+ get: function () { return chunkIJ2LWZID_js.BookingWidget; }
1685
1685
  });
1686
1686
  Object.defineProperty(exports, "createBooking", {
1687
1687
  enumerable: true,
1688
- get: function () { return chunkV2WSPLCN_js.createBooking; }
1688
+ get: function () { return chunkIJ2LWZID_js.createBooking; }
1689
1689
  });
1690
1690
  Object.defineProperty(exports, "createSlotHold", {
1691
1691
  enumerable: true,
1692
- get: function () { return chunkV2WSPLCN_js.createSlotHold; }
1692
+ get: function () { return chunkIJ2LWZID_js.createSlotHold; }
1693
1693
  });
1694
1694
  Object.defineProperty(exports, "detectTimezone", {
1695
1695
  enumerable: true,
1696
- get: function () { return chunkV2WSPLCN_js.detectTimezone; }
1696
+ get: function () { return chunkIJ2LWZID_js.detectTimezone; }
1697
1697
  });
1698
1698
  Object.defineProperty(exports, "fetchAvailability", {
1699
1699
  enumerable: true,
1700
- get: function () { return chunkV2WSPLCN_js.fetchAvailability; }
1700
+ get: function () { return chunkIJ2LWZID_js.fetchAvailability; }
1701
1701
  });
1702
1702
  Object.defineProperty(exports, "fetchAvailableDates", {
1703
1703
  enumerable: true,
1704
- get: function () { return chunkV2WSPLCN_js.fetchAvailableDates; }
1704
+ get: function () { return chunkIJ2LWZID_js.fetchAvailableDates; }
1705
1705
  });
1706
1706
  Object.defineProperty(exports, "fetchBookingTypeDetails", {
1707
1707
  enumerable: true,
1708
- get: function () { return chunkV2WSPLCN_js.fetchBookingTypeDetails; }
1708
+ get: function () { return chunkIJ2LWZID_js.fetchBookingTypeDetails; }
1709
1709
  });
1710
1710
  Object.defineProperty(exports, "fetchBookingTypes", {
1711
1711
  enumerable: true,
1712
- get: function () { return chunkV2WSPLCN_js.fetchBookingTypes; }
1712
+ get: function () { return chunkIJ2LWZID_js.fetchBookingTypes; }
1713
1713
  });
1714
1714
  Object.defineProperty(exports, "formatBookingDate", {
1715
1715
  enumerable: true,
1716
- get: function () { return chunkV2WSPLCN_js.formatDate; }
1716
+ get: function () { return chunkIJ2LWZID_js.formatDate; }
1717
1717
  });
1718
1718
  Object.defineProperty(exports, "formatBookingTime", {
1719
1719
  enumerable: true,
1720
- get: function () { return chunkV2WSPLCN_js.formatTime; }
1720
+ get: function () { return chunkIJ2LWZID_js.formatTime; }
1721
1721
  });
1722
1722
  Object.defineProperty(exports, "formatDuration", {
1723
1723
  enumerable: true,
1724
- get: function () { return chunkV2WSPLCN_js.formatDuration; }
1724
+ get: function () { return chunkIJ2LWZID_js.formatDuration; }
1725
1725
  });
1726
1726
  Object.defineProperty(exports, "releaseSlotHold", {
1727
1727
  enumerable: true,
1728
- get: function () { return chunkV2WSPLCN_js.releaseSlotHold; }
1728
+ get: function () { return chunkIJ2LWZID_js.releaseSlotHold; }
1729
1729
  });
1730
1730
  Object.defineProperty(exports, "SetupWizard", {
1731
1731
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -4,8 +4,8 @@ export { clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleMa
4
4
  export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from './chunk-36Y7OWES.mjs';
5
5
  export { TestimonialSection, fetchReviewStats, fetchReviews } from './chunk-APZMXRI3.mjs';
6
6
  import './chunk-N24BPFF6.mjs';
7
- export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, OfferingCard, OfferingList, ProductEmbed, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchNextEvent, fetchOffering, fetchOfferings, fetchProducts, fetchServices, fetchUpcomingEvents, formatDate, formatDateTime, formatPrice, getOfferingUrl, registerForEvent, useEventModal } from './chunk-LDK2GBEZ.mjs';
8
- export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './chunk-WW2DKGBM.mjs';
7
+ export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, OfferingCard, OfferingList, ProductEmbed, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchNextEvent, fetchOffering, fetchOfferings, fetchProducts, fetchServices, fetchUpcomingEvents, formatDate, formatDateTime, formatPrice, getOfferingUrl, registerForEvent, useEventModal } from './chunk-EG2FNRKR.mjs';
8
+ export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './chunk-ZU6YPEAF.mjs';
9
9
  export { SetupWizard } from './chunk-IKIJEKU3.mjs';
10
10
  import './chunk-VZMDH3R4.mjs';
11
11
  import { SitemapSync } from './chunk-HNCSTGVK.mjs';
@@ -1,57 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkV2WSPLCN_js = require('../chunk-V2WSPLCN.js');
3
+ var chunkIJ2LWZID_js = require('../chunk-IJ2LWZID.js');
4
4
  require('../chunk-ZSMWDLMK.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "BookingWidget", {
9
9
  enumerable: true,
10
- get: function () { return chunkV2WSPLCN_js.BookingWidget; }
10
+ get: function () { return chunkIJ2LWZID_js.BookingWidget; }
11
11
  });
12
12
  Object.defineProperty(exports, "createBooking", {
13
13
  enumerable: true,
14
- get: function () { return chunkV2WSPLCN_js.createBooking; }
14
+ get: function () { return chunkIJ2LWZID_js.createBooking; }
15
15
  });
16
16
  Object.defineProperty(exports, "createSlotHold", {
17
17
  enumerable: true,
18
- get: function () { return chunkV2WSPLCN_js.createSlotHold; }
18
+ get: function () { return chunkIJ2LWZID_js.createSlotHold; }
19
19
  });
20
20
  Object.defineProperty(exports, "detectTimezone", {
21
21
  enumerable: true,
22
- get: function () { return chunkV2WSPLCN_js.detectTimezone; }
22
+ get: function () { return chunkIJ2LWZID_js.detectTimezone; }
23
23
  });
24
24
  Object.defineProperty(exports, "fetchAvailability", {
25
25
  enumerable: true,
26
- get: function () { return chunkV2WSPLCN_js.fetchAvailability; }
26
+ get: function () { return chunkIJ2LWZID_js.fetchAvailability; }
27
27
  });
28
28
  Object.defineProperty(exports, "fetchAvailableDates", {
29
29
  enumerable: true,
30
- get: function () { return chunkV2WSPLCN_js.fetchAvailableDates; }
30
+ get: function () { return chunkIJ2LWZID_js.fetchAvailableDates; }
31
31
  });
32
32
  Object.defineProperty(exports, "fetchBookingTypeDetails", {
33
33
  enumerable: true,
34
- get: function () { return chunkV2WSPLCN_js.fetchBookingTypeDetails; }
34
+ get: function () { return chunkIJ2LWZID_js.fetchBookingTypeDetails; }
35
35
  });
36
36
  Object.defineProperty(exports, "fetchBookingTypes", {
37
37
  enumerable: true,
38
- get: function () { return chunkV2WSPLCN_js.fetchBookingTypes; }
38
+ get: function () { return chunkIJ2LWZID_js.fetchBookingTypes; }
39
39
  });
40
40
  Object.defineProperty(exports, "formatDate", {
41
41
  enumerable: true,
42
- get: function () { return chunkV2WSPLCN_js.formatDate; }
42
+ get: function () { return chunkIJ2LWZID_js.formatDate; }
43
43
  });
44
44
  Object.defineProperty(exports, "formatDuration", {
45
45
  enumerable: true,
46
- get: function () { return chunkV2WSPLCN_js.formatDuration; }
46
+ get: function () { return chunkIJ2LWZID_js.formatDuration; }
47
47
  });
48
48
  Object.defineProperty(exports, "formatTime", {
49
49
  enumerable: true,
50
- get: function () { return chunkV2WSPLCN_js.formatTime; }
50
+ get: function () { return chunkIJ2LWZID_js.formatTime; }
51
51
  });
52
52
  Object.defineProperty(exports, "releaseSlotHold", {
53
53
  enumerable: true,
54
- get: function () { return chunkV2WSPLCN_js.releaseSlotHold; }
54
+ get: function () { return chunkIJ2LWZID_js.releaseSlotHold; }
55
55
  });
56
56
  //# sourceMappingURL=index.js.map
57
57
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold } from '../chunk-WW2DKGBM.mjs';
1
+ export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate, formatDuration, formatTime, releaseSlotHold } from '../chunk-ZU6YPEAF.mjs';
2
2
  import '../chunk-4XPGGLVP.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map
@@ -17,7 +17,10 @@ interface CommerceOffering {
17
17
  short_description?: string;
18
18
  long_description?: string;
19
19
  featured_image_url?: string;
20
+ featured_image_id?: string;
20
21
  gallery_images?: string[];
22
+ /** Gallery image IDs in order, for mapping to metadata like model info */
23
+ gallery_image_ids?: string[];
21
24
  price_type: PriceType;
22
25
  price?: number;
23
26
  compare_at_price?: number;
@@ -47,6 +50,19 @@ interface CommerceOffering {
47
50
  seo_description?: string;
48
51
  features?: string[];
49
52
  specifications?: Record<string, string>;
53
+ metadata?: {
54
+ care_instructions?: string;
55
+ sizing_notes?: string;
56
+ notices?: string[];
57
+ /** Model info keyed by gallery image ID */
58
+ image_model_info?: Record<string, {
59
+ model_name?: string;
60
+ height?: string;
61
+ weight?: string;
62
+ wearing_size?: string;
63
+ }>;
64
+ [key: string]: any;
65
+ };
50
66
  schedules?: CommerceSchedule[];
51
67
  next_schedule?: CommerceSchedule;
52
68
  variants?: CommerceVariant[];
@@ -17,7 +17,10 @@ interface CommerceOffering {
17
17
  short_description?: string;
18
18
  long_description?: string;
19
19
  featured_image_url?: string;
20
+ featured_image_id?: string;
20
21
  gallery_images?: string[];
22
+ /** Gallery image IDs in order, for mapping to metadata like model info */
23
+ gallery_image_ids?: string[];
21
24
  price_type: PriceType;
22
25
  price?: number;
23
26
  compare_at_price?: number;
@@ -47,6 +50,19 @@ interface CommerceOffering {
47
50
  seo_description?: string;
48
51
  features?: string[];
49
52
  specifications?: Record<string, string>;
53
+ metadata?: {
54
+ care_instructions?: string;
55
+ sizing_notes?: string;
56
+ notices?: string[];
57
+ /** Model info keyed by gallery image ID */
58
+ image_model_info?: Record<string, {
59
+ model_name?: string;
60
+ height?: string;
61
+ weight?: string;
62
+ wearing_size?: string;
63
+ }>;
64
+ [key: string]: any;
65
+ };
50
66
  schedules?: CommerceSchedule[];
51
67
  next_schedule?: CommerceSchedule;
52
68
  variants?: CommerceVariant[];
@@ -1,4 +1,4 @@
1
- import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, b as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, R as RegistrationFormProps, c as CommerceSchedule } from './types-Bn7nF4Ty.mjs';
1
+ import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, b as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, R as RegistrationFormProps, c as CommerceSchedule } from './types-B0xmgGw-.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
 
4
4
  /**
@@ -124,7 +124,23 @@ interface CreateCheckoutOptions {
124
124
  shippingService?: string;
125
125
  /** Shipping cost in dollars (from selected rate) */
126
126
  shippingCost?: number;
127
+ /** Discount/promo code to apply */
128
+ discountCode?: string;
127
129
  }
130
+ interface DiscountValidationResult {
131
+ valid: boolean;
132
+ discount_amount?: number;
133
+ discount_type?: 'percentage' | 'fixed_amount' | 'free_shipping';
134
+ discount_value?: number;
135
+ code?: string;
136
+ name?: string;
137
+ message?: string;
138
+ }
139
+ /**
140
+ * Validate a discount code against the current order.
141
+ * Returns the discount amount if valid, or an error message if not.
142
+ */
143
+ declare function validateDiscountCode(code: string, subtotal: number, offeringIds?: string[]): Promise<DiscountValidationResult>;
128
144
  interface ProcessorConfig {
129
145
  processor: 'stripe' | 'square' | null;
130
146
  squareAppId?: string;
@@ -283,4 +299,4 @@ interface UseEventModalReturn {
283
299
  }
284
300
  declare function useEventModal(): UseEventModalReturn;
285
301
 
286
- export { formatPrice as A, formatDate as B, type CreateCheckoutOptions as C, formatDateTime as D, EventTile as E, formatTime as F, formatDateRange as G, getRelativeTimeUntil as H, getSpotsRemaining as I, isEventSoldOut as J, getOfferingUrl as K, OfferingCard as O, type ProcessorConfig as P, RegistrationForm as R, type ShippingAddress as S, UpcomingEvents as U, type ValidateAddressResult as V, fetchOffering as a, fetchLatestOffering as b, fetchProducts as c, fetchProductsPublic as d, fetchProductBySlug as e, fetchOfferings as f, fetchCategories as g, fetchServices as h, fetchUpcomingEvents as i, fetchNextEvent as j, fetchShippingRates as k, createCheckoutSession as l, createPaymentIntent as m, fetchActiveProcessor as n, fetchProcessorConfig as o, type ShippingRate as p, OfferingList as q, registerForEvent as r, ProductEmbed as s, EventEmbed as t, CheckoutForm as u, validateAddress as v, CalendarView as w, EventModal as x, EventCalendar as y, useEventModal as z };
302
+ export { useEventModal as A, formatPrice as B, type CreateCheckoutOptions as C, type DiscountValidationResult as D, EventTile as E, formatDate as F, formatDateTime as G, formatTime as H, formatDateRange as I, getRelativeTimeUntil as J, getSpotsRemaining as K, isEventSoldOut as L, getOfferingUrl as M, OfferingCard as O, type ProcessorConfig as P, RegistrationForm as R, type ShippingAddress as S, UpcomingEvents as U, type ValidateAddressResult as V, fetchOffering as a, fetchLatestOffering as b, fetchProducts as c, fetchProductsPublic as d, fetchProductBySlug as e, fetchOfferings as f, fetchCategories as g, fetchServices as h, fetchUpcomingEvents as i, fetchNextEvent as j, fetchShippingRates as k, createCheckoutSession as l, createPaymentIntent as m, fetchActiveProcessor as n, fetchProcessorConfig as o, validateDiscountCode as p, type ShippingRate as q, registerForEvent as r, OfferingList as s, ProductEmbed as t, EventEmbed as u, validateAddress as v, CheckoutForm as w, CalendarView as x, EventModal as y, EventCalendar as z };
@@ -1,4 +1,4 @@
1
- import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, b as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, R as RegistrationFormProps, c as CommerceSchedule } from './types-Bn7nF4Ty.js';
1
+ import { F as FetchOfferingsOptions, C as CommerceOffering, q as FetchEventsOptions, h as CheckoutCustomer, b as CheckoutResult, i as OfferingCardProps, j as OfferingListProps, E as EventTileProps, U as UpcomingEventsProps, l as ProductEmbedProps, m as EventEmbedProps, n as CheckoutFormProps, R as RegistrationFormProps, c as CommerceSchedule } from './types-B0xmgGw-.mjs';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
 
4
4
  /**
@@ -124,7 +124,23 @@ interface CreateCheckoutOptions {
124
124
  shippingService?: string;
125
125
  /** Shipping cost in dollars (from selected rate) */
126
126
  shippingCost?: number;
127
+ /** Discount/promo code to apply */
128
+ discountCode?: string;
127
129
  }
130
+ interface DiscountValidationResult {
131
+ valid: boolean;
132
+ discount_amount?: number;
133
+ discount_type?: 'percentage' | 'fixed_amount' | 'free_shipping';
134
+ discount_value?: number;
135
+ code?: string;
136
+ name?: string;
137
+ message?: string;
138
+ }
139
+ /**
140
+ * Validate a discount code against the current order.
141
+ * Returns the discount amount if valid, or an error message if not.
142
+ */
143
+ declare function validateDiscountCode(code: string, subtotal: number, offeringIds?: string[]): Promise<DiscountValidationResult>;
128
144
  interface ProcessorConfig {
129
145
  processor: 'stripe' | 'square' | null;
130
146
  squareAppId?: string;
@@ -283,4 +299,4 @@ interface UseEventModalReturn {
283
299
  }
284
300
  declare function useEventModal(): UseEventModalReturn;
285
301
 
286
- export { formatPrice as A, formatDate as B, type CreateCheckoutOptions as C, formatDateTime as D, EventTile as E, formatTime as F, formatDateRange as G, getRelativeTimeUntil as H, getSpotsRemaining as I, isEventSoldOut as J, getOfferingUrl as K, OfferingCard as O, type ProcessorConfig as P, RegistrationForm as R, type ShippingAddress as S, UpcomingEvents as U, type ValidateAddressResult as V, fetchOffering as a, fetchLatestOffering as b, fetchProducts as c, fetchProductsPublic as d, fetchProductBySlug as e, fetchOfferings as f, fetchCategories as g, fetchServices as h, fetchUpcomingEvents as i, fetchNextEvent as j, fetchShippingRates as k, createCheckoutSession as l, createPaymentIntent as m, fetchActiveProcessor as n, fetchProcessorConfig as o, type ShippingRate as p, OfferingList as q, registerForEvent as r, ProductEmbed as s, EventEmbed as t, CheckoutForm as u, validateAddress as v, CalendarView as w, EventModal as x, EventCalendar as y, useEventModal as z };
302
+ export { useEventModal as A, formatPrice as B, type CreateCheckoutOptions as C, type DiscountValidationResult as D, EventTile as E, formatDate as F, formatDateTime as G, formatTime as H, formatDateRange as I, getRelativeTimeUntil as J, getSpotsRemaining as K, isEventSoldOut as L, getOfferingUrl as M, OfferingCard as O, type ProcessorConfig as P, RegistrationForm as R, type ShippingAddress as S, UpcomingEvents as U, type ValidateAddressResult as V, fetchOffering as a, fetchLatestOffering as b, fetchProducts as c, fetchProductsPublic as d, fetchProductBySlug as e, fetchOfferings as f, fetchCategories as g, fetchServices as h, fetchUpcomingEvents as i, fetchNextEvent as j, fetchShippingRates as k, createCheckoutSession as l, createPaymentIntent as m, fetchActiveProcessor as n, fetchProcessorConfig as o, validateDiscountCode as p, type ShippingRate as q, registerForEvent as r, OfferingList as s, ProductEmbed as t, EventEmbed as u, validateAddress as v, CheckoutForm as w, CalendarView as x, EventModal as y, EventCalendar as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonordev/site-kit",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "Complete client-side integration kit for Sonor - SEO, Analytics, Engage, Forms, Blog",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",