@storepecker/storefront-core 2.0.0 → 2.1.1

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.
@@ -5,7 +5,8 @@ import { U as User, W as Wishlist } from '../wishlist-DHOvXmJj.cjs';
5
5
  import { b as Product, c as ProductDetail } from '../product-Dfi0ke-4.cjs';
6
6
  import { C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-BY8D8w-s.cjs';
7
7
  import { O as Order } from '../orders-DHJhJ3xz.cjs';
8
- import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-Dk-BoHUB.cjs';
8
+ import { C as CollectionResponse } from '../collections-CenI9AlQ.cjs';
9
+ import { R as Review, A as Analytics, B as Booking } from '../booking-BgZoXUBv.cjs';
9
10
  import 'react-toastify';
10
11
 
11
12
  declare function getHttpService(): AxiosInstance;
@@ -5,7 +5,8 @@ import { U as User, W as Wishlist } from '../wishlist-LfdFxddw.js';
5
5
  import { b as Product, c as ProductDetail } from '../product-Dfi0ke-4.js';
6
6
  import { C as Cart, d as CouponResponse, c as Coupon, b as Category } from '../cart-GuhgeBBt.js';
7
7
  import { O as Order } from '../orders-DHJhJ3xz.js';
8
- import { C as CollectionResponse, R as Review, A as Analytics, B as Booking } from '../booking-B39Ilxhg.js';
8
+ import { C as CollectionResponse } from '../collections-CenI9AlQ.js';
9
+ import { R as Review, A as Analytics, B as Booking } from '../booking-CZ59BXk3.js';
9
10
  import 'react-toastify';
10
11
 
11
12
  declare function getHttpService(): AxiosInstance;
@@ -1,44 +1,5 @@
1
1
  import { c as ProductDetail } from './product-Dfi0ke-4.cjs';
2
2
 
3
- interface CollectionResponse {
4
- id: number;
5
- title: string;
6
- description: string;
7
- slug: string;
8
- is_published: boolean;
9
- image: string | null;
10
- published_at: string | null;
11
- variants?: any[];
12
- }
13
- interface singleCollection {
14
- slug: string;
15
- }
16
- interface Attributes {
17
- [key: string]: {
18
- name: string;
19
- value: string;
20
- };
21
- }
22
- interface CollectionVariant {
23
- id: number;
24
- name: string;
25
- sku: string;
26
- actual_price: string;
27
- selling_price: string;
28
- stock_quantity: number;
29
- product: number;
30
- is_active: boolean;
31
- is_featured: boolean;
32
- product_measurements: string;
33
- attributes: Attributes;
34
- back_order: boolean;
35
- back_order_limit: number;
36
- user_purchase_limit: number;
37
- status: string;
38
- product_photos: any[];
39
- media: string;
40
- }
41
-
42
3
  declare namespace Review {
43
4
  interface ReviewPayload {
44
5
  review_type: "store" | "product";
@@ -128,4 +89,4 @@ interface Booking {
128
89
  service_details: ProductDetail.Root;
129
90
  }
130
91
 
131
- export { Analytics as A, type Booking as B, type CollectionResponse as C, Review as R, type BookingDetails as a, type Attributes as b, type CollectionVariant as c, type singleCollection as s };
92
+ export { Analytics as A, type Booking as B, Review as R, type BookingDetails as a };
@@ -1,44 +1,5 @@
1
1
  import { c as ProductDetail } from './product-Dfi0ke-4.js';
2
2
 
3
- interface CollectionResponse {
4
- id: number;
5
- title: string;
6
- description: string;
7
- slug: string;
8
- is_published: boolean;
9
- image: string | null;
10
- published_at: string | null;
11
- variants?: any[];
12
- }
13
- interface singleCollection {
14
- slug: string;
15
- }
16
- interface Attributes {
17
- [key: string]: {
18
- name: string;
19
- value: string;
20
- };
21
- }
22
- interface CollectionVariant {
23
- id: number;
24
- name: string;
25
- sku: string;
26
- actual_price: string;
27
- selling_price: string;
28
- stock_quantity: number;
29
- product: number;
30
- is_active: boolean;
31
- is_featured: boolean;
32
- product_measurements: string;
33
- attributes: Attributes;
34
- back_order: boolean;
35
- back_order_limit: number;
36
- user_purchase_limit: number;
37
- status: string;
38
- product_photos: any[];
39
- media: string;
40
- }
41
-
42
3
  declare namespace Review {
43
4
  interface ReviewPayload {
44
5
  review_type: "store" | "product";
@@ -128,4 +89,4 @@ interface Booking {
128
89
  service_details: ProductDetail.Root;
129
90
  }
130
91
 
131
- export { Analytics as A, type Booking as B, type CollectionResponse as C, Review as R, type BookingDetails as a, type Attributes as b, type CollectionVariant as c, type singleCollection as s };
92
+ export { Analytics as A, type Booking as B, Review as R, type BookingDetails as a };
@@ -0,0 +1,40 @@
1
+ interface CollectionResponse {
2
+ id: number;
3
+ title: string;
4
+ description: string;
5
+ slug: string;
6
+ is_published: boolean;
7
+ image: string | null;
8
+ published_at: string | null;
9
+ variants?: any[];
10
+ }
11
+ interface singleCollection {
12
+ slug: string;
13
+ }
14
+ interface Attributes {
15
+ [key: string]: {
16
+ name: string;
17
+ value: string;
18
+ };
19
+ }
20
+ interface CollectionVariant {
21
+ id: number;
22
+ name: string;
23
+ sku: string;
24
+ actual_price: string;
25
+ selling_price: string;
26
+ stock_quantity: number;
27
+ product: number;
28
+ is_active: boolean;
29
+ is_featured: boolean;
30
+ product_measurements: string;
31
+ attributes: Attributes;
32
+ back_order: boolean;
33
+ back_order_limit: number;
34
+ user_purchase_limit: number;
35
+ status: string;
36
+ product_photos: any[];
37
+ media: string;
38
+ }
39
+
40
+ export type { Attributes as A, CollectionResponse as C, CollectionVariant as a, singleCollection as s };
@@ -0,0 +1,40 @@
1
+ interface CollectionResponse {
2
+ id: number;
3
+ title: string;
4
+ description: string;
5
+ slug: string;
6
+ is_published: boolean;
7
+ image: string | null;
8
+ published_at: string | null;
9
+ variants?: any[];
10
+ }
11
+ interface singleCollection {
12
+ slug: string;
13
+ }
14
+ interface Attributes {
15
+ [key: string]: {
16
+ name: string;
17
+ value: string;
18
+ };
19
+ }
20
+ interface CollectionVariant {
21
+ id: number;
22
+ name: string;
23
+ sku: string;
24
+ actual_price: string;
25
+ selling_price: string;
26
+ stock_quantity: number;
27
+ product: number;
28
+ is_active: boolean;
29
+ is_featured: boolean;
30
+ product_measurements: string;
31
+ attributes: Attributes;
32
+ back_order: boolean;
33
+ back_order_limit: number;
34
+ user_purchase_limit: number;
35
+ status: string;
36
+ product_photos: any[];
37
+ media: string;
38
+ }
39
+
40
+ export type { Attributes as A, CollectionResponse as C, CollectionVariant as a, singleCollection as s };
@@ -1,6 +1,7 @@
1
1
  export { A as Address } from '../address-DQEZzyUG.cjs';
2
- export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-Dk-BoHUB.cjs';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BgZoXUBv.cjs';
3
3
  export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, V as ValueType } from '../cart-BY8D8w-s.cjs';
4
+ export { A as CollectionAttributes, C as CollectionResponse, a as CollectionVariant, s as singleCollection } from '../collections-CenI9AlQ.cjs';
4
5
  export { O as Order } from '../orders-DHJhJ3xz.cjs';
5
6
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.cjs';
6
7
  export { A as Attributes, B as BookingService, a as BookingServiceDate, C as CustomField, O as OperatingHours, P as Photos, b as Product, c as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Dfi0ke-4.cjs';
@@ -1,6 +1,7 @@
1
1
  export { A as Address } from '../address-DQEZzyUG.js';
2
- export { A as Analytics, B as Booking, a as BookingDetails, b as CollectionAttributes, C as CollectionResponse, c as CollectionVariant, R as Review, s as singleCollection } from '../booking-B39Ilxhg.js';
2
+ export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-CZ59BXk3.js';
3
3
  export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, V as ValueType } from '../cart-GuhgeBBt.js';
4
+ export { A as CollectionAttributes, C as CollectionResponse, a as CollectionVariant, s as singleCollection } from '../collections-CenI9AlQ.js';
4
5
  export { O as Order } from '../orders-DHJhJ3xz.js';
5
6
  export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-D7vn-9SR.js';
6
7
  export { A as Attributes, B as BookingService, a as BookingServiceDate, C as CustomField, O as OperatingHours, P as Photos, b as Product, c as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-Dfi0ke-4.js';
@@ -2,6 +2,7 @@ import { c as ProductDetail, b as Product, O as OperatingHours, T as TimeSlot, A
2
2
  export { e as ADDRESS_FORM_SESSION_KEY, f as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, g as PRODUCT_STATUSES, d as SLICE_STATUS, U as USER_CART, h as USER_CREDENTIALS, i as USER_CRED_REFRESH_TOKEN, j as USER_CRED_TOKEN, p as pathNameMap } from '../product-Dfi0ke-4.cjs';
3
3
  import { C as Cart, b as Category$1 } from '../cart-BY8D8w-s.cjs';
4
4
  export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.cjs';
5
+ import { C as CollectionResponse } from '../collections-CenI9AlQ.cjs';
5
6
  import { AxiosResponse } from 'axios';
6
7
  import { a as PhonePe } from '../phonepe-D7vn-9SR.cjs';
7
8
  import { O as Order } from '../orders-DHJhJ3xz.cjs';
@@ -347,16 +348,30 @@ interface ImageWithText {
347
348
  showCta: boolean;
348
349
  ctaText: string;
349
350
  ctaLink: string;
351
+ imagePosition: 'left' | 'right';
350
352
  }
351
353
  interface Collections {
352
354
  type: "collections";
353
355
  id: string;
354
- title: string;
355
356
  slug: string;
356
- items: string[];
357
+ title?: string;
358
+ description?: string;
359
+ variants?: CollectionResponse[];
357
360
  }
358
- type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections";
359
- type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections;
361
+ interface ValueHighlights {
362
+ type: "value-highlights";
363
+ id: string;
364
+ title: string;
365
+ description: string;
366
+ highlights: {
367
+ value: string;
368
+ label: string;
369
+ image: string;
370
+ social: null | string;
371
+ }[];
372
+ }
373
+ type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights";
374
+ type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights;
360
375
  interface Footer {
361
376
  showSocialLinks: boolean;
362
377
  showContactDetails: boolean;
@@ -555,4 +570,4 @@ declare function isProductCustomized(customizationInputs: Array<{
555
570
  [key: string]: any;
556
571
  }> | undefined, productId: number): boolean;
557
572
 
558
- export { Auth, type AvailableFilter, type Banner, CacheManager, type Category, type CategoryHighlights, type Collections, type ColorScheme, type FilterOption, type FilterType, type Footer, type HeaderCategory, type Hero, type HomePageContents, type ImageWithText, LocalCart, type LocationData, type Logo, type Menuitem, type NavBar, type NavElement, type NavElementOld, type PageHeaderProps, type PageMeta, type PageProps, type PagePropsFull, PhonepePayment, type PreFooter, type ProductCollection, type ProductHighlight, type RibbonBar, type RibbonMessage, type Section, type SectionFilters, type SectionType, type SliderSettings, type SocialLinks, type SocialMedia, type StoreReview, type SubCategory, type SubCategorySection, type TemplateTheme, type Theme, authRoutes, cache, calculateDiscountPercent, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, findMatchingVariant, findSimilarVariant, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, isColorVariantType, isExpired, isProductCustomized, isVariantCombinationAvailable, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
573
+ export { Auth, type AvailableFilter, type Banner, CacheManager, type Category, type CategoryHighlights, type Collections, type ColorScheme, type FilterOption, type FilterType, type Footer, type HeaderCategory, type Hero, type HomePageContents, type ImageWithText, LocalCart, type LocationData, type Logo, type Menuitem, type NavBar, type NavElement, type NavElementOld, type PageHeaderProps, type PageMeta, type PageProps, type PagePropsFull, PhonepePayment, type PreFooter, type ProductCollection, type ProductHighlight, type RibbonBar, type RibbonMessage, type Section, type SectionFilters, type SectionType, type SliderSettings, type SocialLinks, type SocialMedia, type StoreReview, type SubCategory, type SubCategorySection, type TemplateTheme, type Theme, type ValueHighlights, authRoutes, cache, calculateDiscountPercent, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, findMatchingVariant, findSimilarVariant, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, isColorVariantType, isExpired, isProductCustomized, isVariantCombinationAvailable, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
@@ -2,6 +2,7 @@ import { c as ProductDetail, b as Product, O as OperatingHours, T as TimeSlot, A
2
2
  export { e as ADDRESS_FORM_SESSION_KEY, f as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, g as PRODUCT_STATUSES, d as SLICE_STATUS, U as USER_CART, h as USER_CREDENTIALS, i as USER_CRED_REFRESH_TOKEN, j as USER_CRED_TOKEN, p as pathNameMap } from '../product-Dfi0ke-4.js';
3
3
  import { C as Cart, b as Category$1 } from '../cart-GuhgeBBt.js';
4
4
  export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.js';
5
+ import { C as CollectionResponse } from '../collections-CenI9AlQ.js';
5
6
  import { AxiosResponse } from 'axios';
6
7
  import { a as PhonePe } from '../phonepe-D7vn-9SR.js';
7
8
  import { O as Order } from '../orders-DHJhJ3xz.js';
@@ -347,16 +348,30 @@ interface ImageWithText {
347
348
  showCta: boolean;
348
349
  ctaText: string;
349
350
  ctaLink: string;
351
+ imagePosition: 'left' | 'right';
350
352
  }
351
353
  interface Collections {
352
354
  type: "collections";
353
355
  id: string;
354
- title: string;
355
356
  slug: string;
356
- items: string[];
357
+ title?: string;
358
+ description?: string;
359
+ variants?: CollectionResponse[];
357
360
  }
358
- type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections";
359
- type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections;
361
+ interface ValueHighlights {
362
+ type: "value-highlights";
363
+ id: string;
364
+ title: string;
365
+ description: string;
366
+ highlights: {
367
+ value: string;
368
+ label: string;
369
+ image: string;
370
+ social: null | string;
371
+ }[];
372
+ }
373
+ type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights";
374
+ type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights;
360
375
  interface Footer {
361
376
  showSocialLinks: boolean;
362
377
  showContactDetails: boolean;
@@ -555,4 +570,4 @@ declare function isProductCustomized(customizationInputs: Array<{
555
570
  [key: string]: any;
556
571
  }> | undefined, productId: number): boolean;
557
572
 
558
- export { Auth, type AvailableFilter, type Banner, CacheManager, type Category, type CategoryHighlights, type Collections, type ColorScheme, type FilterOption, type FilterType, type Footer, type HeaderCategory, type Hero, type HomePageContents, type ImageWithText, LocalCart, type LocationData, type Logo, type Menuitem, type NavBar, type NavElement, type NavElementOld, type PageHeaderProps, type PageMeta, type PageProps, type PagePropsFull, PhonepePayment, type PreFooter, type ProductCollection, type ProductHighlight, type RibbonBar, type RibbonMessage, type Section, type SectionFilters, type SectionType, type SliderSettings, type SocialLinks, type SocialMedia, type StoreReview, type SubCategory, type SubCategorySection, type TemplateTheme, type Theme, authRoutes, cache, calculateDiscountPercent, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, findMatchingVariant, findSimilarVariant, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, isColorVariantType, isExpired, isProductCustomized, isVariantCombinationAvailable, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
573
+ export { Auth, type AvailableFilter, type Banner, CacheManager, type Category, type CategoryHighlights, type Collections, type ColorScheme, type FilterOption, type FilterType, type Footer, type HeaderCategory, type Hero, type HomePageContents, type ImageWithText, LocalCart, type LocationData, type Logo, type Menuitem, type NavBar, type NavElement, type NavElementOld, type PageHeaderProps, type PageMeta, type PageProps, type PagePropsFull, PhonepePayment, type PreFooter, type ProductCollection, type ProductHighlight, type RibbonBar, type RibbonMessage, type Section, type SectionFilters, type SectionType, type SliderSettings, type SocialLinks, type SocialMedia, type StoreReview, type SubCategory, type SubCategorySection, type TemplateTheme, type Theme, type ValueHighlights, authRoutes, cache, calculateDiscountPercent, clearCache, constructFilter, convertObjectToParams, convertToCurrency, cropImage, debounce, deleteCache, digestMessage, findMatchingVariant, findSimilarVariant, formatBookingDateTime, formatDateTime, formatPostalLabel, generateCacheKey, generateTimeOptions, getAddressMeta, getAvailableDaysText, getCache, getDelayInMilliseconds, getNextAvailableDate, getParamsFromURL, getQueryParams, getTimeConstraints, getUniqueId, hasCache, invalidateCache, isAvailableDay, isColorVariantType, isExpired, isProductCustomized, isVariantCombinationAvailable, pixelEvents, pluralize, type preFooterContent, protectedRoutes, publicRoutes, pushParamsToURL, setAuthTokenChangeCallback, setCache, shareLink, timeFromNow, urls };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storepecker/storefront-core",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "Shared logic and utilities for Snapstore themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",