@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,98 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const globals_logger = require("./globals.logger-CZMgIMlM.cjs");
3
+ require("node-cache");
4
4
  const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
5
- const mailing = require("./mailing-q7sR8gCV.cjs");
5
+ require("./mailing-Bs9ThyVZ.cjs");
6
6
  const profile_schema = require("./profile.schema-pidHrksV.cjs");
7
- const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
8
7
  const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
9
- const index = require("./index-BFxqqmgh.cjs");
8
+ const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
9
+ const crud = require("./crud-JN_LFj01.cjs");
10
+ const abac = require("./abac-6LjoG9u-.cjs");
10
11
  const axios = require("axios");
11
- class CRUD {
12
- constructor(basePath, app, db, model, options) {
13
- this.model = model;
14
- this.cache = new globals_logger.Cache();
15
- this.logger = new globals_logger.Logger(db);
16
- this.app = app;
17
- this.basePath = basePath;
18
- if (!options || options && !options.disableDefaultRoutes) this.registerRoutes();
19
- }
20
- registerRoutes() {
21
- this.app.post(`${this.basePath}/create`, this.create.bind(this));
22
- this.app.get(`${this.basePath}/read`, this.read.bind(this));
23
- this.app.put(`${this.basePath}/update`, this.update.bind(this));
24
- this.app.delete(`${this.basePath}/delete`, this.delete.bind(this));
25
- }
26
- async create(req, res) {
27
- try {
28
- const createdData = await this.model.create(req.body);
29
- await this.cache.flush();
30
- res.status(201).json(createdData);
31
- } catch (error) {
32
- console.log(error);
33
- this.logger.error("Ошибка создания данных", error);
34
- res.status(500).json({ error: error.message });
35
- }
36
- }
37
- async read(req, res) {
38
- try {
39
- let stages = [];
40
- stages = [
41
- ...queryProcessor.queryProcessorGlobals.getBasicOptions(req.query),
42
- // For creator
43
- queryProcessor.queryProcessorGlobals.getCreatorUserLookupStage(),
44
- queryProcessor.queryProcessorGlobals.getCreatorOrganizationLookupStage(),
45
- // For owner
46
- queryProcessor.queryProcessorGlobals.getOwnerUserLookupStage(),
47
- queryProcessor.queryProcessorGlobals.getOwnerOrganizationLookupStage(),
48
- queryProcessor.queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
49
- // Pagination
50
- ...queryProcessor.queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
51
- ...queryProcessor.queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit),
52
- queryProcessor.queryProcessorGlobals.removeTempPropeties()
53
- ];
54
- const cacheKey = JSON.stringify({ stages });
55
- let data = await this.cache.get(cacheKey);
56
- if (!data) {
57
- data = await this.model.aggregate(stages).exec();
58
- await this.cache.set(cacheKey, data);
59
- }
60
- res.json(data);
61
- } catch (error) {
62
- this.logger.error(error);
63
- res.status(500).json({ error: error.message });
64
- }
65
- }
66
- async update(req, res) {
67
- try {
68
- const updatedData = await this.model.findOneAndUpdate({ _id: req.body._id }, req.body, {
69
- new: true,
70
- runValidators: true
71
- });
72
- if (!updatedData) {
73
- throw new Error("Документ не найден.");
74
- }
75
- await this.cache.flush();
76
- res.json(updatedData);
77
- } catch (error) {
78
- this.logger.error("Ошибка обновления данных", error);
79
- res.status(404).json({ error: error.message });
80
- }
81
- }
82
- async delete(req, res) {
83
- try {
84
- const deletedData = await this.model.findOneAndDelete({ _id: req.body._id });
85
- if (!deletedData) {
86
- throw new Error("Документ не найден.");
87
- }
88
- await this.cache.flush();
89
- res.status(204).send();
90
- } catch (error) {
91
- this.logger.error("Ошибка удаления данных", error);
92
- res.status(404).json({ error: error.message });
93
- }
94
- }
95
- }
12
+ const globals_verifier = require("./globals.verifier-C0zj_LLo.cjs");
13
+ const index = require("./index-BFxqqmgh.cjs");
96
14
  const controllerFactory = (db) => {
97
15
  const Order = db.order;
98
16
  const Customer = db.customer;
@@ -590,12 +508,29 @@ const ModelApplication = (db) => {
590
508
  email: {
591
509
  type: String
592
510
  }
511
+ },
512
+ text: {
513
+ type: String
514
+ },
515
+ chat: {
516
+ type: String
517
+ },
518
+ customer: {
519
+ type: {
520
+ type: String,
521
+ enum: ["Customer"]
522
+ },
523
+ target: {
524
+ type: db.mongoose.Schema.Types.ObjectId,
525
+ ref: "Customer"
526
+ }
593
527
  }
594
528
  },
595
529
  {
596
530
  timestamps: { currentTime: () => Date.now() }
597
531
  }
598
532
  );
533
+ ownership_schema.applyOwnershipSchema(ApplicationSchema, db);
599
534
  const Application = db.mongoose.model("Application", ApplicationSchema);
600
535
  return Application;
601
536
  };
@@ -614,10 +549,34 @@ const ModelCustomer = (db) => {
614
549
  refPath: "target.type"
615
550
  }
616
551
  },
552
+ source: {
553
+ type: String,
554
+ enum: ["web", "mobile", "api", "import", "manual", "referral", "social", "email"],
555
+ default: "web"
556
+ },
617
557
  referral: {
618
558
  code: {
619
559
  type: String
560
+ },
561
+ source: {
562
+ type: db.mongoose.Schema.Types.ObjectId,
563
+ ref: "Customer"
620
564
  }
565
+ },
566
+ tags: [{
567
+ type: String
568
+ }],
569
+ notes: {
570
+ type: String
571
+ },
572
+ lastActivity: {
573
+ type: Date,
574
+ default: Date.now
575
+ },
576
+ status: {
577
+ type: String,
578
+ enum: ["active", "inactive", "blocked"],
579
+ default: "active"
621
580
  }
622
581
  },
623
582
  {
@@ -783,125 +742,229 @@ const ModelTestimonial = (db) => {
783
742
  const Testimonial = db.mongoose.model("Testimonial", testimonialSchema);
784
743
  return Testimonial;
785
744
  };
786
- const { sendChatMessageTelegram } = mailing.mailing;
787
- const middlewareFactory = (db) => {
788
- const Application = db.application;
789
- const read = async (req, res) => {
790
- try {
791
- const applications = await Application.find({});
792
- if (!applications) {
793
- return res.status(404).send({ message: "Applications not found." });
794
- }
795
- res.status(200).send(applications);
796
- } catch (err) {
797
- res.status(500).send({ message: err });
745
+ const verifierFactory$1 = function(db) {
746
+ const createVerifier = new globals_verifier.Verifier({
747
+ "contacts.name": {
748
+ rule: "optional",
749
+ validator: globals_verifier.Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
750
+ },
751
+ "contacts.email": {
752
+ rule: "optional",
753
+ validator: globals_verifier.Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
754
+ },
755
+ "contacts.phone": {
756
+ rule: "optional",
757
+ validator: globals_verifier.Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
758
+ },
759
+ type: {
760
+ rule: "optional",
761
+ default: "newsletter",
762
+ validator: globals_verifier.Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
763
+ },
764
+ text: {
765
+ rule: "optional",
766
+ validator: globals_verifier.Validator.schema().string().max(2e3, "Text must not exceed 2000 characters")
767
+ },
768
+ chat: {
769
+ rule: "optional",
770
+ validator: globals_verifier.Validator.schema().string().max(255, "Chat ID must not exceed 255 characters")
771
+ },
772
+ status: {
773
+ rule: "optional",
774
+ default: "created",
775
+ validator: globals_verifier.Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
776
+ },
777
+ owner: {
778
+ rule: "optional",
779
+ validator: globals_verifier.Validator.schema().object({
780
+ type: globals_verifier.Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
781
+ target: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
782
+ })
798
783
  }
799
- };
800
- const create = async (req, res) => {
801
- try {
802
- const application = await Application.create(req.body);
803
- if (!application) {
804
- return res.status(404).send({ message: "Something wrong when creating application." });
805
- }
806
- try {
807
- const messageSent = await sendChatMessageTelegram(process.env.TELEGRAM_BOT_USERS.split(","), `New application from ${req.body}`);
808
- } catch (err) {
809
- console.log(err);
810
- }
811
- res.status(200).send(application);
812
- } catch (err) {
813
- res.status(500).send({ message: err });
784
+ });
785
+ const updateVerifier = new globals_verifier.Verifier({
786
+ _id: {
787
+ rule: "required",
788
+ validator: globals_verifier.Validator.schema().string().required("Application ID is required").pattern(/^[0-9a-fA-F]{24}$/, "Invalid ID format")
789
+ },
790
+ "contacts.name": {
791
+ rule: "optional",
792
+ validator: globals_verifier.Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
793
+ },
794
+ "contacts.email": {
795
+ rule: "optional",
796
+ validator: globals_verifier.Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
797
+ },
798
+ "contacts.phone": {
799
+ rule: "optional",
800
+ validator: globals_verifier.Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
801
+ },
802
+ type: {
803
+ rule: "optional",
804
+ validator: globals_verifier.Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
805
+ },
806
+ text: {
807
+ rule: "optional",
808
+ validator: globals_verifier.Validator.schema().string().max(2e3, "Text must not exceed 2000 characters")
809
+ },
810
+ chat: {
811
+ rule: "optional",
812
+ validator: globals_verifier.Validator.schema().string().max(255, "Chat ID must not exceed 255 characters")
813
+ },
814
+ status: {
815
+ rule: "optional",
816
+ validator: globals_verifier.Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
814
817
  }
815
- };
816
- const update = async (req, res) => {
817
- try {
818
- const application = await Application.findOneAndUpdate({ _id: req.params._id }, req.body, {
819
- new: true
820
- });
821
- if (!application) {
822
- return res.status(404).send({ message: "Application not found." });
823
- }
824
- res.status(200).send(application);
825
- } catch (err) {
826
- res.status(500).send({ message: err });
818
+ });
819
+ const readVerifier = new globals_verifier.Verifier({
820
+ _id: {
821
+ rule: "optional",
822
+ validator: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
823
+ },
824
+ owner: {
825
+ rule: "optional",
826
+ validator: globals_verifier.Validator.schema().string()
827
+ },
828
+ status: {
829
+ rule: "optional",
830
+ validator: globals_verifier.Validator.schema().string().oneOf(["created", "in_progress", "completed", "cancelled"])
831
+ },
832
+ type: {
833
+ rule: "optional",
834
+ validator: globals_verifier.Validator.schema().string().oneOf(["newsletter", "support", "inquiry", "feedback", "other"])
835
+ },
836
+ skip: {
837
+ rule: "optional",
838
+ default: 0,
839
+ validator: globals_verifier.Validator.schema().integer().min(0)
840
+ },
841
+ limit: {
842
+ rule: "optional",
843
+ default: 20,
844
+ validator: globals_verifier.Validator.schema().integer().min(1).max(100)
845
+ },
846
+ sortParam: {
847
+ rule: "optional",
848
+ validator: globals_verifier.Validator.schema().string().oneOf(["contacts.name", "contacts.email", "type", "status", "createdAt", "updatedAt"])
849
+ },
850
+ sortOrder: {
851
+ rule: "optional",
852
+ default: "desc",
853
+ validator: globals_verifier.Validator.schema().string().oneOf(["asc", "desc"])
827
854
  }
828
- };
829
- const deleteMethod = async (req, res) => {
830
- try {
831
- const application = await Application.findOneAndDelete({ _id: req.params._id });
832
- if (!application) {
833
- return res.status(404).send({ message: "Something wrong when deleting application." });
834
- }
835
- res.status(200).send(application);
836
- } catch (err) {
837
- res.status(500).send({ message: err });
855
+ });
856
+ const deleteVerifier = new globals_verifier.Verifier({
857
+ _id: {
858
+ rule: "required",
859
+ validator: globals_verifier.Validator.schema().string().required("Application ID is required").pattern(/^[0-9a-fA-F]{24}$/)
838
860
  }
861
+ });
862
+ return {
863
+ createVerifier,
864
+ readVerifier,
865
+ updateVerifier,
866
+ deleteVerifier
839
867
  };
840
- const get = async (req, res) => {
841
- try {
842
- const application = await Application.findOne({ url: req.params.url });
843
- if (!application) {
844
- return res.status(404).send({ message: "Application not found." });
868
+ };
869
+ const { getInstance: getInstance$1 } = abac.ABAC;
870
+ function setupApplicationsRoutes(app, db) {
871
+ const abac2 = getInstance$1(db);
872
+ const verifier = verifierFactory$1();
873
+ const applicationsCRUD = new crud.CRUD({
874
+ app,
875
+ db,
876
+ model: db.application,
877
+ modelName: "application",
878
+ basePath: "/api/applications",
879
+ auth: true,
880
+ verifiers: {
881
+ create: verifier.createVerifier,
882
+ read: verifier.readVerifier,
883
+ update: verifier.updateVerifier,
884
+ delete: verifier.deleteVerifier
885
+ },
886
+ abac: abac2,
887
+ cache: {
888
+ enabled: true,
889
+ ttl: 300,
890
+ tags: ["application", "orders"]
891
+ },
892
+ events: {
893
+ enabled: true,
894
+ logReads: false
895
+ }
896
+ });
897
+ applicationsCRUD.addAction("telegram-webhook", {
898
+ method: "post",
899
+ path: "/telegram-webhook",
900
+ auth: false,
901
+ abac: { enabled: false },
902
+ handler: async (req, res) => {
903
+ const update = req.body;
904
+ if (update.callback_query) {
905
+ const callbackQuery = update.callback_query;
906
+ const callbackData = callbackQuery.data;
907
+ const [action, applicationId] = callbackData.split("_");
908
+ try {
909
+ let updatedApplication = null;
910
+ switch (action) {
911
+ case "confirm":
912
+ updatedApplication = await db.application.findOneAndUpdate({ _id: applicationId }, { status: "confirmed" }, { new: true });
913
+ break;
914
+ case "lost":
915
+ updatedApplication = await db.application.findOneAndUpdate({ _id: applicationId }, { status: "lost" }, { new: true });
916
+ break;
917
+ case "delete":
918
+ updatedApplication = await db.application.findOneAndDelete({ _id: applicationId });
919
+ break;
920
+ }
921
+ if (!updatedApplication) {
922
+ console.log("Application not found or not updated.");
923
+ } else {
924
+ console.log("Application updated:", updatedApplication);
925
+ }
926
+ } catch (err) {
927
+ console.log("Error updating application:", err);
928
+ }
929
+ const queryId = callbackQuery.id;
930
+ const telegramToken = "6206215053:AAHYCYzpFZF9jDZC-TC03NSff8oo2ExqsSU";
931
+ axios.post(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
932
+ callback_query_id: queryId
933
+ });
845
934
  }
846
- res.status(200).send(application);
847
- } catch (err) {
848
- res.status(500).send({ message: err });
935
+ res.sendStatus(200);
849
936
  }
850
- };
851
- const handleTelegramWebhook = async (req, res) => {
852
- const update2 = req.body;
853
- if (update2.callback_query) {
854
- const callbackQuery = update2.callback_query;
855
- const callbackData = callbackQuery.data;
856
- const [action, applicationId] = callbackData.split("_");
937
+ });
938
+ applicationsCRUD.addAction("public-create", {
939
+ method: "post",
940
+ path: "/public",
941
+ auth: false,
942
+ abac: { enabled: false },
943
+ handler: async (req, res) => {
857
944
  try {
858
- let updatedApplication = null;
859
- switch (action) {
860
- case "confirm":
861
- updatedApplication = await Application.findOneAndUpdate({ _id: applicationId }, { status: "confirmed" }, { new: true });
862
- break;
863
- case "lost":
864
- updatedApplication = await Application.findOneAndUpdate({ _id: applicationId }, { status: "lost" }, { new: true });
865
- break;
866
- case "delete":
867
- updatedApplication = await Application.findOneAndDelete({ _id: applicationId });
868
- break;
869
- }
870
- if (!updatedApplication) {
871
- console.log("Application not found or not updated.");
872
- } else {
873
- console.log("Application updated:", updatedApplication);
874
- }
875
- } catch (err) {
876
- console.log("Error updating application:", err);
945
+ const applicationData = {
946
+ ...req.body,
947
+ owner: {
948
+ type: "platform",
949
+ target: "000000000000000000000000"
950
+ // заглушка для отдела платформы
951
+ },
952
+ creator: {
953
+ type: "platform",
954
+ target: "000000000000000000000000"
955
+ }
956
+ };
957
+ const application = new db.application(applicationData);
958
+ const saved = await application.save();
959
+ res.status(201).json(saved);
960
+ } catch (error) {
961
+ console.error("Error creating public application:", error);
962
+ res.status(500).json({ error: error.message });
877
963
  }
878
- const queryId = callbackQuery.id;
879
- const telegramToken = "6206215053:AAHYCYzpFZF9jDZC-TC03NSff8oo2ExqsSU";
880
- axios.post(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
881
- callback_query_id: queryId
882
- });
883
964
  }
884
- res.sendStatus(200);
885
- };
886
- return {
887
- read,
888
- create,
889
- update,
890
- delete: deleteMethod,
891
- handleTelegramWebhook,
892
- get
893
- };
894
- };
895
- const RoutesApplications = function(app, db, origins) {
896
- const controller = middlewareFactory(db);
897
- index.middlewareIndexFactory(db);
898
- app.post("/applications", controller.create);
899
- app.get("/applications", controller.read);
900
- app.post("/applications/:_id", controller.update);
901
- app.delete("/applications/:_id", controller.delete);
902
- app.get("/applications/:_id", controller.get);
903
- app.post("/applications/telegram-webhook", controller.handleTelegramWebhook);
904
- };
965
+ });
966
+ return applicationsCRUD;
967
+ }
905
968
  const RoutesOrder = function(app, db, origins, publicPath) {
906
969
  const controller = controllerFactory(db);
907
970
  const middleware = index.middlewareIndexFactory(db);
@@ -934,6 +997,200 @@ const RoutesOrder = function(app, db, origins, publicPath) {
934
997
  controller.deleteOrder
935
998
  );
936
999
  };
1000
+ const verifierFactory = function(db) {
1001
+ const createVerifier = new globals_verifier.Verifier({
1002
+ email: {
1003
+ rule: "optional",
1004
+ validator: globals_verifier.Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
1005
+ },
1006
+ phone: {
1007
+ rule: "optional",
1008
+ validator: globals_verifier.Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
1009
+ },
1010
+ "profile.name": {
1011
+ rule: "optional",
1012
+ validator: globals_verifier.Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
1013
+ },
1014
+ "profile.description": {
1015
+ rule: "optional",
1016
+ validator: globals_verifier.Validator.schema().string().max(1e3, "Description must not exceed 1000 characters")
1017
+ },
1018
+ "profile.photo": {
1019
+ rule: "optional",
1020
+ validator: globals_verifier.Validator.schema().string().max(500, "Photo URL must not exceed 500 characters")
1021
+ },
1022
+ source: {
1023
+ rule: "optional",
1024
+ default: "web",
1025
+ validator: globals_verifier.Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1026
+ },
1027
+ "referral.code": {
1028
+ rule: "optional",
1029
+ validator: globals_verifier.Validator.schema().string().max(50, "Referral code must not exceed 50 characters")
1030
+ },
1031
+ "referral.source": {
1032
+ rule: "optional",
1033
+ validator: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid referral source ID format")
1034
+ },
1035
+ tags: {
1036
+ rule: "optional",
1037
+ validator: globals_verifier.Validator.schema().array().items(globals_verifier.Validator.schema().string().max(50)).max(20, "Cannot have more than 20 tags")
1038
+ },
1039
+ notes: {
1040
+ rule: "optional",
1041
+ validator: globals_verifier.Validator.schema().string().max(2e3, "Notes must not exceed 2000 characters")
1042
+ },
1043
+ status: {
1044
+ rule: "optional",
1045
+ default: "active",
1046
+ validator: globals_verifier.Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1047
+ },
1048
+ "identity.type": {
1049
+ rule: "required",
1050
+ validator: globals_verifier.Validator.schema().string().oneOf(["Visitor", "User", "Organization"])
1051
+ },
1052
+ "identity.target": {
1053
+ rule: "optional",
1054
+ validator: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid identity target ID format")
1055
+ },
1056
+ owner: {
1057
+ rule: "required",
1058
+ validator: globals_verifier.Validator.schema().object({
1059
+ type: globals_verifier.Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
1060
+ target: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1061
+ })
1062
+ }
1063
+ });
1064
+ const updateVerifier = new globals_verifier.Verifier({
1065
+ _id: {
1066
+ rule: "required",
1067
+ validator: globals_verifier.Validator.schema().string().required("Customer ID is required").pattern(/^[0-9a-fA-F]{24}$/, "Invalid ID format")
1068
+ },
1069
+ email: {
1070
+ rule: "optional",
1071
+ validator: globals_verifier.Validator.schema().string().email("Invalid email format").max(255, "Email must not exceed 255 characters")
1072
+ },
1073
+ phone: {
1074
+ rule: "optional",
1075
+ validator: globals_verifier.Validator.schema().string().pattern(/^\+?[1-9]\d{1,14}$/, "Invalid phone format")
1076
+ },
1077
+ "profile.name": {
1078
+ rule: "optional",
1079
+ validator: globals_verifier.Validator.schema().string().min(1, "Name must be at least 1 character").max(255, "Name must not exceed 255 characters")
1080
+ },
1081
+ "profile.description": {
1082
+ rule: "optional",
1083
+ validator: globals_verifier.Validator.schema().string().max(1e3, "Description must not exceed 1000 characters")
1084
+ },
1085
+ "profile.photo": {
1086
+ rule: "optional",
1087
+ validator: globals_verifier.Validator.schema().string().max(500, "Photo URL must not exceed 500 characters")
1088
+ },
1089
+ source: {
1090
+ rule: "optional",
1091
+ validator: globals_verifier.Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1092
+ },
1093
+ "referral.code": {
1094
+ rule: "optional",
1095
+ validator: globals_verifier.Validator.schema().string().max(50, "Referral code must not exceed 50 characters")
1096
+ },
1097
+ "referral.source": {
1098
+ rule: "optional",
1099
+ validator: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/, "Invalid referral source ID format")
1100
+ },
1101
+ tags: {
1102
+ rule: "optional",
1103
+ validator: globals_verifier.Validator.schema().array().items(globals_verifier.Validator.schema().string().max(50)).max(20, "Cannot have more than 20 tags")
1104
+ },
1105
+ notes: {
1106
+ rule: "optional",
1107
+ validator: globals_verifier.Validator.schema().string().max(2e3, "Notes must not exceed 2000 characters")
1108
+ },
1109
+ status: {
1110
+ rule: "optional",
1111
+ validator: globals_verifier.Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1112
+ }
1113
+ });
1114
+ const readVerifier = new globals_verifier.Verifier({
1115
+ _id: {
1116
+ rule: "optional",
1117
+ validator: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1118
+ },
1119
+ owner: {
1120
+ rule: "optional",
1121
+ validator: globals_verifier.Validator.schema().string()
1122
+ },
1123
+ status: {
1124
+ rule: "optional",
1125
+ validator: globals_verifier.Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1126
+ },
1127
+ source: {
1128
+ rule: "optional",
1129
+ validator: globals_verifier.Validator.schema().string().oneOf(["web", "mobile", "api", "import", "manual", "referral", "social", "email"])
1130
+ },
1131
+ skip: {
1132
+ rule: "optional",
1133
+ default: 0,
1134
+ validator: globals_verifier.Validator.schema().integer().min(0)
1135
+ },
1136
+ limit: {
1137
+ rule: "optional",
1138
+ default: 20,
1139
+ validator: globals_verifier.Validator.schema().integer().min(1).max(100)
1140
+ },
1141
+ sortParam: {
1142
+ rule: "optional",
1143
+ validator: globals_verifier.Validator.schema().string().oneOf(["profile.name", "email", "phone", "lastActivity", "createdAt", "updatedAt"])
1144
+ },
1145
+ sortOrder: {
1146
+ rule: "optional",
1147
+ default: "desc",
1148
+ validator: globals_verifier.Validator.schema().string().oneOf(["asc", "desc"])
1149
+ }
1150
+ });
1151
+ const deleteVerifier = new globals_verifier.Verifier({
1152
+ _id: {
1153
+ rule: "required",
1154
+ validator: globals_verifier.Validator.schema().string().required("Customer ID is required").pattern(/^[0-9a-fA-F]{24}$/)
1155
+ }
1156
+ });
1157
+ return {
1158
+ createVerifier,
1159
+ readVerifier,
1160
+ updateVerifier,
1161
+ deleteVerifier
1162
+ };
1163
+ };
1164
+ const { getInstance } = abac.ABAC;
1165
+ function setupCustomersRoutes(app, db) {
1166
+ const abac2 = getInstance(db);
1167
+ const verifier = verifierFactory();
1168
+ const customersCRUD = new crud.CRUD({
1169
+ app,
1170
+ db,
1171
+ model: db.customer,
1172
+ modelName: "customer",
1173
+ basePath: "/api/customers",
1174
+ auth: true,
1175
+ verifiers: {
1176
+ create: verifier.createVerifier,
1177
+ read: verifier.readVerifier,
1178
+ update: verifier.updateVerifier,
1179
+ delete: verifier.deleteVerifier
1180
+ },
1181
+ abac: abac2,
1182
+ cache: {
1183
+ enabled: true,
1184
+ ttl: 300,
1185
+ tags: ["customer", "orders"]
1186
+ },
1187
+ events: {
1188
+ enabled: true,
1189
+ logReads: false
1190
+ }
1191
+ });
1192
+ return customersCRUD;
1193
+ }
937
1194
  function initializeOrders(app, db, origins, publicPath) {
938
1195
  db.order = ModelOrder(db);
939
1196
  db.customer = ModelCustomer(db);
@@ -941,8 +1198,8 @@ function initializeOrders(app, db, origins, publicPath) {
941
1198
  db.application = ModelApplication(db);
942
1199
  if (app) {
943
1200
  RoutesOrder(app, db);
944
- RoutesApplications(app, db);
945
- new CRUD("/api/customers", app, db, db.customer);
1201
+ setupApplicationsRoutes(app, db);
1202
+ setupCustomersRoutes(app, db);
946
1203
  }
947
1204
  }
948
1205
  const models = {
@@ -950,7 +1207,8 @@ const models = {
950
1207
  ModelCustomer
951
1208
  };
952
1209
  const routes = {
953
- RoutesOrder
1210
+ RoutesOrder,
1211
+ RoutesCustomers: setupCustomersRoutes
954
1212
  };
955
1213
  const controllers = {
956
1214
  FactoryOrder: controllerFactory