@lmnto/h-mall-shared 1.0.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.
Files changed (262) hide show
  1. package/app.css +457 -0
  2. package/bitbucket-pipelines.yml +223 -0
  3. package/package.json +43 -0
  4. package/public/gif/balloon.gif +0 -0
  5. package/public/gif/gift.gif +0 -0
  6. package/public/img/ai-dialog.png +0 -0
  7. package/public/img/ai-x1-banner.png +0 -0
  8. package/public/img/ai-x1.png +0 -0
  9. package/public/img/alert-Icon.png +0 -0
  10. package/public/img/aleta-payment-kyc-require.png +0 -0
  11. package/public/img/aleta-payment-pending.png +0 -0
  12. package/public/img/aleta-payment-rejected.png +0 -0
  13. package/public/img/aleta-payment-subscription-required.png +0 -0
  14. package/public/img/boost-banner-bg.png +0 -0
  15. package/public/img/boost-banner-right.png +0 -0
  16. package/public/img/boost-banner.png +0 -0
  17. package/public/img/boost-dialog-bg.png +0 -0
  18. package/public/img/boostPower.png +0 -0
  19. package/public/img/boostTooltip.png +0 -0
  20. package/public/img/brand-icon.svg +23 -0
  21. package/public/img/brand-text.svg +11 -0
  22. package/public/img/card-icon.png +0 -0
  23. package/public/img/cashback-Icon.png +0 -0
  24. package/public/img/crown.svg +9 -0
  25. package/public/img/empty-box.png +0 -0
  26. package/public/img/gen3-dialog.png +0 -0
  27. package/public/img/gen3-home-banner-bg.png +0 -0
  28. package/public/img/gen3-image.png +0 -0
  29. package/public/img/gift.png +0 -0
  30. package/public/img/img-placeholder-illustration.svg +6 -0
  31. package/public/img/logo.svg +31 -0
  32. package/public/img/offerBanner.png +0 -0
  33. package/public/img/pagenotfound.png +0 -0
  34. package/public/img/partial-pay-payment-successful.png +0 -0
  35. package/public/img/phoneShippingBG.png +0 -0
  36. package/public/img/placeholder-image.jpg +0 -0
  37. package/public/img/powerIcon.png +0 -0
  38. package/public/img/product-01.png +0 -0
  39. package/public/img/product-02.jpg +0 -0
  40. package/public/img/product-03.jpg +0 -0
  41. package/public/img/product-04.jpg +0 -0
  42. package/public/img/product-05.png +0 -0
  43. package/public/img/product-06.png +0 -0
  44. package/public/img/profile-avatar.svg +12 -0
  45. package/public/img/promotion-icon.png +0 -0
  46. package/public/img/session-expired.png +0 -0
  47. package/public/img/shipping-alert-icon.png +0 -0
  48. package/public/img/shippingIcon.png +0 -0
  49. package/public/img/smart-pay-banner-how.png +0 -0
  50. package/public/img/smart-pay-banner-own.png +0 -0
  51. package/public/img/smart-pay-chose.png +0 -0
  52. package/public/img/smart-pay-easy.png +0 -0
  53. package/public/img/smart-pay-payment.png +0 -0
  54. package/public/img/smart-plan-fire.gif +0 -0
  55. package/public/img/smart-plan-sparkle.gif +0 -0
  56. package/public/img/special.png +0 -0
  57. package/public/img/specialOfferBg.png +0 -0
  58. package/public/img/stop-shipping-banner.png +0 -0
  59. package/public/img/subscriptionBanner.png +0 -0
  60. package/public/img/subscriptionIcon.png +0 -0
  61. package/public/img/successIcon.png +0 -0
  62. package/public/img/wallet-icon.png +0 -0
  63. package/public/img/world-wide-shipping.png +0 -0
  64. package/public/next.svg +1 -0
  65. package/public/vercel.svg +1 -0
  66. package/shared/components/AddressFormComponent.tsx +215 -0
  67. package/shared/components/AddressShippingFormComponent.tsx +223 -0
  68. package/shared/components/AiPaymentDialog.tsx +95 -0
  69. package/shared/components/AppLoadingComponent.tsx +15 -0
  70. package/shared/components/AppLoadingComponentV2.tsx +18 -0
  71. package/shared/components/Button.tsx +48 -0
  72. package/shared/components/BuySubscriptionDialog.tsx +75 -0
  73. package/shared/components/CartDrawerComponent.tsx +324 -0
  74. package/shared/components/CashbackComponent.tsx +48 -0
  75. package/shared/components/CashbackMigrationComponent.tsx +41 -0
  76. package/shared/components/CommissionNonEligibleComponent.tsx +27 -0
  77. package/shared/components/CustomNextImage.tsx +50 -0
  78. package/shared/components/CustomNextLink.tsx +46 -0
  79. package/shared/components/EditAddressFormComponent.tsx +254 -0
  80. package/shared/components/EmptyCartMessageComponent.tsx +25 -0
  81. package/shared/components/EmptyCartMessageForCartPage.tsx +61 -0
  82. package/shared/components/EmptyLegacyOrderMessageForOrdersPage.tsx +52 -0
  83. package/shared/components/EmptyOrderMessageForOrdersPage.tsx +62 -0
  84. package/shared/components/EmptyOrderMessageForShippingOrdersPage.tsx +62 -0
  85. package/shared/components/Footer.tsx +71 -0
  86. package/shared/components/GreetingDialog.tsx +96 -0
  87. package/shared/components/Header.tsx +106 -0
  88. package/shared/components/HoldShippingDialog.tsx +165 -0
  89. package/shared/components/HomeBanners.tsx +298 -0
  90. package/shared/components/InactiveCartDialog.tsx +69 -0
  91. package/shared/components/InputCartQuantity.tsx +342 -0
  92. package/shared/components/Inputfield.tsx +110 -0
  93. package/shared/components/ListItemComponent.tsx +82 -0
  94. package/shared/components/LoadingIconComponent.tsx +284 -0
  95. package/shared/components/OrderNotFoundComponent.tsx +56 -0
  96. package/shared/components/PageHeader.tsx +42 -0
  97. package/shared/components/PhoneNumberCountries.tsx +133 -0
  98. package/shared/components/PhoneShippingDialog.tsx +77 -0
  99. package/shared/components/PickupDialog.tsx +92 -0
  100. package/shared/components/ProductNotFoundComponent.tsx +56 -0
  101. package/shared/components/ProductPriceComponent.tsx +32 -0
  102. package/shared/components/ProfileMenu.tsx +120 -0
  103. package/shared/components/RequestCreditNoteInvoiceDialog.tsx +214 -0
  104. package/shared/components/RequestInvoiceDialog.tsx +194 -0
  105. package/shared/components/SelectCities.tsx +133 -0
  106. package/shared/components/SelectComponent.tsx +334 -0
  107. package/shared/components/SelectCountries.tsx +179 -0
  108. package/shared/components/SelectPickUpStore.tsx +131 -0
  109. package/shared/components/SelectStates.tsx +144 -0
  110. package/shared/components/ServerTime.tsx +68 -0
  111. package/shared/components/SessionDialogComponent.tsx +60 -0
  112. package/shared/components/ShippingAddressFormDialogComponent.tsx +51 -0
  113. package/shared/components/Sidebar.tsx +281 -0
  114. package/shared/components/SpecialOfferDialog.tsx +193 -0
  115. package/shared/components/StatusComponents.tsx +25 -0
  116. package/shared/components/StepperComponent.tsx +79 -0
  117. package/shared/components/StepperSmartPayComponent.tsx +97 -0
  118. package/shared/components/SubscriptionPurchaseDialogComponent.tsx +81 -0
  119. package/shared/components/TableComponent.tsx +144 -0
  120. package/shared/components/TablePaginationComponent.tsx +151 -0
  121. package/shared/components/aleta/AletaManagerComponent.tsx +52 -0
  122. package/shared/components/aleta/KycPendingStatus.tsx +33 -0
  123. package/shared/components/aleta/KycRejectedStatus.tsx +53 -0
  124. package/shared/components/aleta/KycRequiredStatus.tsx +53 -0
  125. package/shared/components/aleta/SubscriptionRequiredStatus.tsx +45 -0
  126. package/shared/components/icons/AletaWalletIcon.tsx +21 -0
  127. package/shared/components/icons/BrandIcon.tsx +97 -0
  128. package/shared/components/icons/BrandText.tsx +47 -0
  129. package/shared/components/icons/CartIcon.tsx +21 -0
  130. package/shared/components/icons/DoneIcon.tsx +27 -0
  131. package/shared/components/icons/HomnifiIcon.tsx +23 -0
  132. package/shared/components/icons/InfoIcon.tsx +16 -0
  133. package/shared/components/icons/SmartPayProductIcon.tsx +31 -0
  134. package/shared/components/payments/DisclaimerAlertDialog.tsx +205 -0
  135. package/shared/components/payments/EmptyAssets.tsx +23 -0
  136. package/shared/components/payments/PaybyWalletItemComponent.tsx +116 -0
  137. package/shared/components/payments/PaymentAssetItemComponent.tsx +101 -0
  138. package/shared/components/payments/RequestProcessingDialog.tsx +123 -0
  139. package/shared/components/payments/WalletSectionManager.tsx +82 -0
  140. package/shared/components/payments/WalletSliderComponent.tsx +326 -0
  141. package/shared/components/payments/WalletTermsAndConditionComponent.tsx +88 -0
  142. package/shared/constants/address-shipping.schema.ts +56 -0
  143. package/shared/constants/address.schema.ts +56 -0
  144. package/shared/constants/app.ts +323 -0
  145. package/shared/constants/environment.ts +23 -0
  146. package/shared/constants/feature-flags.ts +15 -0
  147. package/shared/constants/query-keys.ts +106 -0
  148. package/shared/constants/routes.ts +41 -0
  149. package/shared/constants/socket.ts +15 -0
  150. package/shared/contexts/HomeProductsContext.tsx +51 -0
  151. package/shared/contexts/MainWrapperContext.tsx +289 -0
  152. package/shared/contexts/WebSocketContext.tsx +155 -0
  153. package/shared/hooks/useAddressForm.ts +169 -0
  154. package/shared/hooks/useAddresses.ts +28 -0
  155. package/shared/hooks/useAppForm.ts +39 -0
  156. package/shared/hooks/useCart.ts +207 -0
  157. package/shared/hooks/useCopy.ts +45 -0
  158. package/shared/hooks/useCountries.ts +27 -0
  159. package/shared/hooks/useCustomRouter.ts +51 -0
  160. package/shared/hooks/useDebounce.ts +21 -0
  161. package/shared/hooks/useInvoice.ts +41 -0
  162. package/shared/hooks/useOnlineUser.ts +38 -0
  163. package/shared/hooks/usePayments.ts +101 -0
  164. package/shared/hooks/useShippingAddressForm.ts +70 -0
  165. package/shared/hooks/useShippingAddresses.ts +33 -0
  166. package/shared/hooks/useStores.ts +29 -0
  167. package/shared/hooks/useUserActivity.ts +43 -0
  168. package/shared/i18n/client.ts +27 -0
  169. package/shared/i18n/locales/en.ts +383 -0
  170. package/shared/i18n/locales/it.ts +373 -0
  171. package/shared/i18n/server.ts +7 -0
  172. package/shared/services/addresses.service.ts +27 -0
  173. package/shared/services/api/core/ApiError.ts +29 -0
  174. package/shared/services/api/core/ApiRequestOptions.ts +25 -0
  175. package/shared/services/api/core/ApiResult.ts +11 -0
  176. package/shared/services/api/core/CancelablePromise.ts +130 -0
  177. package/shared/services/api/core/OpenAPI.ts +37 -0
  178. package/shared/services/api/core/request.ts +376 -0
  179. package/shared/services/api/index.ts +64 -0
  180. package/shared/services/api/models/AddAllProductToShippingCartDto.ts +7 -0
  181. package/shared/services/api/models/AddProductToCartDto.ts +8 -0
  182. package/shared/services/api/models/AddProductToShippingCartDto.ts +8 -0
  183. package/shared/services/api/models/AdminPlaceOrderDto.ts +16 -0
  184. package/shared/services/api/models/AssignPickupSerialNumberDto.ts +10 -0
  185. package/shared/services/api/models/CreateUserAddressDto.ts +19 -0
  186. package/shared/services/api/models/DeletCartProductsArrayDto.ts +7 -0
  187. package/shared/services/api/models/GenerateInvoiceDto.ts +7 -0
  188. package/shared/services/api/models/OrderConfirmationEmailDto.ts +8 -0
  189. package/shared/services/api/models/PlaceOrderDto.ts +9 -0
  190. package/shared/services/api/models/PlaceShipmentOrderDto.ts +8 -0
  191. package/shared/services/api/models/ProductBoostDto.ts +18 -0
  192. package/shared/services/api/models/RemoveAssignedSerialNumberDto.ts +9 -0
  193. package/shared/services/api/models/RemoveProductToCartDto.ts +8 -0
  194. package/shared/services/api/models/ShipmentItem.ts +8 -0
  195. package/shared/services/api/models/ShippingCartUpdateBillingAddressesDto.ts +7 -0
  196. package/shared/services/api/models/ShippingCartUpdateShippingMethodDto.ts +7 -0
  197. package/shared/services/api/models/UnfreezeWalletDto.ts +8 -0
  198. package/shared/services/api/models/UpdateCartBillingAddressesDto.ts +7 -0
  199. package/shared/services/api/models/UpdateCartPaymentMethodDto.ts +9 -0
  200. package/shared/services/api/models/UpdateCartShippingMethodDto.ts +7 -0
  201. package/shared/services/api/models/UpdateCartStoreDto.ts +7 -0
  202. package/shared/services/api/models/UpdateProductDto.ts +11 -0
  203. package/shared/services/api/models/UpdateShipmentItemStatusDto.ts +24 -0
  204. package/shared/services/api/models/UpdateShippingCartPaymentMethodDto.ts +9 -0
  205. package/shared/services/api/models/UpdateUserAddressDto.ts +19 -0
  206. package/shared/services/api/models/ValidateAuthCodeDto.ts +8 -0
  207. package/shared/services/api/models/WithdrawOrderWalletDto.ts +8 -0
  208. package/shared/services/api/services/AddressesService.ts +160 -0
  209. package/shared/services/api/services/AdminsDevicesService.ts +28 -0
  210. package/shared/services/api/services/AdminsOrdersService.ts +117 -0
  211. package/shared/services/api/services/AdminsPickupsService.ts +57 -0
  212. package/shared/services/api/services/AdminsProductsService.ts +86 -0
  213. package/shared/services/api/services/CartsService.ts +190 -0
  214. package/shared/services/api/services/CashBackQueueService.ts +39 -0
  215. package/shared/services/api/services/CategoriesService.ts +65 -0
  216. package/shared/services/api/services/DefaultService.ts +19 -0
  217. package/shared/services/api/services/FeaturesFlagsService.ts +20 -0
  218. package/shared/services/api/services/IossQueueService.ts +39 -0
  219. package/shared/services/api/services/OrderCallbackService.ts +67 -0
  220. package/shared/services/api/services/OrderEmailsService.ts +40 -0
  221. package/shared/services/api/services/OrderImportService.ts +228 -0
  222. package/shared/services/api/services/OrdersService.ts +183 -0
  223. package/shared/services/api/services/PaymentGatewayService.ts +19 -0
  224. package/shared/services/api/services/PaymentsService.ts +88 -0
  225. package/shared/services/api/services/ProductsService.ts +67 -0
  226. package/shared/services/api/services/ShipmentOrderCallbackService.ts +67 -0
  227. package/shared/services/api/services/ShipmentOrdersService.ts +88 -0
  228. package/shared/services/api/services/ShipmentsService.ts +30 -0
  229. package/shared/services/api/services/ShippingCartService.ts +247 -0
  230. package/shared/services/api/services/ShippingMethodsService.ts +20 -0
  231. package/shared/services/api/services/StoresService.ts +25 -0
  232. package/shared/services/api/services/SyncServiceQueueService.ts +39 -0
  233. package/shared/services/api/services/UpgradeOrdersService.ts +26 -0
  234. package/shared/services/api/services/UsersAuthService.ts +45 -0
  235. package/shared/services/api/services/UsersService.ts +53 -0
  236. package/shared/services/api/services/XeraQueueService.ts +39 -0
  237. package/shared/services/index.ts +0 -0
  238. package/shared/services/payment-method.service.ts +29 -0
  239. package/shared/stores/cartStore.ts +108 -0
  240. package/shared/stores/countriesStore.ts +62 -0
  241. package/shared/stores/formStore.ts +19 -0
  242. package/shared/stores/loadingStore.ts +12 -0
  243. package/shared/stores/userStore.ts +32 -0
  244. package/shared/types/SelectComponent.types.ts +31 -0
  245. package/shared/types/addressForm.ts +27 -0
  246. package/shared/types/cart.ts +208 -0
  247. package/shared/types/category.ts +6 -0
  248. package/shared/types/creditNote.ts +0 -0
  249. package/shared/types/feature-flags.ts +5 -0
  250. package/shared/types/icon.ts +5 -0
  251. package/shared/types/index.d.ts +84 -0
  252. package/shared/types/order.ts +332 -0
  253. package/shared/types/pagination.ts +5 -0
  254. package/shared/types/payments.ts +68 -0
  255. package/shared/types/product.ts +54 -0
  256. package/shared/types/shoppingCart.ts +219 -0
  257. package/shared/types/upgradeCart.ts +226 -0
  258. package/shared/types/user.ts +36 -0
  259. package/shared/utils/app.util.ts +261 -0
  260. package/shared/utils/notifications.util.ts +39 -0
  261. package/shared/utils/user-session.util.ts +171 -0
  262. package/tailwind.config.ts +234 -0
@@ -0,0 +1,332 @@
1
+ import { CashBack } from "./shoppingCart";
2
+
3
+ export enum OrderItemStatusEnum {
4
+ PENDING = "pending",
5
+ PURCHASED = "purchased",
6
+ CANCELLED = "cancelled",
7
+ REFUNDED = "refunded",
8
+ FAILED = "failed",
9
+ }
10
+
11
+ export interface IOrderItems {
12
+ name: string;
13
+ featureImage: string;
14
+ quantity: number;
15
+ price: number;
16
+ discount: number;
17
+ categoryCode: string;
18
+ shipmentStatus: string;
19
+ categoryId: number;
20
+ categoryName: string;
21
+ totalCostOfShipment: string;
22
+ oneCareIncluded?: boolean;
23
+ sku?: string;
24
+ utilityToken?: string;
25
+ smartPayPercentage?: string;
26
+ smartPayOriginalPrice?: string;
27
+ isReturned?: boolean;
28
+ shipmentItem?: {
29
+ name: string;
30
+
31
+ featureImage: string;
32
+ quantity: number;
33
+ price: number;
34
+ categoryCode: string;
35
+ categoryId: number;
36
+ categoryName: string;
37
+ shipmentStatus?: string;
38
+
39
+ orderItem?: {
40
+ name: string;
41
+ featureImage: string;
42
+ quantity: number;
43
+ price: number;
44
+ categoryCode: string;
45
+ categoryId: number;
46
+ categoryName: string;
47
+ };
48
+ };
49
+ shipmentItems?: {
50
+ name: string;
51
+ shipmentItemIdentifier?: string;
52
+
53
+ featureImage: string;
54
+ quantity: number;
55
+ price: number;
56
+ categoryCode: string;
57
+ categoryId: number;
58
+ categoryName: string;
59
+ shipmentStatus?: string;
60
+
61
+ orderItem?: {
62
+ name: string;
63
+ featureImage: string;
64
+ quantity: number;
65
+ price: number;
66
+ categoryCode: string;
67
+ categoryId: number;
68
+ categoryName: string;
69
+ };
70
+ }[];
71
+ enforcedShippingItems?: {
72
+ name: string;
73
+ featureImage: string;
74
+ quantity: number;
75
+ price: number;
76
+ categoryCode: string;
77
+ categoryId: number;
78
+ categoryName: string;
79
+ shipmentStatus?: string;
80
+
81
+ orderItem?: {
82
+ name: string;
83
+ featureImage: string;
84
+ quantity: number;
85
+ price: number;
86
+ categoryCode: string;
87
+ categoryId: number;
88
+ categoryName: string;
89
+ };
90
+ }[];
91
+ kitData?: kitItem[];
92
+ isUpgradable?: boolean;
93
+ status: OrderItemStatusEnum;
94
+ unitPrice?: number;
95
+ unitDiscount?: number;
96
+ nlkAllocationsPerUnit?: number;
97
+ unitOriginalPrice?: number;
98
+ }
99
+
100
+ export type kitItem = {
101
+ name: string;
102
+ shipmentItemIdentifier: string;
103
+ shipmentStatus: string;
104
+ categoryName?: string;
105
+ };
106
+
107
+ export type IOrderPaymentMethod = {
108
+ id: number;
109
+ code: string;
110
+ name: string;
111
+ };
112
+
113
+ export type IOrderBillingAddress = {
114
+ id: number;
115
+ city: string;
116
+ email: string;
117
+ phone: string;
118
+ state: string;
119
+ address: string;
120
+ buildingInfo: string;
121
+ type: string;
122
+ country: {
123
+ name: string;
124
+ code: string;
125
+ flag: string;
126
+ };
127
+ lastName: string;
128
+ latitude: string;
129
+ firstName: string;
130
+ longitude: string;
131
+ postalCode: string;
132
+ countryCode: string;
133
+ };
134
+
135
+ export type IAssetOption = {
136
+ id: number;
137
+ cartId: number;
138
+ createdAt: Date;
139
+ updatedAt: Date;
140
+ assetOption: {
141
+ id: number;
142
+ name: string;
143
+ symbol: string;
144
+ isActive: boolean;
145
+ optionId: number;
146
+ provider: string;
147
+ createdAt: Date;
148
+ deletedAt: null;
149
+ isDeleted: boolean;
150
+ updatedAt: Date;
151
+ isVariable: boolean;
152
+ optionName: string;
153
+ displayOrder: number;
154
+ optionSymbol: string;
155
+ isAssetActive: true;
156
+ minPercentage: number;
157
+ optionIsActive: boolean;
158
+ paymentMethodId: number;
159
+ isCommissionEnabled: boolean;
160
+ commissionMultiplier: {
161
+ base: {
162
+ cv: number;
163
+ vp: number;
164
+ };
165
+ option: {
166
+ cv: number;
167
+ vp: number;
168
+ };
169
+ };
170
+ };
171
+ baseAssetName: string;
172
+ baseAssetAmount: string;
173
+ baseAssetSymbol: string;
174
+ optionAssetName: string;
175
+ optionAssetAmount: number;
176
+ optionAssetSymbol: string;
177
+ baseAssetPercentage: number;
178
+ calculatedCommision: {
179
+ base: {
180
+ cv: number;
181
+ vp: number;
182
+ };
183
+ option: {
184
+ cv: number;
185
+ vp: number;
186
+ };
187
+ totalCV: number;
188
+ totalVP: number;
189
+ };
190
+ optionAssetPercentage: number;
191
+ };
192
+
193
+ export interface IOrder {
194
+ id: number;
195
+ orderId: string;
196
+ shipmentOrderId?: string;
197
+ orderItems?: IOrderItems[];
198
+ orderUpgrades?: OrderUpgrade[];
199
+ shipmentOrderItems?: IOrderItems[];
200
+ paymentMethod: IOrderPaymentMethod;
201
+ billingAddress: IOrderBillingAddress;
202
+ shippingAddress?: IOrderBillingAddress;
203
+ shippingMethod?: ShippingMethod;
204
+ store?: Store;
205
+ paymentBillingAddress: IOrderBillingAddress;
206
+ subTotal: number;
207
+ vatTotal: number;
208
+ grandTotal: number;
209
+ feesTotal: number;
210
+ taxTotal: number;
211
+ discountTotal: number;
212
+ shippingTotal: number;
213
+ status: string;
214
+ paymentStatus: string;
215
+ createdAt: Date;
216
+ updatedAt: Date;
217
+ assetOption: IAssetOption;
218
+ fees: Fee[];
219
+ taxes: Tax[];
220
+ isSmartPay?: boolean;
221
+ isUpgradable?: boolean;
222
+ cashBacks?: CashBack[];
223
+ orderInvoice?: ShipmentOrderInvoice;
224
+ shipmentOrderInvoice?: ShipmentOrderInvoice;
225
+ enforcedShipping: boolean;
226
+ productBoost?: string;
227
+ isUpgrade: boolean;
228
+ isSoftwareOnly?: boolean;
229
+ creditNotes?: CreditNote[];
230
+ }
231
+
232
+ type CreditNote = {
233
+ id: number;
234
+ identifier: string;
235
+ createdFor: "order" | "shipment"; // Using union type for specific values
236
+ type: "refund" | string; // Add other possible types if needed
237
+ createdAt: string;
238
+ updatedAt: string;
239
+ creditNoteInvoiceFileName: string;
240
+ orderId: number;
241
+ shipmentOrderId: number | null;
242
+ creditNoteInvoiceUrl: string;
243
+ };
244
+
245
+ type ShipmentOrderInvoice = {
246
+ createdAt: string;
247
+ id: number;
248
+ invoiceFileName: string | null;
249
+ invoiceSequenceNumber: number;
250
+ invoiceUrl: string | null;
251
+ shipmentOrderId: number;
252
+ updatedAt: string;
253
+ };
254
+
255
+ type Fee = {
256
+ amount: string;
257
+ cartId: number;
258
+ feeCategory: string;
259
+ feeName: string;
260
+ id: number;
261
+ type: string;
262
+ value: string;
263
+ };
264
+
265
+ export type OrderUpgrade = {
266
+ id: string;
267
+ userBID: string;
268
+ legacyOrderIdentifier: string;
269
+ legacyOrderId: number;
270
+ legacyOrderItemId: number;
271
+ sku: string;
272
+ orderId: string | null;
273
+ isUpgraded: boolean;
274
+ createdAt: string;
275
+ updatedAt: string;
276
+ status: string;
277
+ };
278
+
279
+ type Tax = {
280
+ amount: string;
281
+ cartId: number;
282
+ id: number;
283
+ taxCategory: string;
284
+ taxName: string;
285
+ type: string;
286
+ value: string;
287
+ };
288
+
289
+ export type ShippingMethod = {
290
+ code: string;
291
+ description: string;
292
+ displayName: string;
293
+
294
+ createdAt?: string | null;
295
+ deletedAt?: string | null;
296
+ id?: number;
297
+ isActive?: boolean;
298
+ isDeleted?: boolean;
299
+ isDisplay?: boolean;
300
+ updatedAt?: string | null;
301
+ };
302
+
303
+ export type Store = {
304
+ address: string;
305
+ buildingInfo: string;
306
+ city: String;
307
+ countryId: number;
308
+ createdAt: string | null;
309
+ deletedAt: null;
310
+ id: 1;
311
+ isActive: true;
312
+ isDeleted: false;
313
+ name: string;
314
+ pickupFee: string;
315
+ state: string;
316
+ updatedAt: string | null;
317
+ zipCode: string | null;
318
+ country: ICountryCity;
319
+ };
320
+ export class ICountryCity {
321
+ id?: number;
322
+ name: string;
323
+ countryId: number;
324
+ country: string;
325
+ state: string;
326
+ stateId: number;
327
+ isActive?: boolean;
328
+ isDeleted?: boolean;
329
+ createdAt?: Date;
330
+ updatedAt?: Date;
331
+ deletedAt?: Date;
332
+ }
@@ -0,0 +1,5 @@
1
+ export type PaginationQueryParam = {
2
+ page: number;
3
+ limit: number;
4
+ sort?: string;
5
+ };
@@ -0,0 +1,68 @@
1
+ import { PAYMENTS_TYPE } from "@hms/packages/shared/constants/app";
2
+
3
+ export type PaymentsMethod = {
4
+ code: string;
5
+ createdAt: string;
6
+ deletedAt: string;
7
+ displayOrder: number;
8
+ id: number;
9
+ isActive: boolean;
10
+ isDeleted: boolean;
11
+ isVariable: boolean;
12
+ name: string;
13
+ provider: string;
14
+ updatedAt: string;
15
+ paymentFees: Fee[];
16
+ };
17
+
18
+ type Fee = {
19
+ amount: string;
20
+ feeCategory: string;
21
+ name: string;
22
+ id: number;
23
+ type: string;
24
+ value: string;
25
+ };
26
+
27
+ export type Asset = {
28
+ code: string;
29
+ symbol: string;
30
+ displayOrder: number;
31
+ balance: number;
32
+ paymentMethodId: number;
33
+ id: number;
34
+ isVariable: boolean;
35
+ name: string;
36
+ options: Option[];
37
+ };
38
+
39
+ export type Option = {
40
+ id: number;
41
+ name: string;
42
+ symbol: string;
43
+ isActive: boolean;
44
+ minPercentage: number;
45
+ commissions: Commission;
46
+ balance: number;
47
+ restricted: {
48
+ status: boolean;
49
+ msg: string;
50
+ };
51
+ } & {
52
+ currentPercentage?: number;
53
+ };
54
+
55
+ export type Commission = {
56
+ base: {
57
+ cv: number;
58
+ vp: number;
59
+ };
60
+ option: {
61
+ cv: number;
62
+ vp: number;
63
+ };
64
+ totalCV: number;
65
+ totalVP: number;
66
+ };
67
+
68
+ export type PaymentType = (typeof PAYMENTS_TYPE)[keyof typeof PAYMENTS_TYPE];
@@ -0,0 +1,54 @@
1
+ export interface IProduct {
2
+ productId: number;
3
+ productName: string;
4
+ productSku: string;
5
+ categoryCode: string;
6
+ categoryId: number;
7
+ specification: string;
8
+ details: string;
9
+ features: string;
10
+ overview: string;
11
+ isDisplay: boolean;
12
+ price: number;
13
+ smartPayAmount?: number;
14
+ estimatedDeliveryCost?: number;
15
+ utilityToken?: number;
16
+ featureImage: string;
17
+ isActive: boolean;
18
+ isProductPurchasable: boolean;
19
+ categoryName: string;
20
+ mainProductCategory: number;
21
+ subProducts?: SubProduct[];
22
+ tags: string[];
23
+ images: string[];
24
+ maxCartQuantity: number | null;
25
+ smartPayPercentage?: number;
26
+ quantityStepper?: number | null;
27
+ }
28
+
29
+ export interface SubProduct {
30
+ productId: number;
31
+ productName: string;
32
+ productCategory: number;
33
+ categoryCode: string;
34
+ productMetadata: ProductMetadata[];
35
+ }
36
+
37
+ export interface ProductMetadata {
38
+ key?: string;
39
+ value?: string;
40
+ displayName?: string;
41
+ }
42
+
43
+ export interface IProductPurchaseLimit {
44
+ userPurchaseLimit: number;
45
+ canUserPurchaseTheProduct: boolean;
46
+ totalOrderExistsForProduct: number;
47
+ maximumUserCanPurchase: number;
48
+ }
49
+
50
+ export type BoostPowerProps = {
51
+ boost: number;
52
+ validFrom: string;
53
+ validTo: string;
54
+ };
@@ -0,0 +1,219 @@
1
+ import { Store } from "./order";
2
+ import { Commission } from "./payments";
3
+
4
+ export interface IShoppingCart {
5
+ userBID: string;
6
+ reference: string;
7
+ shippingCartProducts: any[];
8
+ billingAddressId: number | null;
9
+ shippingAddressId: number | null;
10
+ storeId: number | null;
11
+ paymentMethodId: number | null;
12
+ id: number;
13
+ cartState: string;
14
+ subTotal: string;
15
+ feesTotal: string;
16
+ taxTotal: string;
17
+ grandTotal: string;
18
+ isActive: boolean;
19
+ createdAt: string;
20
+ updatedAt: string;
21
+ fees: Fee[];
22
+ taxes: Tax[];
23
+ cartAsset: CartAsset;
24
+ store?: Store;
25
+ cashBacks?: null | CashBack[];
26
+ isSmartPay?: boolean;
27
+
28
+ commissionSubTotal: string;
29
+ oneCareTotal: string;
30
+ orderId: string;
31
+ pickupCostTotal: string;
32
+ shippingCartAssetId: string;
33
+ shippingMethodId: number;
34
+ shippingMethod: ShippingMethod;
35
+ shippingCostTotal: string;
36
+ upgradeCostTotal: string;
37
+ userSubscriptionType: string;
38
+ shippingAddress: UserAddress;
39
+ billingAddress: UserAddress;
40
+ paymentMethod: {
41
+ code: string;
42
+ id: number;
43
+ name: string;
44
+ };
45
+
46
+ shippingCartAsset: CartAsset;
47
+ }
48
+
49
+ type ShippingMethod = {
50
+ code: string;
51
+ description: string;
52
+ displayName: string;
53
+ };
54
+ type CartAsset = {
55
+ id: number;
56
+ cartId: number;
57
+ assetOption: {
58
+ id: number;
59
+ name: string;
60
+ symbol: string;
61
+ isActive: boolean;
62
+ optionId: number;
63
+ provider: string;
64
+ createdAt: string;
65
+ deletedAt: string;
66
+ isDeleted: boolean;
67
+ updatedAt: string;
68
+ isVariable: boolean;
69
+ optionName: string;
70
+ displayOrder: number;
71
+ optionSymbol: string;
72
+ isAssetActive: boolean;
73
+ minPercentage: number;
74
+ optionIsActive: boolean;
75
+ paymentMethodId: number;
76
+ isCommissionEnabled: boolean;
77
+ commissionMultiplier: {
78
+ base: {
79
+ cv: number;
80
+ vp: number;
81
+ };
82
+ option: {
83
+ cv: number;
84
+ vp: number;
85
+ };
86
+ };
87
+ };
88
+ calculatedCommision: Commission;
89
+ baseAssetName: string;
90
+ baseAssetSymbol: string;
91
+ baseAssetAmount: number;
92
+ baseAssetPercentage: number;
93
+ optionAssetName: string;
94
+ optionAssetSymbol: string;
95
+ optionAssetAmount: number;
96
+ optionAssetPercentage: string;
97
+ createdAt: string;
98
+ updatedAt: string;
99
+ };
100
+ type Fee = {
101
+ amount: string;
102
+ cartId: number;
103
+ feeCategory: string;
104
+ feeName: string;
105
+ id: number;
106
+ type: string;
107
+ value: string;
108
+ };
109
+ type Tax = {
110
+ amount: string;
111
+ cartId: number;
112
+ id: number;
113
+ taxCategory: string;
114
+ taxName: string;
115
+ type: string;
116
+ value: string;
117
+ };
118
+
119
+ export type CashBack = {
120
+ id: number;
121
+ shippingCartId: number;
122
+ assetName: string;
123
+ assetSymbol: string;
124
+ cashbackAssetId: number;
125
+ totalAmount: string;
126
+ };
127
+
128
+ export type cartProduct = {
129
+ id: number;
130
+ sku: string;
131
+ name: string;
132
+ featureImage: string;
133
+ category: cartProductCategory;
134
+ price: number;
135
+ canProductBeRemoved: boolean;
136
+ canUserPurchaseTheProduct: boolean;
137
+ feedBackMessage: string;
138
+ maximumUserCanPurchase: number | null;
139
+ totalOrderExistsForProduct: number | null;
140
+ userPurchaseLimit: number | null;
141
+ notAllowedShippingMethods?: string[];
142
+ };
143
+
144
+ export type cartProductCategory = {
145
+ id: number;
146
+ code: string;
147
+ name: string;
148
+ };
149
+
150
+ export type CartTableItemComponentProps = {
151
+ id: number;
152
+ product: cartProduct;
153
+ quantity: number;
154
+ cartProducts: number;
155
+ userPurchaseLimit: number | null;
156
+ maximumUserCanPurchase: number | null;
157
+ totalOrderExistsForProduct: number | null;
158
+ feedBackMessage: string;
159
+ canUserPurchaseTheProduct: boolean;
160
+ canProductBeRemoved: boolean;
161
+ };
162
+
163
+ export type BillingAddress = {
164
+ address: string;
165
+ buildingInfo: string;
166
+ city: string;
167
+ country: string;
168
+ countryId: number;
169
+ createdAt: string;
170
+ deletedAt: string;
171
+ id: number;
172
+ isActive: boolean;
173
+ isDefault: boolean;
174
+ isDeleted: boolean;
175
+ latitude: string;
176
+ longitude: string;
177
+ state: string;
178
+ type: string;
179
+ updatedAt: string;
180
+ userId: number;
181
+ };
182
+ export type UserAddress = {
183
+ id: number;
184
+ userBID: string;
185
+ firstName: string;
186
+ lastName: string;
187
+ phone: string;
188
+ email: string;
189
+ countryId: 3;
190
+ countryCode: string;
191
+ city: string;
192
+ state: string;
193
+ postalCode: string;
194
+ address: string;
195
+ buildingInfo: string;
196
+ latitude: string;
197
+ longitude: string;
198
+ type: string;
199
+ isDefault: boolean;
200
+ isActive: boolean;
201
+ isDeleted: boolean;
202
+ createdAt: string;
203
+ updatedAt: string;
204
+ deletedAt: string;
205
+ country: {
206
+ id: 3;
207
+ name: string;
208
+ code: string;
209
+ alphaCode: string;
210
+ callingCode: string;
211
+ zipCodeExists: boolean;
212
+ zipCodeRegex: string;
213
+ isActive: boolean;
214
+ isDeleted: boolean;
215
+ createdAt: string;
216
+ updatedAt: string;
217
+ deletedAt: string;
218
+ };
219
+ };