hey-pharmacist-ecommerce 1.1.30 → 1.1.32

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 (83) hide show
  1. package/dist/index.d.mts +1451 -1303
  2. package/dist/index.d.ts +1451 -1303
  3. package/dist/index.js +6162 -1563
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +5854 -1271
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +4 -3
  8. package/src/components/AccountReviewsTab.tsx +97 -0
  9. package/src/components/AccountSettingsTab.tsx +0 -50
  10. package/src/components/CouponCodeInput.tsx +190 -0
  11. package/src/components/Header.tsx +5 -1
  12. package/src/components/Notification.tsx +1 -1
  13. package/src/components/NotificationBell.tsx +33 -0
  14. package/src/components/NotificationCard.tsx +211 -0
  15. package/src/components/NotificationDrawer.tsx +188 -0
  16. package/src/components/OrderCard.tsx +164 -99
  17. package/src/components/ProductCard.tsx +3 -3
  18. package/src/components/ProductReviewsSection.tsx +30 -0
  19. package/src/components/RatingDistribution.tsx +86 -0
  20. package/src/components/ReviewCard.tsx +59 -0
  21. package/src/components/ReviewForm.tsx +207 -0
  22. package/src/components/ReviewPromptBanner.tsx +98 -0
  23. package/src/components/ReviewsList.tsx +151 -0
  24. package/src/components/StarRating.tsx +98 -0
  25. package/src/components/TabNavigation.tsx +1 -1
  26. package/src/components/ui/Button.tsx +1 -1
  27. package/src/hooks/useDiscounts.ts +7 -0
  28. package/src/hooks/useOrders.ts +15 -0
  29. package/src/hooks/useReviews.ts +230 -0
  30. package/src/index.ts +25 -0
  31. package/src/lib/Apis/apis/discounts-api.ts +23 -72
  32. package/src/lib/Apis/apis/notifications-api.ts +196 -231
  33. package/src/lib/Apis/apis/products-api.ts +84 -0
  34. package/src/lib/Apis/apis/review-api.ts +283 -4
  35. package/src/lib/Apis/apis/stores-api.ts +180 -0
  36. package/src/lib/Apis/models/bulk-channel-toggle-dto.ts +52 -0
  37. package/src/lib/Apis/models/cart-body-populated.ts +3 -3
  38. package/src/lib/Apis/models/channel-settings-dto.ts +39 -0
  39. package/src/lib/Apis/models/{discount-paginated-response.ts → completed-order-dto.ts} +21 -16
  40. package/src/lib/Apis/models/create-discount-dto.ts +31 -92
  41. package/src/lib/Apis/models/create-review-dto.ts +4 -4
  42. package/src/lib/Apis/models/create-shippo-account-dto.ts +45 -0
  43. package/src/lib/Apis/models/create-store-dto.ts +6 -0
  44. package/src/lib/Apis/models/discount.ts +37 -98
  45. package/src/lib/Apis/models/discounts-insights-dto.ts +12 -0
  46. package/src/lib/Apis/models/index.ts +13 -7
  47. package/src/lib/Apis/models/{manual-discount.ts → manual-discount-dto.ts} +10 -10
  48. package/src/lib/Apis/models/manual-order-dto.ts +3 -3
  49. package/src/lib/Apis/models/populated-discount.ts +41 -101
  50. package/src/lib/Apis/models/preference-update-item.ts +59 -0
  51. package/src/lib/Apis/models/product-light-dto.ts +40 -0
  52. package/src/lib/Apis/models/{check-notifications-response-dto.ts → review-status-dto.ts} +8 -7
  53. package/src/lib/Apis/models/review.ts +9 -3
  54. package/src/lib/Apis/models/reviewable-order-dto.ts +58 -0
  55. package/src/lib/Apis/models/reviewable-product-dto.ts +81 -0
  56. package/src/lib/Apis/models/shippo-account-response-dto.ts +51 -0
  57. package/src/lib/Apis/models/store-entity.ts +6 -0
  58. package/src/lib/Apis/models/store.ts +6 -0
  59. package/src/lib/Apis/models/update-discount-dto.ts +31 -92
  60. package/src/lib/Apis/models/update-notification-settings-dto.ts +28 -0
  61. package/src/lib/Apis/models/update-review-dto.ts +4 -4
  62. package/src/lib/Apis/models/update-store-dto.ts +6 -0
  63. package/src/lib/Apis/models/{pick-type-class.ts → variant-light-dto.ts} +20 -14
  64. package/src/lib/utils/discount.ts +155 -0
  65. package/src/lib/validations/discount.ts +11 -0
  66. package/src/providers/CartProvider.tsx +2 -2
  67. package/src/providers/DiscountProvider.tsx +97 -0
  68. package/src/providers/EcommerceProvider.tsx +13 -5
  69. package/src/providers/NotificationCenterProvider.tsx +420 -0
  70. package/src/screens/CartScreen.tsx +1 -1
  71. package/src/screens/CheckoutScreen.tsx +39 -12
  72. package/src/screens/NotificationSettingsScreen.tsx +321 -0
  73. package/src/screens/OrderDetailScreen.tsx +283 -0
  74. package/src/screens/OrderReviewsScreen.tsx +308 -0
  75. package/src/screens/OrdersScreen.tsx +31 -7
  76. package/src/screens/ProductDetailScreen.tsx +24 -11
  77. package/src/screens/ProfileScreen.tsx +5 -0
  78. package/src/styles/globals.css +4 -0
  79. package/styles/base.css +6 -0
  80. package/styles/globals.css +3 -0
  81. package/src/lib/Apis/models/create-notification-dto.ts +0 -75
  82. package/src/lib/Apis/models/notification.ts +0 -93
  83. package/src/lib/Apis/models/single-notification-dto.ts +0 -99
@@ -1,93 +0,0 @@
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 Notification
18
- */
19
- export interface Notification {
20
- _id?: string;
21
- /**
22
- *
23
- * @type {Date}
24
- * @memberof Notification
25
- */
26
- createdAt: Date;
27
- /**
28
- *
29
- * @type {Date}
30
- * @memberof Notification
31
- */
32
- updatedAt: Date;
33
- /**
34
- *
35
- * @type {string}
36
- * @memberof Notification
37
- */
38
- id: string;
39
- /**
40
- *
41
- * @type {string}
42
- * @memberof Notification
43
- */
44
- title: string;
45
- /**
46
- *
47
- * @type {string}
48
- * @memberof Notification
49
- */
50
- content: string;
51
- /**
52
- *
53
- * @type {string}
54
- * @memberof Notification
55
- */
56
- notificationType: string;
57
- /**
58
- *
59
- * @type {string}
60
- * @memberof Notification
61
- */
62
- notificationLink: string;
63
- /**
64
- *
65
- * @type {Array<string>}
66
- * @memberof Notification
67
- */
68
- sentTo: Array<string>;
69
- /**
70
- *
71
- * @type {Array<string>}
72
- * @memberof Notification
73
- */
74
- readBy: Array<string>;
75
- /**
76
- *
77
- * @type {Array<string>}
78
- * @memberof Notification
79
- */
80
- clearedBy: Array<string>;
81
- /**
82
- *
83
- * @type {boolean}
84
- * @memberof Notification
85
- */
86
- isAdminNotification: boolean;
87
- /**
88
- *
89
- * @type {string}
90
- * @memberof Notification
91
- */
92
- storeId: string;
93
- }
@@ -1,99 +0,0 @@
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 SingleNotificationDto
18
- */
19
- export interface SingleNotificationDto {
20
- _id?: string;
21
- /**
22
- *
23
- * @type {Date}
24
- * @memberof SingleNotificationDto
25
- */
26
- createdAt: Date;
27
- /**
28
- *
29
- * @type {Date}
30
- * @memberof SingleNotificationDto
31
- */
32
- updatedAt: Date;
33
- /**
34
- *
35
- * @type {string}
36
- * @memberof SingleNotificationDto
37
- */
38
- id: string;
39
- /**
40
- *
41
- * @type {string}
42
- * @memberof SingleNotificationDto
43
- */
44
- title: string;
45
- /**
46
- *
47
- * @type {string}
48
- * @memberof SingleNotificationDto
49
- */
50
- content: string;
51
- /**
52
- *
53
- * @type {string}
54
- * @memberof SingleNotificationDto
55
- */
56
- notificationType: string;
57
- /**
58
- *
59
- * @type {string}
60
- * @memberof SingleNotificationDto
61
- */
62
- notificationLink: string;
63
- /**
64
- *
65
- * @type {Array<string>}
66
- * @memberof SingleNotificationDto
67
- */
68
- sentTo: Array<string>;
69
- /**
70
- *
71
- * @type {Array<string>}
72
- * @memberof SingleNotificationDto
73
- */
74
- readBy: Array<string>;
75
- /**
76
- *
77
- * @type {Array<string>}
78
- * @memberof SingleNotificationDto
79
- */
80
- clearedBy: Array<string>;
81
- /**
82
- *
83
- * @type {boolean}
84
- * @memberof SingleNotificationDto
85
- */
86
- isAdminNotification: boolean;
87
- /**
88
- *
89
- * @type {string}
90
- * @memberof SingleNotificationDto
91
- */
92
- storeId: string;
93
- /**
94
- *
95
- * @type {boolean}
96
- * @memberof SingleNotificationDto
97
- */
98
- isRead: boolean;
99
- }