hey-pharmacist-ecommerce 1.0.7 → 1.0.9
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.d.mts +231 -33
- package/dist/index.d.ts +231 -33
- package/dist/index.js +471 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +470 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/index.ts +1 -0
- package/src/providers/EcommerceProvider.tsx +5 -2
- package/styles/globals.css +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
|
|
4
4
|
interface EcommerceConfig {
|
|
@@ -2220,6 +2220,141 @@ interface LoginDto {
|
|
|
2220
2220
|
password: string;
|
|
2221
2221
|
}
|
|
2222
2222
|
|
|
2223
|
+
/**
|
|
2224
|
+
* Hey Pharamcist API
|
|
2225
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
2226
|
+
*
|
|
2227
|
+
* OpenAPI spec version: 1.0
|
|
2228
|
+
*
|
|
2229
|
+
*
|
|
2230
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
2231
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
2232
|
+
* Do not edit the class manually.
|
|
2233
|
+
*/
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
*
|
|
2237
|
+
* @export
|
|
2238
|
+
* @interface Product
|
|
2239
|
+
*/
|
|
2240
|
+
interface Product {
|
|
2241
|
+
_id?: string;
|
|
2242
|
+
/**
|
|
2243
|
+
*
|
|
2244
|
+
* @type {Date}
|
|
2245
|
+
* @memberof Product
|
|
2246
|
+
*/
|
|
2247
|
+
createdAt: Date;
|
|
2248
|
+
/**
|
|
2249
|
+
*
|
|
2250
|
+
* @type {Date}
|
|
2251
|
+
* @memberof Product
|
|
2252
|
+
*/
|
|
2253
|
+
updatedAt: Date;
|
|
2254
|
+
/**
|
|
2255
|
+
*
|
|
2256
|
+
* @type {string}
|
|
2257
|
+
* @memberof Product
|
|
2258
|
+
*/
|
|
2259
|
+
id: string;
|
|
2260
|
+
/**
|
|
2261
|
+
*
|
|
2262
|
+
* @type {Array<string>}
|
|
2263
|
+
* @memberof Product
|
|
2264
|
+
*/
|
|
2265
|
+
parentSubCategories: Array<string>;
|
|
2266
|
+
/**
|
|
2267
|
+
*
|
|
2268
|
+
* @type {Array<string>}
|
|
2269
|
+
* @memberof Product
|
|
2270
|
+
*/
|
|
2271
|
+
parentCategories: Array<string>;
|
|
2272
|
+
/**
|
|
2273
|
+
*
|
|
2274
|
+
* @type {Array<string>}
|
|
2275
|
+
* @memberof Product
|
|
2276
|
+
*/
|
|
2277
|
+
productVariants: Array<string>;
|
|
2278
|
+
/**
|
|
2279
|
+
*
|
|
2280
|
+
* @type {string}
|
|
2281
|
+
* @memberof Product
|
|
2282
|
+
*/
|
|
2283
|
+
storeId: string;
|
|
2284
|
+
/**
|
|
2285
|
+
*
|
|
2286
|
+
* @type {string}
|
|
2287
|
+
* @memberof Product
|
|
2288
|
+
*/
|
|
2289
|
+
name: string;
|
|
2290
|
+
/**
|
|
2291
|
+
*
|
|
2292
|
+
* @type {string}
|
|
2293
|
+
* @memberof Product
|
|
2294
|
+
*/
|
|
2295
|
+
description: string;
|
|
2296
|
+
/**
|
|
2297
|
+
*
|
|
2298
|
+
* @type {Array<SingleProductMedia>}
|
|
2299
|
+
* @memberof Product
|
|
2300
|
+
*/
|
|
2301
|
+
productMedia: Array<SingleProductMedia>;
|
|
2302
|
+
/**
|
|
2303
|
+
*
|
|
2304
|
+
* @type {Array<string>}
|
|
2305
|
+
* @memberof Product
|
|
2306
|
+
*/
|
|
2307
|
+
tags: Array<string>;
|
|
2308
|
+
/**
|
|
2309
|
+
*
|
|
2310
|
+
* @type {boolean}
|
|
2311
|
+
* @memberof Product
|
|
2312
|
+
*/
|
|
2313
|
+
isActive: boolean;
|
|
2314
|
+
/**
|
|
2315
|
+
*
|
|
2316
|
+
* @type {string}
|
|
2317
|
+
* @memberof Product
|
|
2318
|
+
*/
|
|
2319
|
+
brand: string;
|
|
2320
|
+
/**
|
|
2321
|
+
*
|
|
2322
|
+
* @type {Array<string>}
|
|
2323
|
+
* @memberof Product
|
|
2324
|
+
*/
|
|
2325
|
+
embedding: Array<string>;
|
|
2326
|
+
/**
|
|
2327
|
+
*
|
|
2328
|
+
* @type {string}
|
|
2329
|
+
* @memberof Product
|
|
2330
|
+
*/
|
|
2331
|
+
sku: string;
|
|
2332
|
+
/**
|
|
2333
|
+
*
|
|
2334
|
+
* @type {Array<string>}
|
|
2335
|
+
* @memberof Product
|
|
2336
|
+
*/
|
|
2337
|
+
frequentlyBoughtProducts: Array<string>;
|
|
2338
|
+
/**
|
|
2339
|
+
*
|
|
2340
|
+
* @type {boolean}
|
|
2341
|
+
* @memberof Product
|
|
2342
|
+
*/
|
|
2343
|
+
showStock: boolean;
|
|
2344
|
+
/**
|
|
2345
|
+
*
|
|
2346
|
+
* @type {Array<string>}
|
|
2347
|
+
* @memberof Product
|
|
2348
|
+
*/
|
|
2349
|
+
reviews: Array<string>;
|
|
2350
|
+
/**
|
|
2351
|
+
*
|
|
2352
|
+
* @type {string}
|
|
2353
|
+
* @memberof Product
|
|
2354
|
+
*/
|
|
2355
|
+
upc: string;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2223
2358
|
/**
|
|
2224
2359
|
* Hey Pharamcist API
|
|
2225
2360
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
@@ -3573,6 +3708,56 @@ declare enum UpdateUserDtoCustomerTypeEnum {
|
|
|
3573
3708
|
Regular = "Regular"
|
|
3574
3709
|
}
|
|
3575
3710
|
|
|
3711
|
+
/**
|
|
3712
|
+
* Hey Pharamcist API
|
|
3713
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
3714
|
+
*
|
|
3715
|
+
* OpenAPI spec version: 1.0
|
|
3716
|
+
*
|
|
3717
|
+
*
|
|
3718
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
3719
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
3720
|
+
* Do not edit the class manually.
|
|
3721
|
+
*/
|
|
3722
|
+
/**
|
|
3723
|
+
*
|
|
3724
|
+
* @export
|
|
3725
|
+
* @interface Wishlist
|
|
3726
|
+
*/
|
|
3727
|
+
interface Wishlist {
|
|
3728
|
+
_id?: string;
|
|
3729
|
+
/**
|
|
3730
|
+
*
|
|
3731
|
+
* @type {Date}
|
|
3732
|
+
* @memberof Wishlist
|
|
3733
|
+
*/
|
|
3734
|
+
createdAt: Date;
|
|
3735
|
+
/**
|
|
3736
|
+
*
|
|
3737
|
+
* @type {Date}
|
|
3738
|
+
* @memberof Wishlist
|
|
3739
|
+
*/
|
|
3740
|
+
updatedAt: Date;
|
|
3741
|
+
/**
|
|
3742
|
+
*
|
|
3743
|
+
* @type {string}
|
|
3744
|
+
* @memberof Wishlist
|
|
3745
|
+
*/
|
|
3746
|
+
userId: string;
|
|
3747
|
+
/**
|
|
3748
|
+
*
|
|
3749
|
+
* @type {Array<string>}
|
|
3750
|
+
* @memberof Wishlist
|
|
3751
|
+
*/
|
|
3752
|
+
products: Array<string>;
|
|
3753
|
+
/**
|
|
3754
|
+
*
|
|
3755
|
+
* @type {number}
|
|
3756
|
+
* @memberof Wishlist
|
|
3757
|
+
*/
|
|
3758
|
+
itemCount: number;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3576
3761
|
interface AuthContextValue {
|
|
3577
3762
|
user: UserEntity | null;
|
|
3578
3763
|
isAuthenticated: boolean;
|
|
@@ -3604,37 +3789,6 @@ interface CartProviderProps {
|
|
|
3604
3789
|
}
|
|
3605
3790
|
declare function CartProvider({ children }: CartProviderProps): React.JSX.Element;
|
|
3606
3791
|
|
|
3607
|
-
interface ShopScreenProps {
|
|
3608
|
-
initialFilters?: ProductFilters;
|
|
3609
|
-
categoryName?: string;
|
|
3610
|
-
}
|
|
3611
|
-
declare function ShopScreen({ initialFilters, categoryName }: ShopScreenProps): React.JSX.Element;
|
|
3612
|
-
|
|
3613
|
-
interface ProductDetailScreenProps {
|
|
3614
|
-
productId: string;
|
|
3615
|
-
}
|
|
3616
|
-
declare function ProductDetailScreen({ productId }: ProductDetailScreenProps): React.JSX.Element;
|
|
3617
|
-
|
|
3618
|
-
declare function CartScreen(): React.JSX.Element;
|
|
3619
|
-
|
|
3620
|
-
declare function CheckoutScreen(): React.JSX.Element | null;
|
|
3621
|
-
|
|
3622
|
-
declare function LoginScreen(): React.JSX.Element;
|
|
3623
|
-
|
|
3624
|
-
declare function RegisterScreen(): React.JSX.Element;
|
|
3625
|
-
|
|
3626
|
-
declare function ProfileScreen(): React.JSX.Element | null;
|
|
3627
|
-
|
|
3628
|
-
declare function OrdersScreen(): React.JSX.Element;
|
|
3629
|
-
|
|
3630
|
-
declare function CurrentOrdersScreen(): React.JSX.Element;
|
|
3631
|
-
|
|
3632
|
-
declare function AddressesScreen(): React.JSX.Element;
|
|
3633
|
-
|
|
3634
|
-
declare function Header(): React.JSX.Element;
|
|
3635
|
-
|
|
3636
|
-
declare function Footer(): React.JSX.Element;
|
|
3637
|
-
|
|
3638
3792
|
/**
|
|
3639
3793
|
* Hey Pharamcist API
|
|
3640
3794
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
@@ -3700,6 +3854,50 @@ declare class Configuration {
|
|
|
3700
3854
|
constructor(param?: ConfigurationParameters);
|
|
3701
3855
|
}
|
|
3702
3856
|
|
|
3857
|
+
interface WishlistContextType extends Wishlist {
|
|
3858
|
+
addToWishlist: (product: Product) => Promise<void>;
|
|
3859
|
+
removeFromWishlist: (productId: string) => Promise<void>;
|
|
3860
|
+
isInWishlist: (productId: string) => boolean;
|
|
3861
|
+
getWishlistCount: () => number;
|
|
3862
|
+
refreshWishlist: () => Promise<void>;
|
|
3863
|
+
clearWishlist: () => Promise<void>;
|
|
3864
|
+
}
|
|
3865
|
+
declare function WishlistProvider({ children }: {
|
|
3866
|
+
children: ReactNode;
|
|
3867
|
+
}): React.JSX.Element;
|
|
3868
|
+
declare const useWishlist: () => WishlistContextType;
|
|
3869
|
+
|
|
3870
|
+
interface ShopScreenProps {
|
|
3871
|
+
initialFilters?: ProductFilters;
|
|
3872
|
+
categoryName?: string;
|
|
3873
|
+
}
|
|
3874
|
+
declare function ShopScreen({ initialFilters, categoryName }: ShopScreenProps): React.JSX.Element;
|
|
3875
|
+
|
|
3876
|
+
interface ProductDetailScreenProps {
|
|
3877
|
+
productId: string;
|
|
3878
|
+
}
|
|
3879
|
+
declare function ProductDetailScreen({ productId }: ProductDetailScreenProps): React.JSX.Element;
|
|
3880
|
+
|
|
3881
|
+
declare function CartScreen(): React.JSX.Element;
|
|
3882
|
+
|
|
3883
|
+
declare function CheckoutScreen(): React.JSX.Element | null;
|
|
3884
|
+
|
|
3885
|
+
declare function LoginScreen(): React.JSX.Element;
|
|
3886
|
+
|
|
3887
|
+
declare function RegisterScreen(): React.JSX.Element;
|
|
3888
|
+
|
|
3889
|
+
declare function ProfileScreen(): React.JSX.Element | null;
|
|
3890
|
+
|
|
3891
|
+
declare function OrdersScreen(): React.JSX.Element;
|
|
3892
|
+
|
|
3893
|
+
declare function CurrentOrdersScreen(): React.JSX.Element;
|
|
3894
|
+
|
|
3895
|
+
declare function AddressesScreen(): React.JSX.Element;
|
|
3896
|
+
|
|
3897
|
+
declare function Header(): React.JSX.Element;
|
|
3898
|
+
|
|
3899
|
+
declare function Footer(): React.JSX.Element;
|
|
3900
|
+
|
|
3703
3901
|
interface ProductCardProps {
|
|
3704
3902
|
product: ExtendedProductDTO;
|
|
3705
3903
|
onClickProduct?: (product: ExtendedProductDTO) => void;
|
|
@@ -3881,4 +4079,4 @@ declare function generateColorShades(baseColor: string): {
|
|
|
3881
4079
|
950: string;
|
|
3882
4080
|
};
|
|
3883
4081
|
|
|
3884
|
-
export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, type Category, CheckoutScreen, CurrentOrdersScreen, type EcommerceConfig, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, OrderCard, OrderCardSkeleton, OrderStatus, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, type ProductFilters, ProfileScreen, RegisterScreen, ShopScreen, Skeleton, ThemeProvider, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme };
|
|
4082
|
+
export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, type Category, CheckoutScreen, CurrentOrdersScreen, type EcommerceConfig, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, OrderCard, OrderCardSkeleton, OrderStatus, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, type ProductFilters, ProfileScreen, RegisterScreen, ShopScreen, Skeleton, ThemeProvider, WishlistProvider, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme, useWishlist };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
|
|
4
4
|
interface EcommerceConfig {
|
|
@@ -2220,6 +2220,141 @@ interface LoginDto {
|
|
|
2220
2220
|
password: string;
|
|
2221
2221
|
}
|
|
2222
2222
|
|
|
2223
|
+
/**
|
|
2224
|
+
* Hey Pharamcist API
|
|
2225
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
2226
|
+
*
|
|
2227
|
+
* OpenAPI spec version: 1.0
|
|
2228
|
+
*
|
|
2229
|
+
*
|
|
2230
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
2231
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
2232
|
+
* Do not edit the class manually.
|
|
2233
|
+
*/
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
*
|
|
2237
|
+
* @export
|
|
2238
|
+
* @interface Product
|
|
2239
|
+
*/
|
|
2240
|
+
interface Product {
|
|
2241
|
+
_id?: string;
|
|
2242
|
+
/**
|
|
2243
|
+
*
|
|
2244
|
+
* @type {Date}
|
|
2245
|
+
* @memberof Product
|
|
2246
|
+
*/
|
|
2247
|
+
createdAt: Date;
|
|
2248
|
+
/**
|
|
2249
|
+
*
|
|
2250
|
+
* @type {Date}
|
|
2251
|
+
* @memberof Product
|
|
2252
|
+
*/
|
|
2253
|
+
updatedAt: Date;
|
|
2254
|
+
/**
|
|
2255
|
+
*
|
|
2256
|
+
* @type {string}
|
|
2257
|
+
* @memberof Product
|
|
2258
|
+
*/
|
|
2259
|
+
id: string;
|
|
2260
|
+
/**
|
|
2261
|
+
*
|
|
2262
|
+
* @type {Array<string>}
|
|
2263
|
+
* @memberof Product
|
|
2264
|
+
*/
|
|
2265
|
+
parentSubCategories: Array<string>;
|
|
2266
|
+
/**
|
|
2267
|
+
*
|
|
2268
|
+
* @type {Array<string>}
|
|
2269
|
+
* @memberof Product
|
|
2270
|
+
*/
|
|
2271
|
+
parentCategories: Array<string>;
|
|
2272
|
+
/**
|
|
2273
|
+
*
|
|
2274
|
+
* @type {Array<string>}
|
|
2275
|
+
* @memberof Product
|
|
2276
|
+
*/
|
|
2277
|
+
productVariants: Array<string>;
|
|
2278
|
+
/**
|
|
2279
|
+
*
|
|
2280
|
+
* @type {string}
|
|
2281
|
+
* @memberof Product
|
|
2282
|
+
*/
|
|
2283
|
+
storeId: string;
|
|
2284
|
+
/**
|
|
2285
|
+
*
|
|
2286
|
+
* @type {string}
|
|
2287
|
+
* @memberof Product
|
|
2288
|
+
*/
|
|
2289
|
+
name: string;
|
|
2290
|
+
/**
|
|
2291
|
+
*
|
|
2292
|
+
* @type {string}
|
|
2293
|
+
* @memberof Product
|
|
2294
|
+
*/
|
|
2295
|
+
description: string;
|
|
2296
|
+
/**
|
|
2297
|
+
*
|
|
2298
|
+
* @type {Array<SingleProductMedia>}
|
|
2299
|
+
* @memberof Product
|
|
2300
|
+
*/
|
|
2301
|
+
productMedia: Array<SingleProductMedia>;
|
|
2302
|
+
/**
|
|
2303
|
+
*
|
|
2304
|
+
* @type {Array<string>}
|
|
2305
|
+
* @memberof Product
|
|
2306
|
+
*/
|
|
2307
|
+
tags: Array<string>;
|
|
2308
|
+
/**
|
|
2309
|
+
*
|
|
2310
|
+
* @type {boolean}
|
|
2311
|
+
* @memberof Product
|
|
2312
|
+
*/
|
|
2313
|
+
isActive: boolean;
|
|
2314
|
+
/**
|
|
2315
|
+
*
|
|
2316
|
+
* @type {string}
|
|
2317
|
+
* @memberof Product
|
|
2318
|
+
*/
|
|
2319
|
+
brand: string;
|
|
2320
|
+
/**
|
|
2321
|
+
*
|
|
2322
|
+
* @type {Array<string>}
|
|
2323
|
+
* @memberof Product
|
|
2324
|
+
*/
|
|
2325
|
+
embedding: Array<string>;
|
|
2326
|
+
/**
|
|
2327
|
+
*
|
|
2328
|
+
* @type {string}
|
|
2329
|
+
* @memberof Product
|
|
2330
|
+
*/
|
|
2331
|
+
sku: string;
|
|
2332
|
+
/**
|
|
2333
|
+
*
|
|
2334
|
+
* @type {Array<string>}
|
|
2335
|
+
* @memberof Product
|
|
2336
|
+
*/
|
|
2337
|
+
frequentlyBoughtProducts: Array<string>;
|
|
2338
|
+
/**
|
|
2339
|
+
*
|
|
2340
|
+
* @type {boolean}
|
|
2341
|
+
* @memberof Product
|
|
2342
|
+
*/
|
|
2343
|
+
showStock: boolean;
|
|
2344
|
+
/**
|
|
2345
|
+
*
|
|
2346
|
+
* @type {Array<string>}
|
|
2347
|
+
* @memberof Product
|
|
2348
|
+
*/
|
|
2349
|
+
reviews: Array<string>;
|
|
2350
|
+
/**
|
|
2351
|
+
*
|
|
2352
|
+
* @type {string}
|
|
2353
|
+
* @memberof Product
|
|
2354
|
+
*/
|
|
2355
|
+
upc: string;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2223
2358
|
/**
|
|
2224
2359
|
* Hey Pharamcist API
|
|
2225
2360
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
@@ -3573,6 +3708,56 @@ declare enum UpdateUserDtoCustomerTypeEnum {
|
|
|
3573
3708
|
Regular = "Regular"
|
|
3574
3709
|
}
|
|
3575
3710
|
|
|
3711
|
+
/**
|
|
3712
|
+
* Hey Pharamcist API
|
|
3713
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
3714
|
+
*
|
|
3715
|
+
* OpenAPI spec version: 1.0
|
|
3716
|
+
*
|
|
3717
|
+
*
|
|
3718
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
3719
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
3720
|
+
* Do not edit the class manually.
|
|
3721
|
+
*/
|
|
3722
|
+
/**
|
|
3723
|
+
*
|
|
3724
|
+
* @export
|
|
3725
|
+
* @interface Wishlist
|
|
3726
|
+
*/
|
|
3727
|
+
interface Wishlist {
|
|
3728
|
+
_id?: string;
|
|
3729
|
+
/**
|
|
3730
|
+
*
|
|
3731
|
+
* @type {Date}
|
|
3732
|
+
* @memberof Wishlist
|
|
3733
|
+
*/
|
|
3734
|
+
createdAt: Date;
|
|
3735
|
+
/**
|
|
3736
|
+
*
|
|
3737
|
+
* @type {Date}
|
|
3738
|
+
* @memberof Wishlist
|
|
3739
|
+
*/
|
|
3740
|
+
updatedAt: Date;
|
|
3741
|
+
/**
|
|
3742
|
+
*
|
|
3743
|
+
* @type {string}
|
|
3744
|
+
* @memberof Wishlist
|
|
3745
|
+
*/
|
|
3746
|
+
userId: string;
|
|
3747
|
+
/**
|
|
3748
|
+
*
|
|
3749
|
+
* @type {Array<string>}
|
|
3750
|
+
* @memberof Wishlist
|
|
3751
|
+
*/
|
|
3752
|
+
products: Array<string>;
|
|
3753
|
+
/**
|
|
3754
|
+
*
|
|
3755
|
+
* @type {number}
|
|
3756
|
+
* @memberof Wishlist
|
|
3757
|
+
*/
|
|
3758
|
+
itemCount: number;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3576
3761
|
interface AuthContextValue {
|
|
3577
3762
|
user: UserEntity | null;
|
|
3578
3763
|
isAuthenticated: boolean;
|
|
@@ -3604,37 +3789,6 @@ interface CartProviderProps {
|
|
|
3604
3789
|
}
|
|
3605
3790
|
declare function CartProvider({ children }: CartProviderProps): React.JSX.Element;
|
|
3606
3791
|
|
|
3607
|
-
interface ShopScreenProps {
|
|
3608
|
-
initialFilters?: ProductFilters;
|
|
3609
|
-
categoryName?: string;
|
|
3610
|
-
}
|
|
3611
|
-
declare function ShopScreen({ initialFilters, categoryName }: ShopScreenProps): React.JSX.Element;
|
|
3612
|
-
|
|
3613
|
-
interface ProductDetailScreenProps {
|
|
3614
|
-
productId: string;
|
|
3615
|
-
}
|
|
3616
|
-
declare function ProductDetailScreen({ productId }: ProductDetailScreenProps): React.JSX.Element;
|
|
3617
|
-
|
|
3618
|
-
declare function CartScreen(): React.JSX.Element;
|
|
3619
|
-
|
|
3620
|
-
declare function CheckoutScreen(): React.JSX.Element | null;
|
|
3621
|
-
|
|
3622
|
-
declare function LoginScreen(): React.JSX.Element;
|
|
3623
|
-
|
|
3624
|
-
declare function RegisterScreen(): React.JSX.Element;
|
|
3625
|
-
|
|
3626
|
-
declare function ProfileScreen(): React.JSX.Element | null;
|
|
3627
|
-
|
|
3628
|
-
declare function OrdersScreen(): React.JSX.Element;
|
|
3629
|
-
|
|
3630
|
-
declare function CurrentOrdersScreen(): React.JSX.Element;
|
|
3631
|
-
|
|
3632
|
-
declare function AddressesScreen(): React.JSX.Element;
|
|
3633
|
-
|
|
3634
|
-
declare function Header(): React.JSX.Element;
|
|
3635
|
-
|
|
3636
|
-
declare function Footer(): React.JSX.Element;
|
|
3637
|
-
|
|
3638
3792
|
/**
|
|
3639
3793
|
* Hey Pharamcist API
|
|
3640
3794
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
@@ -3700,6 +3854,50 @@ declare class Configuration {
|
|
|
3700
3854
|
constructor(param?: ConfigurationParameters);
|
|
3701
3855
|
}
|
|
3702
3856
|
|
|
3857
|
+
interface WishlistContextType extends Wishlist {
|
|
3858
|
+
addToWishlist: (product: Product) => Promise<void>;
|
|
3859
|
+
removeFromWishlist: (productId: string) => Promise<void>;
|
|
3860
|
+
isInWishlist: (productId: string) => boolean;
|
|
3861
|
+
getWishlistCount: () => number;
|
|
3862
|
+
refreshWishlist: () => Promise<void>;
|
|
3863
|
+
clearWishlist: () => Promise<void>;
|
|
3864
|
+
}
|
|
3865
|
+
declare function WishlistProvider({ children }: {
|
|
3866
|
+
children: ReactNode;
|
|
3867
|
+
}): React.JSX.Element;
|
|
3868
|
+
declare const useWishlist: () => WishlistContextType;
|
|
3869
|
+
|
|
3870
|
+
interface ShopScreenProps {
|
|
3871
|
+
initialFilters?: ProductFilters;
|
|
3872
|
+
categoryName?: string;
|
|
3873
|
+
}
|
|
3874
|
+
declare function ShopScreen({ initialFilters, categoryName }: ShopScreenProps): React.JSX.Element;
|
|
3875
|
+
|
|
3876
|
+
interface ProductDetailScreenProps {
|
|
3877
|
+
productId: string;
|
|
3878
|
+
}
|
|
3879
|
+
declare function ProductDetailScreen({ productId }: ProductDetailScreenProps): React.JSX.Element;
|
|
3880
|
+
|
|
3881
|
+
declare function CartScreen(): React.JSX.Element;
|
|
3882
|
+
|
|
3883
|
+
declare function CheckoutScreen(): React.JSX.Element | null;
|
|
3884
|
+
|
|
3885
|
+
declare function LoginScreen(): React.JSX.Element;
|
|
3886
|
+
|
|
3887
|
+
declare function RegisterScreen(): React.JSX.Element;
|
|
3888
|
+
|
|
3889
|
+
declare function ProfileScreen(): React.JSX.Element | null;
|
|
3890
|
+
|
|
3891
|
+
declare function OrdersScreen(): React.JSX.Element;
|
|
3892
|
+
|
|
3893
|
+
declare function CurrentOrdersScreen(): React.JSX.Element;
|
|
3894
|
+
|
|
3895
|
+
declare function AddressesScreen(): React.JSX.Element;
|
|
3896
|
+
|
|
3897
|
+
declare function Header(): React.JSX.Element;
|
|
3898
|
+
|
|
3899
|
+
declare function Footer(): React.JSX.Element;
|
|
3900
|
+
|
|
3703
3901
|
interface ProductCardProps {
|
|
3704
3902
|
product: ExtendedProductDTO;
|
|
3705
3903
|
onClickProduct?: (product: ExtendedProductDTO) => void;
|
|
@@ -3881,4 +4079,4 @@ declare function generateColorShades(baseColor: string): {
|
|
|
3881
4079
|
950: string;
|
|
3882
4080
|
};
|
|
3883
4081
|
|
|
3884
|
-
export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, type Category, CheckoutScreen, CurrentOrdersScreen, type EcommerceConfig, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, OrderCard, OrderCardSkeleton, OrderStatus, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, type ProductFilters, ProfileScreen, RegisterScreen, ShopScreen, Skeleton, ThemeProvider, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme };
|
|
4082
|
+
export { AddressesScreen, AuthProvider, Badge, Button, CartItem, CartProvider, CartScreen, type Category, CheckoutScreen, CurrentOrdersScreen, type EcommerceConfig, EcommerceProvider, EmptyState, Footer, Header, Input, LoginScreen, Modal, OrderCard, OrderCardSkeleton, OrderStatus, OrdersScreen, ProductCard, ProductCardSkeleton, ProductDetailScreen, type ProductFilters, ProfileScreen, RegisterScreen, ShopScreen, Skeleton, ThemeProvider, WishlistProvider, formatDate, formatPrice, generateColorShades, getApiConfiguration, getInitials, hexToRgb, initializeApiAdapter, truncate, useAddresses, useAuth, useCart, useCategories, useCurrentOrders, useOrder, useOrders, useProduct, useProducts, useTheme, useWishlist };
|