@storepecker/storefront-core 2.1.1 → 2.2.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.
- package/dist/{address-DQEZzyUG.d.cts → address-DwBZHzbI.d.cts} +2 -2
- package/dist/{address-DQEZzyUG.d.ts → address-DwBZHzbI.d.ts} +2 -2
- package/dist/api/index.cjs +25 -17
- package/dist/api/index.d.cts +50 -17
- package/dist/api/index.d.ts +50 -17
- package/dist/api/index.js +9 -2
- package/dist/{booking-CZ59BXk3.d.ts → booking-BGvxHd-t.d.cts} +2 -2
- package/dist/{booking-BgZoXUBv.d.cts → booking-BSZ6NP-e.d.ts} +2 -2
- package/dist/{cart-BY8D8w-s.d.cts → cart-CfsntcpS.d.ts} +38 -5
- package/dist/{cart-GuhgeBBt.d.ts → cart-XumsY-y0.d.cts} +38 -5
- package/dist/checkout/index.d.cts +3 -3
- package/dist/checkout/index.d.ts +3 -3
- package/dist/{chunk-26A3EBZI.cjs → chunk-A67PCF55.cjs} +1 -2
- package/dist/{chunk-Y6NFUWTH.js → chunk-ERLBPVFK.js} +1 -2
- package/dist/{chunk-PWYWNRVO.cjs → chunk-JVSR6THX.cjs} +6 -6
- package/dist/{chunk-UOFTDL4D.js → chunk-ZKHQPHT5.js} +1 -1
- package/dist/collections-D4tvWcZp.d.ts +23 -0
- package/dist/collections-dCr3VEJo.d.cts +23 -0
- package/dist/components/index.d.cts +11 -11
- package/dist/components/index.d.ts +11 -11
- package/dist/hooks/index.cjs +16 -16
- package/dist/hooks/index.d.cts +24 -18
- package/dist/hooks/index.d.ts +24 -18
- package/dist/hooks/index.js +7 -7
- package/dist/models/index.d.cts +8 -8
- package/dist/models/index.d.ts +8 -8
- package/dist/{orders-DHJhJ3xz.d.cts → orders-CvCa7XWm.d.ts} +19 -17
- package/dist/{orders-DHJhJ3xz.d.ts → orders-Dm5Dq02y.d.cts} +19 -17
- package/dist/{phonepe-D7vn-9SR.d.cts → phonepe-dWMLZel6.d.cts} +3 -3
- package/dist/{phonepe-D7vn-9SR.d.ts → phonepe-dWMLZel6.d.ts} +3 -3
- package/dist/{product-Dfi0ke-4.d.cts → product-Daxj09p9.d.cts} +64 -61
- package/dist/{product-Dfi0ke-4.d.ts → product-Daxj09p9.d.ts} +64 -61
- package/dist/store/index.cjs +10 -10
- package/dist/store/index.d.cts +8 -4
- package/dist/store/index.d.ts +8 -4
- package/dist/store/index.js +5 -5
- package/dist/{useAddressForm-DgkCP1nG.d.cts → useAddressForm-DGbEn91-.d.cts} +1 -1
- package/dist/{useAddressForm-C-Uzug4d.d.ts → useAddressForm-cO3Au33k.d.ts} +1 -1
- package/dist/utils/index.d.cts +6 -6
- package/dist/utils/index.d.ts +6 -6
- package/dist/wishlist-Cow1wVqf.d.cts +10 -0
- package/dist/wishlist-gamNg0T1.d.ts +10 -0
- package/package.json +1 -1
- package/dist/collections-CenI9AlQ.d.cts +0 -40
- package/dist/collections-CenI9AlQ.d.ts +0 -40
- package/dist/wishlist-DHOvXmJj.d.cts +0 -41
- package/dist/wishlist-LfdFxddw.d.ts +0 -41
package/dist/store/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart } from '../cart-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-XumsY-y0.cjs';
|
|
3
|
+
import { W as Wishlist } from '../wishlist-Cow1wVqf.cjs';
|
|
4
|
+
import { d as Product } from '../product-Daxj09p9.cjs';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
interface CartStore extends CartState {
|
|
@@ -20,7 +20,11 @@ interface CartStore extends CartState {
|
|
|
20
20
|
addToCart: (items: Array<{
|
|
21
21
|
variant_id: number;
|
|
22
22
|
quantity: number;
|
|
23
|
-
}>, customizationInputs?:
|
|
23
|
+
}>, customizationInputs?: Array<{
|
|
24
|
+
customization_option: number;
|
|
25
|
+
customer_input: string;
|
|
26
|
+
product_variant: number;
|
|
27
|
+
}>, addressId?: number) => Promise<void>;
|
|
24
28
|
removeFromCart: (items: Array<{
|
|
25
29
|
variant_id: number;
|
|
26
30
|
quantity: number;
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart } from '../cart-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-CfsntcpS.js';
|
|
3
|
+
import { W as Wishlist } from '../wishlist-gamNg0T1.js';
|
|
4
|
+
import { d as Product } from '../product-Daxj09p9.js';
|
|
5
5
|
import 'react-toastify';
|
|
6
6
|
|
|
7
7
|
interface CartStore extends CartState {
|
|
@@ -20,7 +20,11 @@ interface CartStore extends CartState {
|
|
|
20
20
|
addToCart: (items: Array<{
|
|
21
21
|
variant_id: number;
|
|
22
22
|
quantity: number;
|
|
23
|
-
}>, customizationInputs?:
|
|
23
|
+
}>, customizationInputs?: Array<{
|
|
24
|
+
customization_option: number;
|
|
25
|
+
customer_input: string;
|
|
26
|
+
product_variant: number;
|
|
27
|
+
}>, addressId?: number) => Promise<void>;
|
|
24
28
|
removeFromCart: (items: Array<{
|
|
25
29
|
variant_id: number;
|
|
26
30
|
quantity: number;
|
package/dist/store/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { loginUser, useAuthStore, useCartStore } from '../chunk-
|
|
2
|
-
import { getWishlist, getProducts } from '../chunk-
|
|
1
|
+
export { loginUser, useAuthStore, useCartStore } from '../chunk-ZKHQPHT5.js';
|
|
2
|
+
import { getWishlist, getProducts } from '../chunk-ERLBPVFK.js';
|
|
3
3
|
import '../chunk-QAC72HKO.js';
|
|
4
4
|
import '../chunk-JWKDXFS4.js';
|
|
5
5
|
import '../chunk-WEMNXIRS.js';
|
|
@@ -18,10 +18,10 @@ var useWishlistStore = create((set) => ({
|
|
|
18
18
|
syncWishlist: async () => {
|
|
19
19
|
try {
|
|
20
20
|
const response = await getWishlist("/customer/wishlist/");
|
|
21
|
-
if (response) {
|
|
21
|
+
if (response.data) {
|
|
22
22
|
set({
|
|
23
|
-
wishlist_count: response.wishlist_count,
|
|
24
|
-
product_variants: response.product_variants
|
|
23
|
+
wishlist_count: response.data.wishlist_count,
|
|
24
|
+
product_variants: response.data.product_variants
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
} catch {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { useFormik } from 'formik';
|
|
3
|
-
import { A as Address } from './address-
|
|
3
|
+
import { A as Address } from './address-DwBZHzbI.cjs';
|
|
4
4
|
|
|
5
5
|
interface UseAddressFormOptions {
|
|
6
6
|
/** Existing address for edit mode. When provided, form prefills from this address. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { useFormik } from 'formik';
|
|
3
|
-
import { A as Address } from './address-
|
|
3
|
+
import { A as Address } from './address-DwBZHzbI.js';
|
|
4
4
|
|
|
5
5
|
interface UseAddressFormOptions {
|
|
6
6
|
/** Existing address for edit mode. When provided, form prefills from this address. */
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { C as Cart, b as Category$1 } from '../cart-
|
|
1
|
+
import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-Daxj09p9.cjs';
|
|
2
|
+
export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-Daxj09p9.cjs';
|
|
3
|
+
import { C as Cart, b as Category$1 } from '../cart-XumsY-y0.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-
|
|
5
|
+
import { C as CollectionResponse } from '../collections-dCr3VEJo.cjs';
|
|
6
6
|
import { AxiosResponse } from 'axios';
|
|
7
|
-
import { a as PhonePe } from '../phonepe-
|
|
8
|
-
import { O as Order } from '../orders-
|
|
7
|
+
import { a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
|
8
|
+
import { O as Order } from '../orders-Dm5Dq02y.cjs';
|
|
9
9
|
import 'react-toastify';
|
|
10
10
|
|
|
11
11
|
declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { C as Cart, b as Category$1 } from '../cart-
|
|
1
|
+
import { f as ProductDetail, d as Product, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-Daxj09p9.js';
|
|
2
|
+
export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-Daxj09p9.js';
|
|
3
|
+
import { C as Cart, b as Category$1 } from '../cart-CfsntcpS.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-
|
|
5
|
+
import { C as CollectionResponse } from '../collections-D4tvWcZp.js';
|
|
6
6
|
import { AxiosResponse } from 'axios';
|
|
7
|
-
import { a as PhonePe } from '../phonepe-
|
|
8
|
-
import { O as Order } from '../orders-
|
|
7
|
+
import { a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
8
|
+
import { O as Order } from '../orders-CvCa7XWm.js';
|
|
9
9
|
import 'react-toastify';
|
|
10
10
|
|
|
11
11
|
declare function setAuthTokenChangeCallback(callback: (token: string | undefined) => void): void;
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
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,40 +0,0 @@
|
|
|
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,41 +0,0 @@
|
|
|
1
|
-
import { d as SLICE_STATUS, c as ProductDetail } from './product-Dfi0ke-4.cjs';
|
|
2
|
-
|
|
3
|
-
declare namespace User {
|
|
4
|
-
interface Root {
|
|
5
|
-
customer_name: string;
|
|
6
|
-
phone: string;
|
|
7
|
-
email: string;
|
|
8
|
-
date_of_birth: string;
|
|
9
|
-
country_code: string;
|
|
10
|
-
gender: string;
|
|
11
|
-
}
|
|
12
|
-
interface UserState {
|
|
13
|
-
user: LoginUserData | null;
|
|
14
|
-
isAuthenticated: boolean;
|
|
15
|
-
status: SLICE_STATUS;
|
|
16
|
-
}
|
|
17
|
-
interface LoginUserData {
|
|
18
|
-
email: string;
|
|
19
|
-
first_name: string;
|
|
20
|
-
last_name: string;
|
|
21
|
-
access: string;
|
|
22
|
-
refresh: string;
|
|
23
|
-
user_id: number;
|
|
24
|
-
phone_number: string;
|
|
25
|
-
}
|
|
26
|
-
interface UserDetailsPayload {
|
|
27
|
-
customer_name: string;
|
|
28
|
-
gender: string;
|
|
29
|
-
date_of_birth: string;
|
|
30
|
-
}
|
|
31
|
-
type LoginMethod = "email_otp" | "phone_otp";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare namespace Wishlist {
|
|
35
|
-
interface Root {
|
|
36
|
-
wishlist_count: number;
|
|
37
|
-
product_variants: ProductDetail.Root[];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { User as U, Wishlist as W };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { d as SLICE_STATUS, c as ProductDetail } from './product-Dfi0ke-4.js';
|
|
2
|
-
|
|
3
|
-
declare namespace User {
|
|
4
|
-
interface Root {
|
|
5
|
-
customer_name: string;
|
|
6
|
-
phone: string;
|
|
7
|
-
email: string;
|
|
8
|
-
date_of_birth: string;
|
|
9
|
-
country_code: string;
|
|
10
|
-
gender: string;
|
|
11
|
-
}
|
|
12
|
-
interface UserState {
|
|
13
|
-
user: LoginUserData | null;
|
|
14
|
-
isAuthenticated: boolean;
|
|
15
|
-
status: SLICE_STATUS;
|
|
16
|
-
}
|
|
17
|
-
interface LoginUserData {
|
|
18
|
-
email: string;
|
|
19
|
-
first_name: string;
|
|
20
|
-
last_name: string;
|
|
21
|
-
access: string;
|
|
22
|
-
refresh: string;
|
|
23
|
-
user_id: number;
|
|
24
|
-
phone_number: string;
|
|
25
|
-
}
|
|
26
|
-
interface UserDetailsPayload {
|
|
27
|
-
customer_name: string;
|
|
28
|
-
gender: string;
|
|
29
|
-
date_of_birth: string;
|
|
30
|
-
}
|
|
31
|
-
type LoginMethod = "email_otp" | "phone_otp";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare namespace Wishlist {
|
|
35
|
-
interface Root {
|
|
36
|
-
wishlist_count: number;
|
|
37
|
-
product_variants: ProductDetail.Root[];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { User as U, Wishlist as W };
|