@lyxa.ai/core 1.4.313-alpha-9 → 1.4.314

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 (996) hide show
  1. package/dist/libraries/llm/interfaces/common-llm-interfaces.d.ts +4 -0
  2. package/dist/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -1
  3. package/dist/libraries/llm/llm-provider-service.js +1 -1
  4. package/dist/libraries/llm/llm-provider-service.js.map +1 -1
  5. package/dist/libraries/llm/providers/openai-provider.d.ts +4 -0
  6. package/dist/libraries/llm/providers/openai-provider.js +47 -13
  7. package/dist/libraries/llm/providers/openai-provider.js.map +1 -1
  8. package/dist/libraries/map/providers/osrm.js.map +1 -1
  9. package/dist/libraries/mongo/models/banner.model.d.ts +6 -6
  10. package/dist/libraries/mongo/models/banner.model.js +6 -6
  11. package/dist/libraries/mongo/models/banner.model.js.map +1 -1
  12. package/dist/libraries/mongo/models/cart.model.d.ts +2 -2
  13. package/dist/libraries/mongo/models/cart.model.js +1 -1
  14. package/dist/libraries/mongo/models/cart.model.js.map +1 -1
  15. package/dist/libraries/mongo/models/category.model.d.ts +2 -2
  16. package/dist/libraries/mongo/models/category.model.js +1 -1
  17. package/dist/libraries/mongo/models/category.model.js.map +1 -1
  18. package/dist/libraries/mongo/models/deal-setting.model.d.ts +2 -1
  19. package/dist/libraries/mongo/models/deal-setting.model.js +2 -1
  20. package/dist/libraries/mongo/models/deal-setting.model.js.map +1 -1
  21. package/dist/libraries/mongo/models/featured-setting.model.d.ts +3 -2
  22. package/dist/libraries/mongo/models/featured-setting.model.js +3 -2
  23. package/dist/libraries/mongo/models/featured-setting.model.js.map +1 -1
  24. package/dist/libraries/mongo/models/filter-container.model.d.ts +2 -2
  25. package/dist/libraries/mongo/models/filter-container.model.js +1 -1
  26. package/dist/libraries/mongo/models/filter-container.model.js.map +1 -1
  27. package/dist/libraries/mongo/models/finance-settlement.model.js.map +1 -1
  28. package/dist/libraries/mongo/models/line-item.model.d.ts +2 -2
  29. package/dist/libraries/mongo/models/line-item.model.js +1 -1
  30. package/dist/libraries/mongo/models/line-item.model.js.map +1 -1
  31. package/dist/libraries/mongo/models/list-container.model.d.ts +2 -2
  32. package/dist/libraries/mongo/models/list-container.model.js +1 -1
  33. package/dist/libraries/mongo/models/list-container.model.js.map +1 -1
  34. package/dist/libraries/mongo/models/order.model.js.map +1 -1
  35. package/dist/libraries/mongo/models/parent.model.d.ts +2 -2
  36. package/dist/libraries/mongo/models/parent.model.js +1 -1
  37. package/dist/libraries/mongo/models/parent.model.js.map +1 -1
  38. package/dist/libraries/mongo/models/product.model.d.ts +2 -2
  39. package/dist/libraries/mongo/models/product.model.js +1 -1
  40. package/dist/libraries/mongo/models/product.model.js.map +1 -1
  41. package/dist/libraries/mongo/models/providers/custom-coupon.model.js.map +1 -1
  42. package/dist/libraries/mongo/models/providers/individual-store-coupon.model.js.map +1 -1
  43. package/dist/libraries/mongo/models/providers/individual-user-coupon.model.js.map +1 -1
  44. package/dist/libraries/mongo/models/providers/shops-categories-coupon.model.js.map +1 -1
  45. package/dist/libraries/mongo/models/rider.model.d.ts +1 -0
  46. package/dist/libraries/mongo/models/rider.model.js +5 -0
  47. package/dist/libraries/mongo/models/rider.model.js.map +1 -1
  48. package/dist/libraries/mongo/models/service-control.model.d.ts +2 -16
  49. package/dist/libraries/mongo/models/service-control.model.js +6 -68
  50. package/dist/libraries/mongo/models/service-control.model.js.map +1 -1
  51. package/dist/libraries/mongo/models/shop.model.d.ts +2 -2
  52. package/dist/libraries/mongo/models/shop.model.js +1 -1
  53. package/dist/libraries/mongo/models/shop.model.js.map +1 -1
  54. package/dist/libraries/mongo/models/tag.model.d.ts +2 -2
  55. package/dist/libraries/mongo/models/tag.model.js +1 -1
  56. package/dist/libraries/mongo/models/tag.model.js.map +1 -1
  57. package/dist/libraries/mongo/models/user-app-section-setting.model.d.ts +2 -2
  58. package/dist/libraries/mongo/models/user-app-section-setting.model.js +1 -1
  59. package/dist/libraries/mongo/models/user-app-section-setting.model.js.map +1 -1
  60. package/dist/types/README.md +1 -1
  61. package/dist/types/package.json +1 -1
  62. package/dist/types/utilities/enum.d.ts +0 -9
  63. package/dist/types/utilities/enum.js +4 -15
  64. package/dist/types/utilities/enum.js.map +1 -1
  65. package/dist/types/utilities/shared/common-methods.d.ts +5 -9
  66. package/dist/types/utilities/shared/common-methods.js +14 -107
  67. package/dist/types/utilities/shared/common-methods.js.map +1 -1
  68. package/dist/utilities/enum.d.ts +0 -9
  69. package/dist/utilities/enum.js +4 -15
  70. package/dist/utilities/enum.js.map +1 -1
  71. package/dist/utilities/shared/common-methods.d.ts +5 -9
  72. package/dist/utilities/shared/common-methods.js +14 -107
  73. package/dist/utilities/shared/common-methods.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/libraries/mongo/models/embedded/notification-content.model.d.ts +0 -5
  76. package/dist/libraries/mongo/models/embedded/notification-content.model.js +0 -32
  77. package/dist/libraries/mongo/models/embedded/notification-content.model.js.map +0 -1
  78. package/dist/libraries/mongo/models/embedded/service-control-product-config.model.d.ts +0 -9
  79. package/dist/libraries/mongo/models/embedded/service-control-product-config.model.js +0 -52
  80. package/dist/libraries/mongo/models/embedded/service-control-product-config.model.js.map +0 -1
  81. package/dist/types/index.js.map +0 -1
  82. package/dist/types/libraries/auth/index.d.ts +0 -77
  83. package/dist/types/libraries/auth/index.js +0 -270
  84. package/dist/types/libraries/auth/index.js.map +0 -1
  85. package/dist/types/libraries/auth/refreshtoken.d.ts +0 -15
  86. package/dist/types/libraries/auth/refreshtoken.js +0 -91
  87. package/dist/types/libraries/auth/refreshtoken.js.map +0 -1
  88. package/dist/types/libraries/auth/repository.d.ts +0 -18
  89. package/dist/types/libraries/auth/repository.js +0 -43
  90. package/dist/types/libraries/auth/repository.js.map +0 -1
  91. package/dist/types/libraries/bullmq/bull-mq-service.d.ts +0 -9
  92. package/dist/types/libraries/bullmq/bull-mq-service.js +0 -42
  93. package/dist/types/libraries/bullmq/bull-mq-service.js.map +0 -1
  94. package/dist/types/libraries/cache/settings/index.d.ts +0 -7
  95. package/dist/types/libraries/cache/settings/index.js +0 -56
  96. package/dist/types/libraries/cache/settings/index.js.map +0 -1
  97. package/dist/types/libraries/cash-settlement/cashSettlementService.d.ts +0 -16
  98. package/dist/types/libraries/cash-settlement/cashSettlementService.js +0 -53
  99. package/dist/types/libraries/cash-settlement/cashSettlementService.js.map +0 -1
  100. package/dist/types/libraries/cash-settlement/index.d.ts +0 -2
  101. package/dist/types/libraries/cash-settlement/index.js +0 -19
  102. package/dist/types/libraries/cash-settlement/index.js.map +0 -1
  103. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.d.ts +0 -24
  104. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js +0 -10
  105. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js.map +0 -1
  106. package/dist/types/libraries/cash-settlement/providers/bob.d.ts +0 -45
  107. package/dist/types/libraries/cash-settlement/providers/bob.js +0 -634
  108. package/dist/types/libraries/cash-settlement/providers/bob.js.map +0 -1
  109. package/dist/types/libraries/cash-settlement/providers/index.d.ts +0 -1
  110. package/dist/types/libraries/cash-settlement/providers/index.js +0 -18
  111. package/dist/types/libraries/cash-settlement/providers/index.js.map +0 -1
  112. package/dist/types/libraries/cloud-storage/CloudStorageFactory.d.ts +0 -7
  113. package/dist/types/libraries/cloud-storage/CloudStorageFactory.js +0 -18
  114. package/dist/types/libraries/cloud-storage/CloudStorageFactory.js.map +0 -1
  115. package/dist/types/libraries/cloud-storage/index.d.ts +0 -4
  116. package/dist/types/libraries/cloud-storage/index.js +0 -21
  117. package/dist/types/libraries/cloud-storage/index.js.map +0 -1
  118. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.d.ts +0 -8
  119. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js +0 -3
  120. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js.map +0 -1
  121. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.d.ts +0 -11
  122. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js +0 -63
  123. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js.map +0 -1
  124. package/dist/types/libraries/cloud-storage/types/FileUploadResult.d.ts +0 -11
  125. package/dist/types/libraries/cloud-storage/types/FileUploadResult.js +0 -3
  126. package/dist/types/libraries/cloud-storage/types/FileUploadResult.js.map +0 -1
  127. package/dist/types/libraries/configuration/index.d.ts +0 -39
  128. package/dist/types/libraries/configuration/index.js +0 -84
  129. package/dist/types/libraries/configuration/index.js.map +0 -1
  130. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.d.ts +0 -9
  131. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js +0 -14
  132. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js.map +0 -1
  133. package/dist/types/libraries/dispatcher/index.d.ts +0 -10
  134. package/dist/types/libraries/dispatcher/index.js +0 -43
  135. package/dist/types/libraries/dispatcher/index.js.map +0 -1
  136. package/dist/types/libraries/event/BaseEvent.d.ts +0 -7
  137. package/dist/types/libraries/event/BaseEvent.js +0 -19
  138. package/dist/types/libraries/event/BaseEvent.js.map +0 -1
  139. package/dist/types/libraries/event/EventEnums.d.ts +0 -26
  140. package/dist/types/libraries/event/EventEnums.js +0 -31
  141. package/dist/types/libraries/event/EventEnums.js.map +0 -1
  142. package/dist/types/libraries/event/events/index.d.ts +0 -2
  143. package/dist/types/libraries/event/events/index.js +0 -19
  144. package/dist/types/libraries/event/events/index.js.map +0 -1
  145. package/dist/types/libraries/event/events/payout/index.d.ts +0 -1
  146. package/dist/types/libraries/event/events/payout/index.js +0 -18
  147. package/dist/types/libraries/event/events/payout/index.js.map +0 -1
  148. package/dist/types/libraries/event/events/payout/payout-schedule.event.d.ts +0 -9
  149. package/dist/types/libraries/event/events/payout/payout-schedule.event.js +0 -12
  150. package/dist/types/libraries/event/events/payout/payout-schedule.event.js.map +0 -1
  151. package/dist/types/libraries/event/events/rider/cash/index.d.ts +0 -5
  152. package/dist/types/libraries/event/events/rider/cash/index.js +0 -14
  153. package/dist/types/libraries/event/events/rider/cash/index.js.map +0 -1
  154. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.d.ts +0 -11
  155. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js +0 -19
  156. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js.map +0 -1
  157. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.d.ts +0 -11
  158. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js +0 -18
  159. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js.map +0 -1
  160. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.d.ts +0 -10
  161. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js +0 -17
  162. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js.map +0 -1
  163. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.d.ts +0 -11
  164. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js +0 -19
  165. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js.map +0 -1
  166. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.d.ts +0 -10
  167. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js +0 -17
  168. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js.map +0 -1
  169. package/dist/types/libraries/event/events/rider/index.d.ts +0 -2
  170. package/dist/types/libraries/event/events/rider/index.js +0 -19
  171. package/dist/types/libraries/event/events/rider/index.js.map +0 -1
  172. package/dist/types/libraries/event/events/rider/scoring/index.d.ts +0 -7
  173. package/dist/types/libraries/event/events/rider/scoring/index.js +0 -18
  174. package/dist/types/libraries/event/events/rider/scoring/index.js.map +0 -1
  175. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.d.ts +0 -11
  176. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js +0 -20
  177. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js.map +0 -1
  178. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.d.ts +0 -13
  179. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js +0 -24
  180. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js.map +0 -1
  181. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.d.ts +0 -11
  182. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js +0 -20
  183. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js.map +0 -1
  184. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.d.ts +0 -13
  185. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js +0 -24
  186. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js.map +0 -1
  187. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.d.ts +0 -19
  188. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js +0 -36
  189. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js.map +0 -1
  190. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.d.ts +0 -13
  191. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js +0 -18
  192. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js.map +0 -1
  193. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.d.ts +0 -14
  194. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js +0 -21
  195. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js.map +0 -1
  196. package/dist/types/libraries/event/index.d.ts +0 -11
  197. package/dist/types/libraries/event/index.js +0 -152
  198. package/dist/types/libraries/event/index.js.map +0 -1
  199. package/dist/types/libraries/event/registry/SubscriptionRegistry.d.ts +0 -11
  200. package/dist/types/libraries/event/registry/SubscriptionRegistry.js +0 -14
  201. package/dist/types/libraries/event/registry/SubscriptionRegistry.js.map +0 -1
  202. package/dist/types/libraries/firebase/index.d.ts +0 -16
  203. package/dist/types/libraries/firebase/index.js +0 -107
  204. package/dist/types/libraries/firebase/index.js.map +0 -1
  205. package/dist/types/libraries/google-translate/google-translate.client.d.ts +0 -5
  206. package/dist/types/libraries/google-translate/google-translate.client.js +0 -44
  207. package/dist/types/libraries/google-translate/google-translate.client.js.map +0 -1
  208. package/dist/types/libraries/google-translate/google-translate.dto.d.ts +0 -13
  209. package/dist/types/libraries/google-translate/google-translate.dto.js +0 -3
  210. package/dist/types/libraries/google-translate/google-translate.dto.js.map +0 -1
  211. package/dist/types/libraries/google-translate/google-translate.service.d.ts +0 -9
  212. package/dist/types/libraries/google-translate/google-translate.service.js +0 -102
  213. package/dist/types/libraries/google-translate/google-translate.service.js.map +0 -1
  214. package/dist/types/libraries/google-translate/index.d.ts +0 -1
  215. package/dist/types/libraries/google-translate/index.js +0 -18
  216. package/dist/types/libraries/google-translate/index.js.map +0 -1
  217. package/dist/types/libraries/index.d.ts +0 -49
  218. package/dist/types/libraries/index.js +0 -133
  219. package/dist/types/libraries/index.js.map +0 -1
  220. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.d.ts +0 -28
  221. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js +0 -3
  222. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js.map +0 -1
  223. package/dist/types/libraries/llm/llm-provider-service.d.ts +0 -13
  224. package/dist/types/libraries/llm/llm-provider-service.js +0 -47
  225. package/dist/types/libraries/llm/llm-provider-service.js.map +0 -1
  226. package/dist/types/libraries/llm/providers/openai-provider.d.ts +0 -19
  227. package/dist/types/libraries/llm/providers/openai-provider.js +0 -223
  228. package/dist/types/libraries/llm/providers/openai-provider.js.map +0 -1
  229. package/dist/types/libraries/logger/index.d.ts +0 -8
  230. package/dist/types/libraries/logger/index.js +0 -75
  231. package/dist/types/libraries/logger/index.js.map +0 -1
  232. package/dist/types/libraries/logger-kit/index.d.ts +0 -3
  233. package/dist/types/libraries/logger-kit/index.js +0 -22
  234. package/dist/types/libraries/logger-kit/index.js.map +0 -1
  235. package/dist/types/libraries/logger-kit/logger.service.d.ts +0 -117
  236. package/dist/types/libraries/logger-kit/logger.service.js +0 -304
  237. package/dist/types/libraries/logger-kit/logger.service.js.map +0 -1
  238. package/dist/types/libraries/logger-kit/types.d.ts +0 -34
  239. package/dist/types/libraries/logger-kit/types.js +0 -3
  240. package/dist/types/libraries/logger-kit/types.js.map +0 -1
  241. package/dist/types/libraries/map/index.d.ts +0 -2
  242. package/dist/types/libraries/map/index.js +0 -19
  243. package/dist/types/libraries/map/index.js.map +0 -1
  244. package/dist/types/libraries/map/interfaces/IMapService.d.ts +0 -43
  245. package/dist/types/libraries/map/interfaces/IMapService.js +0 -9
  246. package/dist/types/libraries/map/interfaces/IMapService.js.map +0 -1
  247. package/dist/types/libraries/map/mapService.d.ts +0 -21
  248. package/dist/types/libraries/map/mapService.js +0 -57
  249. package/dist/types/libraries/map/mapService.js.map +0 -1
  250. package/dist/types/libraries/map/providers/google-maps.d.ts +0 -27
  251. package/dist/types/libraries/map/providers/google-maps.js +0 -462
  252. package/dist/types/libraries/map/providers/google-maps.js.map +0 -1
  253. package/dist/types/libraries/map/providers/index.d.ts +0 -1
  254. package/dist/types/libraries/map/providers/index.js +0 -18
  255. package/dist/types/libraries/map/providers/index.js.map +0 -1
  256. package/dist/types/libraries/map/providers/osrm.d.ts +0 -13
  257. package/dist/types/libraries/map/providers/osrm.js +0 -137
  258. package/dist/types/libraries/map/providers/osrm.js.map +0 -1
  259. package/dist/types/libraries/mongo/index.d.ts +0 -7
  260. package/dist/types/libraries/mongo/index.js +0 -87
  261. package/dist/types/libraries/mongo/index.js.map +0 -1
  262. package/dist/types/libraries/mongo/models/activity-log.model.d.ts +0 -10
  263. package/dist/types/libraries/mongo/models/activity-log.model.js +0 -48
  264. package/dist/types/libraries/mongo/models/activity-log.model.js.map +0 -1
  265. package/dist/types/libraries/mongo/models/admin-access-control.model.d.ts +0 -11
  266. package/dist/types/libraries/mongo/models/admin-access-control.model.js +0 -75
  267. package/dist/types/libraries/mongo/models/admin-access-control.model.js.map +0 -1
  268. package/dist/types/libraries/mongo/models/admin.model.d.ts +0 -11
  269. package/dist/types/libraries/mongo/models/admin.model.js +0 -65
  270. package/dist/types/libraries/mongo/models/admin.model.js.map +0 -1
  271. package/dist/types/libraries/mongo/models/agent-performance.model.d.ts +0 -15
  272. package/dist/types/libraries/mongo/models/agent-performance.model.js +0 -73
  273. package/dist/types/libraries/mongo/models/agent-performance.model.js.map +0 -1
  274. package/dist/types/libraries/mongo/models/app-appearance.model.d.ts +0 -25
  275. package/dist/types/libraries/mongo/models/app-appearance.model.js +0 -102
  276. package/dist/types/libraries/mongo/models/app-appearance.model.js.map +0 -1
  277. package/dist/types/libraries/mongo/models/app-instance.model.d.ts +0 -10
  278. package/dist/types/libraries/mongo/models/app-instance.model.js +0 -54
  279. package/dist/types/libraries/mongo/models/app-instance.model.js.map +0 -1
  280. package/dist/types/libraries/mongo/models/attribute.model.d.ts +0 -13
  281. package/dist/types/libraries/mongo/models/attribute.model.js +0 -58
  282. package/dist/types/libraries/mongo/models/attribute.model.js.map +0 -1
  283. package/dist/types/libraries/mongo/models/banner.model.d.ts +0 -27
  284. package/dist/types/libraries/mongo/models/banner.model.js +0 -118
  285. package/dist/types/libraries/mongo/models/banner.model.js.map +0 -1
  286. package/dist/types/libraries/mongo/models/base/base-coupon.model.d.ts +0 -19
  287. package/dist/types/libraries/mongo/models/base/base-coupon.model.js +0 -90
  288. package/dist/types/libraries/mongo/models/base/base-coupon.model.js.map +0 -1
  289. package/dist/types/libraries/mongo/models/bob-finance.model.d.ts +0 -19
  290. package/dist/types/libraries/mongo/models/bob-finance.model.js +0 -85
  291. package/dist/types/libraries/mongo/models/bob-finance.model.js.map +0 -1
  292. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.d.ts +0 -9
  293. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js +0 -48
  294. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js.map +0 -1
  295. package/dist/types/libraries/mongo/models/brand.model.d.ts +0 -5
  296. package/dist/types/libraries/mongo/models/brand.model.js +0 -32
  297. package/dist/types/libraries/mongo/models/brand.model.js.map +0 -1
  298. package/dist/types/libraries/mongo/models/cancellation-reason.model.d.ts +0 -8
  299. package/dist/types/libraries/mongo/models/cancellation-reason.model.js +0 -55
  300. package/dist/types/libraries/mongo/models/cancellation-reason.model.js.map +0 -1
  301. package/dist/types/libraries/mongo/models/card.model.d.ts +0 -19
  302. package/dist/types/libraries/mongo/models/card.model.js +0 -88
  303. package/dist/types/libraries/mongo/models/card.model.js.map +0 -1
  304. package/dist/types/libraries/mongo/models/cart-participant.model.d.ts +0 -29
  305. package/dist/types/libraries/mongo/models/cart-participant.model.js +0 -130
  306. package/dist/types/libraries/mongo/models/cart-participant.model.js.map +0 -1
  307. package/dist/types/libraries/mongo/models/cart.model.d.ts +0 -39
  308. package/dist/types/libraries/mongo/models/cart.model.js +0 -184
  309. package/dist/types/libraries/mongo/models/cart.model.js.map +0 -1
  310. package/dist/types/libraries/mongo/models/category.model.d.ts +0 -12
  311. package/dist/types/libraries/mongo/models/category.model.js +0 -68
  312. package/dist/types/libraries/mongo/models/category.model.js.map +0 -1
  313. package/dist/types/libraries/mongo/models/chat-room.model.d.ts +0 -28
  314. package/dist/types/libraries/mongo/models/chat-room.model.js +0 -99
  315. package/dist/types/libraries/mongo/models/chat-room.model.js.map +0 -1
  316. package/dist/types/libraries/mongo/models/copy-attribute-map.model.d.ts +0 -8
  317. package/dist/types/libraries/mongo/models/copy-attribute-map.model.js +0 -38
  318. package/dist/types/libraries/mongo/models/copy-attribute-map.model.js.map +0 -1
  319. package/dist/types/libraries/mongo/models/copy-product-job.model.d.ts +0 -21
  320. package/dist/types/libraries/mongo/models/copy-product-job.model.js +0 -101
  321. package/dist/types/libraries/mongo/models/copy-product-job.model.js.map +0 -1
  322. package/dist/types/libraries/mongo/models/copy-product-map.model.d.ts +0 -8
  323. package/dist/types/libraries/mongo/models/copy-product-map.model.js +0 -38
  324. package/dist/types/libraries/mongo/models/copy-product-map.model.js.map +0 -1
  325. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.d.ts +0 -8
  326. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js +0 -38
  327. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js.map +0 -1
  328. package/dist/types/libraries/mongo/models/core-auth-identity.model.d.ts +0 -7
  329. package/dist/types/libraries/mongo/models/core-auth-identity.model.js +0 -32
  330. package/dist/types/libraries/mongo/models/core-auth-identity.model.js.map +0 -1
  331. package/dist/types/libraries/mongo/models/core-user.model.d.ts +0 -16
  332. package/dist/types/libraries/mongo/models/core-user.model.js +0 -85
  333. package/dist/types/libraries/mongo/models/core-user.model.js.map +0 -1
  334. package/dist/types/libraries/mongo/models/counter.model.d.ts +0 -8
  335. package/dist/types/libraries/mongo/models/counter.model.js +0 -42
  336. package/dist/types/libraries/mongo/models/counter.model.js.map +0 -1
  337. package/dist/types/libraries/mongo/models/coupon.model.d.ts +0 -13
  338. package/dist/types/libraries/mongo/models/coupon.model.js +0 -60
  339. package/dist/types/libraries/mongo/models/coupon.model.js.map +0 -1
  340. package/dist/types/libraries/mongo/models/deal-setting.model.d.ts +0 -9
  341. package/dist/types/libraries/mongo/models/deal-setting.model.js +0 -51
  342. package/dist/types/libraries/mongo/models/deal-setting.model.js.map +0 -1
  343. package/dist/types/libraries/mongo/models/default-chat.model.d.ts +0 -4
  344. package/dist/types/libraries/mongo/models/default-chat.model.js +0 -26
  345. package/dist/types/libraries/mongo/models/default-chat.model.js.map +0 -1
  346. package/dist/types/libraries/mongo/models/delivery-charges.model.d.ts +0 -13
  347. package/dist/types/libraries/mongo/models/delivery-charges.model.js +0 -63
  348. package/dist/types/libraries/mongo/models/delivery-charges.model.js.map +0 -1
  349. package/dist/types/libraries/mongo/models/dish.model.d.ts +0 -18
  350. package/dist/types/libraries/mongo/models/dish.model.js +0 -92
  351. package/dist/types/libraries/mongo/models/dish.model.js.map +0 -1
  352. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.d.ts +0 -25
  353. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js +0 -112
  354. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js.map +0 -1
  355. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.d.ts +0 -33
  356. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js +0 -133
  357. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js.map +0 -1
  358. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.d.ts +0 -4
  359. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js +0 -27
  360. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js.map +0 -1
  361. package/dist/types/libraries/mongo/models/embedded/app-force-update.d.ts +0 -9
  362. package/dist/types/libraries/mongo/models/embedded/app-force-update.js +0 -52
  363. package/dist/types/libraries/mongo/models/embedded/app-force-update.js.map +0 -1
  364. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.d.ts +0 -5
  365. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js +0 -32
  366. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js.map +0 -1
  367. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.d.ts +0 -7
  368. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js +0 -29
  369. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js.map +0 -1
  370. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.d.ts +0 -4
  371. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js +0 -27
  372. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js.map +0 -1
  373. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.d.ts +0 -9
  374. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js +0 -52
  375. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js.map +0 -1
  376. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.d.ts +0 -5
  377. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js +0 -32
  378. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js.map +0 -1
  379. package/dist/types/libraries/mongo/models/embedded/charge.model.d.ts +0 -5
  380. package/dist/types/libraries/mongo/models/embedded/charge.model.js +0 -28
  381. package/dist/types/libraries/mongo/models/embedded/charge.model.js.map +0 -1
  382. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.d.ts +0 -18
  383. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js +0 -64
  384. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js.map +0 -1
  385. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.d.ts +0 -4
  386. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js +0 -27
  387. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js.map +0 -1
  388. package/dist/types/libraries/mongo/models/embedded/company-info.model.d.ts +0 -6
  389. package/dist/types/libraries/mongo/models/embedded/company-info.model.js +0 -37
  390. package/dist/types/libraries/mongo/models/embedded/company-info.model.js.map +0 -1
  391. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +0 -9
  392. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js +0 -36
  393. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js.map +0 -1
  394. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.d.ts +0 -4
  395. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js +0 -27
  396. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js.map +0 -1
  397. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.d.ts +0 -7
  398. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js +0 -38
  399. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js.map +0 -1
  400. package/dist/types/libraries/mongo/models/embedded/currency.model.d.ts +0 -5
  401. package/dist/types/libraries/mongo/models/embedded/currency.model.js +0 -32
  402. package/dist/types/libraries/mongo/models/embedded/currency.model.js.map +0 -1
  403. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.d.ts +0 -4
  404. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js +0 -27
  405. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js.map +0 -1
  406. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.d.ts +0 -4
  407. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js +0 -27
  408. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js.map +0 -1
  409. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.d.ts +0 -10
  410. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js +0 -51
  411. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js.map +0 -1
  412. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.d.ts +0 -4
  413. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js +0 -27
  414. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js.map +0 -1
  415. package/dist/types/libraries/mongo/models/embedded/external-ref.model.d.ts +0 -4
  416. package/dist/types/libraries/mongo/models/embedded/external-ref.model.js +0 -32
  417. package/dist/types/libraries/mongo/models/embedded/external-ref.model.js.map +0 -1
  418. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.d.ts +0 -6
  419. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js +0 -33
  420. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js.map +0 -1
  421. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.d.ts +0 -7
  422. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js +0 -38
  423. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js.map +0 -1
  424. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.d.ts +0 -17
  425. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js +0 -63
  426. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js.map +0 -1
  427. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.d.ts +0 -46
  428. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js +0 -178
  429. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js.map +0 -1
  430. package/dist/types/libraries/mongo/models/embedded/notification-content.model.d.ts +0 -5
  431. package/dist/types/libraries/mongo/models/embedded/notification-content.model.js +0 -32
  432. package/dist/types/libraries/mongo/models/embedded/notification-content.model.js.map +0 -1
  433. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.d.ts +0 -26
  434. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js +0 -110
  435. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js.map +0 -1
  436. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.d.ts +0 -12
  437. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js +0 -67
  438. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js.map +0 -1
  439. package/dist/types/libraries/mongo/models/embedded/order-finance.model.d.ts +0 -18
  440. package/dist/types/libraries/mongo/models/embedded/order-finance.model.js +0 -64
  441. package/dist/types/libraries/mongo/models/embedded/order-finance.model.js.map +0 -1
  442. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.d.ts +0 -34
  443. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js +0 -163
  444. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js.map +0 -1
  445. package/dist/types/libraries/mongo/models/embedded/order-refund.model.d.ts +0 -28
  446. package/dist/types/libraries/mongo/models/embedded/order-refund.model.js +0 -113
  447. package/dist/types/libraries/mongo/models/embedded/order-refund.model.js.map +0 -1
  448. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.d.ts +0 -7
  449. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js +0 -46
  450. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js.map +0 -1
  451. package/dist/types/libraries/mongo/models/embedded/package.model.d.ts +0 -25
  452. package/dist/types/libraries/mongo/models/embedded/package.model.js +0 -86
  453. package/dist/types/libraries/mongo/models/embedded/package.model.js.map +0 -1
  454. package/dist/types/libraries/mongo/models/embedded/parent-document.model.d.ts +0 -5
  455. package/dist/types/libraries/mongo/models/embedded/parent-document.model.js +0 -32
  456. package/dist/types/libraries/mongo/models/embedded/parent-document.model.js.map +0 -1
  457. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.d.ts +0 -7
  458. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js +0 -38
  459. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js.map +0 -1
  460. package/dist/types/libraries/mongo/models/embedded/payment-record.model.d.ts +0 -10
  461. package/dist/types/libraries/mongo/models/embedded/payment-record.model.js +0 -53
  462. package/dist/types/libraries/mongo/models/embedded/payment-record.model.js.map +0 -1
  463. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.d.ts +0 -5
  464. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js +0 -28
  465. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js.map +0 -1
  466. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.d.ts +0 -6
  467. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js +0 -33
  468. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js.map +0 -1
  469. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.d.ts +0 -4
  470. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js +0 -27
  471. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js.map +0 -1
  472. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.d.ts +0 -16
  473. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js +0 -80
  474. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js.map +0 -1
  475. package/dist/types/libraries/mongo/models/embedded/product-category.model.d.ts +0 -4
  476. package/dist/types/libraries/mongo/models/embedded/product-category.model.js +0 -32
  477. package/dist/types/libraries/mongo/models/embedded/product-category.model.js.map +0 -1
  478. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.d.ts +0 -17
  479. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js +0 -72
  480. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js.map +0 -1
  481. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.d.ts +0 -5
  482. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js +0 -32
  483. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js.map +0 -1
  484. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.d.ts +0 -12
  485. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js +0 -60
  486. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js.map +0 -1
  487. package/dist/types/libraries/mongo/models/embedded/product-snap.model.d.ts +0 -16
  488. package/dist/types/libraries/mongo/models/embedded/product-snap.model.js +0 -79
  489. package/dist/types/libraries/mongo/models/embedded/product-snap.model.js.map +0 -1
  490. package/dist/types/libraries/mongo/models/embedded/profit.model.d.ts +0 -22
  491. package/dist/types/libraries/mongo/models/embedded/profit.model.js +0 -96
  492. package/dist/types/libraries/mongo/models/embedded/profit.model.js.map +0 -1
  493. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.d.ts +0 -6
  494. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js +0 -38
  495. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js.map +0 -1
  496. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +0 -19
  497. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js +0 -78
  498. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js.map +0 -1
  499. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.d.ts +0 -28
  500. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js +0 -109
  501. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js.map +0 -1
  502. package/dist/types/libraries/mongo/models/embedded/rest-password.model.d.ts +0 -4
  503. package/dist/types/libraries/mongo/models/embedded/rest-password.model.js +0 -27
  504. package/dist/types/libraries/mongo/models/embedded/rest-password.model.js.map +0 -1
  505. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.d.ts +0 -9
  506. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js +0 -44
  507. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js.map +0 -1
  508. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.d.ts +0 -4
  509. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js +0 -27
  510. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js.map +0 -1
  511. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.d.ts +0 -4
  512. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js +0 -27
  513. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js.map +0 -1
  514. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.d.ts +0 -9
  515. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js +0 -52
  516. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js.map +0 -1
  517. package/dist/types/libraries/mongo/models/embedded/rider-statistics.d.ts +0 -11
  518. package/dist/types/libraries/mongo/models/embedded/rider-statistics.js +0 -62
  519. package/dist/types/libraries/mongo/models/embedded/rider-statistics.js.map +0 -1
  520. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.d.ts +0 -18
  521. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js +0 -77
  522. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js.map +0 -1
  523. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.d.ts +0 -23
  524. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js +0 -85
  525. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js.map +0 -1
  526. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.d.ts +0 -24
  527. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js +0 -127
  528. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js.map +0 -1
  529. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.d.ts +0 -16
  530. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js +0 -70
  531. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js.map +0 -1
  532. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts +0 -19
  533. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js +0 -76
  534. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map +0 -1
  535. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.d.ts +0 -9
  536. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js +0 -57
  537. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js.map +0 -1
  538. package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.d.ts +0 -9
  539. package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.js +0 -52
  540. package/dist/types/libraries/mongo/models/embedded/service-control-product-config.model.js.map +0 -1
  541. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.d.ts +0 -5
  542. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js +0 -28
  543. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js.map +0 -1
  544. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.d.ts +0 -40
  545. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js +0 -164
  546. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js.map +0 -1
  547. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.d.ts +0 -5
  548. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js +0 -32
  549. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js.map +0 -1
  550. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.d.ts +0 -12
  551. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js +0 -47
  552. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js.map +0 -1
  553. package/dist/types/libraries/mongo/models/embedded/shop-document.model.d.ts +0 -6
  554. package/dist/types/libraries/mongo/models/embedded/shop-document.model.js +0 -37
  555. package/dist/types/libraries/mongo/models/embedded/shop-document.model.js.map +0 -1
  556. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.d.ts +0 -15
  557. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js +0 -75
  558. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js.map +0 -1
  559. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.d.ts +0 -8
  560. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js +0 -43
  561. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js.map +0 -1
  562. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.d.ts +0 -25
  563. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js +0 -97
  564. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js.map +0 -1
  565. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.d.ts +0 -8
  566. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js +0 -47
  567. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js.map +0 -1
  568. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.d.ts +0 -4
  569. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js +0 -27
  570. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js.map +0 -1
  571. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.d.ts +0 -28
  572. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js +0 -134
  573. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js.map +0 -1
  574. package/dist/types/libraries/mongo/models/embedded/vat.model.d.ts +0 -5
  575. package/dist/types/libraries/mongo/models/embedded/vat.model.js +0 -32
  576. package/dist/types/libraries/mongo/models/embedded/vat.model.js.map +0 -1
  577. package/dist/types/libraries/mongo/models/embedded/wallet.model.d.ts +0 -5
  578. package/dist/types/libraries/mongo/models/embedded/wallet.model.js +0 -32
  579. package/dist/types/libraries/mongo/models/embedded/wallet.model.js.map +0 -1
  580. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.d.ts +0 -5
  581. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js +0 -28
  582. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js.map +0 -1
  583. package/dist/types/libraries/mongo/models/favourite.model.d.ts +0 -14
  584. package/dist/types/libraries/mongo/models/favourite.model.js +0 -52
  585. package/dist/types/libraries/mongo/models/favourite.model.js.map +0 -1
  586. package/dist/types/libraries/mongo/models/featured-setting.model.d.ts +0 -6
  587. package/dist/types/libraries/mongo/models/featured-setting.model.js +0 -32
  588. package/dist/types/libraries/mongo/models/featured-setting.model.js.map +0 -1
  589. package/dist/types/libraries/mongo/models/filter-container.model.d.ts +0 -10
  590. package/dist/types/libraries/mongo/models/filter-container.model.js +0 -63
  591. package/dist/types/libraries/mongo/models/filter-container.model.js.map +0 -1
  592. package/dist/types/libraries/mongo/models/finance-settlement.model.d.ts +0 -41
  593. package/dist/types/libraries/mongo/models/finance-settlement.model.js +0 -175
  594. package/dist/types/libraries/mongo/models/finance-settlement.model.js.map +0 -1
  595. package/dist/types/libraries/mongo/models/flag.model.d.ts +0 -22
  596. package/dist/types/libraries/mongo/models/flag.model.js +0 -83
  597. package/dist/types/libraries/mongo/models/flag.model.js.map +0 -1
  598. package/dist/types/libraries/mongo/models/gallery-upload.model.d.ts +0 -17
  599. package/dist/types/libraries/mongo/models/gallery-upload.model.js +0 -77
  600. package/dist/types/libraries/mongo/models/gallery-upload.model.js.map +0 -1
  601. package/dist/types/libraries/mongo/models/gallery.model.d.ts +0 -13
  602. package/dist/types/libraries/mongo/models/gallery.model.js +0 -59
  603. package/dist/types/libraries/mongo/models/gallery.model.js.map +0 -1
  604. package/dist/types/libraries/mongo/models/google-maps-usage.model.d.ts +0 -21
  605. package/dist/types/libraries/mongo/models/google-maps-usage.model.js +0 -255
  606. package/dist/types/libraries/mongo/models/google-maps-usage.model.js.map +0 -1
  607. package/dist/types/libraries/mongo/models/index.d.ts +0 -398
  608. package/dist/types/libraries/mongo/models/index.js +0 -488
  609. package/dist/types/libraries/mongo/models/index.js.map +0 -1
  610. package/dist/types/libraries/mongo/models/integration-configuration.model.d.ts +0 -5
  611. package/dist/types/libraries/mongo/models/integration-configuration.model.js +0 -33
  612. package/dist/types/libraries/mongo/models/integration-configuration.model.js.map +0 -1
  613. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.d.ts +0 -9
  614. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js +0 -45
  615. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js.map +0 -1
  616. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.d.ts +0 -14
  617. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js +0 -76
  618. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js.map +0 -1
  619. package/dist/types/libraries/mongo/models/limited-time-offer-config.d.ts +0 -6
  620. package/dist/types/libraries/mongo/models/limited-time-offer-config.js +0 -36
  621. package/dist/types/libraries/mongo/models/limited-time-offer-config.js.map +0 -1
  622. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.d.ts +0 -22
  623. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js +0 -96
  624. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js.map +0 -1
  625. package/dist/types/libraries/mongo/models/line-item.model.d.ts +0 -47
  626. package/dist/types/libraries/mongo/models/line-item.model.js +0 -205
  627. package/dist/types/libraries/mongo/models/line-item.model.js.map +0 -1
  628. package/dist/types/libraries/mongo/models/list-container.model.d.ts +0 -19
  629. package/dist/types/libraries/mongo/models/list-container.model.js +0 -92
  630. package/dist/types/libraries/mongo/models/list-container.model.js.map +0 -1
  631. package/dist/types/libraries/mongo/models/log.model.d.ts +0 -35
  632. package/dist/types/libraries/mongo/models/log.model.js +0 -163
  633. package/dist/types/libraries/mongo/models/log.model.js.map +0 -1
  634. package/dist/types/libraries/mongo/models/marketing.model.d.ts +0 -18
  635. package/dist/types/libraries/mongo/models/marketing.model.js +0 -88
  636. package/dist/types/libraries/mongo/models/marketing.model.js.map +0 -1
  637. package/dist/types/libraries/mongo/models/meal-plan.model.d.ts +0 -9
  638. package/dist/types/libraries/mongo/models/meal-plan.model.js +0 -51
  639. package/dist/types/libraries/mongo/models/meal-plan.model.js.map +0 -1
  640. package/dist/types/libraries/mongo/models/message.model.d.ts +0 -25
  641. package/dist/types/libraries/mongo/models/message.model.js +0 -105
  642. package/dist/types/libraries/mongo/models/message.model.js.map +0 -1
  643. package/dist/types/libraries/mongo/models/notification.model.d.ts +0 -53
  644. package/dist/types/libraries/mongo/models/notification.model.js +0 -201
  645. package/dist/types/libraries/mongo/models/notification.model.js.map +0 -1
  646. package/dist/types/libraries/mongo/models/nutrition.model.d.ts +0 -6
  647. package/dist/types/libraries/mongo/models/nutrition.model.js +0 -33
  648. package/dist/types/libraries/mongo/models/nutrition.model.js.map +0 -1
  649. package/dist/types/libraries/mongo/models/order.model.d.ts +0 -67
  650. package/dist/types/libraries/mongo/models/order.model.js +0 -355
  651. package/dist/types/libraries/mongo/models/order.model.js.map +0 -1
  652. package/dist/types/libraries/mongo/models/parent.model.d.ts +0 -29
  653. package/dist/types/libraries/mongo/models/parent.model.js +0 -144
  654. package/dist/types/libraries/mongo/models/parent.model.js.map +0 -1
  655. package/dist/types/libraries/mongo/models/payment-configuration.model.d.ts +0 -6
  656. package/dist/types/libraries/mongo/models/payment-configuration.model.js +0 -33
  657. package/dist/types/libraries/mongo/models/payment-configuration.model.js.map +0 -1
  658. package/dist/types/libraries/mongo/models/payment-intent.model.d.ts +0 -17
  659. package/dist/types/libraries/mongo/models/payment-intent.model.js +0 -79
  660. package/dist/types/libraries/mongo/models/payment-intent.model.js.map +0 -1
  661. package/dist/types/libraries/mongo/models/payout.model.d.ts +0 -15
  662. package/dist/types/libraries/mongo/models/payout.model.js +0 -86
  663. package/dist/types/libraries/mongo/models/payout.model.js.map +0 -1
  664. package/dist/types/libraries/mongo/models/product-brand.model.d.ts +0 -7
  665. package/dist/types/libraries/mongo/models/product-brand.model.js +0 -38
  666. package/dist/types/libraries/mongo/models/product-brand.model.js.map +0 -1
  667. package/dist/types/libraries/mongo/models/product-marketing.model.d.ts +0 -13
  668. package/dist/types/libraries/mongo/models/product-marketing.model.js +0 -57
  669. package/dist/types/libraries/mongo/models/product-marketing.model.js.map +0 -1
  670. package/dist/types/libraries/mongo/models/product-stock-tracker.model.d.ts +0 -15
  671. package/dist/types/libraries/mongo/models/product-stock-tracker.model.js +0 -57
  672. package/dist/types/libraries/mongo/models/product-stock-tracker.model.js.map +0 -1
  673. package/dist/types/libraries/mongo/models/product-upload.model.d.ts +0 -25
  674. package/dist/types/libraries/mongo/models/product-upload.model.js +0 -105
  675. package/dist/types/libraries/mongo/models/product-upload.model.js.map +0 -1
  676. package/dist/types/libraries/mongo/models/product.model.d.ts +0 -63
  677. package/dist/types/libraries/mongo/models/product.model.js +0 -339
  678. package/dist/types/libraries/mongo/models/product.model.js.map +0 -1
  679. package/dist/types/libraries/mongo/models/professional-blocked-time.model.d.ts +0 -10
  680. package/dist/types/libraries/mongo/models/professional-blocked-time.model.js +0 -49
  681. package/dist/types/libraries/mongo/models/professional-blocked-time.model.js.map +0 -1
  682. package/dist/types/libraries/mongo/models/professional.model.d.ts +0 -17
  683. package/dist/types/libraries/mongo/models/professional.model.js +0 -91
  684. package/dist/types/libraries/mongo/models/professional.model.js.map +0 -1
  685. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.d.ts +0 -16
  686. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js +0 -62
  687. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js.map +0 -1
  688. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.d.ts +0 -5
  689. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js +0 -28
  690. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js.map +0 -1
  691. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.d.ts +0 -9
  692. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js +0 -69
  693. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js.map +0 -1
  694. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.d.ts +0 -5
  695. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js +0 -28
  696. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js.map +0 -1
  697. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.d.ts +0 -6
  698. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js +0 -29
  699. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js.map +0 -1
  700. package/dist/types/libraries/mongo/models/providers/courier-order.model.d.ts +0 -41
  701. package/dist/types/libraries/mongo/models/providers/courier-order.model.js +0 -151
  702. package/dist/types/libraries/mongo/models/providers/courier-order.model.js.map +0 -1
  703. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.d.ts +0 -13
  704. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js +0 -43
  705. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js.map +0 -1
  706. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.d.ts +0 -22
  707. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js +0 -92
  708. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js.map +0 -1
  709. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.d.ts +0 -6
  710. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js +0 -25
  711. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js.map +0 -1
  712. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.d.ts +0 -7
  713. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js +0 -30
  714. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js.map +0 -1
  715. package/dist/types/libraries/mongo/models/providers/global-coupon.model.d.ts +0 -5
  716. package/dist/types/libraries/mongo/models/providers/global-coupon.model.js +0 -10
  717. package/dist/types/libraries/mongo/models/providers/global-coupon.model.js.map +0 -1
  718. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.d.ts +0 -12
  719. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js +0 -42
  720. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js.map +0 -1
  721. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.d.ts +0 -13
  722. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js +0 -43
  723. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js.map +0 -1
  724. package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.d.ts +0 -19
  725. package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.js +0 -73
  726. package/dist/types/libraries/mongo/models/providers/new-user-discount-marketing.model.js.map +0 -1
  727. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.d.ts +0 -11
  728. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js +0 -50
  729. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js.map +0 -1
  730. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.d.ts +0 -9
  731. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js +0 -27
  732. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js.map +0 -1
  733. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.d.ts +0 -13
  734. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js +0 -43
  735. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js.map +0 -1
  736. package/dist/types/libraries/mongo/models/providers/regular-order.model.d.ts +0 -54
  737. package/dist/types/libraries/mongo/models/providers/regular-order.model.js +0 -204
  738. package/dist/types/libraries/mongo/models/providers/regular-order.model.js.map +0 -1
  739. package/dist/types/libraries/mongo/models/providers/rider-payout.model.d.ts +0 -23
  740. package/dist/types/libraries/mongo/models/providers/rider-payout.model.js +0 -94
  741. package/dist/types/libraries/mongo/models/providers/rider-payout.model.js.map +0 -1
  742. package/dist/types/libraries/mongo/models/providers/rider-review.model.d.ts +0 -10
  743. package/dist/types/libraries/mongo/models/providers/rider-review.model.js +0 -32
  744. package/dist/types/libraries/mongo/models/providers/rider-review.model.js.map +0 -1
  745. package/dist/types/libraries/mongo/models/providers/service-package-review.model.d.ts +0 -14
  746. package/dist/types/libraries/mongo/models/providers/service-package-review.model.js +0 -44
  747. package/dist/types/libraries/mongo/models/providers/service-package-review.model.js.map +0 -1
  748. package/dist/types/libraries/mongo/models/providers/shop-courier.model.d.ts +0 -26
  749. package/dist/types/libraries/mongo/models/providers/shop-courier.model.js +0 -93
  750. package/dist/types/libraries/mongo/models/providers/shop-courier.model.js.map +0 -1
  751. package/dist/types/libraries/mongo/models/providers/shop-payout.model.d.ts +0 -62
  752. package/dist/types/libraries/mongo/models/providers/shop-payout.model.js +0 -244
  753. package/dist/types/libraries/mongo/models/providers/shop-payout.model.js.map +0 -1
  754. package/dist/types/libraries/mongo/models/providers/shop-review.model.d.ts +0 -12
  755. package/dist/types/libraries/mongo/models/providers/shop-review.model.js +0 -38
  756. package/dist/types/libraries/mongo/models/providers/shop-review.model.js.map +0 -1
  757. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.d.ts +0 -13
  758. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js +0 -47
  759. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js.map +0 -1
  760. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.d.ts +0 -11
  761. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js +0 -46
  762. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js.map +0 -1
  763. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.d.ts +0 -50
  764. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js +0 -192
  765. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js.map +0 -1
  766. package/dist/types/libraries/mongo/models/providers/vendor-review.model.d.ts +0 -12
  767. package/dist/types/libraries/mongo/models/providers/vendor-review.model.js +0 -38
  768. package/dist/types/libraries/mongo/models/providers/vendor-review.model.js.map +0 -1
  769. package/dist/types/libraries/mongo/models/punch-marketing-history.model.d.ts +0 -24
  770. package/dist/types/libraries/mongo/models/punch-marketing-history.model.js +0 -101
  771. package/dist/types/libraries/mongo/models/punch-marketing-history.model.js.map +0 -1
  772. package/dist/types/libraries/mongo/models/rating-setting.model.d.ts +0 -8
  773. package/dist/types/libraries/mongo/models/rating-setting.model.js +0 -46
  774. package/dist/types/libraries/mongo/models/rating-setting.model.js.map +0 -1
  775. package/dist/types/libraries/mongo/models/referral-setting.model.d.ts +0 -6
  776. package/dist/types/libraries/mongo/models/referral-setting.model.js +0 -32
  777. package/dist/types/libraries/mongo/models/referral-setting.model.js.map +0 -1
  778. package/dist/types/libraries/mongo/models/request-area.model.d.ts +0 -8
  779. package/dist/types/libraries/mongo/models/request-area.model.js +0 -33
  780. package/dist/types/libraries/mongo/models/request-area.model.js.map +0 -1
  781. package/dist/types/libraries/mongo/models/review.model.d.ts +0 -15
  782. package/dist/types/libraries/mongo/models/review.model.js +0 -68
  783. package/dist/types/libraries/mongo/models/review.model.js.map +0 -1
  784. package/dist/types/libraries/mongo/models/reward.model.d.ts +0 -16
  785. package/dist/types/libraries/mongo/models/reward.model.js +0 -70
  786. package/dist/types/libraries/mongo/models/reward.model.js.map +0 -1
  787. package/dist/types/libraries/mongo/models/rider-timeout.model.d.ts +0 -10
  788. package/dist/types/libraries/mongo/models/rider-timeout.model.js +0 -47
  789. package/dist/types/libraries/mongo/models/rider-timeout.model.js.map +0 -1
  790. package/dist/types/libraries/mongo/models/rider-tracking.model.d.ts +0 -10
  791. package/dist/types/libraries/mongo/models/rider-tracking.model.js +0 -47
  792. package/dist/types/libraries/mongo/models/rider-tracking.model.js.map +0 -1
  793. package/dist/types/libraries/mongo/models/rider.model.d.ts +0 -70
  794. package/dist/types/libraries/mongo/models/rider.model.js +0 -358
  795. package/dist/types/libraries/mongo/models/rider.model.js.map +0 -1
  796. package/dist/types/libraries/mongo/models/service-addon.model.d.ts +0 -16
  797. package/dist/types/libraries/mongo/models/service-addon.model.js +0 -86
  798. package/dist/types/libraries/mongo/models/service-addon.model.js.map +0 -1
  799. package/dist/types/libraries/mongo/models/service-booking.model.d.ts +0 -69
  800. package/dist/types/libraries/mongo/models/service-booking.model.js +0 -315
  801. package/dist/types/libraries/mongo/models/service-booking.model.js.map +0 -1
  802. package/dist/types/libraries/mongo/models/service-cart.model.d.ts +0 -14
  803. package/dist/types/libraries/mongo/models/service-cart.model.js +0 -51
  804. package/dist/types/libraries/mongo/models/service-cart.model.js.map +0 -1
  805. package/dist/types/libraries/mongo/models/service-category.model.d.ts +0 -14
  806. package/dist/types/libraries/mongo/models/service-category.model.js +0 -87
  807. package/dist/types/libraries/mongo/models/service-category.model.js.map +0 -1
  808. package/dist/types/libraries/mongo/models/service-control.model.d.ts +0 -22
  809. package/dist/types/libraries/mongo/models/service-control.model.js +0 -112
  810. package/dist/types/libraries/mongo/models/service-control.model.js.map +0 -1
  811. package/dist/types/libraries/mongo/models/service-flag.model.d.ts +0 -19
  812. package/dist/types/libraries/mongo/models/service-flag.model.js +0 -72
  813. package/dist/types/libraries/mongo/models/service-flag.model.js.map +0 -1
  814. package/dist/types/libraries/mongo/models/service-package.model.d.ts +0 -27
  815. package/dist/types/libraries/mongo/models/service-package.model.js +0 -142
  816. package/dist/types/libraries/mongo/models/service-package.model.js.map +0 -1
  817. package/dist/types/libraries/mongo/models/service-promotion.model.d.ts +0 -27
  818. package/dist/types/libraries/mongo/models/service-promotion.model.js +0 -120
  819. package/dist/types/libraries/mongo/models/service-promotion.model.js.map +0 -1
  820. package/dist/types/libraries/mongo/models/service.model.d.ts +0 -8
  821. package/dist/types/libraries/mongo/models/service.model.js +0 -43
  822. package/dist/types/libraries/mongo/models/service.model.js.map +0 -1
  823. package/dist/types/libraries/mongo/models/setting.model.d.ts +0 -50
  824. package/dist/types/libraries/mongo/models/setting.model.js +0 -196
  825. package/dist/types/libraries/mongo/models/setting.model.js.map +0 -1
  826. package/dist/types/libraries/mongo/models/shared/address.model.d.ts +0 -38
  827. package/dist/types/libraries/mongo/models/shared/address.model.js +0 -158
  828. package/dist/types/libraries/mongo/models/shared/address.model.js.map +0 -1
  829. package/dist/types/libraries/mongo/models/shared/duration.model.d.ts +0 -14
  830. package/dist/types/libraries/mongo/models/shared/duration.model.js +0 -59
  831. package/dist/types/libraries/mongo/models/shared/duration.model.js.map +0 -1
  832. package/dist/types/libraries/mongo/models/shared/geo-location.model.d.ts +0 -5
  833. package/dist/types/libraries/mongo/models/shared/geo-location.model.js +0 -28
  834. package/dist/types/libraries/mongo/models/shared/geo-location.model.js.map +0 -1
  835. package/dist/types/libraries/mongo/models/shared/work-hour.model.d.ts +0 -19
  836. package/dist/types/libraries/mongo/models/shared/work-hour.model.js +0 -81
  837. package/dist/types/libraries/mongo/models/shared/work-hour.model.js.map +0 -1
  838. package/dist/types/libraries/mongo/models/shop-access-control.model.d.ts +0 -16
  839. package/dist/types/libraries/mongo/models/shop-access-control.model.js +0 -81
  840. package/dist/types/libraries/mongo/models/shop-access-control.model.js.map +0 -1
  841. package/dist/types/libraries/mongo/models/shop-category.model.d.ts +0 -13
  842. package/dist/types/libraries/mongo/models/shop-category.model.js +0 -64
  843. package/dist/types/libraries/mongo/models/shop-category.model.js.map +0 -1
  844. package/dist/types/libraries/mongo/models/shop-meal-plan.model.d.ts +0 -12
  845. package/dist/types/libraries/mongo/models/shop-meal-plan.model.js +0 -45
  846. package/dist/types/libraries/mongo/models/shop-meal-plan.model.js.map +0 -1
  847. package/dist/types/libraries/mongo/models/shop-section.model.d.ts +0 -18
  848. package/dist/types/libraries/mongo/models/shop-section.model.js +0 -89
  849. package/dist/types/libraries/mongo/models/shop-section.model.js.map +0 -1
  850. package/dist/types/libraries/mongo/models/shop.model.d.ts +0 -65
  851. package/dist/types/libraries/mongo/models/shop.model.js +0 -304
  852. package/dist/types/libraries/mongo/models/shop.model.js.map +0 -1
  853. package/dist/types/libraries/mongo/models/spend-to-get-history.model.d.ts +0 -13
  854. package/dist/types/libraries/mongo/models/spend-to-get-history.model.js +0 -51
  855. package/dist/types/libraries/mongo/models/spend-to-get-history.model.js.map +0 -1
  856. package/dist/types/libraries/mongo/models/subscription.model.d.ts +0 -20
  857. package/dist/types/libraries/mongo/models/subscription.model.js +0 -93
  858. package/dist/types/libraries/mongo/models/subscription.model.js.map +0 -1
  859. package/dist/types/libraries/mongo/models/support-reason.model.d.ts +0 -10
  860. package/dist/types/libraries/mongo/models/support-reason.model.js +0 -61
  861. package/dist/types/libraries/mongo/models/support-reason.model.js.map +0 -1
  862. package/dist/types/libraries/mongo/models/tag.model.d.ts +0 -10
  863. package/dist/types/libraries/mongo/models/tag.model.js +0 -64
  864. package/dist/types/libraries/mongo/models/tag.model.js.map +0 -1
  865. package/dist/types/libraries/mongo/models/terms-and-conditions.model.d.ts +0 -8
  866. package/dist/types/libraries/mongo/models/terms-and-conditions.model.js +0 -51
  867. package/dist/types/libraries/mongo/models/terms-and-conditions.model.js.map +0 -1
  868. package/dist/types/libraries/mongo/models/ticket-action.model.d.ts +0 -4
  869. package/dist/types/libraries/mongo/models/ticket-action.model.js +0 -31
  870. package/dist/types/libraries/mongo/models/ticket-action.model.js.map +0 -1
  871. package/dist/types/libraries/mongo/models/ticket.model.d.ts +0 -35
  872. package/dist/types/libraries/mongo/models/ticket.model.js +0 -144
  873. package/dist/types/libraries/mongo/models/ticket.model.js.map +0 -1
  874. package/dist/types/libraries/mongo/models/tournament-participant.model.d.ts +0 -22
  875. package/dist/types/libraries/mongo/models/tournament-participant.model.js +0 -84
  876. package/dist/types/libraries/mongo/models/tournament-participant.model.js.map +0 -1
  877. package/dist/types/libraries/mongo/models/tournament.model.d.ts +0 -65
  878. package/dist/types/libraries/mongo/models/tournament.model.js +0 -273
  879. package/dist/types/libraries/mongo/models/tournament.model.js.map +0 -1
  880. package/dist/types/libraries/mongo/models/user-action.model.d.ts +0 -29
  881. package/dist/types/libraries/mongo/models/user-action.model.js +0 -113
  882. package/dist/types/libraries/mongo/models/user-action.model.js.map +0 -1
  883. package/dist/types/libraries/mongo/models/user-app-section-setting.model.d.ts +0 -24
  884. package/dist/types/libraries/mongo/models/user-app-section-setting.model.js +0 -103
  885. package/dist/types/libraries/mongo/models/user-app-section-setting.model.js.map +0 -1
  886. package/dist/types/libraries/mongo/models/user.model.d.ts +0 -40
  887. package/dist/types/libraries/mongo/models/user.model.js +0 -155
  888. package/dist/types/libraries/mongo/models/user.model.js.map +0 -1
  889. package/dist/types/libraries/mongo/models/vendor-access-control.model.d.ts +0 -14
  890. package/dist/types/libraries/mongo/models/vendor-access-control.model.js +0 -75
  891. package/dist/types/libraries/mongo/models/vendor-access-control.model.js.map +0 -1
  892. package/dist/types/libraries/mongo/models/vendor-parent.model.d.ts +0 -25
  893. package/dist/types/libraries/mongo/models/vendor-parent.model.js +0 -121
  894. package/dist/types/libraries/mongo/models/vendor-parent.model.js.map +0 -1
  895. package/dist/types/libraries/mongo/models/vendor.model.d.ts +0 -33
  896. package/dist/types/libraries/mongo/models/vendor.model.js +0 -150
  897. package/dist/types/libraries/mongo/models/vendor.model.js.map +0 -1
  898. package/dist/types/libraries/mongo/models/zone-extra-time.d.ts +0 -12
  899. package/dist/types/libraries/mongo/models/zone-extra-time.js +0 -54
  900. package/dist/types/libraries/mongo/models/zone-extra-time.js.map +0 -1
  901. package/dist/types/libraries/mongo/models/zone.model.d.ts +0 -17
  902. package/dist/types/libraries/mongo/models/zone.model.js +0 -80
  903. package/dist/types/libraries/mongo/models/zone.model.js.map +0 -1
  904. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.d.ts +0 -4
  905. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js +0 -42
  906. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js.map +0 -1
  907. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.d.ts +0 -32
  908. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js +0 -145
  909. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js.map +0 -1
  910. package/dist/types/libraries/mongo/utilities/shop.hooks.d.ts +0 -9
  911. package/dist/types/libraries/mongo/utilities/shop.hooks.js +0 -11
  912. package/dist/types/libraries/mongo/utilities/shop.hooks.js.map +0 -1
  913. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.d.ts +0 -14
  914. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js +0 -58
  915. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js.map +0 -1
  916. package/dist/types/libraries/mongo/utilities/unique-id.hooks.d.ts +0 -6
  917. package/dist/types/libraries/mongo/utilities/unique-id.hooks.js +0 -17
  918. package/dist/types/libraries/mongo/utilities/unique-id.hooks.js.map +0 -1
  919. package/dist/types/libraries/notification/firebase-fcm.service.d.ts +0 -7
  920. package/dist/types/libraries/notification/firebase-fcm.service.js +0 -40
  921. package/dist/types/libraries/notification/firebase-fcm.service.js.map +0 -1
  922. package/dist/types/libraries/notification/firebase-message.builder.d.ts +0 -22
  923. package/dist/types/libraries/notification/firebase-message.builder.js +0 -107
  924. package/dist/types/libraries/notification/firebase-message.builder.js.map +0 -1
  925. package/dist/types/libraries/notification/lyxa-fcm-sender.d.ts +0 -19
  926. package/dist/types/libraries/notification/lyxa-fcm-sender.js +0 -127
  927. package/dist/types/libraries/notification/lyxa-fcm-sender.js.map +0 -1
  928. package/dist/types/libraries/notification/lyxa-fcm.service.d.ts +0 -40
  929. package/dist/types/libraries/notification/lyxa-fcm.service.js +0 -177
  930. package/dist/types/libraries/notification/lyxa-fcm.service.js.map +0 -1
  931. package/dist/types/libraries/redis/index.d.ts +0 -25
  932. package/dist/types/libraries/redis/index.js +0 -137
  933. package/dist/types/libraries/redis/index.js.map +0 -1
  934. package/dist/types/libraries/secrets/index.d.ts +0 -10
  935. package/dist/types/libraries/secrets/index.js +0 -64
  936. package/dist/types/libraries/secrets/index.js.map +0 -1
  937. package/dist/types/libraries/socket/connections/cache.d.ts +0 -9
  938. package/dist/types/libraries/socket/connections/cache.js +0 -36
  939. package/dist/types/libraries/socket/connections/cache.js.map +0 -1
  940. package/dist/types/libraries/socket/connections/instance-disconnect.d.ts +0 -2
  941. package/dist/types/libraries/socket/connections/instance-disconnect.js +0 -43
  942. package/dist/types/libraries/socket/connections/instance-disconnect.js.map +0 -1
  943. package/dist/types/libraries/socket/connections/keys.d.ts +0 -10
  944. package/dist/types/libraries/socket/connections/keys.js +0 -23
  945. package/dist/types/libraries/socket/connections/keys.js.map +0 -1
  946. package/dist/types/libraries/socket/connections/redis-helpers.d.ts +0 -2
  947. package/dist/types/libraries/socket/connections/redis-helpers.js +0 -14
  948. package/dist/types/libraries/socket/connections/redis-helpers.js.map +0 -1
  949. package/dist/types/libraries/trpc/context.d.ts +0 -37
  950. package/dist/types/libraries/trpc/context.js +0 -43
  951. package/dist/types/libraries/trpc/context.js.map +0 -1
  952. package/dist/types/libraries/trpc/index.d.ts +0 -75
  953. package/dist/types/libraries/trpc/index.js +0 -80
  954. package/dist/types/libraries/trpc/index.js.map +0 -1
  955. package/dist/types/libraries/twilio/index.d.ts +0 -6
  956. package/dist/types/libraries/twilio/index.js +0 -42
  957. package/dist/types/libraries/twilio/index.js.map +0 -1
  958. package/dist/types/libraries/upload/index.d.ts +0 -50
  959. package/dist/types/libraries/upload/index.js +0 -312
  960. package/dist/types/libraries/upload/index.js.map +0 -1
  961. package/dist/types/utilities/auth-ref.mapper.d.ts +0 -4
  962. package/dist/types/utilities/auth-ref.mapper.js +0 -22
  963. package/dist/types/utilities/auth-ref.mapper.js.map +0 -1
  964. package/dist/types/utilities/dayjs/dayjs.d.ts +0 -14
  965. package/dist/types/utilities/dayjs/dayjs.js +0 -47
  966. package/dist/types/utilities/dayjs/dayjs.js.map +0 -1
  967. package/dist/types/utilities/dayjs/index.d.ts +0 -2
  968. package/dist/types/utilities/dayjs/index.js +0 -9
  969. package/dist/types/utilities/dayjs/index.js.map +0 -1
  970. package/dist/types/utilities/environment/rabbitmq-environments.d.ts +0 -2
  971. package/dist/types/utilities/environment/rabbitmq-environments.js +0 -14
  972. package/dist/types/utilities/environment/rabbitmq-environments.js.map +0 -1
  973. package/dist/types/utilities/environment/redis-environments.d.ts +0 -2
  974. package/dist/types/utilities/environment/redis-environments.js +0 -14
  975. package/dist/types/utilities/environment/redis-environments.js.map +0 -1
  976. package/dist/types/utilities/error-common.d.ts +0 -10
  977. package/dist/types/utilities/error-common.js +0 -76
  978. package/dist/types/utilities/error-common.js.map +0 -1
  979. package/dist/types/utilities/id-generator.d.ts +0 -6
  980. package/dist/types/utilities/id-generator.js +0 -161
  981. package/dist/types/utilities/id-generator.js.map +0 -1
  982. package/dist/types/utilities/instance.utils.d.ts +0 -1
  983. package/dist/types/utilities/instance.utils.js +0 -12
  984. package/dist/types/utilities/instance.utils.js.map +0 -1
  985. package/dist/types/utilities/normalize.d.ts +0 -6
  986. package/dist/types/utilities/normalize.js +0 -51
  987. package/dist/types/utilities/normalize.js.map +0 -1
  988. package/dist/types/utilities/password.d.ts +0 -2
  989. package/dist/types/utilities/password.js +0 -20
  990. package/dist/types/utilities/password.js.map +0 -1
  991. package/dist/types/utilities/projection.d.ts +0 -8
  992. package/dist/types/utilities/projection.js +0 -37
  993. package/dist/types/utilities/projection.js.map +0 -1
  994. package/dist/types/utilities/time.d.ts +0 -13
  995. package/dist/types/utilities/time.js +0 -128
  996. package/dist/types/utilities/time.js.map +0 -1
@@ -1,6 +1,7 @@
1
- import { FeaturedItem } from './embedded/featured-item.mode';
2
1
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ import { ItemType } from '../../../utilities/enum';
3
+ import { FeaturedItem } from './embedded/featured-item.mode';
3
4
  export declare class FeaturedSetting extends TimeStamps {
4
- itemType: string;
5
+ itemType: ItemType;
5
6
  featuredItems?: FeaturedItem[];
6
7
  }
@@ -11,15 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.FeaturedSetting = void 0;
13
13
  const typegoose_1 = require("@typegoose/typegoose");
14
- const featured_item_mode_1 = require("./embedded/featured-item.mode");
15
14
  const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ const enum_1 = require("../../../utilities/enum");
16
+ const featured_item_mode_1 = require("./embedded/featured-item.mode");
16
17
  let FeaturedSetting = class FeaturedSetting extends defaultClasses_1.TimeStamps {
17
18
  itemType;
18
19
  featuredItems;
19
20
  };
20
21
  exports.FeaturedSetting = FeaturedSetting;
21
22
  __decorate([
22
- (0, typegoose_1.prop)({ required: true, type: String }),
23
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
23
24
  __metadata("design:type", String)
24
25
  ], FeaturedSetting.prototype, "itemType", void 0);
25
26
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"featured-setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/featured-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,sEAA6D;AAC7D,4EAAqE;AAE9D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,QAAQ,CAAU;IAGlB,aAAa,CAAkB;CACtC,CAAA;AANY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,iCAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACZ;0BAL1B,eAAe;IAD3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;GACvD,eAAe,CAM3B","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { FeaturedItem } from './embedded/featured-item.mode';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n@modelOptions({ schemaOptions: { collection: 'featuredSettings' } })\nexport class FeaturedSetting extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic itemType!: string;\n\n\t@prop({ type: () => [FeaturedItem], default: [] })\n\tpublic featuredItems?: FeaturedItem[];\n}\n"]}
1
+ {"version":3,"file":"featured-setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/featured-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAmD;AACnD,sEAA6D;AAGtD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,QAAQ,CAAY;IAGpB,aAAa,CAAkB;CACtC,CAAA;AANY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAQ,EAAE,CAAC;;iDAC5B;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,iCAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACZ;0BAL1B,eAAe;IAD3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;GACvD,eAAe,CAM3B","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ItemType } from '../../../utilities/enum';\nimport { FeaturedItem } from './embedded/featured-item.mode';\n\n@modelOptions({ schemaOptions: { collection: 'featuredSettings' } })\nexport class FeaturedSetting extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: () => [FeaturedItem], default: [] })\n\tpublic featuredItems?: FeaturedItem[];\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
- import { Status } from '../../../utilities/enum';
2
+ import { Status, UserAppSectionItemType } from '../../../utilities/enum';
3
3
  export declare class FilterContainer extends TimeStamps {
4
4
  name: string;
5
5
  deals: string[];
6
- itemType?: string;
6
+ itemType?: UserAppSectionItemType;
7
7
  status?: Status;
8
8
  isVisible: boolean;
9
9
  sortingOrder?: number;
@@ -33,7 +33,7 @@ __decorate([
33
33
  __metadata("design:type", Array)
34
34
  ], FilterContainer.prototype, "deals", void 0);
35
35
  __decorate([
36
- (0, typegoose_1.prop)({ type: String }),
36
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.UserAppSectionItemType }),
37
37
  __metadata("design:type", String)
38
38
  ], FilterContainer.prototype, "itemType", void 0);
39
39
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"filter-container.model.js","sourceRoot":"/","sources":["libraries/mongo/models/filter-container.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAiD;AACjD,wBAAyC;AAEzC,0EAG0C;AAcnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAU;IAGd,KAAK,CAAY;IAGjB,QAAQ,CAAU;IAGlB,MAAM,CAAU;IAGhB,SAAS,C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,CAAC;IACR,CAAC,CAAC;GACW,eAAe,CAkB3B","sourcesContent":["import { Index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\nimport { FilterContainerModel } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'filterContainers' } })\n@Index({ itemType: 1, deletedAt: 1 })\n@pre<FilterContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, FilterContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<FilterContainer>('findOneAndUpdate', async function (this: Query<any, FilterContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, FilterContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class FilterContainer extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: [String] })\n\tpublic deals!: string[]; // e.g., \"5\", \"10\", \"20\", \"30\", \"buy1get1\", \"free_delivery\"\n\n\t@prop({ type: String })\n\tpublic itemType?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
1
+ {"version":3,"file":"filter-container.model.js","sourceRoot":"/","sources":["libraries/mongo/models/filter-container.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyE;AACzE,wBAAyC;AAEzC,0EAG0C;AAcnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAU;IAGd,KAAK,CAAY;IAGjB,QAAQ,CAA0B;IAGlC,MAAM,CAAU;IAGhB,SAAS,CAAW;IAGp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QAEzF,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,eAAe,CAkB3B","sourcesContent":["import { Index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status, UserAppSectionItemType } from '../../../utilities/enum';\nimport { FilterContainerModel } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'filterContainers' } })\n@Index({ itemType: 1, deletedAt: 1 })\n@pre<FilterContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, FilterContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<FilterContainer>('findOneAndUpdate', async function (this: Query<any, FilterContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, FilterContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class FilterContainer extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: [String] })\n\tpublic deals!: string[]; // e.g., \"5\", \"10\", \"20\", \"30\", \"buy1get1\", \"free_delivery\"\n\n\t@prop({ type: String, enum: UserAppSectionItemType })\n\tpublic itemType?: UserAppSectionItemType;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA0G;AAC1G,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAiC;AACjC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,EAAE,CAAC;IACrE,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3C,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAA,eAAG,EAAoB,MAAM,EAAE,KAAK;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC,CAAC;GACW,iBAAiB,CAiF7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel } from '.';\nimport { ServiceBooking } from './service-booking.model';\nimport { Vendor } from './vendor.model';\nimport { VendorParent } from './vendor-parent.model';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => ServiceBooking, index: true })\n\tpublic serviceBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType; // Todo: T-5188 Make Dynamic\n\n\t@prop({ ref: () => VendorParent, index: true })\n\tpublic vendorParent?: Ref<VendorParent>;\n\n\t@prop({ ref: () => Vendor, index: true })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: String, enum: ServiceType, index: true })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: string;\n}\n"]}
1
+ {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA0G;AAC1G,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAiC;AACjC,mEAAyD;AACzD,iDAAwC;AACxC,+DAAqD;AACrD,kEAA6D;AAUtD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,YAAY,CAAS;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,cAAc,CAAuB;IAGrC,OAAO,CAAU;IAGjB,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,QAAQ,CAAY;IAGpB,YAAY,CAAqB;IAGjC,MAAM,CAAe;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,IAAI,CAAa;IAGjB,cAAc,CAAkB;IAGhC,MAAM,CAAU;IAGhB,eAAe,CAAU;IAGzB,eAAe,CAAU;IAGzB,wBAAwB,CAAU;IAGlC,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;IAGrC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,UAAU,CAAU;IAGpB,mBAAmB,CAAU;IAG7B,eAAe,CAAU;IAGzB,QAAQ,CAAc;IAGtB,SAAS,CAAU;CAC1B,CAAA;AAjFY,8CAAiB;AAEtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;uDACtB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAA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EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mDACE;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;oDACb;4BAhFd,iBAAiB;IAR7B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrE,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3C,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAA,eAAG,EAAoB,MAAM,EAAE,KAAK;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC,CAAC;GACW,iBAAiB,CAiF7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel } from '.';\nimport { ServiceBooking } from './service-booking.model';\nimport { Vendor } from './vendor.model';\nimport { VendorParent } from './vendor-parent.model';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => ServiceBooking, index: true })\n\tpublic serviceBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType;\n\n\t@prop({ ref: () => VendorParent, index: true })\n\tpublic vendorParent?: Ref<VendorParent>;\n\n\t@prop({ ref: () => Vendor, index: true })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: String, enum: ServiceType, index: true })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: string;\n}\n"]}
@@ -3,7 +3,7 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
3
  import { Cart } from './cart.model';
4
4
  import { Product } from './product.model';
5
5
  import { OrderPriceBreakdown } from './embedded/price-breakdown.model';
6
- import { PriceOption } from '../../../utilities/enum';
6
+ import { ItemType, PriceOption } from '../../../utilities/enum';
7
7
  import { LineItemAttribute } from './embedded/line-item-attribute.model';
8
8
  import { User } from './user.model';
9
9
  import { Shop } from './shop.model';
@@ -18,7 +18,7 @@ export declare class LineItem extends TimeStamps {
18
18
  user: Ref<User>;
19
19
  shop: Ref<Shop>;
20
20
  parent: Ref<Parent>;
21
- itemType: string;
21
+ itemType: ItemType;
22
22
  category: Ref<Category>;
23
23
  product: Ref<Product>;
24
24
  productSnap?: ProductSnap;
@@ -75,7 +75,7 @@ __decorate([
75
75
  __metadata("design:type", Object)
76
76
  ], LineItem.prototype, "parent", void 0);
77
77
  __decorate([
78
- (0, typegoose_1.prop)({ required: true, type: String }),
78
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
79
79
  __metadata("design:type", String)
80
80
  ], LineItem.prototype, "itemType", void 0);
81
81
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA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IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC1B,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CAgGpB","sourcesContent":["import { prop, Ref, index, modelOptions, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, type: String })\n\tpublic itemType!: string;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockOut?: boolean;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity?: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE, _id: false })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown, _id: false })\n\tpublic priceBreakdown!: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed, _id: false })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAttributeAdjustedOnly?: boolean;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic adjustedAttributes?: LineItemAttribute[][];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1?: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic adjustmentRef?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSkipped?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAddedAfterAdjustmentReq?: boolean;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
1
+ {"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0F;AAC1F,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,4EAAuE;AACvE,kDAAgE;AAChE,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAC9C,sEAA4D;AAC5D,qEAA2D;AAC3D,uEAA6D;AAqBtD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,QAAQ,CAAY;IAGpB,QAAQ,CAAiB;IAGzB,OAAO,CAAgB;IAGvB,WAAW,CAAe;IAG1B,UAAU,CAAW;IAGrB,UAAU,CAAoB;IAG9B,iBAAiB,CAA2B;IAG5C,QAAQ,CAAU;IAGlB,WAAW,CAAe;IAG1B,cAAc,CAAuB;IAGrC,UAAU,CAAyB;IAGnC,kBAAkB,CAAY;IAG9B,mBAAmB,CAAU;IAG7B,eAAe,CAA2B;IAG1C,UAAU,CAAW;IAGrB,iBAAiB,CAAW;IAG5B,uBAAuB,CAAW;IAGlC,kBAAkB,CAAyB;IAG3C,gBAAgB,CAAU;IAG1B,MAAM,CAAW;IAGjB,YAAY,CAAU;IAGtB,YAAY,CAAU;IAGtB,aAAa,CAAU;IAGvB,SAAS,CAAW;IAGpB,yBAAyB,CAAW;IASpC,eAAe,CA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AAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACrB,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC1B,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CAgGpB","sourcesContent":["import { prop, Ref, index, modelOptions, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { ItemType, PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockOut?: boolean;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity?: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE, _id: false })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown, _id: false })\n\tpublic priceBreakdown!: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed, _id: false })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAttributeAdjustedOnly?: boolean;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic adjustedAttributes?: LineItemAttribute[][];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1?: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic adjustmentRef?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSkipped?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAddedAfterAdjustmentReq?: boolean;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
@@ -1,12 +1,12 @@
1
1
  import { Ref } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { Status } from '../../../utilities/enum';
3
+ import { ItemType, Status } from '../../../utilities/enum';
4
4
  import { Shop } from './shop.model';
5
5
  import { Tag } from './tag.model';
6
6
  import { Zone } from './zone.model';
7
7
  export declare class ListContainer extends TimeStamps {
8
8
  name: string;
9
- itemType: string;
9
+ itemType: ItemType;
10
10
  image: string;
11
11
  banner: string;
12
12
  zones?: Ref<Zone>[];
@@ -37,7 +37,7 @@ __decorate([
37
37
  __metadata("design:type", String)
38
38
  ], ListContainer.prototype, "name", void 0);
39
39
  __decorate([
40
- (0, typegoose_1.prop)({ required: true, type: String }),
40
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
41
41
  __metadata("design:type", String)
42
42
  ], ListContainer.prototype, "itemType", void 0);
43
43
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"list-container.model.js","sourceRoot":"/","sources":["libraries/mongo/models/list-container.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,kDAAiD;AACjD,6CAAoC;AACpC,2CAAkC;AAClC,6CAAoC;AAEpC,0EAG0C;AAC1C,wBAAuC;AAehC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAU;IAErC,IAAI,CAAU;IAGd,QAAQ,CAAU;IAGlB,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,KAAK,CAAe;IAGpB,KAAK,CAAY;IAGjB,IAAI,CAAc;IAGlB,KAAK,CAAe;IAGpB,MAAM,CAAU;IAGhB,SAAS,CAAW;IAGpB,YAAY,CAAU;CAC7B,CAAA;AAjCY,sCAAa;AAElB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;2CACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CAChB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACpB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GA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AI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,aAAa,CAiCzB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\nimport { ListContainerModel } from '.';\n\n@modelOptions({ schemaOptions: { collection: 'listContainers' } })\n@index({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ itemType: 1, deletedAt: 1 })\n@pre<ListContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, ListContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<ListContainer>('findOneAndUpdate', async function (this: Query<any, ListContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, ListContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class ListContainer extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 30 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic itemType!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic image!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic banner!: string;\n\n\t@prop({ ref: () => Zone, default: [] })\n\tpublic zones?: Ref<Zone>[];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic deals?: string[];\n\n\t@prop({ ref: () => Tag, default: [] })\n\tpublic tags?: Ref<Tag>[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
1
+ {"version":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AAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,aAAa,CAiCzB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ItemType, Status } from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { Tag } from './tag.model';\nimport { Zone } from './zone.model';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\nimport { ListContainerModel } from '.';\n\n@modelOptions({ schemaOptions: { collection: 'listContainers' } })\n@index({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ itemType: 1, deletedAt: 1 })\n@pre<ListContainer>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, ListContainerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<ListContainer>('findOneAndUpdate', async function (this: Query<any, ListContainer>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, ListContainerModel, ['itemType']);\n\n\tnext();\n})\nexport class ListContainer extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 30 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, type: String })\n\tpublic image!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic banner!: string;\n\n\t@prop({ ref: () => Zone, default: [] })\n\tpublic zones?: Ref<Zone>[];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic deals?: string[];\n\n\t@prop({ ref: () => Tag, default: [] })\n\tpublic tags?: Ref<Tag>[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible!: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;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AI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,KAAK,GAAG,IAAA,eAAK,GAAE,CAAC,EAAE,CAAC,mBAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAExD,MAAM,OAAO,GAAG,MAAM,eAAY,CAAC,gBAAgB,CAClD,EAAE,WAAW,EAAE,kBAAW,CAAC,KAAK,EAAE,EAClC;gBACC;oBACC,IAAI,EAAE;wBACL,KAAK,EAAE;4BACN,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;yBAC/D;wBACD,KAAK,EAAE,KAAK;qBACZ;iBACD;aACD,EACD,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAC3B,CAAC;YAEF,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QACvE,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,KAAK,CAsLjB","sourcesContent":["import { index, modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tCounterType,\n\tFlagReasonType,\n\tFlagType,\n\tOrderType,\n\tUrgentOrderReasons,\n} from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { Rider } from './rider.model';\nimport { DeliveryFeeInformation } from './embedded/order-delivery-information.model';\nimport { RiderAssignment } from './embedded/rider-assignment-model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { TripLeg } from './embedded/trip-leg.mode';\nimport { CounterModel } from '.';\nimport { Chatroom } from './chat-room.model';\nimport { LyxaTimezone } from '../../../utilities/time';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'orders',\n\t\tdiscriminatorKey: 'orderType',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@index({ 'deliveryAddress.location': '2dsphere' })\n@index({ user: 1, status: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ itemType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ rider: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ 'riderAssignments.rider': 1, 'riderAssignments.status': 1 })\n@pre<Order>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().tz(LyxaTimezone).format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class Order extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic orderId: string;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic orderType?: OrderType;\n\n\t@prop({ type: Number })\n\tpublic bringChangeAmount?: number;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ type: () => DeliveryFeeInformation })\n\tpublic deliveryFeeInformation?: DeliveryFeeInformation;\n\n\t@prop({ type: Date })\n\tpublic initialEstimatedDeliveredTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic initialEstimatedDeliveredTimeInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic estimatedDeliveredTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedDeliveredTimeInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic deliveredTimeInMinutes?: number;\n\n\t@prop({ type: String })\n\tpublic instruction?: string;\n\n\t@prop({ type: String })\n\tpublic note?: string;\n\n\t@prop({ type: Date })\n\tpublic scheduledFor?: Date;\n\n\t@prop({ type: Date })\n\tpublic triggerAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: () => OrderCancel })\n\tpublic orderCancel?: OrderCancel;\n\n\t@prop({ type: String })\n\tpublic cancellationMsgToUser?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLateOrder?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n\n\t@prop({ type: () => [String], enum: UrgentOrderReasons, default: [] })\n\tpublic urgentOrderReason?: UrgentOrderReasons[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({\n\t\ttype: Number,\n\t\trequired: true,\n\t\tmin: 1000,\n\t\tmax: 9999,\n\t\tvalidate: {\n\t\t\tvalidator: (v: number) => Number.isInteger(v),\n\t\t\tmessage: 'Pin code must be an integer',\n\t\t},\n\t})\n\tpublic pinCode!: number;\n\n\t// Review feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isOrderReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isResolved?: boolean;\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n\n\t// Flag feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: [String], enum: FlagType, default: [] })\n\tpublic flagTypes?: FlagType[];\n\n\t@prop({ type: () => [String], enum: FlagReasonType, default: [] })\n\tpublic flagOrderReason?: FlagReasonType[];\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({\n\t\tref: () => Flag,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags?: Ref<Flag>[];\n\n\t@prop({ type: () => [RiderAssignment], default: [] })\n\tpublic riderAssignments?: RiderAssignment[];\n\n\t@prop({ type: Date })\n\tpublic estimatedPickupTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic actualPickupTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedPickupArrivalTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedPickupArrivalTimeInMinutes?: Number;\n\n\t@prop({ type: Date })\n\tpublic actualPickupArrivalTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualPickupArrivalTimeInMinutes?: Number;\n\n\t@prop({ type: Date })\n\tpublic riderSearchingStartTime?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalSearchAttempts?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic lastSearchRadiusInKm?: number;\n\n\t@prop({ type: () => [TripLeg], default: [] })\n\tpublic tripSummary?: TripLeg[];\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({\n\t\tref: 'Chatroom', // ✅ Use string instead of () => Chatroom\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t\tjustOne: false,\n\t})\n\tpublic chatrooms?: Ref<Chatroom>[];\n\n\t@prop({ type: Date })\n\tpublic riderNearbyNotifiedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic hasChatroom?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic paymentAuthRequired?: boolean;\n\n\t@prop({ type: () => Array, default: [] })\n\tetaExtensionReasons?: Array<{\n\t\treason: UrgentOrderReasons | FlagReasonType;\n\t\tappliedAt: Date;\n\t}>;\n\t@prop({\n\t\ttype: Object,\n\t\tdefault: {},\n\t})\n\tpublic translations?: Record<string, any>;\n}\n"]}
1
+ {"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAMiC;AACjC,sEAA4D;AAC5D,+CAAsC;AACtC,kGAAqF;AACrF,8EAAoE;AACpE,6CAAoC;AACpC,iDAAwC;AACxC,4DAAmD;AACnD,wBAAiC;AAEjC,kDAAuD;AACvD,kDAA0B;AAC1B,2DAAmC;AACnC,qEAA6C;AAG7C,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAClB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AA6ChB,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,OAAO,CAAS;IAGhB,SAAS,CAAa;IAGtB,iBAAiB,CAAU;IAG3B,KAAK,CAAc;IAGnB,sBAAsB,CAA0B;IAGhD,6BAA6B,CAAQ;IAGrC,sCAAsC,CAAU;IAGhD,sBAAsB,CAAQ;IAG9B,+BAA+B,CAAU;IAGzC,WAAW,CAAQ;IAGnB,sBAAsB,CAAU;IAGhC,WAAW,CAAU;IAGrB,IAAI,CAAU;IAGd,YAAY,CAAQ;IAGpB,SAAS,CA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{ index, modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tCounterType,\n\tFlagReasonType,\n\tFlagType,\n\tOrderType,\n\tUrgentOrderReasons,\n} from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { Rider } from './rider.model';\nimport { DeliveryFeeInformation } from './embedded/order-delivery-information.model';\nimport { RiderAssignment } from './embedded/rider-assignment-model';\nimport { Flag } from './flag.model';\nimport { Review } from './review.model';\nimport { TripLeg } from './embedded/trip-leg.mode';\nimport { CounterModel } from '.';\nimport { Chatroom } from './chat-room.model';\nimport { LyxaTimezone } from '../../../utilities/time';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport { User } from './user.model';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'orders',\n\t\tdiscriminatorKey: 'orderType',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@index({ 'deliveryAddress.location': '2dsphere' })\n@index({ user: 1, status: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ itemType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ rider: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ 'riderAssignments.rider': 1, 'riderAssignments.status': 1 })\n@pre<Order>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().tz(LyxaTimezone).format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class Order extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic orderId: string;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic orderType?: OrderType;\n\n\t@prop({ type: Number })\n\tpublic bringChangeAmount?: number;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ type: () => DeliveryFeeInformation })\n\tpublic deliveryFeeInformation?: DeliveryFeeInformation;\n\n\t@prop({ type: Date })\n\tpublic initialEstimatedDeliveredTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic initialEstimatedDeliveredTimeInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic estimatedDeliveredTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedDeliveredTimeInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic deliveredTimeInMinutes?: number;\n\n\t@prop({ type: String })\n\tpublic instruction?: string;\n\n\t@prop({ type: String })\n\tpublic note?: string;\n\n\t@prop({ type: Date })\n\tpublic scheduledFor?: Date;\n\n\t@prop({ type: Date })\n\tpublic triggerAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: () => OrderCancel })\n\tpublic orderCancel?: OrderCancel;\n\n\t@prop({ type: String })\n\tpublic cancellationMsgToUser?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLateOrder?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n\n\t@prop({ type: () => [String], enum: UrgentOrderReasons, default: [] })\n\tpublic urgentOrderReason?: UrgentOrderReasons[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({\n\t\ttype: Number,\n\t\trequired: true,\n\t\tmin: 1000,\n\t\tmax: 9999,\n\t\tvalidate: {\n\t\t\tvalidator: (v: number) => Number.isInteger(v),\n\t\t\tmessage: 'Pin code must be an integer',\n\t\t},\n\t})\n\tpublic pinCode!: number;\n\n\t// Review feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isOrderReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isResolved?: boolean;\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n\n\t// Flag feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: [String], enum: FlagType, default: [] })\n\tpublic flagTypes?: FlagType[];\n\n\t@prop({ type: () => [String], enum: FlagReasonType, default: [] })\n\tpublic flagOrderReason?: FlagReasonType[];\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({\n\t\tref: () => Flag,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags?: Ref<Flag>[];\n\n\t@prop({ type: () => [RiderAssignment], default: [] })\n\tpublic riderAssignments?: RiderAssignment[];\n\n\t@prop({ type: Date })\n\tpublic estimatedPickupTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic actualPickupTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedPickupArrivalTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedPickupArrivalTimeInMinutes?: Number;\n\n\t@prop({ type: Date })\n\tpublic actualPickupArrivalTime?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualPickupArrivalTimeInMinutes?: Number;\n\n\t@prop({ type: Date })\n\tpublic riderSearchingStartTime?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalSearchAttempts?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic lastSearchRadiusInKm?: number;\n\n\t@prop({ type: () => [TripLeg], default: [] })\n\tpublic tripSummary?: TripLeg[];\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({\n\t\tref: 'Chatroom', // ✅ Use string instead of () => Chatroom\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t\tjustOne: false,\n\t})\n\tpublic chatrooms?: Ref<Chatroom>[];\n\n\t@prop({ type: Date })\n\tpublic riderNearbyNotifiedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic hasChatroom?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic paymentAuthRequired?: boolean;\n\n\t@prop({ type: () => Array, default: [] })\n\tetaExtensionReasons?: Array<{\n\t\treason: UrgentOrderReasons | FlagReasonType;\n\t\tappliedAt: Date;\n\t}>;\n\t@prop({\n\t\ttype: Object,\n\t\tdefault: {},\n\t})\n\tpublic translations?: Record<string, any>;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Ref } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { ChargeType, Status } from '../../../utilities/enum';
3
+ import { ChargeType, ItemType, Status } from '../../../utilities/enum';
4
4
  import { Admin } from './admin.model';
5
5
  import { Charge } from './embedded/charge.model';
6
6
  import { ParentDocument } from './embedded/parent-document.model';
@@ -15,7 +15,7 @@ export declare class Parent extends TimeStamps {
15
15
  chargeType: ChargeType;
16
16
  charge: Charge;
17
17
  commissionDuration: Duration;
18
- itemType: string;
18
+ itemType: ItemType;
19
19
  isServiceFeeCharged: boolean;
20
20
  businessDevExecutive?: Ref<Admin>;
21
21
  accountManager?: Ref<Admin>;
@@ -76,7 +76,7 @@ __decorate([
76
76
  __metadata("design:type", duration_model_1.Duration)
77
77
  ], Parent.prototype, "commissionDuration", void 0);
78
78
  __decorate([
79
- (0, typegoose_1.prop)({ required: true, type: String }),
79
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
80
80
  __metadata("design:type", String)
81
81
  ], Parent.prototype, "itemType", void 0);
82
82
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAA0E;AAC1E,+CAAsC;AACtC,0DAAiD;AACjD,4EAAkE;AAClE,0DAAiD;AACjD,4DAAmD;AACnD,6CAAoC;AACpC,kEAA6D;AAC7D,wBAAiC;AAgB1B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,IAAI,CAAU;IAGd,QAAQ,CAAS;IAGjB,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,OAAO,CAAW;IAGlB,UAAU,CAAc;IAGxB,MAAM,CAAU;IAGhB,kBAAkB,CAAY;IAG9B,QAAQ,CAAU;IAGlB,mBAAmB,CAAW;IAG9B,oBAAoB,CAAc;IAGlC,cAAc,CAAc;IAG5B,MAAM,CAAU;IAGhB,YAAY,CAAU;IAGtB,QAAQ,CAAkB;IAS1B,SAAS,CAAU;IAGnB,iBAAiB,CAAU;IAG3B,kBAAkB,CAAU;IAG5B,sBAAsB,CAAW;CACxC,CAAA;AA/DY,wBAAM;AAEX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC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AE,EAAE,CAAC;IAC9E,IAAA,eAAG,EAAS,MAAM,EAAE,KAAK;QACzB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;IACD,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QAClG,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;GACW,MAAM,CA+DlB","sourcesContent":["import { index, modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ChargeType, CounterType, Status } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { Charge } from './embedded/charge.model';\nimport { ParentDocument } from './embedded/parent-document.model';\nimport { Address } from './shared/address.model';\nimport { Duration } from './shared/duration.model';\nimport { Shop } from './shop.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel } from '.';\n\n@index({ name: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ accountManager: 1 }, { partialFilterExpression: { deletedAt: null } })\n@pre<Parent>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.parentId = await generateId(CounterModel, CounterType.PARENT);\n\t}\n})\n@modelOptions({\n\tschemaOptions: { collection: 'parents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\nexport class Parent extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ type: String, unique: true })\n\tpublic parentId: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, type: String, enum: ChargeType, default: ChargeType.CUSTOM })\n\tpublic chargeType!: ChargeType;\n\n\t@prop({ required: true, type: Charge })\n\tpublic charge!: Charge;\n\n\t@prop({ required: true, type: Duration })\n\tpublic commissionDuration!: Duration;\n\n\t@prop({ required: true, type: String})\n\tpublic itemType!: string;\n\n\t@prop({ required: true, type: Boolean, default: true })\n\tpublic isServiceFeeCharged!: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic businessDevExecutive?: Ref<Admin>;\n\n\t@prop({ ref: () => Admin })\n\tpublic accountManager?: Ref<Admin>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: ParentDocument })\n\tpublic document?: ParentDocument;\n\n\t@prop({\n\t\tref: () => Shop,\n\t\tforeignField: 'parent',\n\t\tlocalField: '_id',\n\t\tcount: true,\n\t\tmatch: { deletedAt: null },\n\t})\n\tpublic shopCount?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic allowTakingOrders: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic showCustomerNumber: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic hideOutOfStockProducts?: boolean;\n}\n"]}
1
+ {"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAAoF;AACpF,+CAAsC;AACtC,0DAAiD;AACjD,4EAAkE;AAClE,0DAAiD;AACjD,4DAAmD;AACnD,6CAAoC;AACpC,kEAA6D;AAC7D,wBAAiC;AAgB1B,IAAM,MAAM,GAAZ,MAAM,MAAO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AO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACL;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;sDACA;iBA9D5B,MAAM;IAdlB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAClF,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IACnF,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAC9E,IAAA,eAAG,EAAS,MAAM,EAAE,KAAK;QACzB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;IACD,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QAClG,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;GACW,MAAM,CA+DlB","sourcesContent":["import { index, modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ChargeType, CounterType, ItemType, Status } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { Charge } from './embedded/charge.model';\nimport { ParentDocument } from './embedded/parent-document.model';\nimport { Address } from './shared/address.model';\nimport { Duration } from './shared/duration.model';\nimport { Shop } from './shop.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel } from '.';\n\n@index({ name: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@index({ accountManager: 1 }, { partialFilterExpression: { deletedAt: null } })\n@pre<Parent>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.parentId = await generateId(CounterModel, CounterType.PARENT);\n\t}\n})\n@modelOptions({\n\tschemaOptions: { collection: 'parents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\nexport class Parent extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ type: String, unique: true })\n\tpublic parentId: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, type: String, enum: ChargeType, default: ChargeType.CUSTOM })\n\tpublic chargeType!: ChargeType;\n\n\t@prop({ required: true, type: Charge })\n\tpublic charge!: Charge;\n\n\t@prop({ required: true, type: Duration })\n\tpublic commissionDuration!: Duration;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, type: Boolean, default: true })\n\tpublic isServiceFeeCharged!: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic businessDevExecutive?: Ref<Admin>;\n\n\t@prop({ ref: () => Admin })\n\tpublic accountManager?: Ref<Admin>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: ParentDocument })\n\tpublic document?: ParentDocument;\n\n\t@prop({\n\t\tref: () => Shop,\n\t\tforeignField: 'parent',\n\t\tlocalField: '_id',\n\t\tcount: true,\n\t\tmatch: { deletedAt: null },\n\t})\n\tpublic shopCount?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic allowTakingOrders: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic showCustomerNumber: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic hideOutOfStockProducts?: boolean;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Ref } from '@typegoose/typegoose';
2
2
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { PriceOption, ProductDietaryType, ProductType, Status } from '../../../utilities/enum';
3
+ import { ItemType, PriceOption, ProductDietaryType, ProductType, Status } from '../../../utilities/enum';
4
4
  import { ProductNutrition } from './embedded/product-nutrition.model';
5
5
  import { ExternalRef } from './embedded/external-ref.model';
6
6
  import { Shop } from './shop.model';
@@ -23,7 +23,7 @@ export declare class Product extends TimeStamps {
23
23
  nameNormalized?: string;
24
24
  barcode?: string;
25
25
  shopCategory: Ref<ShopCategory>;
26
- itemType: string;
26
+ itemType: ItemType;
27
27
  productType?: ProductType;
28
28
  logo?: string;
29
29
  images?: string[];
@@ -111,7 +111,7 @@ __decorate([
111
111
  __metadata("design:type", Object)
112
112
  ], Product.prototype, "shopCategory", void 0);
113
113
  __decorate([
114
- (0, typegoose_1.prop)({ required: true, type: String }),
114
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
115
115
  __metadata("design:type", String)
116
116
  ], Product.prototype, "itemType", void 0);
117
117
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAqC;AACrC,oDAAmF;AACnF,4EAAqE;AACrE,kDAMiC;AACjC,gFAAsE;AACtE,sEAA4D;AAC5D,6CAAoC;AACpC,4EAAkE;AAClE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AAE,CAAC;YACd,IAAI,CAAC,GAAY,CAAC,CAAC;QACpB,CAAC;IACF,CAAC,CAAC;IACD,IAAA,eAAG,EAAU,MAAM,EAAE,KAAK,WAAW,IAAI;QACzC,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YAC7D,IAAI,IAAI,CAAC,aAAa,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,oCAAoC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC;QACF,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,kBAAM,EAAC,6CAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;GACnC,OAAO,CAmJnB;AAED,SAAS,kBAAkB,CAAC,UAA6B;IACxD,IAAI,CAAC,UAAU,EAAE,MAAM;QAAE,OAAO;IAChC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG;YAAE,SAAS,CAAC,GAAG,GAAG,IAAA,oBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;AACF,CAAC;AAED,KAAK,UAAU,oCAAoC,CAAC,SAAkC;IACrF,MAAM,cAAW,CAAC,UAAU,CAC3B;QACC,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,aAAM,CAAC,MAAM;QACrB,SAAS,EAAE,IAAI;KACf,EACD;QACC,IAAI,EAAE,EAAE,MAAM,EAAE,aAAM,CAAC,QAAQ,EAAE;KACjC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { randomBytes } from 'crypto';\nimport { Index, modelOptions, plugin, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tCounterType,\t\n\tPriceOption,\n\tProductDietaryType,\n\tProductType,\n\tStatus,\n} from '../../../utilities/enum';\nimport { ProductNutrition } from './embedded/product-nutrition.model';\nimport { ExternalRef } from './embedded/external-ref.model';\nimport { Shop } from './shop.model';\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\nimport { AttributeMap } from './embedded/attribute-map.model';\nimport { ShopCategory } from './shop-category.model';\nimport { BannerModel, CounterModel, ProductMarketing, ProductModel } from '.';\nimport { handlePreSaveForSorting } from '../utilities/sorting-order.hooks';\nimport { normalizeFieldPlugin } from '../plugins/normalize-field.plugin';\nimport { generateId } from '../../../utilities/id-generator';\nimport { PreparingTime } from './embedded/preparing-time.model';\nimport mongoose from 'mongoose';\nimport { ProductMarketingInfo } from './embedded/product-marketing-info.model';\nimport { ProductCategory } from './embedded/product-category.model';\nimport { ProductSearchFields } from './embedded/product-search-fields.model';\nimport { Address } from './shared/address.model';\nimport { ProductBrand } from './product-brand.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'products', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n})\n@Index(\n\t{ nameNormalized: 1, shop: 1, shopCategory: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@Index({ shop: 1, shopCategory: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ shop: 1, isStockEnabled: 1, stockQuantity: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ nameNormalized: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index(\n\t{ stockAvailableAt: 1 },\n\t{ partialFilterExpression: { deletedAt: null, stockAvailableAt: { $exists: true, $ne: null } } }\n)\n@pre<Product>('save', async function (next) {\n\t// Set sortingOrder\n\tawait handlePreSaveForSorting.call(this, ProductModel, {\n\t\tshop: this.shop,\n\t\tshopCategory: this.shopCategory,\n\t});\n\n\tnext();\n})\n@pre<Product>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.productId = await generateId(CounterModel, CounterType.ITEM);\n\t}\n})\n@pre<Product>('save', function (next) {\n\tensureBreakdownIds(this.priceBreakdowns);\n\tnext();\n})\n@pre<mongoose.Query<Product, Product>>(['findOneAndUpdate', 'updateOne', 'updateMany'], function (next) {\n\ttry {\n\t\tconst update = this.getUpdate() as any;\n\t\tif (!update) return next();\n\n\t\t// handles direct and $set\n\t\tif (update.priceBreakdowns) ensureBreakdownIds(update.priceBreakdowns);\n\t\tif (update.$set?.priceBreakdowns) ensureBreakdownIds(update.$set.priceBreakdowns);\n\n\t\t// handles $push\n\t\tconst pushed = update.$push?.priceBreakdowns;\n\t\tif (pushed) ensureBreakdownIds(Array.isArray(pushed.$each) ? pushed.$each : [pushed]);\n\n\t\t// handles $addToSet\n\t\tconst addedToSet = update.$addToSet?.priceBreakdowns;\n\t\tif (addedToSet) ensureBreakdownIds(Array.isArray(addedToSet.$each) ? addedToSet.$each : [addedToSet]);\n\n\t\tnext();\n\t} catch (err) {\n\t\tnext(err as Error);\n\t}\n})\n@pre<Product>('save', async function (next) {\n\tif (this.isStockEnabled && this.stockQuantity !== undefined) {\n\t\tif (this.stockQuantity < 1) {\n\t\t\tawait deactivateBannerForOutOfStockProduct(this._id);\n\t\t}\n\t}\n\tnext();\n})\n@plugin(normalizeFieldPlugin, { field: 'name' })\nexport class Product extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic productId: string;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: String, trim: true, maxlength: 100 })\n\tpublic name!: string;\n\n\t@prop({ type: String, trim: true })\n\tpublic ArabicName?: string;\n\n\t@prop({ type: [String], trim: true })\n\tpublic keywords?: string[];\n\n\t@prop({ type: String, trim: true, lowercase: true, select: false })\n\tpublic nameNormalized?: string;\n\n\t@prop({ type: String, trim: true, maxlength: 50 })\n\tpublic barcode?: string;\n\n\t@prop({ required: true, ref: () => ShopCategory })\n\tpublic shopCategory!: Ref<ShopCategory>;\n\n\t@prop({ required: true, type: String })\n\tpublic itemType!: string;\n\n\t@prop({ type: String, enum: ProductType })\n\tpublic productType?: ProductType;\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: [String], default: [] })\n\tpublic images?: string[];\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: [PriceBreakdown] })\n\tpublic priceBreakdowns?: PriceBreakdown[];\n\n\t@prop({ type: String, maxlength: 500 })\n\tpublic description?: string;\n\n\t@prop({ type: [AttributeMap], default: [] })\n\tpublic attributeMaps?: AttributeMap[];\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic addons?: Ref<Product>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNutritionEnabled?: boolean;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic nutritionPackSize?: number;\n\n\t@prop({ type: String })\n\tpublic nutritionPackSizeUnit?: string;\n\n\t@prop({ type: String })\n\tpublic sku?: string;\n\n\t@prop({ type: [ProductNutrition], default: [] })\n\tpublic nutritions?: ProductNutrition[];\n\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\n\tpublic dietaryTypes?: ProductDietaryType[];\n\n\t@prop({ type: Number, min: -9999, max: 9999 })\n\tpublic storedTemperature?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockEnabled?: boolean;\n\n\t@prop({ type: Number, max: 999999999 }) // isStockEnabled: true and stockQuantity < 1 means out of stock\n\tpublic stockQuantity?: number;\n\n\t/**\n\t * Optional scheduled restore timestamp.\n\t * When set along with stockQuantity < 1, the system will automatically\n\t * set the item back to in-stock once this datetime is reached.\n\t * Cleared when the item is manually restored or the schedule is cancelled.\n\t */\n\t@prop({ type: Date })\n\tpublic stockAvailableAt?: Date;\n\n\t@prop({ type: String, enum: Status })\n\tpublic statusBeforeOutOfStock?: Status;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDrinkIncluded?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLargeItem?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPreOrderEnabled?: boolean;\n\n\t// this field needed when pre-order enabled\n\t@prop({ type: PreparingTime })\n\tpublic preparingTime?: PreparingTime;\n\n\t@prop({ type: Number, min: 0, max: 999999999 }) // 0 means, it is disable\n\tpublic orderQuantityLimit?: number;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isHidden?: boolean;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'product',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic productMarketing?: Ref<ProductMarketing>; // Virtual reference to ProductMarketing\n\n\t@prop({ type: () => [ProductMarketingInfo], default: [] })\n\tpublic productMarketingInfo?: ProductMarketingInfo[]; // precomputed product marketing info for efficient query\n\n\t@prop({ type: () => [ExternalRef], default: [] })\n\tpublic externalRefs?: ExternalRef[];\n\n\t@prop({ type: ProductCategory })\n\tpublic parentCategory?: ProductCategory;\n\n\t@prop({ type: ProductCategory })\n\tpublic subCategory?: ProductCategory;\n\n\t@prop({ type: ProductSearchFields })\n\tpublic searchFields?: ProductSearchFields;\n\n\t@prop({ required: false, type: Address })\n\tpublic shopAddress?: Address;\n\n\t@prop({ ref: () => ProductBrand })\n\tpublic productBrand?: Ref<ProductBrand>;\n}\n\nfunction ensureBreakdownIds(breakdowns: any[] | undefined) {\n\tif (!breakdowns?.length) return;\n\tfor (const breakdown of breakdowns) {\n\t\tif (!breakdown.uid) breakdown.uid = randomBytes(8).toString('hex');\n\t}\n}\n\nasync function deactivateBannerForOutOfStockProduct(productId: mongoose.Types.ObjectId) {\n\tawait BannerModel.updateMany(\n\t\t{\n\t\t\tproduct: productId,\n\t\t\tstatus: Status.ACTIVE,\n\t\t\tdeletedAt: null,\n\t\t},\n\t\t{\n\t\t\t$set: { status: Status.INACTIVE },\n\t\t}\n\t);\n}\n"]}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KACjC,CACD,CAAC;AACH,CAAC","sourcesContent":["import { randomBytes } from 'crypto';\nimport { Index, modelOptions, plugin, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tCounterType,\n\tItemType,\n\tPriceOption,\n\tProductDietaryType,\n\tProductType,\n\tStatus,\n} from '../../../utilities/enum';\nimport { ProductNutrition } from './embedded/product-nutrition.model';\nimport { ExternalRef } from './embedded/external-ref.model';\nimport { Shop } from './shop.model';\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\nimport { AttributeMap } from './embedded/attribute-map.model';\nimport { ShopCategory } from './shop-category.model';\nimport { BannerModel, CounterModel, ProductMarketing, ProductModel } from '.';\nimport { handlePreSaveForSorting } from '../utilities/sorting-order.hooks';\nimport { normalizeFieldPlugin } from '../plugins/normalize-field.plugin';\nimport { generateId } from '../../../utilities/id-generator';\nimport { PreparingTime } from './embedded/preparing-time.model';\nimport mongoose from 'mongoose';\nimport { ProductMarketingInfo } from './embedded/product-marketing-info.model';\nimport { ProductCategory } from './embedded/product-category.model';\nimport { ProductSearchFields } from './embedded/product-search-fields.model';\nimport { Address } from './shared/address.model';\nimport { ProductBrand } from './product-brand.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'products', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n})\n@Index(\n\t{ nameNormalized: 1, shop: 1, shopCategory: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@Index({ shop: 1, shopCategory: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ shop: 1, isStockEnabled: 1, stockQuantity: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index({ nameNormalized: 1 }, { partialFilterExpression: { deletedAt: null } })\n@Index(\n\t{ stockAvailableAt: 1 },\n\t{ partialFilterExpression: { deletedAt: null, stockAvailableAt: { $exists: true, $ne: null } } }\n)\n@pre<Product>('save', async function (next) {\n\t// Set sortingOrder\n\tawait handlePreSaveForSorting.call(this, ProductModel, {\n\t\tshop: this.shop,\n\t\tshopCategory: this.shopCategory,\n\t});\n\n\tnext();\n})\n@pre<Product>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.productId = await generateId(CounterModel, CounterType.ITEM);\n\t}\n})\n@pre<Product>('save', function (next) {\n\tensureBreakdownIds(this.priceBreakdowns);\n\tnext();\n})\n@pre<mongoose.Query<Product, Product>>(['findOneAndUpdate', 'updateOne', 'updateMany'], function (next) {\n\ttry {\n\t\tconst update = this.getUpdate() as any;\n\t\tif (!update) return next();\n\n\t\t// handles direct and $set\n\t\tif (update.priceBreakdowns) ensureBreakdownIds(update.priceBreakdowns);\n\t\tif (update.$set?.priceBreakdowns) ensureBreakdownIds(update.$set.priceBreakdowns);\n\n\t\t// handles $push\n\t\tconst pushed = update.$push?.priceBreakdowns;\n\t\tif (pushed) ensureBreakdownIds(Array.isArray(pushed.$each) ? pushed.$each : [pushed]);\n\n\t\t// handles $addToSet\n\t\tconst addedToSet = update.$addToSet?.priceBreakdowns;\n\t\tif (addedToSet) ensureBreakdownIds(Array.isArray(addedToSet.$each) ? addedToSet.$each : [addedToSet]);\n\n\t\tnext();\n\t} catch (err) {\n\t\tnext(err as Error);\n\t}\n})\n@pre<Product>('save', async function (next) {\n\tif (this.isStockEnabled && this.stockQuantity !== undefined) {\n\t\tif (this.stockQuantity < 1) {\n\t\t\tawait deactivateBannerForOutOfStockProduct(this._id);\n\t\t}\n\t}\n\tnext();\n})\n@plugin(normalizeFieldPlugin, { field: 'name' })\nexport class Product extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic productId: string;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: String, trim: true, maxlength: 100 })\n\tpublic name!: string;\n\n\t@prop({ type: String, trim: true })\n\tpublic ArabicName?: string;\n\n\t@prop({ type: [String], trim: true })\n\tpublic keywords?: string[];\n\n\t@prop({ type: String, trim: true, lowercase: true, select: false })\n\tpublic nameNormalized?: string;\n\n\t@prop({ type: String, trim: true, maxlength: 50 })\n\tpublic barcode?: string;\n\n\t@prop({ required: true, ref: () => ShopCategory })\n\tpublic shopCategory!: Ref<ShopCategory>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: String, enum: ProductType })\n\tpublic productType?: ProductType;\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: [String], default: [] })\n\tpublic images?: string[];\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: [PriceBreakdown] })\n\tpublic priceBreakdowns?: PriceBreakdown[];\n\n\t@prop({ type: String, maxlength: 500 })\n\tpublic description?: string;\n\n\t@prop({ type: [AttributeMap], default: [] })\n\tpublic attributeMaps?: AttributeMap[];\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic addons?: Ref<Product>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNutritionEnabled?: boolean;\n\n\t@prop({ type: Number, min: 0 })\n\tpublic nutritionPackSize?: number;\n\n\t@prop({ type: String })\n\tpublic nutritionPackSizeUnit?: string;\n\n\t@prop({ type: String })\n\tpublic sku?: string;\n\n\t@prop({ type: [ProductNutrition], default: [] })\n\tpublic nutritions?: ProductNutrition[];\n\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\n\tpublic dietaryTypes?: ProductDietaryType[];\n\n\t@prop({ type: Number, min: -9999, max: 9999 })\n\tpublic storedTemperature?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockEnabled?: boolean;\n\n\t@prop({ type: Number, max: 999999999 }) // isStockEnabled: true and stockQuantity < 1 means out of stock\n\tpublic stockQuantity?: number;\n\n\t/**\n\t * Optional scheduled restore timestamp.\n\t * When set along with stockQuantity < 1, the system will automatically\n\t * set the item back to in-stock once this datetime is reached.\n\t * Cleared when the item is manually restored or the schedule is cancelled.\n\t */\n\t@prop({ type: Date })\n\tpublic stockAvailableAt?: Date;\n\n\t@prop({ type: String, enum: Status })\n\tpublic statusBeforeOutOfStock?: Status;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDrinkIncluded?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLargeItem?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPreOrderEnabled?: boolean;\n\n\t// this field needed when pre-order enabled\n\t@prop({ type: PreparingTime })\n\tpublic preparingTime?: PreparingTime;\n\n\t@prop({ type: Number, min: 0, max: 999999999 }) // 0 means, it is disable\n\tpublic orderQuantityLimit?: number;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isHidden?: boolean;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'product',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic productMarketing?: Ref<ProductMarketing>; // Virtual reference to ProductMarketing\n\n\t@prop({ type: () => [ProductMarketingInfo], default: [] })\n\tpublic productMarketingInfo?: ProductMarketingInfo[]; // precomputed product marketing info for efficient query\n\n\t@prop({ type: () => [ExternalRef], default: [] })\n\tpublic externalRefs?: ExternalRef[];\n\n\t@prop({ type: ProductCategory })\n\tpublic parentCategory?: ProductCategory;\n\n\t@prop({ type: ProductCategory })\n\tpublic subCategory?: ProductCategory;\n\n\t@prop({ type: ProductSearchFields })\n\tpublic searchFields?: ProductSearchFields;\n\n\t@prop({ required: false, type: Address })\n\tpublic shopAddress?: Address;\n\n\t@prop({ ref: () => ProductBrand })\n\tpublic productBrand?: Ref<ProductBrand>;\n}\n\nfunction ensureBreakdownIds(breakdowns: any[] | undefined) {\n\tif (!breakdowns?.length) return;\n\tfor (const breakdown of breakdowns) {\n\t\tif (!breakdown.uid) breakdown.uid = randomBytes(8).toString('hex');\n\t}\n}\n\nasync function deactivateBannerForOutOfStockProduct(productId: mongoose.Types.ObjectId) {\n\tawait BannerModel.updateMany(\n\t\t{\n\t\t\tproduct: productId,\n\t\t\tstatus: Status.ACTIVE,\n\t\t\tdeletedAt: null,\n\t\t},\n\t\t{\n\t\t\t$set: { status: Status.INACTIVE },\n\t\t}\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"custom-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/custom-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,iEAAuD;AACvD,8CAAqC;AACrC,8CAAqC;AACrC,kDAAyC;AAEzC,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,aAAsB,CAAC;IAG/C,UAAU,CAAa;IAGvB,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;CAC/B;AAdD,oCAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;gDACZ;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+CACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;6CACV","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Shop } from '../shop.model';\nimport { User } from '../user.model';\nimport { Vendor } from '../vendor.model';\n\nexport class CustomCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.CUSTOM_COUPON as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic influencer!: Ref<User>;\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[]; // Todo: T-5188 Make Dynamic\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n}\n"]}
1
+ {"version":3,"file":"custom-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/custom-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,iEAAuD;AACvD,8CAAqC;AACrC,8CAAqC;AACrC,kDAAyC;AAEzC,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,aAAsB,CAAC;IAG/C,UAAU,CAAa;IAGvB,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;CAC/B;AAdD,oCAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;gDACZ;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+CACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;6CACV","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Shop } from '../shop.model';\nimport { User } from '../user.model';\nimport { Vendor } from '../vendor.model';\n\nexport class CustomCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.CUSTOM_COUPON as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic influencer!: Ref<User>;\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"individual-store-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/individual-store-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAwD;AACxD,8CAAqC;AACrC,iEAAuD;AACvD,kDAAyC;AAEzC,MAAa,qBAAsB,SAAQ,8BAAU;IAC7C,UAAU,GAAG,iBAAU,CAAC,gBAAyB,CAAC;IAGlD,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,mBAAmB,CAAW;IAG9B,cAAc,CAAW;CAChC;AAdD,sDAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDACF;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;qDACA;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kEACF;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACR","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType } from '../../../../utilities/enum';\nimport { Shop } from '../shop.model';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Vendor } from '../vendor.model';\n\nexport class IndividualStoreCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.INDIVIDUAL_STORE as const;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Vendor })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isShopCoverExpenses?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic firstOrderOnly?: boolean;\n}\n"]}
1
+ {"version":3,"file":"individual-store-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/individual-store-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,8CAAqC;AACrC,iEAAuD;AACvD,kDAAyC;AAEzC,MAAa,qBAAsB,SAAQ,8BAAU;IAC7C,UAAU,GAAG,iBAAU,CAAC,gBAAyB,CAAC;IAGlD,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,mBAAmB,CAAW;IAG9B,cAAc,CAAW;CAChC;AAdD,sDAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDACF;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;qDACA;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kEACF;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACR","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { Shop } from '../shop.model';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Vendor } from '../vendor.model';\n\nexport class IndividualStoreCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.INDIVIDUAL_STORE as const;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Vendor })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isShopCoverExpenses?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic firstOrderOnly?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"individual-user-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/individual-user-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,iEAAuD;AACvD,8CAAqC;AACrC,8CAAqC;AACrC,kDAAyC;AAEzC,MAAa,oBAAqB,SAAQ,8BAAU;IAC5C,UAAU,GAAG,iBAAU,CAAC,eAAwB,CAAC;IAGjD,KAAK,CAAe;IAGpB,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;CAC/B;AAdD,oDAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDACf;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uDACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;mDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACV","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Shop } from '../shop.model';\nimport { User } from '../user.model';\nimport { Vendor } from '../vendor.model';\n\nexport class IndividualUserCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.INDIVIDUAL_USER as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic users!: Ref<User>[];\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[]; // Todo: T-5188 Make Dynamic\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n}\n"]}
1
+ {"version":3,"file":"individual-user-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/individual-user-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,iEAAuD;AACvD,8CAAqC;AACrC,8CAAqC;AACrC,kDAAyC;AAEzC,MAAa,oBAAqB,SAAQ,8BAAU;IAC5C,UAAU,GAAG,iBAAU,CAAC,eAAwB,CAAC;IAGjD,KAAK,CAAe;IAGpB,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;CAC/B;AAdD,oDAcC;AAVO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;mDACf;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uDACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;mDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACV","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Shop } from '../shop.model';\nimport { User } from '../user.model';\nimport { Vendor } from '../vendor.model';\n\nexport class IndividualUserCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.INDIVIDUAL_USER as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic users!: Ref<User>[];\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"shops-categories-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/shops-categories-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,8CAAqC;AACrC,iEAAuD;AACvD,kDAAyC;AAEzC,MAAa,qBAAsB,SAAQ,8BAAU;IAC7C,UAAU,GAAG,iBAAU,CAAC,gBAAyB,CAAC;IAGlD,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;IAGxB,mBAAmB,CAAW;IAG9B,cAAc,CAAW;CAChC;AAjBD,sDAiBC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wDACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;oDACC;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACV;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kEACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACR","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { Shop } from '../shop.model';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Vendor } from '../vendor.model';\n\nexport class ShopsCategoriesCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.SHOPS_CATEGORIES as const;\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[]; // Todo: T-5188 Make Dynamic\n\n\t@prop({ ref: () => Shop })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopCoverExpenses?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic firstOrderOnly?: boolean;\n}\n"]}
1
+ {"version":3,"file":"shops-categories-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/shops-categories-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAkE;AAClE,8CAAqC;AACrC,iEAAuD;AACvD,kDAAyC;AAEzC,MAAa,qBAAsB,SAAQ,8BAAU;IAC7C,UAAU,GAAG,iBAAU,CAAC,gBAAyB,CAAC;IAGlD,SAAS,CAAc;IAGvB,KAAK,CAAe;IAGpB,OAAO,CAAiB;IAGxB,mBAAmB,CAAW;IAG9B,cAAc,CAAW;CAChC;AAjBD,sDAiBC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wDACxB;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;oDACC;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACV;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kEACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACR","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CouponType, ItemType } from '../../../../utilities/enum';\nimport { Shop } from '../shop.model';\nimport { BaseCoupon } from '../base/base-coupon.model';\nimport { Vendor } from '../vendor.model';\n\nexport class ShopsCategoriesCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.SHOPS_CATEGORIES as const;\n\n\t@prop({ type: [String], enum: ItemType, default: [] })\n\tpublic itemTypes?: ItemType[];\n\n\t@prop({ ref: () => Shop })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Vendor, default: [] })\n\tpublic vendors?: Ref<Vendor>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopCoverExpenses?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic firstOrderOnly?: boolean;\n}\n"]}
@@ -67,4 +67,5 @@ export declare class Rider extends TimeStamps {
67
67
  cashInHandHoldPeriodLimit?: Date | null;
68
68
  ignoreCashInHandLimits?: boolean;
69
69
  isMaxCashBalanceForBobPayoutReached?: boolean;
70
+ hasPendingPayoutRequest?: boolean;
70
71
  }
@@ -91,6 +91,7 @@ let Rider = class Rider extends defaultClasses_1.TimeStamps {
91
91
  cashInHandHoldPeriodLimit;
92
92
  ignoreCashInHandLimits;
93
93
  isMaxCashBalanceForBobPayoutReached;
94
+ hasPendingPayoutRequest;
94
95
  };
95
96
  exports.Rider = Rider;
96
97
  __decorate([
@@ -331,6 +332,10 @@ __decorate([
331
332
  (0, typegoose_1.prop)({ type: Boolean, default: false }),
332
333
  __metadata("design:type", Boolean)
333
334
  ], Rider.prototype, "isMaxCashBalanceForBobPayoutReached", void 0);
335
+ __decorate([
336
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
337
+ __metadata("design:type", Boolean)
338
+ ], Rider.prototype, "hasPendingPayoutRequest", void 0);
334
339
  exports.Rider = Rider = __decorate([
335
340
  (0, typegoose_1.pre)('save', async function (next) {
336
341
  if (this.isModified('password')) {