hey-pharmacist-ecommerce 1.1.28 → 1.1.29

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.
Files changed (60) hide show
  1. package/dist/index.d.mts +344 -640
  2. package/dist/index.d.ts +344 -640
  3. package/dist/index.js +1807 -838
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1807 -840
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/AccountOrdersTab.tsx +1 -1
  9. package/src/components/AccountSettingsTab.tsx +88 -6
  10. package/src/components/CartItem.tsx +1 -1
  11. package/src/components/Header.tsx +8 -2
  12. package/src/components/OrderCard.tsx +4 -4
  13. package/src/components/ProductCard.tsx +59 -42
  14. package/src/components/QuickViewModal.tsx +13 -13
  15. package/src/hooks/useAddresses.ts +4 -1
  16. package/src/hooks/usePaymentMethods.ts +26 -31
  17. package/src/hooks/useProducts.ts +63 -64
  18. package/src/hooks/useWishlistProducts.ts +4 -5
  19. package/src/index.ts +2 -0
  20. package/src/lib/Apis/api.ts +0 -1
  21. package/src/lib/Apis/apis/auth-api.ts +18 -29
  22. package/src/lib/Apis/apis/products-api.ts +845 -405
  23. package/src/lib/Apis/models/category-populated.ts +0 -12
  24. package/src/lib/Apis/models/category-sub-category-populated.ts +2 -2
  25. package/src/lib/Apis/models/category.ts +0 -18
  26. package/src/lib/Apis/models/{table-cell-dto.ts → change-password-dto.ts} +6 -6
  27. package/src/lib/Apis/models/create-product-dto.ts +30 -23
  28. package/src/lib/Apis/models/create-sub-category-dto.ts +6 -0
  29. package/src/lib/Apis/models/create-variant-dto.ts +29 -29
  30. package/src/lib/Apis/models/index.ts +5 -7
  31. package/src/lib/Apis/models/paginated-products-dto.ts +6 -6
  32. package/src/lib/Apis/models/product-summary.ts +69 -0
  33. package/src/lib/Apis/models/product-variant.ts +34 -65
  34. package/src/lib/Apis/models/product.ts +138 -0
  35. package/src/lib/Apis/models/products-insights-dto.ts +12 -0
  36. package/src/lib/Apis/models/single-product-media.ts +0 -12
  37. package/src/lib/Apis/models/sub-category.ts +6 -12
  38. package/src/lib/Apis/models/update-product-dto.ts +30 -19
  39. package/src/lib/Apis/models/update-sub-category-dto.ts +6 -0
  40. package/src/lib/Apis/models/{update-product-variant-dto.ts → update-variant-dto.ts} +51 -45
  41. package/src/lib/Apis/models/{shallow-parent-category-dto.ts → variant-id-inventory-body.ts} +5 -11
  42. package/src/lib/api-adapter/config.ts +53 -0
  43. package/src/lib/validations/address.ts +1 -1
  44. package/src/providers/FavoritesProvider.tsx +5 -5
  45. package/src/providers/WishlistProvider.tsx +4 -4
  46. package/src/screens/CartScreen.tsx +1 -1
  47. package/src/screens/ChangePasswordScreen.tsx +2 -6
  48. package/src/screens/CheckoutScreen.tsx +40 -11
  49. package/src/screens/ForgotPasswordScreen.tsx +153 -0
  50. package/src/screens/ProductDetailScreen.tsx +51 -60
  51. package/src/screens/RegisterScreen.tsx +31 -31
  52. package/src/screens/ResetPasswordScreen.tsx +202 -0
  53. package/src/screens/SearchResultsScreen.tsx +264 -26
  54. package/src/screens/ShopScreen.tsx +42 -45
  55. package/src/screens/WishlistScreen.tsx +35 -31
  56. package/src/lib/Apis/apis/product-variants-api.ts +0 -552
  57. package/src/lib/Apis/models/create-single-variant-product-dto.ts +0 -154
  58. package/src/lib/Apis/models/extended-product-dto.ts +0 -206
  59. package/src/lib/Apis/models/frequently-bought-product-dto.ts +0 -71
  60. package/src/lib/Apis/models/table-dto.ts +0 -34
@@ -79,18 +79,6 @@ export interface CategoryPopulated {
79
79
  * @memberof CategoryPopulated
80
80
  */
81
81
  storeId?: string;
82
- /**
83
- *
84
- * @type {Array<string>}
85
- * @memberof CategoryPopulated
86
- */
87
- categoryProducts?: Array<string>;
88
- /**
89
- *
90
- * @type {Array<string>}
91
- * @memberof CategoryPopulated
92
- */
93
- categoryProductVariants?: Array<string>;
94
82
  /**
95
83
  *
96
84
  * @type {Array<CategorySubCategoryPopulated>}
@@ -44,8 +44,8 @@ export interface CategorySubCategoryPopulated {
44
44
  image: string;
45
45
  /**
46
46
  *
47
- * @type {Array<string>}
47
+ * @type {number}
48
48
  * @memberof CategorySubCategoryPopulated
49
49
  */
50
- subCategoryProducts: Array<string>;
50
+ productCount: number;
51
51
  }
@@ -78,22 +78,4 @@ export interface Category {
78
78
  * @memberof Category
79
79
  */
80
80
  storeId: string;
81
- /**
82
- *
83
- * @type {Array<string>}
84
- * @memberof Category
85
- */
86
- categorySubCategories: Array<string>;
87
- /**
88
- *
89
- * @type {Array<string>}
90
- * @memberof Category
91
- */
92
- categoryProducts: Array<string>;
93
- /**
94
- *
95
- * @type {Array<string>}
96
- * @memberof Category
97
- */
98
- categoryProductVariants: Array<string>;
99
81
  }
@@ -14,20 +14,20 @@
14
14
  /**
15
15
  *
16
16
  * @export
17
- * @interface TableCellDto
17
+ * @interface ChangePasswordDto
18
18
  */
19
- export interface TableCellDto {
19
+ export interface ChangePasswordDto {
20
20
  _id?: string;
21
21
  /**
22
22
  *
23
23
  * @type {string}
24
- * @memberof TableCellDto
24
+ * @memberof ChangePasswordDto
25
25
  */
26
- key: string;
26
+ oldPassword: string;
27
27
  /**
28
28
  *
29
29
  * @type {string}
30
- * @memberof TableCellDto
30
+ * @memberof ChangePasswordDto
31
31
  */
32
- value: string;
32
+ newPassword: string;
33
33
  }
@@ -11,6 +11,7 @@
11
11
  * https://github.com/swagger-api/swagger-codegen.git
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { CreateVariantDto } from './create-variant-dto';
14
15
  import { SingleProductMedia } from './single-product-media';
15
16
  /**
16
17
  *
@@ -24,7 +25,7 @@ export interface CreateProductDto {
24
25
  * @type {string}
25
26
  * @memberof CreateProductDto
26
27
  */
27
- name?: string;
28
+ name: string;
28
29
  /**
29
30
  *
30
31
  * @type {string}
@@ -33,68 +34,74 @@ export interface CreateProductDto {
33
34
  description?: string;
34
35
  /**
35
36
  *
36
- * @type {Array<string>}
37
+ * @type {string}
37
38
  * @memberof CreateProductDto
38
39
  */
39
- tags: Array<string>;
40
+ brand?: string;
40
41
  /**
41
42
  *
42
43
  * @type {string}
43
44
  * @memberof CreateProductDto
44
45
  */
45
- brand?: string;
46
+ sku?: string;
46
47
  /**
47
48
  *
48
49
  * @type {string}
49
50
  * @memberof CreateProductDto
50
51
  */
51
- sku?: string;
52
+ upc?: string;
52
53
  /**
53
54
  *
54
- * @type {boolean}
55
+ * @type {Array<SingleProductMedia>}
55
56
  * @memberof CreateProductDto
56
57
  */
57
- showStock?: boolean;
58
+ media?: Array<SingleProductMedia>;
58
59
  /**
59
60
  *
60
61
  * @type {Array<string>}
61
62
  * @memberof CreateProductDto
62
63
  */
63
- reviews?: Array<string>;
64
+ tags?: Array<string>;
64
65
  /**
65
- *
66
- * @type {string}
66
+ * Category IDs
67
+ * @type {Array<string>}
67
68
  * @memberof CreateProductDto
68
69
  */
69
- upc?: string;
70
+ categoryIds?: Array<string>;
70
71
  /**
71
- *
72
- * @type {boolean}
72
+ * SubCategory IDs
73
+ * @type {Array<string>}
73
74
  * @memberof CreateProductDto
74
75
  */
75
- homeScreenFeatured?: boolean;
76
+ subCategoryIds?: Array<string>;
76
77
  /**
77
- *
78
- * @type {Array<string>}
78
+ * Product variants (optional, can be added later)
79
+ * @type {Array<CreateVariantDto>}
79
80
  * @memberof CreateProductDto
80
81
  */
81
- parentSubCategories: Array<string>;
82
+ variants?: Array<CreateVariantDto>;
82
83
  /**
83
84
  *
84
- * @type {Array<string>}
85
+ * @type {boolean}
85
86
  * @memberof CreateProductDto
86
87
  */
87
- parentCategories: Array<string>;
88
+ showStock?: boolean;
88
89
  /**
89
90
  *
90
- * @type {Array<SingleProductMedia>}
91
+ * @type {boolean}
91
92
  * @memberof CreateProductDto
92
93
  */
93
- productMedia: Array<SingleProductMedia>;
94
+ homeScreenFeatured?: boolean;
94
95
  /**
95
- *
96
+ * IDs of frequently bought together products
97
+ * @type {Array<string>}
98
+ * @memberof CreateProductDto
99
+ */
100
+ frequentlyBoughtWith?: Array<string>;
101
+ /**
102
+ * IDs of frequently bought together products (alias)
96
103
  * @type {Array<string>}
97
104
  * @memberof CreateProductDto
98
105
  */
99
- frequentlyBoughtProducts: Array<string>;
106
+ frequentlyBoughtProducts?: Array<string>;
100
107
  }
@@ -42,4 +42,10 @@ export interface CreateSubCategoryDto {
42
42
  * @memberof CreateSubCategoryDto
43
43
  */
44
44
  isActive?: boolean;
45
+ /**
46
+ *
47
+ * @type {number}
48
+ * @memberof CreateSubCategoryDto
49
+ */
50
+ order?: number;
45
51
  }
@@ -27,80 +27,80 @@ export interface CreateVariantDto {
27
27
  name: string;
28
28
  /**
29
29
  *
30
- * @type {Array<SingleProductMedia>}
30
+ * @type {string}
31
31
  * @memberof CreateVariantDto
32
32
  */
33
- productMedia: Array<SingleProductMedia>;
33
+ description?: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof CreateVariantDto
38
38
  */
39
- description: string;
39
+ sku?: string;
40
40
  /**
41
41
  *
42
- * @type {number}
42
+ * @type {string}
43
43
  * @memberof CreateVariantDto
44
44
  */
45
- inventory: number;
45
+ brand?: string;
46
46
  /**
47
- * The width of the product variant in cm
48
- * @type {number}
47
+ *
48
+ * @type {Array<SingleProductMedia>}
49
49
  * @memberof CreateVariantDto
50
50
  */
51
- width: number;
51
+ media?: Array<SingleProductMedia>;
52
52
  /**
53
- * The height of the product variant in cm
53
+ *
54
54
  * @type {number}
55
55
  * @memberof CreateVariantDto
56
56
  */
57
- height: number;
57
+ retailPrice: number;
58
58
  /**
59
- * The length of the product variant in cm
59
+ *
60
60
  * @type {number}
61
61
  * @memberof CreateVariantDto
62
62
  */
63
- length: number;
63
+ costPrice: number;
64
64
  /**
65
- * The weight of the product variant in g
65
+ * Initial inventory count
66
66
  * @type {number}
67
67
  * @memberof CreateVariantDto
68
68
  */
69
- weight: number;
69
+ inventoryCount: number;
70
70
  /**
71
- *
72
- * @type {string}
71
+ * Width in cm
72
+ * @type {number}
73
73
  * @memberof CreateVariantDto
74
74
  */
75
- brand: string;
75
+ width?: number;
76
76
  /**
77
- *
78
- * @type {string}
77
+ * Height in cm
78
+ * @type {number}
79
79
  * @memberof CreateVariantDto
80
80
  */
81
- sku: string;
81
+ height?: number;
82
82
  /**
83
- *
83
+ * Length in cm
84
84
  * @type {number}
85
85
  * @memberof CreateVariantDto
86
86
  */
87
- retailPrice: number;
87
+ length?: number;
88
88
  /**
89
- *
89
+ * Weight in grams
90
90
  * @type {number}
91
91
  * @memberof CreateVariantDto
92
92
  */
93
- costPrice: number;
93
+ weight?: number;
94
94
  /**
95
95
  *
96
- * @type {number}
96
+ * @type {boolean}
97
97
  * @memberof CreateVariantDto
98
98
  */
99
- totalSold: number;
99
+ isActive?: boolean;
100
100
  /**
101
- *
102
- * @type {number}
101
+ * Custom attributes like color, size, etc.
102
+ * @type {any}
103
103
  * @memberof CreateVariantDto
104
104
  */
105
- inventoryCount: number;
105
+ attributes?: any;
106
106
  }
@@ -27,6 +27,7 @@ export * from './category-filters';
27
27
  export * from './category-populated';
28
28
  export * from './category-sub-category-populated';
29
29
  export * from './categorys-headlines-response-dto';
30
+ export * from './change-password-dto';
30
31
  export * from './change-user-email-dto';
31
32
  export * from './check-notifications-response-dto';
32
33
  export * from './contact-aggregated-stats-response-dto';
@@ -49,7 +50,6 @@ export * from './create-message-dto';
49
50
  export * from './create-notification-dto';
50
51
  export * from './create-product-dto';
51
52
  export * from './create-review-dto';
52
- export * from './create-single-variant-product-dto';
53
53
  export * from './create-store-address-dto';
54
54
  export * from './create-store-dto';
55
55
  export * from './create-sub-category-dto';
@@ -65,10 +65,8 @@ export * from './discounts-insights-dto';
65
65
  export * from './email-invoice-dto';
66
66
  export * from './email-template-response-dto';
67
67
  export * from './event';
68
- export * from './extended-product-dto';
69
68
  export * from './fileproccesor-upload-body';
70
69
  export * from './forget-password';
71
- export * from './frequently-bought-product-dto';
72
70
  export * from './general-stats-response-dto';
73
71
  export * from './generate-day-slots-dto';
74
72
  export * from './generate-month-slots-dto';
@@ -101,6 +99,8 @@ export * from './populated-discount';
101
99
  export * from './populated-order';
102
100
  export * from './prefered-pick-or-delivery-time-dto';
103
101
  export * from './price-range';
102
+ export * from './product';
103
+ export * from './product-summary';
104
104
  export * from './product-variant';
105
105
  export * from './products-insights-dto';
106
106
  export * from './rate-dto';
@@ -112,7 +112,6 @@ export * from './review';
112
112
  export * from './schedule-campaign-draft-dto';
113
113
  export * from './schedule-tour-email-dto';
114
114
  export * from './send-test-email-dto';
115
- export * from './shallow-parent-category-dto';
116
115
  export * from './shipment';
117
116
  export * from './shipment-details-dto';
118
117
  export * from './shipment-status-dto';
@@ -134,8 +133,6 @@ export * from './sub-category-headlines-only-response-dto';
134
133
  export * from './suggested-slot';
135
134
  export * from './tadmin-session-data';
136
135
  export * from './tuser-session-data';
137
- export * from './table-cell-dto';
138
- export * from './table-dto';
139
136
  export * from './track-dto';
140
137
  export * from './tracking-status';
141
138
  export * from './tracking-status-location-base';
@@ -152,7 +149,6 @@ export * from './update-items-order-dto';
152
149
  export * from './update-marketing-camp-draft-dto';
153
150
  export * from './update-message-dto';
154
151
  export * from './update-product-dto';
155
- export * from './update-product-variant-dto';
156
152
  export * from './update-refill-request-dto';
157
153
  export * from './update-review-dto';
158
154
  export * from './update-store-dto';
@@ -160,6 +156,7 @@ export * from './update-sub-category-dto';
160
156
  export * from './update-transfere-patients-request-dto';
161
157
  export * from './update-user-dto';
162
158
  export * from './update-user-group-dto';
159
+ export * from './update-variant-dto';
163
160
  export * from './upload-pdf-body';
164
161
  export * from './used-by';
165
162
  export * from './user-entity';
@@ -167,5 +164,6 @@ export * from './user-group';
167
164
  export * from './user-insights-dto';
168
165
  export * from './user-with-no-id';
169
166
  export * from './users-paginated-response';
167
+ export * from './variant-id-inventory-body';
170
168
  export * from './verify-email-dto';
171
169
  export * from './wishlist';
@@ -11,7 +11,7 @@
11
11
  * https://github.com/swagger-api/swagger-codegen.git
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { ExtendedProductDTO } from './extended-product-dto';
14
+ import { Product } from './product';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -21,10 +21,10 @@ export interface PaginatedProductsDto {
21
21
  _id?: string;
22
22
  /**
23
23
  *
24
- * @type {Array<ExtendedProductDTO>}
24
+ * @type {Array<Product>}
25
25
  * @memberof PaginatedProductsDto
26
26
  */
27
- data: Array<ExtendedProductDTO>;
27
+ data: Array<Product>;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -36,17 +36,17 @@ export interface PaginatedProductsDto {
36
36
  * @type {number}
37
37
  * @memberof PaginatedProductsDto
38
38
  */
39
- limit: number;
39
+ currentPage: number;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof PaginatedProductsDto
44
44
  */
45
- currentPage: number;
45
+ totalPages: number;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof PaginatedProductsDto
50
50
  */
51
- totalPages: number;
51
+ limit: number;
52
52
  }
@@ -0,0 +1,69 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Hey Pharamcist API
5
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+ *
7
+ * OpenAPI spec version: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface ProductSummary
18
+ */
19
+ export interface ProductSummary {
20
+ _id?: string;
21
+ /**
22
+ *
23
+ * @type {number}
24
+ * @memberof ProductSummary
25
+ */
26
+ minPrice: number;
27
+ /**
28
+ *
29
+ * @type {number}
30
+ * @memberof ProductSummary
31
+ */
32
+ maxPrice: number;
33
+ /**
34
+ *
35
+ * @type {number}
36
+ * @memberof ProductSummary
37
+ */
38
+ totalInventory: number;
39
+ /**
40
+ *
41
+ * @type {boolean}
42
+ * @memberof ProductSummary
43
+ */
44
+ hasDiscount: boolean;
45
+ /**
46
+ *
47
+ * @type {number}
48
+ * @memberof ProductSummary
49
+ */
50
+ variantCount: number;
51
+ /**
52
+ *
53
+ * @type {number}
54
+ * @memberof ProductSummary
55
+ */
56
+ totalSold: number;
57
+ /**
58
+ *
59
+ * @type {number}
60
+ * @memberof ProductSummary
61
+ */
62
+ averageRating: number;
63
+ /**
64
+ *
65
+ * @type {number}
66
+ * @memberof ProductSummary
67
+ */
68
+ reviewCount: number;
69
+ }