@ozdao/martyrs 0.2.505 → 0.2.507

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 (517) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/auth.server.cjs +1 -1
  6. package/dist/auth.server.js +1 -1
  7. package/dist/builder.cjs +52 -60
  8. package/dist/builder.js +52 -60
  9. package/dist/chats.server.cjs +1 -1
  10. package/dist/chats.server.js +1 -1
  11. package/dist/events.server.cjs +1 -1
  12. package/dist/events.server.js +1 -1
  13. package/dist/{mailing-q7sR8gCV.cjs → mailing-Bs9ThyVZ.cjs} +1 -24
  14. package/dist/{mailing-C11EYWm-.js → mailing-DzlhsxCC.js} +1 -24
  15. package/dist/main-AWSb_d2P.cjs +11 -0
  16. package/dist/{main-CJm5myDI.js → main-Dq-UfO4G.js} +2562 -2477
  17. package/dist/martyrs/src/components/Button/Button.vue2.cjs +1 -1
  18. package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
  19. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +3 -3
  20. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
  21. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +3 -3
  22. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  23. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
  24. package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
  25. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +15 -46
  26. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  27. package/dist/martyrs/src/components/Feed/Feed.vue.js +22 -53
  28. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  29. package/dist/martyrs/src/components/Field/Field.vue.cjs +14 -6
  30. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
  31. package/dist/martyrs/src/components/Field/Field.vue.js +14 -6
  32. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  33. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +58 -11
  34. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +60 -13
  36. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  37. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  38. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs.map +1 -1
  39. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  40. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
  41. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  42. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  43. package/dist/martyrs/src/components/Loader/{Loader.vue2.cjs → Loader.vue.cjs} +2 -2
  44. package/dist/martyrs/src/components/Loader/{Loader.vue2.js.map → Loader.vue.cjs.map} +1 -1
  45. package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +2 -2
  46. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
  47. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  48. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
  49. package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
  50. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
  51. package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
  52. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
  53. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +2 -2
  54. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
  55. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +2 -2
  56. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
  57. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  58. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  59. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
  60. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  61. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
  62. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  63. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +42 -10
  64. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +44 -12
  66. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +11 -15
  68. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +21 -25
  70. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +12 -16
  72. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +33 -37
  74. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -1
  75. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +13 -9
  76. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -1
  77. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +13 -9
  78. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
  79. package/dist/martyrs/src/modules/auth/views/router/users.cjs +0 -4
  80. package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
  81. package/dist/martyrs/src/modules/auth/views/router/users.js +0 -4
  82. package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
  83. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  85. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  87. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +431 -0
  88. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -0
  89. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +431 -0
  90. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -0
  91. package/dist/martyrs/src/modules/community/router/blogposts.cjs +17 -0
  92. package/dist/martyrs/src/modules/community/router/blogposts.cjs.map +1 -1
  93. package/dist/martyrs/src/modules/community/router/blogposts.js +17 -0
  94. package/dist/martyrs/src/modules/community/router/blogposts.js.map +1 -1
  95. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  97. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -3
  98. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  99. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -3
  100. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  101. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -1
  103. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  104. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -1
  105. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
  107. package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
  109. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  110. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  111. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +4 -6
  112. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
  113. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +4 -6
  114. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
  115. package/dist/martyrs/src/modules/globals/views/components/blocks/{BlockMultiselect.vue2.cjs → BlockMultiselect.vue.cjs} +2 -2
  116. package/dist/martyrs/src/modules/globals/views/components/blocks/{BlockMultiselect.vue2.js.map → BlockMultiselect.vue.cjs.map} +1 -1
  117. package/dist/martyrs/src/modules/globals/views/components/blocks/{BlockMultiselect.vue2.js → BlockMultiselect.vue.js} +2 -2
  118. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockMultiselect.vue.js.map +1 -0
  119. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs +5 -2
  120. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js +6 -3
  122. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  125. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  127. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -3
  128. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  129. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -3
  130. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +324 -0
  132. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
  133. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +324 -0
  134. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -0
  135. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs +32 -0
  136. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs.map +1 -0
  137. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js +32 -0
  138. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js.map +1 -0
  139. package/dist/martyrs/src/modules/icons/icons.client.cjs +2 -0
  140. package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
  141. package/dist/martyrs/src/modules/icons/icons.client.js +116 -114
  142. package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
  143. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +5 -3
  144. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  145. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +117 -115
  146. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  147. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
  148. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +11 -36
  149. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs.map +1 -1
  150. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -36
  151. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
  152. package/dist/martyrs/src/modules/landing/landing.client.cjs +3 -0
  153. package/dist/martyrs/src/modules/landing/landing.client.cjs.map +1 -1
  154. package/dist/martyrs/src/modules/landing/landing.client.js +3 -0
  155. package/dist/martyrs/src/modules/landing/landing.client.js.map +1 -1
  156. package/dist/martyrs/src/modules/landing/locales/en.cjs +12 -0
  157. package/dist/martyrs/src/modules/landing/locales/en.cjs.map +1 -0
  158. package/dist/martyrs/src/modules/landing/locales/en.js +12 -0
  159. package/dist/martyrs/src/modules/landing/locales/en.js.map +1 -0
  160. package/dist/martyrs/src/modules/landing/locales/index.cjs +10 -0
  161. package/dist/martyrs/src/modules/landing/locales/index.cjs.map +1 -0
  162. package/dist/martyrs/src/modules/landing/locales/index.js +10 -0
  163. package/dist/martyrs/src/modules/landing/locales/index.js.map +1 -0
  164. package/dist/martyrs/src/modules/landing/locales/ru.cjs +12 -0
  165. package/dist/martyrs/src/modules/landing/locales/ru.cjs.map +1 -0
  166. package/dist/martyrs/src/modules/landing/locales/ru.js +12 -0
  167. package/dist/martyrs/src/modules/landing/locales/ru.js.map +1 -0
  168. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
  169. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
  170. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  171. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  172. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
  173. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
  174. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  175. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  176. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
  177. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  178. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
  179. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
  180. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  181. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  182. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  183. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  184. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
  185. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
  186. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  187. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  188. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  189. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  190. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
  191. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
  192. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  193. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  194. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  195. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  196. package/dist/martyrs/src/modules/music/router/music.cjs +2 -4
  197. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  198. package/dist/martyrs/src/modules/music/router/music.js +2 -4
  199. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  200. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs +86 -0
  201. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs.map +1 -0
  202. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +86 -0
  203. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -0
  204. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs +103 -0
  205. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs.map +1 -0
  206. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +103 -0
  207. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -0
  208. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs +194 -0
  209. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs.map +1 -0
  210. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +194 -0
  211. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -0
  212. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +138 -0
  213. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs.map +1 -0
  214. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +138 -0
  215. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -0
  216. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +189 -0
  217. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -0
  218. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +189 -0
  219. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -0
  220. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +173 -0
  221. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs.map +1 -0
  222. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +173 -0
  223. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -0
  224. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs +233 -0
  225. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs.map +1 -0
  226. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +233 -0
  227. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -0
  228. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs +234 -0
  229. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs.map +1 -0
  230. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +234 -0
  231. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -0
  232. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +9 -8
  233. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  234. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +9 -8
  235. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  236. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +8 -82
  237. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  238. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +9 -83
  239. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  240. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +119 -0
  241. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs.map +1 -0
  242. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +119 -0
  243. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -0
  244. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +139 -0
  245. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs.map +1 -0
  246. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +139 -0
  247. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -0
  248. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -3
  249. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  250. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -3
  251. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  252. package/dist/martyrs/src/modules/orders/locales/en.cjs +38 -0
  253. package/dist/martyrs/src/modules/orders/locales/en.cjs.map +1 -0
  254. package/dist/martyrs/src/modules/orders/locales/en.js +38 -0
  255. package/dist/martyrs/src/modules/orders/locales/en.js.map +1 -0
  256. package/dist/martyrs/src/modules/orders/locales/index.cjs +10 -0
  257. package/dist/martyrs/src/modules/orders/locales/index.cjs.map +1 -0
  258. package/dist/martyrs/src/modules/orders/locales/index.js +10 -0
  259. package/dist/martyrs/src/modules/orders/locales/index.js.map +1 -0
  260. package/dist/martyrs/src/modules/orders/locales/ru.cjs +38 -0
  261. package/dist/martyrs/src/modules/orders/locales/ru.cjs.map +1 -0
  262. package/dist/martyrs/src/modules/orders/locales/ru.js +38 -0
  263. package/dist/martyrs/src/modules/orders/locales/ru.js.map +1 -0
  264. package/dist/martyrs/src/modules/orders/orders.client.cjs +78 -3
  265. package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
  266. package/dist/martyrs/src/modules/orders/orders.client.js +80 -5
  267. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  268. package/dist/martyrs/src/modules/orders/router/applications.router.cjs +17 -0
  269. package/dist/martyrs/src/modules/orders/router/applications.router.cjs.map +1 -0
  270. package/dist/martyrs/src/modules/orders/router/applications.router.js +17 -0
  271. package/dist/martyrs/src/modules/orders/router/applications.router.js.map +1 -0
  272. package/dist/martyrs/src/modules/orders/router/customers.router.cjs +18 -0
  273. package/dist/martyrs/src/modules/orders/router/customers.router.cjs.map +1 -0
  274. package/dist/martyrs/src/modules/orders/router/customers.router.js +18 -0
  275. package/dist/martyrs/src/modules/orders/router/customers.router.js.map +1 -0
  276. package/dist/martyrs/src/modules/orders/store/applications.cjs +4 -42
  277. package/dist/martyrs/src/modules/orders/store/applications.cjs.map +1 -1
  278. package/dist/martyrs/src/modules/orders/store/applications.js +3 -41
  279. package/dist/martyrs/src/modules/orders/store/applications.js.map +1 -1
  280. package/dist/martyrs/src/modules/orders/store/models/application.cjs +20 -0
  281. package/dist/martyrs/src/modules/orders/store/models/application.cjs.map +1 -0
  282. package/dist/martyrs/src/modules/orders/store/models/application.js +20 -0
  283. package/dist/martyrs/src/modules/orders/store/models/application.js.map +1 -0
  284. package/dist/martyrs/src/modules/orders/store/models/customer.cjs +13 -1
  285. package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
  286. package/dist/martyrs/src/modules/orders/store/models/customer.js +13 -1
  287. package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
  288. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  289. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  290. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  291. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  292. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +18 -194
  293. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  294. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +19 -195
  295. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  296. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  297. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  298. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  299. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs.map +1 -1
  300. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  301. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
  302. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -11
  303. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs.map +1 -1
  304. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +6 -15
  305. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js.map +1 -1
  306. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  307. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  308. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  309. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  310. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +85 -89
  311. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  312. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +92 -96
  313. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  314. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +5 -1
  315. package/dist/martyrs/src/modules/organizations/router/organizations.cjs.map +1 -1
  316. package/dist/martyrs/src/modules/organizations/router/organizations.js +5 -1
  317. package/dist/martyrs/src/modules/organizations/router/organizations.js.map +1 -1
  318. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  319. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  320. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs +3 -6
  321. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs.map +1 -1
  322. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js +3 -6
  323. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js.map +1 -1
  324. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -1
  325. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
  326. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
  327. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
  328. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +2 -2
  329. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
  330. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
  331. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
  332. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
  333. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
  334. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +22 -19
  335. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
  336. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +22 -19
  337. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  338. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +27 -18
  339. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  340. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +27 -18
  341. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  342. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  343. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  344. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  345. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  346. package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  347. package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  348. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +361 -106
  349. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  350. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +379 -124
  351. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  352. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +20 -6
  353. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs.map +1 -1
  354. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +20 -6
  355. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js.map +1 -1
  356. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +32 -2
  357. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
  358. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +33 -3
  359. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
  360. package/dist/martyrs/src/modules/products/router/products.router.cjs +15 -0
  361. package/dist/martyrs/src/modules/products/router/products.router.cjs.map +1 -1
  362. package/dist/martyrs/src/modules/products/router/products.router.js +15 -0
  363. package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
  364. package/dist/martyrs/src/modules/products/store/categories.cjs +25 -7
  365. package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
  366. package/dist/martyrs/src/modules/products/store/categories.js +25 -7
  367. package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
  368. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  369. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
  370. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  371. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
  372. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +345 -0
  373. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -0
  374. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +345 -0
  375. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -0
  376. package/dist/martyrs/src/modules/spots/router/spots.cjs +17 -0
  377. package/dist/martyrs/src/modules/spots/router/spots.cjs.map +1 -1
  378. package/dist/martyrs/src/modules/spots/router/spots.js +17 -0
  379. package/dist/martyrs/src/modules/spots/router/spots.js.map +1 -1
  380. package/dist/martyrs.cjs.js +1 -1
  381. package/dist/martyrs.css +1 -1
  382. package/dist/martyrs.es.js +1 -1
  383. package/dist/notifications.server.cjs +1 -1
  384. package/dist/notifications.server.js +1 -1
  385. package/dist/orders.server.cjs +459 -201
  386. package/dist/orders.server.js +459 -201
  387. package/dist/organizations.server.cjs +1 -1
  388. package/dist/organizations.server.js +1 -1
  389. package/dist/products.server.cjs +439 -255
  390. package/dist/products.server.js +439 -255
  391. package/dist/style.css +115 -139
  392. package/dist/{tickets.controller-DQQcjyui.js → tickets.controller-C56OvH6v.js} +1 -1
  393. package/dist/{tickets.controller-D0V0gJCA.cjs → tickets.controller-DdnndM6c.cjs} +1 -1
  394. package/dist/wallet.server.cjs +1 -1
  395. package/dist/wallet.server.js +1 -1
  396. package/dist/{web-Dkk0_7TA.js → web-BXajFCU2.js} +1 -1
  397. package/dist/{web-stVkXd0l.cjs → web-DaBwwCQ5.cjs} +1 -1
  398. package/package.json +1 -1
  399. package/src/builder/modes/ssr.dev.js +10 -10
  400. package/src/builder/rspack/rspack.config.ssr.client.js +50 -50
  401. package/src/components/Checkbox/Checkbox.vue +3 -4
  402. package/src/components/Feed/Feed.old.vue +522 -0
  403. package/src/components/Feed/Feed.vue +4 -4
  404. package/src/components/Field/Field.vue +7 -1
  405. package/src/components/FieldBig/FieldBig.vue +62 -8
  406. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  407. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  408. package/src/modules/STYLES.MD +198 -0
  409. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  410. package/src/modules/auth/views/components/pages/ProfileEdit.vue +42 -8
  411. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +9 -11
  412. package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +9 -11
  413. package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +7 -4
  414. package/src/modules/auth/views/router/users.js +0 -4
  415. package/src/modules/community/components/pages/Posts.vue +444 -0
  416. package/src/modules/community/router/blogposts.js +15 -0
  417. package/src/modules/events/components/pages/EventsBackoffice.vue +1 -1
  418. package/src/modules/globals/views/classes/globals.websocket.js +7 -8
  419. package/src/modules/globals/views/components/blocks/Card.vue +2 -1
  420. package/src/modules/globals/views/components/layouts/Client.vue +1 -2
  421. package/src/modules/globals/views/components/partials/FooterAlt.vue +161 -188
  422. package/src/modules/globals/views/components/sections/Filters.vue +261 -121
  423. package/src/modules/globals/views/components/sections/filters/FilterCheckbox.vue +78 -0
  424. package/src/modules/globals/views/components/sections/filters/FilterDateRange.vue +177 -0
  425. package/src/modules/globals/views/components/sections/filters/FilterRange.vue +51 -50
  426. package/src/modules/icons/entities/IconLock.vue +14 -0
  427. package/src/modules/icons/icons.client.js +2 -1
  428. package/src/modules/icons/pages/IconsPage.vue +4 -2
  429. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +11 -61
  430. package/src/modules/landing/landing.client.js +6 -0
  431. package/src/modules/landing/locales/en.js +9 -0
  432. package/src/modules/landing/locales/index.js +7 -0
  433. package/src/modules/landing/locales/ru.js +9 -0
  434. package/src/modules/music/components/pages/Album.vue +1 -1
  435. package/src/modules/music/components/pages/Playlist.vue +1 -1
  436. package/src/modules/music/components/pages/Track.vue +1 -1
  437. package/src/modules/orders/components/blocks/CardApplication.vue +74 -0
  438. package/src/modules/orders/components/blocks/CardCustomer.vue +90 -0
  439. package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +199 -0
  440. package/src/modules/orders/components/forms/FormApplicationDetails.vue +117 -0
  441. package/src/modules/orders/components/forms/FormCustomerDetails.vue +165 -0
  442. package/src/modules/orders/components/forms/FormSelectCustomer.vue +172 -0
  443. package/src/modules/orders/components/pages/Applications.vue +240 -0
  444. package/src/modules/orders/components/pages/Customers.vue +239 -0
  445. package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
  446. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +5 -76
  447. package/src/modules/orders/components/sections/ApplicationDetails.vue +91 -0
  448. package/src/modules/orders/components/sections/CustomerDetails.vue +107 -0
  449. package/src/modules/orders/locales/en.js +35 -0
  450. package/src/modules/orders/locales/index.js +7 -0
  451. package/src/modules/orders/locales/ru.js +35 -0
  452. package/src/modules/orders/middlewares/applications.verifier.js +189 -0
  453. package/src/modules/orders/middlewares/customers.verifier.js +251 -0
  454. package/src/modules/orders/models/application.model.js +21 -0
  455. package/src/modules/orders/models/customer.model.js +26 -0
  456. package/src/modules/orders/orders.client.js +86 -1
  457. package/src/modules/orders/orders.server.js +3 -1
  458. package/src/modules/orders/router/applications.router.js +15 -0
  459. package/src/modules/orders/router/customers.router.js +17 -0
  460. package/src/modules/orders/routes/applications.routes.js +124 -12
  461. package/src/modules/orders/routes/customers.routes.js +43 -0
  462. package/src/modules/orders/store/applications.js +3 -159
  463. package/src/modules/orders/store/models/application.js +18 -0
  464. package/src/modules/orders/store/models/customer.js +12 -0
  465. package/src/modules/organizations/components/pages/Organization.new.vue +593 -0
  466. package/src/modules/organizations/components/pages/Organization.vue +11 -202
  467. package/src/modules/organizations/components/pages/Organizations.vue +1 -1
  468. package/src/modules/organizations/components/sections/DetailsTabSection.vue +2 -2
  469. package/src/modules/organizations/configs/navigation.organization.config.js +69 -85
  470. package/src/modules/organizations/router/organizations.js +5 -0
  471. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  472. package/src/modules/products/TASKS.MD +157 -0
  473. package/src/modules/products/components/blocks/CardCategory.vue +1 -1
  474. package/src/modules/products/components/blocks/ProductImages.vue +1 -1
  475. package/src/modules/products/components/pages/Categories.vue +27 -22
  476. package/src/modules/products/components/pages/CategoryEdit.vue +24 -13
  477. package/src/modules/products/components/pages/Products.vue +415 -174
  478. package/src/modules/products/components/sections/EditVariants.vue +14 -0
  479. package/src/modules/products/components/sections/ProductsRecommended.vue +46 -2
  480. package/src/modules/products/controllers/categories.controller.js +321 -282
  481. package/src/modules/products/controllers/configs/products.lookup.config.js +9 -0
  482. package/src/modules/products/controllers/products.controller.js +2 -1
  483. package/src/modules/products/controllers/queries/products.queries.js +183 -11
  484. package/src/modules/products/middlewares/categories.verifier.js +58 -15
  485. package/src/modules/products/middlewares/variants.verifier.js +12 -0
  486. package/src/modules/products/migrations/categories-to-materialized-path.js +433 -0
  487. package/src/modules/products/migrations/path-to-url.js +27 -0
  488. package/src/modules/products/models/category.model.js +8 -23
  489. package/src/modules/products/models/variant.model.js +3 -0
  490. package/src/modules/products/router/products.router.js +12 -0
  491. package/src/modules/products/store/categories.js +26 -7
  492. package/src/modules/rents/TASK.MD +161 -0
  493. package/src/modules/reports/components/sections/FormReport.vue +1 -1
  494. package/src/modules/spots/components/pages/Spots.vue +342 -0
  495. package/src/modules/spots/router/spots.js +15 -0
  496. package/src/styles/base/all.scss +2 -3
  497. package/src/styles/layout.scss +16 -0
  498. package/dist/main-DTaE01lg.cjs +0 -11
  499. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs +0 -96
  500. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs.map +0 -1
  501. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +0 -96
  502. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +0 -1
  503. package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +0 -1
  504. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
  505. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
  506. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockMultiselect.vue2.cjs.map +0 -1
  507. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +0 -155
  508. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +0 -1
  509. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +0 -155
  510. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +0 -1
  511. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +0 -81
  512. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs.map +0 -1
  513. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +0 -81
  514. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js.map +0 -1
  515. package/src/modules/orders/components/sections/FormAddCustomer.vue +0 -152
  516. package/src/modules/orders/components/sections/FormCustomerDetails.vue +0 -67
  517. package/src/modules/orders/controllers/applications.controller.js +0 -122
@@ -1,96 +1,14 @@
1
- import { C as Cache, L as Logger } from "./globals.logger-Bf6rRU7j.js";
1
+ import "node-cache";
2
2
  import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
3
- import { m as mailing } from "./mailing-C11EYWm-.js";
3
+ import "./mailing-DzlhsxCC.js";
4
4
  import { m as modelsFactory, a as applyProfileSchema } from "./profile.schema-BGAe5VN5.js";
5
- import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
6
5
  import { a as applyOwnershipSchema } from "./ownership.schema-BqH4v5vH.js";
7
- import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
6
+ import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
7
+ import { C as CRUD } from "./crud-sE7GLPbj.js";
8
+ import { A as ABAC } from "./abac-Cf_9lCSh.js";
8
9
  import axios from "axios";
9
- class CRUD {
10
- constructor(basePath, app, db, model, options) {
11
- this.model = model;
12
- this.cache = new Cache();
13
- this.logger = new Logger(db);
14
- this.app = app;
15
- this.basePath = basePath;
16
- if (!options || options && !options.disableDefaultRoutes) this.registerRoutes();
17
- }
18
- registerRoutes() {
19
- this.app.post(`${this.basePath}/create`, this.create.bind(this));
20
- this.app.get(`${this.basePath}/read`, this.read.bind(this));
21
- this.app.put(`${this.basePath}/update`, this.update.bind(this));
22
- this.app.delete(`${this.basePath}/delete`, this.delete.bind(this));
23
- }
24
- async create(req, res) {
25
- try {
26
- const createdData = await this.model.create(req.body);
27
- await this.cache.flush();
28
- res.status(201).json(createdData);
29
- } catch (error) {
30
- console.log(error);
31
- this.logger.error("Ошибка создания данных", error);
32
- res.status(500).json({ error: error.message });
33
- }
34
- }
35
- async read(req, res) {
36
- try {
37
- let stages = [];
38
- stages = [
39
- ...queryProcessorGlobals.getBasicOptions(req.query),
40
- // For creator
41
- queryProcessorGlobals.getCreatorUserLookupStage(),
42
- queryProcessorGlobals.getCreatorOrganizationLookupStage(),
43
- // For owner
44
- queryProcessorGlobals.getOwnerUserLookupStage(),
45
- queryProcessorGlobals.getOwnerOrganizationLookupStage(),
46
- queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
47
- // Pagination
48
- ...queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
49
- ...queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit),
50
- queryProcessorGlobals.removeTempPropeties()
51
- ];
52
- const cacheKey = JSON.stringify({ stages });
53
- let data = await this.cache.get(cacheKey);
54
- if (!data) {
55
- data = await this.model.aggregate(stages).exec();
56
- await this.cache.set(cacheKey, data);
57
- }
58
- res.json(data);
59
- } catch (error) {
60
- this.logger.error(error);
61
- res.status(500).json({ error: error.message });
62
- }
63
- }
64
- async update(req, res) {
65
- try {
66
- const updatedData = await this.model.findOneAndUpdate({ _id: req.body._id }, req.body, {
67
- new: true,
68
- runValidators: true
69
- });
70
- if (!updatedData) {
71
- throw new Error("Документ не найден.");
72
- }
73
- await this.cache.flush();
74
- res.json(updatedData);
75
- } catch (error) {
76
- this.logger.error("Ошибка обновления данных", error);
77
- res.status(404).json({ error: error.message });
78
- }
79
- }
80
- async delete(req, res) {
81
- try {
82
- const deletedData = await this.model.findOneAndDelete({ _id: req.body._id });
83
- if (!deletedData) {
84
- throw new Error("Документ не найден.");
85
- }
86
- await this.cache.flush();
87
- res.status(204).send();
88
- } catch (error) {
89
- this.logger.error("Ошибка удаления данных", error);
90
- res.status(404).json({ error: error.message });
91
- }
92
- }
93
- }
10
+ import { V as Verifier, a as Validator } from "./globals.verifier-DFqKQ7hK.js";
11
+ import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
94
12
  const controllerFactory = (db) => {
95
13
  const Order = db.order;
96
14
  const Customer = db.customer;
@@ -588,12 +506,29 @@ const ModelApplication = (db) => {
588
506
  email: {
589
507
  type: String
590
508
  }
509
+ },
510
+ text: {
511
+ type: String
512
+ },
513
+ chat: {
514
+ type: String
515
+ },
516
+ customer: {
517
+ type: {
518
+ type: String,
519
+ enum: ["Customer"]
520
+ },
521
+ target: {
522
+ type: db.mongoose.Schema.Types.ObjectId,
523
+ ref: "Customer"
524
+ }
591
525
  }
592
526
  },
593
527
  {
594
528
  timestamps: { currentTime: () => Date.now() }
595
529
  }
596
530
  );
531
+ applyOwnershipSchema(ApplicationSchema, db);
597
532
  const Application = db.mongoose.model("Application", ApplicationSchema);
598
533
  return Application;
599
534
  };
@@ -612,10 +547,34 @@ const ModelCustomer = (db) => {
612
547
  refPath: "target.type"
613
548
  }
614
549
  },
550
+ source: {
551
+ type: String,
552
+ enum: ["web", "mobile", "api", "import", "manual", "referral", "social", "email"],
553
+ default: "web"
554
+ },
615
555
  referral: {
616
556
  code: {
617
557
  type: String
558
+ },
559
+ source: {
560
+ type: db.mongoose.Schema.Types.ObjectId,
561
+ ref: "Customer"
618
562
  }
563
+ },
564
+ tags: [{
565
+ type: String
566
+ }],
567
+ notes: {
568
+ type: String
569
+ },
570
+ lastActivity: {
571
+ type: Date,
572
+ default: Date.now
573
+ },
574
+ status: {
575
+ type: String,
576
+ enum: ["active", "inactive", "blocked"],
577
+ default: "active"
619
578
  }
620
579
  },
621
580
  {
@@ -781,125 +740,229 @@ const ModelTestimonial = (db) => {
781
740
  const Testimonial = db.mongoose.model("Testimonial", testimonialSchema);
782
741
  return Testimonial;
783
742
  };
784
- const { sendChatMessageTelegram } = mailing;
785
- const middlewareFactory = (db) => {
786
- const Application = db.application;
787
- const read = async (req, res) => {
788
- try {
789
- const applications = await Application.find({});
790
- if (!applications) {
791
- return res.status(404).send({ message: "Applications not found." });
792
- }
793
- res.status(200).send(applications);
794
- } catch (err) {
795
- res.status(500).send({ message: err });
743
+ const verifierFactory$1 = function(db) {
744
+ const createVerifier = new Verifier({
745
+ "contacts.name": {
746
+ rule: "optional",
747
+ validator: Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
748
+ },
749
+ "contacts.email": {
750
+ rule: "optional",
751
+ validator: Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
752
+ },
753
+ "contacts.phone": {
754
+ rule: "optional",
755
+ validator: Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
756
+ },
757
+ type: {
758
+ rule: "optional",
759
+ default: "newsletter",
760
+ validator: Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
761
+ },
762
+ text: {
763
+ rule: "optional",
764
+ validator: Validator.schema().string().max(2e3, "Text must not exceed 2000 characters")
765
+ },
766
+ chat: {
767
+ rule: "optional",
768
+ validator: Validator.schema().string().max(255, "Chat ID must not exceed 255 characters")
769
+ },
770
+ status: {
771
+ rule: "optional",
772
+ default: "created",
773
+ validator: Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
774
+ },
775
+ owner: {
776
+ rule: "optional",
777
+ validator: Validator.schema().object({
778
+ type: Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
779
+ target: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
780
+ })
796
781
  }
797
- };
798
- const create = async (req, res) => {
799
- try {
800
- const application = await Application.create(req.body);
801
- if (!application) {
802
- return res.status(404).send({ message: "Something wrong when creating application." });
803
- }
804
- try {
805
- const messageSent = await sendChatMessageTelegram(process.env.TELEGRAM_BOT_USERS.split(","), `New application from ${req.body}`);
806
- } catch (err) {
807
- console.log(err);
808
- }
809
- res.status(200).send(application);
810
- } catch (err) {
811
- res.status(500).send({ message: err });
782
+ });
783
+ const updateVerifier = new Verifier({
784
+ _id: {
785
+ rule: "required",
786
+ validator: Validator.schema().string().required("Application ID is required").pattern(/^[0-9a-fA-F]{24}$/, "Invalid ID format")
787
+ },
788
+ "contacts.name": {
789
+ rule: "optional",
790
+ validator: Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
791
+ },
792
+ "contacts.email": {
793
+ rule: "optional",
794
+ validator: Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
795
+ },
796
+ "contacts.phone": {
797
+ rule: "optional",
798
+ validator: Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
799
+ },
800
+ type: {
801
+ rule: "optional",
802
+ validator: Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
803
+ },
804
+ text: {
805
+ rule: "optional",
806
+ validator: Validator.schema().string().max(2e3, "Text must not exceed 2000 characters")
807
+ },
808
+ chat: {
809
+ rule: "optional",
810
+ validator: Validator.schema().string().max(255, "Chat ID must not exceed 255 characters")
811
+ },
812
+ status: {
813
+ rule: "optional",
814
+ validator: Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
812
815
  }
813
- };
814
- const update = async (req, res) => {
815
- try {
816
- const application = await Application.findOneAndUpdate({ _id: req.params._id }, req.body, {
817
- new: true
818
- });
819
- if (!application) {
820
- return res.status(404).send({ message: "Application not found." });
821
- }
822
- res.status(200).send(application);
823
- } catch (err) {
824
- res.status(500).send({ message: err });
816
+ });
817
+ const readVerifier = new Verifier({
818
+ _id: {
819
+ rule: "optional",
820
+ validator: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
821
+ },
822
+ owner: {
823
+ rule: "optional",
824
+ validator: Validator.schema().string()
825
+ },
826
+ status: {
827
+ rule: "optional",
828
+ validator: Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
829
+ },
830
+ type: {
831
+ rule: "optional",
832
+ validator: Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
833
+ },
834
+ skip: {
835
+ rule: "optional",
836
+ default: 0,
837
+ validator: Validator.schema().integer().min(0)
838
+ },
839
+ limit: {
840
+ rule: "optional",
841
+ default: 20,
842
+ validator: Validator.schema().integer().min(1).max(100)
843
+ },
844
+ sortParam: {
845
+ rule: "optional",
846
+ validator: Validator.schema().string().oneOf(["contacts.name", "contacts.email", "type", "status", "createdAt", "updatedAt"])
847
+ },
848
+ sortOrder: {
849
+ rule: "optional",
850
+ default: "desc",
851
+ validator: Validator.schema().string().oneOf(["asc", "desc"])
825
852
  }
826
- };
827
- const deleteMethod = async (req, res) => {
828
- try {
829
- const application = await Application.findOneAndDelete({ _id: req.params._id });
830
- if (!application) {
831
- return res.status(404).send({ message: "Something wrong when deleting application." });
832
- }
833
- res.status(200).send(application);
834
- } catch (err) {
835
- res.status(500).send({ message: err });
853
+ });
854
+ const deleteVerifier = new Verifier({
855
+ _id: {
856
+ rule: "required",
857
+ validator: Validator.schema().string().required("Application ID is required").pattern(/^[0-9a-fA-F]{24}$/)
836
858
  }
859
+ });
860
+ return {
861
+ createVerifier,
862
+ readVerifier,
863
+ updateVerifier,
864
+ deleteVerifier
837
865
  };
838
- const get = async (req, res) => {
839
- try {
840
- const application = await Application.findOne({ url: req.params.url });
841
- if (!application) {
842
- return res.status(404).send({ message: "Application not found." });
866
+ };
867
+ const { getInstance: getInstance$1 } = ABAC;
868
+ function setupApplicationsRoutes(app, db) {
869
+ const abac = getInstance$1(db);
870
+ const verifier = verifierFactory$1();
871
+ const applicationsCRUD = new CRUD({
872
+ app,
873
+ db,
874
+ model: db.application,
875
+ modelName: "application",
876
+ basePath: "/api/applications",
877
+ auth: true,
878
+ verifiers: {
879
+ create: verifier.createVerifier,
880
+ read: verifier.readVerifier,
881
+ update: verifier.updateVerifier,
882
+ delete: verifier.deleteVerifier
883
+ },
884
+ abac,
885
+ cache: {
886
+ enabled: true,
887
+ ttl: 300,
888
+ tags: ["application", "orders"]
889
+ },
890
+ events: {
891
+ enabled: true,
892
+ logReads: false
893
+ }
894
+ });
895
+ applicationsCRUD.addAction("telegram-webhook", {
896
+ method: "post",
897
+ path: "/telegram-webhook",
898
+ auth: false,
899
+ abac: { enabled: false },
900
+ handler: async (req, res) => {
901
+ const update = req.body;
902
+ if (update.callback_query) {
903
+ const callbackQuery = update.callback_query;
904
+ const callbackData = callbackQuery.data;
905
+ const [action, applicationId] = callbackData.split("_");
906
+ try {
907
+ let updatedApplication = null;
908
+ switch (action) {
909
+ case "confirm":
910
+ updatedApplication = await db.application.findOneAndUpdate({ _id: applicationId }, { status: "confirmed" }, { new: true });
911
+ break;
912
+ case "lost":
913
+ updatedApplication = await db.application.findOneAndUpdate({ _id: applicationId }, { status: "lost" }, { new: true });
914
+ break;
915
+ case "delete":
916
+ updatedApplication = await db.application.findOneAndDelete({ _id: applicationId });
917
+ break;
918
+ }
919
+ if (!updatedApplication) {
920
+ console.log("Application not found or not updated.");
921
+ } else {
922
+ console.log("Application updated:", updatedApplication);
923
+ }
924
+ } catch (err) {
925
+ console.log("Error updating application:", err);
926
+ }
927
+ const queryId = callbackQuery.id;
928
+ const telegramToken = "6206215053:AAHYCYzpFZF9jDZC-TC03NSff8oo2ExqsSU";
929
+ axios.post(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
930
+ callback_query_id: queryId
931
+ });
843
932
  }
844
- res.status(200).send(application);
845
- } catch (err) {
846
- res.status(500).send({ message: err });
933
+ res.sendStatus(200);
847
934
  }
848
- };
849
- const handleTelegramWebhook = async (req, res) => {
850
- const update2 = req.body;
851
- if (update2.callback_query) {
852
- const callbackQuery = update2.callback_query;
853
- const callbackData = callbackQuery.data;
854
- const [action, applicationId] = callbackData.split("_");
935
+ });
936
+ applicationsCRUD.addAction("public-create", {
937
+ method: "post",
938
+ path: "/public",
939
+ auth: false,
940
+ abac: { enabled: false },
941
+ handler: async (req, res) => {
855
942
  try {
856
- let updatedApplication = null;
857
- switch (action) {
858
- case "confirm":
859
- updatedApplication = await Application.findOneAndUpdate({ _id: applicationId }, { status: "confirmed" }, { new: true });
860
- break;
861
- case "lost":
862
- updatedApplication = await Application.findOneAndUpdate({ _id: applicationId }, { status: "lost" }, { new: true });
863
- break;
864
- case "delete":
865
- updatedApplication = await Application.findOneAndDelete({ _id: applicationId });
866
- break;
867
- }
868
- if (!updatedApplication) {
869
- console.log("Application not found or not updated.");
870
- } else {
871
- console.log("Application updated:", updatedApplication);
872
- }
873
- } catch (err) {
874
- console.log("Error updating application:", err);
943
+ const applicationData = {
944
+ ...req.body,
945
+ owner: {
946
+ type: "platform",
947
+ target: "000000000000000000000000"
948
+ // заглушка для отдела платформы
949
+ },
950
+ creator: {
951
+ type: "platform",
952
+ target: "000000000000000000000000"
953
+ }
954
+ };
955
+ const application = new db.application(applicationData);
956
+ const saved = await application.save();
957
+ res.status(201).json(saved);
958
+ } catch (error) {
959
+ console.error("Error creating public application:", error);
960
+ res.status(500).json({ error: error.message });
875
961
  }
876
- const queryId = callbackQuery.id;
877
- const telegramToken = "6206215053:AAHYCYzpFZF9jDZC-TC03NSff8oo2ExqsSU";
878
- axios.post(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
879
- callback_query_id: queryId
880
- });
881
962
  }
882
- res.sendStatus(200);
883
- };
884
- return {
885
- read,
886
- create,
887
- update,
888
- delete: deleteMethod,
889
- handleTelegramWebhook,
890
- get
891
- };
892
- };
893
- const RoutesApplications = function(app, db, origins) {
894
- const controller = middlewareFactory(db);
895
- middlewareIndexFactory(db);
896
- app.post("/applications", controller.create);
897
- app.get("/applications", controller.read);
898
- app.post("/applications/:_id", controller.update);
899
- app.delete("/applications/:_id", controller.delete);
900
- app.get("/applications/:_id", controller.get);
901
- app.post("/applications/telegram-webhook", controller.handleTelegramWebhook);
902
- };
963
+ });
964
+ return applicationsCRUD;
965
+ }
903
966
  const RoutesOrder = function(app, db, origins, publicPath) {
904
967
  const controller = controllerFactory(db);
905
968
  const middleware = middlewareIndexFactory(db);
@@ -932,6 +995,200 @@ const RoutesOrder = function(app, db, origins, publicPath) {
932
995
  controller.deleteOrder
933
996
  );
934
997
  };
998
+ const verifierFactory = function(db) {
999
+ const createVerifier = new Verifier({
1000
+ email: {
1001
+ rule: "optional",
1002
+ validator: Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
1003
+ },
1004
+ phone: {
1005
+ rule: "optional",
1006
+ validator: Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
1007
+ },
1008
+ "profile.name": {
1009
+ rule: "optional",
1010
+ validator: Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
1011
+ },
1012
+ "profile.description": {
1013
+ rule: "optional",
1014
+ validator: Validator.schema().string().max(1e3, "Description must not exceed 1000 characters")
1015
+ },
1016
+ "profile.photo": {
1017
+ rule: "optional",
1018
+ validator: Validator.schema().string().max(500, "Photo URL must not exceed 500 characters")
1019
+ },
1020
+ source: {
1021
+ rule: "optional",
1022
+ default: "web",
1023
+ validator: Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1024
+ },
1025
+ "referral.code": {
1026
+ rule: "optional",
1027
+ validator: Validator.schema().string().max(50, "Referral code must not exceed 50 characters")
1028
+ },
1029
+ "referral.source": {
1030
+ rule: "optional",
1031
+ validator: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid referral source ID format")
1032
+ },
1033
+ tags: {
1034
+ rule: "optional",
1035
+ validator: Validator.schema().array().items(Validator.schema().string().max(50)).max(20, "Cannot have more than 20 tags")
1036
+ },
1037
+ notes: {
1038
+ rule: "optional",
1039
+ validator: Validator.schema().string().max(2e3, "Notes must not exceed 2000 characters")
1040
+ },
1041
+ status: {
1042
+ rule: "optional",
1043
+ default: "active",
1044
+ validator: Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1045
+ },
1046
+ "identity.type": {
1047
+ rule: "required",
1048
+ validator: Validator.schema().string().oneOf(["Visitor", "User", "Organization"])
1049
+ },
1050
+ "identity.target": {
1051
+ rule: "optional",
1052
+ validator: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid identity target ID format")
1053
+ },
1054
+ owner: {
1055
+ rule: "required",
1056
+ validator: Validator.schema().object({
1057
+ type: Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
1058
+ target: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1059
+ })
1060
+ }
1061
+ });
1062
+ const updateVerifier = new Verifier({
1063
+ _id: {
1064
+ rule: "required",
1065
+ validator: Validator.schema().string().required("Customer ID is required").pattern(/^[0-9a-fA-F]{24}$/, "Invalid ID format")
1066
+ },
1067
+ email: {
1068
+ rule: "optional",
1069
+ validator: Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
1070
+ },
1071
+ phone: {
1072
+ rule: "optional",
1073
+ validator: Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
1074
+ },
1075
+ "profile.name": {
1076
+ rule: "optional",
1077
+ validator: Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
1078
+ },
1079
+ "profile.description": {
1080
+ rule: "optional",
1081
+ validator: Validator.schema().string().max(1e3, "Description must not exceed 1000 characters")
1082
+ },
1083
+ "profile.photo": {
1084
+ rule: "optional",
1085
+ validator: Validator.schema().string().max(500, "Photo URL must not exceed 500 characters")
1086
+ },
1087
+ source: {
1088
+ rule: "optional",
1089
+ validator: Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1090
+ },
1091
+ "referral.code": {
1092
+ rule: "optional",
1093
+ validator: Validator.schema().string().max(50, "Referral code must not exceed 50 characters")
1094
+ },
1095
+ "referral.source": {
1096
+ rule: "optional",
1097
+ validator: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid referral source ID format")
1098
+ },
1099
+ tags: {
1100
+ rule: "optional",
1101
+ validator: Validator.schema().array().items(Validator.schema().string().max(50)).max(20, "Cannot have more than 20 tags")
1102
+ },
1103
+ notes: {
1104
+ rule: "optional",
1105
+ validator: Validator.schema().string().max(2e3, "Notes must not exceed 2000 characters")
1106
+ },
1107
+ status: {
1108
+ rule: "optional",
1109
+ validator: Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1110
+ }
1111
+ });
1112
+ const readVerifier = new Verifier({
1113
+ _id: {
1114
+ rule: "optional",
1115
+ validator: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1116
+ },
1117
+ owner: {
1118
+ rule: "optional",
1119
+ validator: Validator.schema().string()
1120
+ },
1121
+ status: {
1122
+ rule: "optional",
1123
+ validator: Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1124
+ },
1125
+ source: {
1126
+ rule: "optional",
1127
+ validator: Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1128
+ },
1129
+ skip: {
1130
+ rule: "optional",
1131
+ default: 0,
1132
+ validator: Validator.schema().integer().min(0)
1133
+ },
1134
+ limit: {
1135
+ rule: "optional",
1136
+ default: 20,
1137
+ validator: Validator.schema().integer().min(1).max(100)
1138
+ },
1139
+ sortParam: {
1140
+ rule: "optional",
1141
+ validator: Validator.schema().string().oneOf(["profile.name", "email", "phone", "lastActivity", "createdAt", "updatedAt"])
1142
+ },
1143
+ sortOrder: {
1144
+ rule: "optional",
1145
+ default: "desc",
1146
+ validator: Validator.schema().string().oneOf(["asc", "desc"])
1147
+ }
1148
+ });
1149
+ const deleteVerifier = new Verifier({
1150
+ _id: {
1151
+ rule: "required",
1152
+ validator: Validator.schema().string().required("Customer ID is required").pattern(/^[0-9a-fA-F]{24}$/)
1153
+ }
1154
+ });
1155
+ return {
1156
+ createVerifier,
1157
+ readVerifier,
1158
+ updateVerifier,
1159
+ deleteVerifier
1160
+ };
1161
+ };
1162
+ const { getInstance } = ABAC;
1163
+ function setupCustomersRoutes(app, db) {
1164
+ const abac = getInstance(db);
1165
+ const verifier = verifierFactory();
1166
+ const customersCRUD = new CRUD({
1167
+ app,
1168
+ db,
1169
+ model: db.customer,
1170
+ modelName: "customer",
1171
+ basePath: "/api/customers",
1172
+ auth: true,
1173
+ verifiers: {
1174
+ create: verifier.createVerifier,
1175
+ read: verifier.readVerifier,
1176
+ update: verifier.updateVerifier,
1177
+ delete: verifier.deleteVerifier
1178
+ },
1179
+ abac,
1180
+ cache: {
1181
+ enabled: true,
1182
+ ttl: 300,
1183
+ tags: ["customer", "orders"]
1184
+ },
1185
+ events: {
1186
+ enabled: true,
1187
+ logReads: false
1188
+ }
1189
+ });
1190
+ return customersCRUD;
1191
+ }
935
1192
  function initializeOrders(app, db, origins, publicPath) {
936
1193
  db.order = ModelOrder(db);
937
1194
  db.customer = ModelCustomer(db);
@@ -939,8 +1196,8 @@ function initializeOrders(app, db, origins, publicPath) {
939
1196
  db.application = ModelApplication(db);
940
1197
  if (app) {
941
1198
  RoutesOrder(app, db);
942
- RoutesApplications(app, db);
943
- new CRUD("/api/customers", app, db, db.customer);
1199
+ setupApplicationsRoutes(app, db);
1200
+ setupCustomersRoutes(app, db);
944
1201
  }
945
1202
  }
946
1203
  const models = {
@@ -948,7 +1205,8 @@ const models = {
948
1205
  ModelCustomer
949
1206
  };
950
1207
  const routes = {
951
- RoutesOrder
1208
+ RoutesOrder,
1209
+ RoutesCustomers: setupCustomersRoutes
952
1210
  };
953
1211
  const controllers = {
954
1212
  FactoryOrder: controllerFactory