@lyxa.ai/core 1.4.298 → 1.4.300

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 (992) hide show
  1. package/dist/libraries/llm/interfaces/common-llm-interfaces.d.ts +2 -2
  2. package/dist/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -1
  3. package/dist/libraries/llm/providers/openai-provider.js +6 -6
  4. package/dist/libraries/llm/providers/openai-provider.js.map +1 -1
  5. package/dist/libraries/mongo/models/embedded/status-timeline.model.d.ts +1 -1
  6. package/dist/libraries/mongo/models/embedded/status-timeline.model.js +5 -5
  7. package/dist/libraries/mongo/models/embedded/status-timeline.model.js.map +1 -1
  8. package/dist/types/README.md +1 -1
  9. package/dist/types/package.json +1 -1
  10. package/package.json +1 -1
  11. package/dist/types/index.js.map +0 -1
  12. package/dist/types/libraries/auth/index.d.ts +0 -77
  13. package/dist/types/libraries/auth/index.js +0 -270
  14. package/dist/types/libraries/auth/index.js.map +0 -1
  15. package/dist/types/libraries/auth/refreshtoken.d.ts +0 -15
  16. package/dist/types/libraries/auth/refreshtoken.js +0 -91
  17. package/dist/types/libraries/auth/refreshtoken.js.map +0 -1
  18. package/dist/types/libraries/auth/repository.d.ts +0 -18
  19. package/dist/types/libraries/auth/repository.js +0 -43
  20. package/dist/types/libraries/auth/repository.js.map +0 -1
  21. package/dist/types/libraries/bullmq/bull-mq-service.d.ts +0 -9
  22. package/dist/types/libraries/bullmq/bull-mq-service.js +0 -42
  23. package/dist/types/libraries/bullmq/bull-mq-service.js.map +0 -1
  24. package/dist/types/libraries/cache/settings/index.d.ts +0 -7
  25. package/dist/types/libraries/cache/settings/index.js +0 -56
  26. package/dist/types/libraries/cache/settings/index.js.map +0 -1
  27. package/dist/types/libraries/cash-settlement/cashSettlementService.d.ts +0 -16
  28. package/dist/types/libraries/cash-settlement/cashSettlementService.js +0 -53
  29. package/dist/types/libraries/cash-settlement/cashSettlementService.js.map +0 -1
  30. package/dist/types/libraries/cash-settlement/index.d.ts +0 -2
  31. package/dist/types/libraries/cash-settlement/index.js +0 -19
  32. package/dist/types/libraries/cash-settlement/index.js.map +0 -1
  33. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.d.ts +0 -24
  34. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js +0 -10
  35. package/dist/types/libraries/cash-settlement/interfaces/ICashSettlement.js.map +0 -1
  36. package/dist/types/libraries/cash-settlement/providers/bob.d.ts +0 -45
  37. package/dist/types/libraries/cash-settlement/providers/bob.js +0 -634
  38. package/dist/types/libraries/cash-settlement/providers/bob.js.map +0 -1
  39. package/dist/types/libraries/cash-settlement/providers/index.d.ts +0 -1
  40. package/dist/types/libraries/cash-settlement/providers/index.js +0 -18
  41. package/dist/types/libraries/cash-settlement/providers/index.js.map +0 -1
  42. package/dist/types/libraries/cloud-storage/CloudStorageFactory.d.ts +0 -7
  43. package/dist/types/libraries/cloud-storage/CloudStorageFactory.js +0 -18
  44. package/dist/types/libraries/cloud-storage/CloudStorageFactory.js.map +0 -1
  45. package/dist/types/libraries/cloud-storage/index.d.ts +0 -4
  46. package/dist/types/libraries/cloud-storage/index.js +0 -21
  47. package/dist/types/libraries/cloud-storage/index.js.map +0 -1
  48. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.d.ts +0 -8
  49. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js +0 -3
  50. package/dist/types/libraries/cloud-storage/interfaces/ICloudStorage.js.map +0 -1
  51. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.d.ts +0 -11
  52. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js +0 -63
  53. package/dist/types/libraries/cloud-storage/providers/GcsStorageService.js.map +0 -1
  54. package/dist/types/libraries/cloud-storage/types/FileUploadResult.d.ts +0 -11
  55. package/dist/types/libraries/cloud-storage/types/FileUploadResult.js +0 -3
  56. package/dist/types/libraries/cloud-storage/types/FileUploadResult.js.map +0 -1
  57. package/dist/types/libraries/configuration/index.d.ts +0 -39
  58. package/dist/types/libraries/configuration/index.js +0 -84
  59. package/dist/types/libraries/configuration/index.js.map +0 -1
  60. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.d.ts +0 -9
  61. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js +0 -14
  62. package/dist/types/libraries/configuration/types/EnvironmentConfigurationType.js.map +0 -1
  63. package/dist/types/libraries/dispatcher/index.d.ts +0 -10
  64. package/dist/types/libraries/dispatcher/index.js +0 -43
  65. package/dist/types/libraries/dispatcher/index.js.map +0 -1
  66. package/dist/types/libraries/event/BaseEvent.d.ts +0 -7
  67. package/dist/types/libraries/event/BaseEvent.js +0 -19
  68. package/dist/types/libraries/event/BaseEvent.js.map +0 -1
  69. package/dist/types/libraries/event/EventEnums.d.ts +0 -26
  70. package/dist/types/libraries/event/EventEnums.js +0 -31
  71. package/dist/types/libraries/event/EventEnums.js.map +0 -1
  72. package/dist/types/libraries/event/decorators/metadata.d.ts +0 -13
  73. package/dist/types/libraries/event/decorators/metadata.js +0 -20
  74. package/dist/types/libraries/event/decorators/metadata.js.map +0 -1
  75. package/dist/types/libraries/event/events/index.d.ts +0 -2
  76. package/dist/types/libraries/event/events/index.js +0 -19
  77. package/dist/types/libraries/event/events/index.js.map +0 -1
  78. package/dist/types/libraries/event/events/payout/index.d.ts +0 -1
  79. package/dist/types/libraries/event/events/payout/index.js +0 -18
  80. package/dist/types/libraries/event/events/payout/index.js.map +0 -1
  81. package/dist/types/libraries/event/events/payout/payout-schedule.event.d.ts +0 -9
  82. package/dist/types/libraries/event/events/payout/payout-schedule.event.js +0 -12
  83. package/dist/types/libraries/event/events/payout/payout-schedule.event.js.map +0 -1
  84. package/dist/types/libraries/event/events/rider/cash/index.d.ts +0 -5
  85. package/dist/types/libraries/event/events/rider/cash/index.js +0 -14
  86. package/dist/types/libraries/event/events/rider/cash/index.js.map +0 -1
  87. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.d.ts +0 -11
  88. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js +0 -19
  89. package/dist/types/libraries/event/events/rider/cash/rider-cash-added.event.js.map +0 -1
  90. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.d.ts +0 -11
  91. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js +0 -18
  92. package/dist/types/libraries/event/events/rider/cash/rider-cash-event.js.map +0 -1
  93. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.d.ts +0 -10
  94. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js +0 -17
  95. package/dist/types/libraries/event/events/rider/cash/rider-cash-hold-period-changed.event.js.map +0 -1
  96. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.d.ts +0 -11
  97. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js +0 -19
  98. package/dist/types/libraries/event/events/rider/cash/rider-cash-settled.event.js.map +0 -1
  99. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.d.ts +0 -10
  100. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js +0 -17
  101. package/dist/types/libraries/event/events/rider/cash/rider-max-cash-balance-for-bob-payout-updated.event.js.map +0 -1
  102. package/dist/types/libraries/event/events/rider/index.d.ts +0 -2
  103. package/dist/types/libraries/event/events/rider/index.js +0 -19
  104. package/dist/types/libraries/event/events/rider/index.js.map +0 -1
  105. package/dist/types/libraries/event/events/rider/scoring/index.d.ts +0 -7
  106. package/dist/types/libraries/event/events/rider/scoring/index.js +0 -18
  107. package/dist/types/libraries/event/events/rider/scoring/index.js.map +0 -1
  108. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.d.ts +0 -11
  109. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js +0 -20
  110. package/dist/types/libraries/event/events/rider/scoring/rider-accepted-order.event.js.map +0 -1
  111. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.d.ts +0 -13
  112. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js +0 -24
  113. package/dist/types/libraries/event/events/rider/scoring/rider-arrived-at-store.event.js.map +0 -1
  114. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.d.ts +0 -11
  115. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js +0 -20
  116. package/dist/types/libraries/event/events/rider/scoring/rider-assigned-order.event.js.map +0 -1
  117. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.d.ts +0 -13
  118. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js +0 -24
  119. package/dist/types/libraries/event/events/rider/scoring/rider-delivered-order.event.js.map +0 -1
  120. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.d.ts +0 -19
  121. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js +0 -36
  122. package/dist/types/libraries/event/events/rider/scoring/rider-order-completed.event.js.map +0 -1
  123. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.d.ts +0 -13
  124. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js +0 -18
  125. package/dist/types/libraries/event/events/rider/scoring/rider-rating.event.js.map +0 -1
  126. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.d.ts +0 -14
  127. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js +0 -21
  128. package/dist/types/libraries/event/events/rider/scoring/rider-score-event.js.map +0 -1
  129. package/dist/types/libraries/event/index.d.ts +0 -11
  130. package/dist/types/libraries/event/index.js +0 -152
  131. package/dist/types/libraries/event/index.js.map +0 -1
  132. package/dist/types/libraries/event/registry/SubscriptionRegistry.d.ts +0 -11
  133. package/dist/types/libraries/event/registry/SubscriptionRegistry.js +0 -14
  134. package/dist/types/libraries/event/registry/SubscriptionRegistry.js.map +0 -1
  135. package/dist/types/libraries/firebase/index.d.ts +0 -16
  136. package/dist/types/libraries/firebase/index.js +0 -107
  137. package/dist/types/libraries/firebase/index.js.map +0 -1
  138. package/dist/types/libraries/google-translate/google-translate.client.d.ts +0 -5
  139. package/dist/types/libraries/google-translate/google-translate.client.js +0 -44
  140. package/dist/types/libraries/google-translate/google-translate.client.js.map +0 -1
  141. package/dist/types/libraries/google-translate/google-translate.dto.d.ts +0 -13
  142. package/dist/types/libraries/google-translate/google-translate.dto.js +0 -3
  143. package/dist/types/libraries/google-translate/google-translate.dto.js.map +0 -1
  144. package/dist/types/libraries/google-translate/google-translate.service.d.ts +0 -9
  145. package/dist/types/libraries/google-translate/google-translate.service.js +0 -102
  146. package/dist/types/libraries/google-translate/google-translate.service.js.map +0 -1
  147. package/dist/types/libraries/google-translate/index.d.ts +0 -1
  148. package/dist/types/libraries/google-translate/index.js +0 -18
  149. package/dist/types/libraries/google-translate/index.js.map +0 -1
  150. package/dist/types/libraries/index.d.ts +0 -43
  151. package/dist/types/libraries/index.js +0 -102
  152. package/dist/types/libraries/index.js.map +0 -1
  153. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.d.ts +0 -28
  154. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js +0 -3
  155. package/dist/types/libraries/llm/interfaces/common-llm-interfaces.js.map +0 -1
  156. package/dist/types/libraries/llm/llm-provider-service.d.ts +0 -13
  157. package/dist/types/libraries/llm/llm-provider-service.js +0 -47
  158. package/dist/types/libraries/llm/llm-provider-service.js.map +0 -1
  159. package/dist/types/libraries/llm/providers/openai-provider.d.ts +0 -19
  160. package/dist/types/libraries/llm/providers/openai-provider.js +0 -223
  161. package/dist/types/libraries/llm/providers/openai-provider.js.map +0 -1
  162. package/dist/types/libraries/logger/index.d.ts +0 -8
  163. package/dist/types/libraries/logger/index.js +0 -75
  164. package/dist/types/libraries/logger/index.js.map +0 -1
  165. package/dist/types/libraries/logger-kit/index.d.ts +0 -3
  166. package/dist/types/libraries/logger-kit/index.js +0 -22
  167. package/dist/types/libraries/logger-kit/index.js.map +0 -1
  168. package/dist/types/libraries/logger-kit/logger.service.d.ts +0 -117
  169. package/dist/types/libraries/logger-kit/logger.service.js +0 -304
  170. package/dist/types/libraries/logger-kit/logger.service.js.map +0 -1
  171. package/dist/types/libraries/logger-kit/types.d.ts +0 -34
  172. package/dist/types/libraries/logger-kit/types.js +0 -3
  173. package/dist/types/libraries/logger-kit/types.js.map +0 -1
  174. package/dist/types/libraries/map/index.d.ts +0 -2
  175. package/dist/types/libraries/map/index.js +0 -19
  176. package/dist/types/libraries/map/index.js.map +0 -1
  177. package/dist/types/libraries/map/interfaces/IMapService.d.ts +0 -43
  178. package/dist/types/libraries/map/interfaces/IMapService.js +0 -9
  179. package/dist/types/libraries/map/interfaces/IMapService.js.map +0 -1
  180. package/dist/types/libraries/map/mapService.d.ts +0 -21
  181. package/dist/types/libraries/map/mapService.js +0 -57
  182. package/dist/types/libraries/map/mapService.js.map +0 -1
  183. package/dist/types/libraries/map/providers/google-maps.d.ts +0 -27
  184. package/dist/types/libraries/map/providers/google-maps.js +0 -462
  185. package/dist/types/libraries/map/providers/google-maps.js.map +0 -1
  186. package/dist/types/libraries/map/providers/index.d.ts +0 -1
  187. package/dist/types/libraries/map/providers/index.js +0 -18
  188. package/dist/types/libraries/map/providers/index.js.map +0 -1
  189. package/dist/types/libraries/map/providers/osrm.d.ts +0 -13
  190. package/dist/types/libraries/map/providers/osrm.js +0 -137
  191. package/dist/types/libraries/map/providers/osrm.js.map +0 -1
  192. package/dist/types/libraries/mongo/index.d.ts +0 -7
  193. package/dist/types/libraries/mongo/index.js +0 -87
  194. package/dist/types/libraries/mongo/index.js.map +0 -1
  195. package/dist/types/libraries/mongo/models/activity-log.model.d.ts +0 -10
  196. package/dist/types/libraries/mongo/models/activity-log.model.js +0 -48
  197. package/dist/types/libraries/mongo/models/activity-log.model.js.map +0 -1
  198. package/dist/types/libraries/mongo/models/admin-access-control.model.d.ts +0 -11
  199. package/dist/types/libraries/mongo/models/admin-access-control.model.js +0 -75
  200. package/dist/types/libraries/mongo/models/admin-access-control.model.js.map +0 -1
  201. package/dist/types/libraries/mongo/models/admin.model.d.ts +0 -11
  202. package/dist/types/libraries/mongo/models/admin.model.js +0 -65
  203. package/dist/types/libraries/mongo/models/admin.model.js.map +0 -1
  204. package/dist/types/libraries/mongo/models/agent-performance.model.d.ts +0 -15
  205. package/dist/types/libraries/mongo/models/agent-performance.model.js +0 -73
  206. package/dist/types/libraries/mongo/models/agent-performance.model.js.map +0 -1
  207. package/dist/types/libraries/mongo/models/app-appearance.model.d.ts +0 -25
  208. package/dist/types/libraries/mongo/models/app-appearance.model.js +0 -102
  209. package/dist/types/libraries/mongo/models/app-appearance.model.js.map +0 -1
  210. package/dist/types/libraries/mongo/models/app-instance.model.d.ts +0 -10
  211. package/dist/types/libraries/mongo/models/app-instance.model.js +0 -54
  212. package/dist/types/libraries/mongo/models/app-instance.model.js.map +0 -1
  213. package/dist/types/libraries/mongo/models/attribute.model.d.ts +0 -13
  214. package/dist/types/libraries/mongo/models/attribute.model.js +0 -58
  215. package/dist/types/libraries/mongo/models/attribute.model.js.map +0 -1
  216. package/dist/types/libraries/mongo/models/banner.model.d.ts +0 -27
  217. package/dist/types/libraries/mongo/models/banner.model.js +0 -118
  218. package/dist/types/libraries/mongo/models/banner.model.js.map +0 -1
  219. package/dist/types/libraries/mongo/models/base/base-coupon.model.d.ts +0 -19
  220. package/dist/types/libraries/mongo/models/base/base-coupon.model.js +0 -90
  221. package/dist/types/libraries/mongo/models/base/base-coupon.model.js.map +0 -1
  222. package/dist/types/libraries/mongo/models/bob-finance.model.d.ts +0 -19
  223. package/dist/types/libraries/mongo/models/bob-finance.model.js +0 -88
  224. package/dist/types/libraries/mongo/models/bob-finance.model.js.map +0 -1
  225. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.d.ts +0 -9
  226. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js +0 -48
  227. package/dist/types/libraries/mongo/models/booking-cancellation-rescheduling-rules.model.js.map +0 -1
  228. package/dist/types/libraries/mongo/models/brand.model.d.ts +0 -5
  229. package/dist/types/libraries/mongo/models/brand.model.js +0 -32
  230. package/dist/types/libraries/mongo/models/brand.model.js.map +0 -1
  231. package/dist/types/libraries/mongo/models/cancellation-reason.model.d.ts +0 -8
  232. package/dist/types/libraries/mongo/models/cancellation-reason.model.js +0 -55
  233. package/dist/types/libraries/mongo/models/cancellation-reason.model.js.map +0 -1
  234. package/dist/types/libraries/mongo/models/card.model.d.ts +0 -19
  235. package/dist/types/libraries/mongo/models/card.model.js +0 -88
  236. package/dist/types/libraries/mongo/models/card.model.js.map +0 -1
  237. package/dist/types/libraries/mongo/models/cart-participant.model.d.ts +0 -29
  238. package/dist/types/libraries/mongo/models/cart-participant.model.js +0 -130
  239. package/dist/types/libraries/mongo/models/cart-participant.model.js.map +0 -1
  240. package/dist/types/libraries/mongo/models/cart.model.d.ts +0 -39
  241. package/dist/types/libraries/mongo/models/cart.model.js +0 -184
  242. package/dist/types/libraries/mongo/models/cart.model.js.map +0 -1
  243. package/dist/types/libraries/mongo/models/category.model.d.ts +0 -12
  244. package/dist/types/libraries/mongo/models/category.model.js +0 -68
  245. package/dist/types/libraries/mongo/models/category.model.js.map +0 -1
  246. package/dist/types/libraries/mongo/models/chat-room.model.d.ts +0 -28
  247. package/dist/types/libraries/mongo/models/chat-room.model.js +0 -99
  248. package/dist/types/libraries/mongo/models/chat-room.model.js.map +0 -1
  249. package/dist/types/libraries/mongo/models/copy-attribute-map.model.d.ts +0 -8
  250. package/dist/types/libraries/mongo/models/copy-attribute-map.model.js +0 -38
  251. package/dist/types/libraries/mongo/models/copy-attribute-map.model.js.map +0 -1
  252. package/dist/types/libraries/mongo/models/copy-product-job.model.d.ts +0 -21
  253. package/dist/types/libraries/mongo/models/copy-product-job.model.js +0 -101
  254. package/dist/types/libraries/mongo/models/copy-product-job.model.js.map +0 -1
  255. package/dist/types/libraries/mongo/models/copy-product-map.model.d.ts +0 -8
  256. package/dist/types/libraries/mongo/models/copy-product-map.model.js +0 -38
  257. package/dist/types/libraries/mongo/models/copy-product-map.model.js.map +0 -1
  258. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.d.ts +0 -8
  259. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js +0 -38
  260. package/dist/types/libraries/mongo/models/copy-shop-category-map.model.js.map +0 -1
  261. package/dist/types/libraries/mongo/models/core-auth-identity.model.d.ts +0 -7
  262. package/dist/types/libraries/mongo/models/core-auth-identity.model.js +0 -32
  263. package/dist/types/libraries/mongo/models/core-auth-identity.model.js.map +0 -1
  264. package/dist/types/libraries/mongo/models/core-user.model.d.ts +0 -16
  265. package/dist/types/libraries/mongo/models/core-user.model.js +0 -85
  266. package/dist/types/libraries/mongo/models/core-user.model.js.map +0 -1
  267. package/dist/types/libraries/mongo/models/counter.model.d.ts +0 -8
  268. package/dist/types/libraries/mongo/models/counter.model.js +0 -42
  269. package/dist/types/libraries/mongo/models/counter.model.js.map +0 -1
  270. package/dist/types/libraries/mongo/models/coupon.model.d.ts +0 -13
  271. package/dist/types/libraries/mongo/models/coupon.model.js +0 -60
  272. package/dist/types/libraries/mongo/models/coupon.model.js.map +0 -1
  273. package/dist/types/libraries/mongo/models/deal-setting.model.d.ts +0 -10
  274. package/dist/types/libraries/mongo/models/deal-setting.model.js +0 -52
  275. package/dist/types/libraries/mongo/models/deal-setting.model.js.map +0 -1
  276. package/dist/types/libraries/mongo/models/default-chat.model.d.ts +0 -4
  277. package/dist/types/libraries/mongo/models/default-chat.model.js +0 -26
  278. package/dist/types/libraries/mongo/models/default-chat.model.js.map +0 -1
  279. package/dist/types/libraries/mongo/models/delivery-charges.model.d.ts +0 -13
  280. package/dist/types/libraries/mongo/models/delivery-charges.model.js +0 -63
  281. package/dist/types/libraries/mongo/models/delivery-charges.model.js.map +0 -1
  282. package/dist/types/libraries/mongo/models/dish.model.d.ts +0 -18
  283. package/dist/types/libraries/mongo/models/dish.model.js +0 -92
  284. package/dist/types/libraries/mongo/models/dish.model.js.map +0 -1
  285. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.d.ts +0 -25
  286. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js +0 -112
  287. package/dist/types/libraries/mongo/models/embedded/address-change-history.model.js.map +0 -1
  288. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.d.ts +0 -33
  289. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js +0 -133
  290. package/dist/types/libraries/mongo/models/embedded/adjustment-information.model.js.map +0 -1
  291. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.d.ts +0 -4
  292. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js +0 -27
  293. package/dist/types/libraries/mongo/models/embedded/agent-notification-setting.model.js.map +0 -1
  294. package/dist/types/libraries/mongo/models/embedded/app-force-update.d.ts +0 -9
  295. package/dist/types/libraries/mongo/models/embedded/app-force-update.js +0 -52
  296. package/dist/types/libraries/mongo/models/embedded/app-force-update.js.map +0 -1
  297. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.d.ts +0 -5
  298. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js +0 -32
  299. package/dist/types/libraries/mongo/models/embedded/attribute-item.model.js.map +0 -1
  300. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.d.ts +0 -7
  301. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js +0 -29
  302. package/dist/types/libraries/mongo/models/embedded/attribute-map.model.js.map +0 -1
  303. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.d.ts +0 -4
  304. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js +0 -27
  305. package/dist/types/libraries/mongo/models/embedded/business-development-setting.model.js.map +0 -1
  306. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.d.ts +0 -9
  307. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js +0 -52
  308. package/dist/types/libraries/mongo/models/embedded/cash-settlement.model.js.map +0 -1
  309. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.d.ts +0 -5
  310. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js +0 -32
  311. package/dist/types/libraries/mongo/models/embedded/cashback-amounts.model.js.map +0 -1
  312. package/dist/types/libraries/mongo/models/embedded/charge.model.d.ts +0 -5
  313. package/dist/types/libraries/mongo/models/embedded/charge.model.js +0 -28
  314. package/dist/types/libraries/mongo/models/embedded/charge.model.js.map +0 -1
  315. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.d.ts +0 -18
  316. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js +0 -64
  317. package/dist/types/libraries/mongo/models/embedded/chat-participant.model.js.map +0 -1
  318. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.d.ts +0 -4
  319. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js +0 -27
  320. package/dist/types/libraries/mongo/models/embedded/cleaning-material.model.js.map +0 -1
  321. package/dist/types/libraries/mongo/models/embedded/company-info.model.d.ts +0 -6
  322. package/dist/types/libraries/mongo/models/embedded/company-info.model.js +0 -37
  323. package/dist/types/libraries/mongo/models/embedded/company-info.model.js.map +0 -1
  324. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +0 -9
  325. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js +0 -36
  326. package/dist/types/libraries/mongo/models/embedded/courier-order-finance.model.js.map +0 -1
  327. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.d.ts +0 -4
  328. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js +0 -27
  329. package/dist/types/libraries/mongo/models/embedded/courier-setting.model.js.map +0 -1
  330. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.d.ts +0 -7
  331. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js +0 -38
  332. package/dist/types/libraries/mongo/models/embedded/currency-setting.model.js.map +0 -1
  333. package/dist/types/libraries/mongo/models/embedded/currency.model.d.ts +0 -5
  334. package/dist/types/libraries/mongo/models/embedded/currency.model.js +0 -32
  335. package/dist/types/libraries/mongo/models/embedded/currency.model.js.map +0 -1
  336. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.d.ts +0 -4
  337. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js +0 -27
  338. package/dist/types/libraries/mongo/models/embedded/customer-support-batches.model.js.map +0 -1
  339. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.d.ts +0 -4
  340. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js +0 -27
  341. package/dist/types/libraries/mongo/models/embedded/customer-support-numbers.model.js.map +0 -1
  342. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.d.ts +0 -10
  343. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js +0 -51
  344. package/dist/types/libraries/mongo/models/embedded/delivery-charge-setting.model.js.map +0 -1
  345. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.d.ts +0 -4
  346. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js +0 -27
  347. package/dist/types/libraries/mongo/models/embedded/delivery-info.model.js.map +0 -1
  348. package/dist/types/libraries/mongo/models/embedded/external-ref.model.d.ts +0 -4
  349. package/dist/types/libraries/mongo/models/embedded/external-ref.model.js +0 -32
  350. package/dist/types/libraries/mongo/models/embedded/external-ref.model.js.map +0 -1
  351. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.d.ts +0 -6
  352. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js +0 -33
  353. package/dist/types/libraries/mongo/models/embedded/featured-item.mode.js.map +0 -1
  354. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.d.ts +0 -7
  355. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js +0 -38
  356. package/dist/types/libraries/mongo/models/embedded/frequency-configuration.model.js.map +0 -1
  357. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.d.ts +0 -17
  358. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js +0 -63
  359. package/dist/types/libraries/mongo/models/embedded/line-item-attribute.model.js.map +0 -1
  360. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.d.ts +0 -46
  361. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js +0 -178
  362. package/dist/types/libraries/mongo/models/embedded/marketing-cut.model.js.map +0 -1
  363. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.d.ts +0 -26
  364. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js +0 -110
  365. package/dist/types/libraries/mongo/models/embedded/order-cancel.model.js.map +0 -1
  366. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.d.ts +0 -12
  367. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js +0 -67
  368. package/dist/types/libraries/mongo/models/embedded/order-delivery-information.model.js.map +0 -1
  369. package/dist/types/libraries/mongo/models/embedded/order-finance.model.d.ts +0 -18
  370. package/dist/types/libraries/mongo/models/embedded/order-finance.model.js +0 -64
  371. package/dist/types/libraries/mongo/models/embedded/order-finance.model.js.map +0 -1
  372. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.d.ts +0 -34
  373. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js +0 -163
  374. package/dist/types/libraries/mongo/models/embedded/order-pricing.model.js.map +0 -1
  375. package/dist/types/libraries/mongo/models/embedded/order-refund.model.d.ts +0 -28
  376. package/dist/types/libraries/mongo/models/embedded/order-refund.model.js +0 -113
  377. package/dist/types/libraries/mongo/models/embedded/order-refund.model.js.map +0 -1
  378. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.d.ts +0 -7
  379. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js +0 -46
  380. package/dist/types/libraries/mongo/models/embedded/otp-fields.model.js.map +0 -1
  381. package/dist/types/libraries/mongo/models/embedded/package.model.d.ts +0 -25
  382. package/dist/types/libraries/mongo/models/embedded/package.model.js +0 -86
  383. package/dist/types/libraries/mongo/models/embedded/package.model.js.map +0 -1
  384. package/dist/types/libraries/mongo/models/embedded/parent-document.model.d.ts +0 -5
  385. package/dist/types/libraries/mongo/models/embedded/parent-document.model.js +0 -32
  386. package/dist/types/libraries/mongo/models/embedded/parent-document.model.js.map +0 -1
  387. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.d.ts +0 -7
  388. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js +0 -38
  389. package/dist/types/libraries/mongo/models/embedded/payment-infromation.model.js.map +0 -1
  390. package/dist/types/libraries/mongo/models/embedded/payment-record.model.d.ts +0 -10
  391. package/dist/types/libraries/mongo/models/embedded/payment-record.model.js +0 -53
  392. package/dist/types/libraries/mongo/models/embedded/payment-record.model.js.map +0 -1
  393. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.d.ts +0 -5
  394. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js +0 -28
  395. package/dist/types/libraries/mongo/models/embedded/payout-setting.model.js.map +0 -1
  396. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.d.ts +0 -6
  397. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js +0 -33
  398. package/dist/types/libraries/mongo/models/embedded/plus-settings.model.js.map +0 -1
  399. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.d.ts +0 -4
  400. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js +0 -27
  401. package/dist/types/libraries/mongo/models/embedded/preparing-time.model.js.map +0 -1
  402. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.d.ts +0 -16
  403. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js +0 -80
  404. package/dist/types/libraries/mongo/models/embedded/price-breakdown.model.js.map +0 -1
  405. package/dist/types/libraries/mongo/models/embedded/product-category.model.d.ts +0 -4
  406. package/dist/types/libraries/mongo/models/embedded/product-category.model.js +0 -32
  407. package/dist/types/libraries/mongo/models/embedded/product-category.model.js.map +0 -1
  408. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.d.ts +0 -17
  409. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js +0 -72
  410. package/dist/types/libraries/mongo/models/embedded/product-marketing-info.model.js.map +0 -1
  411. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.d.ts +0 -5
  412. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js +0 -32
  413. package/dist/types/libraries/mongo/models/embedded/product-nutrition.model.js.map +0 -1
  414. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.d.ts +0 -12
  415. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js +0 -60
  416. package/dist/types/libraries/mongo/models/embedded/product-search-fields.model.js.map +0 -1
  417. package/dist/types/libraries/mongo/models/embedded/product-snap.model.d.ts +0 -16
  418. package/dist/types/libraries/mongo/models/embedded/product-snap.model.js +0 -79
  419. package/dist/types/libraries/mongo/models/embedded/product-snap.model.js.map +0 -1
  420. package/dist/types/libraries/mongo/models/embedded/profit.model.d.ts +0 -22
  421. package/dist/types/libraries/mongo/models/embedded/profit.model.js +0 -96
  422. package/dist/types/libraries/mongo/models/embedded/profit.model.js.map +0 -1
  423. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.d.ts +0 -6
  424. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js +0 -38
  425. package/dist/types/libraries/mongo/models/embedded/referral-discount-config.model.js.map +0 -1
  426. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +0 -18
  427. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js +0 -73
  428. package/dist/types/libraries/mongo/models/embedded/regular-order-finance.model.js.map +0 -1
  429. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.d.ts +0 -28
  430. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js +0 -109
  431. package/dist/types/libraries/mongo/models/embedded/replacement-order.model.js.map +0 -1
  432. package/dist/types/libraries/mongo/models/embedded/rest-password.model.d.ts +0 -4
  433. package/dist/types/libraries/mongo/models/embedded/rest-password.model.js +0 -27
  434. package/dist/types/libraries/mongo/models/embedded/rest-password.model.js.map +0 -1
  435. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.d.ts +0 -9
  436. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js +0 -44
  437. package/dist/types/libraries/mongo/models/embedded/rider-assignment-model.js.map +0 -1
  438. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.d.ts +0 -4
  439. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js +0 -27
  440. package/dist/types/libraries/mongo/models/embedded/rider-batches.model.js.map +0 -1
  441. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.d.ts +0 -4
  442. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js +0 -27
  443. package/dist/types/libraries/mongo/models/embedded/rider-equipment.model.js.map +0 -1
  444. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.d.ts +0 -8
  445. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js +0 -47
  446. package/dist/types/libraries/mongo/models/embedded/rider-setting.model.js.map +0 -1
  447. package/dist/types/libraries/mongo/models/embedded/rider-statistics.d.ts +0 -11
  448. package/dist/types/libraries/mongo/models/embedded/rider-statistics.js +0 -62
  449. package/dist/types/libraries/mongo/models/embedded/rider-statistics.js.map +0 -1
  450. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.d.ts +0 -18
  451. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js +0 -77
  452. package/dist/types/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js.map +0 -1
  453. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.d.ts +0 -23
  454. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js +0 -85
  455. package/dist/types/libraries/mongo/models/embedded/service-booking-finance.model.js.map +0 -1
  456. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.d.ts +0 -24
  457. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js +0 -127
  458. package/dist/types/libraries/mongo/models/embedded/service-booking-pricing.model.js.map +0 -1
  459. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.d.ts +0 -16
  460. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js +0 -70
  461. package/dist/types/libraries/mongo/models/embedded/service-booking-refund-information.model.js.map +0 -1
  462. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts +0 -19
  463. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js +0 -76
  464. package/dist/types/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map +0 -1
  465. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.d.ts +0 -9
  466. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js +0 -57
  467. package/dist/types/libraries/mongo/models/embedded/service-booking-settings.model.js.map +0 -1
  468. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.d.ts +0 -5
  469. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js +0 -28
  470. package/dist/types/libraries/mongo/models/embedded/service-fee-setting.model.js.map +0 -1
  471. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.d.ts +0 -38
  472. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js +0 -154
  473. package/dist/types/libraries/mongo/models/embedded/service-line-item.model.js.map +0 -1
  474. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.d.ts +0 -5
  475. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js +0 -32
  476. package/dist/types/libraries/mongo/models/embedded/shop-company-details.model.js.map +0 -1
  477. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.d.ts +0 -12
  478. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js +0 -47
  479. package/dist/types/libraries/mongo/models/embedded/shop-default-category.model.js.map +0 -1
  480. package/dist/types/libraries/mongo/models/embedded/shop-document.model.d.ts +0 -6
  481. package/dist/types/libraries/mongo/models/embedded/shop-document.model.js +0 -37
  482. package/dist/types/libraries/mongo/models/embedded/shop-document.model.js.map +0 -1
  483. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.d.ts +0 -15
  484. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js +0 -75
  485. package/dist/types/libraries/mongo/models/embedded/shop-search-fields.model.js.map +0 -1
  486. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.d.ts +0 -8
  487. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js +0 -43
  488. package/dist/types/libraries/mongo/models/embedded/spend-to-get-tier.model.js.map +0 -1
  489. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.d.ts +0 -25
  490. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js +0 -97
  491. package/dist/types/libraries/mongo/models/embedded/status-timeline.model.js.map +0 -1
  492. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.d.ts +0 -8
  493. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js +0 -47
  494. package/dist/types/libraries/mongo/models/embedded/subscription-summary.model.js.map +0 -1
  495. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.d.ts +0 -4
  496. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js +0 -27
  497. package/dist/types/libraries/mongo/models/embedded/support-reason-info.model.js.map +0 -1
  498. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.d.ts +0 -28
  499. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js +0 -134
  500. package/dist/types/libraries/mongo/models/embedded/trip-leg.mode.js.map +0 -1
  501. package/dist/types/libraries/mongo/models/embedded/vat.model.d.ts +0 -5
  502. package/dist/types/libraries/mongo/models/embedded/vat.model.js +0 -32
  503. package/dist/types/libraries/mongo/models/embedded/vat.model.js.map +0 -1
  504. package/dist/types/libraries/mongo/models/embedded/wallet.model.d.ts +0 -5
  505. package/dist/types/libraries/mongo/models/embedded/wallet.model.js +0 -32
  506. package/dist/types/libraries/mongo/models/embedded/wallet.model.js.map +0 -1
  507. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.d.ts +0 -5
  508. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js +0 -28
  509. package/dist/types/libraries/mongo/models/embedded/zone-geometry.mode.js.map +0 -1
  510. package/dist/types/libraries/mongo/models/favourite.model.d.ts +0 -14
  511. package/dist/types/libraries/mongo/models/favourite.model.js +0 -52
  512. package/dist/types/libraries/mongo/models/favourite.model.js.map +0 -1
  513. package/dist/types/libraries/mongo/models/featured-setting.model.d.ts +0 -7
  514. package/dist/types/libraries/mongo/models/featured-setting.model.js +0 -33
  515. package/dist/types/libraries/mongo/models/featured-setting.model.js.map +0 -1
  516. package/dist/types/libraries/mongo/models/filter-container.model.d.ts +0 -10
  517. package/dist/types/libraries/mongo/models/filter-container.model.js +0 -63
  518. package/dist/types/libraries/mongo/models/filter-container.model.js.map +0 -1
  519. package/dist/types/libraries/mongo/models/finance-settlement.model.d.ts +0 -41
  520. package/dist/types/libraries/mongo/models/finance-settlement.model.js +0 -175
  521. package/dist/types/libraries/mongo/models/finance-settlement.model.js.map +0 -1
  522. package/dist/types/libraries/mongo/models/flag.model.d.ts +0 -22
  523. package/dist/types/libraries/mongo/models/flag.model.js +0 -83
  524. package/dist/types/libraries/mongo/models/flag.model.js.map +0 -1
  525. package/dist/types/libraries/mongo/models/gallery-upload.model.d.ts +0 -17
  526. package/dist/types/libraries/mongo/models/gallery-upload.model.js +0 -77
  527. package/dist/types/libraries/mongo/models/gallery-upload.model.js.map +0 -1
  528. package/dist/types/libraries/mongo/models/gallery.model.d.ts +0 -13
  529. package/dist/types/libraries/mongo/models/gallery.model.js +0 -59
  530. package/dist/types/libraries/mongo/models/gallery.model.js.map +0 -1
  531. package/dist/types/libraries/mongo/models/google-maps-usage.model.d.ts +0 -21
  532. package/dist/types/libraries/mongo/models/google-maps-usage.model.js +0 -255
  533. package/dist/types/libraries/mongo/models/google-maps-usage.model.js.map +0 -1
  534. package/dist/types/libraries/mongo/models/index.d.ts +0 -395
  535. package/dist/types/libraries/mongo/models/index.js +0 -485
  536. package/dist/types/libraries/mongo/models/index.js.map +0 -1
  537. package/dist/types/libraries/mongo/models/integration-configuration.model.d.ts +0 -5
  538. package/dist/types/libraries/mongo/models/integration-configuration.model.js +0 -33
  539. package/dist/types/libraries/mongo/models/integration-configuration.model.js.map +0 -1
  540. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.d.ts +0 -9
  541. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js +0 -45
  542. package/dist/types/libraries/mongo/models/limited-time-offer-campaign-session.model.js.map +0 -1
  543. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.d.ts +0 -14
  544. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js +0 -76
  545. package/dist/types/libraries/mongo/models/limited-time-offer-campaign.model.js.map +0 -1
  546. package/dist/types/libraries/mongo/models/limited-time-offer-config.d.ts +0 -6
  547. package/dist/types/libraries/mongo/models/limited-time-offer-config.js +0 -36
  548. package/dist/types/libraries/mongo/models/limited-time-offer-config.js.map +0 -1
  549. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.d.ts +0 -22
  550. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js +0 -96
  551. package/dist/types/libraries/mongo/models/limited-time-offer-participant.model.js.map +0 -1
  552. package/dist/types/libraries/mongo/models/line-item.model.d.ts +0 -47
  553. package/dist/types/libraries/mongo/models/line-item.model.js +0 -205
  554. package/dist/types/libraries/mongo/models/line-item.model.js.map +0 -1
  555. package/dist/types/libraries/mongo/models/list-container.model.d.ts +0 -19
  556. package/dist/types/libraries/mongo/models/list-container.model.js +0 -92
  557. package/dist/types/libraries/mongo/models/list-container.model.js.map +0 -1
  558. package/dist/types/libraries/mongo/models/log.model.d.ts +0 -35
  559. package/dist/types/libraries/mongo/models/log.model.js +0 -163
  560. package/dist/types/libraries/mongo/models/log.model.js.map +0 -1
  561. package/dist/types/libraries/mongo/models/marketing.model.d.ts +0 -18
  562. package/dist/types/libraries/mongo/models/marketing.model.js +0 -88
  563. package/dist/types/libraries/mongo/models/marketing.model.js.map +0 -1
  564. package/dist/types/libraries/mongo/models/meal-plan.model.d.ts +0 -9
  565. package/dist/types/libraries/mongo/models/meal-plan.model.js +0 -51
  566. package/dist/types/libraries/mongo/models/meal-plan.model.js.map +0 -1
  567. package/dist/types/libraries/mongo/models/message.model.d.ts +0 -25
  568. package/dist/types/libraries/mongo/models/message.model.js +0 -105
  569. package/dist/types/libraries/mongo/models/message.model.js.map +0 -1
  570. package/dist/types/libraries/mongo/models/notification.model.d.ts +0 -53
  571. package/dist/types/libraries/mongo/models/notification.model.js +0 -201
  572. package/dist/types/libraries/mongo/models/notification.model.js.map +0 -1
  573. package/dist/types/libraries/mongo/models/nutrition.model.d.ts +0 -6
  574. package/dist/types/libraries/mongo/models/nutrition.model.js +0 -33
  575. package/dist/types/libraries/mongo/models/nutrition.model.js.map +0 -1
  576. package/dist/types/libraries/mongo/models/order.model.d.ts +0 -66
  577. package/dist/types/libraries/mongo/models/order.model.js +0 -350
  578. package/dist/types/libraries/mongo/models/order.model.js.map +0 -1
  579. package/dist/types/libraries/mongo/models/parent.model.d.ts +0 -29
  580. package/dist/types/libraries/mongo/models/parent.model.js +0 -144
  581. package/dist/types/libraries/mongo/models/parent.model.js.map +0 -1
  582. package/dist/types/libraries/mongo/models/payment-configuration.model.d.ts +0 -6
  583. package/dist/types/libraries/mongo/models/payment-configuration.model.js +0 -33
  584. package/dist/types/libraries/mongo/models/payment-configuration.model.js.map +0 -1
  585. package/dist/types/libraries/mongo/models/payment-intent.model.d.ts +0 -17
  586. package/dist/types/libraries/mongo/models/payment-intent.model.js +0 -79
  587. package/dist/types/libraries/mongo/models/payment-intent.model.js.map +0 -1
  588. package/dist/types/libraries/mongo/models/payout.model.d.ts +0 -15
  589. package/dist/types/libraries/mongo/models/payout.model.js +0 -86
  590. package/dist/types/libraries/mongo/models/payout.model.js.map +0 -1
  591. package/dist/types/libraries/mongo/models/product-brand.model.d.ts +0 -7
  592. package/dist/types/libraries/mongo/models/product-brand.model.js +0 -38
  593. package/dist/types/libraries/mongo/models/product-brand.model.js.map +0 -1
  594. package/dist/types/libraries/mongo/models/product-marketing.model.d.ts +0 -13
  595. package/dist/types/libraries/mongo/models/product-marketing.model.js +0 -57
  596. package/dist/types/libraries/mongo/models/product-marketing.model.js.map +0 -1
  597. package/dist/types/libraries/mongo/models/product-stock-tracker.model.d.ts +0 -15
  598. package/dist/types/libraries/mongo/models/product-stock-tracker.model.js +0 -57
  599. package/dist/types/libraries/mongo/models/product-stock-tracker.model.js.map +0 -1
  600. package/dist/types/libraries/mongo/models/product-upload.model.d.ts +0 -25
  601. package/dist/types/libraries/mongo/models/product-upload.model.js +0 -105
  602. package/dist/types/libraries/mongo/models/product-upload.model.js.map +0 -1
  603. package/dist/types/libraries/mongo/models/product.model.d.ts +0 -63
  604. package/dist/types/libraries/mongo/models/product.model.js +0 -339
  605. package/dist/types/libraries/mongo/models/product.model.js.map +0 -1
  606. package/dist/types/libraries/mongo/models/professional-blocked-time.model.d.ts +0 -10
  607. package/dist/types/libraries/mongo/models/professional-blocked-time.model.js +0 -49
  608. package/dist/types/libraries/mongo/models/professional-blocked-time.model.js.map +0 -1
  609. package/dist/types/libraries/mongo/models/professional.model.d.ts +0 -17
  610. package/dist/types/libraries/mongo/models/professional.model.js +0 -91
  611. package/dist/types/libraries/mongo/models/professional.model.js.map +0 -1
  612. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.d.ts +0 -16
  613. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js +0 -62
  614. package/dist/types/libraries/mongo/models/providers/buy1-get1-marketing.model.js.map +0 -1
  615. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.d.ts +0 -5
  616. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js +0 -28
  617. package/dist/types/libraries/mongo/models/providers/core-apple-auth-identity.model.js.map +0 -1
  618. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.d.ts +0 -9
  619. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js +0 -69
  620. package/dist/types/libraries/mongo/models/providers/core-email-auth-identity.model.js.map +0 -1
  621. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.d.ts +0 -5
  622. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js +0 -28
  623. package/dist/types/libraries/mongo/models/providers/core-google-auth-identity.model.js.map +0 -1
  624. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.d.ts +0 -6
  625. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js +0 -29
  626. package/dist/types/libraries/mongo/models/providers/core-phone-auth-identity.model.js.map +0 -1
  627. package/dist/types/libraries/mongo/models/providers/courier-order.model.d.ts +0 -41
  628. package/dist/types/libraries/mongo/models/providers/courier-order.model.js +0 -151
  629. package/dist/types/libraries/mongo/models/providers/courier-order.model.js.map +0 -1
  630. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.d.ts +0 -13
  631. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js +0 -43
  632. package/dist/types/libraries/mongo/models/providers/custom-coupon.model.js.map +0 -1
  633. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.d.ts +0 -22
  634. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js +0 -92
  635. package/dist/types/libraries/mongo/models/providers/discount-marketing.model.js.map +0 -1
  636. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.d.ts +0 -6
  637. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js +0 -25
  638. package/dist/types/libraries/mongo/models/providers/featured-marketing.model.js.map +0 -1
  639. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.d.ts +0 -7
  640. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js +0 -30
  641. package/dist/types/libraries/mongo/models/providers/free-delivery-marketing.model.js.map +0 -1
  642. package/dist/types/libraries/mongo/models/providers/global-coupon.model.d.ts +0 -5
  643. package/dist/types/libraries/mongo/models/providers/global-coupon.model.js +0 -10
  644. package/dist/types/libraries/mongo/models/providers/global-coupon.model.js.map +0 -1
  645. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.d.ts +0 -12
  646. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js +0 -42
  647. package/dist/types/libraries/mongo/models/providers/individual-store-coupon.model.js.map +0 -1
  648. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.d.ts +0 -13
  649. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js +0 -43
  650. package/dist/types/libraries/mongo/models/providers/individual-user-coupon.model.js.map +0 -1
  651. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.d.ts +0 -11
  652. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js +0 -50
  653. package/dist/types/libraries/mongo/models/providers/punch-marketing.model.js.map +0 -1
  654. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.d.ts +0 -9
  655. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js +0 -27
  656. package/dist/types/libraries/mongo/models/providers/referral-code-coupon.model.js.map +0 -1
  657. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.d.ts +0 -11
  658. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js +0 -37
  659. package/dist/types/libraries/mongo/models/providers/referral-reward-coupon.model.js.map +0 -1
  660. package/dist/types/libraries/mongo/models/providers/regular-order.model.d.ts +0 -54
  661. package/dist/types/libraries/mongo/models/providers/regular-order.model.js +0 -204
  662. package/dist/types/libraries/mongo/models/providers/regular-order.model.js.map +0 -1
  663. package/dist/types/libraries/mongo/models/providers/rider-payout.model.d.ts +0 -23
  664. package/dist/types/libraries/mongo/models/providers/rider-payout.model.js +0 -94
  665. package/dist/types/libraries/mongo/models/providers/rider-payout.model.js.map +0 -1
  666. package/dist/types/libraries/mongo/models/providers/rider-review.model.d.ts +0 -10
  667. package/dist/types/libraries/mongo/models/providers/rider-review.model.js +0 -32
  668. package/dist/types/libraries/mongo/models/providers/rider-review.model.js.map +0 -1
  669. package/dist/types/libraries/mongo/models/providers/service-package-review.model.d.ts +0 -14
  670. package/dist/types/libraries/mongo/models/providers/service-package-review.model.js +0 -44
  671. package/dist/types/libraries/mongo/models/providers/service-package-review.model.js.map +0 -1
  672. package/dist/types/libraries/mongo/models/providers/shop-courier.model.d.ts +0 -26
  673. package/dist/types/libraries/mongo/models/providers/shop-courier.model.js +0 -93
  674. package/dist/types/libraries/mongo/models/providers/shop-courier.model.js.map +0 -1
  675. package/dist/types/libraries/mongo/models/providers/shop-payout.model.d.ts +0 -62
  676. package/dist/types/libraries/mongo/models/providers/shop-payout.model.js +0 -244
  677. package/dist/types/libraries/mongo/models/providers/shop-payout.model.js.map +0 -1
  678. package/dist/types/libraries/mongo/models/providers/shop-review.model.d.ts +0 -12
  679. package/dist/types/libraries/mongo/models/providers/shop-review.model.js +0 -38
  680. package/dist/types/libraries/mongo/models/providers/shop-review.model.js.map +0 -1
  681. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.d.ts +0 -13
  682. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js +0 -47
  683. package/dist/types/libraries/mongo/models/providers/shops-categories-coupon.model.js.map +0 -1
  684. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.d.ts +0 -11
  685. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js +0 -46
  686. package/dist/types/libraries/mongo/models/providers/spend-to-get-marketing.model.js.map +0 -1
  687. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.d.ts +0 -50
  688. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js +0 -192
  689. package/dist/types/libraries/mongo/models/providers/vendor-payout.model.js.map +0 -1
  690. package/dist/types/libraries/mongo/models/providers/vendor-review.model.d.ts +0 -12
  691. package/dist/types/libraries/mongo/models/providers/vendor-review.model.js +0 -38
  692. package/dist/types/libraries/mongo/models/providers/vendor-review.model.js.map +0 -1
  693. package/dist/types/libraries/mongo/models/punch-marketing-history.model.d.ts +0 -24
  694. package/dist/types/libraries/mongo/models/punch-marketing-history.model.js +0 -101
  695. package/dist/types/libraries/mongo/models/punch-marketing-history.model.js.map +0 -1
  696. package/dist/types/libraries/mongo/models/rating-setting.model.d.ts +0 -8
  697. package/dist/types/libraries/mongo/models/rating-setting.model.js +0 -46
  698. package/dist/types/libraries/mongo/models/rating-setting.model.js.map +0 -1
  699. package/dist/types/libraries/mongo/models/referral-setting.model.d.ts +0 -6
  700. package/dist/types/libraries/mongo/models/referral-setting.model.js +0 -32
  701. package/dist/types/libraries/mongo/models/referral-setting.model.js.map +0 -1
  702. package/dist/types/libraries/mongo/models/request-area.model.d.ts +0 -8
  703. package/dist/types/libraries/mongo/models/request-area.model.js +0 -33
  704. package/dist/types/libraries/mongo/models/request-area.model.js.map +0 -1
  705. package/dist/types/libraries/mongo/models/review.model.d.ts +0 -15
  706. package/dist/types/libraries/mongo/models/review.model.js +0 -68
  707. package/dist/types/libraries/mongo/models/review.model.js.map +0 -1
  708. package/dist/types/libraries/mongo/models/reward.model.d.ts +0 -16
  709. package/dist/types/libraries/mongo/models/reward.model.js +0 -70
  710. package/dist/types/libraries/mongo/models/reward.model.js.map +0 -1
  711. package/dist/types/libraries/mongo/models/rider-timeout.model.d.ts +0 -10
  712. package/dist/types/libraries/mongo/models/rider-timeout.model.js +0 -47
  713. package/dist/types/libraries/mongo/models/rider-timeout.model.js.map +0 -1
  714. package/dist/types/libraries/mongo/models/rider-tracking.model.d.ts +0 -10
  715. package/dist/types/libraries/mongo/models/rider-tracking.model.js +0 -47
  716. package/dist/types/libraries/mongo/models/rider-tracking.model.js.map +0 -1
  717. package/dist/types/libraries/mongo/models/rider.model.d.ts +0 -70
  718. package/dist/types/libraries/mongo/models/rider.model.js +0 -358
  719. package/dist/types/libraries/mongo/models/rider.model.js.map +0 -1
  720. package/dist/types/libraries/mongo/models/service-addon.model.d.ts +0 -16
  721. package/dist/types/libraries/mongo/models/service-addon.model.js +0 -86
  722. package/dist/types/libraries/mongo/models/service-addon.model.js.map +0 -1
  723. package/dist/types/libraries/mongo/models/service-booking.model.d.ts +0 -68
  724. package/dist/types/libraries/mongo/models/service-booking.model.js +0 -310
  725. package/dist/types/libraries/mongo/models/service-booking.model.js.map +0 -1
  726. package/dist/types/libraries/mongo/models/service-cart.model.d.ts +0 -14
  727. package/dist/types/libraries/mongo/models/service-cart.model.js +0 -51
  728. package/dist/types/libraries/mongo/models/service-cart.model.js.map +0 -1
  729. package/dist/types/libraries/mongo/models/service-category.model.d.ts +0 -14
  730. package/dist/types/libraries/mongo/models/service-category.model.js +0 -87
  731. package/dist/types/libraries/mongo/models/service-category.model.js.map +0 -1
  732. package/dist/types/libraries/mongo/models/service-control.model.d.ts +0 -8
  733. package/dist/types/libraries/mongo/models/service-control.model.js +0 -50
  734. package/dist/types/libraries/mongo/models/service-control.model.js.map +0 -1
  735. package/dist/types/libraries/mongo/models/service-flag.model.d.ts +0 -19
  736. package/dist/types/libraries/mongo/models/service-flag.model.js +0 -72
  737. package/dist/types/libraries/mongo/models/service-flag.model.js.map +0 -1
  738. package/dist/types/libraries/mongo/models/service-package.model.d.ts +0 -27
  739. package/dist/types/libraries/mongo/models/service-package.model.js +0 -142
  740. package/dist/types/libraries/mongo/models/service-package.model.js.map +0 -1
  741. package/dist/types/libraries/mongo/models/service-promotion.model.d.ts +0 -27
  742. package/dist/types/libraries/mongo/models/service-promotion.model.js +0 -120
  743. package/dist/types/libraries/mongo/models/service-promotion.model.js.map +0 -1
  744. package/dist/types/libraries/mongo/models/service.model.d.ts +0 -8
  745. package/dist/types/libraries/mongo/models/service.model.js +0 -43
  746. package/dist/types/libraries/mongo/models/service.model.js.map +0 -1
  747. package/dist/types/libraries/mongo/models/setting.model.d.ts +0 -51
  748. package/dist/types/libraries/mongo/models/setting.model.js +0 -201
  749. package/dist/types/libraries/mongo/models/setting.model.js.map +0 -1
  750. package/dist/types/libraries/mongo/models/shared/address.model.d.ts +0 -38
  751. package/dist/types/libraries/mongo/models/shared/address.model.js +0 -158
  752. package/dist/types/libraries/mongo/models/shared/address.model.js.map +0 -1
  753. package/dist/types/libraries/mongo/models/shared/duration.model.d.ts +0 -14
  754. package/dist/types/libraries/mongo/models/shared/duration.model.js +0 -59
  755. package/dist/types/libraries/mongo/models/shared/duration.model.js.map +0 -1
  756. package/dist/types/libraries/mongo/models/shared/geo-location.model.d.ts +0 -5
  757. package/dist/types/libraries/mongo/models/shared/geo-location.model.js +0 -28
  758. package/dist/types/libraries/mongo/models/shared/geo-location.model.js.map +0 -1
  759. package/dist/types/libraries/mongo/models/shared/work-hour.model.d.ts +0 -19
  760. package/dist/types/libraries/mongo/models/shared/work-hour.model.js +0 -81
  761. package/dist/types/libraries/mongo/models/shared/work-hour.model.js.map +0 -1
  762. package/dist/types/libraries/mongo/models/shop-access-control.model.d.ts +0 -16
  763. package/dist/types/libraries/mongo/models/shop-access-control.model.js +0 -81
  764. package/dist/types/libraries/mongo/models/shop-access-control.model.js.map +0 -1
  765. package/dist/types/libraries/mongo/models/shop-category.model.d.ts +0 -13
  766. package/dist/types/libraries/mongo/models/shop-category.model.js +0 -64
  767. package/dist/types/libraries/mongo/models/shop-category.model.js.map +0 -1
  768. package/dist/types/libraries/mongo/models/shop-meal-plan.model.d.ts +0 -12
  769. package/dist/types/libraries/mongo/models/shop-meal-plan.model.js +0 -45
  770. package/dist/types/libraries/mongo/models/shop-meal-plan.model.js.map +0 -1
  771. package/dist/types/libraries/mongo/models/shop-section.model.d.ts +0 -18
  772. package/dist/types/libraries/mongo/models/shop-section.model.js +0 -89
  773. package/dist/types/libraries/mongo/models/shop-section.model.js.map +0 -1
  774. package/dist/types/libraries/mongo/models/shop.model.d.ts +0 -65
  775. package/dist/types/libraries/mongo/models/shop.model.js +0 -304
  776. package/dist/types/libraries/mongo/models/shop.model.js.map +0 -1
  777. package/dist/types/libraries/mongo/models/spend-to-get-history.model.d.ts +0 -13
  778. package/dist/types/libraries/mongo/models/spend-to-get-history.model.js +0 -51
  779. package/dist/types/libraries/mongo/models/spend-to-get-history.model.js.map +0 -1
  780. package/dist/types/libraries/mongo/models/subscription.model.d.ts +0 -20
  781. package/dist/types/libraries/mongo/models/subscription.model.js +0 -93
  782. package/dist/types/libraries/mongo/models/subscription.model.js.map +0 -1
  783. package/dist/types/libraries/mongo/models/support-reason.model.d.ts +0 -10
  784. package/dist/types/libraries/mongo/models/support-reason.model.js +0 -61
  785. package/dist/types/libraries/mongo/models/support-reason.model.js.map +0 -1
  786. package/dist/types/libraries/mongo/models/tag.model.d.ts +0 -10
  787. package/dist/types/libraries/mongo/models/tag.model.js +0 -64
  788. package/dist/types/libraries/mongo/models/tag.model.js.map +0 -1
  789. package/dist/types/libraries/mongo/models/terms-and-conditions.model.d.ts +0 -8
  790. package/dist/types/libraries/mongo/models/terms-and-conditions.model.js +0 -51
  791. package/dist/types/libraries/mongo/models/terms-and-conditions.model.js.map +0 -1
  792. package/dist/types/libraries/mongo/models/ticket-action.model.d.ts +0 -4
  793. package/dist/types/libraries/mongo/models/ticket-action.model.js +0 -31
  794. package/dist/types/libraries/mongo/models/ticket-action.model.js.map +0 -1
  795. package/dist/types/libraries/mongo/models/ticket.model.d.ts +0 -35
  796. package/dist/types/libraries/mongo/models/ticket.model.js +0 -144
  797. package/dist/types/libraries/mongo/models/ticket.model.js.map +0 -1
  798. package/dist/types/libraries/mongo/models/tournament-participant.model.d.ts +0 -22
  799. package/dist/types/libraries/mongo/models/tournament-participant.model.js +0 -84
  800. package/dist/types/libraries/mongo/models/tournament-participant.model.js.map +0 -1
  801. package/dist/types/libraries/mongo/models/tournament.model.d.ts +0 -65
  802. package/dist/types/libraries/mongo/models/tournament.model.js +0 -273
  803. package/dist/types/libraries/mongo/models/tournament.model.js.map +0 -1
  804. package/dist/types/libraries/mongo/models/user-action.model.d.ts +0 -29
  805. package/dist/types/libraries/mongo/models/user-action.model.js +0 -113
  806. package/dist/types/libraries/mongo/models/user-action.model.js.map +0 -1
  807. package/dist/types/libraries/mongo/models/user-app-section-setting.model.d.ts +0 -24
  808. package/dist/types/libraries/mongo/models/user-app-section-setting.model.js +0 -103
  809. package/dist/types/libraries/mongo/models/user-app-section-setting.model.js.map +0 -1
  810. package/dist/types/libraries/mongo/models/user.model.d.ts +0 -39
  811. package/dist/types/libraries/mongo/models/user.model.js +0 -150
  812. package/dist/types/libraries/mongo/models/user.model.js.map +0 -1
  813. package/dist/types/libraries/mongo/models/vendor-access-control.model.d.ts +0 -14
  814. package/dist/types/libraries/mongo/models/vendor-access-control.model.js +0 -75
  815. package/dist/types/libraries/mongo/models/vendor-access-control.model.js.map +0 -1
  816. package/dist/types/libraries/mongo/models/vendor-parent.model.d.ts +0 -25
  817. package/dist/types/libraries/mongo/models/vendor-parent.model.js +0 -121
  818. package/dist/types/libraries/mongo/models/vendor-parent.model.js.map +0 -1
  819. package/dist/types/libraries/mongo/models/vendor.model.d.ts +0 -33
  820. package/dist/types/libraries/mongo/models/vendor.model.js +0 -150
  821. package/dist/types/libraries/mongo/models/vendor.model.js.map +0 -1
  822. package/dist/types/libraries/mongo/models/zone-extra-time.d.ts +0 -12
  823. package/dist/types/libraries/mongo/models/zone-extra-time.js +0 -54
  824. package/dist/types/libraries/mongo/models/zone-extra-time.js.map +0 -1
  825. package/dist/types/libraries/mongo/models/zone.model.d.ts +0 -17
  826. package/dist/types/libraries/mongo/models/zone.model.js +0 -80
  827. package/dist/types/libraries/mongo/models/zone.model.js.map +0 -1
  828. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.d.ts +0 -4
  829. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js +0 -42
  830. package/dist/types/libraries/mongo/plugins/normalize-field.plugin.js.map +0 -1
  831. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.d.ts +0 -32
  832. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js +0 -145
  833. package/dist/types/libraries/mongo/plugins/soft-delete-plugin.js.map +0 -1
  834. package/dist/types/libraries/mongo/utilities/shop.hooks.d.ts +0 -9
  835. package/dist/types/libraries/mongo/utilities/shop.hooks.js +0 -11
  836. package/dist/types/libraries/mongo/utilities/shop.hooks.js.map +0 -1
  837. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.d.ts +0 -14
  838. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js +0 -58
  839. package/dist/types/libraries/mongo/utilities/sorting-order.hooks.js.map +0 -1
  840. package/dist/types/libraries/mongo/utilities/unique-id.hooks.d.ts +0 -6
  841. package/dist/types/libraries/mongo/utilities/unique-id.hooks.js +0 -17
  842. package/dist/types/libraries/mongo/utilities/unique-id.hooks.js.map +0 -1
  843. package/dist/types/libraries/notification/firebase-fcm.service.d.ts +0 -7
  844. package/dist/types/libraries/notification/firebase-fcm.service.js +0 -40
  845. package/dist/types/libraries/notification/firebase-fcm.service.js.map +0 -1
  846. package/dist/types/libraries/notification/firebase-message.builder.d.ts +0 -22
  847. package/dist/types/libraries/notification/firebase-message.builder.js +0 -107
  848. package/dist/types/libraries/notification/firebase-message.builder.js.map +0 -1
  849. package/dist/types/libraries/notification/lyxa-fcm-sender.d.ts +0 -19
  850. package/dist/types/libraries/notification/lyxa-fcm-sender.js +0 -127
  851. package/dist/types/libraries/notification/lyxa-fcm-sender.js.map +0 -1
  852. package/dist/types/libraries/notification/lyxa-fcm.service.d.ts +0 -40
  853. package/dist/types/libraries/notification/lyxa-fcm.service.js +0 -177
  854. package/dist/types/libraries/notification/lyxa-fcm.service.js.map +0 -1
  855. package/dist/types/libraries/redis/index.d.ts +0 -25
  856. package/dist/types/libraries/redis/index.js +0 -137
  857. package/dist/types/libraries/redis/index.js.map +0 -1
  858. package/dist/types/libraries/secrets/index.d.ts +0 -10
  859. package/dist/types/libraries/secrets/index.js +0 -64
  860. package/dist/types/libraries/secrets/index.js.map +0 -1
  861. package/dist/types/libraries/socket/BaseSocketEvent.d.ts +0 -27
  862. package/dist/types/libraries/socket/BaseSocketEvent.js +0 -47
  863. package/dist/types/libraries/socket/BaseSocketEvent.js.map +0 -1
  864. package/dist/types/libraries/socket/PushNotificationEvent.d.ts +0 -36
  865. package/dist/types/libraries/socket/PushNotificationEvent.js +0 -45
  866. package/dist/types/libraries/socket/PushNotificationEvent.js.map +0 -1
  867. package/dist/types/libraries/socket/connections/batch.d.ts +0 -12
  868. package/dist/types/libraries/socket/connections/batch.js +0 -58
  869. package/dist/types/libraries/socket/connections/batch.js.map +0 -1
  870. package/dist/types/libraries/socket/connections/cache.d.ts +0 -9
  871. package/dist/types/libraries/socket/connections/cache.js +0 -36
  872. package/dist/types/libraries/socket/connections/cache.js.map +0 -1
  873. package/dist/types/libraries/socket/connections/constants.d.ts +0 -2
  874. package/dist/types/libraries/socket/connections/constants.js +0 -6
  875. package/dist/types/libraries/socket/connections/constants.js.map +0 -1
  876. package/dist/types/libraries/socket/connections/index.d.ts +0 -7
  877. package/dist/types/libraries/socket/connections/index.js +0 -24
  878. package/dist/types/libraries/socket/connections/index.js.map +0 -1
  879. package/dist/types/libraries/socket/connections/instance-disconnect.d.ts +0 -2
  880. package/dist/types/libraries/socket/connections/instance-disconnect.js +0 -43
  881. package/dist/types/libraries/socket/connections/instance-disconnect.js.map +0 -1
  882. package/dist/types/libraries/socket/connections/keys.d.ts +0 -10
  883. package/dist/types/libraries/socket/connections/keys.js +0 -23
  884. package/dist/types/libraries/socket/connections/keys.js.map +0 -1
  885. package/dist/types/libraries/socket/connections/presence.d.ts +0 -6
  886. package/dist/types/libraries/socket/connections/presence.js +0 -39
  887. package/dist/types/libraries/socket/connections/presence.js.map +0 -1
  888. package/dist/types/libraries/socket/connections/redis-helpers.d.ts +0 -2
  889. package/dist/types/libraries/socket/connections/redis-helpers.js +0 -14
  890. package/dist/types/libraries/socket/connections/redis-helpers.js.map +0 -1
  891. package/dist/types/libraries/socket/connections/subscription.d.ts +0 -13
  892. package/dist/types/libraries/socket/connections/subscription.js +0 -73
  893. package/dist/types/libraries/socket/connections/subscription.js.map +0 -1
  894. package/dist/types/libraries/socket/core/index.d.ts +0 -6
  895. package/dist/types/libraries/socket/core/index.js +0 -23
  896. package/dist/types/libraries/socket/core/index.js.map +0 -1
  897. package/dist/types/libraries/socket/core/local-subscription-registry.d.ts +0 -17
  898. package/dist/types/libraries/socket/core/local-subscription-registry.js +0 -60
  899. package/dist/types/libraries/socket/core/local-subscription-registry.js.map +0 -1
  900. package/dist/types/libraries/socket/core/socket-event-consumer.d.ts +0 -1
  901. package/dist/types/libraries/socket/core/socket-event-consumer.js +0 -14
  902. package/dist/types/libraries/socket/core/socket-event-consumer.js.map +0 -1
  903. package/dist/types/libraries/socket/core/socket-event-publisher.d.ts +0 -6
  904. package/dist/types/libraries/socket/core/socket-event-publisher.js +0 -82
  905. package/dist/types/libraries/socket/core/socket-event-publisher.js.map +0 -1
  906. package/dist/types/libraries/socket/core/socket-event-registry.d.ts +0 -12
  907. package/dist/types/libraries/socket/core/socket-event-registry.js +0 -23
  908. package/dist/types/libraries/socket/core/socket-event-registry.js.map +0 -1
  909. package/dist/types/libraries/socket/core/socket-event-registry.map.d.ts +0 -34
  910. package/dist/types/libraries/socket/core/socket-event-registry.map.js +0 -34
  911. package/dist/types/libraries/socket/core/socket-event-registry.map.js.map +0 -1
  912. package/dist/types/libraries/socket/core/zAsyncIterable.d.ts +0 -7
  913. package/dist/types/libraries/socket/core/zAsyncIterable.js +0 -35
  914. package/dist/types/libraries/socket/core/zAsyncIterable.js.map +0 -1
  915. package/dist/types/libraries/socket/events/chatlist-message-send.socket.event.d.ts +0 -153
  916. package/dist/types/libraries/socket/events/chatlist-message-send.socket.event.js +0 -44
  917. package/dist/types/libraries/socket/events/chatlist-message-send.socket.event.js.map +0 -1
  918. package/dist/types/libraries/socket/events/chatroom-message-send.socket.event.d.ts +0 -286
  919. package/dist/types/libraries/socket/events/chatroom-message-send.socket.event.js +0 -96
  920. package/dist/types/libraries/socket/events/chatroom-message-send.socket.event.js.map +0 -1
  921. package/dist/types/libraries/socket/events/index.d.ts +0 -7
  922. package/dist/types/libraries/socket/events/index.js +0 -24
  923. package/dist/types/libraries/socket/events/index.js.map +0 -1
  924. package/dist/types/libraries/socket/events/order-actions.socket.event.d.ts +0 -297
  925. package/dist/types/libraries/socket/events/order-actions.socket.event.js +0 -82
  926. package/dist/types/libraries/socket/events/order-actions.socket.event.js.map +0 -1
  927. package/dist/types/libraries/socket/events/rider-connect.socket.event.d.ts +0 -13
  928. package/dist/types/libraries/socket/events/rider-connect.socket.event.js +0 -22
  929. package/dist/types/libraries/socket/events/rider-connect.socket.event.js.map +0 -1
  930. package/dist/types/libraries/socket/events/rider-location-update.socket.event.d.ts +0 -76
  931. package/dist/types/libraries/socket/events/rider-location-update.socket.event.js +0 -39
  932. package/dist/types/libraries/socket/events/rider-location-update.socket.event.js.map +0 -1
  933. package/dist/types/libraries/socket/events/socketNotificationEvent.d.ts +0 -46
  934. package/dist/types/libraries/socket/events/socketNotificationEvent.js +0 -29
  935. package/dist/types/libraries/socket/events/socketNotificationEvent.js.map +0 -1
  936. package/dist/types/libraries/socket/events/ticket-actions.socket.event.d.ts +0 -106
  937. package/dist/types/libraries/socket/events/ticket-actions.socket.event.js +0 -62
  938. package/dist/types/libraries/socket/events/ticket-actions.socket.event.js.map +0 -1
  939. package/dist/types/libraries/socket/events/ticket-assign.socket.event.d.ts +0 -161
  940. package/dist/types/libraries/socket/events/ticket-assign.socket.event.js +0 -42
  941. package/dist/types/libraries/socket/events/ticket-assign.socket.event.js.map +0 -1
  942. package/dist/types/libraries/socket/events/ticket-unassign.socket.event.d.ts +0 -27
  943. package/dist/types/libraries/socket/events/ticket-unassign.socket.event.js +0 -31
  944. package/dist/types/libraries/socket/events/ticket-unassign.socket.event.js.map +0 -1
  945. package/dist/types/libraries/trpc/context.d.ts +0 -37
  946. package/dist/types/libraries/trpc/context.js +0 -43
  947. package/dist/types/libraries/trpc/context.js.map +0 -1
  948. package/dist/types/libraries/trpc/index.d.ts +0 -75
  949. package/dist/types/libraries/trpc/index.js +0 -80
  950. package/dist/types/libraries/trpc/index.js.map +0 -1
  951. package/dist/types/libraries/twilio/index.d.ts +0 -6
  952. package/dist/types/libraries/twilio/index.js +0 -42
  953. package/dist/types/libraries/twilio/index.js.map +0 -1
  954. package/dist/types/libraries/upload/index.d.ts +0 -50
  955. package/dist/types/libraries/upload/index.js +0 -312
  956. package/dist/types/libraries/upload/index.js.map +0 -1
  957. package/dist/types/utilities/auth-ref.mapper.d.ts +0 -4
  958. package/dist/types/utilities/auth-ref.mapper.js +0 -22
  959. package/dist/types/utilities/auth-ref.mapper.js.map +0 -1
  960. package/dist/types/utilities/dayjs/dayjs.d.ts +0 -14
  961. package/dist/types/utilities/dayjs/dayjs.js +0 -47
  962. package/dist/types/utilities/dayjs/dayjs.js.map +0 -1
  963. package/dist/types/utilities/dayjs/index.d.ts +0 -2
  964. package/dist/types/utilities/dayjs/index.js +0 -9
  965. package/dist/types/utilities/dayjs/index.js.map +0 -1
  966. package/dist/types/utilities/environment/rabbitmq-environments.d.ts +0 -2
  967. package/dist/types/utilities/environment/rabbitmq-environments.js +0 -14
  968. package/dist/types/utilities/environment/rabbitmq-environments.js.map +0 -1
  969. package/dist/types/utilities/environment/redis-environments.d.ts +0 -2
  970. package/dist/types/utilities/environment/redis-environments.js +0 -14
  971. package/dist/types/utilities/environment/redis-environments.js.map +0 -1
  972. package/dist/types/utilities/error-common.d.ts +0 -10
  973. package/dist/types/utilities/error-common.js +0 -76
  974. package/dist/types/utilities/error-common.js.map +0 -1
  975. package/dist/types/utilities/id-generator.d.ts +0 -6
  976. package/dist/types/utilities/id-generator.js +0 -161
  977. package/dist/types/utilities/id-generator.js.map +0 -1
  978. package/dist/types/utilities/instance.utils.d.ts +0 -1
  979. package/dist/types/utilities/instance.utils.js +0 -12
  980. package/dist/types/utilities/instance.utils.js.map +0 -1
  981. package/dist/types/utilities/normalize.d.ts +0 -6
  982. package/dist/types/utilities/normalize.js +0 -51
  983. package/dist/types/utilities/normalize.js.map +0 -1
  984. package/dist/types/utilities/password.d.ts +0 -2
  985. package/dist/types/utilities/password.js +0 -20
  986. package/dist/types/utilities/password.js.map +0 -1
  987. package/dist/types/utilities/projection.d.ts +0 -8
  988. package/dist/types/utilities/projection.js +0 -37
  989. package/dist/types/utilities/projection.js.map +0 -1
  990. package/dist/types/utilities/time.d.ts +0 -13
  991. package/dist/types/utilities/time.js +0 -128
  992. package/dist/types/utilities/time.js.map +0 -1
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.disconnectAllEntitiesFromInstance = disconnectAllEntitiesFromInstance;
4
- const instance_utils_1 = require("../../../utilities/instance.utils");
5
- const __1 = require("../../..");
6
- const keys_1 = require("./keys");
7
- const redis_helpers_1 = require("./redis-helpers");
8
- async function disconnectAllEntitiesFromInstance(entityType) {
9
- const instanceId = (0, instance_utils_1.getInstanceId)();
10
- const redis = (0, __1.getLibraries)().getRedisService();
11
- const pattern = entityType
12
- ? `socket:active_subscriptions:${entityType}:*`
13
- : 'socket:active_subscriptions:*';
14
- const ledgerKeys = await (0, redis_helpers_1.scanKeys)(redis.redisClient, pattern);
15
- const affectedEvents = new Set();
16
- await Promise.all(ledgerKeys.map(async (ledgerKey) => {
17
- const [, , type, id] = ledgerKey.split(':');
18
- const entity = {
19
- id,
20
- type: type === 'default' ? undefined : type,
21
- };
22
- const eventKeys = await redis.getSetMembers(ledgerKey);
23
- const pipeline = redis.redisClient.pipeline();
24
- for (const eventKey of eventKeys) {
25
- const entityEventKey = (0, keys_1.kEntityEventSockets)(entity, eventKey);
26
- const sockets = await redis.getSetMembers(entityEventKey);
27
- const toRemove = sockets.filter(s => {
28
- const [sInstanceId] = s.split('|');
29
- return sInstanceId === instanceId;
30
- });
31
- for (const s of toRemove) {
32
- pipeline.srem(entityEventKey, s);
33
- }
34
- if (sockets.length - toRemove.length === 0) {
35
- pipeline.del(entityEventKey);
36
- pipeline.srem(ledgerKey, eventKey);
37
- }
38
- affectedEvents.add(eventKey);
39
- }
40
- await pipeline.exec();
41
- }));
42
- }
43
- //# sourceMappingURL=instance-disconnect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instance-disconnect.js","sourceR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AAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;gBACnC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnC,OAAO,WAAW,KAAK,UAAU,CAAC;YACnC,CAAC,CAAC,CAAC;YACH,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;gBAC1B,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;YAClC,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5C,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBAC7B,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YACpC,CAAC;YACD,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC,CAAC,CACF,CAAC;AACH,CAAC","sourcesContent":["// Instance disconnect logic for socket Redis\nimport { getInstanceId } from '../../../utilities/instance.utils';\nimport { getLibraries } from '../../..';\nimport { kEntityEvent, kEntityEventSockets, entityKey, EntitySubscription } from './keys';\nimport { scanKeys } from './redis-helpers';\nimport { AuthEntityType } from '../../auth';\nimport { LRUCache } from './cache';\n\n/**\n * Removes all sockets belonging to the current instance.\n * Used on shutdown or crash recovery.\n * Cleans entity-event keys, event subscribers, and ledgers in bulk.\n *\n * NOTE: This currently scans all ledgers (SCAN), which is acceptable for small/medium scale and infrequent use.\n * For very large scale or frequent shutdowns, consider maintaining a reverse index (instance → ledgers) to avoid SCAN entirely.\n */\nexport async function disconnectAllEntitiesFromInstance(entityType?: AuthEntityType) {\n\tconst instanceId = getInstanceId();\n\tconst redis = getLibraries().getRedisService();\n\tconst pattern = entityType\n\t\t? `socket:active_subscriptions:${entityType}:*`\n\t\t: 'socket:active_subscriptions:*';\n\tconst ledgerKeys = await scanKeys(redis.redisClient, pattern);\n\tconst affectedEvents = new Set<string>();\n\tawait Promise.all(\n\t\tledgerKeys.map(async ledgerKey => {\n\t\t\tconst [, , type, id] = ledgerKey.split(':');\n\t\t\tconst entity: EntitySubscription = {\n\t\t\t\tid,\n\t\t\t\ttype: type === 'default' ? undefined : (type as AuthEntityType),\n\t\t\t};\n\t\t\tconst eventKeys = await redis.getSetMembers(ledgerKey);\n\t\t\tconst pipeline = redis.redisClient.pipeline();\n\t\t\tfor (const eventKey of eventKeys) {\n\t\t\t\tconst entityEventKey = kEntityEventSockets(entity, eventKey);\n\t\t\t\tconst sockets = await redis.getSetMembers(entityEventKey);\n\t\t\t\t// Remove all sockets for this instance\n\t\t\t\tconst toRemove = sockets.filter(s => {\n\t\t\t\t\tconst [sInstanceId] = s.split('|');\n\t\t\t\t\treturn sInstanceId === instanceId;\n\t\t\t\t});\n\t\t\t\tfor (const s of toRemove) {\n\t\t\t\t\tpipeline.srem(entityEventKey, s);\n\t\t\t\t}\n\t\t\t\tif (sockets.length - toRemove.length === 0) {\n\t\t\t\t\tpipeline.del(entityEventKey);\n\t\t\t\t\tpipeline.srem(ledgerKey, eventKey);\n\t\t\t\t}\n\t\t\t\taffectedEvents.add(eventKey);\n\t\t\t}\n\t\t\tawait pipeline.exec();\n\t\t})\n\t);\n}\n"]}
@@ -1,10 +0,0 @@
1
- import { AuthEntityType } from '../../auth';
2
- export type EntitySubscription = {
3
- id: string;
4
- type?: AuthEntityType;
5
- };
6
- export declare const entityKey: (entity: EntitySubscription) => string;
7
- export declare const kEventEntity: (eventKey: string) => string;
8
- export declare const kEntityEvent: (entity: EntitySubscription) => string;
9
- export declare const kOnlineEntities: (type: AuthEntityType) => string;
10
- export declare const kEntityEventSockets: (entity: EntitySubscription, eventKey: string) => string;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kEntityEventSockets = exports.kOnlineEntities = exports.kEntityEvent = exports.kEventEntity = exports.entityKey = void 0;
4
- const keyCache = new Map();
5
- const entityKey = (entity) => {
6
- const cacheKey = `${entity.type}:${entity.id}`;
7
- let key = keyCache.get(cacheKey);
8
- if (!key) {
9
- key = `${entity.type ?? 'default'}:${entity.id}`;
10
- keyCache.set(cacheKey, key);
11
- }
12
- return key;
13
- };
14
- exports.entityKey = entityKey;
15
- const kEventEntity = (eventKey) => `socket:event:${eventKey}`;
16
- exports.kEventEntity = kEventEntity;
17
- const kEntityEvent = (entity) => `socket:subscriptions:${(0, exports.entityKey)(entity)}`;
18
- exports.kEntityEvent = kEntityEvent;
19
- const kOnlineEntities = (type) => `socket:online:${type}`;
20
- exports.kOnlineEntities = kOnlineEntities;
21
- const kEntityEventSockets = (entity, eventKey) => `socket:entity:${(0, exports.entityKey)(entity)}:${eventKey}`;
22
- exports.kEntityEventSockets = kEntityEventSockets;
23
- //# sourceMappingURL=keys.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"/","sources":["libraries/socket/connections/keys.ts"],"names":[],"mappings":";;;AAOA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpC,MAAM,SAAS,GAAG,CAAC,MAA0B,EAAU,EAAE;IAC/D,MAAM,QAAQ,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;IAC/C,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;QACjD,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB;AAEK,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,gBAAgB,QAAQ,EAAE,CAAC;AAAhE,QAAA,YAAY,gBAAoD;AAEtE,MAAM,YAAY,GAAG,CAAC,MAA0B,EAAE,EAAE,CAAC,wBAAwB,IAAA,iBAAS,EAAC,MAAM,CAAC,EAAE,CAAC;AAA3F,QAAA,YAAY,gBAA+E;AAEjG,MAAM,eAAe,GAAG,CAAC,IAAoB,EAAE,EAAE,CAAC,iBAAiB,IAAI,EAAE,CAAC;AAApE,QAAA,eAAe,mBAAqD;AAE1E,MAAM,mBAAmB,GAAG,CAAC,MAA0B,EAAE,QAAgB,EAAE,EAAE,CACnF,iBAAiB,IAAA,iBAAS,EAAC,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;AADrC,QAAA,mBAAmB,uBACkB","sourcesContent":["import { AuthEntityType } from '../../auth';\n\nexport type EntitySubscription = {\n\tid: string;\n\ttype?: AuthEntityType;\n};\n\nconst keyCache = new Map<string, string>();\n\nexport const entityKey = (entity: EntitySubscription): string => {\n\tconst cacheKey = `${entity.type}:${entity.id}`;\n\tlet key = keyCache.get(cacheKey);\n\tif (!key) {\n\t\tkey = `${entity.type ?? 'default'}:${entity.id}`;\n\t\tkeyCache.set(cacheKey, key);\n\t}\n\treturn key;\n};\n\nexport const kEventEntity = (eventKey: string) => `socket:event:${eventKey}`;\n\nexport const kEntityEvent = (entity: EntitySubscription) => `socket:subscriptions:${entityKey(entity)}`;\n\nexport const kOnlineEntities = (type: AuthEntityType) => `socket:online:${type}`;\n\nexport const kEntityEventSockets = (entity: EntitySubscription, eventKey: string) =>\n\t`socket:entity:${entityKey(entity)}:${eventKey}`;\n"]}
@@ -1,6 +0,0 @@
1
- import { AuthEntityType } from '../../auth';
2
- export declare function setUserOnline(userId: string, type: AuthEntityType, timestamp?: number): Promise<void>;
3
- export declare function setUserOffline(userId: string, type: AuthEntityType): Promise<void>;
4
- export declare function getOnlineUsers(type: AuthEntityType, page?: number, pageSize?: number): Promise<string[]>;
5
- export declare function getOnlineUsersCount(type: AuthEntityType, activeWindowMs?: number): Promise<number>;
6
- export declare function isUserOnline(userId: string, type: AuthEntityType): Promise<boolean>;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setUserOnline = setUserOnline;
4
- exports.setUserOffline = setUserOffline;
5
- exports.getOnlineUsers = getOnlineUsers;
6
- exports.getOnlineUsersCount = getOnlineUsersCount;
7
- exports.isUserOnline = isUserOnline;
8
- const __1 = require("../../..");
9
- const dayjs_1 = require("../../../utilities/dayjs");
10
- const keys_1 = require("./keys");
11
- async function setUserOnline(userId, type, timestamp = Date.now()) {
12
- const redis = (0, __1.getLibraries)().getRedisService().redisClient;
13
- await redis.zadd((0, keys_1.kOnlineEntities)(type), timestamp, userId);
14
- }
15
- async function setUserOffline(userId, type) {
16
- const redis = (0, __1.getLibraries)().getRedisService().redisClient;
17
- await redis.zrem((0, keys_1.kOnlineEntities)(type), userId);
18
- }
19
- async function getOnlineUsers(type, page = 1, pageSize = 100) {
20
- const redis = (0, __1.getLibraries)().getRedisService().redisClient;
21
- const zsetKey = (0, keys_1.kOnlineEntities)(type);
22
- const start = (page - 1) * pageSize;
23
- const end = start + pageSize - 1;
24
- return await redis.zrange(zsetKey, start, end);
25
- }
26
- async function getOnlineUsersCount(type, activeWindowMs = 60000) {
27
- const redis = (0, __1.getLibraries)().getRedisService().redisClient;
28
- const zsetKey = (0, keys_1.kOnlineEntities)(type);
29
- const now = (0, dayjs_1.dayjs)().valueOf();
30
- const min = now - activeWindowMs;
31
- await redis.zremrangebyscore(zsetKey, 0, min);
32
- return await redis.zcount(zsetKey, min, now);
33
- }
34
- async function isUserOnline(userId, type) {
35
- const redis = (0, __1.getLibraries)().getRedisService().redisClient;
36
- const score = await redis.zscore((0, keys_1.kOnlineEntities)(type), userId);
37
- return score !== null;
38
- }
39
- //# sourceMappingURL=presence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"presence.js","sourceRoot":"/","sources":["libraries/socket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WAAoB,CAAC;IACpE,MAAM,OAAO,GAAG,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC;IAEtC,MAAM,GAAG,GAAG,IAAA,aAAK,GAAE,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,GAAG,GAAG,GAAG,GAAG,cAAc,CAAC;IAEjC,MAAM,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAE9C,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAEM,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,IAAoB;IACtE,MAAM,KAAK,GAAG,IAAA,gBAAY,GAAE,CAAC,eAAe,EAAE,CAAC,WAAoB,CAAC;IACpE,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IAChE,OAAO,KAAK,KAAK,IAAI,CAAC;AACvB,CAAC","sourcesContent":["import { getLibraries } from '../../..';\nimport { dayjs } from '../../../utilities/dayjs';\nimport { AuthEntityType } from '../../auth';\nimport { kOnlineEntities } from './keys';\nimport type { Redis } from 'ioredis';\n\n/**\n * Add or update a user as online in the type-based ZSET.\n */\nexport async function setUserOnline(userId: string, type: AuthEntityType, timestamp: number = Date.now()) {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tawait redis.zadd(kOnlineEntities(type), timestamp, userId);\n}\n\n/**\n * Remove a user from the type-based online ZSET (on disconnect).\n */\nexport async function setUserOffline(userId: string, type: AuthEntityType) {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tawait redis.zrem(kOnlineEntities(type), userId);\n}\n\n/**\n * Paginate online users for a given entity type (deep pagination, scalable).\n */\nexport async function getOnlineUsers(\n\ttype: AuthEntityType,\n\tpage: number = 1,\n\tpageSize: number = 100\n): Promise<string[]> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst zsetKey = kOnlineEntities(type);\n\tconst start = (page - 1) * pageSize;\n\tconst end = start + pageSize - 1;\n\treturn await redis.zrange(zsetKey, start, end);\n}\n\nexport async function getOnlineUsersCount(\n\ttype: AuthEntityType,\n\tactiveWindowMs: number = 60000\n): Promise<number> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst zsetKey = kOnlineEntities(type);\n\n\tconst now = dayjs().valueOf();\n\tconst min = now - activeWindowMs;\n\n\tawait redis.zremrangebyscore(zsetKey, 0, min);\n\n\treturn await redis.zcount(zsetKey, min, now);\n}\n\nexport async function isUserOnline(userId: string, type: AuthEntityType): Promise<boolean> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst score = await redis.zscore(kOnlineEntities(type), userId);\n\treturn score !== null;\n}\n\n/**\n * Example usage:\n *\n * import { getConnectedEntityByType } from './type-queries';\n *\n * // For entity type 'user', get page 2, 100 per page:\n * const users = await getConnectedEntityByType('user', 2, 100);\n */\n"]}
@@ -1,2 +0,0 @@
1
- import type { Redis } from 'ioredis';
2
- export declare function scanKeys(redis: Redis, pattern: string): Promise<string[]>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scanKeys = scanKeys;
4
- async function scanKeys(redis, pattern) {
5
- const keys = [];
6
- let cursor = '0';
7
- do {
8
- const [newCursor, foundKeys] = await redis.scan(cursor, 'MATCH', pattern, 'COUNT', 100);
9
- cursor = newCursor;
10
- keys.push(...foundKeys);
11
- } while (cursor !== '0');
12
- return keys;
13
- }
14
- //# sourceMappingURL=redis-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis-helpers.js","sourceRoot":"/","sources":["libraries/socket/connections/redis-helpers.ts"],"names":[],"mappings":";;AAGA,4BASC;AATM,KAAK,UAAU,QAAQ,CAAC,KAAY,EAAE,OAAe;IAC3D,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,MAAM,GAAG,GAAG,CAAC;IACjB,GAAG,CAAC;QACH,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACxF,MAAM,GAAG,SAAS,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IACzB,CAAC,QAAQ,MAAM,KAAK,GAAG,EAAE;IACzB,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["// Redis set helpers for socket logic\nimport type { Redis } from 'ioredis';\n\nexport async function scanKeys(redis: Redis, pattern: string): Promise<string[]> {\n\tconst keys: string[] = [];\n\tlet cursor = '0';\n\tdo {\n\t\tconst [newCursor, foundKeys] = await redis.scan(cursor, 'MATCH', pattern, 'COUNT', 100);\n\t\tcursor = newCursor;\n\t\tkeys.push(...foundKeys);\n\t} while (cursor !== '0');\n\treturn keys;\n}\n"]}
@@ -1,13 +0,0 @@
1
- import { EntitySubscription } from './keys';
2
- export interface SocketRedisEventInformation {
3
- eventKey: string;
4
- instanceId: string;
5
- socketId: string;
6
- }
7
- export declare function connectEntityToSocketEvent(entity: EntitySubscription, socketRedisEventInformation: SocketRedisEventInformation): Promise<void>;
8
- export declare function disconnectEntityFromSocketEvent(entity: EntitySubscription, socketRedisEventInformation: SocketRedisEventInformation): Promise<{
9
- removed: boolean;
10
- socketsRemoved: number;
11
- subscribersRemoved: number;
12
- }>;
13
- export declare function refreshEntityEventTTL(entity: EntitySubscription): Promise<void>;
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.connectEntityToSocketEvent = connectEntityToSocketEvent;
4
- exports.disconnectEntityFromSocketEvent = disconnectEntityFromSocketEvent;
5
- exports.refreshEntityEventTTL = refreshEntityEventTTL;
6
- const __1 = require("../../..");
7
- const keys_1 = require("./keys");
8
- const constants_1 = require("./constants");
9
- const cache_1 = require("./cache");
10
- const subscriptionCache = new cache_1.LRUCache(10000);
11
- const eventSubscribersCache = new cache_1.LRUCache(5000);
12
- async function connectEntityToSocketEvent(entity, socketRedisEventInformation) {
13
- const redis = (0, __1.getLibraries)().getRedisService();
14
- const entityKeyStr = (0, keys_1.entityKey)(entity);
15
- const { instanceId, socketId, eventKey } = socketRedisEventInformation;
16
- const socketData = `${instanceId}|${socketId}`;
17
- const subscriberData = `${entityKeyStr}|${instanceId}|${socketId}`;
18
- const entityEventKey = (0, keys_1.kEntityEventSockets)(entity, eventKey);
19
- const eventSubsKey = (0, keys_1.kEventEntity)(eventKey);
20
- const ledgerKey = (0, keys_1.kEntityEvent)(entity);
21
- await Promise.all([
22
- redis.addToSet(entityEventKey, socketData),
23
- redis.addToSet(eventSubsKey, subscriberData),
24
- redis.addToSet(ledgerKey, eventKey),
25
- ]);
26
- await Promise.all([
27
- redis.redisClient.expire(entityEventKey, constants_1.REDIS_KEY_TTL_SECONDS),
28
- redis.redisClient.expire(eventSubsKey, constants_1.REDIS_KEY_TTL_SECONDS),
29
- redis.redisClient.expire(ledgerKey, constants_1.REDIS_KEY_TTL_SECONDS),
30
- ]);
31
- subscriptionCache.delete(`${entityKeyStr}:${eventKey}`);
32
- eventSubscribersCache.delete(eventKey);
33
- }
34
- async function disconnectEntityFromSocketEvent(entity, socketRedisEventInformation) {
35
- const redis = (0, __1.getLibraries)().getRedisService();
36
- const entityKeyStr = (0, keys_1.entityKey)(entity);
37
- const { instanceId, socketId, eventKey } = socketRedisEventInformation;
38
- const entityEventKey = (0, keys_1.kEntityEventSockets)(entity, eventKey);
39
- const eventSubsKey = (0, keys_1.kEventEntity)(eventKey);
40
- const ledgerKey = (0, keys_1.kEntityEvent)(entity);
41
- const socketData = `${instanceId}|${socketId}`;
42
- const subscriberData = `${entityKeyStr}|${instanceId}|${socketId}`;
43
- await Promise.all([
44
- redis.removeFromSet(entityEventKey, socketData),
45
- redis.removeFromSet(eventSubsKey, subscriberData),
46
- ]);
47
- const entitySockets = await redis.getSetMembers(entityEventKey);
48
- if (entitySockets.length === 0) {
49
- await Promise.all([redis.deleteCachedObject(entityEventKey), redis.removeFromSet(ledgerKey, eventKey)]);
50
- }
51
- subscriptionCache.delete(`${entityKeyStr}:${eventKey}`);
52
- eventSubscribersCache.delete(eventKey);
53
- return {
54
- removed: true,
55
- socketsRemoved: 1,
56
- subscribersRemoved: 1,
57
- };
58
- }
59
- async function refreshEntityEventTTL(entity) {
60
- const redis = (0, __1.getLibraries)().getRedisService();
61
- const ledgerKey = (0, keys_1.kEntityEvent)(entity);
62
- const activeEvents = await redis.getSetMembers(ledgerKey);
63
- if (!activeEvents.length)
64
- return;
65
- const pipeline = redis.redisClient.pipeline();
66
- pipeline.expire(ledgerKey, constants_1.REDIS_KEY_TTL_SECONDS);
67
- for (const eventKey of activeEvents) {
68
- pipeline.expire((0, keys_1.kEntityEventSockets)(entity, eventKey), constants_1.REDIS_KEY_TTL_SECONDS);
69
- pipeline.expire((0, keys_1.kEventEntity)(eventKey), constants_1.REDIS_KEY_TTL_SECONDS);
70
- }
71
- await pipeline.exec();
72
- }
73
- //# sourceMappingURL=subscription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"/","sources":["libraries/socket/connections/subscription.ts"],"names":[],"mappings":";;AAoBA,gEAwBC;AAED,0EA2BC;AAED,sDAYC;AAtFD,gCAAwC;AACxC,iCAAwG;AACxG,2CAAoD;AACpD,mCAAmC;AAQnC,MAAM,iBAAiB,GAAG,IAAI,gBAAQ,CAGpC,KAAK,CAAC,CAAC;AACT,MAAM,qBAAqB,GAAG,IAAI,gBAAQ,CACzC,IAAI,CACJ,CAAC;AAEK,KAAK,UAAU,0BAA0B,CAC/C,MAA0B,EAC1B,2BAAwD;IAExD,MAAM,KAAK,GAAG,IAAA,gBAAY,GAAE,CAAC,eAAe,EAAE,CAAC;IAC/C,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,M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,SAAS,GAAG,IAAA,mBAAY,EAAC,MAAM,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC1D,IAAI,CAAC,YAAY,CAAC,MAAM;QAAE,OAAO;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,iCAAqB,CAAC,CAAC;IAClD,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;QACrC,QAAQ,CAAC,MAAM,CAAC,IAAA,0BAAmB,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,iCAAqB,CAAC,CAAC;QAC9E,QAAQ,CAAC,MAAM,CAAC,IAAA,mBAAY,EAAC,QAAQ,CAAC,EAAE,iCAAqB,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC","sourcesContent":["// Subscription management logic for socket Redis\nimport { getLibraries } from '../../..';\nimport { kEntityEventSockets, kEventEntity, kEntityEvent, entityKey, EntitySubscription } from './keys';\nimport { REDIS_KEY_TTL_SECONDS } from './constants';\nimport { LRUCache } from './cache';\n\nexport interface SocketRedisEventInformation {\n\teventKey: string;\n\tinstanceId: string;\n\tsocketId: string;\n}\n\nconst subscriptionCache = new LRUCache<\n\tstring,\n\t{ isSubscribed: boolean; instances: string[]; timestamp: number }\n>(10000);\nconst eventSubscribersCache = new LRUCache<string, { subscribers: EntitySubscription[]; timestamp: number }>(\n\t5000\n);\n\nexport async function connectEntityToSocketEvent(\n\tentity: EntitySubscription,\n\tsocketRedisEventInformation: SocketRedisEventInformation\n) {\n\tconst redis = getLibraries().getRedisService();\n\tconst entityKeyStr = entityKey(entity);\n\tconst { instanceId, socketId, eventKey } = socketRedisEventInformation;\n\tconst socketData = `${instanceId}|${socketId}`;\n\tconst subscriberData = `${entityKeyStr}|${instanceId}|${socketId}`;\n\tconst entityEventKey = kEntityEventSockets(entity, eventKey);\n\tconst eventSubsKey = kEventEntity(eventKey);\n\tconst ledgerKey = kEntityEvent(entity);\n\tawait Promise.all([\n\t\tredis.addToSet(entityEventKey, socketData),\n\t\tredis.addToSet(eventSubsKey, subscriberData),\n\t\tredis.addToSet(ledgerKey, eventKey),\n\t]);\n\tawait Promise.all([\n\t\tredis.redisClient.expire(entityEventKey, REDIS_KEY_TTL_SECONDS),\n\t\tredis.redisClient.expire(eventSubsKey, REDIS_KEY_TTL_SECONDS),\n\t\tredis.redisClient.expire(ledgerKey, REDIS_KEY_TTL_SECONDS),\n\t]);\n\tsubscriptionCache.delete(`${entityKeyStr}:${eventKey}`);\n\teventSubscribersCache.delete(eventKey);\n}\n\nexport async function disconnectEntityFromSocketEvent(\n\tentity: EntitySubscription,\n\tsocketRedisEventInformation: SocketRedisEventInformation\n) {\n\tconst redis = getLibraries().getRedisService();\n\tconst entityKeyStr = entityKey(entity);\n\tconst { instanceId, socketId, eventKey } = socketRedisEventInformation;\n\tconst entityEventKey = kEntityEventSockets(entity, eventKey);\n\tconst eventSubsKey = kEventEntity(eventKey);\n\tconst ledgerKey = kEntityEvent(entity);\n\tconst socketData = `${instanceId}|${socketId}`;\n\tconst subscriberData = `${entityKeyStr}|${instanceId}|${socketId}`;\n\tawait Promise.all([\n\t\tredis.removeFromSet(entityEventKey, socketData),\n\t\tredis.removeFromSet(eventSubsKey, subscriberData),\n\t]);\n\tconst entitySockets = await redis.getSetMembers(entityEventKey);\n\tif (entitySockets.length === 0) {\n\t\tawait Promise.all([redis.deleteCachedObject(entityEventKey), redis.removeFromSet(ledgerKey, eventKey)]);\n\t}\n\tsubscriptionCache.delete(`${entityKeyStr}:${eventKey}`);\n\teventSubscribersCache.delete(eventKey);\n\treturn {\n\t\tremoved: true,\n\t\tsocketsRemoved: 1,\n\t\tsubscribersRemoved: 1,\n\t};\n}\n\nexport async function refreshEntityEventTTL(entity: EntitySubscription) {\n\tconst redis = getLibraries().getRedisService();\n\tconst ledgerKey = kEntityEvent(entity);\n\tconst activeEvents = await redis.getSetMembers(ledgerKey);\n\tif (!activeEvents.length) return;\n\tconst pipeline = redis.redisClient.pipeline();\n\tpipeline.expire(ledgerKey, REDIS_KEY_TTL_SECONDS);\n\tfor (const eventKey of activeEvents) {\n\t\tpipeline.expire(kEntityEventSockets(entity, eventKey), REDIS_KEY_TTL_SECONDS);\n\t\tpipeline.expire(kEventEntity(eventKey), REDIS_KEY_TTL_SECONDS);\n\t}\n\tawait pipeline.exec();\n}\n"]}
@@ -1,6 +0,0 @@
1
- export * from '../BaseSocketEvent';
2
- export * from './local-subscription-registry';
3
- export * from './socket-event-registry';
4
- export * from './zAsyncIterable';
5
- export * from './socket-event-publisher';
6
- export * from './socket-event-consumer';
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../BaseSocketEvent"), exports);
18
- __exportStar(require("./local-subscription-registry"), exports);
19
- __exportStar(require("./socket-event-registry"), exports);
20
- __exportStar(require("./zAsyncIterable"), exports);
21
- __exportStar(require("./socket-event-publisher"), exports);
22
- __exportStar(require("./socket-event-consumer"), exports);
23
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/socket/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,gEAA8C;AAC9C,0DAAwC;AACxC,mDAAiC;AACjC,2DAAyC;AACzC,0DAAwC","sourcesContent":["export * from '../BaseSocketEvent';\nexport * from './local-subscription-registry';\nexport * from './socket-event-registry';\nexport * from './zAsyncIterable';\nexport * from './socket-event-publisher';\nexport * from './socket-event-consumer';\n"]}
@@ -1,17 +0,0 @@
1
- import EventEmitter from 'events';
2
- import { EntitySubscription } from '../connections';
3
- type EventKey = string;
4
- type SocketId = string;
5
- export declare class LocalEventEmitter {
6
- readonly ee: EventEmitter;
7
- readonly socketId: SocketId;
8
- constructor(socketId: SocketId);
9
- }
10
- declare class LocalSubscriptionRegistry {
11
- private listeners;
12
- bind(entity: EntitySubscription, eventKey: EventKey, ee: LocalEventEmitter): void;
13
- unbind(entity: EntitySubscription, eventKey: EventKey, ee: LocalEventEmitter): void;
14
- emit(entity: EntitySubscription, eventKey: EventKey, payload: unknown): void;
15
- }
16
- export declare const LocalSubs: LocalSubscriptionRegistry;
17
- export {};
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LocalSubs = exports.LocalEventEmitter = void 0;
7
- const events_1 = __importDefault(require("events"));
8
- const keyCache = new Map();
9
- const entityKey = (entity) => {
10
- const raw = `${entity.type ?? 'default'}:${entity.id}`;
11
- let cached = keyCache.get(raw);
12
- if (!cached) {
13
- cached = raw;
14
- keyCache.set(raw, cached);
15
- }
16
- return cached;
17
- };
18
- class LocalEventEmitter {
19
- ee;
20
- socketId;
21
- constructor(socketId) {
22
- this.ee = new events_1.default();
23
- this.ee.setMaxListeners(0);
24
- this.socketId = socketId;
25
- }
26
- }
27
- exports.LocalEventEmitter = LocalEventEmitter;
28
- class LocalSubscriptionRegistry {
29
- listeners = new Map();
30
- bind(entity, eventKey, ee) {
31
- const key = `${entityKey(entity)}:${eventKey}`;
32
- let listenerSet = this.listeners.get(key);
33
- if (!listenerSet) {
34
- listenerSet = new Set();
35
- this.listeners.set(key, listenerSet);
36
- }
37
- listenerSet.add(ee);
38
- }
39
- unbind(entity, eventKey, ee) {
40
- const key = `${entityKey(entity)}:${eventKey}`;
41
- const listenerSet = this.listeners.get(key);
42
- if (listenerSet) {
43
- listenerSet.delete(ee);
44
- if (listenerSet.size === 0) {
45
- this.listeners.delete(key);
46
- }
47
- }
48
- }
49
- emit(entity, eventKey, payload) {
50
- const key = `${entityKey(entity)}:${eventKey}`;
51
- const listeners = this.listeners.get(key);
52
- if (!listeners)
53
- return;
54
- for (const listener of listeners) {
55
- listener.ee.emit(eventKey, payload);
56
- }
57
- }
58
- }
59
- exports.LocalSubs = new LocalSubscriptionRegistry();
60
- //# sourceMappingURL=local-subscription-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-subscription-registry.js","sourceRoot":"/","sources":["libraries/socket/core/local-subscription-registry.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAkC;AAOlC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC3C,MAAM,SAAS,GAAG,CAAC,MAA0B,EAAU,EAAE;IACxD,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;IACvD,IAAI,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,CAAC;QACb,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAGF,MAAa,iBAAiB;IACpB,EAAE,CAAe;IACjB,QAAQ,CAAW;IAE5B,YAAY,QAAkB;QAC7B,IAAI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QAAQ,EAAE,CAAC;QAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE1C,IAAI,CAAC,SAAS;YAAE,OAAO;QAGvB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;CACD;AAEY,QAAA,SAAS,GAAG,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["import EventEmitter from 'events';\nimport { EntitySubscription } from '../connections';\n\ntype EventKey = string;\ntype SocketId = string;\n\n// Zero-overhead key with memoization\nconst keyCache = new Map<string, string>();\nconst entityKey = (entity: EntitySubscription): string => {\n\tconst raw = `${entity.type ?? 'default'}:${entity.id}`;\n\tlet cached = keyCache.get(raw);\n\tif (!cached) {\n\t\tcached = raw;\n\t\tkeyCache.set(raw, cached);\n\t}\n\treturn cached;\n};\n\n// Remove wrapper class - direct EventEmitter usage\nexport class LocalEventEmitter {\n\treadonly ee: EventEmitter;\n\treadonly socketId: SocketId;\n\n\tconstructor(socketId: SocketId) {\n\t\tthis.ee = new EventEmitter();\n\t\tthis.ee.setMaxListeners(0); // Unlimited listeners\n\t\tthis.socketId = socketId;\n\t}\n}\n\nclass LocalSubscriptionRegistry {\n\t// Direct map for O(1) lookups with minimal overhead\n\tprivate listeners = new Map<string, Set<LocalEventEmitter>>();\n\n\tbind(entity: EntitySubscription, eventKey: EventKey, ee: LocalEventEmitter): void {\n\t\tconst key = `${entityKey(entity)}:${eventKey}`;\n\t\tlet listenerSet = this.listeners.get(key);\n\n\t\tif (!listenerSet) {\n\t\t\tlistenerSet = new Set();\n\t\t\tthis.listeners.set(key, listenerSet);\n\t\t}\n\n\t\tlistenerSet.add(ee);\n\t}\n\n\tunbind(entity: EntitySubscription, eventKey: EventKey, ee: LocalEventEmitter): void {\n\t\tconst key = `${entityKey(entity)}:${eventKey}`;\n\t\tconst listenerSet = this.listeners.get(key);\n\n\t\tif (listenerSet) {\n\t\t\tlistenerSet.delete(ee);\n\t\t\tif (listenerSet.size === 0) {\n\t\t\t\tthis.listeners.delete(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Zero-overhead emit - inline fast path\n\temit(entity: EntitySubscription, eventKey: EventKey, payload: unknown): void {\n\t\tconst key = `${entityKey(entity)}:${eventKey}`;\n\t\tconst listeners = this.listeners.get(key);\n\n\t\tif (!listeners) return;\n\n\t\t// Direct iteration - fastest possible\n\t\tfor (const listener of listeners) {\n\t\t\tlistener.ee.emit(eventKey, payload);\n\t\t}\n\t}\n}\n\nexport const LocalSubs = new LocalSubscriptionRegistry();\n"]}
@@ -1 +0,0 @@
1
- export declare function subscribeToSocketEvent(): Promise<void>;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.subscribeToSocketEvent = subscribeToSocketEvent;
4
- const instance_utils_1 = require("../../../utilities/instance.utils");
5
- const event_1 = require("../../event");
6
- const local_subscription_registry_1 = require("./local-subscription-registry");
7
- async function subscribeToSocketEvent() {
8
- const instanceId = (0, instance_utils_1.getInstanceId)();
9
- await (0, event_1.subscribeToQueue)(`socket-events-${instanceId}`, `instance.${instanceId}`, (msg) => {
10
- const { localKey, payload, recipient } = msg;
11
- local_subscription_registry_1.LocalSubs.emit(recipient, localKey, payload);
12
- }, { requeue: false });
13
- }
14
- //# sourceMappingURL=socket-event-consumer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-event-consumer.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-consumer.ts"],"names":[],"mappings":";;AAIA,wDAWC;AAfD,sEAAkE;AAClE,uCAA+C;AAC/C,+EAA0D;AAEnD,KAAK,UAAU,sBAAsB;IAC3C,MAAM,UAAU,GAAG,IAAA,8BAAa,GAAE,CAAC;IACnC,MAAM,IAAA,wBAAgB,EACrB,iBAAiB,UAAU,EAAE,EAC7B,YAAY,UAAU,EAAE,EACxB,CAAC,GAAY,EAAE,EAAE;QAChB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,GAA6D,CAAC;QACvG,uCAAS,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC,EACD,EAAE,OAAO,EAAE,KAAK,EAAE,CAClB,CAAC;AACH,CAAC","sourcesContent":["import { getInstanceId } from '../../../utilities/instance.utils';\nimport { subscribeToQueue } from '../../event';\nimport { LocalSubs } from './local-subscription-registry';\n\nexport async function subscribeToSocketEvent(): Promise<void> {\n\tconst instanceId = getInstanceId();\n\tawait subscribeToQueue(\n\t\t`socket-events-${instanceId}`,\n\t\t`instance.${instanceId}`,\n\t\t(msg: unknown) => {\n\t\t\tconst { localKey, payload, recipient } = msg as { localKey: string; payload: unknown; recipient: any };\n\t\t\tLocalSubs.emit(recipient, localKey, payload);\n\t\t},\n\t\t{ requeue: false }\n\t);\n}\n"]}
@@ -1,6 +0,0 @@
1
- import { BaseSocketEvent } from '../BaseSocketEvent';
2
- import { SocketNotificationEvent } from '../events';
3
- import type { ZodTypeAny } from 'zod';
4
- import { EntitySubscription } from '../connections';
5
- export declare function publishSocketEvent(event: BaseSocketEvent<ZodTypeAny, ZodTypeAny, ZodTypeAny | undefined>, recipients: EntitySubscription[]): Promise<void>;
6
- export declare function publishNotificationSocketEvent(event: SocketNotificationEvent, recipients: EntitySubscription[]): Promise<void>;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.publishSocketEvent = publishSocketEvent;
4
- exports.publishNotificationSocketEvent = publishNotificationSocketEvent;
5
- const __1 = require("../../..");
6
- const event_1 = require("../../event");
7
- const PushNotificationEvent_1 = require("../PushNotificationEvent");
8
- const connections_1 = require("../connections");
9
- function fanOutToInstances(recipientsWithInstances, localKey, payload) {
10
- if (recipientsWithInstances.length === 0)
11
- return;
12
- for (const { recipient, instances } of recipientsWithInstances) {
13
- const message = { localKey, payload, recipient };
14
- for (const instanceId of instances) {
15
- (0, event_1.publish)(`instance.${instanceId}`, message).catch((error) => {
16
- console.error(`[Socket] Publish failed for instance ${instanceId}`, error);
17
- });
18
- }
19
- }
20
- }
21
- async function getActiveSubscribedRecipients(recipients, localKey) {
22
- if (recipients.length === 0)
23
- return { subscribed: [], unsubscribed: [] };
24
- const redis = (0, __1.getLibraries)().getRedisService();
25
- const subscribed = [];
26
- const unsubscribed = [];
27
- await Promise.all(recipients.map(async (recipient) => {
28
- const sockets = await redis.getSetMembers((0, connections_1.kEntityEventSockets)(recipient, localKey));
29
- if (sockets.length === 0) {
30
- unsubscribed.push(recipient);
31
- return;
32
- }
33
- const instances = [...new Set(sockets.map(s => s.split('|')[0]).filter(Boolean))];
34
- if (instances.length > 0)
35
- subscribed.push({ recipient, instances });
36
- else
37
- unsubscribed.push(recipient);
38
- }));
39
- return { subscribed, unsubscribed };
40
- }
41
- async function publishSocketEvent(event, recipients) {
42
- const logger = (0, __1.getLibraries)().getLogger().logger;
43
- if (recipients.length === 0)
44
- return;
45
- const localKey = event.getSubscriptionKey();
46
- const payload = event.payload();
47
- const { subscribed, unsubscribed } = await getActiveSubscribedRecipients(recipients, localKey);
48
- logger.debug({ subscribed }, '[Socket] Subscribed recipients:');
49
- logger.debug({ unsubscribed }, '[Socket] Unsubscribed recipients:');
50
- if (subscribed.length > 0)
51
- fanOutToInstances(subscribed, localKey, payload);
52
- if (unsubscribed.length > 0) {
53
- logger.debug({ unsubscribed }, '[Socket] Processing unsubscribed recipients');
54
- if (event.notificationSettings?.isPushNotification) {
55
- const pushNotificationPayload = event.getPushNotificationPayload();
56
- await (0, event_1.publishEvent)(new PushNotificationEvent_1.PushNotificationEvent(event.eventType(), pushNotificationPayload, unsubscribed, event.notificationSettings)).catch(err => console.error('[Socket] Push notification failed:', err));
57
- }
58
- const socketNotificationPayload = event.getSocketNotificationEvent();
59
- logger.debug({ socketNotificationPayload }, '[Socket] Socket notification payload');
60
- if (socketNotificationPayload) {
61
- await publishNotificationSocketEvent(socketNotificationPayload, unsubscribed);
62
- }
63
- }
64
- }
65
- async function publishNotificationSocketEvent(event, recipients) {
66
- if (recipients.length === 0)
67
- return;
68
- const eventKey = event.getSubscriptionKey();
69
- const redis = (0, __1.getLibraries)().getRedisService();
70
- const validInstances = [];
71
- await Promise.all(recipients.map(async (recipient) => {
72
- const sockets = await redis.getSetMembers((0, connections_1.kEntityEventSockets)(recipient, eventKey));
73
- if (sockets.length === 0)
74
- return;
75
- const instances = [...new Set(sockets.map(s => s.split('|')[0]).filter(Boolean))];
76
- if (instances.length > 0)
77
- validInstances.push({ recipient, instances });
78
- }));
79
- if (validInstances.length > 0)
80
- fanOutToInstances(validInstances, eventKey, event.payload());
81
- }
82
- //# sourceMappingURL=socket-event-publisher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-event-publisher.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-publisher.ts"],"names":[],"mappings":";;AAsDA,gDAkCC;AAED,wEAoBC;AA9GD,gCAAwC;AAGxC,uCAAoD;AACpD,oEAAiE;AAEjE,gDAAyE;AAEzE,SAAS,iBAAiB,CACzB,uBAAsF,EACtF,QAAgB,EAChB,OAAgB;IAEhB,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjD,KAAK,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,uBAAuB,EAAE,CAAC;QAChE,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QACjD,KAAK,MAAM,UAAU,IAAI,SAAS,EAAE,CAAC;YACpC,IAAA,eAAO,EAAC,YAAY,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;gBACnE,OAAO,CAAC,KAAK,CAAC,wCAAwC,UAAU,EAAE,EAAE,KAAK,CAAC,CAAC;YAC5E,C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'../events';\nimport { publish, publishEvent } from '../../event';\nimport { PushNotificationEvent } from '../PushNotificationEvent';\nimport type { ZodTypeAny } from 'zod';\nimport { EntitySubscription, kEntityEventSockets } from '../connections';\n\nfunction fanOutToInstances(\n\trecipientsWithInstances: Array<{ recipient: EntitySubscription; instances: string[] }>,\n\tlocalKey: string,\n\tpayload: unknown\n): void {\n\tif (recipientsWithInstances.length === 0) return;\n\n\tfor (const { recipient, instances } of recipientsWithInstances) {\n\t\tconst message = { localKey, payload, recipient };\n\t\tfor (const instanceId of instances) {\n\t\t\tpublish(`instance.${instanceId}`, message).catch((error: unknown) => {\n\t\t\t\tconsole.error(`[Socket] Publish failed for instance ${instanceId}`, error);\n\t\t\t});\n\t\t}\n\t}\n}\n\nasync function getActiveSubscribedRecipients(\n\trecipients: EntitySubscription[],\n\tlocalKey: string\n): Promise<{\n\tsubscribed: Array<{ recipient: EntitySubscription; instances: string[] }>;\n\tunsubscribed: EntitySubscription[];\n}> {\n\tif (recipients.length === 0) return { subscribed: [], unsubscribed: [] };\n\n\tconst redis = getLibraries().getRedisService();\n\tconst subscribed: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\tconst unsubscribed: EntitySubscription[] = [];\n\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(kEntityEventSockets(recipient, localKey));\n\t\t\tif (sockets.length === 0) {\n\t\t\t\tunsubscribed.push(recipient);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst instances = [...new Set(sockets.map(s => s.split('|')[0]).filter(Boolean))];\n\t\t\tif (instances.length > 0) subscribed.push({ recipient, instances });\n\t\t\telse unsubscribed.push(recipient);\n\t\t})\n\t);\n\n\treturn { subscribed, unsubscribed };\n}\n\nexport async function publishSocketEvent(\n\tevent: BaseSocketEvent<ZodTypeAny, ZodTypeAny, ZodTypeAny | undefined>,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tconst logger = getLibraries().getLogger().logger;\n\tif (recipients.length === 0) return;\n\n\tconst localKey = event.getSubscriptionKey();\n\tconst payload = event.payload();\n\n\tconst { subscribed, unsubscribed } = await getActiveSubscribedRecipients(recipients, localKey);\n\n\tlogger.debug({ subscribed }, '[Socket] Subscribed recipients:');\n\tlogger.debug({ unsubscribed }, '[Socket] Unsubscribed recipients:');\n\n\tif (subscribed.length > 0) fanOutToInstances(subscribed, localKey, payload);\n\n\tif (unsubscribed.length > 0) {\n\t\tlogger.debug({ unsubscribed }, '[Socket] Processing unsubscribed recipients');\n\n\t\tif (event.notificationSettings?.isPushNotification) {\n\t\t\tconst pushNotificationPayload = event.getPushNotificationPayload();\n\t\t\tawait publishEvent(\n\t\t\t\tnew PushNotificationEvent(event.eventType(), pushNotificationPayload, unsubscribed, event.notificationSettings)\n\t\t\t).catch(err => console.error('[Socket] Push notification failed:', err));\n\t\t}\n\n\t\tconst socketNotificationPayload = event.getSocketNotificationEvent();\n\t\tlogger.debug({ socketNotificationPayload }, '[Socket] Socket notification payload');\n\n\t\tif (socketNotificationPayload) {\n\t\t\tawait publishNotificationSocketEvent(socketNotificationPayload, unsubscribed);\n\t\t}\n\t}\n}\n\nexport async function publishNotificationSocketEvent(\n\tevent: SocketNotificationEvent,\n\trecipients: EntitySubscription[]\n): Promise<void> {\n\tif (recipients.length === 0) return;\n\n\tconst eventKey = event.getSubscriptionKey();\n\tconst redis = getLibraries().getRedisService();\n\tconst validInstances: Array<{ recipient: EntitySubscription; instances: string[] }> = [];\n\n\tawait Promise.all(\n\t\trecipients.map(async recipient => {\n\t\t\tconst sockets = await redis.getSetMembers(kEntityEventSockets(recipient, eventKey));\n\t\t\tif (sockets.length === 0) return;\n\t\t\tconst instances = [...new Set(sockets.map(s => s.split('|')[0]).filter(Boolean))];\n\t\t\tif (instances.length > 0) validInstances.push({ recipient, instances });\n\t\t})\n\t);\n\n\tif (validInstances.length > 0) fanOutToInstances(validInstances, eventKey, event.payload());\n}\n"]}
@@ -1,12 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { SocketEventType } from '../../../utilities/enum';
3
- import { REGISTRY } from './socket-event-registry.map';
4
- type InputFor<T extends SocketEventType> = z.infer<(typeof REGISTRY)[T]['schemas']['input']>;
5
- type OutputFor<T extends SocketEventType> = z.infer<(typeof REGISTRY)[T]['schemas']['output']>;
6
- type EventFor<T extends SocketEventType> = InstanceType<(typeof REGISTRY)[T]>;
7
- export declare class EventFactory {
8
- static getEventClass<T extends SocketEventType>(eventType: T): (typeof REGISTRY)[T];
9
- static getSubscriptionKey<T extends SocketEventType>(eventType: T, input: InputFor<T>): string;
10
- static createEvent<T extends SocketEventType>(eventType: T, data: OutputFor<T>): EventFor<T>;
11
- }
12
- export type { EventFor, InputFor, OutputFor };
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventFactory = void 0;
4
- const socket_event_registry_map_1 = require("./socket-event-registry.map");
5
- class EventFactory {
6
- static getEventClass(eventType) {
7
- return socket_event_registry_map_1.REGISTRY[eventType];
8
- }
9
- static getSubscriptionKey(eventType, input) {
10
- const eventClass = this.getEventClass(eventType);
11
- const schemas = (0, socket_event_registry_map_1.getSchemas)(eventClass);
12
- const identifier = (0, socket_event_registry_map_1.getIdentifier)(eventClass);
13
- const validatedInput = schemas.input.parse(input);
14
- const key = typeof identifier === 'function' ? identifier(validatedInput) : 'default';
15
- return `${eventType}:${key}`;
16
- }
17
- static createEvent(eventType, data) {
18
- const EventClass = this.getEventClass(eventType);
19
- return new EventClass(data);
20
- }
21
- }
22
- exports.EventFactory = EventFactory;
23
- //# sourceMappingURL=socket-event-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-event-registry.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-registry.ts"],"names":[],"mappings":";;;AAEA,2EAAkF;AAOlF,MAAa,YAAY;IAExB,MAAM,CAAC,aAAa,CAA4B,SAAY;QAC3D,OAAO,oCAAQ,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAGD,MAAM,CAAC,kBAAkB,CAA4B,SAAY,EAAE,KAAkB;QACpF,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,IAAA,sCAAU,EAAC,UAAU,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,IAAA,yCAAa,EAAC,UAAU,CAAC,CAAC;QAE7C,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,GAAG,GAAG,OAAO,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEtF,OAAO,GAAG,SAAS,IAAI,GAAG,EAAE,CAAC;IAC9B,CAAC;IAGD,MAAM,CAAC,WAAW,CAA4B,SAAY,EAAE,IAAkB;QAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACjD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAgB,CAAC;IAC5C,CAAC;CACD;AAvBD,oCAuBC","sourcesContent":["import type { z } from 'zod';\nimport type { SocketEventType } from '../../../utilities/enum';\nimport { getIdentifier, getSchemas, REGISTRY } from './socket-event-registry.map';\n\n// Infer types directly from the registry\ntype InputFor<T extends SocketEventType> = z.infer<(typeof REGISTRY)[T]['schemas']['input']>;\ntype OutputFor<T extends SocketEventType> = z.infer<(typeof REGISTRY)[T]['schemas']['output']>;\ntype EventFor<T extends SocketEventType> = InstanceType<(typeof REGISTRY)[T]>;\n\nexport class EventFactory {\n\t// Get the event class constructor\n\tstatic getEventClass<T extends SocketEventType>(eventType: T): (typeof REGISTRY)[T] {\n\t\treturn REGISTRY[eventType];\n\t}\n\n\t// Create a subscription key for an event with validated input\n\tstatic getSubscriptionKey<T extends SocketEventType>(eventType: T, input: InputFor<T>): string {\n\t\tconst eventClass = this.getEventClass(eventType);\n\t\tconst schemas = getSchemas(eventClass);\n\t\tconst identifier = getIdentifier(eventClass);\n\n\t\tconst validatedInput = schemas.input.parse(input);\n\t\tconst key = typeof identifier === 'function' ? identifier(validatedInput) : 'default';\n\n\t\treturn `${eventType}:${key}`;\n\t}\n\n\t// Create an event instance from validated output data\n\tstatic createEvent<T extends SocketEventType>(eventType: T, data: OutputFor<T>): EventFor<T> {\n\t\tconst EventClass = this.getEventClass(eventType);\n\t\treturn new EventClass(data) as EventFor<T>;\n\t}\n}\n\nexport type { EventFor, InputFor, OutputFor };\n"]}