@infrab4a/connect 0.4.6 → 0.4.7-beta.0

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 (392) hide show
  1. package/README.md +24 -24
  2. package/bundles/infrab4a-connect.umd.js +1539 -1539
  3. package/bundles/infrab4a-connect.umd.js.map +1 -1
  4. package/esm2015/infrab4a-connect.js +4 -4
  5. package/esm2015/lib/domain/catalog/index.js +3 -3
  6. package/esm2015/lib/domain/catalog/models/category.js +7 -7
  7. package/esm2015/lib/domain/catalog/models/enums/index.js +2 -2
  8. package/esm2015/lib/domain/catalog/models/enums/shops.enum.js +6 -6
  9. package/esm2015/lib/domain/catalog/models/index.js +6 -6
  10. package/esm2015/lib/domain/catalog/models/product.js +7 -7
  11. package/esm2015/lib/domain/catalog/models/types/category-condition.type.js +2 -2
  12. package/esm2015/lib/domain/catalog/models/types/category-filter.type.js +2 -2
  13. package/esm2015/lib/domain/catalog/models/types/index.js +8 -8
  14. package/esm2015/lib/domain/catalog/models/types/product-review.type.js +2 -2
  15. package/esm2015/lib/domain/catalog/models/types/shops-description.type.js +2 -2
  16. package/esm2015/lib/domain/catalog/models/types/shops-price.type.js +2 -2
  17. package/esm2015/lib/domain/catalog/models/types/stock.type.js +2 -2
  18. package/esm2015/lib/domain/catalog/models/types/variant-grade.type.js +2 -2
  19. package/esm2015/lib/domain/catalog/models/variant.js +7 -7
  20. package/esm2015/lib/domain/catalog/repositories/category.repository.js +2 -2
  21. package/esm2015/lib/domain/catalog/repositories/index.js +4 -4
  22. package/esm2015/lib/domain/catalog/repositories/product.repository.js +2 -2
  23. package/esm2015/lib/domain/catalog/repositories/variant.repository.js +2 -2
  24. package/esm2015/lib/domain/general/index.js +3 -3
  25. package/esm2015/lib/domain/general/model/base-model-with-identifier-fields.js +2 -2
  26. package/esm2015/lib/domain/general/model/base.model.js +13 -13
  27. package/esm2015/lib/domain/general/model/identifier-fields.js +2 -2
  28. package/esm2015/lib/domain/general/model/index.js +5 -5
  29. package/esm2015/lib/domain/general/model/types/base-model-builder.type.js +2 -2
  30. package/esm2015/lib/domain/general/model/types/index.js +4 -4
  31. package/esm2015/lib/domain/general/model/types/non-function-properties.type.js +2 -2
  32. package/esm2015/lib/domain/general/model/types/non-function-property-name.type.js +2 -2
  33. package/esm2015/lib/domain/general/repository/create.repository.js +2 -2
  34. package/esm2015/lib/domain/general/repository/crud.repository.js +2 -2
  35. package/esm2015/lib/domain/general/repository/delete.repository.js +2 -2
  36. package/esm2015/lib/domain/general/repository/enums/index.js +3 -3
  37. package/esm2015/lib/domain/general/repository/enums/update-option-actions.enum.js +9 -9
  38. package/esm2015/lib/domain/general/repository/enums/where.enum.js +11 -11
  39. package/esm2015/lib/domain/general/repository/find.repository.js +2 -2
  40. package/esm2015/lib/domain/general/repository/get.repository.js +2 -2
  41. package/esm2015/lib/domain/general/repository/index.js +10 -10
  42. package/esm2015/lib/domain/general/repository/read.repository.js +2 -2
  43. package/esm2015/lib/domain/general/repository/types/index.js +6 -6
  44. package/esm2015/lib/domain/general/repository/types/repository-find-filters.type.js +2 -2
  45. package/esm2015/lib/domain/general/repository/types/repository-find-result.type.js +2 -2
  46. package/esm2015/lib/domain/general/repository/types/repository-limit-options.type.js +2 -2
  47. package/esm2015/lib/domain/general/repository/types/repository-order-by-list.type.js +2 -2
  48. package/esm2015/lib/domain/general/repository/types/repository-update-params.type.js +2 -2
  49. package/esm2015/lib/domain/general/repository/update.repository.js +2 -2
  50. package/esm2015/lib/domain/index.js +7 -7
  51. package/esm2015/lib/domain/location/index.js +2 -2
  52. package/esm2015/lib/domain/location/models/address.js +4 -4
  53. package/esm2015/lib/domain/location/models/index.js +3 -3
  54. package/esm2015/lib/domain/location/models/types/index.js +4 -4
  55. package/esm2015/lib/domain/location/models/types/location-bound.type.js +2 -2
  56. package/esm2015/lib/domain/location/models/types/location-geometry.type.js +2 -2
  57. package/esm2015/lib/domain/location/models/types/location-lat-lng.type.js +2 -2
  58. package/esm2015/lib/domain/shop-settings/index.js +3 -3
  59. package/esm2015/lib/domain/shop-settings/models/home.js +7 -7
  60. package/esm2015/lib/domain/shop-settings/models/index.js +4 -4
  61. package/esm2015/lib/domain/shop-settings/models/shop-menu.js +7 -7
  62. package/esm2015/lib/domain/shop-settings/models/types/banner.type.js +2 -2
  63. package/esm2015/lib/domain/shop-settings/models/types/benefit.type.js +2 -2
  64. package/esm2015/lib/domain/shop-settings/models/types/index.js +5 -5
  65. package/esm2015/lib/domain/shop-settings/models/types/menu-nav.type.js +2 -2
  66. package/esm2015/lib/domain/shop-settings/models/types/sub-menu.type.js +2 -2
  67. package/esm2015/lib/domain/shop-settings/repositories/home.repository.js +2 -2
  68. package/esm2015/lib/domain/shop-settings/repositories/index.js +3 -3
  69. package/esm2015/lib/domain/shop-settings/repositories/shop-menu.repository.js +2 -2
  70. package/esm2015/lib/domain/shopping/index.js +3 -3
  71. package/esm2015/lib/domain/shopping/models/buy-2-win.js +7 -7
  72. package/esm2015/lib/domain/shopping/models/checkout.js +7 -7
  73. package/esm2015/lib/domain/shopping/models/coupons/coupon.js +15 -15
  74. package/esm2015/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.js +6 -6
  75. package/esm2015/lib/domain/shopping/models/coupons/enums/coupon-types.enum.js +8 -8
  76. package/esm2015/lib/domain/shopping/models/coupons/enums/exclusivities.enum.js +7 -7
  77. package/esm2015/lib/domain/shopping/models/coupons/enums/index.js +4 -4
  78. package/esm2015/lib/domain/shopping/models/coupons/financial-coupon.js +28 -28
  79. package/esm2015/lib/domain/shopping/models/coupons/index.js +4 -4
  80. package/esm2015/lib/domain/shopping/models/enums/checkout-types.enum.js +6 -6
  81. package/esm2015/lib/domain/shopping/models/enums/index.js +3 -3
  82. package/esm2015/lib/domain/shopping/models/enums/order-status.enum.js +12 -12
  83. package/esm2015/lib/domain/shopping/models/index.js +12 -12
  84. package/esm2015/lib/domain/shopping/models/line-item.js +4 -4
  85. package/esm2015/lib/domain/shopping/models/order.js +4 -4
  86. package/esm2015/lib/domain/shopping/models/payment.js +129 -129
  87. package/esm2015/lib/domain/shopping/models/shipping-method.js +7 -7
  88. package/esm2015/lib/domain/shopping/models/subscription/checkout.js +7 -7
  89. package/esm2015/lib/domain/shopping/models/subscription/index.js +3 -3
  90. package/esm2015/lib/domain/shopping/models/subscription/plan.js +7 -7
  91. package/esm2015/lib/domain/shopping/models/types/index.js +8 -8
  92. package/esm2015/lib/domain/shopping/models/types/payment-address.type.js +2 -2
  93. package/esm2015/lib/domain/shopping/models/types/payment-billing.type.js +2 -2
  94. package/esm2015/lib/domain/shopping/models/types/payment-card.type.js +2 -2
  95. package/esm2015/lib/domain/shopping/models/types/payment-customer.type.js +2 -2
  96. package/esm2015/lib/domain/shopping/models/types/payment-document.type.js +2 -2
  97. package/esm2015/lib/domain/shopping/models/types/payment-item.type.js +2 -2
  98. package/esm2015/lib/domain/shopping/models/types/payment-shipping.type.js +2 -2
  99. package/esm2015/lib/domain/shopping/repositories/buy-2-win.repository.js +2 -2
  100. package/esm2015/lib/domain/shopping/repositories/checkout.repository.js +2 -2
  101. package/esm2015/lib/domain/shopping/repositories/coupon.repository.js +2 -2
  102. package/esm2015/lib/domain/shopping/repositories/index.js +7 -7
  103. package/esm2015/lib/domain/shopping/repositories/order.repository.js +2 -2
  104. package/esm2015/lib/domain/shopping/repositories/payment.repository.js +2 -2
  105. package/esm2015/lib/domain/shopping/repositories/subscription/checkout.repository.js +2 -2
  106. package/esm2015/lib/domain/shopping/repositories/subscription/index.js +3 -3
  107. package/esm2015/lib/domain/shopping/repositories/subscription/plan.repository.js +2 -2
  108. package/esm2015/lib/domain/users/errors/index.js +2 -2
  109. package/esm2015/lib/domain/users/errors/unauthorized.error.js +7 -7
  110. package/esm2015/lib/domain/users/index.js +6 -6
  111. package/esm2015/lib/domain/users/models/beauty-profile.js +12 -12
  112. package/esm2015/lib/domain/users/models/enums/area.enum.js +13 -13
  113. package/esm2015/lib/domain/users/models/enums/beard-sizes.enum.js +9 -9
  114. package/esm2015/lib/domain/users/models/enums/hair-types.enum.js +9 -9
  115. package/esm2015/lib/domain/users/models/enums/index.js +7 -7
  116. package/esm2015/lib/domain/users/models/enums/office-position.enum.js +8 -8
  117. package/esm2015/lib/domain/users/models/enums/user-type.enum.js +10 -10
  118. package/esm2015/lib/domain/users/models/index.js +6 -6
  119. package/esm2015/lib/domain/users/models/subscription/edition.js +7 -7
  120. package/esm2015/lib/domain/users/models/subscription/enums/billing-status.enum.js +5 -5
  121. package/esm2015/lib/domain/users/models/subscription/enums/edition-status.enum.js +5 -5
  122. package/esm2015/lib/domain/users/models/subscription/enums/index.js +5 -5
  123. package/esm2015/lib/domain/users/models/subscription/enums/payment-type.enum.js +7 -7
  124. package/esm2015/lib/domain/users/models/subscription/enums/status.enum.js +5 -5
  125. package/esm2015/lib/domain/users/models/subscription/index.js +5 -5
  126. package/esm2015/lib/domain/users/models/subscription/payment.js +7 -7
  127. package/esm2015/lib/domain/users/models/subscription/subscription.js +7 -7
  128. package/esm2015/lib/domain/users/models/user-address.js +7 -7
  129. package/esm2015/lib/domain/users/models/user.js +17 -17
  130. package/esm2015/lib/domain/users/repositories/beauty-profile.repository.js +2 -2
  131. package/esm2015/lib/domain/users/repositories/edition.repository.js +2 -2
  132. package/esm2015/lib/domain/users/repositories/index.js +7 -7
  133. package/esm2015/lib/domain/users/repositories/subscription-payment.repository.js +2 -2
  134. package/esm2015/lib/domain/users/repositories/subscription.repository.js +2 -2
  135. package/esm2015/lib/domain/users/repositories/user-address.repository.js +2 -2
  136. package/esm2015/lib/domain/users/repositories/user.repository.js +2 -2
  137. package/esm2015/lib/domain/users/services/authentication.service.js +2 -2
  138. package/esm2015/lib/domain/users/services/index.js +2 -2
  139. package/esm2015/lib/domain/users/use-cases/authentication.js +40 -40
  140. package/esm2015/lib/domain/users/use-cases/index.js +3 -3
  141. package/esm2015/lib/domain/users/use-cases/signout.js +12 -12
  142. package/esm2015/lib/errors/duplicated-results.error.js +7 -7
  143. package/esm2015/lib/errors/index.js +5 -5
  144. package/esm2015/lib/errors/invalid-argument.error.js +7 -7
  145. package/esm2015/lib/errors/not-found.error.js +7 -7
  146. package/esm2015/lib/errors/required-argument.error.js +8 -8
  147. package/esm2015/lib/index.js +5 -5
  148. package/esm2015/lib/infra/firebase/auth/authentication-firebase-auth.service.js +27 -27
  149. package/esm2015/lib/infra/firebase/auth/index.js +2 -2
  150. package/esm2015/lib/infra/firebase/firestore/index.js +4 -4
  151. package/esm2015/lib/infra/firebase/firestore/mixins/index.js +10 -10
  152. package/esm2015/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +30 -30
  153. package/esm2015/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +10 -10
  154. package/esm2015/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +18 -18
  155. package/esm2015/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +64 -64
  156. package/esm2015/lib/infra/firebase/firestore/mixins/with-firestore.mixin.js +26 -26
  157. package/esm2015/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +24 -24
  158. package/esm2015/lib/infra/firebase/firestore/mixins/with-helpers.mixin.js +17 -17
  159. package/esm2015/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +11 -11
  160. package/esm2015/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +45 -45
  161. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +50 -50
  162. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/index.js +4 -4
  163. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +12 -12
  164. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.js +14 -14
  165. package/esm2015/lib/infra/firebase/firestore/repositories/index.js +5 -5
  166. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.js +12 -12
  167. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/index.js +3 -3
  168. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +12 -12
  169. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +12 -12
  170. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.js +12 -12
  171. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.js +12 -12
  172. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +12 -12
  173. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/index.js +8 -8
  174. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.js +12 -12
  175. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.js +12 -12
  176. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.js +12 -12
  177. package/esm2015/lib/infra/firebase/firestore/repositories/users/index.js +7 -7
  178. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.js +14 -14
  179. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.js +12 -12
  180. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.js +14 -14
  181. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.js +14 -14
  182. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.js +14 -14
  183. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.js +40 -40
  184. package/esm2015/lib/infra/firebase/firestore/types/firestore-sub.repository.type.js +2 -2
  185. package/esm2015/lib/infra/firebase/firestore/types/firestore.helpers.type.js +2 -2
  186. package/esm2015/lib/infra/firebase/firestore/types/firestore.repository.type.js +2 -2
  187. package/esm2015/lib/infra/firebase/firestore/types/index.js +4 -4
  188. package/esm2015/lib/infra/firebase/index.js +3 -3
  189. package/esm2015/lib/infra/index.js +2 -2
  190. package/esm2015/lib/utils/index.js +5 -5
  191. package/esm2015/lib/utils/mixins/base.mixin.js +6 -6
  192. package/esm2015/lib/utils/mixins/index.js +3 -3
  193. package/esm2015/lib/utils/mixins/mixin-ctor.type.js +2 -2
  194. package/esm2015/lib/utils/types/index.js +2 -2
  195. package/esm2015/lib/utils/types/prop.type.js +2 -2
  196. package/esm2015/public-api.js +2 -2
  197. package/fesm2015/infrab4a-connect.js +944 -944
  198. package/fesm2015/infrab4a-connect.js.map +1 -1
  199. package/infrab4a-connect.d.ts +5 -5
  200. package/lib/domain/catalog/index.d.ts +2 -2
  201. package/lib/domain/catalog/models/category.d.ts +20 -20
  202. package/lib/domain/catalog/models/enums/index.d.ts +1 -1
  203. package/lib/domain/catalog/models/enums/shops.enum.d.ts +4 -4
  204. package/lib/domain/catalog/models/index.d.ts +5 -5
  205. package/lib/domain/catalog/models/product.d.ts +31 -31
  206. package/lib/domain/catalog/models/types/category-condition.type.d.ts +4 -4
  207. package/lib/domain/catalog/models/types/category-filter.type.d.ts +4 -4
  208. package/lib/domain/catalog/models/types/index.d.ts +7 -7
  209. package/lib/domain/catalog/models/types/product-review.type.d.ts +12 -12
  210. package/lib/domain/catalog/models/types/shops-description.type.d.ts +7 -7
  211. package/lib/domain/catalog/models/types/shops-price.type.d.ts +10 -10
  212. package/lib/domain/catalog/models/types/stock.type.d.ts +3 -3
  213. package/lib/domain/catalog/models/types/variant-grade.type.d.ts +4 -4
  214. package/lib/domain/catalog/models/variant.d.ts +12 -12
  215. package/lib/domain/catalog/repositories/category.repository.d.ts +11 -11
  216. package/lib/domain/catalog/repositories/index.d.ts +3 -3
  217. package/lib/domain/catalog/repositories/product.repository.d.ts +4 -4
  218. package/lib/domain/catalog/repositories/variant.repository.d.ts +4 -4
  219. package/lib/domain/general/index.d.ts +2 -2
  220. package/lib/domain/general/model/base-model-with-identifier-fields.d.ts +3 -3
  221. package/lib/domain/general/model/base.model.d.ts +6 -6
  222. package/lib/domain/general/model/identifier-fields.d.ts +4 -4
  223. package/lib/domain/general/model/index.d.ts +4 -4
  224. package/lib/domain/general/model/types/base-model-builder.type.d.ts +5 -5
  225. package/lib/domain/general/model/types/index.d.ts +3 -3
  226. package/lib/domain/general/model/types/non-function-properties.type.d.ts +2 -2
  227. package/lib/domain/general/model/types/non-function-property-name.type.d.ts +3 -3
  228. package/lib/domain/general/repository/create.repository.d.ts +5 -5
  229. package/lib/domain/general/repository/crud.repository.d.ts +7 -7
  230. package/lib/domain/general/repository/delete.repository.d.ts +5 -5
  231. package/lib/domain/general/repository/enums/index.d.ts +2 -2
  232. package/lib/domain/general/repository/enums/update-option-actions.enum.d.ts +7 -7
  233. package/lib/domain/general/repository/enums/where.enum.d.ts +9 -9
  234. package/lib/domain/general/repository/find.repository.d.ts +5 -5
  235. package/lib/domain/general/repository/get.repository.d.ts +5 -5
  236. package/lib/domain/general/repository/index.d.ts +9 -9
  237. package/lib/domain/general/repository/read.repository.d.ts +5 -5
  238. package/lib/domain/general/repository/types/index.d.ts +5 -5
  239. package/lib/domain/general/repository/types/repository-find-filters.type.d.ts +10 -10
  240. package/lib/domain/general/repository/types/repository-find-result.type.d.ts +4 -4
  241. package/lib/domain/general/repository/types/repository-limit-options.type.d.ts +4 -4
  242. package/lib/domain/general/repository/types/repository-order-by-list.type.d.ts +5 -5
  243. package/lib/domain/general/repository/types/repository-update-params.type.d.ts +11 -11
  244. package/lib/domain/general/repository/update.repository.d.ts +5 -5
  245. package/lib/domain/index.d.ts +6 -6
  246. package/lib/domain/location/index.d.ts +1 -1
  247. package/lib/domain/location/models/address.d.ts +21 -21
  248. package/lib/domain/location/models/index.d.ts +2 -2
  249. package/lib/domain/location/models/types/index.d.ts +3 -3
  250. package/lib/domain/location/models/types/location-bound.type.d.ts +6 -6
  251. package/lib/domain/location/models/types/location-geometry.type.d.ts +7 -7
  252. package/lib/domain/location/models/types/location-lat-lng.type.d.ts +4 -4
  253. package/lib/domain/shop-settings/index.d.ts +2 -2
  254. package/lib/domain/shop-settings/models/home.d.ts +17 -17
  255. package/lib/domain/shop-settings/models/index.d.ts +3 -3
  256. package/lib/domain/shop-settings/models/shop-menu.d.ts +7 -7
  257. package/lib/domain/shop-settings/models/types/banner.type.d.ts +6 -6
  258. package/lib/domain/shop-settings/models/types/benefit.type.d.ts +5 -5
  259. package/lib/domain/shop-settings/models/types/index.d.ts +4 -4
  260. package/lib/domain/shop-settings/models/types/menu-nav.type.d.ts +8 -8
  261. package/lib/domain/shop-settings/models/types/sub-menu.type.d.ts +8 -8
  262. package/lib/domain/shop-settings/repositories/home.repository.d.ts +4 -4
  263. package/lib/domain/shop-settings/repositories/index.d.ts +2 -2
  264. package/lib/domain/shop-settings/repositories/shop-menu.repository.d.ts +4 -4
  265. package/lib/domain/shopping/index.d.ts +2 -2
  266. package/lib/domain/shopping/models/buy-2-win.d.ts +18 -18
  267. package/lib/domain/shopping/models/checkout.d.ts +28 -28
  268. package/lib/domain/shopping/models/coupons/coupon.d.ts +25 -25
  269. package/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.d.ts +4 -4
  270. package/lib/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +6 -6
  271. package/lib/domain/shopping/models/coupons/enums/exclusivities.enum.d.ts +5 -5
  272. package/lib/domain/shopping/models/coupons/enums/index.d.ts +3 -3
  273. package/lib/domain/shopping/models/coupons/financial-coupon.d.ts +8 -8
  274. package/lib/domain/shopping/models/coupons/index.d.ts +3 -3
  275. package/lib/domain/shopping/models/enums/checkout-types.enum.d.ts +4 -4
  276. package/lib/domain/shopping/models/enums/index.d.ts +2 -2
  277. package/lib/domain/shopping/models/enums/order-status.enum.d.ts +10 -10
  278. package/lib/domain/shopping/models/index.d.ts +11 -11
  279. package/lib/domain/shopping/models/line-item.d.ts +7 -7
  280. package/lib/domain/shopping/models/order.d.ts +7 -7
  281. package/lib/domain/shopping/models/payment.d.ts +69 -69
  282. package/lib/domain/shopping/models/shipping-method.d.ts +18 -18
  283. package/lib/domain/shopping/models/subscription/checkout.d.ts +23 -23
  284. package/lib/domain/shopping/models/subscription/index.d.ts +2 -2
  285. package/lib/domain/shopping/models/subscription/plan.d.ts +12 -12
  286. package/lib/domain/shopping/models/types/index.d.ts +7 -7
  287. package/lib/domain/shopping/models/types/payment-address.type.d.ts +12 -12
  288. package/lib/domain/shopping/models/types/payment-billing.type.d.ts +7 -7
  289. package/lib/domain/shopping/models/types/payment-card.type.d.ts +14 -14
  290. package/lib/domain/shopping/models/types/payment-customer.type.d.ts +18 -18
  291. package/lib/domain/shopping/models/types/payment-document.type.d.ts +6 -6
  292. package/lib/domain/shopping/models/types/payment-item.type.d.ts +11 -11
  293. package/lib/domain/shopping/models/types/payment-shipping.type.d.ts +10 -10
  294. package/lib/domain/shopping/repositories/buy-2-win.repository.d.ts +4 -4
  295. package/lib/domain/shopping/repositories/checkout.repository.d.ts +4 -4
  296. package/lib/domain/shopping/repositories/coupon.repository.d.ts +4 -4
  297. package/lib/domain/shopping/repositories/index.d.ts +6 -6
  298. package/lib/domain/shopping/repositories/order.repository.d.ts +4 -4
  299. package/lib/domain/shopping/repositories/payment.repository.d.ts +4 -4
  300. package/lib/domain/shopping/repositories/subscription/checkout.repository.d.ts +4 -4
  301. package/lib/domain/shopping/repositories/subscription/index.d.ts +2 -2
  302. package/lib/domain/shopping/repositories/subscription/plan.repository.d.ts +4 -4
  303. package/lib/domain/users/errors/index.d.ts +1 -1
  304. package/lib/domain/users/errors/unauthorized.error.d.ts +4 -4
  305. package/lib/domain/users/index.d.ts +5 -5
  306. package/lib/domain/users/models/beauty-profile.d.ts +12 -12
  307. package/lib/domain/users/models/enums/area.enum.d.ts +11 -11
  308. package/lib/domain/users/models/enums/beard-sizes.enum.d.ts +7 -7
  309. package/lib/domain/users/models/enums/hair-types.enum.d.ts +7 -7
  310. package/lib/domain/users/models/enums/index.d.ts +6 -6
  311. package/lib/domain/users/models/enums/office-position.enum.d.ts +6 -6
  312. package/lib/domain/users/models/enums/user-type.enum.d.ts +8 -8
  313. package/lib/domain/users/models/index.d.ts +5 -5
  314. package/lib/domain/users/models/subscription/edition.d.ts +15 -15
  315. package/lib/domain/users/models/subscription/enums/billing-status.enum.d.ts +3 -3
  316. package/lib/domain/users/models/subscription/enums/edition-status.enum.d.ts +3 -3
  317. package/lib/domain/users/models/subscription/enums/index.d.ts +4 -4
  318. package/lib/domain/users/models/subscription/enums/payment-type.enum.d.ts +5 -5
  319. package/lib/domain/users/models/subscription/enums/status.enum.d.ts +3 -3
  320. package/lib/domain/users/models/subscription/index.d.ts +4 -4
  321. package/lib/domain/users/models/subscription/payment.d.ts +14 -14
  322. package/lib/domain/users/models/subscription/subscription.d.ts +30 -30
  323. package/lib/domain/users/models/user-address.d.ts +7 -7
  324. package/lib/domain/users/models/user.d.ts +23 -23
  325. package/lib/domain/users/repositories/beauty-profile.repository.d.ts +4 -4
  326. package/lib/domain/users/repositories/edition.repository.d.ts +4 -4
  327. package/lib/domain/users/repositories/index.d.ts +6 -6
  328. package/lib/domain/users/repositories/subscription-payment.repository.d.ts +4 -4
  329. package/lib/domain/users/repositories/subscription.repository.d.ts +4 -4
  330. package/lib/domain/users/repositories/user-address.repository.d.ts +4 -4
  331. package/lib/domain/users/repositories/user.repository.d.ts +4 -4
  332. package/lib/domain/users/services/authentication.service.d.ts +10 -10
  333. package/lib/domain/users/services/index.d.ts +1 -1
  334. package/lib/domain/users/use-cases/authentication.d.ts +21 -21
  335. package/lib/domain/users/use-cases/index.d.ts +2 -2
  336. package/lib/domain/users/use-cases/signout.d.ts +6 -6
  337. package/lib/errors/duplicated-results.error.d.ts +4 -4
  338. package/lib/errors/index.d.ts +4 -4
  339. package/lib/errors/invalid-argument.error.d.ts +4 -4
  340. package/lib/errors/not-found.error.d.ts +4 -4
  341. package/lib/errors/required-argument.error.d.ts +5 -5
  342. package/lib/index.d.ts +4 -4
  343. package/lib/infra/firebase/auth/authentication-firebase-auth.service.d.ts +9 -9
  344. package/lib/infra/firebase/auth/index.d.ts +1 -1
  345. package/lib/infra/firebase/firestore/index.d.ts +3 -3
  346. package/lib/infra/firebase/firestore/mixins/index.d.ts +9 -9
  347. package/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +17 -17
  348. package/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +29 -29
  349. package/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +15 -15
  350. package/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +20 -20
  351. package/lib/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +15 -15
  352. package/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +15 -15
  353. package/lib/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +10 -10
  354. package/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +14 -14
  355. package/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +16 -16
  356. package/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +54 -54
  357. package/lib/infra/firebase/firestore/repositories/catalog/index.d.ts +3 -3
  358. package/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +49 -49
  359. package/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +60 -60
  360. package/lib/infra/firebase/firestore/repositories/index.d.ts +4 -4
  361. package/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +49 -49
  362. package/lib/infra/firebase/firestore/repositories/shop-settings/index.d.ts +2 -2
  363. package/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +49 -49
  364. package/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +49 -49
  365. package/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +49 -49
  366. package/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +49 -49
  367. package/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +49 -49
  368. package/lib/infra/firebase/firestore/repositories/shopping/index.d.ts +7 -7
  369. package/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +49 -49
  370. package/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +49 -49
  371. package/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +49 -49
  372. package/lib/infra/firebase/firestore/repositories/users/index.d.ts +6 -6
  373. package/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +60 -60
  374. package/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +49 -49
  375. package/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +60 -60
  376. package/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +60 -60
  377. package/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +60 -60
  378. package/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +52 -52
  379. package/lib/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +6 -6
  380. package/lib/infra/firebase/firestore/types/firestore.helpers.type.d.ts +8 -8
  381. package/lib/infra/firebase/firestore/types/firestore.repository.type.d.ts +8 -8
  382. package/lib/infra/firebase/firestore/types/index.d.ts +3 -3
  383. package/lib/infra/firebase/index.d.ts +2 -2
  384. package/lib/infra/index.d.ts +1 -1
  385. package/lib/utils/index.d.ts +4 -4
  386. package/lib/utils/mixins/base.mixin.d.ts +3 -3
  387. package/lib/utils/mixins/index.d.ts +2 -2
  388. package/lib/utils/mixins/mixin-ctor.type.d.ts +1 -1
  389. package/lib/utils/types/index.d.ts +1 -1
  390. package/lib/utils/types/prop.type.d.ts +1 -1
  391. package/package.json +1 -1
  392. package/public-api.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"infrab4a-connect.js","sources":["../../../projects/connect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/domain/shop-settings/models/shop-menu.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/errors/duplicated-results.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\r\n\r\nimport { NonFunctionProperties } from './types/non-function-properties.type'\r\n\r\nexport class BaseModel<Model> {\r\n constructor(args?: Partial<Model>) {\r\n Object.assign(this, args)\r\n }\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\r\n return plainToClass(this, data) as any\r\n }\r\n\r\n toPlain(): any {\r\n return classToPlain(this, { exposeUnsetFields: false })\r\n }\r\n}\r\n","export enum Where {\r\n EQUALS = '==',\r\n GT = '>',\r\n GTE = '>=',\r\n IN = 'in',\r\n LT = '<',\r\n LTE = '<=',\r\n LIKE = 'like',\r\n}\r\n","export enum UpdateOptionActions {\r\n UPDATE = 'update',\r\n MERGE = 'merge',\r\n REMOVE = 'remove',\r\n REMOVE_FIELD = 'removeField',\r\n NULL = 'null',\r\n}\r\n","export enum UserType {\r\n B2C = 'Cliente Transacional',\r\n GlamGirl = 'Glamgirl',\r\n MensBoy = 'Mensboy',\r\n B2B = 'Company',\r\n Collaborator = 'Funcionário',\r\n Influencer = 'Influencer',\r\n}\r\n","export enum BeardSizes {\r\n BIG = 'Grande',\r\n MEDIUM = 'Média',\r\n SHORT = 'Curta',\r\n MUSTACHE = 'Bigode',\r\n NOTHING = 'Sem Barba',\r\n}\r\n","export enum HairTypes {\r\n Smooth = 'Liso',\r\n WAVY = 'Ondulado',\r\n CURLY = 'Cacheado',\r\n FRIZZY = 'Crespo',\r\n BALD = 'Sou careca',\r\n}\r\n","export enum Area {\r\n GP = 'Geral',\r\n CRM = 'CRM',\r\n MediaProd = 'Media Production',\r\n Tech = 'Tecnologia',\r\n Transactional = 'Transacional',\r\n Operations = 'Opera\\u00E7\\u00F5es',\r\n Sales = 'Comercial',\r\n Finantial = 'Financeiro',\r\n HR = 'RH',\r\n}\r\n","export enum OfficePosition {\r\n Intern = 'Estagi\\u00E1rio',\r\n Analyst = 'Analista',\r\n Manager = 'Gerente',\r\n Director = 'Diretor',\r\n}\r\n","export enum BillingStatus {\r\n PAYED = 'PAGO',\r\n}\r\n","export enum EditionStatus {\r\n ALLOCATION_WAITING = 'Aguardando alocação',\r\n}\r\n","export enum PaymentType {\r\n AQUISITION = 'Aquisição',\r\n RENEWAL = 'Renovação',\r\n FREIGHT = 'mudança de endereço, Frete',\r\n}\r\n","export enum Status {\r\n ACTIVE = 'active',\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\n\r\nimport { EditionStatus, BillingStatus } from './enums'\r\n\r\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\r\n id: string\r\n subscriptionId: string\r\n billingStatus: BillingStatus\r\n editionId: number\r\n editionStatus: EditionStatus\r\n installment: number\r\n paymentId: string\r\n draftId?: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Payment } from '../../../shopping/models/payment'\r\n\r\nimport { PaymentType } from './enums/payment-type.enum'\r\n\r\nexport class SubscriptionPayment\r\n extends BaseModel<SubscriptionPayment>\r\n implements IdentifierFields<SubscriptionPayment>\r\n{\r\n id: string\r\n subscriptionId: string\r\n paymentType: PaymentType\r\n payment: Payment\r\n createdAt: Date\r\n attempts?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\r\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\r\nimport { User } from '../user'\r\n\r\nimport { Edition } from './edition'\r\nimport { Status } from './enums/status.enum'\r\nimport { SubscriptionPayment } from './payment'\r\n\r\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\r\n id: string\r\n nextPayment: Date\r\n recurrence: boolean\r\n status: Status\r\n user: User\r\n subscriptionPlan: SubscriptionPlan\r\n shippingAddress: Address\r\n billingAddress?: Address\r\n cardToken: string\r\n coupon?: Coupon\r\n subtotalPrice?: number\r\n discount?: number\r\n totalPrice?: number\r\n editions: Edition[]\r\n payment?: SubscriptionPayment[]\r\n createdAt: Date\r\n updatedAt: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { Area, OfficePosition, UserType } from './enums'\r\nimport { BeautyProfile } from './beauty-profile'\r\n\r\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\r\n id: string\r\n cpf?: string\r\n email: string\r\n firstName: string\r\n lastName: string\r\n displayName?: string\r\n phone: string\r\n birthday?: Date\r\n acceptsNewsletter: boolean\r\n type?: UserType\r\n beautyProfile?: BeautyProfile\r\n area?: Area\r\n officePosition?: OfficePosition\r\n\r\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\r\n const instance = super.toInstance<User>(data)\r\n\r\n instance.displayName = `${data.firstName} ${data.lastName}`\r\n\r\n return instance as any\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<User>[] {\r\n return ['id']\r\n }\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.beautyProfile\r\n\r\n return plain\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nimport { BeardSizes, HairTypes } from './enums'\r\n\r\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\r\n id: string\r\n userId: string\r\n beardSize?: BeardSizes\r\n hairType?: HairTypes\r\n\r\n toPlain(): any {\r\n const plain = super.toPlain()\r\n\r\n delete plain.id\r\n\r\n return plain\r\n }\r\n\r\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\n\r\nimport { LocationGeometry } from './types/location-geometry.type'\r\n\r\nexport abstract class Address extends BaseModel<Address> {\r\n default?: boolean\r\n recipient?: string\r\n zip?: string\r\n street?: string\r\n number?: string\r\n extension?: string\r\n district?: string\r\n city?: string\r\n regionalPole?: string\r\n region?: string\r\n state?: string\r\n country?: string\r\n mailbox?: boolean\r\n mailboxNumber?: string\r\n formattedAddress?: string\r\n placeId?: string\r\n geometry?: LocationGeometry\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\r\n\r\nexport class UserAddress extends Address {\r\n id: string\r\n userId: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class Base {\r\n constructor(...args: Array<any>) {\r\n Object.assign(this, ...args)\r\n }\r\n}\r\n","export class UnauthorizedError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { Area, OfficePosition, User, UserType } from '../models'\r\nimport { AuthenticationService } from '../services/authentication.service'\r\nimport { isNil } from '../../../utils'\r\nimport { UnauthorizedError } from '../errors/unauthorized.error'\r\nimport { UserRepository } from '../repositories/user.repository'\r\n\r\nexport enum SignInMethods {\r\n EMAIL_PASSWORD = 'email_password',\r\n GOOGLE = 'google',\r\n}\r\n\r\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\r\n\r\ntype SignInParams = {\r\n email?: string\r\n password?: string\r\n}\r\n\r\nexport class Authentication {\r\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\r\n\r\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\r\n const method = this.getServiceByMethod(signInMethod)\r\n const userAuth = await this.authService[method]({ email, password })\r\n const user = this.userRepository.get(userAuth)\r\n\r\n if (!isNil(user)) return user\r\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\r\n\r\n throw new UnauthorizedError('Invalid credentials')\r\n }\r\n\r\n private getServiceByMethod(signInMethod: SignInMethod): string {\r\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\r\n }\r\n\r\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\r\n const [firstName, lastName] = user.displayName?.split(/\\s/)\r\n const person = User.toInstance({\r\n ...user,\r\n cpf: '',\r\n birthday: new Date(),\r\n firstName,\r\n lastName,\r\n acceptsNewsletter: false,\r\n area: Area.Transactional,\r\n officePosition: OfficePosition.Intern,\r\n type: UserType.Collaborator,\r\n })\r\n\r\n return this.userRepository.create(person)\r\n }\r\n}\r\n","import { AuthenticationService } from '../services/authentication.service'\r\n\r\nexport class SignOut {\r\n constructor(private readonly authService: AuthenticationService) {}\r\n\r\n async signOut(): Promise<void> {\r\n await this.authService.signOut()\r\n }\r\n}\r\n","export enum Shops {\r\n MENSMARKET = `Men's Market`,\r\n GLAMSHOP = 'Glamshop',\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Shops } from './enums'\r\n\r\nimport { CategoryCondition, CategoryFilter } from './types'\r\n\r\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\r\n id: string\r\n brandCategory: boolean\r\n brandLogo?: string\r\n name: string\r\n slug: string\r\n image?: string\r\n brandCategoryBanner?: string\r\n description: string\r\n conditions?: CategoryCondition\r\n products?: string[]\r\n filters?: CategoryFilter[]\r\n createdAt: Date\r\n updatedAt: Date\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Category>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { Shops } from './enums/shops.enum'\r\nimport { ProductReview, ShopsDescription, ShopsPrice, Stock } from './types'\r\nimport { Variant } from './variant'\r\n\r\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\r\n id: string\r\n name: string\r\n slug: string\r\n shopAvailability: Shops[]\r\n description: ShopsDescription\r\n sku: string\r\n price: ShopsPrice\r\n hasVariants: boolean\r\n NCM: string\r\n EAN: string\r\n CEST: string\r\n weight: number\r\n stock: Stock\r\n costPrice: number\r\n images?: string[]\r\n published: boolean\r\n createdAt: Date\r\n updatedAt: Date\r\n brand: string\r\n tags?: string[]\r\n type?: string\r\n categories?: string[]\r\n reviews?: ProductReview[]\r\n variant?: Variant\r\n\r\n identifierFields(): NonFunctionPropertyNames<Product>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\n\r\nimport { ShopsPrice, Stock, VariantGrade } from './types'\r\n\r\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\r\n id: string\r\n productId: string\r\n sku: string\r\n price: ShopsPrice\r\n EAN: string\r\n stock: Stock\r\n grade: VariantGrade[]\r\n\r\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CouponTypes {\r\n FINANCIAL = 1,\r\n PRODUCT,\r\n GIFTCARD,\r\n VOUCHER,\r\n}\r\n","export enum CouponSubtypes {\r\n ABSOLUTE = 1,\r\n PERCENTAGE,\r\n}\r\n","export enum Exclusivities {\r\n ALL_USERS = 1,\r\n SPECIFIC_USER = 2,\r\n COLLABORATORS = 3,\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\r\n\r\nimport { CouponTypes, Exclusivities } from './enums'\r\n\r\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\r\n id: string\r\n type: CouponTypes\r\n discount?: number\r\n user?: string\r\n recipient?: string\r\n store?: Shops\r\n campaign?: string\r\n name: string\r\n nickname: string\r\n expiresIn?: Date\r\n useLimit?: number\r\n createdAt: Date\r\n updatedAt?: Date\r\n shopAvailability: Shops\r\n\r\n @Expose({ name: 'checkout_type' })\r\n checkoutType: CheckoutTypes\r\n @Expose({ name: 'exclusivity_type' })\r\n exclusivityType?: Exclusivities\r\n\r\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\r\n return ['id']\r\n }\r\n}\r\n","export enum CheckoutTypes {\r\n ECOMMERCE = 1,\r\n SUBSCRIPTION = 2,\r\n}\r\n","import { Md5 } from 'ts-md5'\r\n\r\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\r\n\r\nimport { Coupon } from './coupon'\r\nimport { CouponTypes, CouponSubtypes } from './enums'\r\n\r\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\r\n\r\nexport class FinancialCoupon extends Coupon {\r\n type = CouponTypes.FINANCIAL\r\n subtype: CouponSubtypes\r\n\r\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\r\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\r\n }\r\n\r\n static createCoupon(userId: string): FinancialCoupon {\r\n return this.toInstance({\r\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\r\n nickname: `${Date.now()}`,\r\n type: CouponTypes.FINANCIAL,\r\n subtype: CouponSubtypes.PERCENTAGE,\r\n checkoutType: CheckoutTypes.ECOMMERCE,\r\n discount: 30,\r\n user: userId,\r\n createdAt: new Date(Date.now()),\r\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\r\n })\r\n }\r\n}\r\n","export enum OrderStatus {\r\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\r\n EM_PREPARO = 'Preparando pedido',\r\n NF_EMITIDA = 'Nota Fiscal Emitida',\r\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\r\n ENVIADO = 'Pedido Enviado',\r\n ENTREGUE = 'Pedido entregue',\r\n CANCELADO = 'Cancelado',\r\n CREDIT_CARD = 'credit_card',\r\n}\r\n","import { Address } from '../../location/models/address'\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { User } from '../../users/models/user'\r\n\r\nimport { Coupon } from './coupons/coupon'\r\nimport { LineItem } from './line-item'\r\nimport { ShippingMethod } from './shipping-method'\r\nimport { Shops } from '../../catalog/models/enums/shops.enum'\r\n\r\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\r\n id?: string\r\n paymentId?: string\r\n status?: string\r\n createdAt?: Date\r\n updatedAt?: Date\r\n completedAt?: Date\r\n lineItems?: LineItem[]\r\n user?: Partial<User>\r\n shippingAddress?: Partial<Address>\r\n billingAddress?: Partial<Address>\r\n shipping?: ShippingMethod\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n shop: Shops\r\n\r\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Product } from '../../catalog/models/product'\r\n\r\nexport class LineItem extends Product {\r\n parentId?: string\r\n quantity: number\r\n isGift?: boolean\r\n pricePaid?: number\r\n}\r\n","import { Checkout } from './checkout'\r\nimport { OrderStatus } from './enums/order-status.enum'\r\nimport { Payment } from './payment'\r\n\r\nexport class Order extends Checkout {\r\n status: OrderStatus\r\n payment: Payment\r\n}\r\n","import { Expose } from 'class-transformer'\r\n\r\nimport { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\r\n\r\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\r\n id: number\r\n object: string\r\n status: string\r\n tid: number\r\n nsu: number\r\n amount: number\r\n cost: number\r\n installments: number\r\n referer: string\r\n ip: string\r\n phone: string\r\n address: string\r\n metadata: any\r\n device: string\r\n payment: string\r\n addition: string\r\n discount: string\r\n customer: PaymentCustomer\r\n billing: PaymentBilling\r\n shipping: PaymentShipping\r\n items: PaymentItem[]\r\n card: PaymentCard\r\n\r\n @Expose({ name: 'refuse_reason' })\r\n refuseReason: string\r\n @Expose({ name: 'status_reason' })\r\n statusReason: string\r\n @Expose({ name: 'acquirer_response_code' })\r\n acquirerResponseCode: string\r\n @Expose({ name: 'acquirer_name' })\r\n acquirerName: string\r\n @Expose({ name: 'acquirer_id' })\r\n acquirerId: string\r\n @Expose({ name: 'authorization_code' })\r\n authorizationCode: string\r\n @Expose({ name: 'soft_descriptor' })\r\n softDescriptor: string\r\n @Expose({ name: 'date_created' })\r\n dateCreated: string\r\n @Expose({ name: 'date_updated' })\r\n dateUpdated: string\r\n @Expose({ name: 'authorized_amount' })\r\n authorizedAmount: number\r\n @Expose({ name: 'paid_amount' })\r\n paidAmount: number\r\n @Expose({ name: 'refunded_amount' })\r\n refundedAmount: number\r\n @Expose({ name: 'card_holder_name' })\r\n cardHolderName: string\r\n @Expose({ name: 'card_last_digits' })\r\n cardLastDigits: string\r\n @Expose({ name: 'card_first_digits' })\r\n cardFirstDigits: string\r\n @Expose({ name: 'card_brand' })\r\n cardBrand: string\r\n @Expose({ name: 'card_pin_mode' })\r\n cardPinMode: string\r\n @Expose({ name: 'card_magstripe_fallback' })\r\n cardMagstripeFallback: boolean\r\n @Expose({ name: 'cvm_pin' })\r\n cvmPin: boolean\r\n @Expose({ name: 'postback_url' })\r\n postbackUrl: string\r\n @Expose({ name: 'payment_method' })\r\n paymentMethod: string\r\n @Expose({ name: 'capture_method' })\r\n captureMethod: string\r\n @Expose({ name: 'antifraud_score' })\r\n antifraudScore: string\r\n @Expose({ name: 'boleto_url' })\r\n boletoUrl: string\r\n @Expose({ name: 'boleto_barcode' })\r\n boletoBarcode: string\r\n @Expose({ name: 'boleto_expiration_date' })\r\n boletoExpirationDate: string\r\n @Expose({ name: 'subscription_id' })\r\n subscriptionId: string\r\n @Expose({ name: 'split_rules' })\r\n splitRules: string\r\n @Expose({ name: 'antifraud_metadata' })\r\n antifraudMetadata: any\r\n @Expose({ name: 'reference_key' })\r\n referenceKey: string\r\n @Expose({ name: 'local_transaction_id' })\r\n localTransactionId: string\r\n @Expose({ name: 'local_time' })\r\n localTime: string\r\n @Expose({ name: 'fraud_covered' })\r\n fraudCovered: boolean\r\n @Expose({ name: 'fraud_reimbursed' })\r\n fraudReimbursed: string\r\n @Expose({ name: 'order_id' })\r\n orderId: string\r\n @Expose({ name: 'risk_level' })\r\n riskLevel: string\r\n @Expose({ name: 'receipt_url' })\r\n receiptUrl: string\r\n @Expose({ name: 'private_label' })\r\n privateLabel: string\r\n @Expose({ name: 'pix_qr_code' })\r\n pixQrCode: string\r\n @Expose({ name: 'pix_expiration_date' })\r\n pixExpirationDate: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\n\r\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\r\n id: string\r\n CNPJ: string\r\n DaysToDelivery: number\r\n MaxGrams: number\r\n MinGrams: number\r\n ServiceCompanyRangeId: number\r\n ShippingCompanyId: number\r\n ShippingCompanyName: string\r\n ShippingPrice: number\r\n State: string\r\n ZipEnd: number\r\n ZipStart: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { Address } from '../../../location/models/address'\r\nimport { BaseModel } from '../../../general/model/base.model'\r\nimport { Coupon } from '../coupons/coupon'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\nimport { User } from '../../../users/models/user'\r\n\r\nimport { SubscriptionPlan } from './plan'\r\n\r\nexport class CheckoutSubscription\r\n extends BaseModel<CheckoutSubscription>\r\n implements IdentifierFields<CheckoutSubscription>\r\n{\r\n id?: string\r\n user: User\r\n createdAt: Date\r\n updatedAt: Date\r\n completedAt?: Date\r\n shippingAddress: Address\r\n subscriptionPlan: SubscriptionPlan\r\n billingAddress?: Address\r\n userId?: string\r\n coupon?: Coupon\r\n discount?: number\r\n subTotalPrice?: number\r\n totalPrice?: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../../general/model/base.model'\r\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\r\n\r\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\r\n id: string\r\n name: string\r\n billingPrice: number\r\n recurrencePrice: number\r\n recurrenceCycle: number\r\n maxAttempts: number\r\n\r\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel } from '../../general/model/base.model'\r\nimport { IdentifierFields } from '../../general/model/identifier-fields'\r\nimport { NonFunctionPropertyNames } from '../../general/model/types'\r\nimport { Shops, Category } from '../../catalog/models'\r\n\r\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\r\n active: boolean\r\n cartValue: number\r\n categories: Category[]\r\n createdAt: Date\r\n endDate: Date\r\n id?: string\r\n name: string\r\n products?: string[]\r\n shop: Shops\r\n startDate: Date\r\n updatedAt?: Date\r\n\r\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { Banner } from './types/banner.type'\r\nimport { Benefit } from './types/benefit.type'\r\n\r\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\r\n benefitsSection: Benefit\r\n blockBanners: Banner[]\r\n blogBanner: Banner\r\n brandsCarousel: Banner[]\r\n buyToWinBanner: Banner\r\n discoverCategories: string[]\r\n featuredCampaignBanner: Banner\r\n featuredCategories: string[]\r\n heroCarousel: Banner[]\r\n verticalCarousels: string[]\r\n id: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<Home>[] {\r\n return ['id']\r\n }\r\n}\r\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\r\nimport { MenuNav } from './types/menu-nav.type'\r\n\r\nexport class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {\r\n menuNav: MenuNav[]\r\n id: string\r\n\r\n identifierFields(): NonFunctionPropertyNames<ShopMenu>[] {\r\n return ['id']\r\n }\r\n}\r\n","export class InvalidArgumentError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","export class RequiredArgumentError extends Error {\r\n arguments: string[]\r\n\r\n constructor(readonly args: string[]) {\r\n super(`Required arguments: ${args.join(', ')}`)\r\n\r\n this.arguments = args\r\n }\r\n}\r\n","export class NotFoundError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","export class DuplicatedResultsError extends Error {\r\n constructor(readonly message) {\r\n super(message)\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\nimport firebase from 'firebase'\r\n\r\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\r\n return class extends MixinBase implements FirestoreRepository<TBase> {\r\n readonly firestore?: FirebaseFirestore\r\n collectionName: string\r\n model: BaseModelBuilder<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\r\n }\r\n\r\n buildModelInstance(): {\r\n toFirestore: (data: TBase) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\r\n } {\r\n return {\r\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\r\n const data = snap.data()\r\n\r\n Object.keys(data).forEach((key) => {\r\n if (data[key] instanceof firebase.firestore.Timestamp) {\r\n data[key] = data[key].toDate()\r\n }\r\n })\r\n\r\n return this.model.toInstance({ id: snap.id, ...data })\r\n },\r\n }\r\n }\r\n }\r\n}\r\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier } from '../../../../domain'\r\n\r\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\n\r\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor & TMixinBase,\r\n) => {\r\n return class extends MixinBase implements FirestoreHelpers {\r\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\r\n if (Array.isArray(snapShot)) {\r\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n } else {\r\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\r\n }\r\n }\r\n\r\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\r\n repository: FirestoreRepository<T>,\r\n ): repository is FirestoreSubRepository<T> {\r\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor } from '../../../../utils'\r\nimport { NotFoundError } from '../../../../errors'\r\n\r\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\r\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\r\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .get()\r\n const data = doc.data()\r\n\r\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\r\n\r\n return data\r\n }\r\n\r\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n FindRepository,\r\n NonFunctionPropertyNames,\r\n RepositoryFindFielters,\r\n RepositoryFindFieltersOptions,\r\n RepositoryFindResult,\r\n RepositoryLimitOptions,\r\n RepositoryOrderByList,\r\n Where,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor, isNumber, isString } from '../../../../utils'\r\n\r\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\r\n async find(\r\n filters?: RepositoryFindFielters<TBase>[],\r\n limits?: RepositoryLimitOptions<TBase>,\r\n orderBy?: RepositoryOrderByList<TBase>,\r\n ): Promise<RepositoryFindResult<TBase>> {\r\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\r\n\r\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\r\n\r\n orderBy?.forEach((orderer) =>\r\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\r\n )\r\n\r\n query = this.defineLimits(query, filters, limits)\r\n\r\n const docs = await query.get()\r\n const data = docs.docs.map((doc) => doc.data())\r\n\r\n return {\r\n data,\r\n count: this.calculateCount(data, limits),\r\n }\r\n }\r\n\r\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\r\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\r\n\r\n const parentIdField = this.parentIdField\r\n const parentId = filters.find((groupFilter) => Boolean(groupFilter[parentIdField]?.value))?.[parentIdField].value\r\n\r\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\r\n }\r\n\r\n makeFirestoreWhere = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n filter: RepositoryFindFielters<TBase>,\r\n ): Query<TBase> =>\r\n Object.keys(filter).reduce(\r\n (query: Query<TBase>, fieldName: string) =>\r\n this.buildWhereSentence(query, fieldName as NonFunctionPropertyNames<TBase>, filter[fieldName]),\r\n queryReference,\r\n )\r\n\r\n buildWhereSentence = (\r\n queryReference: CollectionReference<TBase> | Query<TBase>,\r\n fieldName: NonFunctionPropertyNames<TBase>,\r\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\r\n ): Query<TBase> => {\r\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\r\n if (options?.operator === Where.LIKE) {\r\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\r\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\r\n\r\n return queryReference\r\n }\r\n if (options?.operator === Where.IN && Array.isArray(options?.value))\r\n return queryReference.where(fieldName.toString(), 'array-contains-any', options.value)\r\n\r\n return queryReference.where(fieldName.toString(), options.operator as WhereFilterOp, options.value)\r\n }\r\n\r\n defineLimits(\r\n query: CollectionReference<TBase> | Query<TBase>,\r\n filters: RepositoryFindFielters<TBase>[],\r\n limits: RepositoryLimitOptions<TBase>,\r\n ): Query<TBase> {\r\n if (limits?.offset) {\r\n if (limits.offset instanceof this.model)\r\n query = query.startAfter(\r\n this.collection(this.buildCollectionPathForFind(filters)).doc(\r\n limits.offset[limits.offset.identifierFields().shift() as string],\r\n ),\r\n )\r\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\r\n }\r\n if (limits?.limit) query = query.limit(limits.limit)\r\n\r\n return query\r\n }\r\n\r\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\r\n if (data.length <= 0) return 0\r\n if (data.length < limits?.limit) return data.length\r\n\r\n return Infinity\r\n }\r\n }\r\n}\r\n","import { DocumentReference } from '@firebase/firestore-types'\r\n\r\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isEmpty, MixinCtor } from '../../../../utils'\r\n\r\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\r\n async create(data: Partial<TBase>): Promise<TBase> {\r\n const docRef = await this.save(this.model.toInstance(data))\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n async save(data: TBase): Promise<DocumentReference<TBase>> {\r\n const id = data[data.identifierFields().shift()]?.toString()\r\n\r\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\r\n\r\n const docRef = this.collection().doc(id)\r\n await docRef.set(data)\r\n\r\n return docRef\r\n }\r\n\r\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import firebase from 'firebase'\r\n\r\nimport {\r\n BaseModelWithIdentifier,\r\n NonFunctionPropertyNames,\r\n RepositoryUpdateParams,\r\n UpdateOptionActions,\r\n UpdateOptions,\r\n UpdateRepository,\r\n} from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\r\n\r\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n const getValueFromParams = (\r\n params: RepositoryUpdateParams<TBase>,\r\n field: NonFunctionPropertyNames<TBase>,\r\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\r\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\r\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\r\n const fieldValues = firebase.firestore.FieldValue\r\n\r\n if (isNil(options.action)) return options\r\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\r\n if (Array.isArray(options.value)) {\r\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(...options.value)\r\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(...options.value)\r\n }\r\n\r\n return options.value\r\n }\r\n\r\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\r\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\r\n const model = new this.model()\r\n const keyField = model.identifierFields().shift()\r\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\r\n getValueFromParams(data, keyField).toString(),\r\n )\r\n\r\n await docRef.update(this.paramsToPlain(data))\r\n\r\n const doc = await docRef.get()\r\n\r\n return doc.data()\r\n }\r\n\r\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\r\n this.collectionName\r\n }`\r\n : this.collectionName\r\n }\r\n\r\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\r\n const model = this.model\r\n\r\n if (params instanceof model) return params.toPlain()\r\n\r\n return Object.keys(params).reduce(\r\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(params[currentKey]) }),\r\n {},\r\n )\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\r\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\r\n await this.collection(this.buildCollectionPathForRemove(identifiers))\r\n .doc(Object.values(identifiers).shift().toString())\r\n .delete()\r\n }\r\n\r\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\r\n return this.isSubCollection(this)\r\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\r\n : this.collectionName\r\n }\r\n }\r\n}\r\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\r\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nexport const withSubCollection = <\r\n TBase extends BaseModelWithIdentifier<TBase>,\r\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\r\n TMixinBase extends MixinCtor,\r\n>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\r\n ParentModel: new () => TBaseParent,\r\n) => {\r\n return class SubCollectionMix\r\n extends MixinBase\r\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\r\n {\r\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\r\n parentIdField: NonFunctionPropertyNames<TBase>\r\n\r\n constructor(...args: Array<any>) {\r\n super(args)\r\n }\r\n\r\n collection(path?: string): CollectionReference<TBase> {\r\n return super.collection(path)\r\n }\r\n }\r\n}\r\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\r\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\r\nimport { MixinCtor } from '../../../../utils'\r\n\r\nimport { withCreateFirestore } from './with-create-firestore.mixin'\r\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\r\nimport { withFindFirestore } from './with-find-firestore.mixin'\r\nimport { withGetFirestore } from './with-get-firestore.mixin'\r\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\r\n\r\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\r\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\r\n) => {\r\n return class CrudFirestore\r\n extends withUpdateFirestore(\r\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\r\n )\r\n implements CrudRepository<TBase> {}\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\r\n implements SubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscription'\r\n this.model = Subscription\r\n }\r\n}\r\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class UserFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\r\n implements UserRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'users'\r\n this.model = User\r\n }\r\n\r\n async get(identifiers: Partial<User>): Promise<User> {\r\n const user = await super.get({ id: identifiers.id })\r\n\r\n user.beautyProfile = await this.getBeautyProfile(user.id)\r\n\r\n return user\r\n }\r\n\r\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\r\n const beautyProfile = await this.collection()\r\n .doc(userId)\r\n .collection('CX')\r\n .withConverter(this.buildBeautyProfileModelInstance())\r\n .doc('beautyProfile')\r\n .get()\r\n\r\n return beautyProfile.data()\r\n }\r\n\r\n private buildBeautyProfileModelInstance(): {\r\n toFirestore: (data: BeautyProfile) => DocumentData\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\r\n } {\r\n return {\r\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\r\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\r\n BeautyProfile.toInstance(snap.data()),\r\n }\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionEditionFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\r\n implements EditionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'editions'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = Edition\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserBeautyProfileFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\r\n implements BeautyProfileRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'CX'\r\n this.parentIdField = 'userId'\r\n this.model = BeautyProfile\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { UserFirestoreRepository } from './user-firestore.repository'\r\n\r\nexport class UserAddressFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\r\n implements UserAddressRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\r\n super()\r\n this.collectionName = 'address'\r\n this.parentIdField = 'userId'\r\n this.model = UserAddress\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\r\n\r\nexport class SubscriptionPaymentFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\r\n implements SubscriptionPaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Payments'\r\n this.parentIdField = 'subscriptionId'\r\n this.model = SubscriptionPayment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Category, CategoryRepository, Product, Shops } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\nimport { DuplicatedResultsError, NotFoundError } from '../../../../../errors'\r\n\r\nexport class CategoryFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\r\n implements CategoryRepository {\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'categories'\r\n this.model = Category\r\n }\r\n\r\n getCategoryBySlug(slug: string, shop: Shops): Promise<Category> {\r\n return this.collection(this.collectionName)\r\n .where(\"slug\", \"==\", slug)\r\n .where(\"shop\", \"==\", shop)\r\n .where(\"published\", \"==\", true)\r\n .get().then(snap => {\r\n\r\n if (snap.size > 1)\r\n throw new DuplicatedResultsError(\"Query returned duplicated values\");\r\n\r\n if (snap.empty)\r\n throw new NotFoundError(`Document with slug ${slug} not found`)\r\n\r\n return snap.docs[0].data()\r\n }).catch(error => error)\r\n }\r\n\r\n async getCategoriesForHome(categoryIds: string[]): Promise<{ title: string, products: Product[] }[]> {\r\n\r\n const categorySnap = await this.collection(this.collectionName)\r\n .where(\"id\", \"in\", categoryIds)\r\n .where(\"published\", \"==\", true)\r\n .get()\r\n\r\n if (categorySnap.empty)\r\n throw new NotFoundError(\"Categories not found\")\r\n\r\n const categories = categorySnap.docs.map(doc => doc.data())\r\n\r\n const homeSections = []\r\n\r\n for (const category of categories) {\r\n const productSnap = await this.collection(\"products\")\r\n .where(\"categories\", \"array-contains\", category.id)\r\n .where(\"published\", \"==\", true)\r\n .where(\"stock.quantity\", \">\", 1)\r\n .limit(4)\r\n .get()\r\n\r\n const products = productSnap.docs.map(doc => doc.data())\r\n\r\n homeSections.push({ title: category.name, products })\r\n }\r\n\r\n return homeSections;\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, ProductRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class ProductFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\r\n implements ProductRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'products'\r\n this.model = Product\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\r\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\r\n\r\nimport { ProductFirestoreRepository } from './product-firestore.repository'\r\n\r\nexport class ProductVariantFirestoreRepository\r\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\r\n implements VariantRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\r\n super()\r\n this.collectionName = 'Variants'\r\n this.parentIdField = 'productId'\r\n this.model = Variant\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\r\n implements CheckoutRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkouts'\r\n this.model = Checkout\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Coupon, CouponRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CouponFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\r\n implements CouponRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'coupons'\r\n this.model = Coupon\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Order, OrderRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class OrderFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\r\n implements OrderRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'orders'\r\n this.model = Order\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Payment, PaymentRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class PaymentFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\r\n implements PaymentRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'payments'\r\n this.model = Payment\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class CheckoutSubscriptionFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\r\n implements CheckoutSubscriptionRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'checkoutsSubscription'\r\n this.model = CheckoutSubscription\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class SubscriptionPlanFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\r\n implements SubscriptionPlanRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'subscriptionPlans'\r\n this.model = SubscriptionPlan\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class Buy2WinFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\r\n implements Buy2WinRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'buy2win'\r\n this.model = Buy2Win\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\n\r\nimport { Base } from '../../../../../utils'\r\nimport { Home, HomeRepository } from '../../../../../domain'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class HomeFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\r\n implements HomeRepository\r\n{\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'dms'\r\n this.model = Home\r\n }\r\n}\r\n","import { FirebaseFirestore } from '@firebase/firestore-types'\r\nimport { ShopMenu, ShopMenuRepository } from '../../../../../domain'\r\n\r\nimport { Base } from '../../../../../utils'\r\n\r\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\r\n\r\nexport class ShopMenuFirestoreRepository\r\n extends withCrudFirestore(withHelpers(withFirestore<ShopMenu>(Base)))\r\n implements ShopMenuRepository {\r\n constructor(readonly firestore: FirebaseFirestore) {\r\n super()\r\n this.collectionName = 'shopMenus'\r\n this.model = ShopMenu\r\n }\r\n}\r\n","import firebase from 'firebase/app'\r\n\r\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\r\n\r\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\r\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\r\n\r\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signInWithGoogle(): Promise<Partial<User>> {\r\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\r\n const user = credentials.user\r\n\r\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\r\n }\r\n\r\n async signOut(): Promise<void> {\r\n this.firebaseAuth.signOut()\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;MAIa,SAAS;IACpB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;KAC1B;IAED,OAAO,UAAU,CAAgC,IAA8B;QAC7E,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,CAAQ,CAAA;KACvC;IAED,OAAO;QACL,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAA;KACxD;;;ICfS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4B;QAC/C,KAAK,EAAE,CAAA;QADY,cAAS,GAAT,SAAS,CAAmB;QAE/C,IAAI,CAAC,cAAc,GAAG,WAAW,CAAA;QACjC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAA;KACtB;;;MCVU,iCAAiC;IAC5C,YAA6B,YAAgC;QAAhC,iBAAY,GAAZ,YAAY,CAAoB;KAAI;IAE3D,0BAA0B,CAAC,IAA4B;;YAC3D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YACjG,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAA;YAE7B,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAA;SACnG;KAAA;IAEK,gBAAgB;;YACpB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAIA,UAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAA;YACnG,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAA;YAE7B,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAA;SACnG;KAAA;IAEK,OAAO;;YACX,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;SAC5B;KAAA;;;ACvBH;;;;;;"}
1
+ {"version":3,"file":"infrab4a-connect.js","sources":["../../../projects/connect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/domain/shop-settings/models/shop-menu.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/errors/duplicated-results.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\n\nimport { NonFunctionProperties } from './types/non-function-properties.type'\n\nexport class BaseModel<Model> {\n constructor(args?: Partial<Model>) {\n Object.assign(this, args)\n }\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\n return plainToClass(this, data) as any\n }\n\n toPlain(): any {\n return classToPlain(this, { exposeUnsetFields: false })\n }\n}\n","export enum Where {\n EQUALS = '==',\n GT = '>',\n GTE = '>=',\n IN = 'in',\n LT = '<',\n LTE = '<=',\n LIKE = 'like',\n}\n","export enum UpdateOptionActions {\n UPDATE = 'update',\n MERGE = 'merge',\n REMOVE = 'remove',\n REMOVE_FIELD = 'removeField',\n NULL = 'null',\n}\n","export enum UserType {\n B2C = 'Cliente Transacional',\n GlamGirl = 'Glamgirl',\n MensBoy = 'Mensboy',\n B2B = 'Company',\n Collaborator = 'Funcionário',\n Influencer = 'Influencer',\n}\n","export enum BeardSizes {\n BIG = 'Grande',\n MEDIUM = 'Média',\n SHORT = 'Curta',\n MUSTACHE = 'Bigode',\n NOTHING = 'Sem Barba',\n}\n","export enum HairTypes {\n Smooth = 'Liso',\n WAVY = 'Ondulado',\n CURLY = 'Cacheado',\n FRIZZY = 'Crespo',\n BALD = 'Sou careca',\n}\n","export enum Area {\n GP = 'Geral',\n CRM = 'CRM',\n MediaProd = 'Media Production',\n Tech = 'Tecnologia',\n Transactional = 'Transacional',\n Operations = 'Opera\\u00E7\\u00F5es',\n Sales = 'Comercial',\n Finantial = 'Financeiro',\n HR = 'RH',\n}\n","export enum OfficePosition {\n Intern = 'Estagi\\u00E1rio',\n Analyst = 'Analista',\n Manager = 'Gerente',\n Director = 'Diretor',\n}\n","export enum BillingStatus {\n PAYED = 'PAGO',\n}\n","export enum EditionStatus {\n ALLOCATION_WAITING = 'Aguardando alocação',\n}\n","export enum PaymentType {\n AQUISITION = 'Aquisição',\n RENEWAL = 'Renovação',\n FREIGHT = 'mudança de endereço, Frete',\n}\n","export enum Status {\n ACTIVE = 'active',\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\n\nimport { EditionStatus, BillingStatus } from './enums'\n\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\n id: string\n subscriptionId: string\n billingStatus: BillingStatus\n editionId: number\n editionStatus: EditionStatus\n installment: number\n paymentId: string\n draftId?: string\n\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Payment } from '../../../shopping/models/payment'\n\nimport { PaymentType } from './enums/payment-type.enum'\n\nexport class SubscriptionPayment\n extends BaseModel<SubscriptionPayment>\n implements IdentifierFields<SubscriptionPayment>\n{\n id: string\n subscriptionId: string\n paymentType: PaymentType\n payment: Payment\n createdAt: Date\n attempts?: number\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\n return ['id']\n }\n}\n","import { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\nimport { User } from '../user'\n\nimport { Edition } from './edition'\nimport { Status } from './enums/status.enum'\nimport { SubscriptionPayment } from './payment'\n\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\n id: string\n nextPayment: Date\n recurrence: boolean\n status: Status\n user: User\n subscriptionPlan: SubscriptionPlan\n shippingAddress: Address\n billingAddress?: Address\n cardToken: string\n coupon?: Coupon\n subtotalPrice?: number\n discount?: number\n totalPrice?: number\n editions: Edition[]\n payment?: SubscriptionPayment[]\n createdAt: Date\n updatedAt: Date\n\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { Area, OfficePosition, UserType } from './enums'\nimport { BeautyProfile } from './beauty-profile'\n\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\n id: string\n cpf?: string\n email: string\n firstName: string\n lastName: string\n displayName?: string\n phone: string\n birthday?: Date\n acceptsNewsletter: boolean\n type?: UserType\n beautyProfile?: BeautyProfile\n area?: Area\n officePosition?: OfficePosition\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\n const instance = super.toInstance<User>(data)\n\n instance.displayName = `${data.firstName} ${data.lastName}`\n\n return instance as any\n }\n\n identifierFields(): NonFunctionPropertyNames<User>[] {\n return ['id']\n }\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.beautyProfile\n\n return plain\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nimport { BeardSizes, HairTypes } from './enums'\n\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\n id: string\n userId: string\n beardSize?: BeardSizes\n hairType?: HairTypes\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.id\n\n return plain\n }\n\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\n\nimport { LocationGeometry } from './types/location-geometry.type'\n\nexport abstract class Address extends BaseModel<Address> {\n default?: boolean\n recipient?: string\n zip?: string\n street?: string\n number?: string\n extension?: string\n district?: string\n city?: string\n regionalPole?: string\n region?: string\n state?: string\n country?: string\n mailbox?: boolean\n mailboxNumber?: string\n formattedAddress?: string\n placeId?: string\n geometry?: LocationGeometry\n}\n","import { Address } from '../../location/models/address'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nexport class UserAddress extends Address {\n id: string\n userId: string\n\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\n return ['id']\n }\n}\n","export class Base {\n constructor(...args: Array<any>) {\n Object.assign(this, ...args)\n }\n}\n","export class UnauthorizedError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { Area, OfficePosition, User, UserType } from '../models'\nimport { AuthenticationService } from '../services/authentication.service'\nimport { isNil } from '../../../utils'\nimport { UnauthorizedError } from '../errors/unauthorized.error'\nimport { UserRepository } from '../repositories/user.repository'\n\nexport enum SignInMethods {\n EMAIL_PASSWORD = 'email_password',\n GOOGLE = 'google',\n}\n\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\n\ntype SignInParams = {\n email?: string\n password?: string\n}\n\nexport class Authentication {\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\n\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\n const method = this.getServiceByMethod(signInMethod)\n const userAuth = await this.authService[method]({ email, password })\n const user = this.userRepository.get(userAuth)\n\n if (!isNil(user)) return user\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\n\n throw new UnauthorizedError('Invalid credentials')\n }\n\n private getServiceByMethod(signInMethod: SignInMethod): string {\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\n }\n\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\n const [firstName, lastName] = user.displayName?.split(/\\s/)\n const person = User.toInstance({\n ...user,\n cpf: '',\n birthday: new Date(),\n firstName,\n lastName,\n acceptsNewsletter: false,\n area: Area.Transactional,\n officePosition: OfficePosition.Intern,\n type: UserType.Collaborator,\n })\n\n return this.userRepository.create(person)\n }\n}\n","import { AuthenticationService } from '../services/authentication.service'\n\nexport class SignOut {\n constructor(private readonly authService: AuthenticationService) {}\n\n async signOut(): Promise<void> {\n await this.authService.signOut()\n }\n}\n","export enum Shops {\n MENSMARKET = `Men's Market`,\n GLAMSHOP = 'Glamshop',\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Shops } from './enums'\n\nimport { CategoryCondition, CategoryFilter } from './types'\n\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\n id: string\n brandCategory: boolean\n brandLogo?: string\n name: string\n slug: string\n image?: string\n brandCategoryBanner?: string\n description: string\n conditions?: CategoryCondition\n products?: string[]\n filters?: CategoryFilter[]\n createdAt: Date\n updatedAt: Date\n shop: Shops\n\n identifierFields(): NonFunctionPropertyNames<Category>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { Shops } from './enums/shops.enum'\nimport { ProductReview, ShopsDescription, ShopsPrice, Stock } from './types'\nimport { Variant } from './variant'\n\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\n id: string\n name: string\n slug: string\n shopAvailability: Shops[]\n description: ShopsDescription\n sku: string\n price: ShopsPrice\n hasVariants: boolean\n NCM: string\n EAN: string\n CEST: string\n weight: number\n stock: Stock\n costPrice: number\n images?: string[]\n published: boolean\n createdAt: Date\n updatedAt: Date\n brand: string\n tags?: string[]\n type?: string\n categories?: string[]\n reviews?: ProductReview[]\n variant?: Variant\n\n identifierFields(): NonFunctionPropertyNames<Product>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { ShopsPrice, Stock, VariantGrade } from './types'\n\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\n id: string\n productId: string\n sku: string\n price: ShopsPrice\n EAN: string\n stock: Stock\n grade: VariantGrade[]\n\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\n return ['id']\n }\n}\n","export enum CouponTypes {\n FINANCIAL = 1,\n PRODUCT,\n GIFTCARD,\n VOUCHER,\n}\n","export enum CouponSubtypes {\n ABSOLUTE = 1,\n PERCENTAGE,\n}\n","export enum Exclusivities {\n ALL_USERS = 1,\n SPECIFIC_USER = 2,\n COLLABORATORS = 3,\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../../general/model/base.model'\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\n\nimport { CouponTypes, Exclusivities } from './enums'\n\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\n id: string\n type: CouponTypes\n discount?: number\n user?: string\n recipient?: string\n store?: Shops\n campaign?: string\n name: string\n nickname: string\n expiresIn?: Date\n useLimit?: number\n createdAt: Date\n updatedAt?: Date\n shopAvailability: Shops\n\n @Expose({ name: 'checkout_type' })\n checkoutType: CheckoutTypes\n @Expose({ name: 'exclusivity_type' })\n exclusivityType?: Exclusivities\n\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\n return ['id']\n }\n}\n","export enum CheckoutTypes {\n ECOMMERCE = 1,\n SUBSCRIPTION = 2,\n}\n","import { Md5 } from 'ts-md5'\n\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\n\nimport { Coupon } from './coupon'\nimport { CouponTypes, CouponSubtypes } from './enums'\n\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\n\nexport class FinancialCoupon extends Coupon {\n type = CouponTypes.FINANCIAL\n subtype: CouponSubtypes\n\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\n }\n\n static createCoupon(userId: string): FinancialCoupon {\n return this.toInstance({\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\n nickname: `${Date.now()}`,\n type: CouponTypes.FINANCIAL,\n subtype: CouponSubtypes.PERCENTAGE,\n checkoutType: CheckoutTypes.ECOMMERCE,\n discount: 30,\n user: userId,\n createdAt: new Date(Date.now()),\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\n })\n }\n}\n","export enum OrderStatus {\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\n EM_PREPARO = 'Preparando pedido',\n NF_EMITIDA = 'Nota Fiscal Emitida',\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\n ENVIADO = 'Pedido Enviado',\n ENTREGUE = 'Pedido entregue',\n CANCELADO = 'Cancelado',\n CREDIT_CARD = 'credit_card',\n}\n","import { Address } from '../../location/models/address'\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { User } from '../../users/models/user'\n\nimport { Coupon } from './coupons/coupon'\nimport { LineItem } from './line-item'\nimport { ShippingMethod } from './shipping-method'\nimport { Shops } from '../../catalog/models/enums/shops.enum'\n\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\n id?: string\n paymentId?: string\n status?: string\n createdAt?: Date\n updatedAt?: Date\n completedAt?: Date\n lineItems?: LineItem[]\n user?: Partial<User>\n shippingAddress?: Partial<Address>\n billingAddress?: Partial<Address>\n shipping?: ShippingMethod\n coupon?: Coupon\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n shop: Shops\n\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\n return ['id']\n }\n}\n","import { Product } from '../../catalog/models/product'\n\nexport class LineItem extends Product {\n parentId?: string\n quantity: number\n isGift?: boolean\n pricePaid?: number\n}\n","import { Checkout } from './checkout'\nimport { OrderStatus } from './enums/order-status.enum'\nimport { Payment } from './payment'\n\nexport class Order extends Checkout {\n status: OrderStatus\n payment: Payment\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\n\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\n id: number\n object: string\n status: string\n tid: number\n nsu: number\n amount: number\n cost: number\n installments: number\n referer: string\n ip: string\n phone: string\n address: string\n metadata: any\n device: string\n payment: string\n addition: string\n discount: string\n customer: PaymentCustomer\n billing: PaymentBilling\n shipping: PaymentShipping\n items: PaymentItem[]\n card: PaymentCard\n\n @Expose({ name: 'refuse_reason' })\n refuseReason: string\n @Expose({ name: 'status_reason' })\n statusReason: string\n @Expose({ name: 'acquirer_response_code' })\n acquirerResponseCode: string\n @Expose({ name: 'acquirer_name' })\n acquirerName: string\n @Expose({ name: 'acquirer_id' })\n acquirerId: string\n @Expose({ name: 'authorization_code' })\n authorizationCode: string\n @Expose({ name: 'soft_descriptor' })\n softDescriptor: string\n @Expose({ name: 'date_created' })\n dateCreated: string\n @Expose({ name: 'date_updated' })\n dateUpdated: string\n @Expose({ name: 'authorized_amount' })\n authorizedAmount: number\n @Expose({ name: 'paid_amount' })\n paidAmount: number\n @Expose({ name: 'refunded_amount' })\n refundedAmount: number\n @Expose({ name: 'card_holder_name' })\n cardHolderName: string\n @Expose({ name: 'card_last_digits' })\n cardLastDigits: string\n @Expose({ name: 'card_first_digits' })\n cardFirstDigits: string\n @Expose({ name: 'card_brand' })\n cardBrand: string\n @Expose({ name: 'card_pin_mode' })\n cardPinMode: string\n @Expose({ name: 'card_magstripe_fallback' })\n cardMagstripeFallback: boolean\n @Expose({ name: 'cvm_pin' })\n cvmPin: boolean\n @Expose({ name: 'postback_url' })\n postbackUrl: string\n @Expose({ name: 'payment_method' })\n paymentMethod: string\n @Expose({ name: 'capture_method' })\n captureMethod: string\n @Expose({ name: 'antifraud_score' })\n antifraudScore: string\n @Expose({ name: 'boleto_url' })\n boletoUrl: string\n @Expose({ name: 'boleto_barcode' })\n boletoBarcode: string\n @Expose({ name: 'boleto_expiration_date' })\n boletoExpirationDate: string\n @Expose({ name: 'subscription_id' })\n subscriptionId: string\n @Expose({ name: 'split_rules' })\n splitRules: string\n @Expose({ name: 'antifraud_metadata' })\n antifraudMetadata: any\n @Expose({ name: 'reference_key' })\n referenceKey: string\n @Expose({ name: 'local_transaction_id' })\n localTransactionId: string\n @Expose({ name: 'local_time' })\n localTime: string\n @Expose({ name: 'fraud_covered' })\n fraudCovered: boolean\n @Expose({ name: 'fraud_reimbursed' })\n fraudReimbursed: string\n @Expose({ name: 'order_id' })\n orderId: string\n @Expose({ name: 'risk_level' })\n riskLevel: string\n @Expose({ name: 'receipt_url' })\n receiptUrl: string\n @Expose({ name: 'private_label' })\n privateLabel: string\n @Expose({ name: 'pix_qr_code' })\n pixQrCode: string\n @Expose({ name: 'pix_expiration_date' })\n pixExpirationDate: string\n\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\n id: string\n CNPJ: string\n DaysToDelivery: number\n MaxGrams: number\n MinGrams: number\n ServiceCompanyRangeId: number\n ShippingCompanyId: number\n ShippingCompanyName: string\n ShippingPrice: number\n State: string\n ZipEnd: number\n ZipStart: number\n\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\n return ['id']\n }\n}\n","import { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { User } from '../../../users/models/user'\n\nimport { SubscriptionPlan } from './plan'\n\nexport class CheckoutSubscription\n extends BaseModel<CheckoutSubscription>\n implements IdentifierFields<CheckoutSubscription>\n{\n id?: string\n user: User\n createdAt: Date\n updatedAt: Date\n completedAt?: Date\n shippingAddress: Address\n subscriptionPlan: SubscriptionPlan\n billingAddress?: Address\n userId?: string\n coupon?: Coupon\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\n\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\n id: string\n name: string\n billingPrice: number\n recurrencePrice: number\n recurrenceCycle: number\n maxAttempts: number\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { Shops, Category } from '../../catalog/models'\n\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\n active: boolean\n cartValue: number\n categories: Category[]\n createdAt: Date\n endDate: Date\n id?: string\n name: string\n products?: string[]\n shop: Shops\n startDate: Date\n updatedAt?: Date\n\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Banner } from './types/banner.type'\nimport { Benefit } from './types/benefit.type'\n\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\n benefitsSection: Benefit\n blockBanners: Banner[]\n blogBanner: Banner\n brandsCarousel: Banner[]\n buyToWinBanner: Banner\n discoverCategories: string[]\n featuredCampaignBanner: Banner\n featuredCategories: string[]\n heroCarousel: Banner[]\n verticalCarousels: string[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<Home>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { MenuNav } from './types/menu-nav.type'\n\nexport class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {\n menuNav: MenuNav[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<ShopMenu>[] {\n return ['id']\n }\n}\n","export class InvalidArgumentError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class RequiredArgumentError extends Error {\n arguments: string[]\n\n constructor(readonly args: string[]) {\n super(`Required arguments: ${args.join(', ')}`)\n\n this.arguments = args\n }\n}\n","export class NotFoundError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class DuplicatedResultsError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\nimport firebase from 'firebase'\n\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\n return class extends MixinBase implements FirestoreRepository<TBase> {\n readonly firestore?: FirebaseFirestore\n collectionName: string\n model: BaseModelBuilder<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\n }\n\n buildModelInstance(): {\n toFirestore: (data: TBase) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\n } {\n return {\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\n const data = snap.data()\n\n Object.keys(data).forEach((key) => {\n if (data[key] instanceof firebase.firestore.Timestamp) {\n data[key] = data[key].toDate()\n }\n })\n\n return this.model.toInstance({ id: snap.id, ...data })\n },\n }\n }\n }\n}\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier } from '../../../../domain'\n\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\n\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor & TMixinBase,\n) => {\n return class extends MixinBase implements FirestoreHelpers {\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\n if (Array.isArray(snapShot)) {\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n } else {\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n }\n }\n\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\n repository: FirestoreRepository<T>,\n ): repository is FirestoreSubRepository<T> {\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\n }\n }\n}\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\nimport { NotFoundError } from '../../../../errors'\n\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .get()\n const data = doc.data()\n\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\n\n return data\n }\n\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\n\nimport {\n BaseModelWithIdentifier,\n FindRepository,\n NonFunctionPropertyNames,\n RepositoryFindFielters,\n RepositoryFindFieltersOptions,\n RepositoryFindResult,\n RepositoryLimitOptions,\n RepositoryOrderByList,\n Where,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor, isNumber, isString } from '../../../../utils'\n\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\n async find(\n filters?: RepositoryFindFielters<TBase>[],\n limits?: RepositoryLimitOptions<TBase>,\n orderBy?: RepositoryOrderByList<TBase>,\n ): Promise<RepositoryFindResult<TBase>> {\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\n\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\n\n orderBy?.forEach((orderer) =>\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\n )\n\n query = this.defineLimits(query, filters, limits)\n\n const docs = await query.get()\n const data = docs.docs.map((doc) => doc.data())\n\n return {\n data,\n count: this.calculateCount(data, limits),\n }\n }\n\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\n\n const parentIdField = this.parentIdField\n const parentId = filters.find((groupFilter) => Boolean(groupFilter[parentIdField]?.value))?.[parentIdField].value\n\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\n }\n\n makeFirestoreWhere = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n filter: RepositoryFindFielters<TBase>,\n ): Query<TBase> =>\n Object.keys(filter).reduce(\n (query: Query<TBase>, fieldName: string) =>\n this.buildWhereSentence(query, fieldName as NonFunctionPropertyNames<TBase>, filter[fieldName]),\n queryReference,\n )\n\n buildWhereSentence = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n fieldName: NonFunctionPropertyNames<TBase>,\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\n ): Query<TBase> => {\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\n if (options?.operator === Where.LIKE) {\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\n\n return queryReference\n }\n if (options?.operator === Where.IN && Array.isArray(options?.value))\n return queryReference.where(fieldName.toString(), 'array-contains-any', options.value)\n\n return queryReference.where(fieldName.toString(), options.operator as WhereFilterOp, options.value)\n }\n\n defineLimits(\n query: CollectionReference<TBase> | Query<TBase>,\n filters: RepositoryFindFielters<TBase>[],\n limits: RepositoryLimitOptions<TBase>,\n ): Query<TBase> {\n if (limits?.offset) {\n if (limits.offset instanceof this.model)\n query = query.startAfter(\n this.collection(this.buildCollectionPathForFind(filters)).doc(\n limits.offset[limits.offset.identifierFields().shift() as string],\n ),\n )\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\n }\n if (limits?.limit) query = query.limit(limits.limit)\n\n return query\n }\n\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\n if (data.length <= 0) return 0\n if (data.length < limits?.limit) return data.length\n\n return Infinity\n }\n }\n}\n","import { DocumentReference } from '@firebase/firestore-types'\n\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isEmpty, MixinCtor } from '../../../../utils'\n\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\n async create(data: Partial<TBase>): Promise<TBase> {\n const docRef = await this.save(this.model.toInstance(data))\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n async save(data: TBase): Promise<DocumentReference<TBase>> {\n const id = data[data.identifierFields().shift()]?.toString()\n\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\n\n const docRef = this.collection().doc(id)\n await docRef.set(data)\n\n return docRef\n }\n\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import firebase from 'firebase'\n\nimport {\n BaseModelWithIdentifier,\n NonFunctionPropertyNames,\n RepositoryUpdateParams,\n UpdateOptionActions,\n UpdateOptions,\n UpdateRepository,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\n\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n const getValueFromParams = (\n params: RepositoryUpdateParams<TBase>,\n field: NonFunctionPropertyNames<TBase>,\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\n const fieldValues = firebase.firestore.FieldValue\n\n if (isNil(options.action)) return options\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\n if (Array.isArray(options.value)) {\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(...options.value)\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(...options.value)\n }\n\n return options.value\n }\n\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\n const model = new this.model()\n const keyField = model.identifierFields().shift()\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\n getValueFromParams(data, keyField).toString(),\n )\n\n await docRef.update(this.paramsToPlain(data))\n\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\n this.collectionName\n }`\n : this.collectionName\n }\n\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\n const model = this.model\n\n if (params instanceof model) return params.toPlain()\n\n return Object.keys(params).reduce(\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(params[currentKey]) }),\n {},\n )\n }\n }\n}\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\n await this.collection(this.buildCollectionPathForRemove(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .delete()\n }\n\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withSubCollection = <\n TBase extends BaseModelWithIdentifier<TBase>,\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\n TMixinBase extends MixinCtor,\n>(\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\n ParentModel: new () => TBaseParent,\n) => {\n return class SubCollectionMix\n extends MixinBase\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\n {\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\n parentIdField: NonFunctionPropertyNames<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return super.collection(path)\n }\n }\n}\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nimport { withCreateFirestore } from './with-create-firestore.mixin'\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\nimport { withFindFirestore } from './with-find-firestore.mixin'\nimport { withGetFirestore } from './with-get-firestore.mixin'\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\n\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CrudFirestore\n extends withUpdateFirestore(\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\n )\n implements CrudRepository<TBase> {}\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\n implements SubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscription'\n this.model = Subscription\n }\n}\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class UserFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\n implements UserRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'users'\n this.model = User\n }\n\n async get(identifiers: Partial<User>): Promise<User> {\n const user = await super.get({ id: identifiers.id })\n\n user.beautyProfile = await this.getBeautyProfile(user.id)\n\n return user\n }\n\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\n const beautyProfile = await this.collection()\n .doc(userId)\n .collection('CX')\n .withConverter(this.buildBeautyProfileModelInstance())\n .doc('beautyProfile')\n .get()\n\n return beautyProfile.data()\n }\n\n private buildBeautyProfileModelInstance(): {\n toFirestore: (data: BeautyProfile) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\n } {\n return {\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\n BeautyProfile.toInstance(snap.data()),\n }\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionEditionFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\n implements EditionRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'editions'\n this.parentIdField = 'subscriptionId'\n this.model = Edition\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserBeautyProfileFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\n implements BeautyProfileRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'CX'\n this.parentIdField = 'userId'\n this.model = BeautyProfile\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserAddressFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\n implements UserAddressRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'address'\n this.parentIdField = 'userId'\n this.model = UserAddress\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionPaymentFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\n implements SubscriptionPaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'Payments'\n this.parentIdField = 'subscriptionId'\n this.model = SubscriptionPayment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Category, CategoryRepository, Product, Shops } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\nimport { DuplicatedResultsError, NotFoundError } from '../../../../../errors'\n\nexport class CategoryFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\n implements CategoryRepository {\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'categories'\n this.model = Category\n }\n\n getCategoryBySlug(slug: string, shop: Shops): Promise<Category> {\n return this.collection(this.collectionName)\n .where(\"slug\", \"==\", slug)\n .where(\"shop\", \"==\", shop)\n .where(\"published\", \"==\", true)\n .get().then(snap => {\n\n if (snap.size > 1)\n throw new DuplicatedResultsError(\"Query returned duplicated values\");\n\n if (snap.empty)\n throw new NotFoundError(`Document with slug ${slug} not found`)\n\n return snap.docs[0].data()\n }).catch(error => error)\n }\n\n async getCategoriesForHome(categoryIds: string[]): Promise<{ title: string, products: Product[] }[]> {\n\n const categorySnap = await this.collection(this.collectionName)\n .where(\"id\", \"in\", categoryIds)\n .where(\"published\", \"==\", true)\n .get()\n\n if (categorySnap.empty)\n throw new NotFoundError(\"Categories not found\")\n\n const categories = categorySnap.docs.map(doc => doc.data())\n\n const homeSections = []\n\n for (const category of categories) {\n const productSnap = await this.collection(\"products\")\n .where(\"categories\", \"array-contains\", category.id)\n .where(\"published\", \"==\", true)\n .where(\"stock.quantity\", \">\", 1)\n .limit(4)\n .get()\n\n const products = productSnap.docs.map(doc => doc.data())\n\n homeSections.push({ title: category.name, products })\n }\n\n return homeSections;\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, ProductRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ProductFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\n implements ProductRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'products'\n this.model = Product\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { ProductFirestoreRepository } from './product-firestore.repository'\n\nexport class ProductVariantFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\n implements VariantRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\n super()\n this.collectionName = 'variants'\n this.parentIdField = 'productId'\n this.model = Variant\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\n implements CheckoutRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkouts'\n this.model = Checkout\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Coupon, CouponRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CouponFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\n implements CouponRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'coupons'\n this.model = Coupon\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Order, OrderRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class OrderFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\n implements OrderRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'orders'\n this.model = Order\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Payment, PaymentRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class PaymentFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\n implements PaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'payments'\n this.model = Payment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutSubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\n implements CheckoutSubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkoutsSubscription'\n this.model = CheckoutSubscription\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionPlanFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\n implements SubscriptionPlanRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscriptionPlans'\n this.model = SubscriptionPlan\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class Buy2WinFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\n implements Buy2WinRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'buy2win'\n this.model = Buy2Win\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Home, HomeRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class HomeFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\n implements HomeRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'dms'\n this.model = Home\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\nimport { ShopMenu, ShopMenuRepository } from '../../../../../domain'\n\nimport { Base } from '../../../../../utils'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ShopMenuFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<ShopMenu>(Base)))\n implements ShopMenuRepository {\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'shopMenus'\n this.model = ShopMenu\n }\n}\n","import firebase from 'firebase/app'\n\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\n\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\n\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signInWithGoogle(): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signOut(): Promise<void> {\n this.firebaseAuth.signOut()\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;MAIa,SAAS;IACpB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;KAC1B;IAED,OAAO,UAAU,CAAgC,IAA8B;QAC7E,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,CAAQ,CAAA;KACvC;IAED,OAAO;QACL,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAA;KACxD;;;ICfS;AAAZ,WAAY,KAAK;IACf,sBAAa,CAAA;IACb,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,kBAAS,CAAA;IACT,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,sBAAa,CAAA;AACf,CAAC,EARW,KAAK,KAAL,KAAK;;ICA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C;QAAhC,iBAAY,GAAZ,YAAY,CAAoB;KAAI;IAE3D,0BAA0B,CAAC,IAA4B;;YAC3D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YACjG,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAA;YAE7B,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAA;SACnG;KAAA;IAEK,gBAAgB;;YACpB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAIA,UAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAA;YACnG,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAA;YAE7B,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAA;SACnG;KAAA;IAEK,OAAO;;YACX,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;SAC5B;KAAA;;;ACvBH;;;;;;"}
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@infrab4a/connect" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@infrab4a/connect" />
5
+ export * from './public-api';
@@ -1,2 +1,2 @@
1
- export * from './models';
2
- export * from './repositories';
1
+ export * from './models';
2
+ export * from './repositories';
@@ -1,20 +1,20 @@
1
- import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
2
- import { Shops } from './enums';
3
- import { CategoryCondition, CategoryFilter } from './types';
4
- export declare class Category extends BaseModel<Category> implements IdentifierFields<Category> {
5
- id: string;
6
- brandCategory: boolean;
7
- brandLogo?: string;
8
- name: string;
9
- slug: string;
10
- image?: string;
11
- brandCategoryBanner?: string;
12
- description: string;
13
- conditions?: CategoryCondition;
14
- products?: string[];
15
- filters?: CategoryFilter[];
16
- createdAt: Date;
17
- updatedAt: Date;
18
- shop: Shops;
19
- identifierFields(): NonFunctionPropertyNames<Category>[];
20
- }
1
+ import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
2
+ import { Shops } from './enums';
3
+ import { CategoryCondition, CategoryFilter } from './types';
4
+ export declare class Category extends BaseModel<Category> implements IdentifierFields<Category> {
5
+ id: string;
6
+ brandCategory: boolean;
7
+ brandLogo?: string;
8
+ name: string;
9
+ slug: string;
10
+ image?: string;
11
+ brandCategoryBanner?: string;
12
+ description: string;
13
+ conditions?: CategoryCondition;
14
+ products?: string[];
15
+ filters?: CategoryFilter[];
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ shop: Shops;
19
+ identifierFields(): NonFunctionPropertyNames<Category>[];
20
+ }
@@ -1 +1 @@
1
- export * from './shops.enum';
1
+ export * from './shops.enum';
@@ -1,4 +1,4 @@
1
- export declare enum Shops {
2
- MENSMARKET = "Men's Market",
3
- GLAMSHOP = "Glamshop"
4
- }
1
+ export declare enum Shops {
2
+ MENSMARKET = "Men's Market",
3
+ GLAMSHOP = "Glamshop"
4
+ }
@@ -1,5 +1,5 @@
1
- export * from './enums';
2
- export * from './types';
3
- export * from './category';
4
- export * from './product';
5
- export * from './variant';
1
+ export * from './enums';
2
+ export * from './types';
3
+ export * from './category';
4
+ export * from './product';
5
+ export * from './variant';