@infrab4a/connect 0.17.1-beta.3 → 1.0.0-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 (970) hide show
  1. package/README.md +24 -24
  2. package/bundles/infrab4a-connect.umd.js +2261 -2463
  3. package/bundles/infrab4a-connect.umd.js.map +1 -1
  4. package/esm2015/infrab4a-connect.js +5 -5
  5. package/esm2015/lib/domain/catalog/index.js +3 -0
  6. package/esm2015/lib/domain/catalog/models/category.js +7 -0
  7. package/esm2015/lib/domain/catalog/models/enums/index.js +2 -0
  8. package/esm2015/lib/domain/catalog/models/enums/shops.enum.js +6 -0
  9. package/esm2015/lib/domain/catalog/models/index.js +6 -0
  10. package/esm2015/lib/domain/catalog/models/product.js +11 -0
  11. package/esm2015/lib/domain/catalog/models/types/category-condition.type.js +2 -0
  12. package/esm2015/lib/domain/catalog/models/types/category-filter.type.js +2 -0
  13. package/esm2015/lib/domain/catalog/models/types/index.js +8 -0
  14. package/esm2015/lib/domain/catalog/models/types/product-review.type.js +2 -0
  15. package/esm2015/lib/domain/catalog/models/types/shops-description.type.js +2 -0
  16. package/esm2015/lib/domain/catalog/models/types/shops-price.type.js +2 -0
  17. package/esm2015/lib/domain/catalog/models/types/stock.type.js +2 -0
  18. package/esm2015/lib/domain/catalog/models/types/variant-grade.type.js +2 -0
  19. package/esm2015/lib/domain/catalog/models/variant.js +7 -0
  20. package/esm2015/lib/domain/catalog/repositories/category.repository.js +2 -0
  21. package/esm2015/lib/domain/catalog/repositories/index.js +5 -0
  22. package/esm2015/lib/domain/catalog/repositories/product.repository.js +2 -0
  23. package/esm2015/lib/domain/catalog/repositories/subscription-product.repository.js +2 -0
  24. package/esm2015/lib/domain/catalog/repositories/variant.repository.js +2 -0
  25. package/esm2015/lib/domain/general/index.js +3 -0
  26. package/esm2015/lib/domain/general/model/base-model-with-identifier-fields.js +2 -0
  27. package/esm2015/lib/domain/general/model/base.model.js +13 -0
  28. package/esm2015/lib/domain/general/model/identifier-fields.js +2 -0
  29. package/esm2015/lib/domain/general/model/index.js +5 -0
  30. package/esm2015/lib/domain/general/model/types/base-model-builder.type.js +2 -0
  31. package/esm2015/lib/domain/general/model/types/index.js +4 -0
  32. package/esm2015/lib/domain/general/model/types/non-function-properties.type.js +2 -0
  33. package/esm2015/lib/domain/general/model/types/non-function-property-name.type.js +2 -0
  34. package/esm2015/lib/domain/general/repository/create.repository.js +2 -0
  35. package/esm2015/lib/domain/general/repository/crud.repository.js +2 -0
  36. package/esm2015/lib/domain/general/repository/delete.repository.js +2 -0
  37. package/esm2015/lib/domain/general/repository/enums/index.js +3 -0
  38. package/esm2015/lib/domain/general/repository/enums/update-option-actions.enum.js +9 -0
  39. package/esm2015/lib/domain/general/repository/enums/where.enum.js +12 -0
  40. package/esm2015/lib/domain/general/repository/find.repository.js +2 -0
  41. package/esm2015/lib/domain/general/repository/get.repository.js +2 -0
  42. package/esm2015/lib/domain/general/repository/index.js +10 -0
  43. package/esm2015/lib/domain/general/repository/read.repository.js +2 -0
  44. package/esm2015/lib/domain/general/repository/types/index.js +6 -0
  45. package/esm2015/lib/domain/general/repository/types/repository-find-filters.type.js +2 -0
  46. package/esm2015/lib/domain/general/repository/types/repository-find-result.type.js +2 -0
  47. package/esm2015/lib/domain/general/repository/types/repository-limit-options.type.js +2 -0
  48. package/esm2015/lib/domain/general/repository/types/repository-order-by-list.type.js +2 -0
  49. package/esm2015/lib/domain/general/repository/types/repository-update-params.type.js +2 -0
  50. package/esm2015/lib/domain/general/repository/update.repository.js +2 -0
  51. package/esm2015/lib/domain/index.js +7 -0
  52. package/esm2015/lib/domain/location/index.js +2 -0
  53. package/esm2015/lib/domain/location/models/address.js +4 -0
  54. package/esm2015/lib/domain/location/models/index.js +3 -0
  55. package/esm2015/lib/domain/location/models/types/index.js +4 -0
  56. package/esm2015/lib/domain/location/models/types/location-bound.type.js +2 -0
  57. package/esm2015/lib/domain/location/models/types/location-geometry.type.js +2 -0
  58. package/esm2015/lib/domain/location/models/types/location-lat-lng.type.js +2 -0
  59. package/esm2015/lib/domain/shop-settings/enums/filter-type.enum.js +21 -0
  60. package/esm2015/lib/domain/shop-settings/enums/index.js +3 -0
  61. package/esm2015/lib/domain/shop-settings/enums/questions-filters.enum.js +21 -0
  62. package/esm2015/lib/domain/shop-settings/helpers/beauty-questions.helper.js +46 -0
  63. package/esm2015/lib/domain/shop-settings/helpers/index.js +2 -0
  64. package/esm2015/lib/domain/shop-settings/index.js +5 -0
  65. package/esm2015/lib/domain/shop-settings/models/home.js +7 -0
  66. package/esm2015/lib/domain/shop-settings/models/index.js +4 -0
  67. package/esm2015/lib/domain/shop-settings/models/shop-menu.js +7 -0
  68. package/esm2015/lib/domain/shop-settings/models/types/banner.type.js +2 -0
  69. package/esm2015/lib/domain/shop-settings/models/types/benefit.type.js +2 -0
  70. package/esm2015/lib/domain/shop-settings/models/types/index.js +5 -0
  71. package/esm2015/lib/domain/shop-settings/models/types/menu-nav.type.js +2 -0
  72. package/esm2015/lib/domain/shop-settings/models/types/sub-menu.type.js +2 -0
  73. package/esm2015/lib/domain/shop-settings/repositories/home.repository.js +2 -0
  74. package/esm2015/lib/domain/shop-settings/repositories/index.js +3 -0
  75. package/esm2015/lib/domain/shop-settings/repositories/shop-menu.repository.js +2 -0
  76. package/esm2015/lib/domain/shopping/index.js +3 -0
  77. package/esm2015/lib/domain/shopping/models/buy-2-win.js +14 -0
  78. package/esm2015/lib/domain/shopping/models/checkout.js +38 -0
  79. package/esm2015/lib/domain/shopping/models/coupons/club-coupon.js +23 -0
  80. package/esm2015/lib/domain/shopping/models/coupons/coupon.js +23 -0
  81. package/esm2015/lib/domain/shopping/models/coupons/enums/discount-type.enum.js +7 -0
  82. package/esm2015/lib/domain/shopping/models/coupons/enums/exclusivities.enum.js +7 -0
  83. package/esm2015/lib/domain/shopping/models/coupons/enums/index.js +3 -0
  84. package/esm2015/lib/domain/shopping/models/coupons/index.js +5 -0
  85. package/esm2015/lib/domain/shopping/models/coupons/store-coupon.js +23 -0
  86. package/esm2015/lib/domain/shopping/models/enums/checkout-types.enum.js +6 -0
  87. package/esm2015/lib/domain/shopping/models/enums/index.js +3 -0
  88. package/esm2015/lib/domain/shopping/models/enums/order-status.enum.js +12 -0
  89. package/esm2015/lib/domain/shopping/models/index.js +12 -0
  90. package/esm2015/lib/domain/shopping/models/line-item.js +4 -0
  91. package/esm2015/lib/domain/shopping/models/order.js +11 -0
  92. package/esm2015/lib/domain/shopping/models/payment.js +169 -0
  93. package/esm2015/lib/domain/shopping/models/shipping-method.js +7 -0
  94. package/esm2015/lib/domain/shopping/models/subscription/checkout.js +28 -0
  95. package/esm2015/lib/domain/shopping/models/subscription/index.js +3 -0
  96. package/esm2015/lib/domain/shopping/models/subscription/plan.js +7 -0
  97. package/esm2015/lib/domain/shopping/models/types/index.js +8 -0
  98. package/esm2015/lib/domain/shopping/models/types/payment-address.type.js +2 -0
  99. package/esm2015/lib/domain/shopping/models/types/payment-billing.type.js +2 -0
  100. package/esm2015/lib/domain/shopping/models/types/payment-card.type.js +2 -0
  101. package/esm2015/lib/domain/shopping/models/types/payment-customer.type.js +2 -0
  102. package/esm2015/lib/domain/shopping/models/types/payment-document.type.js +2 -0
  103. package/esm2015/lib/domain/shopping/models/types/payment-item.type.js +2 -0
  104. package/esm2015/lib/domain/shopping/models/types/payment-shipping.type.js +2 -0
  105. package/esm2015/lib/domain/shopping/repositories/buy-2-win.repository.js +2 -0
  106. package/esm2015/lib/domain/shopping/repositories/checkout.repository.js +2 -0
  107. package/esm2015/lib/domain/shopping/repositories/coupon.repository.js +2 -0
  108. package/esm2015/lib/domain/shopping/repositories/index.js +8 -0
  109. package/esm2015/lib/domain/shopping/repositories/legacy-order.repository.js +2 -0
  110. package/esm2015/lib/domain/shopping/repositories/order.repository.js +2 -0
  111. package/esm2015/lib/domain/shopping/repositories/payment.repository.js +2 -0
  112. package/esm2015/lib/domain/shopping/repositories/subscription/checkout.repository.js +2 -0
  113. package/esm2015/lib/domain/shopping/repositories/subscription/index.js +3 -0
  114. package/esm2015/lib/domain/shopping/repositories/subscription/plan.repository.js +2 -0
  115. package/esm2015/lib/domain/users/errors/index.js +4 -0
  116. package/esm2015/lib/domain/users/errors/unauthorized.error.js +7 -0
  117. package/esm2015/lib/domain/users/errors/user-already-registered.error.js +7 -0
  118. package/esm2015/lib/domain/users/errors/weak-password.error.js +7 -0
  119. package/esm2015/lib/domain/users/index.js +6 -0
  120. package/esm2015/lib/domain/users/models/beauty-profile.js +12 -0
  121. package/esm2015/lib/domain/users/models/enums/accessory-importances.enum.js +7 -0
  122. package/esm2015/lib/domain/users/models/enums/area.enum.js +13 -0
  123. package/esm2015/lib/domain/users/models/enums/beard-problems.enum.js +11 -0
  124. package/esm2015/lib/domain/users/models/enums/beard-sizes.enum.js +9 -0
  125. package/esm2015/lib/domain/users/models/enums/beauty-product-importances.enum.js +8 -0
  126. package/esm2015/lib/domain/users/models/enums/body-problems.enum.js +13 -0
  127. package/esm2015/lib/domain/users/models/enums/body-shapes.enum.js +9 -0
  128. package/esm2015/lib/domain/users/models/enums/body-tattoos.enum.js +7 -0
  129. package/esm2015/lib/domain/users/models/enums/face-skin-oilinesses.enum.js +9 -0
  130. package/esm2015/lib/domain/users/models/enums/face-skin-problems.enum.js +12 -0
  131. package/esm2015/lib/domain/users/models/enums/face-skin-tones.enum.js +10 -0
  132. package/esm2015/lib/domain/users/models/enums/family-incomes.enum.js +10 -0
  133. package/esm2015/lib/domain/users/models/enums/fragrance-importances.enum.js +7 -0
  134. package/esm2015/lib/domain/users/models/enums/hair-colors.enum.js +12 -0
  135. package/esm2015/lib/domain/users/models/enums/hair-problems.enum.js +12 -0
  136. package/esm2015/lib/domain/users/models/enums/hair-strands.enum.js +10 -0
  137. package/esm2015/lib/domain/users/models/enums/hair-types.enum.js +9 -0
  138. package/esm2015/lib/domain/users/models/enums/index.js +21 -0
  139. package/esm2015/lib/domain/users/models/enums/office-position.enum.js +8 -0
  140. package/esm2015/lib/domain/users/models/enums/product-spents.enum.js +10 -0
  141. package/esm2015/lib/domain/users/models/enums/user-type.enum.js +10 -0
  142. package/esm2015/lib/domain/users/models/index.js +8 -0
  143. package/esm2015/lib/domain/users/models/lead.js +7 -0
  144. package/esm2015/lib/domain/users/models/subscription/edition.js +7 -0
  145. package/esm2015/lib/domain/users/models/subscription/enums/billing-status.enum.js +5 -0
  146. package/esm2015/lib/domain/users/models/subscription/enums/edition-status.enum.js +6 -0
  147. package/esm2015/lib/domain/users/models/subscription/enums/index.js +5 -0
  148. package/esm2015/lib/domain/users/models/subscription/enums/payment-type.enum.js +7 -0
  149. package/esm2015/lib/domain/users/models/subscription/enums/status.enum.js +6 -0
  150. package/esm2015/lib/domain/users/models/subscription/index.js +5 -0
  151. package/esm2015/lib/domain/users/models/subscription/payment.js +14 -0
  152. package/esm2015/lib/domain/users/models/subscription/subscription.js +43 -0
  153. package/esm2015/lib/domain/users/models/user-address.js +7 -0
  154. package/esm2015/lib/domain/users/models/user-payment-method.js +7 -0
  155. package/esm2015/lib/domain/users/models/user.js +26 -0
  156. package/esm2015/lib/domain/users/repositories/beauty-profile.repository.js +2 -0
  157. package/esm2015/lib/domain/users/repositories/edition.repository.js +2 -0
  158. package/esm2015/lib/domain/users/repositories/index.js +9 -0
  159. package/esm2015/lib/domain/users/repositories/lead.repository.js +2 -0
  160. package/esm2015/lib/domain/users/repositories/subscription-payment.repository.js +2 -0
  161. package/esm2015/lib/domain/users/repositories/subscription.repository.js +2 -0
  162. package/esm2015/lib/domain/users/repositories/user-address.repository.js +2 -0
  163. package/esm2015/lib/domain/users/repositories/user-payment-method.repository.js +2 -0
  164. package/esm2015/lib/domain/users/repositories/user.repository.js +2 -0
  165. package/esm2015/lib/domain/users/services/authentication.service.js +2 -0
  166. package/esm2015/lib/domain/users/services/index.js +4 -0
  167. package/esm2015/lib/domain/users/services/register.service.js +2 -0
  168. package/esm2015/lib/domain/users/services/types/basic-user-data.type.js +2 -0
  169. package/esm2015/lib/domain/users/services/types/index.js +2 -0
  170. package/esm2015/lib/domain/users/use-cases/authentication.js +40 -0
  171. package/esm2015/lib/domain/users/use-cases/index.js +4 -0
  172. package/esm2015/lib/domain/users/use-cases/register.js +34 -0
  173. package/esm2015/lib/domain/users/use-cases/signout.js +12 -0
  174. package/esm2015/lib/errors/duplicated-results.error.js +7 -0
  175. package/esm2015/lib/errors/index.js +5 -0
  176. package/esm2015/lib/errors/invalid-argument.error.js +7 -0
  177. package/esm2015/lib/errors/not-found.error.js +7 -0
  178. package/esm2015/lib/errors/required-argument.error.js +8 -0
  179. package/esm2015/lib/index.js +5 -0
  180. package/esm2015/lib/infra/firebase/auth/authentication-firebase-auth.service.js +47 -0
  181. package/esm2015/lib/infra/firebase/auth/index.js +3 -0
  182. package/esm2015/lib/infra/firebase/auth/register-firebase-auth.service.js +26 -0
  183. package/esm2015/lib/infra/firebase/auth/types/firebase-user-with-id.type.js +2 -0
  184. package/esm2015/lib/infra/firebase/firestore/index.js +4 -0
  185. package/esm2015/lib/infra/firebase/firestore/mixins/index.js +10 -0
  186. package/esm2015/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +31 -0
  187. package/esm2015/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +10 -0
  188. package/esm2015/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +18 -0
  189. package/esm2015/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +76 -0
  190. package/esm2015/lib/infra/firebase/firestore/mixins/with-firestore.mixin.js +26 -0
  191. package/esm2015/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +24 -0
  192. package/esm2015/lib/infra/firebase/firestore/mixins/with-helpers.mixin.js +17 -0
  193. package/esm2015/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +11 -0
  194. package/esm2015/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +45 -0
  195. package/esm2015/lib/infra/firebase/firestore/models/user-search.js +7 -0
  196. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +78 -0
  197. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/index.js +5 -0
  198. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +23 -0
  199. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.js +14 -0
  200. package/esm2015/lib/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.js +12 -0
  201. package/esm2015/lib/infra/firebase/firestore/repositories/index.js +5 -0
  202. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.js +12 -0
  203. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/index.js +3 -0
  204. package/esm2015/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +12 -0
  205. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +12 -0
  206. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.js +12 -0
  207. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.js +12 -0
  208. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +39 -0
  209. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/index.js +9 -0
  210. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.js +9 -0
  211. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.js +12 -0
  212. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.js +12 -0
  213. package/esm2015/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.js +12 -0
  214. package/esm2015/lib/infra/firebase/firestore/repositories/users/index.js +10 -0
  215. package/esm2015/lib/infra/firebase/firestore/repositories/users/lead-firestore.repository.js +12 -0
  216. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.js +14 -0
  217. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.js +12 -0
  218. package/esm2015/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.js +14 -0
  219. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.js +14 -0
  220. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.js +14 -0
  221. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.js +70 -0
  222. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.js +14 -0
  223. package/esm2015/lib/infra/firebase/firestore/repositories/users/user-search-firestore.repository.js +12 -0
  224. package/esm2015/lib/infra/firebase/firestore/types/firestore-sub.repository.type.js +2 -0
  225. package/esm2015/lib/infra/firebase/firestore/types/firestore.helpers.type.js +2 -0
  226. package/esm2015/lib/infra/firebase/firestore/types/firestore.repository.type.js +2 -0
  227. package/esm2015/lib/infra/firebase/firestore/types/index.js +4 -0
  228. package/esm2015/lib/infra/firebase/index.js +3 -0
  229. package/esm2015/lib/infra/index.js +2 -0
  230. package/esm2015/lib/utils/index.js +5 -0
  231. package/esm2015/lib/utils/mixins/base.mixin.js +6 -0
  232. package/esm2015/lib/utils/mixins/index.js +3 -0
  233. package/esm2015/lib/utils/mixins/mixin-ctor.type.js +2 -0
  234. package/esm2015/lib/utils/types/index.js +2 -0
  235. package/esm2015/lib/utils/types/prop.type.js +2 -0
  236. package/esm2015/public-api.js +3 -0
  237. package/fesm2015/infrab4a-connect.js +1541 -1687
  238. package/fesm2015/infrab4a-connect.js.map +1 -1
  239. package/infrab4a-connect.d.ts +5 -5
  240. package/lib/domain/catalog/index.d.ts +2 -0
  241. package/lib/domain/catalog/models/category.d.ts +22 -0
  242. package/lib/domain/catalog/models/enums/index.d.ts +1 -0
  243. package/lib/domain/catalog/models/enums/shops.enum.d.ts +4 -0
  244. package/lib/domain/catalog/models/index.d.ts +5 -0
  245. package/lib/domain/catalog/models/product.d.ts +33 -0
  246. package/lib/domain/catalog/models/types/category-condition.type.d.ts +4 -0
  247. package/lib/domain/catalog/models/types/category-filter.type.d.ts +4 -0
  248. package/lib/domain/catalog/models/types/index.d.ts +7 -0
  249. package/lib/domain/catalog/models/types/product-review.type.d.ts +14 -0
  250. package/lib/domain/catalog/models/types/shops-description.type.d.ts +7 -0
  251. package/lib/domain/catalog/models/types/shops-price.type.d.ts +10 -0
  252. package/lib/domain/catalog/models/types/stock.type.d.ts +3 -0
  253. package/lib/domain/catalog/models/types/variant-grade.type.d.ts +4 -0
  254. package/lib/domain/catalog/models/variant.d.ts +14 -0
  255. package/lib/domain/catalog/repositories/category.repository.d.ts +12 -0
  256. package/lib/domain/catalog/repositories/index.d.ts +4 -0
  257. package/lib/domain/catalog/repositories/product.repository.d.ts +5 -0
  258. package/lib/domain/catalog/repositories/subscription-product.repository.d.ts +4 -0
  259. package/lib/domain/catalog/repositories/variant.repository.d.ts +4 -0
  260. package/lib/domain/general/index.d.ts +2 -0
  261. package/lib/domain/general/model/base-model-with-identifier-fields.d.ts +3 -0
  262. package/lib/domain/general/model/base.model.d.ts +6 -0
  263. package/lib/domain/general/model/identifier-fields.d.ts +4 -0
  264. package/lib/domain/general/model/index.d.ts +4 -0
  265. package/lib/domain/general/model/types/base-model-builder.type.d.ts +5 -0
  266. package/lib/domain/general/model/types/index.d.ts +3 -0
  267. package/lib/domain/general/model/types/non-function-properties.type.d.ts +2 -0
  268. package/lib/domain/general/model/types/non-function-property-name.type.d.ts +3 -0
  269. package/lib/domain/general/repository/create.repository.d.ts +5 -0
  270. package/lib/domain/general/repository/crud.repository.d.ts +7 -0
  271. package/lib/domain/general/repository/delete.repository.d.ts +5 -0
  272. package/lib/domain/general/repository/enums/index.d.ts +2 -0
  273. package/lib/domain/general/repository/enums/update-option-actions.enum.d.ts +7 -0
  274. package/lib/domain/general/repository/enums/where.enum.d.ts +10 -0
  275. package/lib/domain/general/repository/find.repository.d.ts +5 -0
  276. package/lib/domain/general/repository/get.repository.d.ts +5 -0
  277. package/lib/domain/general/repository/index.d.ts +9 -0
  278. package/lib/domain/general/repository/read.repository.d.ts +5 -0
  279. package/lib/domain/general/repository/types/index.d.ts +5 -0
  280. package/lib/domain/general/repository/types/repository-find-filters.type.d.ts +14 -0
  281. package/lib/domain/general/repository/types/repository-find-result.type.d.ts +4 -0
  282. package/lib/domain/general/repository/types/repository-limit-options.type.d.ts +4 -0
  283. package/lib/domain/general/repository/types/repository-order-by-list.type.d.ts +5 -0
  284. package/lib/domain/general/repository/types/repository-update-params.type.d.ts +11 -0
  285. package/lib/domain/general/repository/update.repository.d.ts +5 -0
  286. package/lib/domain/index.d.ts +6 -0
  287. package/lib/domain/location/index.d.ts +1 -0
  288. package/lib/domain/location/models/address.d.ts +21 -0
  289. package/lib/domain/location/models/index.d.ts +2 -0
  290. package/lib/domain/location/models/types/index.d.ts +3 -0
  291. package/lib/domain/location/models/types/location-bound.type.d.ts +6 -0
  292. package/lib/domain/location/models/types/location-geometry.type.d.ts +7 -0
  293. package/lib/domain/location/models/types/location-lat-lng.type.d.ts +4 -0
  294. package/lib/domain/shop-settings/enums/filter-type.enum.d.ts +19 -0
  295. package/lib/domain/shop-settings/enums/index.d.ts +2 -0
  296. package/lib/domain/shop-settings/enums/questions-filters.enum.d.ts +19 -0
  297. package/lib/domain/shop-settings/helpers/beauty-questions.helper.d.ts +9 -0
  298. package/lib/domain/shop-settings/helpers/index.d.ts +1 -0
  299. package/lib/domain/shop-settings/index.d.ts +4 -0
  300. package/lib/domain/shop-settings/models/home.d.ts +17 -0
  301. package/lib/domain/shop-settings/models/index.d.ts +3 -0
  302. package/lib/domain/shop-settings/models/shop-menu.d.ts +7 -0
  303. package/lib/domain/shop-settings/models/types/banner.type.d.ts +6 -0
  304. package/lib/domain/shop-settings/models/types/benefit.type.d.ts +5 -0
  305. package/lib/domain/shop-settings/models/types/index.d.ts +4 -0
  306. package/lib/domain/shop-settings/models/types/menu-nav.type.d.ts +8 -0
  307. package/lib/domain/shop-settings/models/types/sub-menu.type.d.ts +8 -0
  308. package/lib/domain/shop-settings/repositories/home.repository.d.ts +4 -0
  309. package/lib/domain/shop-settings/repositories/index.d.ts +2 -0
  310. package/lib/domain/shop-settings/repositories/shop-menu.repository.d.ts +4 -0
  311. package/lib/domain/shopping/index.d.ts +2 -0
  312. package/lib/domain/shopping/models/buy-2-win.d.ts +18 -0
  313. package/lib/domain/shopping/models/checkout.d.ts +28 -0
  314. package/lib/domain/shopping/models/coupons/club-coupon.d.ts +9 -0
  315. package/lib/domain/shopping/models/coupons/coupon.d.ts +27 -0
  316. package/lib/domain/shopping/models/coupons/enums/discount-type.enum.d.ts +5 -0
  317. package/lib/domain/shopping/models/coupons/enums/exclusivities.enum.d.ts +5 -0
  318. package/lib/domain/shopping/models/coupons/enums/index.d.ts +2 -0
  319. package/lib/domain/shopping/models/coupons/index.d.ts +4 -0
  320. package/lib/domain/shopping/models/coupons/store-coupon.d.ts +8 -0
  321. package/lib/domain/shopping/models/enums/checkout-types.enum.d.ts +4 -0
  322. package/lib/domain/shopping/models/enums/index.d.ts +2 -0
  323. package/lib/domain/shopping/models/enums/order-status.enum.d.ts +10 -0
  324. package/lib/domain/shopping/models/index.d.ts +11 -0
  325. package/lib/domain/shopping/models/line-item.d.ts +8 -0
  326. package/lib/domain/shopping/models/order.d.ts +9 -0
  327. package/lib/domain/shopping/models/payment.d.ts +69 -0
  328. package/lib/domain/shopping/models/shipping-method.d.ts +18 -0
  329. package/lib/domain/shopping/models/subscription/checkout.d.ts +23 -0
  330. package/lib/domain/shopping/models/subscription/index.d.ts +2 -0
  331. package/lib/domain/shopping/models/subscription/plan.d.ts +12 -0
  332. package/lib/domain/shopping/models/types/index.d.ts +7 -0
  333. package/lib/domain/shopping/models/types/payment-address.type.d.ts +12 -0
  334. package/lib/domain/shopping/models/types/payment-billing.type.d.ts +7 -0
  335. package/lib/domain/shopping/models/types/payment-card.type.d.ts +14 -0
  336. package/lib/domain/shopping/models/types/payment-customer.type.d.ts +18 -0
  337. package/lib/domain/shopping/models/types/payment-document.type.d.ts +6 -0
  338. package/lib/domain/shopping/models/types/payment-item.type.d.ts +11 -0
  339. package/lib/domain/shopping/models/types/payment-shipping.type.d.ts +10 -0
  340. package/lib/domain/shopping/repositories/buy-2-win.repository.d.ts +4 -0
  341. package/lib/domain/shopping/repositories/checkout.repository.d.ts +4 -0
  342. package/lib/domain/shopping/repositories/coupon.repository.d.ts +4 -0
  343. package/lib/domain/shopping/repositories/index.d.ts +7 -0
  344. package/lib/domain/shopping/repositories/legacy-order.repository.d.ts +3 -0
  345. package/lib/domain/shopping/repositories/order.repository.d.ts +4 -0
  346. package/lib/domain/shopping/repositories/payment.repository.d.ts +4 -0
  347. package/lib/domain/shopping/repositories/subscription/checkout.repository.d.ts +4 -0
  348. package/lib/domain/shopping/repositories/subscription/index.d.ts +2 -0
  349. package/lib/domain/shopping/repositories/subscription/plan.repository.d.ts +4 -0
  350. package/lib/domain/users/errors/index.d.ts +3 -0
  351. package/lib/domain/users/errors/unauthorized.error.d.ts +4 -0
  352. package/lib/domain/users/errors/user-already-registered.error.d.ts +4 -0
  353. package/lib/domain/users/errors/weak-password.error.d.ts +4 -0
  354. package/lib/domain/users/index.d.ts +5 -0
  355. package/lib/domain/users/models/beauty-profile.d.ts +12 -0
  356. package/lib/domain/users/models/enums/accessory-importances.enum.d.ts +5 -0
  357. package/lib/domain/users/models/enums/area.enum.d.ts +11 -0
  358. package/lib/domain/users/models/enums/beard-problems.enum.d.ts +9 -0
  359. package/lib/domain/users/models/enums/beard-sizes.enum.d.ts +7 -0
  360. package/lib/domain/users/models/enums/beauty-product-importances.enum.d.ts +6 -0
  361. package/lib/domain/users/models/enums/body-problems.enum.d.ts +11 -0
  362. package/lib/domain/users/models/enums/body-shapes.enum.d.ts +7 -0
  363. package/lib/domain/users/models/enums/body-tattoos.enum.d.ts +5 -0
  364. package/lib/domain/users/models/enums/face-skin-oilinesses.enum.d.ts +7 -0
  365. package/lib/domain/users/models/enums/face-skin-problems.enum.d.ts +10 -0
  366. package/lib/domain/users/models/enums/face-skin-tones.enum.d.ts +8 -0
  367. package/lib/domain/users/models/enums/family-incomes.enum.d.ts +8 -0
  368. package/lib/domain/users/models/enums/fragrance-importances.enum.d.ts +5 -0
  369. package/lib/domain/users/models/enums/hair-colors.enum.d.ts +10 -0
  370. package/lib/domain/users/models/enums/hair-problems.enum.d.ts +10 -0
  371. package/lib/domain/users/models/enums/hair-strands.enum.d.ts +8 -0
  372. package/lib/domain/users/models/enums/hair-types.enum.d.ts +7 -0
  373. package/lib/domain/users/models/enums/index.d.ts +20 -0
  374. package/lib/domain/users/models/enums/office-position.enum.d.ts +6 -0
  375. package/lib/domain/users/models/enums/product-spents.enum.d.ts +8 -0
  376. package/lib/domain/users/models/enums/user-type.enum.d.ts +8 -0
  377. package/lib/domain/users/models/index.d.ts +7 -0
  378. package/lib/domain/users/models/lead.d.ts +9 -0
  379. package/lib/domain/users/models/subscription/edition.d.ts +15 -0
  380. package/lib/domain/users/models/subscription/enums/billing-status.enum.d.ts +3 -0
  381. package/lib/domain/users/models/subscription/enums/edition-status.enum.d.ts +4 -0
  382. package/lib/domain/users/models/subscription/enums/index.d.ts +4 -0
  383. package/lib/domain/users/models/subscription/enums/payment-type.enum.d.ts +5 -0
  384. package/lib/domain/users/models/subscription/enums/status.enum.d.ts +4 -0
  385. package/lib/domain/users/models/subscription/index.d.ts +4 -0
  386. package/lib/domain/users/models/subscription/payment.d.ts +14 -0
  387. package/lib/domain/users/models/subscription/subscription.d.ts +30 -0
  388. package/lib/domain/users/models/user-address.d.ts +7 -0
  389. package/lib/domain/users/models/user-payment-method.d.ts +13 -0
  390. package/lib/domain/users/models/user.d.ts +24 -0
  391. package/lib/domain/users/repositories/beauty-profile.repository.d.ts +4 -0
  392. package/lib/domain/users/repositories/edition.repository.d.ts +4 -0
  393. package/lib/domain/users/repositories/index.d.ts +8 -0
  394. package/lib/domain/users/repositories/lead.repository.d.ts +4 -0
  395. package/lib/domain/users/repositories/subscription-payment.repository.d.ts +4 -0
  396. package/lib/domain/users/repositories/subscription.repository.d.ts +4 -0
  397. package/lib/domain/users/repositories/user-address.repository.d.ts +4 -0
  398. package/lib/domain/users/repositories/user-payment-method.repository.d.ts +4 -0
  399. package/lib/domain/users/repositories/user.repository.d.ts +6 -0
  400. package/lib/domain/users/services/authentication.service.d.ts +11 -0
  401. package/lib/domain/users/services/index.d.ts +3 -0
  402. package/lib/domain/users/services/register.service.d.ts +7 -0
  403. package/lib/domain/users/services/types/basic-user-data.type.d.ts +4 -0
  404. package/lib/domain/users/services/types/index.d.ts +1 -0
  405. package/lib/domain/users/use-cases/authentication.d.ts +21 -0
  406. package/lib/domain/users/use-cases/index.d.ts +3 -0
  407. package/lib/domain/users/use-cases/register.d.ts +13 -0
  408. package/lib/domain/users/use-cases/signout.d.ts +6 -0
  409. package/lib/errors/duplicated-results.error.d.ts +4 -0
  410. package/lib/errors/index.d.ts +4 -0
  411. package/lib/errors/invalid-argument.error.d.ts +4 -0
  412. package/lib/errors/not-found.error.d.ts +4 -0
  413. package/lib/errors/required-argument.error.d.ts +5 -0
  414. package/lib/index.d.ts +4 -0
  415. package/lib/infra/firebase/auth/authentication-firebase-auth.service.d.ts +11 -0
  416. package/lib/infra/firebase/auth/index.d.ts +2 -0
  417. package/lib/infra/firebase/auth/register-firebase-auth.service.d.ts +8 -0
  418. package/lib/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +3 -0
  419. package/lib/infra/firebase/firestore/index.d.ts +3 -0
  420. package/lib/infra/firebase/firestore/mixins/index.d.ts +9 -0
  421. package/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +17 -0
  422. package/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +29 -0
  423. package/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +15 -0
  424. package/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +20 -0
  425. package/lib/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +15 -0
  426. package/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +15 -0
  427. package/lib/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +10 -0
  428. package/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +14 -0
  429. package/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +16 -0
  430. package/lib/infra/firebase/firestore/models/user-search.d.ts +9 -0
  431. package/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +55 -0
  432. package/lib/infra/firebase/firestore/repositories/catalog/index.d.ts +4 -0
  433. package/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +50 -0
  434. package/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +60 -0
  435. package/lib/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +49 -0
  436. package/lib/infra/firebase/firestore/repositories/index.d.ts +4 -0
  437. package/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +49 -0
  438. package/lib/infra/firebase/firestore/repositories/shop-settings/index.d.ts +2 -0
  439. package/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +49 -0
  440. package/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +49 -0
  441. package/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +49 -0
  442. package/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +49 -0
  443. package/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +53 -0
  444. package/lib/infra/firebase/firestore/repositories/shopping/index.d.ts +8 -0
  445. package/lib/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +7 -0
  446. package/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +49 -0
  447. package/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +49 -0
  448. package/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +49 -0
  449. package/lib/infra/firebase/firestore/repositories/users/index.d.ts +9 -0
  450. package/lib/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +49 -0
  451. package/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +60 -0
  452. package/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +49 -0
  453. package/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +60 -0
  454. package/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +60 -0
  455. package/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +60 -0
  456. package/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +60 -0
  457. package/lib/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +60 -0
  458. package/lib/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +50 -0
  459. package/lib/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +6 -0
  460. package/lib/infra/firebase/firestore/types/firestore.helpers.type.d.ts +8 -0
  461. package/lib/infra/firebase/firestore/types/firestore.repository.type.d.ts +8 -0
  462. package/lib/infra/firebase/firestore/types/index.d.ts +3 -0
  463. package/lib/infra/firebase/index.d.ts +2 -0
  464. package/lib/infra/index.d.ts +1 -0
  465. package/lib/utils/index.d.ts +4 -0
  466. package/lib/utils/mixins/base.mixin.d.ts +3 -0
  467. package/lib/utils/mixins/index.d.ts +2 -0
  468. package/lib/utils/mixins/mixin-ctor.type.d.ts +1 -0
  469. package/lib/utils/types/index.d.ts +1 -0
  470. package/lib/utils/types/prop.type.d.ts +1 -0
  471. package/package.json +1 -3
  472. package/public-api.d.ts +2 -0
  473. package/domain/catalog/index.d.ts +0 -2
  474. package/domain/catalog/models/category.d.ts +0 -22
  475. package/domain/catalog/models/enums/index.d.ts +0 -1
  476. package/domain/catalog/models/enums/shops.enum.d.ts +0 -5
  477. package/domain/catalog/models/index.d.ts +0 -5
  478. package/domain/catalog/models/product.d.ts +0 -35
  479. package/domain/catalog/models/types/category-condition.type.d.ts +0 -4
  480. package/domain/catalog/models/types/category-filter.type.d.ts +0 -4
  481. package/domain/catalog/models/types/index.d.ts +0 -7
  482. package/domain/catalog/models/types/product-review.type.d.ts +0 -15
  483. package/domain/catalog/models/types/shops-description.type.d.ts +0 -7
  484. package/domain/catalog/models/types/shops-price.type.d.ts +0 -10
  485. package/domain/catalog/models/types/stock.type.d.ts +0 -3
  486. package/domain/catalog/models/types/variant-grade.type.d.ts +0 -4
  487. package/domain/catalog/models/variant.d.ts +0 -14
  488. package/domain/catalog/repositories/category.repository.d.ts +0 -15
  489. package/domain/catalog/repositories/index.d.ts +0 -4
  490. package/domain/catalog/repositories/product.repository.d.ts +0 -5
  491. package/domain/catalog/repositories/subscription-product.repository.d.ts +0 -4
  492. package/domain/catalog/repositories/variant.repository.d.ts +0 -4
  493. package/domain/general/index.d.ts +0 -2
  494. package/domain/general/model/base-model-with-identifier-fields.d.ts +0 -3
  495. package/domain/general/model/base.model.d.ts +0 -6
  496. package/domain/general/model/identifier-fields.d.ts +0 -4
  497. package/domain/general/model/index.d.ts +0 -4
  498. package/domain/general/model/types/base-model-builder.type.d.ts +0 -5
  499. package/domain/general/model/types/index.d.ts +0 -3
  500. package/domain/general/model/types/non-function-properties.type.d.ts +0 -2
  501. package/domain/general/model/types/non-function-property-name.type.d.ts +0 -3
  502. package/domain/general/repository/create.repository.d.ts +0 -5
  503. package/domain/general/repository/crud.repository.d.ts +0 -7
  504. package/domain/general/repository/delete.repository.d.ts +0 -5
  505. package/domain/general/repository/enums/index.d.ts +0 -2
  506. package/domain/general/repository/enums/update-option-actions.enum.d.ts +0 -7
  507. package/domain/general/repository/enums/where.enum.d.ts +0 -10
  508. package/domain/general/repository/find.repository.d.ts +0 -5
  509. package/domain/general/repository/get.repository.d.ts +0 -5
  510. package/domain/general/repository/index.d.ts +0 -9
  511. package/domain/general/repository/read.repository.d.ts +0 -5
  512. package/domain/general/repository/types/index.d.ts +0 -5
  513. package/domain/general/repository/types/repository-find-filters.type.d.ts +0 -14
  514. package/domain/general/repository/types/repository-find-result.type.d.ts +0 -4
  515. package/domain/general/repository/types/repository-limit-options.type.d.ts +0 -4
  516. package/domain/general/repository/types/repository-order-by-list.type.d.ts +0 -5
  517. package/domain/general/repository/types/repository-update-params.type.d.ts +0 -11
  518. package/domain/general/repository/update.repository.d.ts +0 -5
  519. package/domain/index.d.ts +0 -6
  520. package/domain/location/index.d.ts +0 -1
  521. package/domain/location/models/address.d.ts +0 -21
  522. package/domain/location/models/index.d.ts +0 -2
  523. package/domain/location/models/types/index.d.ts +0 -3
  524. package/domain/location/models/types/location-bound.type.d.ts +0 -6
  525. package/domain/location/models/types/location-geometry.type.d.ts +0 -7
  526. package/domain/location/models/types/location-lat-lng.type.d.ts +0 -4
  527. package/domain/shop-settings/enums/filter-type.enum.d.ts +0 -19
  528. package/domain/shop-settings/enums/index.d.ts +0 -2
  529. package/domain/shop-settings/enums/questions-filters.enum.d.ts +0 -19
  530. package/domain/shop-settings/helpers/beauty-questions.helper.d.ts +0 -9
  531. package/domain/shop-settings/helpers/index.d.ts +0 -1
  532. package/domain/shop-settings/index.d.ts +0 -4
  533. package/domain/shop-settings/models/home.d.ts +0 -17
  534. package/domain/shop-settings/models/index.d.ts +0 -4
  535. package/domain/shop-settings/models/shop-menu.d.ts +0 -7
  536. package/domain/shop-settings/models/shop-settings.d.ts +0 -9
  537. package/domain/shop-settings/models/types/banner.type.d.ts +0 -6
  538. package/domain/shop-settings/models/types/benefit.type.d.ts +0 -5
  539. package/domain/shop-settings/models/types/home-data.type.d.ts +0 -15
  540. package/domain/shop-settings/models/types/index.d.ts +0 -10
  541. package/domain/shop-settings/models/types/menu-nav.type.d.ts +0 -8
  542. package/domain/shop-settings/models/types/shop-banner.type.d.ts +0 -10
  543. package/domain/shop-settings/models/types/shop-brands.type.d.ts +0 -10
  544. package/domain/shop-settings/models/types/shop-carousel.type.d.ts +0 -5
  545. package/domain/shop-settings/models/types/shop-collection.type.d.ts +0 -8
  546. package/domain/shop-settings/models/types/shop-section.type.d.ts +0 -9
  547. package/domain/shop-settings/models/types/sub-menu.type.d.ts +0 -8
  548. package/domain/shop-settings/repositories/home.repository.d.ts +0 -4
  549. package/domain/shop-settings/repositories/index.d.ts +0 -3
  550. package/domain/shop-settings/repositories/shop-menu.repository.d.ts +0 -4
  551. package/domain/shop-settings/repositories/shop-settings.repository.d.ts +0 -4
  552. package/domain/shopping/index.d.ts +0 -2
  553. package/domain/shopping/models/buy-2-win.d.ts +0 -18
  554. package/domain/shopping/models/checkout.d.ts +0 -29
  555. package/domain/shopping/models/coupons/coupon.d.ts +0 -28
  556. package/domain/shopping/models/coupons/enums/coupon-subtypes.enum.d.ts +0 -4
  557. package/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +0 -6
  558. package/domain/shopping/models/coupons/enums/exclusivities.enum.d.ts +0 -5
  559. package/domain/shopping/models/coupons/enums/index.d.ts +0 -3
  560. package/domain/shopping/models/coupons/financial-coupon.d.ts +0 -9
  561. package/domain/shopping/models/coupons/index.d.ts +0 -3
  562. package/domain/shopping/models/enums/checkout-types.enum.d.ts +0 -4
  563. package/domain/shopping/models/enums/index.d.ts +0 -2
  564. package/domain/shopping/models/enums/order-status.enum.d.ts +0 -10
  565. package/domain/shopping/models/index.d.ts +0 -11
  566. package/domain/shopping/models/line-item.d.ts +0 -8
  567. package/domain/shopping/models/order.d.ts +0 -9
  568. package/domain/shopping/models/payment.d.ts +0 -69
  569. package/domain/shopping/models/shipping-method.d.ts +0 -18
  570. package/domain/shopping/models/subscription/checkout.d.ts +0 -23
  571. package/domain/shopping/models/subscription/index.d.ts +0 -2
  572. package/domain/shopping/models/subscription/plan.d.ts +0 -12
  573. package/domain/shopping/models/types/index.d.ts +0 -7
  574. package/domain/shopping/models/types/payment-address.type.d.ts +0 -12
  575. package/domain/shopping/models/types/payment-billing.type.d.ts +0 -7
  576. package/domain/shopping/models/types/payment-card.type.d.ts +0 -14
  577. package/domain/shopping/models/types/payment-customer.type.d.ts +0 -18
  578. package/domain/shopping/models/types/payment-document.type.d.ts +0 -6
  579. package/domain/shopping/models/types/payment-item.type.d.ts +0 -11
  580. package/domain/shopping/models/types/payment-shipping.type.d.ts +0 -10
  581. package/domain/shopping/repositories/buy-2-win.repository.d.ts +0 -4
  582. package/domain/shopping/repositories/checkout.repository.d.ts +0 -4
  583. package/domain/shopping/repositories/coupon.repository.d.ts +0 -4
  584. package/domain/shopping/repositories/index.d.ts +0 -7
  585. package/domain/shopping/repositories/legacy-order.repository.d.ts +0 -3
  586. package/domain/shopping/repositories/order.repository.d.ts +0 -4
  587. package/domain/shopping/repositories/payment.repository.d.ts +0 -4
  588. package/domain/shopping/repositories/subscription/checkout.repository.d.ts +0 -4
  589. package/domain/shopping/repositories/subscription/index.d.ts +0 -2
  590. package/domain/shopping/repositories/subscription/plan.repository.d.ts +0 -4
  591. package/domain/users/errors/index.d.ts +0 -3
  592. package/domain/users/errors/unauthorized.error.d.ts +0 -4
  593. package/domain/users/errors/user-already-registered.error.d.ts +0 -4
  594. package/domain/users/errors/weak-password.error.d.ts +0 -4
  595. package/domain/users/index.d.ts +0 -5
  596. package/domain/users/models/beauty-profile.d.ts +0 -12
  597. package/domain/users/models/enums/accessory-importances.enum.d.ts +0 -5
  598. package/domain/users/models/enums/area.enum.d.ts +0 -11
  599. package/domain/users/models/enums/beard-problems.enum.d.ts +0 -9
  600. package/domain/users/models/enums/beard-sizes.enum.d.ts +0 -7
  601. package/domain/users/models/enums/beauty-product-importances.enum.d.ts +0 -6
  602. package/domain/users/models/enums/body-problems.enum.d.ts +0 -11
  603. package/domain/users/models/enums/body-shapes.enum.d.ts +0 -7
  604. package/domain/users/models/enums/body-tattoos.enum.d.ts +0 -5
  605. package/domain/users/models/enums/face-skin-oilinesses.enum.d.ts +0 -7
  606. package/domain/users/models/enums/face-skin-problems.enum.d.ts +0 -10
  607. package/domain/users/models/enums/face-skin-tones.enum.d.ts +0 -8
  608. package/domain/users/models/enums/family-incomes.enum.d.ts +0 -8
  609. package/domain/users/models/enums/fragrance-importances.enum.d.ts +0 -5
  610. package/domain/users/models/enums/hair-colors.enum.d.ts +0 -10
  611. package/domain/users/models/enums/hair-problems.enum.d.ts +0 -10
  612. package/domain/users/models/enums/hair-strands.enum.d.ts +0 -8
  613. package/domain/users/models/enums/hair-types.enum.d.ts +0 -7
  614. package/domain/users/models/enums/index.d.ts +0 -20
  615. package/domain/users/models/enums/office-position.enum.d.ts +0 -6
  616. package/domain/users/models/enums/product-spents.enum.d.ts +0 -8
  617. package/domain/users/models/enums/user-type.enum.d.ts +0 -8
  618. package/domain/users/models/index.d.ts +0 -7
  619. package/domain/users/models/lead.d.ts +0 -9
  620. package/domain/users/models/subscription/edition.d.ts +0 -17
  621. package/domain/users/models/subscription/enums/billing-status.enum.d.ts +0 -3
  622. package/domain/users/models/subscription/enums/edition-status.enum.d.ts +0 -4
  623. package/domain/users/models/subscription/enums/index.d.ts +0 -4
  624. package/domain/users/models/subscription/enums/payment-type.enum.d.ts +0 -5
  625. package/domain/users/models/subscription/enums/status.enum.d.ts +0 -4
  626. package/domain/users/models/subscription/index.d.ts +0 -4
  627. package/domain/users/models/subscription/payment.d.ts +0 -14
  628. package/domain/users/models/subscription/subscription.d.ts +0 -30
  629. package/domain/users/models/user-address.d.ts +0 -7
  630. package/domain/users/models/user-payment-method.d.ts +0 -14
  631. package/domain/users/models/user.d.ts +0 -25
  632. package/domain/users/repositories/beauty-profile.repository.d.ts +0 -4
  633. package/domain/users/repositories/edition.repository.d.ts +0 -4
  634. package/domain/users/repositories/index.d.ts +0 -8
  635. package/domain/users/repositories/lead.repository.d.ts +0 -4
  636. package/domain/users/repositories/subscription-payment.repository.d.ts +0 -4
  637. package/domain/users/repositories/subscription.repository.d.ts +0 -4
  638. package/domain/users/repositories/user-address.repository.d.ts +0 -4
  639. package/domain/users/repositories/user-payment-method.repository.d.ts +0 -4
  640. package/domain/users/repositories/user.repository.d.ts +0 -6
  641. package/domain/users/services/authentication.service.d.ts +0 -12
  642. package/domain/users/services/index.d.ts +0 -3
  643. package/domain/users/services/register.service.d.ts +0 -7
  644. package/domain/users/services/types/basic-user-data.type.d.ts +0 -4
  645. package/domain/users/services/types/index.d.ts +0 -1
  646. package/domain/users/use-cases/authentication.d.ts +0 -21
  647. package/domain/users/use-cases/index.d.ts +0 -4
  648. package/domain/users/use-cases/recovery-password.d.ts +0 -6
  649. package/domain/users/use-cases/register.d.ts +0 -13
  650. package/domain/users/use-cases/signout.d.ts +0 -6
  651. package/errors/duplicated-results.error.d.ts +0 -4
  652. package/errors/index.d.ts +0 -4
  653. package/errors/invalid-argument.error.d.ts +0 -4
  654. package/errors/not-found.error.d.ts +0 -4
  655. package/errors/required-argument.error.d.ts +0 -5
  656. package/esm2015/domain/catalog/index.js +0 -3
  657. package/esm2015/domain/catalog/models/category.js +0 -7
  658. package/esm2015/domain/catalog/models/enums/index.js +0 -2
  659. package/esm2015/domain/catalog/models/enums/shops.enum.js +0 -7
  660. package/esm2015/domain/catalog/models/index.js +0 -6
  661. package/esm2015/domain/catalog/models/product.js +0 -11
  662. package/esm2015/domain/catalog/models/types/category-condition.type.js +0 -2
  663. package/esm2015/domain/catalog/models/types/category-filter.type.js +0 -2
  664. package/esm2015/domain/catalog/models/types/index.js +0 -8
  665. package/esm2015/domain/catalog/models/types/product-review.type.js +0 -2
  666. package/esm2015/domain/catalog/models/types/shops-description.type.js +0 -2
  667. package/esm2015/domain/catalog/models/types/shops-price.type.js +0 -2
  668. package/esm2015/domain/catalog/models/types/stock.type.js +0 -2
  669. package/esm2015/domain/catalog/models/types/variant-grade.type.js +0 -2
  670. package/esm2015/domain/catalog/models/variant.js +0 -7
  671. package/esm2015/domain/catalog/repositories/category.repository.js +0 -2
  672. package/esm2015/domain/catalog/repositories/index.js +0 -5
  673. package/esm2015/domain/catalog/repositories/product.repository.js +0 -2
  674. package/esm2015/domain/catalog/repositories/subscription-product.repository.js +0 -2
  675. package/esm2015/domain/catalog/repositories/variant.repository.js +0 -2
  676. package/esm2015/domain/general/index.js +0 -3
  677. package/esm2015/domain/general/model/base-model-with-identifier-fields.js +0 -2
  678. package/esm2015/domain/general/model/base.model.js +0 -13
  679. package/esm2015/domain/general/model/identifier-fields.js +0 -2
  680. package/esm2015/domain/general/model/index.js +0 -5
  681. package/esm2015/domain/general/model/types/base-model-builder.type.js +0 -2
  682. package/esm2015/domain/general/model/types/index.js +0 -4
  683. package/esm2015/domain/general/model/types/non-function-properties.type.js +0 -2
  684. package/esm2015/domain/general/model/types/non-function-property-name.type.js +0 -2
  685. package/esm2015/domain/general/repository/create.repository.js +0 -2
  686. package/esm2015/domain/general/repository/crud.repository.js +0 -2
  687. package/esm2015/domain/general/repository/delete.repository.js +0 -2
  688. package/esm2015/domain/general/repository/enums/index.js +0 -3
  689. package/esm2015/domain/general/repository/enums/update-option-actions.enum.js +0 -9
  690. package/esm2015/domain/general/repository/enums/where.enum.js +0 -12
  691. package/esm2015/domain/general/repository/find.repository.js +0 -2
  692. package/esm2015/domain/general/repository/get.repository.js +0 -2
  693. package/esm2015/domain/general/repository/index.js +0 -10
  694. package/esm2015/domain/general/repository/read.repository.js +0 -2
  695. package/esm2015/domain/general/repository/types/index.js +0 -6
  696. package/esm2015/domain/general/repository/types/repository-find-filters.type.js +0 -2
  697. package/esm2015/domain/general/repository/types/repository-find-result.type.js +0 -2
  698. package/esm2015/domain/general/repository/types/repository-limit-options.type.js +0 -2
  699. package/esm2015/domain/general/repository/types/repository-order-by-list.type.js +0 -2
  700. package/esm2015/domain/general/repository/types/repository-update-params.type.js +0 -2
  701. package/esm2015/domain/general/repository/update.repository.js +0 -2
  702. package/esm2015/domain/index.js +0 -7
  703. package/esm2015/domain/location/index.js +0 -2
  704. package/esm2015/domain/location/models/address.js +0 -4
  705. package/esm2015/domain/location/models/index.js +0 -3
  706. package/esm2015/domain/location/models/types/index.js +0 -4
  707. package/esm2015/domain/location/models/types/location-bound.type.js +0 -2
  708. package/esm2015/domain/location/models/types/location-geometry.type.js +0 -2
  709. package/esm2015/domain/location/models/types/location-lat-lng.type.js +0 -2
  710. package/esm2015/domain/shop-settings/enums/filter-type.enum.js +0 -21
  711. package/esm2015/domain/shop-settings/enums/index.js +0 -3
  712. package/esm2015/domain/shop-settings/enums/questions-filters.enum.js +0 -21
  713. package/esm2015/domain/shop-settings/helpers/beauty-questions.helper.js +0 -46
  714. package/esm2015/domain/shop-settings/helpers/index.js +0 -2
  715. package/esm2015/domain/shop-settings/index.js +0 -5
  716. package/esm2015/domain/shop-settings/models/home.js +0 -7
  717. package/esm2015/domain/shop-settings/models/index.js +0 -5
  718. package/esm2015/domain/shop-settings/models/shop-menu.js +0 -7
  719. package/esm2015/domain/shop-settings/models/shop-settings.js +0 -7
  720. package/esm2015/domain/shop-settings/models/types/banner.type.js +0 -2
  721. package/esm2015/domain/shop-settings/models/types/benefit.type.js +0 -2
  722. package/esm2015/domain/shop-settings/models/types/home-data.type.js +0 -2
  723. package/esm2015/domain/shop-settings/models/types/index.js +0 -11
  724. package/esm2015/domain/shop-settings/models/types/menu-nav.type.js +0 -2
  725. package/esm2015/domain/shop-settings/models/types/shop-banner.type.js +0 -2
  726. package/esm2015/domain/shop-settings/models/types/shop-brands.type.js +0 -2
  727. package/esm2015/domain/shop-settings/models/types/shop-carousel.type.js +0 -2
  728. package/esm2015/domain/shop-settings/models/types/shop-collection.type.js +0 -2
  729. package/esm2015/domain/shop-settings/models/types/shop-section.type.js +0 -2
  730. package/esm2015/domain/shop-settings/models/types/sub-menu.type.js +0 -2
  731. package/esm2015/domain/shop-settings/repositories/home.repository.js +0 -2
  732. package/esm2015/domain/shop-settings/repositories/index.js +0 -4
  733. package/esm2015/domain/shop-settings/repositories/shop-menu.repository.js +0 -2
  734. package/esm2015/domain/shop-settings/repositories/shop-settings.repository.js +0 -2
  735. package/esm2015/domain/shopping/index.js +0 -3
  736. package/esm2015/domain/shopping/models/buy-2-win.js +0 -14
  737. package/esm2015/domain/shopping/models/checkout.js +0 -38
  738. package/esm2015/domain/shopping/models/coupons/coupon.js +0 -23
  739. package/esm2015/domain/shopping/models/coupons/enums/coupon-subtypes.enum.js +0 -6
  740. package/esm2015/domain/shopping/models/coupons/enums/coupon-types.enum.js +0 -8
  741. package/esm2015/domain/shopping/models/coupons/enums/exclusivities.enum.js +0 -7
  742. package/esm2015/domain/shopping/models/coupons/enums/index.js +0 -4
  743. package/esm2015/domain/shopping/models/coupons/financial-coupon.js +0 -28
  744. package/esm2015/domain/shopping/models/coupons/index.js +0 -4
  745. package/esm2015/domain/shopping/models/enums/checkout-types.enum.js +0 -6
  746. package/esm2015/domain/shopping/models/enums/index.js +0 -3
  747. package/esm2015/domain/shopping/models/enums/order-status.enum.js +0 -12
  748. package/esm2015/domain/shopping/models/index.js +0 -12
  749. package/esm2015/domain/shopping/models/line-item.js +0 -4
  750. package/esm2015/domain/shopping/models/order.js +0 -11
  751. package/esm2015/domain/shopping/models/payment.js +0 -169
  752. package/esm2015/domain/shopping/models/shipping-method.js +0 -7
  753. package/esm2015/domain/shopping/models/subscription/checkout.js +0 -28
  754. package/esm2015/domain/shopping/models/subscription/index.js +0 -3
  755. package/esm2015/domain/shopping/models/subscription/plan.js +0 -7
  756. package/esm2015/domain/shopping/models/types/index.js +0 -8
  757. package/esm2015/domain/shopping/models/types/payment-address.type.js +0 -2
  758. package/esm2015/domain/shopping/models/types/payment-billing.type.js +0 -2
  759. package/esm2015/domain/shopping/models/types/payment-card.type.js +0 -2
  760. package/esm2015/domain/shopping/models/types/payment-customer.type.js +0 -2
  761. package/esm2015/domain/shopping/models/types/payment-document.type.js +0 -2
  762. package/esm2015/domain/shopping/models/types/payment-item.type.js +0 -2
  763. package/esm2015/domain/shopping/models/types/payment-shipping.type.js +0 -2
  764. package/esm2015/domain/shopping/repositories/buy-2-win.repository.js +0 -2
  765. package/esm2015/domain/shopping/repositories/checkout.repository.js +0 -2
  766. package/esm2015/domain/shopping/repositories/coupon.repository.js +0 -2
  767. package/esm2015/domain/shopping/repositories/index.js +0 -8
  768. package/esm2015/domain/shopping/repositories/legacy-order.repository.js +0 -2
  769. package/esm2015/domain/shopping/repositories/order.repository.js +0 -2
  770. package/esm2015/domain/shopping/repositories/payment.repository.js +0 -2
  771. package/esm2015/domain/shopping/repositories/subscription/checkout.repository.js +0 -2
  772. package/esm2015/domain/shopping/repositories/subscription/index.js +0 -3
  773. package/esm2015/domain/shopping/repositories/subscription/plan.repository.js +0 -2
  774. package/esm2015/domain/users/errors/index.js +0 -4
  775. package/esm2015/domain/users/errors/unauthorized.error.js +0 -7
  776. package/esm2015/domain/users/errors/user-already-registered.error.js +0 -7
  777. package/esm2015/domain/users/errors/weak-password.error.js +0 -7
  778. package/esm2015/domain/users/index.js +0 -6
  779. package/esm2015/domain/users/models/beauty-profile.js +0 -12
  780. package/esm2015/domain/users/models/enums/accessory-importances.enum.js +0 -7
  781. package/esm2015/domain/users/models/enums/area.enum.js +0 -13
  782. package/esm2015/domain/users/models/enums/beard-problems.enum.js +0 -11
  783. package/esm2015/domain/users/models/enums/beard-sizes.enum.js +0 -9
  784. package/esm2015/domain/users/models/enums/beauty-product-importances.enum.js +0 -8
  785. package/esm2015/domain/users/models/enums/body-problems.enum.js +0 -13
  786. package/esm2015/domain/users/models/enums/body-shapes.enum.js +0 -9
  787. package/esm2015/domain/users/models/enums/body-tattoos.enum.js +0 -7
  788. package/esm2015/domain/users/models/enums/face-skin-oilinesses.enum.js +0 -9
  789. package/esm2015/domain/users/models/enums/face-skin-problems.enum.js +0 -12
  790. package/esm2015/domain/users/models/enums/face-skin-tones.enum.js +0 -10
  791. package/esm2015/domain/users/models/enums/family-incomes.enum.js +0 -10
  792. package/esm2015/domain/users/models/enums/fragrance-importances.enum.js +0 -7
  793. package/esm2015/domain/users/models/enums/hair-colors.enum.js +0 -12
  794. package/esm2015/domain/users/models/enums/hair-problems.enum.js +0 -12
  795. package/esm2015/domain/users/models/enums/hair-strands.enum.js +0 -10
  796. package/esm2015/domain/users/models/enums/hair-types.enum.js +0 -9
  797. package/esm2015/domain/users/models/enums/index.js +0 -21
  798. package/esm2015/domain/users/models/enums/office-position.enum.js +0 -8
  799. package/esm2015/domain/users/models/enums/product-spents.enum.js +0 -10
  800. package/esm2015/domain/users/models/enums/user-type.enum.js +0 -10
  801. package/esm2015/domain/users/models/index.js +0 -8
  802. package/esm2015/domain/users/models/lead.js +0 -7
  803. package/esm2015/domain/users/models/subscription/edition.js +0 -7
  804. package/esm2015/domain/users/models/subscription/enums/billing-status.enum.js +0 -5
  805. package/esm2015/domain/users/models/subscription/enums/edition-status.enum.js +0 -6
  806. package/esm2015/domain/users/models/subscription/enums/index.js +0 -5
  807. package/esm2015/domain/users/models/subscription/enums/payment-type.enum.js +0 -7
  808. package/esm2015/domain/users/models/subscription/enums/status.enum.js +0 -6
  809. package/esm2015/domain/users/models/subscription/index.js +0 -5
  810. package/esm2015/domain/users/models/subscription/payment.js +0 -14
  811. package/esm2015/domain/users/models/subscription/subscription.js +0 -43
  812. package/esm2015/domain/users/models/user-address.js +0 -7
  813. package/esm2015/domain/users/models/user-payment-method.js +0 -7
  814. package/esm2015/domain/users/models/user.js +0 -26
  815. package/esm2015/domain/users/repositories/beauty-profile.repository.js +0 -2
  816. package/esm2015/domain/users/repositories/edition.repository.js +0 -2
  817. package/esm2015/domain/users/repositories/index.js +0 -9
  818. package/esm2015/domain/users/repositories/lead.repository.js +0 -2
  819. package/esm2015/domain/users/repositories/subscription-payment.repository.js +0 -2
  820. package/esm2015/domain/users/repositories/subscription.repository.js +0 -2
  821. package/esm2015/domain/users/repositories/user-address.repository.js +0 -2
  822. package/esm2015/domain/users/repositories/user-payment-method.repository.js +0 -2
  823. package/esm2015/domain/users/repositories/user.repository.js +0 -2
  824. package/esm2015/domain/users/services/authentication.service.js +0 -2
  825. package/esm2015/domain/users/services/index.js +0 -4
  826. package/esm2015/domain/users/services/register.service.js +0 -2
  827. package/esm2015/domain/users/services/types/basic-user-data.type.js +0 -2
  828. package/esm2015/domain/users/services/types/index.js +0 -2
  829. package/esm2015/domain/users/use-cases/authentication.js +0 -40
  830. package/esm2015/domain/users/use-cases/index.js +0 -5
  831. package/esm2015/domain/users/use-cases/recovery-password.js +0 -12
  832. package/esm2015/domain/users/use-cases/register.js +0 -34
  833. package/esm2015/domain/users/use-cases/signout.js +0 -12
  834. package/esm2015/errors/duplicated-results.error.js +0 -7
  835. package/esm2015/errors/index.js +0 -5
  836. package/esm2015/errors/invalid-argument.error.js +0 -7
  837. package/esm2015/errors/not-found.error.js +0 -7
  838. package/esm2015/errors/required-argument.error.js +0 -8
  839. package/esm2015/index.js +0 -6
  840. package/esm2015/infra/elasticsearch/adapters/axios.adapter.js +0 -22
  841. package/esm2015/infra/elasticsearch/adapters/elastic-search.adapter.js +0 -2
  842. package/esm2015/infra/elasticsearch/adapters/index.js +0 -3
  843. package/esm2015/infra/elasticsearch/index.js +0 -4
  844. package/esm2015/infra/elasticsearch/indexes/index.js +0 -2
  845. package/esm2015/infra/elasticsearch/indexes/products-index.js +0 -59
  846. package/esm2015/infra/elasticsearch/types/elastic-search-result.js +0 -2
  847. package/esm2015/infra/elasticsearch/types/index.js +0 -2
  848. package/esm2015/infra/firebase/auth/authentication-firebase-auth.service.js +0 -52
  849. package/esm2015/infra/firebase/auth/index.js +0 -3
  850. package/esm2015/infra/firebase/auth/register-firebase-auth.service.js +0 -26
  851. package/esm2015/infra/firebase/auth/types/firebase-user-with-id.type.js +0 -2
  852. package/esm2015/infra/firebase/firestore/index.js +0 -4
  853. package/esm2015/infra/firebase/firestore/mixins/index.js +0 -10
  854. package/esm2015/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +0 -31
  855. package/esm2015/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +0 -10
  856. package/esm2015/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +0 -18
  857. package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +0 -87
  858. package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +0 -26
  859. package/esm2015/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +0 -24
  860. package/esm2015/infra/firebase/firestore/mixins/with-helpers.mixin.js +0 -17
  861. package/esm2015/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +0 -11
  862. package/esm2015/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +0 -45
  863. package/esm2015/infra/firebase/firestore/models/user-search.js +0 -7
  864. package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +0 -72
  865. package/esm2015/infra/firebase/firestore/repositories/catalog/index.js +0 -5
  866. package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +0 -23
  867. package/esm2015/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.js +0 -14
  868. package/esm2015/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.js +0 -12
  869. package/esm2015/infra/firebase/firestore/repositories/index.js +0 -5
  870. package/esm2015/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.js +0 -56
  871. package/esm2015/infra/firebase/firestore/repositories/shop-settings/index.js +0 -4
  872. package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +0 -12
  873. package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.js +0 -12
  874. package/esm2015/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +0 -12
  875. package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.js +0 -12
  876. package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.js +0 -12
  877. package/esm2015/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +0 -29
  878. package/esm2015/infra/firebase/firestore/repositories/shopping/index.js +0 -9
  879. package/esm2015/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.js +0 -9
  880. package/esm2015/infra/firebase/firestore/repositories/shopping/order-firestore.repository.js +0 -12
  881. package/esm2015/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.js +0 -12
  882. package/esm2015/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.js +0 -12
  883. package/esm2015/infra/firebase/firestore/repositories/users/index.js +0 -10
  884. package/esm2015/infra/firebase/firestore/repositories/users/lead-firestore.repository.js +0 -12
  885. package/esm2015/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.js +0 -14
  886. package/esm2015/infra/firebase/firestore/repositories/users/subscription-firestore.repository.js +0 -12
  887. package/esm2015/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.js +0 -14
  888. package/esm2015/infra/firebase/firestore/repositories/users/user-address-firestore.repository.js +0 -14
  889. package/esm2015/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.js +0 -14
  890. package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +0 -70
  891. package/esm2015/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.js +0 -14
  892. package/esm2015/infra/firebase/firestore/repositories/users/user-search-firestore.repository.js +0 -12
  893. package/esm2015/infra/firebase/firestore/types/firestore-sub.repository.type.js +0 -2
  894. package/esm2015/infra/firebase/firestore/types/firestore.helpers.type.js +0 -2
  895. package/esm2015/infra/firebase/firestore/types/firestore.repository.type.js +0 -2
  896. package/esm2015/infra/firebase/firestore/types/index.js +0 -4
  897. package/esm2015/infra/firebase/index.js +0 -3
  898. package/esm2015/infra/index.js +0 -3
  899. package/esm2015/utils/index.js +0 -6
  900. package/esm2015/utils/mixins/base.mixin.js +0 -6
  901. package/esm2015/utils/mixins/index.js +0 -3
  902. package/esm2015/utils/mixins/mixin-ctor.type.js +0 -2
  903. package/esm2015/utils/types/index.js +0 -2
  904. package/esm2015/utils/types/prop.type.js +0 -2
  905. package/index.d.ts +0 -5
  906. package/infra/elasticsearch/adapters/axios.adapter.d.ts +0 -11
  907. package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +0 -4
  908. package/infra/elasticsearch/adapters/index.d.ts +0 -2
  909. package/infra/elasticsearch/index.d.ts +0 -3
  910. package/infra/elasticsearch/indexes/index.d.ts +0 -1
  911. package/infra/elasticsearch/indexes/products-index.d.ts +0 -11
  912. package/infra/elasticsearch/types/elastic-search-result.d.ts +0 -7
  913. package/infra/elasticsearch/types/index.d.ts +0 -1
  914. package/infra/firebase/auth/authentication-firebase-auth.service.d.ts +0 -12
  915. package/infra/firebase/auth/index.d.ts +0 -2
  916. package/infra/firebase/auth/register-firebase-auth.service.d.ts +0 -8
  917. package/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +0 -3
  918. package/infra/firebase/firestore/index.d.ts +0 -3
  919. package/infra/firebase/firestore/mixins/index.d.ts +0 -9
  920. package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +0 -17
  921. package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +0 -29
  922. package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +0 -15
  923. package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +0 -20
  924. package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +0 -15
  925. package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +0 -15
  926. package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +0 -10
  927. package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +0 -14
  928. package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +0 -16
  929. package/infra/firebase/firestore/models/user-search.d.ts +0 -9
  930. package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +0 -58
  931. package/infra/firebase/firestore/repositories/catalog/index.d.ts +0 -4
  932. package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +0 -50
  933. package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +0 -60
  934. package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +0 -49
  935. package/infra/firebase/firestore/repositories/index.d.ts +0 -4
  936. package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +0 -57
  937. package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +0 -3
  938. package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +0 -49
  939. package/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.d.ts +0 -49
  940. package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +0 -49
  941. package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +0 -49
  942. package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +0 -49
  943. package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +0 -53
  944. package/infra/firebase/firestore/repositories/shopping/index.d.ts +0 -8
  945. package/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +0 -7
  946. package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +0 -49
  947. package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +0 -49
  948. package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +0 -49
  949. package/infra/firebase/firestore/repositories/users/index.d.ts +0 -9
  950. package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +0 -49
  951. package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +0 -60
  952. package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +0 -49
  953. package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +0 -60
  954. package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +0 -60
  955. package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +0 -60
  956. package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +0 -60
  957. package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +0 -60
  958. package/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +0 -50
  959. package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +0 -6
  960. package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +0 -8
  961. package/infra/firebase/firestore/types/firestore.repository.type.d.ts +0 -8
  962. package/infra/firebase/firestore/types/index.d.ts +0 -3
  963. package/infra/firebase/index.d.ts +0 -2
  964. package/infra/index.d.ts +0 -2
  965. package/utils/index.d.ts +0 -6
  966. package/utils/mixins/base.mixin.d.ts +0 -3
  967. package/utils/mixins/index.d.ts +0 -2
  968. package/utils/mixins/mixin-ctor.type.d.ts +0 -1
  969. package/utils/types/index.d.ts +0 -1
  970. package/utils/types/prop.type.d.ts +0 -1
@@ -1,2678 +1,2484 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reflect-metadata'), require('class-transformer'), require('date-fns'), require('lodash'), require('ts-md5'), require('axios'), require('firebase'), require('firebase/app')) :
3
- typeof define === 'function' && define.amd ? define('@infrab4a/connect', ['exports', 'reflect-metadata', 'class-transformer', 'date-fns', 'lodash', 'ts-md5', 'axios', 'firebase', 'firebase/app'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a.connect = {}), null, global["class-transformer"], global["date-fns"], global.lodash, global.tsMd5, global.axios, global.firebase, global.firebase$1));
5
- })(this, (function (exports, reflectMetadata, classTransformer, dateFns, lodash, tsMd5, axios, firebase, firebase$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reflect-metadata'), require('class-transformer'), require('lodash'), require('firebase'), require('firebase/app')) :
3
+ typeof define === 'function' && define.amd ? define('@infrab4a/connect', ['exports', 'reflect-metadata', 'class-transformer', 'lodash', 'firebase', 'firebase/app'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a.connect = {}), null, global["class-transformer"], global.lodash, global.firebase, global.firebase$1));
5
+ })(this, (function (exports, reflectMetadata, classTransformer, lodash, firebase, firebase$1) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
- var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
10
9
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
11
10
  var firebase__default$1 = /*#__PURE__*/_interopDefaultLegacy(firebase$1);
12
11
 
13
- var BaseModel = /** @class */ (function () {
14
- function BaseModel(args) {
15
- Object.assign(this, args);
16
- }
17
- BaseModel.toInstance = function (data) {
18
- return classTransformer.plainToClass(this, data);
19
- };
20
- BaseModel.prototype.toPlain = function () {
21
- return classTransformer.classToPlain(this, { exposeUnsetFields: false });
22
- };
23
- return BaseModel;
12
+ var BaseModel = /** @class */ (function () {
13
+ function BaseModel(args) {
14
+ Object.assign(this, args);
15
+ }
16
+ BaseModel.toInstance = function (data) {
17
+ return classTransformer.plainToClass(this, data);
18
+ };
19
+ BaseModel.prototype.toPlain = function () {
20
+ return classTransformer.classToPlain(this, { exposeUnsetFields: false });
21
+ };
22
+ return BaseModel;
24
23
  }());
25
24
 
26
- exports.Where = void 0;
27
- (function (Where) {
28
- Where["EQUALS"] = "==";
29
- Where["NOTEQUALS"] = "!=";
30
- Where["GT"] = ">";
31
- Where["GTE"] = ">=";
32
- Where["IN"] = "in";
33
- Where["LT"] = "<";
34
- Where["LTE"] = "<=";
35
- Where["LIKE"] = "like";
25
+ exports.Where = void 0;
26
+ (function (Where) {
27
+ Where["EQUALS"] = "==";
28
+ Where["NOTEQUALS"] = "!=";
29
+ Where["GT"] = ">";
30
+ Where["GTE"] = ">=";
31
+ Where["IN"] = "in";
32
+ Where["LT"] = "<";
33
+ Where["LTE"] = "<=";
34
+ Where["LIKE"] = "like";
36
35
  })(exports.Where || (exports.Where = {}));
37
36
 
38
- exports.UpdateOptionActions = void 0;
39
- (function (UpdateOptionActions) {
40
- UpdateOptionActions["UPDATE"] = "update";
41
- UpdateOptionActions["MERGE"] = "merge";
42
- UpdateOptionActions["REMOVE"] = "remove";
43
- UpdateOptionActions["REMOVE_FIELD"] = "removeField";
44
- UpdateOptionActions["NULL"] = "null";
37
+ exports.UpdateOptionActions = void 0;
38
+ (function (UpdateOptionActions) {
39
+ UpdateOptionActions["UPDATE"] = "update";
40
+ UpdateOptionActions["MERGE"] = "merge";
41
+ UpdateOptionActions["REMOVE"] = "remove";
42
+ UpdateOptionActions["REMOVE_FIELD"] = "removeField";
43
+ UpdateOptionActions["NULL"] = "null";
45
44
  })(exports.UpdateOptionActions || (exports.UpdateOptionActions = {}));
46
45
 
47
- exports.AccessoryImportances = void 0;
48
- (function (AccessoryImportances) {
49
- AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
50
- AccessoryImportances["LIKE_RARELY_USE"] = "Gosto, mas uso poucos";
51
- AccessoryImportances["LIKE_ALWAYS_FOLLOW_FASHION"] = "Gosto muito de acess\u00F3rios e sempre procuro acompanhar a moda";
46
+ exports.AccessoryImportances = void 0;
47
+ (function (AccessoryImportances) {
48
+ AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
49
+ AccessoryImportances["LIKE_RARELY_USE"] = "Gosto, mas uso poucos";
50
+ AccessoryImportances["LIKE_ALWAYS_FOLLOW_FASHION"] = "Gosto muito de acess\u00F3rios e sempre procuro acompanhar a moda";
52
51
  })(exports.AccessoryImportances || (exports.AccessoryImportances = {}));
53
52
 
54
- exports.Area = void 0;
55
- (function (Area) {
56
- Area["GP"] = "Geral";
57
- Area["CRM"] = "CRM";
58
- Area["MediaProd"] = "Media Production";
59
- Area["Tech"] = "Tecnologia";
60
- Area["Transactional"] = "Transacional";
61
- Area["Operations"] = "Opera\u00E7\u00F5es";
62
- Area["Sales"] = "Comercial";
63
- Area["Finantial"] = "Financeiro";
64
- Area["HR"] = "RH";
53
+ exports.Area = void 0;
54
+ (function (Area) {
55
+ Area["GP"] = "Geral";
56
+ Area["CRM"] = "CRM";
57
+ Area["MediaProd"] = "Media Production";
58
+ Area["Tech"] = "Tecnologia";
59
+ Area["Transactional"] = "Transacional";
60
+ Area["Operations"] = "Opera\u00E7\u00F5es";
61
+ Area["Sales"] = "Comercial";
62
+ Area["Finantial"] = "Financeiro";
63
+ Area["HR"] = "RH";
65
64
  })(exports.Area || (exports.Area = {}));
66
65
 
67
- exports.BeardProblems = void 0;
68
- (function (BeardProblems) {
69
- BeardProblems["NO_PROBLEMS"] = "Sem problemas";
70
- BeardProblems["DRY"] = "Barba Seca";
71
- BeardProblems["OILY"] = "Barba Oleaosa";
72
- BeardProblems["DANCRUFF"] = "Barba com Caspa";
73
- BeardProblems["INGROWN_HAIRS"] = "P\u00EAlos Encravados";
74
- BeardProblems["DOESNT_GROW"] = "N\u00E3o Cresce";
75
- BeardProblems["SPARSE_BEARD"] = "Barba Rala";
66
+ exports.BeardProblems = void 0;
67
+ (function (BeardProblems) {
68
+ BeardProblems["NO_PROBLEMS"] = "Sem problemas";
69
+ BeardProblems["DRY"] = "Barba Seca";
70
+ BeardProblems["OILY"] = "Barba Oleaosa";
71
+ BeardProblems["DANCRUFF"] = "Barba com Caspa";
72
+ BeardProblems["INGROWN_HAIRS"] = "P\u00EAlos Encravados";
73
+ BeardProblems["DOESNT_GROW"] = "N\u00E3o Cresce";
74
+ BeardProblems["SPARSE_BEARD"] = "Barba Rala";
76
75
  })(exports.BeardProblems || (exports.BeardProblems = {}));
77
76
 
78
- exports.BeardSizes = void 0;
79
- (function (BeardSizes) {
80
- BeardSizes["BIG"] = "Grande";
81
- BeardSizes["MEDIUM"] = "M\u00E9dia";
82
- BeardSizes["SHORT"] = "Curta";
83
- BeardSizes["MUSTACHE"] = "Bigode";
84
- BeardSizes["NOTHING"] = "Sem Barba";
77
+ exports.BeardSizes = void 0;
78
+ (function (BeardSizes) {
79
+ BeardSizes["BIG"] = "Grande";
80
+ BeardSizes["MEDIUM"] = "M\u00E9dia";
81
+ BeardSizes["SHORT"] = "Curta";
82
+ BeardSizes["MUSTACHE"] = "Bigode";
83
+ BeardSizes["NOTHING"] = "Sem Barba";
85
84
  })(exports.BeardSizes || (exports.BeardSizes = {}));
86
85
 
87
- exports.BeautyProductImportances = void 0;
88
- (function (BeautyProductImportances) {
89
- BeautyProductImportances["KNOW_LITTLE_ABOUT"] = "Conhe\u00E7o bem pouco de produtos de beleza e rotinas de cuidados";
90
- BeautyProductImportances["ALREADY_BOUGHT_NOTHING_SPECIALIZED"] = "J\u00E1 comprei alguns produtos b\u00E1sicos para cuidar de mim, mas nada muito especializado";
91
- BeautyProductImportances["GOOD_CARE_MYSELF"] = "Me considero um homem que se cuida bem. Conhe\u00E7o sobre produtos especializados e me preocupo em ter uma rotina de cuidados";
92
- BeautyProductImportances["PERSONAL_CARE_EXPERT"] = "Sou um expert em cuidados pessoais";
86
+ exports.BeautyProductImportances = void 0;
87
+ (function (BeautyProductImportances) {
88
+ BeautyProductImportances["KNOW_LITTLE_ABOUT"] = "Conhe\u00E7o bem pouco de produtos de beleza e rotinas de cuidados";
89
+ BeautyProductImportances["ALREADY_BOUGHT_NOTHING_SPECIALIZED"] = "J\u00E1 comprei alguns produtos b\u00E1sicos para cuidar de mim, mas nada muito especializado";
90
+ BeautyProductImportances["GOOD_CARE_MYSELF"] = "Me considero um homem que se cuida bem. Conhe\u00E7o sobre produtos especializados e me preocupo em ter uma rotina de cuidados";
91
+ BeautyProductImportances["PERSONAL_CARE_EXPERT"] = "Sou um expert em cuidados pessoais";
93
92
  })(exports.BeautyProductImportances || (exports.BeautyProductImportances = {}));
94
93
 
95
- exports.BodyProblems = void 0;
96
- (function (BodyProblems) {
97
- BodyProblems["NO_WORRIES"] = "Sem preocupa\u00E7\u00F5es";
98
- BodyProblems["FLACCIDITY"] = "Flacidez";
99
- BodyProblems["LOCALIZED_FAT"] = "Gordura Localizada";
100
- BodyProblems["STRETCH_MARKS"] = "Estrias";
101
- BodyProblems["SENSITIVE_SKIN"] = "Pele Sens\u00EDvel";
102
- BodyProblems["DRY_SKIN"] = "Pele Seca";
103
- BodyProblems["OILY_ACNE"] = "Oleosa/Acne";
104
- BodyProblems["SKIN_FRECKLES"] = "Pele com Sardas";
105
- BodyProblems["PHOTOSENSITIVE_SKIN"] = "Pele Fotossens\u00EDvel";
94
+ exports.BodyProblems = void 0;
95
+ (function (BodyProblems) {
96
+ BodyProblems["NO_WORRIES"] = "Sem preocupa\u00E7\u00F5es";
97
+ BodyProblems["FLACCIDITY"] = "Flacidez";
98
+ BodyProblems["LOCALIZED_FAT"] = "Gordura Localizada";
99
+ BodyProblems["STRETCH_MARKS"] = "Estrias";
100
+ BodyProblems["SENSITIVE_SKIN"] = "Pele Sens\u00EDvel";
101
+ BodyProblems["DRY_SKIN"] = "Pele Seca";
102
+ BodyProblems["OILY_ACNE"] = "Oleosa/Acne";
103
+ BodyProblems["SKIN_FRECKLES"] = "Pele com Sardas";
104
+ BodyProblems["PHOTOSENSITIVE_SKIN"] = "Pele Fotossens\u00EDvel";
106
105
  })(exports.BodyProblems || (exports.BodyProblems = {}));
107
106
 
108
- exports.BodyShapes = void 0;
109
- (function (BodyShapes) {
110
- BodyShapes["LEAN"] = "Magro";
111
- BodyShapes["REGULAR"] = "Regular";
112
- BodyShapes["OVERWEIGHT"] = "Acima do Peso";
113
- BodyShapes["ATHLETIC"] = "Atl\u00E9tico";
114
- BodyShapes["MUSCULAR"] = "Musculoso";
107
+ exports.BodyShapes = void 0;
108
+ (function (BodyShapes) {
109
+ BodyShapes["LEAN"] = "Magro";
110
+ BodyShapes["REGULAR"] = "Regular";
111
+ BodyShapes["OVERWEIGHT"] = "Acima do Peso";
112
+ BodyShapes["ATHLETIC"] = "Atl\u00E9tico";
113
+ BodyShapes["MUSCULAR"] = "Musculoso";
115
114
  })(exports.BodyShapes || (exports.BodyShapes = {}));
116
115
 
117
- exports.BodyTattoos = void 0;
118
- (function (BodyTattoos) {
119
- BodyTattoos["NONE"] = "Nenhuma";
120
- BodyTattoos["HAS_DOESNT_CARE"] = "Tenho mas n\u00E3o cuido";
121
- BodyTattoos["HAS_CARE_LOT"] = "Tenho e cuido bastante";
116
+ exports.BodyTattoos = void 0;
117
+ (function (BodyTattoos) {
118
+ BodyTattoos["NONE"] = "Nenhuma";
119
+ BodyTattoos["HAS_DOESNT_CARE"] = "Tenho mas n\u00E3o cuido";
120
+ BodyTattoos["HAS_CARE_LOT"] = "Tenho e cuido bastante";
122
121
  })(exports.BodyTattoos || (exports.BodyTattoos = {}));
123
122
 
124
- exports.FaceSkinOilinesses = void 0;
125
- (function (FaceSkinOilinesses) {
126
- FaceSkinOilinesses["DRY"] = "Seca";
127
- FaceSkinOilinesses["OILY"] = "Oleaosa";
128
- FaceSkinOilinesses["MIXED"] = "Mista";
129
- FaceSkinOilinesses["NORMAL"] = "Normal";
130
- FaceSkinOilinesses["DONT_KNOW"] = "Eu n\u00E3o sei como dizer";
123
+ exports.FaceSkinOilinesses = void 0;
124
+ (function (FaceSkinOilinesses) {
125
+ FaceSkinOilinesses["DRY"] = "Seca";
126
+ FaceSkinOilinesses["OILY"] = "Oleaosa";
127
+ FaceSkinOilinesses["MIXED"] = "Mista";
128
+ FaceSkinOilinesses["NORMAL"] = "Normal";
129
+ FaceSkinOilinesses["DONT_KNOW"] = "Eu n\u00E3o sei como dizer";
131
130
  })(exports.FaceSkinOilinesses || (exports.FaceSkinOilinesses = {}));
132
131
 
133
- exports.FaceSkinProblems = void 0;
134
- (function (FaceSkinProblems) {
135
- FaceSkinProblems["NO_PROBLEMS"] = "Sem problemas";
136
- FaceSkinProblems["DARK_CIRCLES"] = "Olheiras";
137
- FaceSkinProblems["WRINKLES"] = "Rugas";
138
- FaceSkinProblems["BLACKHEADS_PIMPLES"] = "Cravos e Espinhas";
139
- FaceSkinProblems["STAINS"] = "Manchas";
140
- FaceSkinProblems["FRECKLES"] = "Sardas";
141
- FaceSkinProblems["SENSITIVE"] = "Sens\u00EDvel";
142
- FaceSkinProblems["PHOTOSENSITIVE"] = "Fotossens\u00EDvel";
132
+ exports.FaceSkinProblems = void 0;
133
+ (function (FaceSkinProblems) {
134
+ FaceSkinProblems["NO_PROBLEMS"] = "Sem problemas";
135
+ FaceSkinProblems["DARK_CIRCLES"] = "Olheiras";
136
+ FaceSkinProblems["WRINKLES"] = "Rugas";
137
+ FaceSkinProblems["BLACKHEADS_PIMPLES"] = "Cravos e Espinhas";
138
+ FaceSkinProblems["STAINS"] = "Manchas";
139
+ FaceSkinProblems["FRECKLES"] = "Sardas";
140
+ FaceSkinProblems["SENSITIVE"] = "Sens\u00EDvel";
141
+ FaceSkinProblems["PHOTOSENSITIVE"] = "Fotossens\u00EDvel";
143
142
  })(exports.FaceSkinProblems || (exports.FaceSkinProblems = {}));
144
143
 
145
- exports.FaceSkinTones = void 0;
146
- (function (FaceSkinTones) {
147
- FaceSkinTones["VERY_CLEAR"] = "Muito Clara";
148
- FaceSkinTones["CLEAR"] = "Clara";
149
- FaceSkinTones["MEDIUM_LIGHT"] = "Clara M\u00E9dia";
150
- FaceSkinTones["MEDIUM_DARK"] = "Escura M\u00E9dia";
151
- FaceSkinTones["DARK"] = "Escura";
152
- FaceSkinTones["VERY_DARK"] = "Muito Escura";
144
+ exports.FaceSkinTones = void 0;
145
+ (function (FaceSkinTones) {
146
+ FaceSkinTones["VERY_CLEAR"] = "Muito Clara";
147
+ FaceSkinTones["CLEAR"] = "Clara";
148
+ FaceSkinTones["MEDIUM_LIGHT"] = "Clara M\u00E9dia";
149
+ FaceSkinTones["MEDIUM_DARK"] = "Escura M\u00E9dia";
150
+ FaceSkinTones["DARK"] = "Escura";
151
+ FaceSkinTones["VERY_DARK"] = "Muito Escura";
153
152
  })(exports.FaceSkinTones || (exports.FaceSkinTones = {}));
154
153
 
155
- exports.FamilyIncomes = void 0;
156
- (function (FamilyIncomes) {
157
- FamilyIncomes["UNTIL_3000"] = "At\u00E9 R$3.000";
158
- FamilyIncomes["SINCE_3001_TO_7000"] = "De R$3.001 a R$7.000";
159
- FamilyIncomes["SINCE_7001_TO_10000"] = "De R$7.001 a R$10.000";
160
- FamilyIncomes["SINCE_10001_TO_15000"] = "De R$10.001 a R$15.000";
161
- FamilyIncomes["GRAN_THAN_15000"] = "Mais de R$15.000";
162
- FamilyIncomes["NOW_ANSWER"] = "Prefiro nao responder";
154
+ exports.FamilyIncomes = void 0;
155
+ (function (FamilyIncomes) {
156
+ FamilyIncomes["UNTIL_3000"] = "At\u00E9 R$3.000";
157
+ FamilyIncomes["SINCE_3001_TO_7000"] = "De R$3.001 a R$7.000";
158
+ FamilyIncomes["SINCE_7001_TO_10000"] = "De R$7.001 a R$10.000";
159
+ FamilyIncomes["SINCE_10001_TO_15000"] = "De R$10.001 a R$15.000";
160
+ FamilyIncomes["GRAN_THAN_15000"] = "Mais de R$15.000";
161
+ FamilyIncomes["NOW_ANSWER"] = "Prefiro nao responder";
163
162
  })(exports.FamilyIncomes || (exports.FamilyIncomes = {}));
164
163
 
165
- exports.FragranceImportances = void 0;
166
- (function (FragranceImportances) {
167
- FragranceImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
168
- FragranceImportances["LIKE_ALWAYS_USE_SAME"] = "Gosto de perfumes, mas uso sempre os mesmos";
169
- FragranceImportances["LIKE_INNOVATE"] = "Gosto de inovar e conhecer novas fragr\u00E2ncias";
164
+ exports.FragranceImportances = void 0;
165
+ (function (FragranceImportances) {
166
+ FragranceImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
167
+ FragranceImportances["LIKE_ALWAYS_USE_SAME"] = "Gosto de perfumes, mas uso sempre os mesmos";
168
+ FragranceImportances["LIKE_INNOVATE"] = "Gosto de inovar e conhecer novas fragr\u00E2ncias";
170
169
  })(exports.FragranceImportances || (exports.FragranceImportances = {}));
171
170
 
172
- exports.HairColors = void 0;
173
- (function (HairColors) {
174
- HairColors["BLACK"] = "Preto";
175
- HairColors["DARK_BROWN"] = "Castanho Escuro";
176
- HairColors["LIGHT_BROWN"] = "Castanho Claro";
177
- HairColors["DARK_BLONDE"] = "Loiro Escuro";
178
- HairColors["LIGHT_BLONDE"] = "Loiro Claro";
179
- HairColors["WHITE_GRAY"] = "Branco/Grisalho";
180
- HairColors["REDHEAD"] = "Ruivo";
181
- HairColors["OTHER"] = "RuiOutroo";
171
+ exports.HairColors = void 0;
172
+ (function (HairColors) {
173
+ HairColors["BLACK"] = "Preto";
174
+ HairColors["DARK_BROWN"] = "Castanho Escuro";
175
+ HairColors["LIGHT_BROWN"] = "Castanho Claro";
176
+ HairColors["DARK_BLONDE"] = "Loiro Escuro";
177
+ HairColors["LIGHT_BLONDE"] = "Loiro Claro";
178
+ HairColors["WHITE_GRAY"] = "Branco/Grisalho";
179
+ HairColors["REDHEAD"] = "Ruivo";
180
+ HairColors["OTHER"] = "RuiOutroo";
182
181
  })(exports.HairColors || (exports.HairColors = {}));
183
182
 
184
- exports.HairProblems = void 0;
185
- (function (HairProblems) {
186
- HairProblems["NO_PROBLEMS"] = "Sem problemas";
187
- HairProblems["DANCRUFF"] = "Caspa";
188
- HairProblems["LOSS"] = "Queda";
189
- HairProblems["OILY"] = "Oleosidade";
190
- HairProblems["DRYNESS"] = "Ressecamento";
191
- HairProblems["CHEMICAL"] = "Quimica";
192
- HairProblems["WHITE_HAIR"] = "Cabelos Brancos";
193
- HairProblems["REBEL_WIRES"] = "Fios Rebeldes";
183
+ exports.HairProblems = void 0;
184
+ (function (HairProblems) {
185
+ HairProblems["NO_PROBLEMS"] = "Sem problemas";
186
+ HairProblems["DANCRUFF"] = "Caspa";
187
+ HairProblems["LOSS"] = "Queda";
188
+ HairProblems["OILY"] = "Oleosidade";
189
+ HairProblems["DRYNESS"] = "Ressecamento";
190
+ HairProblems["CHEMICAL"] = "Quimica";
191
+ HairProblems["WHITE_HAIR"] = "Cabelos Brancos";
192
+ HairProblems["REBEL_WIRES"] = "Fios Rebeldes";
194
193
  })(exports.HairProblems || (exports.HairProblems = {}));
195
194
 
196
- exports.HairStrands = void 0;
197
- (function (HairStrands) {
198
- HairStrands["NORMAL"] = "Fio Normal";
199
- HairStrands["DRY"] = "Fio Seco";
200
- HairStrands["OILY"] = "Fio Oleoso";
201
- HairStrands["MIXED"] = "Fio Misto";
202
- HairStrands["FINE"] = "Fio Fino";
203
- HairStrands["THICK"] = "Fio Grosso";
195
+ exports.HairStrands = void 0;
196
+ (function (HairStrands) {
197
+ HairStrands["NORMAL"] = "Fio Normal";
198
+ HairStrands["DRY"] = "Fio Seco";
199
+ HairStrands["OILY"] = "Fio Oleoso";
200
+ HairStrands["MIXED"] = "Fio Misto";
201
+ HairStrands["FINE"] = "Fio Fino";
202
+ HairStrands["THICK"] = "Fio Grosso";
204
203
  })(exports.HairStrands || (exports.HairStrands = {}));
205
204
 
206
- exports.HairTypes = void 0;
207
- (function (HairTypes) {
208
- HairTypes["Smooth"] = "Liso";
209
- HairTypes["WAVY"] = "Ondulado";
210
- HairTypes["CURLY"] = "Cacheado";
211
- HairTypes["FRIZZY"] = "Crespo";
212
- HairTypes["BALD"] = "Sou careca";
205
+ exports.HairTypes = void 0;
206
+ (function (HairTypes) {
207
+ HairTypes["Smooth"] = "Liso";
208
+ HairTypes["WAVY"] = "Ondulado";
209
+ HairTypes["CURLY"] = "Cacheado";
210
+ HairTypes["FRIZZY"] = "Crespo";
211
+ HairTypes["BALD"] = "Sou careca";
213
212
  })(exports.HairTypes || (exports.HairTypes = {}));
214
213
 
215
- exports.OfficePosition = void 0;
216
- (function (OfficePosition) {
217
- OfficePosition["Intern"] = "Estagi\u00E1rio";
218
- OfficePosition["Analyst"] = "Analista";
219
- OfficePosition["Manager"] = "Gerente";
220
- OfficePosition["Director"] = "Diretor";
214
+ exports.OfficePosition = void 0;
215
+ (function (OfficePosition) {
216
+ OfficePosition["Intern"] = "Estagi\u00E1rio";
217
+ OfficePosition["Analyst"] = "Analista";
218
+ OfficePosition["Manager"] = "Gerente";
219
+ OfficePosition["Director"] = "Diretor";
221
220
  })(exports.OfficePosition || (exports.OfficePosition = {}));
222
221
 
223
- exports.ProductSpents = void 0;
224
- (function (ProductSpents) {
225
- ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
226
- ProductSpents["SINCE_51_TO_100"] = "De R$51 a R$100";
227
- ProductSpents["SINCE_101_TO_200"] = "De R$101 a R$200";
228
- ProductSpents["SINCE_201_TO_300"] = "De R$201 a R$300";
229
- ProductSpents["GRAN_THAN_300"] = "Mais de R$300";
230
- ProductSpents["NOW_ANSWER"] = "Prefiro nao responder";
222
+ exports.ProductSpents = void 0;
223
+ (function (ProductSpents) {
224
+ ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
225
+ ProductSpents["SINCE_51_TO_100"] = "De R$51 a R$100";
226
+ ProductSpents["SINCE_101_TO_200"] = "De R$101 a R$200";
227
+ ProductSpents["SINCE_201_TO_300"] = "De R$201 a R$300";
228
+ ProductSpents["GRAN_THAN_300"] = "Mais de R$300";
229
+ ProductSpents["NOW_ANSWER"] = "Prefiro nao responder";
231
230
  })(exports.ProductSpents || (exports.ProductSpents = {}));
232
231
 
233
- exports.UserType = void 0;
234
- (function (UserType) {
235
- UserType["B2C"] = "Cliente Transacional";
236
- UserType["GlamGirl"] = "Glamgirl";
237
- UserType["MensBoy"] = "Mensboy";
238
- UserType["B2B"] = "Company";
239
- UserType["Collaborator"] = "Funcion\u00E1rio";
240
- UserType["Influencer"] = "Influencer";
232
+ exports.UserType = void 0;
233
+ (function (UserType) {
234
+ UserType["B2C"] = "Cliente Transacional";
235
+ UserType["GlamGirl"] = "Glamgirl";
236
+ UserType["MensBoy"] = "Mensboy";
237
+ UserType["B2B"] = "Company";
238
+ UserType["Collaborator"] = "Funcion\u00E1rio";
239
+ UserType["Influencer"] = "Influencer";
241
240
  })(exports.UserType || (exports.UserType = {}));
242
241
 
243
- exports.BillingStatus = void 0;
244
- (function (BillingStatus) {
245
- BillingStatus["PAYED"] = "PAGO";
242
+ exports.BillingStatus = void 0;
243
+ (function (BillingStatus) {
244
+ BillingStatus["PAYED"] = "PAGO";
246
245
  })(exports.BillingStatus || (exports.BillingStatus = {}));
247
246
 
248
- exports.EditionStatus = void 0;
249
- (function (EditionStatus) {
250
- EditionStatus["ALLOCATION_WAITING"] = "Aguardando aloca\u00E7\u00E3o";
251
- EditionStatus["SHIPPED"] = "Enviado";
247
+ exports.EditionStatus = void 0;
248
+ (function (EditionStatus) {
249
+ EditionStatus["ALLOCATION_WAITING"] = "Aguardando aloca\u00E7\u00E3o";
250
+ EditionStatus["SHIPPED"] = "Enviado";
252
251
  })(exports.EditionStatus || (exports.EditionStatus = {}));
253
252
 
254
- exports.PaymentType = void 0;
255
- (function (PaymentType) {
256
- PaymentType["AQUISITION"] = "Aquisi\u00E7\u00E3o";
257
- PaymentType["RENEWAL"] = "Renova\u00E7\u00E3o";
258
- PaymentType["FREIGHT"] = "mudan\u00E7a de endere\u00E7o, Frete";
253
+ exports.PaymentType = void 0;
254
+ (function (PaymentType) {
255
+ PaymentType["AQUISITION"] = "Aquisi\u00E7\u00E3o";
256
+ PaymentType["RENEWAL"] = "Renova\u00E7\u00E3o";
257
+ PaymentType["FREIGHT"] = "mudan\u00E7a de endere\u00E7o, Frete";
259
258
  })(exports.PaymentType || (exports.PaymentType = {}));
260
259
 
261
- exports.Status = void 0;
262
- (function (Status) {
263
- Status["ACTIVE"] = "active";
264
- Status["CANCELLED"] = "Cancelado";
260
+ exports.Status = void 0;
261
+ (function (Status) {
262
+ Status["ACTIVE"] = "active";
263
+ Status["CANCELLED"] = "Cancelado";
265
264
  })(exports.Status || (exports.Status = {}));
266
265
 
267
- /*! *****************************************************************************
268
- Copyright (c) Microsoft Corporation.
269
-
270
- Permission to use, copy, modify, and/or distribute this software for any
271
- purpose with or without fee is hereby granted.
272
-
273
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
274
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
275
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
276
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
277
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
278
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
279
- PERFORMANCE OF THIS SOFTWARE.
280
- ***************************************************************************** */
281
- /* global Reflect, Promise */
282
- var extendStatics = function (d, b) {
283
- extendStatics = Object.setPrototypeOf ||
284
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
285
- function (d, b) { for (var p in b)
286
- if (Object.prototype.hasOwnProperty.call(b, p))
287
- d[p] = b[p]; };
288
- return extendStatics(d, b);
289
- };
290
- function __extends(d, b) {
291
- if (typeof b !== "function" && b !== null)
292
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
293
- extendStatics(d, b);
294
- function __() { this.constructor = d; }
295
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
296
- }
297
- var __assign = function () {
298
- __assign = Object.assign || function __assign(t) {
299
- for (var s, i = 1, n = arguments.length; i < n; i++) {
300
- s = arguments[i];
301
- for (var p in s)
302
- if (Object.prototype.hasOwnProperty.call(s, p))
303
- t[p] = s[p];
304
- }
305
- return t;
306
- };
307
- return __assign.apply(this, arguments);
308
- };
309
- function __rest(s, e) {
310
- var t = {};
311
- for (var p in s)
312
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
313
- t[p] = s[p];
314
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
315
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
316
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
317
- t[p[i]] = s[p[i]];
318
- }
319
- return t;
320
- }
321
- function __decorate(decorators, target, key, desc) {
322
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
323
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
324
- r = Reflect.decorate(decorators, target, key, desc);
325
- else
326
- for (var i = decorators.length - 1; i >= 0; i--)
327
- if (d = decorators[i])
328
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
329
- return c > 3 && r && Object.defineProperty(target, key, r), r;
330
- }
331
- function __param(paramIndex, decorator) {
332
- return function (target, key) { decorator(target, key, paramIndex); };
333
- }
334
- function __metadata(metadataKey, metadataValue) {
335
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
336
- return Reflect.metadata(metadataKey, metadataValue);
337
- }
338
- function __awaiter(thisArg, _arguments, P, generator) {
339
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
340
- return new (P || (P = Promise))(function (resolve, reject) {
341
- function fulfilled(value) { try {
342
- step(generator.next(value));
343
- }
344
- catch (e) {
345
- reject(e);
346
- } }
347
- function rejected(value) { try {
348
- step(generator["throw"](value));
349
- }
350
- catch (e) {
351
- reject(e);
352
- } }
353
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
354
- step((generator = generator.apply(thisArg, _arguments || [])).next());
355
- });
356
- }
357
- function __generator(thisArg, body) {
358
- var _ = { label: 0, sent: function () { if (t[0] & 1)
359
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
360
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
361
- function verb(n) { return function (v) { return step([n, v]); }; }
362
- function step(op) {
363
- if (f)
364
- throw new TypeError("Generator is already executing.");
365
- while (_)
366
- try {
367
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
368
- return t;
369
- if (y = 0, t)
370
- op = [op[0] & 2, t.value];
371
- switch (op[0]) {
372
- case 0:
373
- case 1:
374
- t = op;
375
- break;
376
- case 4:
377
- _.label++;
378
- return { value: op[1], done: false };
379
- case 5:
380
- _.label++;
381
- y = op[1];
382
- op = [0];
383
- continue;
384
- case 7:
385
- op = _.ops.pop();
386
- _.trys.pop();
387
- continue;
388
- default:
389
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
390
- _ = 0;
391
- continue;
392
- }
393
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
394
- _.label = op[1];
395
- break;
396
- }
397
- if (op[0] === 6 && _.label < t[1]) {
398
- _.label = t[1];
399
- t = op;
400
- break;
401
- }
402
- if (t && _.label < t[2]) {
403
- _.label = t[2];
404
- _.ops.push(op);
405
- break;
406
- }
407
- if (t[2])
408
- _.ops.pop();
409
- _.trys.pop();
410
- continue;
411
- }
412
- op = body.call(thisArg, _);
413
- }
414
- catch (e) {
415
- op = [6, e];
416
- y = 0;
417
- }
418
- finally {
419
- f = t = 0;
420
- }
421
- if (op[0] & 5)
422
- throw op[1];
423
- return { value: op[0] ? op[1] : void 0, done: true };
424
- }
425
- }
426
- var __createBinding = Object.create ? (function (o, m, k, k2) {
427
- if (k2 === undefined)
428
- k2 = k;
429
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
430
- }) : (function (o, m, k, k2) {
431
- if (k2 === undefined)
432
- k2 = k;
433
- o[k2] = m[k];
434
- });
435
- function __exportStar(m, o) {
436
- for (var p in m)
437
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
438
- __createBinding(o, m, p);
439
- }
440
- function __values(o) {
441
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
442
- if (m)
443
- return m.call(o);
444
- if (o && typeof o.length === "number")
445
- return {
446
- next: function () {
447
- if (o && i >= o.length)
448
- o = void 0;
449
- return { value: o && o[i++], done: !o };
450
- }
451
- };
452
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
453
- }
454
- function __read(o, n) {
455
- var m = typeof Symbol === "function" && o[Symbol.iterator];
456
- if (!m)
457
- return o;
458
- var i = m.call(o), r, ar = [], e;
459
- try {
460
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
461
- ar.push(r.value);
462
- }
463
- catch (error) {
464
- e = { error: error };
465
- }
466
- finally {
467
- try {
468
- if (r && !r.done && (m = i["return"]))
469
- m.call(i);
470
- }
471
- finally {
472
- if (e)
473
- throw e.error;
474
- }
475
- }
476
- return ar;
477
- }
478
- /** @deprecated */
479
- function __spread() {
480
- for (var ar = [], i = 0; i < arguments.length; i++)
481
- ar = ar.concat(__read(arguments[i]));
482
- return ar;
483
- }
484
- /** @deprecated */
485
- function __spreadArrays() {
486
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
487
- s += arguments[i].length;
488
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
489
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
490
- r[k] = a[j];
491
- return r;
492
- }
493
- function __spreadArray(to, from, pack) {
494
- if (pack || arguments.length === 2)
495
- for (var i = 0, l = from.length, ar; i < l; i++) {
496
- if (ar || !(i in from)) {
497
- if (!ar)
498
- ar = Array.prototype.slice.call(from, 0, i);
499
- ar[i] = from[i];
500
- }
501
- }
502
- return to.concat(ar || Array.prototype.slice.call(from));
503
- }
504
- function __await(v) {
505
- return this instanceof __await ? (this.v = v, this) : new __await(v);
506
- }
507
- function __asyncGenerator(thisArg, _arguments, generator) {
508
- if (!Symbol.asyncIterator)
509
- throw new TypeError("Symbol.asyncIterator is not defined.");
510
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
511
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
512
- function verb(n) { if (g[n])
513
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
514
- function resume(n, v) { try {
515
- step(g[n](v));
516
- }
517
- catch (e) {
518
- settle(q[0][3], e);
519
- } }
520
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
521
- function fulfill(value) { resume("next", value); }
522
- function reject(value) { resume("throw", value); }
523
- function settle(f, v) { if (f(v), q.shift(), q.length)
524
- resume(q[0][0], q[0][1]); }
525
- }
526
- function __asyncDelegator(o) {
527
- var i, p;
528
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
529
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
530
- }
531
- function __asyncValues(o) {
532
- if (!Symbol.asyncIterator)
533
- throw new TypeError("Symbol.asyncIterator is not defined.");
534
- var m = o[Symbol.asyncIterator], i;
535
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
536
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
537
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
538
- }
539
- function __makeTemplateObject(cooked, raw) {
540
- if (Object.defineProperty) {
541
- Object.defineProperty(cooked, "raw", { value: raw });
542
- }
543
- else {
544
- cooked.raw = raw;
545
- }
546
- return cooked;
547
- }
548
- ;
549
- var __setModuleDefault = Object.create ? (function (o, v) {
550
- Object.defineProperty(o, "default", { enumerable: true, value: v });
551
- }) : function (o, v) {
552
- o["default"] = v;
553
- };
554
- function __importStar(mod) {
555
- if (mod && mod.__esModule)
556
- return mod;
557
- var result = {};
558
- if (mod != null)
559
- for (var k in mod)
560
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
561
- __createBinding(result, mod, k);
562
- __setModuleDefault(result, mod);
563
- return result;
564
- }
565
- function __importDefault(mod) {
566
- return (mod && mod.__esModule) ? mod : { default: mod };
567
- }
568
- function __classPrivateFieldGet(receiver, state, kind, f) {
569
- if (kind === "a" && !f)
570
- throw new TypeError("Private accessor was defined without a getter");
571
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
572
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
573
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
574
- }
575
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
576
- if (kind === "m")
577
- throw new TypeError("Private method is not writable");
578
- if (kind === "a" && !f)
579
- throw new TypeError("Private accessor was defined without a setter");
580
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
581
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
582
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
266
+ /*! *****************************************************************************
267
+ Copyright (c) Microsoft Corporation.
268
+
269
+ Permission to use, copy, modify, and/or distribute this software for any
270
+ purpose with or without fee is hereby granted.
271
+
272
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
273
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
274
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
275
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
276
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
277
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
278
+ PERFORMANCE OF THIS SOFTWARE.
279
+ ***************************************************************************** */
280
+ /* global Reflect, Promise */
281
+ var extendStatics = function (d, b) {
282
+ extendStatics = Object.setPrototypeOf ||
283
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
284
+ function (d, b) { for (var p in b)
285
+ if (Object.prototype.hasOwnProperty.call(b, p))
286
+ d[p] = b[p]; };
287
+ return extendStatics(d, b);
288
+ };
289
+ function __extends(d, b) {
290
+ if (typeof b !== "function" && b !== null)
291
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
292
+ extendStatics(d, b);
293
+ function __() { this.constructor = d; }
294
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
295
+ }
296
+ var __assign = function () {
297
+ __assign = Object.assign || function __assign(t) {
298
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
299
+ s = arguments[i];
300
+ for (var p in s)
301
+ if (Object.prototype.hasOwnProperty.call(s, p))
302
+ t[p] = s[p];
303
+ }
304
+ return t;
305
+ };
306
+ return __assign.apply(this, arguments);
307
+ };
308
+ function __rest(s, e) {
309
+ var t = {};
310
+ for (var p in s)
311
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
312
+ t[p] = s[p];
313
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
314
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
315
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
316
+ t[p[i]] = s[p[i]];
317
+ }
318
+ return t;
319
+ }
320
+ function __decorate(decorators, target, key, desc) {
321
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
322
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
323
+ r = Reflect.decorate(decorators, target, key, desc);
324
+ else
325
+ for (var i = decorators.length - 1; i >= 0; i--)
326
+ if (d = decorators[i])
327
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
328
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
329
+ }
330
+ function __param(paramIndex, decorator) {
331
+ return function (target, key) { decorator(target, key, paramIndex); };
332
+ }
333
+ function __metadata(metadataKey, metadataValue) {
334
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
335
+ return Reflect.metadata(metadataKey, metadataValue);
336
+ }
337
+ function __awaiter(thisArg, _arguments, P, generator) {
338
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
339
+ return new (P || (P = Promise))(function (resolve, reject) {
340
+ function fulfilled(value) { try {
341
+ step(generator.next(value));
342
+ }
343
+ catch (e) {
344
+ reject(e);
345
+ } }
346
+ function rejected(value) { try {
347
+ step(generator["throw"](value));
348
+ }
349
+ catch (e) {
350
+ reject(e);
351
+ } }
352
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
353
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
354
+ });
355
+ }
356
+ function __generator(thisArg, body) {
357
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
358
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
359
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
360
+ function verb(n) { return function (v) { return step([n, v]); }; }
361
+ function step(op) {
362
+ if (f)
363
+ throw new TypeError("Generator is already executing.");
364
+ while (_)
365
+ try {
366
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
367
+ return t;
368
+ if (y = 0, t)
369
+ op = [op[0] & 2, t.value];
370
+ switch (op[0]) {
371
+ case 0:
372
+ case 1:
373
+ t = op;
374
+ break;
375
+ case 4:
376
+ _.label++;
377
+ return { value: op[1], done: false };
378
+ case 5:
379
+ _.label++;
380
+ y = op[1];
381
+ op = [0];
382
+ continue;
383
+ case 7:
384
+ op = _.ops.pop();
385
+ _.trys.pop();
386
+ continue;
387
+ default:
388
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
389
+ _ = 0;
390
+ continue;
391
+ }
392
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
393
+ _.label = op[1];
394
+ break;
395
+ }
396
+ if (op[0] === 6 && _.label < t[1]) {
397
+ _.label = t[1];
398
+ t = op;
399
+ break;
400
+ }
401
+ if (t && _.label < t[2]) {
402
+ _.label = t[2];
403
+ _.ops.push(op);
404
+ break;
405
+ }
406
+ if (t[2])
407
+ _.ops.pop();
408
+ _.trys.pop();
409
+ continue;
410
+ }
411
+ op = body.call(thisArg, _);
412
+ }
413
+ catch (e) {
414
+ op = [6, e];
415
+ y = 0;
416
+ }
417
+ finally {
418
+ f = t = 0;
419
+ }
420
+ if (op[0] & 5)
421
+ throw op[1];
422
+ return { value: op[0] ? op[1] : void 0, done: true };
423
+ }
424
+ }
425
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
426
+ if (k2 === undefined)
427
+ k2 = k;
428
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
429
+ }) : (function (o, m, k, k2) {
430
+ if (k2 === undefined)
431
+ k2 = k;
432
+ o[k2] = m[k];
433
+ });
434
+ function __exportStar(m, o) {
435
+ for (var p in m)
436
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
437
+ __createBinding(o, m, p);
438
+ }
439
+ function __values(o) {
440
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
441
+ if (m)
442
+ return m.call(o);
443
+ if (o && typeof o.length === "number")
444
+ return {
445
+ next: function () {
446
+ if (o && i >= o.length)
447
+ o = void 0;
448
+ return { value: o && o[i++], done: !o };
449
+ }
450
+ };
451
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
452
+ }
453
+ function __read(o, n) {
454
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
455
+ if (!m)
456
+ return o;
457
+ var i = m.call(o), r, ar = [], e;
458
+ try {
459
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
460
+ ar.push(r.value);
461
+ }
462
+ catch (error) {
463
+ e = { error: error };
464
+ }
465
+ finally {
466
+ try {
467
+ if (r && !r.done && (m = i["return"]))
468
+ m.call(i);
469
+ }
470
+ finally {
471
+ if (e)
472
+ throw e.error;
473
+ }
474
+ }
475
+ return ar;
476
+ }
477
+ /** @deprecated */
478
+ function __spread() {
479
+ for (var ar = [], i = 0; i < arguments.length; i++)
480
+ ar = ar.concat(__read(arguments[i]));
481
+ return ar;
482
+ }
483
+ /** @deprecated */
484
+ function __spreadArrays() {
485
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
486
+ s += arguments[i].length;
487
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
488
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
489
+ r[k] = a[j];
490
+ return r;
491
+ }
492
+ function __spreadArray(to, from, pack) {
493
+ if (pack || arguments.length === 2)
494
+ for (var i = 0, l = from.length, ar; i < l; i++) {
495
+ if (ar || !(i in from)) {
496
+ if (!ar)
497
+ ar = Array.prototype.slice.call(from, 0, i);
498
+ ar[i] = from[i];
499
+ }
500
+ }
501
+ return to.concat(ar || Array.prototype.slice.call(from));
502
+ }
503
+ function __await(v) {
504
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
505
+ }
506
+ function __asyncGenerator(thisArg, _arguments, generator) {
507
+ if (!Symbol.asyncIterator)
508
+ throw new TypeError("Symbol.asyncIterator is not defined.");
509
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
510
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
511
+ function verb(n) { if (g[n])
512
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
513
+ function resume(n, v) { try {
514
+ step(g[n](v));
515
+ }
516
+ catch (e) {
517
+ settle(q[0][3], e);
518
+ } }
519
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
520
+ function fulfill(value) { resume("next", value); }
521
+ function reject(value) { resume("throw", value); }
522
+ function settle(f, v) { if (f(v), q.shift(), q.length)
523
+ resume(q[0][0], q[0][1]); }
524
+ }
525
+ function __asyncDelegator(o) {
526
+ var i, p;
527
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
528
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
529
+ }
530
+ function __asyncValues(o) {
531
+ if (!Symbol.asyncIterator)
532
+ throw new TypeError("Symbol.asyncIterator is not defined.");
533
+ var m = o[Symbol.asyncIterator], i;
534
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
535
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
536
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
537
+ }
538
+ function __makeTemplateObject(cooked, raw) {
539
+ if (Object.defineProperty) {
540
+ Object.defineProperty(cooked, "raw", { value: raw });
541
+ }
542
+ else {
543
+ cooked.raw = raw;
544
+ }
545
+ return cooked;
546
+ }
547
+ ;
548
+ var __setModuleDefault = Object.create ? (function (o, v) {
549
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
550
+ }) : function (o, v) {
551
+ o["default"] = v;
552
+ };
553
+ function __importStar(mod) {
554
+ if (mod && mod.__esModule)
555
+ return mod;
556
+ var result = {};
557
+ if (mod != null)
558
+ for (var k in mod)
559
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
560
+ __createBinding(result, mod, k);
561
+ __setModuleDefault(result, mod);
562
+ return result;
563
+ }
564
+ function __importDefault(mod) {
565
+ return (mod && mod.__esModule) ? mod : { default: mod };
566
+ }
567
+ function __classPrivateFieldGet(receiver, state, kind, f) {
568
+ if (kind === "a" && !f)
569
+ throw new TypeError("Private accessor was defined without a getter");
570
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
571
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
572
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
573
+ }
574
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
575
+ if (kind === "m")
576
+ throw new TypeError("Private method is not writable");
577
+ if (kind === "a" && !f)
578
+ throw new TypeError("Private accessor was defined without a setter");
579
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
580
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
581
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
583
582
  }
584
583
 
585
- var Edition = /** @class */ (function (_super) {
586
- __extends(Edition, _super);
587
- function Edition() {
588
- return _super !== null && _super.apply(this, arguments) || this;
589
- }
590
- Edition.prototype.identifierFields = function () {
591
- return ['id'];
592
- };
593
- return Edition;
584
+ var Edition = /** @class */ (function (_super) {
585
+ __extends(Edition, _super);
586
+ function Edition() {
587
+ return _super !== null && _super.apply(this, arguments) || this;
588
+ }
589
+ Edition.prototype.identifierFields = function () {
590
+ return ['id'];
591
+ };
592
+ return Edition;
594
593
  }(BaseModel));
595
594
 
596
- var Payment = /** @class */ (function (_super) {
597
- __extends(Payment, _super);
598
- function Payment() {
599
- return _super !== null && _super.apply(this, arguments) || this;
600
- }
601
- Payment.prototype.identifierFields = function () {
602
- return ['id'];
603
- };
604
- return Payment;
605
- }(BaseModel));
606
- __decorate([
607
- classTransformer.Expose({ name: 'refuse_reason' }),
608
- __metadata("design:type", String)
609
- ], Payment.prototype, "refuseReason", void 0);
610
- __decorate([
611
- classTransformer.Expose({ name: 'status_reason' }),
612
- __metadata("design:type", String)
613
- ], Payment.prototype, "statusReason", void 0);
614
- __decorate([
615
- classTransformer.Expose({ name: 'acquirer_response_code' }),
616
- __metadata("design:type", String)
617
- ], Payment.prototype, "acquirerResponseCode", void 0);
618
- __decorate([
619
- classTransformer.Expose({ name: 'acquirer_name' }),
620
- __metadata("design:type", String)
621
- ], Payment.prototype, "acquirerName", void 0);
622
- __decorate([
623
- classTransformer.Expose({ name: 'acquirer_id' }),
624
- __metadata("design:type", String)
625
- ], Payment.prototype, "acquirerId", void 0);
626
- __decorate([
627
- classTransformer.Expose({ name: 'authorization_code' }),
628
- __metadata("design:type", String)
629
- ], Payment.prototype, "authorizationCode", void 0);
630
- __decorate([
631
- classTransformer.Expose({ name: 'soft_descriptor' }),
632
- __metadata("design:type", String)
633
- ], Payment.prototype, "softDescriptor", void 0);
634
- __decorate([
635
- classTransformer.Expose({ name: 'date_created' }),
636
- __metadata("design:type", String)
637
- ], Payment.prototype, "dateCreated", void 0);
638
- __decorate([
639
- classTransformer.Expose({ name: 'date_updated' }),
640
- __metadata("design:type", String)
641
- ], Payment.prototype, "dateUpdated", void 0);
642
- __decorate([
643
- classTransformer.Expose({ name: 'authorized_amount' }),
644
- __metadata("design:type", Number)
645
- ], Payment.prototype, "authorizedAmount", void 0);
646
- __decorate([
647
- classTransformer.Expose({ name: 'paid_amount' }),
648
- __metadata("design:type", Number)
649
- ], Payment.prototype, "paidAmount", void 0);
650
- __decorate([
651
- classTransformer.Expose({ name: 'refunded_amount' }),
652
- __metadata("design:type", Number)
653
- ], Payment.prototype, "refundedAmount", void 0);
654
- __decorate([
655
- classTransformer.Expose({ name: 'card_holder_name' }),
656
- __metadata("design:type", String)
657
- ], Payment.prototype, "cardHolderName", void 0);
658
- __decorate([
659
- classTransformer.Expose({ name: 'card_last_digits' }),
660
- __metadata("design:type", String)
661
- ], Payment.prototype, "cardLastDigits", void 0);
662
- __decorate([
663
- classTransformer.Expose({ name: 'card_first_digits' }),
664
- __metadata("design:type", String)
665
- ], Payment.prototype, "cardFirstDigits", void 0);
666
- __decorate([
667
- classTransformer.Expose({ name: 'card_brand' }),
668
- __metadata("design:type", String)
669
- ], Payment.prototype, "cardBrand", void 0);
670
- __decorate([
671
- classTransformer.Expose({ name: 'card_pin_mode' }),
672
- __metadata("design:type", String)
673
- ], Payment.prototype, "cardPinMode", void 0);
674
- __decorate([
675
- classTransformer.Expose({ name: 'card_magstripe_fallback' }),
676
- __metadata("design:type", Boolean)
677
- ], Payment.prototype, "cardMagstripeFallback", void 0);
678
- __decorate([
679
- classTransformer.Expose({ name: 'cvm_pin' }),
680
- __metadata("design:type", Boolean)
681
- ], Payment.prototype, "cvmPin", void 0);
682
- __decorate([
683
- classTransformer.Expose({ name: 'postback_url' }),
684
- __metadata("design:type", String)
685
- ], Payment.prototype, "postbackUrl", void 0);
686
- __decorate([
687
- classTransformer.Expose({ name: 'payment_method' }),
688
- __metadata("design:type", String)
689
- ], Payment.prototype, "paymentMethod", void 0);
690
- __decorate([
691
- classTransformer.Expose({ name: 'capture_method' }),
692
- __metadata("design:type", String)
693
- ], Payment.prototype, "captureMethod", void 0);
694
- __decorate([
695
- classTransformer.Expose({ name: 'antifraud_score' }),
696
- __metadata("design:type", String)
697
- ], Payment.prototype, "antifraudScore", void 0);
698
- __decorate([
699
- classTransformer.Expose({ name: 'boleto_url' }),
700
- __metadata("design:type", String)
701
- ], Payment.prototype, "boletoUrl", void 0);
702
- __decorate([
703
- classTransformer.Expose({ name: 'boleto_barcode' }),
704
- __metadata("design:type", String)
705
- ], Payment.prototype, "boletoBarcode", void 0);
706
- __decorate([
707
- classTransformer.Expose({ name: 'boleto_expiration_date' }),
708
- __metadata("design:type", String)
709
- ], Payment.prototype, "boletoExpirationDate", void 0);
710
- __decorate([
711
- classTransformer.Expose({ name: 'subscription_id' }),
712
- __metadata("design:type", String)
713
- ], Payment.prototype, "subscriptionId", void 0);
714
- __decorate([
715
- classTransformer.Expose({ name: 'split_rules' }),
716
- __metadata("design:type", String)
717
- ], Payment.prototype, "splitRules", void 0);
718
- __decorate([
719
- classTransformer.Expose({ name: 'antifraud_metadata' }),
720
- __metadata("design:type", Object)
721
- ], Payment.prototype, "antifraudMetadata", void 0);
722
- __decorate([
723
- classTransformer.Expose({ name: 'reference_key' }),
724
- __metadata("design:type", String)
725
- ], Payment.prototype, "referenceKey", void 0);
726
- __decorate([
727
- classTransformer.Expose({ name: 'local_transaction_id' }),
728
- __metadata("design:type", String)
729
- ], Payment.prototype, "localTransactionId", void 0);
730
- __decorate([
731
- classTransformer.Expose({ name: 'local_time' }),
732
- __metadata("design:type", String)
733
- ], Payment.prototype, "localTime", void 0);
734
- __decorate([
735
- classTransformer.Expose({ name: 'fraud_covered' }),
736
- __metadata("design:type", Boolean)
737
- ], Payment.prototype, "fraudCovered", void 0);
738
- __decorate([
739
- classTransformer.Expose({ name: 'fraud_reimbursed' }),
740
- __metadata("design:type", String)
741
- ], Payment.prototype, "fraudReimbursed", void 0);
742
- __decorate([
743
- classTransformer.Expose({ name: 'order_id' }),
744
- __metadata("design:type", String)
745
- ], Payment.prototype, "orderId", void 0);
746
- __decorate([
747
- classTransformer.Expose({ name: 'risk_level' }),
748
- __metadata("design:type", String)
749
- ], Payment.prototype, "riskLevel", void 0);
750
- __decorate([
751
- classTransformer.Expose({ name: 'receipt_url' }),
752
- __metadata("design:type", String)
753
- ], Payment.prototype, "receiptUrl", void 0);
754
- __decorate([
755
- classTransformer.Expose({ name: 'private_label' }),
756
- __metadata("design:type", String)
757
- ], Payment.prototype, "privateLabel", void 0);
758
- __decorate([
759
- classTransformer.Expose({ name: 'pix_qr_code' }),
760
- __metadata("design:type", String)
761
- ], Payment.prototype, "pixQrCode", void 0);
762
- __decorate([
763
- classTransformer.Expose({ name: 'pix_expiration_date' }),
764
- __metadata("design:type", String)
595
+ var Payment = /** @class */ (function (_super) {
596
+ __extends(Payment, _super);
597
+ function Payment() {
598
+ return _super !== null && _super.apply(this, arguments) || this;
599
+ }
600
+ Payment.prototype.identifierFields = function () {
601
+ return ['id'];
602
+ };
603
+ return Payment;
604
+ }(BaseModel));
605
+ __decorate([
606
+ classTransformer.Expose({ name: 'refuse_reason' }),
607
+ __metadata("design:type", String)
608
+ ], Payment.prototype, "refuseReason", void 0);
609
+ __decorate([
610
+ classTransformer.Expose({ name: 'status_reason' }),
611
+ __metadata("design:type", String)
612
+ ], Payment.prototype, "statusReason", void 0);
613
+ __decorate([
614
+ classTransformer.Expose({ name: 'acquirer_response_code' }),
615
+ __metadata("design:type", String)
616
+ ], Payment.prototype, "acquirerResponseCode", void 0);
617
+ __decorate([
618
+ classTransformer.Expose({ name: 'acquirer_name' }),
619
+ __metadata("design:type", String)
620
+ ], Payment.prototype, "acquirerName", void 0);
621
+ __decorate([
622
+ classTransformer.Expose({ name: 'acquirer_id' }),
623
+ __metadata("design:type", String)
624
+ ], Payment.prototype, "acquirerId", void 0);
625
+ __decorate([
626
+ classTransformer.Expose({ name: 'authorization_code' }),
627
+ __metadata("design:type", String)
628
+ ], Payment.prototype, "authorizationCode", void 0);
629
+ __decorate([
630
+ classTransformer.Expose({ name: 'soft_descriptor' }),
631
+ __metadata("design:type", String)
632
+ ], Payment.prototype, "softDescriptor", void 0);
633
+ __decorate([
634
+ classTransformer.Expose({ name: 'date_created' }),
635
+ __metadata("design:type", String)
636
+ ], Payment.prototype, "dateCreated", void 0);
637
+ __decorate([
638
+ classTransformer.Expose({ name: 'date_updated' }),
639
+ __metadata("design:type", String)
640
+ ], Payment.prototype, "dateUpdated", void 0);
641
+ __decorate([
642
+ classTransformer.Expose({ name: 'authorized_amount' }),
643
+ __metadata("design:type", Number)
644
+ ], Payment.prototype, "authorizedAmount", void 0);
645
+ __decorate([
646
+ classTransformer.Expose({ name: 'paid_amount' }),
647
+ __metadata("design:type", Number)
648
+ ], Payment.prototype, "paidAmount", void 0);
649
+ __decorate([
650
+ classTransformer.Expose({ name: 'refunded_amount' }),
651
+ __metadata("design:type", Number)
652
+ ], Payment.prototype, "refundedAmount", void 0);
653
+ __decorate([
654
+ classTransformer.Expose({ name: 'card_holder_name' }),
655
+ __metadata("design:type", String)
656
+ ], Payment.prototype, "cardHolderName", void 0);
657
+ __decorate([
658
+ classTransformer.Expose({ name: 'card_last_digits' }),
659
+ __metadata("design:type", String)
660
+ ], Payment.prototype, "cardLastDigits", void 0);
661
+ __decorate([
662
+ classTransformer.Expose({ name: 'card_first_digits' }),
663
+ __metadata("design:type", String)
664
+ ], Payment.prototype, "cardFirstDigits", void 0);
665
+ __decorate([
666
+ classTransformer.Expose({ name: 'card_brand' }),
667
+ __metadata("design:type", String)
668
+ ], Payment.prototype, "cardBrand", void 0);
669
+ __decorate([
670
+ classTransformer.Expose({ name: 'card_pin_mode' }),
671
+ __metadata("design:type", String)
672
+ ], Payment.prototype, "cardPinMode", void 0);
673
+ __decorate([
674
+ classTransformer.Expose({ name: 'card_magstripe_fallback' }),
675
+ __metadata("design:type", Boolean)
676
+ ], Payment.prototype, "cardMagstripeFallback", void 0);
677
+ __decorate([
678
+ classTransformer.Expose({ name: 'cvm_pin' }),
679
+ __metadata("design:type", Boolean)
680
+ ], Payment.prototype, "cvmPin", void 0);
681
+ __decorate([
682
+ classTransformer.Expose({ name: 'postback_url' }),
683
+ __metadata("design:type", String)
684
+ ], Payment.prototype, "postbackUrl", void 0);
685
+ __decorate([
686
+ classTransformer.Expose({ name: 'payment_method' }),
687
+ __metadata("design:type", String)
688
+ ], Payment.prototype, "paymentMethod", void 0);
689
+ __decorate([
690
+ classTransformer.Expose({ name: 'capture_method' }),
691
+ __metadata("design:type", String)
692
+ ], Payment.prototype, "captureMethod", void 0);
693
+ __decorate([
694
+ classTransformer.Expose({ name: 'antifraud_score' }),
695
+ __metadata("design:type", String)
696
+ ], Payment.prototype, "antifraudScore", void 0);
697
+ __decorate([
698
+ classTransformer.Expose({ name: 'boleto_url' }),
699
+ __metadata("design:type", String)
700
+ ], Payment.prototype, "boletoUrl", void 0);
701
+ __decorate([
702
+ classTransformer.Expose({ name: 'boleto_barcode' }),
703
+ __metadata("design:type", String)
704
+ ], Payment.prototype, "boletoBarcode", void 0);
705
+ __decorate([
706
+ classTransformer.Expose({ name: 'boleto_expiration_date' }),
707
+ __metadata("design:type", String)
708
+ ], Payment.prototype, "boletoExpirationDate", void 0);
709
+ __decorate([
710
+ classTransformer.Expose({ name: 'subscription_id' }),
711
+ __metadata("design:type", String)
712
+ ], Payment.prototype, "subscriptionId", void 0);
713
+ __decorate([
714
+ classTransformer.Expose({ name: 'split_rules' }),
715
+ __metadata("design:type", String)
716
+ ], Payment.prototype, "splitRules", void 0);
717
+ __decorate([
718
+ classTransformer.Expose({ name: 'antifraud_metadata' }),
719
+ __metadata("design:type", Object)
720
+ ], Payment.prototype, "antifraudMetadata", void 0);
721
+ __decorate([
722
+ classTransformer.Expose({ name: 'reference_key' }),
723
+ __metadata("design:type", String)
724
+ ], Payment.prototype, "referenceKey", void 0);
725
+ __decorate([
726
+ classTransformer.Expose({ name: 'local_transaction_id' }),
727
+ __metadata("design:type", String)
728
+ ], Payment.prototype, "localTransactionId", void 0);
729
+ __decorate([
730
+ classTransformer.Expose({ name: 'local_time' }),
731
+ __metadata("design:type", String)
732
+ ], Payment.prototype, "localTime", void 0);
733
+ __decorate([
734
+ classTransformer.Expose({ name: 'fraud_covered' }),
735
+ __metadata("design:type", Boolean)
736
+ ], Payment.prototype, "fraudCovered", void 0);
737
+ __decorate([
738
+ classTransformer.Expose({ name: 'fraud_reimbursed' }),
739
+ __metadata("design:type", String)
740
+ ], Payment.prototype, "fraudReimbursed", void 0);
741
+ __decorate([
742
+ classTransformer.Expose({ name: 'order_id' }),
743
+ __metadata("design:type", String)
744
+ ], Payment.prototype, "orderId", void 0);
745
+ __decorate([
746
+ classTransformer.Expose({ name: 'risk_level' }),
747
+ __metadata("design:type", String)
748
+ ], Payment.prototype, "riskLevel", void 0);
749
+ __decorate([
750
+ classTransformer.Expose({ name: 'receipt_url' }),
751
+ __metadata("design:type", String)
752
+ ], Payment.prototype, "receiptUrl", void 0);
753
+ __decorate([
754
+ classTransformer.Expose({ name: 'private_label' }),
755
+ __metadata("design:type", String)
756
+ ], Payment.prototype, "privateLabel", void 0);
757
+ __decorate([
758
+ classTransformer.Expose({ name: 'pix_qr_code' }),
759
+ __metadata("design:type", String)
760
+ ], Payment.prototype, "pixQrCode", void 0);
761
+ __decorate([
762
+ classTransformer.Expose({ name: 'pix_expiration_date' }),
763
+ __metadata("design:type", String)
765
764
  ], Payment.prototype, "pixExpirationDate", void 0);
766
765
 
767
- var SubscriptionPayment = /** @class */ (function (_super) {
768
- __extends(SubscriptionPayment, _super);
769
- function SubscriptionPayment() {
770
- return _super !== null && _super.apply(this, arguments) || this;
771
- }
772
- SubscriptionPayment.prototype.identifierFields = function () {
773
- return ['id'];
774
- };
775
- return SubscriptionPayment;
776
- }(BaseModel));
777
- __decorate([
778
- classTransformer.Type(function () { return Payment; }),
779
- __metadata("design:type", Payment)
766
+ var SubscriptionPayment = /** @class */ (function (_super) {
767
+ __extends(SubscriptionPayment, _super);
768
+ function SubscriptionPayment() {
769
+ return _super !== null && _super.apply(this, arguments) || this;
770
+ }
771
+ SubscriptionPayment.prototype.identifierFields = function () {
772
+ return ['id'];
773
+ };
774
+ return SubscriptionPayment;
775
+ }(BaseModel));
776
+ __decorate([
777
+ classTransformer.Type(function () { return Payment; }),
778
+ __metadata("design:type", Payment)
780
779
  ], SubscriptionPayment.prototype, "payment", void 0);
781
780
 
782
- var Address = /** @class */ (function (_super) {
783
- __extends(Address, _super);
784
- function Address() {
785
- return _super !== null && _super.apply(this, arguments) || this;
786
- }
787
- return Address;
781
+ var Address = /** @class */ (function (_super) {
782
+ __extends(Address, _super);
783
+ function Address() {
784
+ return _super !== null && _super.apply(this, arguments) || this;
785
+ }
786
+ return Address;
788
787
  }(BaseModel));
789
788
 
790
- var Base = /** @class */ (function () {
791
- function Base() {
792
- var args = [];
793
- for (var _i = 0; _i < arguments.length; _i++) {
794
- args[_i] = arguments[_i];
795
- }
796
- Object.assign.apply(Object, __spreadArray([this], __read(args)));
797
- }
798
- return Base;
789
+ var Base = /** @class */ (function () {
790
+ function Base() {
791
+ var args = [];
792
+ for (var _i = 0; _i < arguments.length; _i++) {
793
+ args[_i] = arguments[_i];
794
+ }
795
+ Object.assign.apply(Object, __spreadArray([this], __read(args)));
796
+ }
797
+ return Base;
799
798
  }());
800
799
 
801
- var Coupon = /** @class */ (function (_super) {
802
- __extends(Coupon, _super);
803
- function Coupon() {
804
- return _super !== null && _super.apply(this, arguments) || this;
805
- }
806
- Object.defineProperty(Coupon.prototype, "isInfluencer", {
807
- get: function () {
808
- return !lodash.isNil(this.influencerEmail);
809
- },
810
- enumerable: false,
811
- configurable: true
812
- });
813
- Coupon.prototype.identifierFields = function () {
814
- return ['id'];
815
- };
816
- return Coupon;
817
- }(BaseModel));
818
- __decorate([
819
- classTransformer.Expose({ name: 'checkout_type' }),
820
- __metadata("design:type", Number)
821
- ], Coupon.prototype, "checkoutType", void 0);
822
- __decorate([
823
- classTransformer.Expose({ name: 'exclusivity_type' }),
824
- __metadata("design:type", Number)
800
+ var Coupon = /** @class */ (function (_super) {
801
+ __extends(Coupon, _super);
802
+ function Coupon() {
803
+ return _super !== null && _super.apply(this, arguments) || this;
804
+ }
805
+ Object.defineProperty(Coupon.prototype, "isInfluencer", {
806
+ get: function () {
807
+ return !lodash.isNil(this.influencerEmail);
808
+ },
809
+ enumerable: false,
810
+ configurable: true
811
+ });
812
+ Coupon.prototype.identifierFields = function () {
813
+ return ['id'];
814
+ };
815
+ return Coupon;
816
+ }(BaseModel));
817
+ __decorate([
818
+ classTransformer.Expose({ name: 'checkout_type' }),
819
+ __metadata("design:type", Number)
820
+ ], Coupon.prototype, "checkoutType", void 0);
821
+ __decorate([
822
+ classTransformer.Expose({ name: 'exclusivity_type' }),
823
+ __metadata("design:type", Number)
825
824
  ], Coupon.prototype, "exclusivityType", void 0);
826
825
 
827
- var SubscriptionPlan = /** @class */ (function (_super) {
828
- __extends(SubscriptionPlan, _super);
829
- function SubscriptionPlan() {
830
- return _super !== null && _super.apply(this, arguments) || this;
831
- }
832
- SubscriptionPlan.prototype.identifierFields = function () {
833
- return ['id'];
834
- };
835
- return SubscriptionPlan;
826
+ var SubscriptionPlan = /** @class */ (function (_super) {
827
+ __extends(SubscriptionPlan, _super);
828
+ function SubscriptionPlan() {
829
+ return _super !== null && _super.apply(this, arguments) || this;
830
+ }
831
+ SubscriptionPlan.prototype.identifierFields = function () {
832
+ return ['id'];
833
+ };
834
+ return SubscriptionPlan;
836
835
  }(BaseModel));
837
836
 
838
- var BeautyProfile = /** @class */ (function (_super) {
839
- __extends(BeautyProfile, _super);
840
- function BeautyProfile() {
841
- return _super !== null && _super.apply(this, arguments) || this;
842
- }
843
- BeautyProfile.prototype.toPlain = function () {
844
- var plain = _super.prototype.toPlain.call(this);
845
- delete plain.id;
846
- return plain;
847
- };
848
- BeautyProfile.prototype.identifierFields = function () {
849
- return ['id'];
850
- };
851
- return BeautyProfile;
837
+ var BeautyProfile = /** @class */ (function (_super) {
838
+ __extends(BeautyProfile, _super);
839
+ function BeautyProfile() {
840
+ return _super !== null && _super.apply(this, arguments) || this;
841
+ }
842
+ BeautyProfile.prototype.toPlain = function () {
843
+ var plain = _super.prototype.toPlain.call(this);
844
+ delete plain.id;
845
+ return plain;
846
+ };
847
+ BeautyProfile.prototype.identifierFields = function () {
848
+ return ['id'];
849
+ };
850
+ return BeautyProfile;
852
851
  }(BaseModel));
853
852
 
854
- var User = /** @class */ (function (_super) {
855
- __extends(User, _super);
856
- function User() {
857
- return _super !== null && _super.apply(this, arguments) || this;
858
- }
859
- User.toInstance = function (data) {
860
- var instance = _super.toInstance.call(this, data);
861
- if (!lodash.isNil(data.firstName))
862
- instance.displayName = "" + data.firstName + (!lodash.isNil(data.lastName) ? " " + data.lastName : '');
863
- return instance;
864
- };
865
- User.prototype.identifierFields = function () {
866
- return ['id'];
867
- };
868
- User.prototype.toPlain = function () {
869
- var plain = _super.prototype.toPlain.call(this);
870
- delete plain.beautyProfile;
871
- return plain;
872
- };
873
- return User;
874
- }(BaseModel));
875
- __decorate([
876
- classTransformer.Type(function () { return BeautyProfile; }),
877
- __metadata("design:type", BeautyProfile)
853
+ var User = /** @class */ (function (_super) {
854
+ __extends(User, _super);
855
+ function User() {
856
+ return _super !== null && _super.apply(this, arguments) || this;
857
+ }
858
+ User.toInstance = function (data) {
859
+ var instance = _super.toInstance.call(this, data);
860
+ if (!lodash.isNil(data.firstName))
861
+ instance.displayName = "" + data.firstName + (!lodash.isNil(data.lastName) ? " " + data.lastName : '');
862
+ return instance;
863
+ };
864
+ User.prototype.identifierFields = function () {
865
+ return ['id'];
866
+ };
867
+ User.prototype.toPlain = function () {
868
+ var plain = _super.prototype.toPlain.call(this);
869
+ delete plain.beautyProfile;
870
+ return plain;
871
+ };
872
+ return User;
873
+ }(BaseModel));
874
+ __decorate([
875
+ classTransformer.Type(function () { return BeautyProfile; }),
876
+ __metadata("design:type", BeautyProfile)
878
877
  ], User.prototype, "beautyProfile", void 0);
879
878
 
880
- var Subscription = /** @class */ (function (_super) {
881
- __extends(Subscription, _super);
882
- function Subscription() {
883
- return _super !== null && _super.apply(this, arguments) || this;
884
- }
885
- Subscription.prototype.identifierFields = function () {
886
- return ['id'];
887
- };
888
- return Subscription;
889
- }(BaseModel));
890
- __decorate([
891
- classTransformer.Type(function () { return User; }),
892
- __metadata("design:type", User)
893
- ], Subscription.prototype, "user", void 0);
894
- __decorate([
895
- classTransformer.Type(function () { return SubscriptionPlan; }),
896
- __metadata("design:type", SubscriptionPlan)
897
- ], Subscription.prototype, "subscriptionPlan", void 0);
898
- __decorate([
899
- classTransformer.Type(function () { return Address; }),
900
- __metadata("design:type", Address)
901
- ], Subscription.prototype, "shippingAddress", void 0);
902
- __decorate([
903
- classTransformer.Type(function () { return Address; }),
904
- __metadata("design:type", Address)
905
- ], Subscription.prototype, "billingAddress", void 0);
906
- __decorate([
907
- classTransformer.Type(function () { return Coupon; }),
908
- __metadata("design:type", Coupon)
909
- ], Subscription.prototype, "coupon", void 0);
910
- __decorate([
911
- classTransformer.Type(function () { return Edition; }),
912
- __metadata("design:type", Array)
913
- ], Subscription.prototype, "editions", void 0);
914
- __decorate([
915
- classTransformer.Type(function () { return SubscriptionPayment; }),
916
- __metadata("design:type", Array)
879
+ var Subscription = /** @class */ (function (_super) {
880
+ __extends(Subscription, _super);
881
+ function Subscription() {
882
+ return _super !== null && _super.apply(this, arguments) || this;
883
+ }
884
+ Subscription.prototype.identifierFields = function () {
885
+ return ['id'];
886
+ };
887
+ return Subscription;
888
+ }(BaseModel));
889
+ __decorate([
890
+ classTransformer.Type(function () { return User; }),
891
+ __metadata("design:type", User)
892
+ ], Subscription.prototype, "user", void 0);
893
+ __decorate([
894
+ classTransformer.Type(function () { return SubscriptionPlan; }),
895
+ __metadata("design:type", SubscriptionPlan)
896
+ ], Subscription.prototype, "subscriptionPlan", void 0);
897
+ __decorate([
898
+ classTransformer.Type(function () { return Address; }),
899
+ __metadata("design:type", Address)
900
+ ], Subscription.prototype, "shippingAddress", void 0);
901
+ __decorate([
902
+ classTransformer.Type(function () { return Address; }),
903
+ __metadata("design:type", Address)
904
+ ], Subscription.prototype, "billingAddress", void 0);
905
+ __decorate([
906
+ classTransformer.Type(function () { return Coupon; }),
907
+ __metadata("design:type", Coupon)
908
+ ], Subscription.prototype, "coupon", void 0);
909
+ __decorate([
910
+ classTransformer.Type(function () { return Edition; }),
911
+ __metadata("design:type", Array)
912
+ ], Subscription.prototype, "editions", void 0);
913
+ __decorate([
914
+ classTransformer.Type(function () { return SubscriptionPayment; }),
915
+ __metadata("design:type", Array)
917
916
  ], Subscription.prototype, "payment", void 0);
918
917
 
919
- var UserAddress = /** @class */ (function (_super) {
920
- __extends(UserAddress, _super);
921
- function UserAddress() {
922
- return _super !== null && _super.apply(this, arguments) || this;
923
- }
924
- UserAddress.prototype.identifierFields = function () {
925
- return ['id'];
926
- };
927
- return UserAddress;
918
+ var UserAddress = /** @class */ (function (_super) {
919
+ __extends(UserAddress, _super);
920
+ function UserAddress() {
921
+ return _super !== null && _super.apply(this, arguments) || this;
922
+ }
923
+ UserAddress.prototype.identifierFields = function () {
924
+ return ['id'];
925
+ };
926
+ return UserAddress;
928
927
  }(Address));
929
928
 
930
- var UserPaymentMethod = /** @class */ (function (_super) {
931
- __extends(UserPaymentMethod, _super);
932
- function UserPaymentMethod() {
933
- return _super !== null && _super.apply(this, arguments) || this;
934
- }
935
- UserPaymentMethod.prototype.identifierFields = function () {
936
- return ['id'];
937
- };
938
- return UserPaymentMethod;
929
+ var UserPaymentMethod = /** @class */ (function (_super) {
930
+ __extends(UserPaymentMethod, _super);
931
+ function UserPaymentMethod() {
932
+ return _super !== null && _super.apply(this, arguments) || this;
933
+ }
934
+ UserPaymentMethod.prototype.identifierFields = function () {
935
+ return ['id'];
936
+ };
937
+ return UserPaymentMethod;
939
938
  }(BaseModel));
940
939
 
941
- var Lead = /** @class */ (function (_super) {
942
- __extends(Lead, _super);
943
- function Lead() {
944
- return _super !== null && _super.apply(this, arguments) || this;
945
- }
946
- Lead.prototype.identifierFields = function () {
947
- return ['id'];
948
- };
949
- return Lead;
940
+ var Lead = /** @class */ (function (_super) {
941
+ __extends(Lead, _super);
942
+ function Lead() {
943
+ return _super !== null && _super.apply(this, arguments) || this;
944
+ }
945
+ Lead.prototype.identifierFields = function () {
946
+ return ['id'];
947
+ };
948
+ return Lead;
950
949
  }(BaseModel));
951
950
 
952
- var UnauthorizedError = /** @class */ (function (_super) {
953
- __extends(UnauthorizedError, _super);
954
- function UnauthorizedError(message) {
955
- var _this = _super.call(this, message) || this;
956
- _this.message = message;
957
- return _this;
958
- }
959
- return UnauthorizedError;
951
+ var UnauthorizedError = /** @class */ (function (_super) {
952
+ __extends(UnauthorizedError, _super);
953
+ function UnauthorizedError(message) {
954
+ var _this = _super.call(this, message) || this;
955
+ _this.message = message;
956
+ return _this;
957
+ }
958
+ return UnauthorizedError;
960
959
  }(Error));
961
960
 
962
- exports.SignInMethods = void 0;
963
- (function (SignInMethods) {
964
- SignInMethods["EMAIL_PASSWORD"] = "email_password";
965
- SignInMethods["GOOGLE"] = "google";
966
- })(exports.SignInMethods || (exports.SignInMethods = {}));
967
- var Authentication = /** @class */ (function () {
968
- function Authentication(authService, userRepository) {
969
- this.authService = authService;
970
- this.userRepository = userRepository;
971
- }
972
- Authentication.prototype.signIn = function (_b, signInMethod) {
973
- var email = _b.email, password = _b.password;
974
- return __awaiter(this, void 0, void 0, function () {
975
- var method, userAuth, user;
976
- return __generator(this, function (_b) {
977
- switch (_b.label) {
978
- case 0:
979
- method = this.getServiceByMethod(signInMethod);
980
- return [4 /*yield*/, this.authService[method]({ email: email, password: password })];
981
- case 1:
982
- userAuth = _b.sent();
983
- user = this.userRepository.get(userAuth);
984
- if (!lodash.isNil(user))
985
- return [2 /*return*/, user];
986
- if (/^.+@b4a.com.br$/.test(userAuth.email))
987
- return [2 /*return*/, this.createsUserByCredential(userAuth)];
988
- throw new UnauthorizedError('Invalid credentials');
989
- }
990
- });
991
- });
992
- };
993
- Authentication.prototype.getServiceByMethod = function (signInMethod) {
994
- return signInMethod === exports.SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle';
995
- };
996
- Authentication.prototype.createsUserByCredential = function (user) {
997
- var _a;
998
- return __awaiter(this, void 0, void 0, function () {
999
- var _b, firstName, lastName, person;
1000
- return __generator(this, function (_c) {
1001
- _b = __read((_a = user.displayName) === null || _a === void 0 ? void 0 : _a.split(/\s/), 2), firstName = _b[0], lastName = _b[1];
1002
- person = User.toInstance(Object.assign(Object.assign({}, user), { cpf: '', birthday: new Date(), firstName: firstName,
1003
- lastName: lastName, acceptsNewsletter: false, area: exports.Area.Transactional, officePosition: exports.OfficePosition.Intern, type: exports.UserType.Collaborator }));
1004
- return [2 /*return*/, this.userRepository.create(person)];
1005
- });
1006
- });
1007
- };
1008
- return Authentication;
961
+ exports.SignInMethods = void 0;
962
+ (function (SignInMethods) {
963
+ SignInMethods["EMAIL_PASSWORD"] = "email_password";
964
+ SignInMethods["GOOGLE"] = "google";
965
+ })(exports.SignInMethods || (exports.SignInMethods = {}));
966
+ var Authentication = /** @class */ (function () {
967
+ function Authentication(authService, userRepository) {
968
+ this.authService = authService;
969
+ this.userRepository = userRepository;
970
+ }
971
+ Authentication.prototype.signIn = function (_b, signInMethod) {
972
+ var email = _b.email, password = _b.password;
973
+ return __awaiter(this, void 0, void 0, function () {
974
+ var method, userAuth, user;
975
+ return __generator(this, function (_b) {
976
+ switch (_b.label) {
977
+ case 0:
978
+ method = this.getServiceByMethod(signInMethod);
979
+ return [4 /*yield*/, this.authService[method]({ email: email, password: password })];
980
+ case 1:
981
+ userAuth = _b.sent();
982
+ user = this.userRepository.get(userAuth);
983
+ if (!lodash.isNil(user))
984
+ return [2 /*return*/, user];
985
+ if (/^.+@b4a.com.br$/.test(userAuth.email))
986
+ return [2 /*return*/, this.createsUserByCredential(userAuth)];
987
+ throw new UnauthorizedError('Invalid credentials');
988
+ }
989
+ });
990
+ });
991
+ };
992
+ Authentication.prototype.getServiceByMethod = function (signInMethod) {
993
+ return signInMethod === exports.SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle';
994
+ };
995
+ Authentication.prototype.createsUserByCredential = function (user) {
996
+ var _a;
997
+ return __awaiter(this, void 0, void 0, function () {
998
+ var _b, firstName, lastName, person;
999
+ return __generator(this, function (_c) {
1000
+ _b = __read((_a = user.displayName) === null || _a === void 0 ? void 0 : _a.split(/\s/), 2), firstName = _b[0], lastName = _b[1];
1001
+ person = User.toInstance(Object.assign(Object.assign({}, user), { cpf: '', birthday: new Date(), firstName: firstName,
1002
+ lastName: lastName, acceptsNewsletter: false, area: exports.Area.Transactional, officePosition: exports.OfficePosition.Intern, type: exports.UserType.Collaborator }));
1003
+ return [2 /*return*/, this.userRepository.create(person)];
1004
+ });
1005
+ });
1006
+ };
1007
+ return Authentication;
1009
1008
  }());
1010
1009
 
1011
- var UserAlreadyRegisteredError = /** @class */ (function (_super) {
1012
- __extends(UserAlreadyRegisteredError, _super);
1013
- function UserAlreadyRegisteredError(message) {
1014
- var _this = _super.call(this, message) || this;
1015
- _this.message = message;
1016
- return _this;
1017
- }
1018
- return UserAlreadyRegisteredError;
1010
+ var UserAlreadyRegisteredError = /** @class */ (function (_super) {
1011
+ __extends(UserAlreadyRegisteredError, _super);
1012
+ function UserAlreadyRegisteredError(message) {
1013
+ var _this = _super.call(this, message) || this;
1014
+ _this.message = message;
1015
+ return _this;
1016
+ }
1017
+ return UserAlreadyRegisteredError;
1019
1018
  }(Error));
1020
1019
 
1021
- var WeakPasswordError = /** @class */ (function (_super) {
1022
- __extends(WeakPasswordError, _super);
1023
- function WeakPasswordError(message) {
1024
- if (message === void 0) { message = 'Weak password'; }
1025
- var _this = _super.call(this, message) || this;
1026
- _this.message = message;
1027
- return _this;
1028
- }
1029
- return WeakPasswordError;
1020
+ var WeakPasswordError = /** @class */ (function (_super) {
1021
+ __extends(WeakPasswordError, _super);
1022
+ function WeakPasswordError(message) {
1023
+ if (message === void 0) { message = 'Weak password'; }
1024
+ var _this = _super.call(this, message) || this;
1025
+ _this.message = message;
1026
+ return _this;
1027
+ }
1028
+ return WeakPasswordError;
1030
1029
  }(Error));
1031
1030
 
1032
- var Register = /** @class */ (function () {
1033
- function Register(registerService, userRepository) {
1034
- this.registerService = registerService;
1035
- this.userRepository = userRepository;
1036
- }
1037
- Register.prototype.register = function (params) {
1038
- return __awaiter(this, void 0, void 0, function () {
1039
- var email, displayName, auth, user;
1040
- return __generator(this, function (_a) {
1041
- switch (_a.label) {
1042
- case 0:
1043
- email = params.email.toLocaleLowerCase();
1044
- displayName = params.firstName + " " + params.lastName;
1045
- return [4 /*yield*/, this.userRepository.checkIfExistsByField('cpf', params.cpf)];
1046
- case 1:
1047
- if (_a.sent())
1048
- throw new UserAlreadyRegisteredError("Usu\u00E1rio com CPF " + params.cpf + " j\u00E1 registrado.");
1049
- return [4 /*yield*/, this.userRepository.checkIfExistsByField('email', params.email)];
1050
- case 2:
1051
- if (_a.sent())
1052
- throw new UserAlreadyRegisteredError("Usu\u00E1rio com e-mail " + params.email + " j\u00E1 registrado.");
1053
- return [4 /*yield*/, this.registerService.register({
1054
- birthday: params.birthday,
1055
- email: email,
1056
- firstName: params.firstName,
1057
- lastName: params.lastName,
1058
- cpf: params.cpf,
1059
- displayName: displayName,
1060
- phone: params.phone,
1061
- password: params.password,
1062
- })];
1063
- case 3:
1064
- auth = _a.sent();
1065
- delete params.password;
1066
- return [4 /*yield*/, this.userRepository.create(Object.assign(Object.assign({}, params), { id: auth.id, email: email,
1067
- displayName: displayName, type: exports.UserType.B2C, dateCreated: new Date(), dateModified: new Date() }))];
1068
- case 4:
1069
- user = _a.sent();
1070
- return [2 /*return*/, user];
1071
- }
1072
- });
1073
- });
1074
- };
1075
- return Register;
1076
- }());
1077
-
1078
- var SignOut = /** @class */ (function () {
1079
- function SignOut(authService) {
1080
- this.authService = authService;
1081
- }
1082
- SignOut.prototype.signOut = function () {
1083
- return __awaiter(this, void 0, void 0, function () {
1084
- return __generator(this, function (_a) {
1085
- switch (_a.label) {
1086
- case 0: return [4 /*yield*/, this.authService.signOut()];
1087
- case 1:
1088
- _a.sent();
1089
- return [2 /*return*/];
1090
- }
1091
- });
1092
- });
1093
- };
1094
- return SignOut;
1031
+ var Register = /** @class */ (function () {
1032
+ function Register(registerService, userRepository) {
1033
+ this.registerService = registerService;
1034
+ this.userRepository = userRepository;
1035
+ }
1036
+ Register.prototype.register = function (params) {
1037
+ return __awaiter(this, void 0, void 0, function () {
1038
+ var email, displayName, auth, user;
1039
+ return __generator(this, function (_a) {
1040
+ switch (_a.label) {
1041
+ case 0:
1042
+ email = params.email.toLocaleLowerCase();
1043
+ displayName = params.firstName + " " + params.lastName;
1044
+ return [4 /*yield*/, this.userRepository.checkIfExistsByField('cpf', params.cpf)];
1045
+ case 1:
1046
+ if (_a.sent())
1047
+ throw new UserAlreadyRegisteredError("User with CPF " + params.cpf + " already registered");
1048
+ return [4 /*yield*/, this.userRepository.checkIfExistsByField('email', params.email)];
1049
+ case 2:
1050
+ if (_a.sent())
1051
+ throw new UserAlreadyRegisteredError("User with E-mail " + params.email + " already registered");
1052
+ return [4 /*yield*/, this.registerService.register({
1053
+ birthday: params.birthday,
1054
+ email: email,
1055
+ firstName: params.firstName,
1056
+ lastName: params.lastName,
1057
+ cpf: params.cpf,
1058
+ displayName: displayName,
1059
+ phone: params.phone,
1060
+ password: params.password,
1061
+ })];
1062
+ case 3:
1063
+ auth = _a.sent();
1064
+ delete params.password;
1065
+ return [4 /*yield*/, this.userRepository.create(Object.assign(Object.assign({}, params), { id: auth.id, email: email,
1066
+ displayName: displayName, type: exports.UserType.B2C, dateCreated: new Date(), dateModified: new Date() }))];
1067
+ case 4:
1068
+ user = _a.sent();
1069
+ return [2 /*return*/, user];
1070
+ }
1071
+ });
1072
+ });
1073
+ };
1074
+ return Register;
1095
1075
  }());
1096
1076
 
1097
- var RecoveryPassword = /** @class */ (function () {
1098
- function RecoveryPassword(authService) {
1099
- this.authService = authService;
1100
- }
1101
- RecoveryPassword.prototype.sendEmail = function (email) {
1102
- return __awaiter(this, void 0, void 0, function () {
1103
- return __generator(this, function (_a) {
1104
- switch (_a.label) {
1105
- case 0: return [4 /*yield*/, this.authService.sendPasswordResetEmail(email)];
1106
- case 1:
1107
- _a.sent();
1108
- return [2 /*return*/];
1109
- }
1110
- });
1111
- });
1112
- };
1113
- return RecoveryPassword;
1077
+ var SignOut = /** @class */ (function () {
1078
+ function SignOut(authService) {
1079
+ this.authService = authService;
1080
+ }
1081
+ SignOut.prototype.signOut = function () {
1082
+ return __awaiter(this, void 0, void 0, function () {
1083
+ return __generator(this, function (_a) {
1084
+ switch (_a.label) {
1085
+ case 0: return [4 /*yield*/, this.authService.signOut()];
1086
+ case 1:
1087
+ _a.sent();
1088
+ return [2 /*return*/];
1089
+ }
1090
+ });
1091
+ });
1092
+ };
1093
+ return SignOut;
1114
1094
  }());
1115
1095
 
1116
- exports.Shops = void 0;
1117
- (function (Shops) {
1118
- Shops["MENSMARKET"] = "mensmarket";
1119
- Shops["GLAMSHOP"] = "Glamshop";
1120
- Shops["GLAMPOINTS"] = "Glampoints";
1096
+ exports.Shops = void 0;
1097
+ (function (Shops) {
1098
+ Shops["MENSMARKET"] = "mensmarket";
1099
+ Shops["GLAMSHOP"] = "Glamshop";
1121
1100
  })(exports.Shops || (exports.Shops = {}));
1122
1101
 
1123
- var Category = /** @class */ (function (_super) {
1124
- __extends(Category, _super);
1125
- function Category() {
1126
- return _super !== null && _super.apply(this, arguments) || this;
1127
- }
1128
- Category.prototype.identifierFields = function () {
1129
- return ['id'];
1130
- };
1131
- return Category;
1102
+ var Category = /** @class */ (function (_super) {
1103
+ __extends(Category, _super);
1104
+ function Category() {
1105
+ return _super !== null && _super.apply(this, arguments) || this;
1106
+ }
1107
+ Category.prototype.identifierFields = function () {
1108
+ return ['id'];
1109
+ };
1110
+ return Category;
1132
1111
  }(BaseModel));
1133
1112
 
1134
- var Product = /** @class */ (function (_super) {
1135
- __extends(Product, _super);
1136
- function Product() {
1137
- return _super !== null && _super.apply(this, arguments) || this;
1138
- }
1139
- Product.prototype.identifierFields = function () {
1140
- return ['id'];
1141
- };
1142
- Product.prototype.getInfoByShop = function (shop) {
1143
- var _a, _b, _c, _d, _e, _f;
1144
- return Object.assign(Object.assign(Object.assign({}, (((_b = (_a = this.description) === null || _a === void 0 ? void 0 : _a[shop]) === null || _b === void 0 ? void 0 : _b.description) ? { description: (_d = (_c = this.description) === null || _c === void 0 ? void 0 : _c[shop]) === null || _d === void 0 ? void 0 : _d.description } : {})), (((_e = this.price) === null || _e === void 0 ? void 0 : _e[shop]) || {})), (((_f = this.stock) === null || _f === void 0 ? void 0 : _f[shop]) || {}));
1145
- };
1146
- return Product;
1113
+ var Product = /** @class */ (function (_super) {
1114
+ __extends(Product, _super);
1115
+ function Product() {
1116
+ return _super !== null && _super.apply(this, arguments) || this;
1117
+ }
1118
+ Product.prototype.identifierFields = function () {
1119
+ return ['id'];
1120
+ };
1121
+ Product.prototype.getInfoByShop = function (shop) {
1122
+ var _a, _b, _c, _d, _e, _f;
1123
+ return Object.assign(Object.assign(Object.assign({}, (((_b = (_a = this.description) === null || _a === void 0 ? void 0 : _a[shop]) === null || _b === void 0 ? void 0 : _b.description) ? { description: (_d = (_c = this.description) === null || _c === void 0 ? void 0 : _c[shop]) === null || _d === void 0 ? void 0 : _d.description } : {})), (((_e = this.price) === null || _e === void 0 ? void 0 : _e[shop]) || {})), (((_f = this.stock) === null || _f === void 0 ? void 0 : _f[shop]) || {}));
1124
+ };
1125
+ return Product;
1147
1126
  }(BaseModel));
1148
1127
 
1149
- var Variant = /** @class */ (function (_super) {
1150
- __extends(Variant, _super);
1151
- function Variant() {
1152
- return _super !== null && _super.apply(this, arguments) || this;
1153
- }
1154
- Variant.prototype.identifierFields = function () {
1155
- return ['id'];
1156
- };
1157
- return Variant;
1128
+ var Variant = /** @class */ (function (_super) {
1129
+ __extends(Variant, _super);
1130
+ function Variant() {
1131
+ return _super !== null && _super.apply(this, arguments) || this;
1132
+ }
1133
+ Variant.prototype.identifierFields = function () {
1134
+ return ['id'];
1135
+ };
1136
+ return Variant;
1158
1137
  }(BaseModel));
1159
1138
 
1160
- exports.CouponTypes = void 0;
1161
- (function (CouponTypes) {
1162
- CouponTypes[CouponTypes["FINANCIAL"] = 1] = "FINANCIAL";
1163
- CouponTypes[CouponTypes["PRODUCT"] = 2] = "PRODUCT";
1164
- CouponTypes[CouponTypes["GIFTCARD"] = 3] = "GIFTCARD";
1165
- CouponTypes[CouponTypes["VOUCHER"] = 4] = "VOUCHER";
1166
- })(exports.CouponTypes || (exports.CouponTypes = {}));
1167
-
1168
- exports.CouponSubtypes = void 0;
1169
- (function (CouponSubtypes) {
1170
- CouponSubtypes[CouponSubtypes["ABSOLUTE"] = 1] = "ABSOLUTE";
1171
- CouponSubtypes[CouponSubtypes["PERCENTAGE"] = 2] = "PERCENTAGE";
1172
- })(exports.CouponSubtypes || (exports.CouponSubtypes = {}));
1173
-
1174
- exports.Exclusivities = void 0;
1175
- (function (Exclusivities) {
1176
- Exclusivities[Exclusivities["ALL_USERS"] = 1] = "ALL_USERS";
1177
- Exclusivities[Exclusivities["SPECIFIC_USER"] = 2] = "SPECIFIC_USER";
1178
- Exclusivities[Exclusivities["COLLABORATORS"] = 3] = "COLLABORATORS";
1139
+ exports.DiscountType = void 0;
1140
+ (function (DiscountType) {
1141
+ DiscountType[DiscountType["ABSOLUTE"] = 1] = "ABSOLUTE";
1142
+ DiscountType[DiscountType["PERCENTAGE"] = 2] = "PERCENTAGE";
1143
+ DiscountType[DiscountType["FREE_SHIPPING"] = 3] = "FREE_SHIPPING";
1144
+ })(exports.DiscountType || (exports.DiscountType = {}));
1145
+
1146
+ exports.Exclusivities = void 0;
1147
+ (function (Exclusivities) {
1148
+ Exclusivities[Exclusivities["ALL_USERS"] = 1] = "ALL_USERS";
1149
+ Exclusivities[Exclusivities["SPECIFIC_USER"] = 2] = "SPECIFIC_USER";
1150
+ Exclusivities[Exclusivities["COLLABORATORS"] = 3] = "COLLABORATORS";
1179
1151
  })(exports.Exclusivities || (exports.Exclusivities = {}));
1180
1152
 
1181
- exports.CheckoutTypes = void 0;
1182
- (function (CheckoutTypes) {
1183
- CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
1184
- CheckoutTypes[CheckoutTypes["SUBSCRIPTION"] = 2] = "SUBSCRIPTION";
1153
+ exports.CheckoutTypes = void 0;
1154
+ (function (CheckoutTypes) {
1155
+ CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
1156
+ CheckoutTypes[CheckoutTypes["SUBSCRIPTION"] = 2] = "SUBSCRIPTION";
1185
1157
  })(exports.CheckoutTypes || (exports.CheckoutTypes = {}));
1186
1158
 
1187
- var COUPON_EXPIRATION = 60 * 60 * 24 * 30;
1188
- var FinancialCoupon = /** @class */ (function (_super) {
1189
- __extends(FinancialCoupon, _super);
1190
- function FinancialCoupon() {
1191
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1192
- _this.type = exports.CouponTypes.FINANCIAL;
1193
- return _this;
1194
- }
1195
- FinancialCoupon.isFinancialCoupon = function (coupon) {
1196
- return coupon.type === exports.CouponTypes.FINANCIAL && !!coupon.subtype;
1197
- };
1198
- FinancialCoupon.createCoupon = function (userId) {
1199
- return this.toInstance({
1200
- name: tsMd5.Md5.hashStr(userId + "_" + Date.now).toString(),
1201
- nickname: "" + Date.now(),
1202
- type: exports.CouponTypes.FINANCIAL,
1203
- subtype: exports.CouponSubtypes.PERCENTAGE,
1204
- checkoutType: exports.CheckoutTypes.ECOMMERCE,
1205
- discount: 30,
1206
- user: userId,
1207
- createdAt: new Date(Date.now()),
1208
- expiresIn: new Date(Date.now() + COUPON_EXPIRATION),
1209
- });
1210
- };
1211
- return FinancialCoupon;
1159
+ var ClubCoupon = /** @class */ (function (_super) {
1160
+ __extends(ClubCoupon, _super);
1161
+ function ClubCoupon() {
1162
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1163
+ _this.checkoutType = exports.CheckoutTypes.SUBSCRIPTION;
1164
+ return _this;
1165
+ }
1166
+ ClubCoupon.isClubCoupon = function (coupon) {
1167
+ return coupon instanceof ClubCoupon;
1168
+ };
1169
+ return ClubCoupon;
1212
1170
  }(Coupon));
1213
-
1214
- exports.OrderStatus = void 0;
1215
- (function (OrderStatus) {
1216
- OrderStatus["AGUARDANDO_PAGAMENTO"] = "Aguardando pagamento";
1217
- OrderStatus["EM_PREPARO"] = "Preparando pedido";
1218
- OrderStatus["NF_EMITIDA"] = "Nota Fiscal Emitida";
1219
- OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transaportadora";
1220
- OrderStatus["ENVIADO"] = "Pedido Enviado";
1221
- OrderStatus["ENTREGUE"] = "Pedido entregue";
1222
- OrderStatus["CANCELADO"] = "Cancelado";
1223
- OrderStatus["CREDIT_CARD"] = "credit_card";
1171
+ __decorate([
1172
+ classTransformer.Expose({ name: 'checkout_type' }),
1173
+ __metadata("design:type", Object)
1174
+ ], ClubCoupon.prototype, "checkoutType", void 0);
1175
+ __decorate([
1176
+ classTransformer.Type(function () { return Category; }),
1177
+ __metadata("design:type", Array)
1178
+ ], ClubCoupon.prototype, "categories", void 0);
1179
+
1180
+ var StoreCoupon = /** @class */ (function (_super) {
1181
+ __extends(StoreCoupon, _super);
1182
+ function StoreCoupon() {
1183
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1184
+ _this.checkoutType = exports.CheckoutTypes.ECOMMERCE;
1185
+ return _this;
1186
+ }
1187
+ StoreCoupon.isStoreCoupon = function (coupon) {
1188
+ return coupon instanceof StoreCoupon;
1189
+ };
1190
+ return StoreCoupon;
1191
+ }(Coupon));
1192
+ __decorate([
1193
+ classTransformer.Expose({ name: 'checkout_type' }),
1194
+ __metadata("design:type", Object)
1195
+ ], StoreCoupon.prototype, "checkoutType", void 0);
1196
+ __decorate([
1197
+ classTransformer.Type(function () { return Category; }),
1198
+ __metadata("design:type", Array)
1199
+ ], StoreCoupon.prototype, "categories", void 0);
1200
+
1201
+ exports.OrderStatus = void 0;
1202
+ (function (OrderStatus) {
1203
+ OrderStatus["AGUARDANDO_PAGAMENTO"] = "Aguardando pagamento";
1204
+ OrderStatus["EM_PREPARO"] = "Preparando pedido";
1205
+ OrderStatus["NF_EMITIDA"] = "Nota Fiscal Emitida";
1206
+ OrderStatus["AGUARDANDO_ENVIO"] = "Aguardando Transaportadora";
1207
+ OrderStatus["ENVIADO"] = "Pedido Enviado";
1208
+ OrderStatus["ENTREGUE"] = "Pedido entregue";
1209
+ OrderStatus["CANCELADO"] = "Cancelado";
1210
+ OrderStatus["CREDIT_CARD"] = "credit_card";
1224
1211
  })(exports.OrderStatus || (exports.OrderStatus = {}));
1225
1212
 
1226
- var LineItem = /** @class */ (function (_super) {
1227
- __extends(LineItem, _super);
1228
- function LineItem() {
1229
- return _super !== null && _super.apply(this, arguments) || this;
1230
- }
1231
- return LineItem;
1213
+ var LineItem = /** @class */ (function (_super) {
1214
+ __extends(LineItem, _super);
1215
+ function LineItem() {
1216
+ return _super !== null && _super.apply(this, arguments) || this;
1217
+ }
1218
+ return LineItem;
1232
1219
  }(Product));
1233
1220
 
1234
- var ShippingMethod = /** @class */ (function (_super) {
1235
- __extends(ShippingMethod, _super);
1236
- function ShippingMethod() {
1237
- return _super !== null && _super.apply(this, arguments) || this;
1238
- }
1239
- ShippingMethod.prototype.identifierFields = function () {
1240
- return ['id'];
1241
- };
1242
- return ShippingMethod;
1221
+ var ShippingMethod = /** @class */ (function (_super) {
1222
+ __extends(ShippingMethod, _super);
1223
+ function ShippingMethod() {
1224
+ return _super !== null && _super.apply(this, arguments) || this;
1225
+ }
1226
+ ShippingMethod.prototype.identifierFields = function () {
1227
+ return ['id'];
1228
+ };
1229
+ return ShippingMethod;
1243
1230
  }(BaseModel));
1244
1231
 
1245
- var Checkout = /** @class */ (function (_super) {
1246
- __extends(Checkout, _super);
1247
- function Checkout() {
1248
- return _super !== null && _super.apply(this, arguments) || this;
1249
- }
1250
- Checkout.prototype.identifierFields = function () {
1251
- return ['id'];
1252
- };
1253
- return Checkout;
1254
- }(BaseModel));
1255
- __decorate([
1256
- classTransformer.Type(function () { return LineItem; }),
1257
- __metadata("design:type", Array)
1258
- ], Checkout.prototype, "lineItems", void 0);
1259
- __decorate([
1260
- classTransformer.Type(function () { return User; }),
1261
- __metadata("design:type", User)
1262
- ], Checkout.prototype, "user", void 0);
1263
- __decorate([
1264
- classTransformer.Type(function () { return Address; }),
1265
- __metadata("design:type", Address)
1266
- ], Checkout.prototype, "shippingAddress", void 0);
1267
- __decorate([
1268
- classTransformer.Type(function () { return Address; }),
1269
- __metadata("design:type", Address)
1270
- ], Checkout.prototype, "billingAddress", void 0);
1271
- __decorate([
1272
- classTransformer.Type(function () { return ShippingMethod; }),
1273
- __metadata("design:type", ShippingMethod)
1274
- ], Checkout.prototype, "shipping", void 0);
1275
- __decorate([
1276
- classTransformer.Type(function () { return Coupon; }),
1277
- __metadata("design:type", Coupon)
1232
+ var Checkout = /** @class */ (function (_super) {
1233
+ __extends(Checkout, _super);
1234
+ function Checkout() {
1235
+ return _super !== null && _super.apply(this, arguments) || this;
1236
+ }
1237
+ Checkout.prototype.identifierFields = function () {
1238
+ return ['id'];
1239
+ };
1240
+ return Checkout;
1241
+ }(BaseModel));
1242
+ __decorate([
1243
+ classTransformer.Type(function () { return LineItem; }),
1244
+ __metadata("design:type", Array)
1245
+ ], Checkout.prototype, "lineItems", void 0);
1246
+ __decorate([
1247
+ classTransformer.Type(function () { return User; }),
1248
+ __metadata("design:type", User)
1249
+ ], Checkout.prototype, "user", void 0);
1250
+ __decorate([
1251
+ classTransformer.Type(function () { return Address; }),
1252
+ __metadata("design:type", Address)
1253
+ ], Checkout.prototype, "shippingAddress", void 0);
1254
+ __decorate([
1255
+ classTransformer.Type(function () { return Address; }),
1256
+ __metadata("design:type", Address)
1257
+ ], Checkout.prototype, "billingAddress", void 0);
1258
+ __decorate([
1259
+ classTransformer.Type(function () { return ShippingMethod; }),
1260
+ __metadata("design:type", ShippingMethod)
1261
+ ], Checkout.prototype, "shipping", void 0);
1262
+ __decorate([
1263
+ classTransformer.Type(function () { return Coupon; }),
1264
+ __metadata("design:type", Coupon)
1278
1265
  ], Checkout.prototype, "coupon", void 0);
1279
1266
 
1280
- var Order = /** @class */ (function (_super) {
1281
- __extends(Order, _super);
1282
- function Order() {
1283
- return _super !== null && _super.apply(this, arguments) || this;
1284
- }
1285
- return Order;
1286
- }(Checkout));
1287
- __decorate([
1288
- classTransformer.Type(function () { return Payment; }),
1289
- __metadata("design:type", Payment)
1267
+ var Order = /** @class */ (function (_super) {
1268
+ __extends(Order, _super);
1269
+ function Order() {
1270
+ return _super !== null && _super.apply(this, arguments) || this;
1271
+ }
1272
+ return Order;
1273
+ }(Checkout));
1274
+ __decorate([
1275
+ classTransformer.Type(function () { return Payment; }),
1276
+ __metadata("design:type", Payment)
1290
1277
  ], Order.prototype, "payment", void 0);
1291
1278
 
1292
- var CheckoutSubscription = /** @class */ (function (_super) {
1293
- __extends(CheckoutSubscription, _super);
1294
- function CheckoutSubscription() {
1295
- return _super !== null && _super.apply(this, arguments) || this;
1296
- }
1297
- CheckoutSubscription.prototype.identifierFields = function () {
1298
- return ['id'];
1299
- };
1300
- return CheckoutSubscription;
1301
- }(BaseModel));
1302
- __decorate([
1303
- classTransformer.Type(function () { return Address; }),
1304
- __metadata("design:type", Address)
1305
- ], CheckoutSubscription.prototype, "shippingAddress", void 0);
1306
- __decorate([
1307
- classTransformer.Type(function () { return Address; }),
1308
- __metadata("design:type", Address)
1309
- ], CheckoutSubscription.prototype, "billingAddress", void 0);
1310
- __decorate([
1311
- classTransformer.Type(function () { return SubscriptionPlan; }),
1312
- __metadata("design:type", SubscriptionPlan)
1313
- ], CheckoutSubscription.prototype, "subscriptionPlan", void 0);
1314
- __decorate([
1315
- classTransformer.Type(function () { return Coupon; }),
1316
- __metadata("design:type", Coupon)
1279
+ var CheckoutSubscription = /** @class */ (function (_super) {
1280
+ __extends(CheckoutSubscription, _super);
1281
+ function CheckoutSubscription() {
1282
+ return _super !== null && _super.apply(this, arguments) || this;
1283
+ }
1284
+ CheckoutSubscription.prototype.identifierFields = function () {
1285
+ return ['id'];
1286
+ };
1287
+ return CheckoutSubscription;
1288
+ }(BaseModel));
1289
+ __decorate([
1290
+ classTransformer.Type(function () { return Address; }),
1291
+ __metadata("design:type", Address)
1292
+ ], CheckoutSubscription.prototype, "shippingAddress", void 0);
1293
+ __decorate([
1294
+ classTransformer.Type(function () { return Address; }),
1295
+ __metadata("design:type", Address)
1296
+ ], CheckoutSubscription.prototype, "billingAddress", void 0);
1297
+ __decorate([
1298
+ classTransformer.Type(function () { return SubscriptionPlan; }),
1299
+ __metadata("design:type", SubscriptionPlan)
1300
+ ], CheckoutSubscription.prototype, "subscriptionPlan", void 0);
1301
+ __decorate([
1302
+ classTransformer.Type(function () { return Coupon; }),
1303
+ __metadata("design:type", Coupon)
1317
1304
  ], CheckoutSubscription.prototype, "coupon", void 0);
1318
1305
 
1319
- var Buy2Win = /** @class */ (function (_super) {
1320
- __extends(Buy2Win, _super);
1321
- function Buy2Win() {
1322
- return _super !== null && _super.apply(this, arguments) || this;
1323
- }
1324
- Buy2Win.prototype.identifierFields = function () {
1325
- return ['id'];
1326
- };
1327
- return Buy2Win;
1328
- }(BaseModel));
1329
- __decorate([
1330
- classTransformer.Type(function () { return Category; }),
1331
- __metadata("design:type", Array)
1306
+ var Buy2Win = /** @class */ (function (_super) {
1307
+ __extends(Buy2Win, _super);
1308
+ function Buy2Win() {
1309
+ return _super !== null && _super.apply(this, arguments) || this;
1310
+ }
1311
+ Buy2Win.prototype.identifierFields = function () {
1312
+ return ['id'];
1313
+ };
1314
+ return Buy2Win;
1315
+ }(BaseModel));
1316
+ __decorate([
1317
+ classTransformer.Type(function () { return Category; }),
1318
+ __metadata("design:type", Array)
1332
1319
  ], Buy2Win.prototype, "categories", void 0);
1333
1320
 
1334
- exports.FilterType = void 0;
1335
- (function (FilterType) {
1336
- FilterType["ACCESSORY_IMPORTANCE"] = "accessoryImportance";
1337
- FilterType["BEARD_PROBLEMS"] = "beardProblems";
1338
- FilterType["BEARD_SIZE"] = "beardSize";
1339
- FilterType["BEAUTY_PRODUCT_IMPORTANCE"] = "beautyProductImportance";
1340
- FilterType["BODY_PROBLEMS"] = "bodyProblems";
1341
- FilterType["BODY_SHAPE"] = "bodyShape";
1342
- FilterType["BODY_TATTOOS"] = "bodyTattoos";
1343
- FilterType["FACE_SKIN_OILINESS"] = "faceSkinOiliness";
1344
- FilterType["FACE_SKIN_PROBLEMS"] = "faceSkinProblems";
1345
- FilterType["FACE_SKIN_TONE"] = "faceSkinTone";
1346
- FilterType["FAMILY_INCOME"] = "familyIncome";
1347
- FilterType["FRAGRANCE_IMPORTANCE"] = "fragranceImportance";
1348
- FilterType["HAIR_COLOR"] = "hairColor";
1349
- FilterType["HAIR_PROBLEMS"] = "hairProblems";
1350
- FilterType["HAIR_STRANDS"] = "hairStrands";
1351
- FilterType["HAIR_TYPE"] = "hairType";
1352
- FilterType["PRODUCT_SPENT"] = "productSpent";
1321
+ exports.FilterType = void 0;
1322
+ (function (FilterType) {
1323
+ FilterType["ACCESSORY_IMPORTANCE"] = "accessoryImportance";
1324
+ FilterType["BEARD_PROBLEMS"] = "beardProblems";
1325
+ FilterType["BEARD_SIZE"] = "beardSize";
1326
+ FilterType["BEAUTY_PRODUCT_IMPORTANCE"] = "beautyProductImportance";
1327
+ FilterType["BODY_PROBLEMS"] = "bodyProblems";
1328
+ FilterType["BODY_SHAPE"] = "bodyShape";
1329
+ FilterType["BODY_TATTOOS"] = "bodyTattoos";
1330
+ FilterType["FACE_SKIN_OILINESS"] = "faceSkinOiliness";
1331
+ FilterType["FACE_SKIN_PROBLEMS"] = "faceSkinProblems";
1332
+ FilterType["FACE_SKIN_TONE"] = "faceSkinTone";
1333
+ FilterType["FAMILY_INCOME"] = "familyIncome";
1334
+ FilterType["FRAGRANCE_IMPORTANCE"] = "fragranceImportance";
1335
+ FilterType["HAIR_COLOR"] = "hairColor";
1336
+ FilterType["HAIR_PROBLEMS"] = "hairProblems";
1337
+ FilterType["HAIR_STRANDS"] = "hairStrands";
1338
+ FilterType["HAIR_TYPE"] = "hairType";
1339
+ FilterType["PRODUCT_SPENT"] = "productSpent";
1353
1340
  })(exports.FilterType || (exports.FilterType = {}));
1354
1341
 
1355
- exports.QuestionsFilters = void 0;
1356
- (function (QuestionsFilters) {
1357
- QuestionsFilters["ACCESSORY_IMPORTANCE"] = "Voc\u00EA gosta de usar acess\u00F3rios masculinos?";
1358
- QuestionsFilters["BEARD_PROBLEMS"] = "Quais problemas de barba voc\u00EA tem?";
1359
- QuestionsFilters["BEARD_SIZE"] = "Quais caracteristicas se aplicam \u00E0 sua BARBA/BIGODE?";
1360
- QuestionsFilters["BEAUTY_PRODUCT_IMPORTANCE"] = "O que descreve melhor a sua rela\u00E7\u00E3o com produtos de beleza e cuidados pessoais?";
1361
- QuestionsFilters["BODY_PROBLEMS"] = "Qual ou quais preocupa\u00E7\u00F5es voc\u00EA tem com a pele do seu corpo?";
1362
- QuestionsFilters["BODY_SHAPE"] = "Qual e seu tipo de CORPO?";
1363
- QuestionsFilters["BODY_TATTOOS"] = "Voc\u00EA tem alguma tatuagem?";
1364
- QuestionsFilters["FACE_SKIN_OILINESS"] = "Quais caracteristicas se aplicam \u00E0 pele do seu ROSTO?";
1365
- QuestionsFilters["FACE_SKIN_PROBLEMS"] = "Quais problemas a pele do seu rosto tem?";
1366
- QuestionsFilters["FACE_SKIN_TONE"] = "Qual seu tom de pele?";
1367
- QuestionsFilters["FAMILY_INCOME"] = "Qual a sua renda familiar mensal (considerando a renda de todas as pessoas que moram com voc\u00EA)?";
1368
- QuestionsFilters["FRAGRANCE_IMPORTANCE"] = "O quanto voc\u00EA gosta de experimentar perfumes?";
1369
- QuestionsFilters["HAIR_COLOR"] = "Seu cabelo \u00E9 naturalmente de qual COR?";
1370
- QuestionsFilters["HAIR_PROBLEMS"] = "Qual ou quais problemas/caracter\u00EDstica de cabelo te preocupam?";
1371
- QuestionsFilters["HAIR_STRANDS"] = "Como s\u00E3o seus fios?";
1372
- QuestionsFilters["HAIR_TYPE"] = "Como \u00E9 o seu cabelo?";
1373
- QuestionsFilters["PRODUCT_SPENT"] = "Qual \u00E9 o seu nivel de gasto mensal em produtos de beleza e cuidados pessoais?";
1342
+ exports.QuestionsFilters = void 0;
1343
+ (function (QuestionsFilters) {
1344
+ QuestionsFilters["ACCESSORY_IMPORTANCE"] = "Voc\u00EA gosta de usar acess\u00F3rios masculinos?";
1345
+ QuestionsFilters["BEARD_PROBLEMS"] = "Quais problemas de barba voc\u00EA tem?";
1346
+ QuestionsFilters["BEARD_SIZE"] = "Quais caracteristicas se aplicam \u00E0 sua BARBA/BIGODE?";
1347
+ QuestionsFilters["BEAUTY_PRODUCT_IMPORTANCE"] = "O que descreve melhor a sua rela\u00E7\u00E3o com produtos de beleza e cuidados pessoais?";
1348
+ QuestionsFilters["BODY_PROBLEMS"] = "Qual ou quais preocupa\u00E7\u00F5es voc\u00EA tem com a pele do seu corpo?";
1349
+ QuestionsFilters["BODY_SHAPE"] = "Qual e seu tipo de CORPO?";
1350
+ QuestionsFilters["BODY_TATTOOS"] = "Voc\u00EA tem alguma tatuagem?";
1351
+ QuestionsFilters["FACE_SKIN_OILINESS"] = "Quais caracteristicas se aplicam \u00E0 pele do seu ROSTO?";
1352
+ QuestionsFilters["FACE_SKIN_PROBLEMS"] = "Quais problemas a pele do seu rosto tem?";
1353
+ QuestionsFilters["FACE_SKIN_TONE"] = "Qual seu tom de pele?";
1354
+ QuestionsFilters["FAMILY_INCOME"] = "Qual a sua renda familiar mensal (considerando a renda de todas as pessoas que moram com voc\u00EA)?";
1355
+ QuestionsFilters["FRAGRANCE_IMPORTANCE"] = "O quanto voc\u00EA gosta de experimentar perfumes?";
1356
+ QuestionsFilters["HAIR_COLOR"] = "Seu cabelo \u00E9 naturalmente de qual COR?";
1357
+ QuestionsFilters["HAIR_PROBLEMS"] = "Qual ou quais problemas/caracter\u00EDstica de cabelo te preocupam?";
1358
+ QuestionsFilters["HAIR_STRANDS"] = "Como s\u00E3o seus fios?";
1359
+ QuestionsFilters["HAIR_TYPE"] = "Como \u00E9 o seu cabelo?";
1360
+ QuestionsFilters["PRODUCT_SPENT"] = "Qual \u00E9 o seu nivel de gasto mensal em produtos de beleza e cuidados pessoais?";
1374
1361
  })(exports.QuestionsFilters || (exports.QuestionsFilters = {}));
1375
1362
 
1376
- var BeautyQuestionsHelper = /** @class */ (function () {
1377
- function BeautyQuestionsHelper() {
1378
- }
1379
- BeautyQuestionsHelper.getAnswers = function (filter) {
1380
- switch (filter) {
1381
- case exports.FilterType.ACCESSORY_IMPORTANCE:
1382
- return exports.AccessoryImportances;
1383
- case exports.FilterType.BEARD_PROBLEMS:
1384
- return exports.BeardProblems;
1385
- case exports.FilterType.BEARD_SIZE:
1386
- return exports.BeardSizes;
1387
- case exports.FilterType.BEAUTY_PRODUCT_IMPORTANCE:
1388
- return exports.BeautyProductImportances;
1389
- case exports.FilterType.BODY_PROBLEMS:
1390
- return exports.BodyProblems;
1391
- case exports.FilterType.BODY_SHAPE:
1392
- return exports.BodyShapes;
1393
- case exports.FilterType.BODY_TATTOOS:
1394
- return exports.BodyTattoos;
1395
- case exports.FilterType.FACE_SKIN_OILINESS:
1396
- return exports.FaceSkinOilinesses;
1397
- case exports.FilterType.FACE_SKIN_PROBLEMS:
1398
- return exports.FaceSkinProblems;
1399
- case exports.FilterType.FACE_SKIN_TONE:
1400
- return exports.FaceSkinTones;
1401
- case exports.FilterType.FAMILY_INCOME:
1402
- return exports.FamilyIncomes;
1403
- case exports.FilterType.FRAGRANCE_IMPORTANCE:
1404
- return exports.FragranceImportances;
1405
- case exports.FilterType.HAIR_COLOR:
1406
- return exports.HairColors;
1407
- case exports.FilterType.HAIR_PROBLEMS:
1408
- return exports.HairProblems;
1409
- case exports.FilterType.HAIR_STRANDS:
1410
- return exports.HairStrands;
1411
- case exports.FilterType.HAIR_TYPE:
1412
- return exports.HairTypes;
1413
- case exports.FilterType.PRODUCT_SPENT:
1414
- return exports.ProductSpents;
1415
- }
1416
- };
1417
- BeautyQuestionsHelper.getQuestions = function (filter) {
1418
- return exports.QuestionsFilters[filter];
1419
- };
1420
- return BeautyQuestionsHelper;
1363
+ var BeautyQuestionsHelper = /** @class */ (function () {
1364
+ function BeautyQuestionsHelper() {
1365
+ }
1366
+ BeautyQuestionsHelper.getAnswers = function (filter) {
1367
+ switch (filter) {
1368
+ case exports.FilterType.ACCESSORY_IMPORTANCE:
1369
+ return exports.AccessoryImportances;
1370
+ case exports.FilterType.BEARD_PROBLEMS:
1371
+ return exports.BeardProblems;
1372
+ case exports.FilterType.BEARD_SIZE:
1373
+ return exports.BeardSizes;
1374
+ case exports.FilterType.BEAUTY_PRODUCT_IMPORTANCE:
1375
+ return exports.BeautyProductImportances;
1376
+ case exports.FilterType.BODY_PROBLEMS:
1377
+ return exports.BodyProblems;
1378
+ case exports.FilterType.BODY_SHAPE:
1379
+ return exports.BodyShapes;
1380
+ case exports.FilterType.BODY_TATTOOS:
1381
+ return exports.BodyTattoos;
1382
+ case exports.FilterType.FACE_SKIN_OILINESS:
1383
+ return exports.FaceSkinOilinesses;
1384
+ case exports.FilterType.FACE_SKIN_PROBLEMS:
1385
+ return exports.FaceSkinProblems;
1386
+ case exports.FilterType.FACE_SKIN_TONE:
1387
+ return exports.FaceSkinTones;
1388
+ case exports.FilterType.FAMILY_INCOME:
1389
+ return exports.FamilyIncomes;
1390
+ case exports.FilterType.FRAGRANCE_IMPORTANCE:
1391
+ return exports.FragranceImportances;
1392
+ case exports.FilterType.HAIR_COLOR:
1393
+ return exports.HairColors;
1394
+ case exports.FilterType.HAIR_PROBLEMS:
1395
+ return exports.HairProblems;
1396
+ case exports.FilterType.HAIR_STRANDS:
1397
+ return exports.HairStrands;
1398
+ case exports.FilterType.HAIR_TYPE:
1399
+ return exports.HairTypes;
1400
+ case exports.FilterType.PRODUCT_SPENT:
1401
+ return exports.ProductSpents;
1402
+ }
1403
+ };
1404
+ BeautyQuestionsHelper.getQuestions = function (filter) {
1405
+ return exports.QuestionsFilters[filter];
1406
+ };
1407
+ return BeautyQuestionsHelper;
1421
1408
  }());
1422
1409
 
1423
- var Home = /** @class */ (function (_super) {
1424
- __extends(Home, _super);
1425
- function Home() {
1426
- return _super !== null && _super.apply(this, arguments) || this;
1427
- }
1428
- Home.prototype.identifierFields = function () {
1429
- return ['id'];
1430
- };
1431
- return Home;
1432
- }(BaseModel));
1433
-
1434
- var ShopMenu = /** @class */ (function (_super) {
1435
- __extends(ShopMenu, _super);
1436
- function ShopMenu() {
1437
- return _super !== null && _super.apply(this, arguments) || this;
1438
- }
1439
- ShopMenu.prototype.identifierFields = function () {
1440
- return ['id'];
1441
- };
1442
- return ShopMenu;
1410
+ var Home = /** @class */ (function (_super) {
1411
+ __extends(Home, _super);
1412
+ function Home() {
1413
+ return _super !== null && _super.apply(this, arguments) || this;
1414
+ }
1415
+ Home.prototype.identifierFields = function () {
1416
+ return ['id'];
1417
+ };
1418
+ return Home;
1443
1419
  }(BaseModel));
1444
1420
 
1445
- var ShopSettings = /** @class */ (function (_super) {
1446
- __extends(ShopSettings, _super);
1447
- function ShopSettings() {
1448
- return _super !== null && _super.apply(this, arguments) || this;
1449
- }
1450
- ShopSettings.prototype.identifierFields = function () {
1451
- return ['id'];
1452
- };
1453
- return ShopSettings;
1421
+ var ShopMenu = /** @class */ (function (_super) {
1422
+ __extends(ShopMenu, _super);
1423
+ function ShopMenu() {
1424
+ return _super !== null && _super.apply(this, arguments) || this;
1425
+ }
1426
+ ShopMenu.prototype.identifierFields = function () {
1427
+ return ['id'];
1428
+ };
1429
+ return ShopMenu;
1454
1430
  }(BaseModel));
1455
1431
 
1456
- var InvalidArgumentError = /** @class */ (function (_super) {
1457
- __extends(InvalidArgumentError, _super);
1458
- function InvalidArgumentError(message) {
1459
- var _this = _super.call(this, message) || this;
1460
- _this.message = message;
1461
- return _this;
1462
- }
1463
- return InvalidArgumentError;
1432
+ var InvalidArgumentError = /** @class */ (function (_super) {
1433
+ __extends(InvalidArgumentError, _super);
1434
+ function InvalidArgumentError(message) {
1435
+ var _this = _super.call(this, message) || this;
1436
+ _this.message = message;
1437
+ return _this;
1438
+ }
1439
+ return InvalidArgumentError;
1464
1440
  }(Error));
1465
1441
 
1466
- var RequiredArgumentError = /** @class */ (function (_super) {
1467
- __extends(RequiredArgumentError, _super);
1468
- function RequiredArgumentError(args) {
1469
- var _this = _super.call(this, "Required arguments: " + args.join(', ')) || this;
1470
- _this.args = args;
1471
- _this.arguments = args;
1472
- return _this;
1473
- }
1474
- return RequiredArgumentError;
1442
+ var RequiredArgumentError = /** @class */ (function (_super) {
1443
+ __extends(RequiredArgumentError, _super);
1444
+ function RequiredArgumentError(args) {
1445
+ var _this = _super.call(this, "Required arguments: " + args.join(', ')) || this;
1446
+ _this.args = args;
1447
+ _this.arguments = args;
1448
+ return _this;
1449
+ }
1450
+ return RequiredArgumentError;
1475
1451
  }(Error));
1476
1452
 
1477
- var NotFoundError = /** @class */ (function (_super) {
1478
- __extends(NotFoundError, _super);
1479
- function NotFoundError(message) {
1480
- var _this = _super.call(this, message) || this;
1481
- _this.message = message;
1482
- return _this;
1483
- }
1484
- return NotFoundError;
1453
+ var NotFoundError = /** @class */ (function (_super) {
1454
+ __extends(NotFoundError, _super);
1455
+ function NotFoundError(message) {
1456
+ var _this = _super.call(this, message) || this;
1457
+ _this.message = message;
1458
+ return _this;
1459
+ }
1460
+ return NotFoundError;
1485
1461
  }(Error));
1486
1462
 
1487
- var DuplicatedResultsError = /** @class */ (function (_super) {
1488
- __extends(DuplicatedResultsError, _super);
1489
- function DuplicatedResultsError(message) {
1490
- var _this = _super.call(this, message) || this;
1491
- _this.message = message;
1492
- return _this;
1493
- }
1494
- return DuplicatedResultsError;
1463
+ var DuplicatedResultsError = /** @class */ (function (_super) {
1464
+ __extends(DuplicatedResultsError, _super);
1465
+ function DuplicatedResultsError(message) {
1466
+ var _this = _super.call(this, message) || this;
1467
+ _this.message = message;
1468
+ return _this;
1469
+ }
1470
+ return DuplicatedResultsError;
1495
1471
  }(Error));
1496
1472
 
1497
- var AxiosAdapter = /** @class */ (function () {
1498
- function AxiosAdapter(config) {
1499
- this.config = config;
1500
- }
1501
- AxiosAdapter.prototype.query = function (index, query) {
1502
- return __awaiter(this, void 0, void 0, function () {
1503
- var data;
1504
- return __generator(this, function (_a) {
1505
- switch (_a.label) {
1506
- case 0: return [4 /*yield*/, axios__default["default"]({
1507
- url: this.config.url + "/" + index,
1508
- method: 'POST',
1509
- headers: { Authorization: "Basic " + this.config.credential },
1510
- data: query,
1511
- })];
1512
- case 1:
1513
- data = (_a.sent()).data;
1514
- return [2 /*return*/, {
1515
- total: data.hits.total.value,
1516
- hits: data.hits.hits,
1517
- }];
1518
- }
1519
- });
1520
- });
1521
- };
1522
- return AxiosAdapter;
1523
- }());
1524
-
1525
- var ProductsIndex = /** @class */ (function () {
1526
- function ProductsIndex(adapter) {
1527
- this.adapter = adapter;
1528
- }
1529
- ProductsIndex.prototype.findById = function (ids, options) {
1530
- return __awaiter(this, void 0, void 0, function () {
1531
- var publishedField, fields, hits;
1532
- var _a;
1533
- return __generator(this, function (_b) {
1534
- switch (_b.label) {
1535
- case 0:
1536
- publishedField = options.shop === exports.Shops.GLAMSHOP ? 'publishedGlam' : 'published';
1537
- fields = [
1538
- 'brand',
1539
- 'id',
1540
- 'images',
1541
- 'miniatures',
1542
- 'name',
1543
- 'price',
1544
- 'sku',
1545
- 'stock',
1546
- 'slug',
1547
- 'reviews',
1548
- 'pricePaid',
1549
- 'isGift',
1550
- 'stock',
1551
- 'weight',
1552
- 'tags',
1553
- 'hasVariants',
1554
- ];
1555
- return [4 /*yield*/, this.adapter.query('products/_search', Object.assign({ _source: fields, query: {
1556
- bool: {
1557
- filter: __spreadArray([
1558
- {
1559
- terms: {
1560
- _id: ids,
1561
- },
1562
- },
1563
- {
1564
- term: (_a = {},
1565
- _a[publishedField] = true,
1566
- _a),
1567
- }
1568
- ], __read((options.hasStock
1569
- ? [
1570
- {
1571
- range: {
1572
- 'stock.quantity': {
1573
- gt: 0,
1574
- },
1575
- },
1576
- },
1577
- ]
1578
- : []))),
1579
- },
1580
- } }, (options.size ? { size: options.size } : {})))];
1581
- case 1:
1582
- hits = (_b.sent()).hits;
1583
- return [2 /*return*/, hits.map(function (hit) { return Product.toInstance(hit._source); })];
1584
- }
1585
- });
1586
- });
1587
- };
1588
- return ProductsIndex;
1589
- }());
1590
-
1591
- var withFirestore = function (MixinBase) {
1592
- return /** @class */ (function (_super) {
1593
- __extends(class_1, _super);
1594
- function class_1() {
1595
- var args = [];
1596
- for (var _i = 0; _i < arguments.length; _i++) {
1597
- args[_i] = arguments[_i];
1598
- }
1599
- return _super.call(this, args) || this;
1600
- }
1601
- class_1.prototype.collection = function (path) {
1602
- return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance());
1603
- };
1604
- class_1.prototype.buildModelInstance = function () {
1605
- var _this = this;
1606
- return {
1607
- toFirestore: function (data) { return ((data === null || data === void 0 ? void 0 : data.toPlain) ? data.toPlain() : data); },
1608
- fromFirestore: function (snap) {
1609
- var data = snap.data();
1610
- Object.keys(data).forEach(function (key) {
1611
- if (data[key] instanceof firebase__default["default"].firestore.Timestamp) {
1612
- data[key] = data[key].toDate();
1613
- }
1614
- });
1615
- return _this.model.toInstance(Object.assign(Object.assign({}, data), { id: snap.id }));
1616
- },
1617
- };
1618
- };
1619
- return class_1;
1620
- }(MixinBase));
1473
+ var withFirestore = function (MixinBase) {
1474
+ return /** @class */ (function (_super) {
1475
+ __extends(class_1, _super);
1476
+ function class_1() {
1477
+ var args = [];
1478
+ for (var _i = 0; _i < arguments.length; _i++) {
1479
+ args[_i] = arguments[_i];
1480
+ }
1481
+ return _super.call(this, args) || this;
1482
+ }
1483
+ class_1.prototype.collection = function (path) {
1484
+ return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance());
1485
+ };
1486
+ class_1.prototype.buildModelInstance = function () {
1487
+ var _this = this;
1488
+ return {
1489
+ toFirestore: function (data) { return ((data === null || data === void 0 ? void 0 : data.toPlain) ? data.toPlain() : data); },
1490
+ fromFirestore: function (snap) {
1491
+ var data = snap.data();
1492
+ Object.keys(data).forEach(function (key) {
1493
+ if (data[key] instanceof firebase__default["default"].firestore.Timestamp) {
1494
+ data[key] = data[key].toDate();
1495
+ }
1496
+ });
1497
+ return _this.model.toInstance(Object.assign({ id: snap.id }, data));
1498
+ },
1499
+ };
1500
+ };
1501
+ return class_1;
1502
+ }(MixinBase));
1621
1503
  };
1622
1504
 
1623
- var withHelpers = function (MixinBase) {
1624
- return /** @class */ (function (_super) {
1625
- __extends(class_1, _super);
1626
- function class_1() {
1627
- return _super !== null && _super.apply(this, arguments) || this;
1628
- }
1629
- class_1.prototype.toArray = function (snapShot) {
1630
- if (Array.isArray(snapShot)) {
1631
- return snapShot.map(function (doc) { return doc.data(); });
1632
- }
1633
- else {
1634
- return snapShot.docs.map(function (doc) { return doc.data(); });
1635
- }
1636
- };
1637
- class_1.prototype.isSubCollection = function (repository) {
1638
- return !lodash.isNil(Object.keys(this).find(function (key) { return key === 'parentRepository'; }));
1639
- };
1640
- return class_1;
1641
- }(MixinBase));
1505
+ var withHelpers = function (MixinBase) {
1506
+ return /** @class */ (function (_super) {
1507
+ __extends(class_1, _super);
1508
+ function class_1() {
1509
+ return _super !== null && _super.apply(this, arguments) || this;
1510
+ }
1511
+ class_1.prototype.toArray = function (snapShot) {
1512
+ if (Array.isArray(snapShot)) {
1513
+ return snapShot.map(function (doc) { return doc.data(); });
1514
+ }
1515
+ else {
1516
+ return snapShot.docs.map(function (doc) { return doc.data(); });
1517
+ }
1518
+ };
1519
+ class_1.prototype.isSubCollection = function (repository) {
1520
+ return !lodash.isNil(Object.keys(this).find(function (key) { return key === 'parentRepository'; }));
1521
+ };
1522
+ return class_1;
1523
+ }(MixinBase));
1642
1524
  };
1643
1525
 
1644
- var withGetFirestore = function (MixinBase) {
1645
- return /** @class */ (function (_super) {
1646
- __extends(GetFirestore, _super);
1647
- function GetFirestore() {
1648
- return _super !== null && _super.apply(this, arguments) || this;
1649
- }
1650
- GetFirestore.prototype.get = function (identifiers) {
1651
- return __awaiter(this, void 0, void 0, function () {
1652
- var doc, data;
1653
- return __generator(this, function (_a) {
1654
- switch (_a.label) {
1655
- case 0: return [4 /*yield*/, this.collection(this.buildCollectionPathForGet(identifiers))
1656
- .doc(Object.values(identifiers).shift().toString())
1657
- .get()];
1658
- case 1:
1659
- doc = _a.sent();
1660
- data = doc.data();
1661
- if (lodash.isNil(data))
1662
- throw new NotFoundError("Document " + JSON.stringify(identifiers) + " not found");
1663
- return [2 /*return*/, data];
1664
- }
1665
- });
1666
- });
1667
- };
1668
- GetFirestore.prototype.buildCollectionPathForGet = function (identifiers) {
1669
- return this.isSubCollection(this)
1670
- ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1671
- : this.collectionName;
1672
- };
1673
- return GetFirestore;
1674
- }(MixinBase));
1526
+ var withGetFirestore = function (MixinBase) {
1527
+ return /** @class */ (function (_super) {
1528
+ __extends(GetFirestore, _super);
1529
+ function GetFirestore() {
1530
+ return _super !== null && _super.apply(this, arguments) || this;
1531
+ }
1532
+ GetFirestore.prototype.get = function (identifiers) {
1533
+ return __awaiter(this, void 0, void 0, function () {
1534
+ var doc, data;
1535
+ return __generator(this, function (_a) {
1536
+ switch (_a.label) {
1537
+ case 0: return [4 /*yield*/, this.collection(this.buildCollectionPathForGet(identifiers))
1538
+ .doc(Object.values(identifiers).shift().toString())
1539
+ .get()];
1540
+ case 1:
1541
+ doc = _a.sent();
1542
+ data = doc.data();
1543
+ if (lodash.isNil(data))
1544
+ throw new NotFoundError("Document " + JSON.stringify(identifiers) + " not found");
1545
+ return [2 /*return*/, data];
1546
+ }
1547
+ });
1548
+ });
1549
+ };
1550
+ GetFirestore.prototype.buildCollectionPathForGet = function (identifiers) {
1551
+ return this.isSubCollection(this)
1552
+ ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1553
+ : this.collectionName;
1554
+ };
1555
+ return GetFirestore;
1556
+ }(MixinBase));
1675
1557
  };
1676
1558
 
1677
- var withFindFirestore = function (MixinBase) {
1678
- var checkIfIsFilterOption = function (filter) { return !lodash.isNil(filter === null || filter === void 0 ? void 0 : filter.operator); };
1679
- var getValueFromFilter = function (filter) {
1680
- return checkIfIsFilterOption(filter) ? filter.value : filter;
1681
- };
1682
- var getFinalValueFrom = function (value) { return lodash.isNumber(value) || lodash.isString(value) || lodash.isDate(value) || Array.isArray(value)
1683
- ? value
1684
- : Object.values(getFinalValueFrom); };
1685
- return /** @class */ (function (_super) {
1686
- __extends(FindFirestore, _super);
1687
- function FindFirestore() {
1688
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1689
- _this.makeFirestoreWhere = function (queryReference, filter) { return Object.keys(filter).reduce(function (query, fieldName) { return _this.buildWhereSentence(query, fieldName, filter[fieldName]); }, queryReference); };
1690
- _this.buildWhereSentence = function (queryReference, fieldName, options) {
1691
- if (_this.isSubCollection(_this) && fieldName === _this.parentIdField)
1692
- return queryReference;
1693
- var value = (options === null || options === void 0 ? void 0 : options.value) || options;
1694
- var object = {};
1695
- lodash.set(object, fieldName, value);
1696
- var plainInstance = new _this.model(object).toPlain();
1697
- var firestoreFieldName = fieldName.toString().indexOf('.') > -1
1698
- ? fieldName.toString()
1699
- : Object.keys(plainInstance).find(function (key) { return plainInstance[key]; });
1700
- if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.LIKE) {
1701
- if (Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1702
- return queryReference.where(firestoreFieldName, 'array-contains-any', options.value);
1703
- queryReference = queryReference.where(firestoreFieldName, '>=', options.value);
1704
- queryReference = queryReference.where(firestoreFieldName, '<=', options.value + "~");
1705
- return queryReference;
1706
- }
1707
- if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.IN && Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1708
- return queryReference.where(firestoreFieldName, 'array-contains', options.value);
1709
- if (lodash.isObject(options) && lodash.isNil(options === null || options === void 0 ? void 0 : options.operator) && lodash.isNil(options === null || options === void 0 ? void 0 : options.value)) {
1710
- return Object.keys(options).reduce(function (queryReferenceWithWhere, key) { return _this.buildWhereSentence(queryReferenceWithWhere, fieldName + "." + key, options[key]); }, queryReference);
1711
- }
1712
- return queryReference.where(firestoreFieldName, (options === null || options === void 0 ? void 0 : options.operator) || '==', (options === null || options === void 0 ? void 0 : options.value) || options);
1713
- };
1714
- return _this;
1715
- }
1716
- FindFirestore.prototype.find = function (filters, limits, orderBy) {
1717
- return __awaiter(this, void 0, void 0, function () {
1718
- var query, docs, data;
1719
- var _this = this;
1720
- return __generator(this, function (_b) {
1721
- switch (_b.label) {
1722
- case 0:
1723
- query = this.collection(this.buildCollectionPathForFind(filters));
1724
- filters === null || filters === void 0 ? void 0 : filters.forEach(function (filterer) { return (query = _this.makeFirestoreWhere(query, filterer)); });
1725
- orderBy === null || orderBy === void 0 ? void 0 : orderBy.forEach(function (orderer) { return Object.keys(orderer).forEach(function (fieldName) { return (query = query.orderBy(fieldName, orderer[fieldName])); }); });
1726
- return [4 /*yield*/, this.defineLimits(query, filters, limits)];
1727
- case 1:
1728
- query = _b.sent();
1729
- return [4 /*yield*/, query.get()];
1730
- case 2:
1731
- docs = _b.sent();
1732
- data = docs.docs.map(function (doc) { return doc.data(); });
1733
- return [2 /*return*/, {
1734
- data: data,
1735
- count: this.calculateCount(data, limits),
1736
- }];
1737
- }
1738
- });
1739
- });
1740
- };
1741
- FindFirestore.prototype.buildCollectionPathForFind = function (filters) {
1742
- var _a;
1743
- if (!this.isSubCollection(this))
1744
- return this.collectionName;
1745
- var parentIdField = this.parentIdField;
1746
- var parentId = getValueFromFilter((_a = filters.find(function (groupFilter) { return Boolean(getValueFromFilter(groupFilter[parentIdField])); })) === null || _a === void 0 ? void 0 : _a[parentIdField]);
1747
- return this.parentRepository.collectionName + "/" + parentId + "/" + this.collectionName;
1748
- };
1749
- FindFirestore.prototype.defineLimits = function (query, filters, limits) {
1750
- return __awaiter(this, void 0, void 0, function () {
1751
- var _b, _c;
1752
- return __generator(this, function (_d) {
1753
- switch (_d.label) {
1754
- case 0:
1755
- if (!(limits === null || limits === void 0 ? void 0 : limits.offset)) return [3 /*break*/, 3];
1756
- if (!(limits.offset instanceof this.model)) return [3 /*break*/, 2];
1757
- _c = (_b = query).startAfter;
1758
- return [4 /*yield*/, this.collection(this.buildCollectionPathForFind(filters))
1759
- .doc(limits.offset[limits.offset.identifierFields().shift()])
1760
- .get()];
1761
- case 1:
1762
- query = _c.apply(_b, [_d.sent()]);
1763
- return [3 /*break*/, 3];
1764
- case 2:
1765
- if (lodash.isNumber(limits.offset) || lodash.isString(limits.offset))
1766
- query = query.startAt(limits.offset);
1767
- _d.label = 3;
1768
- case 3:
1769
- if (limits === null || limits === void 0 ? void 0 : limits.limit)
1770
- query = query.limit(limits.limit);
1771
- return [2 /*return*/, query];
1772
- }
1773
- });
1774
- });
1775
- };
1776
- FindFirestore.prototype.calculateCount = function (data, limits) {
1777
- if (data.length <= 0)
1778
- return 0;
1779
- if (data.length < (limits === null || limits === void 0 ? void 0 : limits.limit))
1780
- return data.length;
1781
- return Infinity;
1782
- };
1783
- return FindFirestore;
1784
- }(MixinBase));
1559
+ var withFindFirestore = function (MixinBase) {
1560
+ var checkIfIsFilterOption = function (filter) { return !lodash.isNil(filter === null || filter === void 0 ? void 0 : filter.operator); };
1561
+ var getValueFromFilter = function (filter) {
1562
+ return checkIfIsFilterOption(filter) ? filter.value : filter;
1563
+ };
1564
+ return /** @class */ (function (_super) {
1565
+ __extends(FindFirestore, _super);
1566
+ function FindFirestore() {
1567
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1568
+ _this.makeFirestoreWhere = function (queryReference, filter) { return Object.keys(filter).reduce(function (query, fieldName) { return _this.buildWhereSentence(query, fieldName, filter[fieldName]); }, queryReference); };
1569
+ _this.buildWhereSentence = function (queryReference, fieldName, options) {
1570
+ if (_this.isSubCollection(_this) && fieldName === _this.parentIdField)
1571
+ return queryReference;
1572
+ if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.LIKE) {
1573
+ if (Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1574
+ return queryReference.where(fieldName.toString(), 'array-contains-any', options.value);
1575
+ queryReference = queryReference.where(fieldName.toString(), '>=', options.value);
1576
+ queryReference = queryReference.where(fieldName.toString(), '<=', options.value + "~");
1577
+ return queryReference;
1578
+ }
1579
+ if ((options === null || options === void 0 ? void 0 : options.operator) === exports.Where.IN && Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1580
+ return queryReference.where(fieldName.toString(), 'array-contains', options.value);
1581
+ if (lodash.isObject(options) && lodash.isNil(options === null || options === void 0 ? void 0 : options.operator) && lodash.isNil(options === null || options === void 0 ? void 0 : options.value))
1582
+ return Object.keys(options).reduce(function (queryReferenceWithWhere, key) { return _this.buildWhereSentence(queryReferenceWithWhere, fieldName + "." + key, options[key]); }, queryReference);
1583
+ return queryReference.where(fieldName.toString(), (options === null || options === void 0 ? void 0 : options.operator) || '==', (options === null || options === void 0 ? void 0 : options.value) || options);
1584
+ };
1585
+ return _this;
1586
+ }
1587
+ FindFirestore.prototype.find = function (filters, limits, orderBy) {
1588
+ return __awaiter(this, void 0, void 0, function () {
1589
+ var query, docs, data;
1590
+ var _this = this;
1591
+ return __generator(this, function (_b) {
1592
+ switch (_b.label) {
1593
+ case 0:
1594
+ query = this.collection(this.buildCollectionPathForFind(filters));
1595
+ filters === null || filters === void 0 ? void 0 : filters.forEach(function (filterer) { return (query = _this.makeFirestoreWhere(query, filterer)); });
1596
+ orderBy === null || orderBy === void 0 ? void 0 : orderBy.forEach(function (orderer) { return Object.keys(orderer).forEach(function (fieldName) { return (query = query.orderBy(fieldName, orderer[fieldName])); }); });
1597
+ return [4 /*yield*/, this.defineLimits(query, filters, limits)];
1598
+ case 1:
1599
+ query = _b.sent();
1600
+ return [4 /*yield*/, query.get()];
1601
+ case 2:
1602
+ docs = _b.sent();
1603
+ data = docs.docs.map(function (doc) { return doc.data(); });
1604
+ return [2 /*return*/, {
1605
+ data: data,
1606
+ count: this.calculateCount(data, limits),
1607
+ }];
1608
+ }
1609
+ });
1610
+ });
1611
+ };
1612
+ FindFirestore.prototype.buildCollectionPathForFind = function (filters) {
1613
+ var _a;
1614
+ if (!this.isSubCollection(this))
1615
+ return this.collectionName;
1616
+ var parentIdField = this.parentIdField;
1617
+ var parentId = getValueFromFilter((_a = filters.find(function (groupFilter) { return Boolean(getValueFromFilter(groupFilter[parentIdField])); })) === null || _a === void 0 ? void 0 : _a[parentIdField]);
1618
+ return this.parentRepository.collectionName + "/" + parentId + "/" + this.collectionName;
1619
+ };
1620
+ FindFirestore.prototype.defineLimits = function (query, filters, limits) {
1621
+ return __awaiter(this, void 0, void 0, function () {
1622
+ var _b, _c;
1623
+ return __generator(this, function (_d) {
1624
+ switch (_d.label) {
1625
+ case 0:
1626
+ if (!(limits === null || limits === void 0 ? void 0 : limits.offset)) return [3 /*break*/, 3];
1627
+ if (!(limits.offset instanceof this.model)) return [3 /*break*/, 2];
1628
+ _c = (_b = query).startAfter;
1629
+ return [4 /*yield*/, this.collection(this.buildCollectionPathForFind(filters))
1630
+ .doc(limits.offset[limits.offset.identifierFields().shift()])
1631
+ .get()];
1632
+ case 1:
1633
+ query = _c.apply(_b, [_d.sent()]);
1634
+ return [3 /*break*/, 3];
1635
+ case 2:
1636
+ if (lodash.isNumber(limits.offset) || lodash.isString(limits.offset))
1637
+ query = query.startAt(limits.offset);
1638
+ _d.label = 3;
1639
+ case 3:
1640
+ if (limits === null || limits === void 0 ? void 0 : limits.limit)
1641
+ query = query.limit(limits.limit);
1642
+ return [2 /*return*/, query];
1643
+ }
1644
+ });
1645
+ });
1646
+ };
1647
+ FindFirestore.prototype.calculateCount = function (data, limits) {
1648
+ if (data.length <= 0)
1649
+ return 0;
1650
+ if (data.length < (limits === null || limits === void 0 ? void 0 : limits.limit))
1651
+ return data.length;
1652
+ return Infinity;
1653
+ };
1654
+ return FindFirestore;
1655
+ }(MixinBase));
1785
1656
  };
1786
1657
 
1787
- var withCreateFirestore = function (MixinBase) {
1788
- return /** @class */ (function (_super) {
1789
- __extends(CreateFirestore, _super);
1790
- function CreateFirestore() {
1791
- return _super !== null && _super.apply(this, arguments) || this;
1792
- }
1793
- CreateFirestore.prototype.create = function (data) {
1794
- return __awaiter(this, void 0, void 0, function () {
1795
- var docRef, doc;
1796
- return __generator(this, function (_b) {
1797
- switch (_b.label) {
1798
- case 0: return [4 /*yield*/, this.save(this.model.toInstance(data))];
1799
- case 1:
1800
- docRef = _b.sent();
1801
- return [4 /*yield*/, docRef.get()];
1802
- case 2:
1803
- doc = _b.sent();
1804
- return [2 /*return*/, doc.data()];
1805
- }
1806
- });
1807
- });
1808
- };
1809
- CreateFirestore.prototype.save = function (data) {
1810
- var _a;
1811
- return __awaiter(this, void 0, void 0, function () {
1812
- var id, collectionPath, docRef;
1813
- return __generator(this, function (_b) {
1814
- switch (_b.label) {
1815
- case 0:
1816
- id = (_a = data[data.identifierFields().shift()]) === null || _a === void 0 ? void 0 : _a.toString();
1817
- collectionPath = this.buildCollectionPathForAdd(data);
1818
- if (lodash.isEmpty(id))
1819
- return [2 /*return*/, this.collection(collectionPath).add(data)];
1820
- docRef = this.collection(collectionPath).doc(id);
1821
- return [4 /*yield*/, docRef.set(data)];
1822
- case 1:
1823
- _b.sent();
1824
- return [2 /*return*/, docRef];
1825
- }
1826
- });
1827
- });
1828
- };
1829
- CreateFirestore.prototype.buildCollectionPathForAdd = function (identifiers) {
1830
- return this.isSubCollection(this)
1831
- ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1832
- : this.collectionName;
1833
- };
1834
- return CreateFirestore;
1835
- }(MixinBase));
1658
+ var withCreateFirestore = function (MixinBase) {
1659
+ return /** @class */ (function (_super) {
1660
+ __extends(CreateFirestore, _super);
1661
+ function CreateFirestore() {
1662
+ return _super !== null && _super.apply(this, arguments) || this;
1663
+ }
1664
+ CreateFirestore.prototype.create = function (data) {
1665
+ return __awaiter(this, void 0, void 0, function () {
1666
+ var docRef, doc;
1667
+ return __generator(this, function (_b) {
1668
+ switch (_b.label) {
1669
+ case 0: return [4 /*yield*/, this.save(this.model.toInstance(data))];
1670
+ case 1:
1671
+ docRef = _b.sent();
1672
+ return [4 /*yield*/, docRef.get()];
1673
+ case 2:
1674
+ doc = _b.sent();
1675
+ return [2 /*return*/, doc.data()];
1676
+ }
1677
+ });
1678
+ });
1679
+ };
1680
+ CreateFirestore.prototype.save = function (data) {
1681
+ var _a;
1682
+ return __awaiter(this, void 0, void 0, function () {
1683
+ var id, collectionPath, docRef;
1684
+ return __generator(this, function (_b) {
1685
+ switch (_b.label) {
1686
+ case 0:
1687
+ id = (_a = data[data.identifierFields().shift()]) === null || _a === void 0 ? void 0 : _a.toString();
1688
+ collectionPath = this.buildCollectionPathForAdd(data);
1689
+ if (lodash.isEmpty(id))
1690
+ return [2 /*return*/, this.collection(collectionPath).add(data)];
1691
+ docRef = this.collection(collectionPath).doc(id);
1692
+ return [4 /*yield*/, docRef.set(data)];
1693
+ case 1:
1694
+ _b.sent();
1695
+ return [2 /*return*/, docRef];
1696
+ }
1697
+ });
1698
+ });
1699
+ };
1700
+ CreateFirestore.prototype.buildCollectionPathForAdd = function (identifiers) {
1701
+ return this.isSubCollection(this)
1702
+ ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1703
+ : this.collectionName;
1704
+ };
1705
+ return CreateFirestore;
1706
+ }(MixinBase));
1836
1707
  };
1837
1708
 
1838
- var withUpdateFirestore = function (MixinBase) {
1839
- var getValueFromParams = function (params, field) { var _a; return (lodash.isNil((_a = params[field]) === null || _a === void 0 ? void 0 : _a.value) ? params[field] : params[field].value) || null; };
1840
- var getValueByAction = function (options) {
1841
- var fieldValues = firebase__default["default"].firestore.FieldValue;
1842
- if (lodash.isNil(options.action))
1843
- return options;
1844
- if (options.action === exports.UpdateOptionActions.REMOVE_FIELD)
1845
- return fieldValues.delete();
1846
- if (Array.isArray(options.value)) {
1847
- if (options.action === exports.UpdateOptionActions.MERGE)
1848
- return fieldValues.arrayUnion.apply(fieldValues, __spreadArray([], __read(options.value)));
1849
- if (options.action === exports.UpdateOptionActions.REMOVE)
1850
- return fieldValues.arrayRemove.apply(fieldValues, __spreadArray([], __read(options.value)));
1851
- }
1852
- return options.value;
1853
- };
1854
- return /** @class */ (function (_super) {
1855
- __extends(UpdateFirestore, _super);
1856
- function UpdateFirestore() {
1857
- return _super !== null && _super.apply(this, arguments) || this;
1858
- }
1859
- UpdateFirestore.prototype.update = function (data) {
1860
- return __awaiter(this, void 0, void 0, function () {
1861
- var model, keyField, docRef, doc;
1862
- return __generator(this, function (_b) {
1863
- switch (_b.label) {
1864
- case 0:
1865
- model = new this.model();
1866
- keyField = model.identifierFields().shift();
1867
- docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(getValueFromParams(data, keyField).toString());
1868
- return [4 /*yield*/, docRef.set(this.paramsToPlain(data), { merge: true })];
1869
- case 1:
1870
- _b.sent();
1871
- return [4 /*yield*/, docRef.get()];
1872
- case 2:
1873
- doc = _b.sent();
1874
- return [2 /*return*/, doc.data()];
1875
- }
1876
- });
1877
- });
1878
- };
1879
- UpdateFirestore.prototype.buildCollectionPathForUpdate = function (identifiers) {
1880
- return this.isSubCollection(this)
1881
- ? this.parentRepository.collectionName + "/" + getValueFromParams(identifiers, this.parentIdField) + "/" + this.collectionName
1882
- : this.collectionName;
1883
- };
1884
- UpdateFirestore.prototype.paramsToPlain = function (params) {
1885
- var model = this.model;
1886
- if (params instanceof model)
1887
- return params;
1888
- return Object.keys(params).reduce(function (data, currentKey) {
1889
- var _b;
1890
- return (Object.assign(Object.assign({}, data), (_b = {}, _b[currentKey] = getValueByAction(params[currentKey]), _b)));
1891
- }, {});
1892
- };
1893
- return UpdateFirestore;
1894
- }(MixinBase));
1709
+ var withUpdateFirestore = function (MixinBase) {
1710
+ var getValueFromParams = function (params, field) { var _a; return (lodash.isNil((_a = params[field]) === null || _a === void 0 ? void 0 : _a.value) ? params[field] : params[field].value) || null; };
1711
+ var getValueByAction = function (options) {
1712
+ var fieldValues = firebase__default["default"].firestore.FieldValue;
1713
+ if (lodash.isNil(options.action))
1714
+ return options;
1715
+ if (options.action === exports.UpdateOptionActions.REMOVE_FIELD)
1716
+ return fieldValues.delete();
1717
+ if (Array.isArray(options.value)) {
1718
+ if (options.action === exports.UpdateOptionActions.MERGE)
1719
+ return fieldValues.arrayUnion.apply(fieldValues, __spreadArray([], __read(options.value)));
1720
+ if (options.action === exports.UpdateOptionActions.REMOVE)
1721
+ return fieldValues.arrayRemove.apply(fieldValues, __spreadArray([], __read(options.value)));
1722
+ }
1723
+ return options.value;
1724
+ };
1725
+ return /** @class */ (function (_super) {
1726
+ __extends(UpdateFirestore, _super);
1727
+ function UpdateFirestore() {
1728
+ return _super !== null && _super.apply(this, arguments) || this;
1729
+ }
1730
+ UpdateFirestore.prototype.update = function (data) {
1731
+ return __awaiter(this, void 0, void 0, function () {
1732
+ var model, keyField, docRef, doc;
1733
+ return __generator(this, function (_b) {
1734
+ switch (_b.label) {
1735
+ case 0:
1736
+ model = new this.model();
1737
+ keyField = model.identifierFields().shift();
1738
+ docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(getValueFromParams(data, keyField).toString());
1739
+ return [4 /*yield*/, docRef.set(this.paramsToPlain(data), { merge: true })];
1740
+ case 1:
1741
+ _b.sent();
1742
+ return [4 /*yield*/, docRef.get()];
1743
+ case 2:
1744
+ doc = _b.sent();
1745
+ return [2 /*return*/, doc.data()];
1746
+ }
1747
+ });
1748
+ });
1749
+ };
1750
+ UpdateFirestore.prototype.buildCollectionPathForUpdate = function (identifiers) {
1751
+ return this.isSubCollection(this)
1752
+ ? this.parentRepository.collectionName + "/" + getValueFromParams(identifiers, this.parentIdField) + "/" + this.collectionName
1753
+ : this.collectionName;
1754
+ };
1755
+ UpdateFirestore.prototype.paramsToPlain = function (params) {
1756
+ var model = this.model;
1757
+ if (params instanceof model)
1758
+ return params;
1759
+ return Object.keys(params).reduce(function (data, currentKey) {
1760
+ var _b;
1761
+ return (Object.assign(Object.assign({}, data), (_b = {}, _b[currentKey] = getValueByAction(params[currentKey]), _b)));
1762
+ }, {});
1763
+ };
1764
+ return UpdateFirestore;
1765
+ }(MixinBase));
1895
1766
  };
1896
1767
 
1897
- var withDeleteFirestore = function (MixinBase) {
1898
- return /** @class */ (function (_super) {
1899
- __extends(DeleteFirestore, _super);
1900
- function DeleteFirestore() {
1901
- return _super !== null && _super.apply(this, arguments) || this;
1902
- }
1903
- DeleteFirestore.prototype.delete = function (identifiers) {
1904
- return __awaiter(this, void 0, void 0, function () {
1905
- return __generator(this, function (_a) {
1906
- switch (_a.label) {
1907
- case 0: return [4 /*yield*/, this.collection(this.buildCollectionPathForRemove(identifiers))
1908
- .doc(Object.values(identifiers).shift().toString())
1909
- .delete()];
1910
- case 1:
1911
- _a.sent();
1912
- return [2 /*return*/];
1913
- }
1914
- });
1915
- });
1916
- };
1917
- DeleteFirestore.prototype.buildCollectionPathForRemove = function (identifiers) {
1918
- return this.isSubCollection(this)
1919
- ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1920
- : this.collectionName;
1921
- };
1922
- return DeleteFirestore;
1923
- }(MixinBase));
1768
+ var withDeleteFirestore = function (MixinBase) {
1769
+ return /** @class */ (function (_super) {
1770
+ __extends(DeleteFirestore, _super);
1771
+ function DeleteFirestore() {
1772
+ return _super !== null && _super.apply(this, arguments) || this;
1773
+ }
1774
+ DeleteFirestore.prototype.delete = function (identifiers) {
1775
+ return __awaiter(this, void 0, void 0, function () {
1776
+ return __generator(this, function (_a) {
1777
+ switch (_a.label) {
1778
+ case 0: return [4 /*yield*/, this.collection(this.buildCollectionPathForRemove(identifiers))
1779
+ .doc(Object.values(identifiers).shift().toString())
1780
+ .delete()];
1781
+ case 1:
1782
+ _a.sent();
1783
+ return [2 /*return*/];
1784
+ }
1785
+ });
1786
+ });
1787
+ };
1788
+ DeleteFirestore.prototype.buildCollectionPathForRemove = function (identifiers) {
1789
+ return this.isSubCollection(this)
1790
+ ? this.parentRepository.collectionName + "/" + identifiers[this.parentIdField] + "/" + this.collectionName
1791
+ : this.collectionName;
1792
+ };
1793
+ return DeleteFirestore;
1794
+ }(MixinBase));
1924
1795
  };
1925
1796
 
1926
- var withSubCollection = function (MixinBase, ParentModel) {
1927
- return /** @class */ (function (_super) {
1928
- __extends(SubCollectionMix, _super);
1929
- function SubCollectionMix() {
1930
- var args = [];
1931
- for (var _i = 0; _i < arguments.length; _i++) {
1932
- args[_i] = arguments[_i];
1933
- }
1934
- return _super.call(this, args) || this;
1935
- }
1936
- SubCollectionMix.prototype.collection = function (path) {
1937
- return _super.prototype.collection.call(this, path);
1938
- };
1939
- return SubCollectionMix;
1940
- }(MixinBase));
1797
+ var withSubCollection = function (MixinBase, ParentModel) {
1798
+ return /** @class */ (function (_super) {
1799
+ __extends(SubCollectionMix, _super);
1800
+ function SubCollectionMix() {
1801
+ var args = [];
1802
+ for (var _i = 0; _i < arguments.length; _i++) {
1803
+ args[_i] = arguments[_i];
1804
+ }
1805
+ return _super.call(this, args) || this;
1806
+ }
1807
+ SubCollectionMix.prototype.collection = function (path) {
1808
+ return _super.prototype.collection.call(this, path);
1809
+ };
1810
+ return SubCollectionMix;
1811
+ }(MixinBase));
1941
1812
  };
1942
1813
 
1943
- var withCrudFirestore = function (MixinBase) {
1944
- return /** @class */ (function (_super) {
1945
- __extends(CrudFirestore, _super);
1946
- function CrudFirestore() {
1947
- return _super !== null && _super.apply(this, arguments) || this;
1948
- }
1949
- return CrudFirestore;
1950
- }(withUpdateFirestore(withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))))));
1814
+ var withCrudFirestore = function (MixinBase) {
1815
+ return /** @class */ (function (_super) {
1816
+ __extends(CrudFirestore, _super);
1817
+ function CrudFirestore() {
1818
+ return _super !== null && _super.apply(this, arguments) || this;
1819
+ }
1820
+ return CrudFirestore;
1821
+ }(withUpdateFirestore(withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))))));
1951
1822
  };
1952
1823
 
1953
- var SubscriptionFirestoreRepository = /** @class */ (function (_super) {
1954
- __extends(SubscriptionFirestoreRepository, _super);
1955
- function SubscriptionFirestoreRepository(firestore) {
1956
- var _this = _super.call(this) || this;
1957
- _this.firestore = firestore;
1958
- _this.collectionName = 'subscription';
1959
- _this.model = Subscription;
1960
- return _this;
1961
- }
1962
- return SubscriptionFirestoreRepository;
1824
+ var SubscriptionFirestoreRepository = /** @class */ (function (_super) {
1825
+ __extends(SubscriptionFirestoreRepository, _super);
1826
+ function SubscriptionFirestoreRepository(firestore) {
1827
+ var _this = _super.call(this) || this;
1828
+ _this.firestore = firestore;
1829
+ _this.collectionName = 'subscription';
1830
+ _this.model = Subscription;
1831
+ return _this;
1832
+ }
1833
+ return SubscriptionFirestoreRepository;
1963
1834
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
1964
1835
 
1965
- var UserSearch = /** @class */ (function (_super) {
1966
- __extends(UserSearch, _super);
1967
- function UserSearch() {
1968
- return _super !== null && _super.apply(this, arguments) || this;
1969
- }
1970
- UserSearch.prototype.identifierFields = function () {
1971
- return ['id'];
1972
- };
1973
- return UserSearch;
1836
+ var UserSearch = /** @class */ (function (_super) {
1837
+ __extends(UserSearch, _super);
1838
+ function UserSearch() {
1839
+ return _super !== null && _super.apply(this, arguments) || this;
1840
+ }
1841
+ UserSearch.prototype.identifierFields = function () {
1842
+ return ['id'];
1843
+ };
1844
+ return UserSearch;
1974
1845
  }(BaseModel));
1975
1846
 
1976
- var UserSearchFirestoreRepository = /** @class */ (function (_super) {
1977
- __extends(UserSearchFirestoreRepository, _super);
1978
- function UserSearchFirestoreRepository(firestore) {
1979
- var _this = _super.call(this) || this;
1980
- _this.firestore = firestore;
1981
- _this.collectionName = 'userSearch';
1982
- _this.model = UserSearch;
1983
- return _this;
1984
- }
1985
- return UserSearchFirestoreRepository;
1847
+ var UserSearchFirestoreRepository = /** @class */ (function (_super) {
1848
+ __extends(UserSearchFirestoreRepository, _super);
1849
+ function UserSearchFirestoreRepository(firestore) {
1850
+ var _this = _super.call(this) || this;
1851
+ _this.firestore = firestore;
1852
+ _this.collectionName = 'userSearch';
1853
+ _this.model = UserSearch;
1854
+ return _this;
1855
+ }
1856
+ return UserSearchFirestoreRepository;
1986
1857
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
1987
1858
 
1988
- var UserFirestoreRepository = /** @class */ (function (_super_1) {
1989
- __extends(UserFirestoreRepository, _super_1);
1990
- function UserFirestoreRepository(firestore, userSearchFirestoreRepository) {
1991
- if (userSearchFirestoreRepository === void 0) { userSearchFirestoreRepository = new UserSearchFirestoreRepository(firestore); }
1992
- var _this = _super_1.call(this) || this;
1993
- _this.firestore = firestore;
1994
- _this.userSearchFirestoreRepository = userSearchFirestoreRepository;
1995
- _this.collectionName = 'users';
1996
- _this.model = User;
1997
- return _this;
1998
- }
1999
- UserFirestoreRepository.prototype.get = function (identifiers) {
2000
- var _super = Object.create(null, {
2001
- get: { get: function () { return _super_1.prototype.get; } }
2002
- });
2003
- return __awaiter(this, void 0, void 0, function () {
2004
- var user, _a, _b;
2005
- return __generator(this, function (_c) {
2006
- switch (_c.label) {
2007
- case 0: return [4 /*yield*/, _super.get.call(this, { id: identifiers.id })];
2008
- case 1:
2009
- user = _c.sent();
2010
- _a = user;
2011
- return [4 /*yield*/, this.getBeautyProfile(user.id)];
2012
- case 2:
2013
- _a.beautyProfile = _c.sent();
2014
- _b = user;
2015
- return [4 /*yield*/, this.checkIfIsSubscriber(user.id)];
2016
- case 3:
2017
- _b.isSubscriber = _c.sent();
2018
- return [2 /*return*/, user];
2019
- }
2020
- });
2021
- });
2022
- };
2023
- UserFirestoreRepository.prototype.checkIfExistsByField = function (field, value) {
2024
- return __awaiter(this, void 0, void 0, function () {
2025
- var result;
2026
- var _a;
2027
- return __generator(this, function (_b) {
2028
- switch (_b.label) {
2029
- case 0: return [4 /*yield*/, this.userSearchFirestoreRepository.find([(_a = {}, _a[field] = { operator: exports.Where.EQUALS, value: value }, _a)])];
2030
- case 1:
2031
- result = _b.sent();
2032
- return [2 /*return*/, result.count > 0];
2033
- }
2034
- });
2035
- });
2036
- };
2037
- UserFirestoreRepository.prototype.buildModelInstance = function () {
2038
- var _a = _super_1.prototype.buildModelInstance.call(this), fromFirestore = _a.fromFirestore, toFirestore = _a.toFirestore;
2039
- return {
2040
- toFirestore: function (data) {
2041
- var plain = toFirestore(data);
2042
- delete plain.isSubscriber;
2043
- return plain;
2044
- },
2045
- fromFirestore: fromFirestore,
2046
- };
2047
- };
2048
- UserFirestoreRepository.prototype.getBeautyProfile = function (userId) {
2049
- return __awaiter(this, void 0, void 0, function () {
2050
- var beautyProfile;
2051
- return __generator(this, function (_a) {
2052
- switch (_a.label) {
2053
- case 0: return [4 /*yield*/, this.collection()
2054
- .doc(userId)
2055
- .collection('CX')
2056
- .withConverter(this.buildBeautyProfileModelInstance())
2057
- .doc('beautyProfile')
2058
- .get()];
2059
- case 1:
2060
- beautyProfile = _a.sent();
2061
- return [2 /*return*/, beautyProfile.data()];
2062
- }
2063
- });
2064
- });
2065
- };
2066
- UserFirestoreRepository.prototype.checkIfIsSubscriber = function (userId) {
2067
- return __awaiter(this, void 0, void 0, function () {
2068
- var docs;
2069
- return __generator(this, function (_a) {
2070
- switch (_a.label) {
2071
- case 0: return [4 /*yield*/, this.firestore
2072
- .collection('subscription')
2073
- .where('user.id', '==', userId)
2074
- .where('status', '==', 'active')
2075
- .get()];
2076
- case 1:
2077
- docs = _a.sent();
2078
- return [2 /*return*/, !!docs && !!docs.size];
2079
- }
2080
- });
2081
- });
2082
- };
2083
- UserFirestoreRepository.prototype.buildBeautyProfileModelInstance = function () {
2084
- return {
2085
- toFirestore: function (data) { return data.toPlain(); },
2086
- fromFirestore: function (snap) { return BeautyProfile.toInstance(snap.data()); },
2087
- };
2088
- };
2089
- return UserFirestoreRepository;
1859
+ var UserFirestoreRepository = /** @class */ (function (_super_1) {
1860
+ __extends(UserFirestoreRepository, _super_1);
1861
+ function UserFirestoreRepository(firestore, userSearchFirestoreRepository) {
1862
+ if (userSearchFirestoreRepository === void 0) { userSearchFirestoreRepository = new UserSearchFirestoreRepository(firestore); }
1863
+ var _this = _super_1.call(this) || this;
1864
+ _this.firestore = firestore;
1865
+ _this.userSearchFirestoreRepository = userSearchFirestoreRepository;
1866
+ _this.collectionName = 'users';
1867
+ _this.model = User;
1868
+ return _this;
1869
+ }
1870
+ UserFirestoreRepository.prototype.get = function (identifiers) {
1871
+ var _super = Object.create(null, {
1872
+ get: { get: function () { return _super_1.prototype.get; } }
1873
+ });
1874
+ return __awaiter(this, void 0, void 0, function () {
1875
+ var user, _a, _b;
1876
+ return __generator(this, function (_c) {
1877
+ switch (_c.label) {
1878
+ case 0: return [4 /*yield*/, _super.get.call(this, { id: identifiers.id })];
1879
+ case 1:
1880
+ user = _c.sent();
1881
+ _a = user;
1882
+ return [4 /*yield*/, this.getBeautyProfile(user.id)];
1883
+ case 2:
1884
+ _a.beautyProfile = _c.sent();
1885
+ _b = user;
1886
+ return [4 /*yield*/, this.checkIfIsSubscriber(user.id)];
1887
+ case 3:
1888
+ _b.isSubscriber = _c.sent();
1889
+ return [2 /*return*/, user];
1890
+ }
1891
+ });
1892
+ });
1893
+ };
1894
+ UserFirestoreRepository.prototype.checkIfExistsByField = function (field, value) {
1895
+ return __awaiter(this, void 0, void 0, function () {
1896
+ var result;
1897
+ var _a;
1898
+ return __generator(this, function (_b) {
1899
+ switch (_b.label) {
1900
+ case 0: return [4 /*yield*/, this.userSearchFirestoreRepository.find([(_a = {}, _a[field] = { operator: exports.Where.EQUALS, value: value }, _a)])];
1901
+ case 1:
1902
+ result = _b.sent();
1903
+ return [2 /*return*/, result.count > 0];
1904
+ }
1905
+ });
1906
+ });
1907
+ };
1908
+ UserFirestoreRepository.prototype.buildModelInstance = function () {
1909
+ var _a = _super_1.prototype.buildModelInstance.call(this), fromFirestore = _a.fromFirestore, toFirestore = _a.toFirestore;
1910
+ return {
1911
+ toFirestore: function (data) {
1912
+ var plain = toFirestore(data);
1913
+ delete plain.isSubscriber;
1914
+ return plain;
1915
+ },
1916
+ fromFirestore: fromFirestore,
1917
+ };
1918
+ };
1919
+ UserFirestoreRepository.prototype.getBeautyProfile = function (userId) {
1920
+ return __awaiter(this, void 0, void 0, function () {
1921
+ var beautyProfile;
1922
+ return __generator(this, function (_a) {
1923
+ switch (_a.label) {
1924
+ case 0: return [4 /*yield*/, this.collection()
1925
+ .doc(userId)
1926
+ .collection('CX')
1927
+ .withConverter(this.buildBeautyProfileModelInstance())
1928
+ .doc('beautyProfile')
1929
+ .get()];
1930
+ case 1:
1931
+ beautyProfile = _a.sent();
1932
+ return [2 /*return*/, beautyProfile.data()];
1933
+ }
1934
+ });
1935
+ });
1936
+ };
1937
+ UserFirestoreRepository.prototype.checkIfIsSubscriber = function (userId) {
1938
+ return __awaiter(this, void 0, void 0, function () {
1939
+ var docs;
1940
+ return __generator(this, function (_a) {
1941
+ switch (_a.label) {
1942
+ case 0: return [4 /*yield*/, this.firestore
1943
+ .collection('subscription')
1944
+ .where('user.id', '==', userId)
1945
+ .where('status', '==', 'active')
1946
+ .get()];
1947
+ case 1:
1948
+ docs = _a.sent();
1949
+ return [2 /*return*/, !!docs && !!docs.size];
1950
+ }
1951
+ });
1952
+ });
1953
+ };
1954
+ UserFirestoreRepository.prototype.buildBeautyProfileModelInstance = function () {
1955
+ return {
1956
+ toFirestore: function (data) { return data.toPlain(); },
1957
+ fromFirestore: function (snap) { return BeautyProfile.toInstance(snap.data()); },
1958
+ };
1959
+ };
1960
+ return UserFirestoreRepository;
2090
1961
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2091
1962
 
2092
- var SubscriptionEditionFirestoreRepository = /** @class */ (function (_super) {
2093
- __extends(SubscriptionEditionFirestoreRepository, _super);
2094
- function SubscriptionEditionFirestoreRepository(firestore, parentRepository) {
2095
- var _this = _super.call(this) || this;
2096
- _this.firestore = firestore;
2097
- _this.parentRepository = parentRepository;
2098
- _this.collectionName = 'editions';
2099
- _this.parentIdField = 'subscriptionId';
2100
- _this.model = Edition;
2101
- return _this;
2102
- }
2103
- return SubscriptionEditionFirestoreRepository;
1963
+ var SubscriptionEditionFirestoreRepository = /** @class */ (function (_super) {
1964
+ __extends(SubscriptionEditionFirestoreRepository, _super);
1965
+ function SubscriptionEditionFirestoreRepository(firestore, parentRepository) {
1966
+ var _this = _super.call(this) || this;
1967
+ _this.firestore = firestore;
1968
+ _this.parentRepository = parentRepository;
1969
+ _this.collectionName = 'editions';
1970
+ _this.parentIdField = 'subscriptionId';
1971
+ _this.model = Edition;
1972
+ return _this;
1973
+ }
1974
+ return SubscriptionEditionFirestoreRepository;
2104
1975
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
2105
1976
 
2106
- var UserBeautyProfileFirestoreRepository = /** @class */ (function (_super) {
2107
- __extends(UserBeautyProfileFirestoreRepository, _super);
2108
- function UserBeautyProfileFirestoreRepository(firestore, parentRepository) {
2109
- var _this = _super.call(this) || this;
2110
- _this.firestore = firestore;
2111
- _this.parentRepository = parentRepository;
2112
- _this.collectionName = 'CX';
2113
- _this.parentIdField = 'userId';
2114
- _this.model = BeautyProfile;
2115
- return _this;
2116
- }
2117
- return UserBeautyProfileFirestoreRepository;
1977
+ var UserBeautyProfileFirestoreRepository = /** @class */ (function (_super) {
1978
+ __extends(UserBeautyProfileFirestoreRepository, _super);
1979
+ function UserBeautyProfileFirestoreRepository(firestore, parentRepository) {
1980
+ var _this = _super.call(this) || this;
1981
+ _this.firestore = firestore;
1982
+ _this.parentRepository = parentRepository;
1983
+ _this.collectionName = 'CX';
1984
+ _this.parentIdField = 'userId';
1985
+ _this.model = BeautyProfile;
1986
+ return _this;
1987
+ }
1988
+ return UserBeautyProfileFirestoreRepository;
2118
1989
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2119
1990
 
2120
- var UserAddressFirestoreRepository = /** @class */ (function (_super) {
2121
- __extends(UserAddressFirestoreRepository, _super);
2122
- function UserAddressFirestoreRepository(firestore, parentRepository) {
2123
- var _this = _super.call(this) || this;
2124
- _this.firestore = firestore;
2125
- _this.parentRepository = parentRepository;
2126
- _this.collectionName = 'address';
2127
- _this.parentIdField = 'userId';
2128
- _this.model = UserAddress;
2129
- return _this;
2130
- }
2131
- return UserAddressFirestoreRepository;
1991
+ var UserAddressFirestoreRepository = /** @class */ (function (_super) {
1992
+ __extends(UserAddressFirestoreRepository, _super);
1993
+ function UserAddressFirestoreRepository(firestore, parentRepository) {
1994
+ var _this = _super.call(this) || this;
1995
+ _this.firestore = firestore;
1996
+ _this.parentRepository = parentRepository;
1997
+ _this.collectionName = 'address';
1998
+ _this.parentIdField = 'userId';
1999
+ _this.model = UserAddress;
2000
+ return _this;
2001
+ }
2002
+ return UserAddressFirestoreRepository;
2132
2003
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2133
2004
 
2134
- var UserPaymentMethodFirestoreRepository = /** @class */ (function (_super) {
2135
- __extends(UserPaymentMethodFirestoreRepository, _super);
2136
- function UserPaymentMethodFirestoreRepository(firestore, parentRepository) {
2137
- var _this = _super.call(this) || this;
2138
- _this.firestore = firestore;
2139
- _this.parentRepository = parentRepository;
2140
- _this.collectionName = 'payment_method';
2141
- _this.parentIdField = 'userId';
2142
- _this.model = UserPaymentMethod;
2143
- return _this;
2144
- }
2145
- return UserPaymentMethodFirestoreRepository;
2005
+ var UserPaymentMethodFirestoreRepository = /** @class */ (function (_super) {
2006
+ __extends(UserPaymentMethodFirestoreRepository, _super);
2007
+ function UserPaymentMethodFirestoreRepository(firestore, parentRepository) {
2008
+ var _this = _super.call(this) || this;
2009
+ _this.firestore = firestore;
2010
+ _this.parentRepository = parentRepository;
2011
+ _this.collectionName = 'payment_method';
2012
+ _this.parentIdField = 'userId';
2013
+ _this.model = UserPaymentMethod;
2014
+ return _this;
2015
+ }
2016
+ return UserPaymentMethodFirestoreRepository;
2146
2017
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2147
2018
 
2148
- var SubscriptionPaymentFirestoreRepository = /** @class */ (function (_super) {
2149
- __extends(SubscriptionPaymentFirestoreRepository, _super);
2150
- function SubscriptionPaymentFirestoreRepository(firestore, parentRepository) {
2151
- var _this = _super.call(this) || this;
2152
- _this.firestore = firestore;
2153
- _this.parentRepository = parentRepository;
2154
- _this.collectionName = 'payments';
2155
- _this.parentIdField = 'subscriptionId';
2156
- _this.model = SubscriptionPayment;
2157
- return _this;
2158
- }
2159
- return SubscriptionPaymentFirestoreRepository;
2019
+ var SubscriptionPaymentFirestoreRepository = /** @class */ (function (_super) {
2020
+ __extends(SubscriptionPaymentFirestoreRepository, _super);
2021
+ function SubscriptionPaymentFirestoreRepository(firestore, parentRepository) {
2022
+ var _this = _super.call(this) || this;
2023
+ _this.firestore = firestore;
2024
+ _this.parentRepository = parentRepository;
2025
+ _this.collectionName = 'payments';
2026
+ _this.parentIdField = 'subscriptionId';
2027
+ _this.model = SubscriptionPayment;
2028
+ return _this;
2029
+ }
2030
+ return SubscriptionPaymentFirestoreRepository;
2160
2031
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
2161
2032
 
2162
- var LeadFirestoreRepository = /** @class */ (function (_super) {
2163
- __extends(LeadFirestoreRepository, _super);
2164
- function LeadFirestoreRepository(firestore) {
2165
- var _this = _super.call(this) || this;
2166
- _this.firestore = firestore;
2167
- _this.collectionName = 'leads';
2168
- _this.model = Lead;
2169
- return _this;
2170
- }
2171
- return LeadFirestoreRepository;
2033
+ var LeadFirestoreRepository = /** @class */ (function (_super) {
2034
+ __extends(LeadFirestoreRepository, _super);
2035
+ function LeadFirestoreRepository(firestore) {
2036
+ var _this = _super.call(this) || this;
2037
+ _this.firestore = firestore;
2038
+ _this.collectionName = 'leads';
2039
+ _this.model = Lead;
2040
+ return _this;
2041
+ }
2042
+ return LeadFirestoreRepository;
2172
2043
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2173
2044
 
2174
- var CategoryFirestoreRepository = /** @class */ (function (_super) {
2175
- __extends(CategoryFirestoreRepository, _super);
2176
- function CategoryFirestoreRepository(firestore) {
2177
- var _this = _super.call(this) || this;
2178
- _this.firestore = firestore;
2179
- _this.collectionName = 'categories';
2180
- _this.model = Category;
2181
- return _this;
2182
- }
2183
- CategoryFirestoreRepository.prototype.getCategoryBySlug = function (slug, shop) {
2184
- return this.collection(this.collectionName)
2185
- .where('slug', '==', slug)
2186
- .where('shop', '==', shop)
2187
- .where('published', '==', true)
2188
- .get()
2189
- .then(function (snap) {
2190
- if (snap.size > 1)
2191
- throw new DuplicatedResultsError('Query returned duplicated values');
2192
- if (snap.empty)
2193
- throw new NotFoundError("Document with slug " + slug + " not found");
2194
- return snap.docs[0].data();
2195
- })
2196
- .catch(function (error) { return error; });
2197
- };
2198
- CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit) {
2199
- if (limit === void 0) { limit = 4; }
2200
- return __awaiter(this, void 0, void 0, function () {
2201
- var categorySnap, categories, homeSections;
2202
- var _this = this;
2203
- return __generator(this, function (_a) {
2204
- switch (_a.label) {
2205
- case 0: return [4 /*yield*/, this.collection(this.collectionName)
2206
- .where('id', 'in', categoryIds.filter(Boolean))
2207
- .where('published', '==', true)
2208
- .get()];
2209
- case 1:
2210
- categorySnap = _a.sent();
2211
- if (categorySnap.empty)
2212
- throw new NotFoundError('Categories not found');
2213
- categories = categorySnap.docs.map(function (doc) { return doc.data(); });
2214
- return [4 /*yield*/, Promise.all(categories.map(function (category) { return __awaiter(_this, void 0, void 0, function () {
2215
- var _a;
2216
- return __generator(this, function (_b) {
2217
- switch (_b.label) {
2218
- case 0:
2219
- _a = {
2220
- category: category
2221
- };
2222
- return [4 /*yield*/, this.mountCategory(category, { limit: limit, hasStock: true })];
2223
- case 1: return [2 /*return*/, (_a.products = _b.sent(),
2224
- _a)];
2225
- }
2226
- });
2227
- }); }))];
2228
- case 2:
2229
- homeSections = _a.sent();
2230
- return [2 /*return*/, homeSections];
2231
- }
2232
- });
2233
- });
2234
- };
2235
- CategoryFirestoreRepository.prototype.mountCategory = function (category, options) {
2236
- return __awaiter(this, void 0, void 0, function () {
2237
- var chunks, products, publishedField, chunks_1, chunks_1_1, productIds, query, productSnap, e_1_1;
2238
- var e_1, _a;
2239
- return __generator(this, function (_b) {
2240
- switch (_b.label) {
2241
- case 0:
2242
- if (!category.products)
2243
- throw new RequiredArgumentError(['Category products is empty']);
2244
- chunks = lodash.chunk(category.products, 10);
2245
- products = [];
2246
- publishedField = category.shop === exports.Shops.GLAMSHOP ? 'publishedGlam' : 'published';
2247
- _b.label = 1;
2248
- case 1:
2249
- _b.trys.push([1, 7, 8, 9]);
2250
- chunks_1 = __values(chunks), chunks_1_1 = chunks_1.next();
2251
- _b.label = 2;
2252
- case 2:
2253
- if (!!chunks_1_1.done) return [3 /*break*/, 6];
2254
- productIds = chunks_1_1.value;
2255
- if ((options === null || options === void 0 ? void 0 : options.limit) && products.length >= (options === null || options === void 0 ? void 0 : options.limit))
2256
- return [3 /*break*/, 6];
2257
- return [4 /*yield*/, this.collection('productsErpVitrine')
2258
- .where(publishedField, '==', true)
2259
- .where('id', 'in', productIds)];
2260
- case 3:
2261
- query = _b.sent();
2262
- if (options === null || options === void 0 ? void 0 : options.hasStock)
2263
- query = query.where('stock.quantity', '>', 0);
2264
- if (options === null || options === void 0 ? void 0 : options.limit)
2265
- query = query.limit(options === null || options === void 0 ? void 0 : options.limit);
2266
- return [4 /*yield*/, query.get()];
2267
- case 4:
2268
- productSnap = _b.sent();
2269
- if (productSnap.empty)
2270
- return [3 /*break*/, 5];
2271
- products.push.apply(products, __spreadArray([], __read(productSnap.docs.map(function (doc) { return doc.data(); }))));
2272
- _b.label = 5;
2273
- case 5:
2274
- chunks_1_1 = chunks_1.next();
2275
- return [3 /*break*/, 2];
2276
- case 6: return [3 /*break*/, 9];
2277
- case 7:
2278
- e_1_1 = _b.sent();
2279
- e_1 = { error: e_1_1 };
2280
- return [3 /*break*/, 9];
2281
- case 8:
2282
- try {
2283
- if (chunks_1_1 && !chunks_1_1.done && (_a = chunks_1.return)) _a.call(chunks_1);
2284
- }
2285
- finally { if (e_1) throw e_1.error; }
2286
- return [7 /*endfinally*/];
2287
- case 9: return [2 /*return*/, products];
2288
- }
2289
- });
2290
- });
2291
- };
2292
- return CategoryFirestoreRepository;
2045
+ var CategoryFirestoreRepository = /** @class */ (function (_super) {
2046
+ __extends(CategoryFirestoreRepository, _super);
2047
+ function CategoryFirestoreRepository(firestore) {
2048
+ var _this = _super.call(this) || this;
2049
+ _this.firestore = firestore;
2050
+ _this.collectionName = 'categories';
2051
+ _this.model = Category;
2052
+ return _this;
2053
+ }
2054
+ CategoryFirestoreRepository.prototype.getCategoryBySlug = function (slug, shop) {
2055
+ return this.collection(this.collectionName)
2056
+ .where('slug', '==', slug)
2057
+ .where('shop', '==', shop)
2058
+ .where('published', '==', true)
2059
+ .get()
2060
+ .then(function (snap) {
2061
+ if (snap.size > 1)
2062
+ throw new DuplicatedResultsError('Query returned duplicated values');
2063
+ if (snap.empty)
2064
+ throw new NotFoundError("Document with slug " + slug + " not found");
2065
+ return snap.docs[0].data();
2066
+ })
2067
+ .catch(function (error) { return error; });
2068
+ };
2069
+ CategoryFirestoreRepository.prototype.getCategoriesForHome = function (categoryIds, limit) {
2070
+ if (limit === void 0) { limit = 4; }
2071
+ return __awaiter(this, void 0, void 0, function () {
2072
+ var categorySnap, categories, homeSections, categories_1, categories_1_1, category, publishedField, productSnap, products, e_1_1;
2073
+ var e_1, _a;
2074
+ return __generator(this, function (_b) {
2075
+ switch (_b.label) {
2076
+ case 0: return [4 /*yield*/, this.collection(this.collectionName)
2077
+ .where('id', 'in', categoryIds)
2078
+ .where('published', '==', true)
2079
+ .get()];
2080
+ case 1:
2081
+ categorySnap = _b.sent();
2082
+ if (categorySnap.empty)
2083
+ throw new NotFoundError('Categories not found');
2084
+ categories = categorySnap.docs.map(function (doc) { return doc.data(); });
2085
+ homeSections = [];
2086
+ _b.label = 2;
2087
+ case 2:
2088
+ _b.trys.push([2, 7, 8, 9]);
2089
+ categories_1 = __values(categories), categories_1_1 = categories_1.next();
2090
+ _b.label = 3;
2091
+ case 3:
2092
+ if (!!categories_1_1.done) return [3 /*break*/, 6];
2093
+ category = categories_1_1.value;
2094
+ publishedField = category.shop === exports.Shops.GLAMSHOP ? 'publishedGlam' : 'published';
2095
+ return [4 /*yield*/, this.collection('products')
2096
+ .where('categories', 'array-contains', category.id)
2097
+ .where(publishedField, '==', true)
2098
+ .where('stock.quantity', '>', 1)
2099
+ .limit(limit)
2100
+ .get()];
2101
+ case 4:
2102
+ productSnap = _b.sent();
2103
+ products = productSnap.docs.map(function (doc) { return doc.data(); });
2104
+ homeSections.push({ category: category, products: products });
2105
+ _b.label = 5;
2106
+ case 5:
2107
+ categories_1_1 = categories_1.next();
2108
+ return [3 /*break*/, 3];
2109
+ case 6: return [3 /*break*/, 9];
2110
+ case 7:
2111
+ e_1_1 = _b.sent();
2112
+ e_1 = { error: e_1_1 };
2113
+ return [3 /*break*/, 9];
2114
+ case 8:
2115
+ try {
2116
+ if (categories_1_1 && !categories_1_1.done && (_a = categories_1.return)) _a.call(categories_1);
2117
+ }
2118
+ finally { if (e_1) throw e_1.error; }
2119
+ return [7 /*endfinally*/];
2120
+ case 9: return [2 /*return*/, homeSections];
2121
+ }
2122
+ });
2123
+ });
2124
+ };
2125
+ CategoryFirestoreRepository.prototype.mountCategory = function (category) {
2126
+ return __awaiter(this, void 0, void 0, function () {
2127
+ var chunks, products, publishedField;
2128
+ var _this = this;
2129
+ return __generator(this, function (_a) {
2130
+ switch (_a.label) {
2131
+ case 0:
2132
+ if (!category.products)
2133
+ throw new RequiredArgumentError(['Category products is empty']);
2134
+ chunks = category.products.reduce(function (resultArray, item, index) {
2135
+ var chunkIndex = Math.floor(index / 10);
2136
+ if (!resultArray[chunkIndex])
2137
+ resultArray[chunkIndex] = [];
2138
+ resultArray[chunkIndex].push(item);
2139
+ return resultArray;
2140
+ }, []);
2141
+ products = [];
2142
+ publishedField = category.shop === exports.Shops.GLAMSHOP ? 'publishedGlam' : 'published';
2143
+ return [4 /*yield*/, Promise.all(chunks.map(function (productIds) { return __awaiter(_this, void 0, void 0, function () {
2144
+ var productSnap;
2145
+ return __generator(this, function (_a) {
2146
+ switch (_a.label) {
2147
+ case 0: return [4 /*yield*/, this.collection('products')
2148
+ .where(publishedField, '==', true)
2149
+ .where('id', 'in', productIds)
2150
+ .get()];
2151
+ case 1:
2152
+ productSnap = _a.sent();
2153
+ if (productSnap.empty)
2154
+ return [2 /*return*/];
2155
+ products.push.apply(products, __spreadArray([], __read(productSnap.docs.map(function (doc) { return doc.data(); }))));
2156
+ return [2 /*return*/];
2157
+ }
2158
+ });
2159
+ }); }))];
2160
+ case 1:
2161
+ _a.sent();
2162
+ return [2 /*return*/, products];
2163
+ }
2164
+ });
2165
+ });
2166
+ };
2167
+ return CategoryFirestoreRepository;
2293
2168
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2294
2169
 
2295
- var ProductFirestoreRepository = /** @class */ (function (_super) {
2296
- __extends(ProductFirestoreRepository, _super);
2297
- function ProductFirestoreRepository(firestore) {
2298
- var _this = _super.call(this) || this;
2299
- _this.firestore = firestore;
2300
- _this.collectionName = 'productsErpVitrine';
2301
- _this.model = Product;
2302
- return _this;
2303
- }
2304
- ProductFirestoreRepository.prototype.getBySlug = function (slug, shop) {
2305
- var _a;
2306
- return __awaiter(this, void 0, void 0, function () {
2307
- var result;
2308
- return __generator(this, function (_b) {
2309
- switch (_b.label) {
2310
- case 0: return [4 /*yield*/, this.find([
2311
- { slug: { operator: exports.Where.EQUALS, value: slug } },
2312
- { shopAvailability: { operator: exports.Where.IN, value: [shop] } },
2313
- ])];
2314
- case 1:
2315
- result = _b.sent();
2316
- return [2 /*return*/, (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.shift()];
2317
- }
2318
- });
2319
- });
2320
- };
2321
- return ProductFirestoreRepository;
2170
+ var ProductFirestoreRepository = /** @class */ (function (_super) {
2171
+ __extends(ProductFirestoreRepository, _super);
2172
+ function ProductFirestoreRepository(firestore) {
2173
+ var _this = _super.call(this) || this;
2174
+ _this.firestore = firestore;
2175
+ _this.collectionName = 'products';
2176
+ _this.model = Product;
2177
+ return _this;
2178
+ }
2179
+ ProductFirestoreRepository.prototype.getBySlug = function (slug, shop) {
2180
+ var _a;
2181
+ return __awaiter(this, void 0, void 0, function () {
2182
+ var result;
2183
+ return __generator(this, function (_b) {
2184
+ switch (_b.label) {
2185
+ case 0: return [4 /*yield*/, this.find([
2186
+ { slug: { operator: exports.Where.EQUALS, value: slug } },
2187
+ { shopAvailability: { operator: exports.Where.IN, value: [shop] } },
2188
+ ])];
2189
+ case 1:
2190
+ result = _b.sent();
2191
+ return [2 /*return*/, (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.shift()];
2192
+ }
2193
+ });
2194
+ });
2195
+ };
2196
+ return ProductFirestoreRepository;
2322
2197
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2323
2198
 
2324
- var ProductVariantFirestoreRepository = /** @class */ (function (_super) {
2325
- __extends(ProductVariantFirestoreRepository, _super);
2326
- function ProductVariantFirestoreRepository(firestore, parentRepository) {
2327
- var _this = _super.call(this) || this;
2328
- _this.firestore = firestore;
2329
- _this.parentRepository = parentRepository;
2330
- _this.collectionName = 'variants';
2331
- _this.parentIdField = 'productId';
2332
- _this.model = Variant;
2333
- return _this;
2334
- }
2335
- return ProductVariantFirestoreRepository;
2199
+ var ProductVariantFirestoreRepository = /** @class */ (function (_super) {
2200
+ __extends(ProductVariantFirestoreRepository, _super);
2201
+ function ProductVariantFirestoreRepository(firestore, parentRepository) {
2202
+ var _this = _super.call(this) || this;
2203
+ _this.firestore = firestore;
2204
+ _this.parentRepository = parentRepository;
2205
+ _this.collectionName = 'variants';
2206
+ _this.parentIdField = 'productId';
2207
+ _this.model = Variant;
2208
+ return _this;
2209
+ }
2210
+ return ProductVariantFirestoreRepository;
2336
2211
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Product)));
2337
2212
 
2338
- var SubscriptionProductFirestoreRepository = /** @class */ (function (_super) {
2339
- __extends(SubscriptionProductFirestoreRepository, _super);
2340
- function SubscriptionProductFirestoreRepository(firestore) {
2341
- var _this = _super.call(this) || this;
2342
- _this.firestore = firestore;
2343
- _this.collectionName = 'subscriptionProducts';
2344
- _this.model = Product;
2345
- return _this;
2346
- }
2347
- return SubscriptionProductFirestoreRepository;
2213
+ var SubscriptionProductFirestoreRepository = /** @class */ (function (_super) {
2214
+ __extends(SubscriptionProductFirestoreRepository, _super);
2215
+ function SubscriptionProductFirestoreRepository(firestore) {
2216
+ var _this = _super.call(this) || this;
2217
+ _this.firestore = firestore;
2218
+ _this.collectionName = 'subscriptionProducts';
2219
+ _this.model = Product;
2220
+ return _this;
2221
+ }
2222
+ return SubscriptionProductFirestoreRepository;
2348
2223
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2349
2224
 
2350
- var CheckoutFirestoreRepository = /** @class */ (function (_super) {
2351
- __extends(CheckoutFirestoreRepository, _super);
2352
- function CheckoutFirestoreRepository(firestore) {
2353
- var _this = _super.call(this) || this;
2354
- _this.firestore = firestore;
2355
- _this.collectionName = 'checkouts';
2356
- _this.model = Checkout;
2357
- return _this;
2358
- }
2359
- return CheckoutFirestoreRepository;
2225
+ var CheckoutFirestoreRepository = /** @class */ (function (_super) {
2226
+ __extends(CheckoutFirestoreRepository, _super);
2227
+ function CheckoutFirestoreRepository(firestore) {
2228
+ var _this = _super.call(this) || this;
2229
+ _this.firestore = firestore;
2230
+ _this.collectionName = 'checkouts';
2231
+ _this.model = Checkout;
2232
+ return _this;
2233
+ }
2234
+ return CheckoutFirestoreRepository;
2360
2235
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2361
2236
 
2362
- var CouponFirestoreRepository = /** @class */ (function (_super) {
2363
- __extends(CouponFirestoreRepository, _super);
2364
- function CouponFirestoreRepository(firestore) {
2365
- var _this = _super.call(this) || this;
2366
- _this.firestore = firestore;
2367
- _this.collectionName = 'coupons';
2368
- _this.model = Coupon;
2369
- return _this;
2370
- }
2371
- CouponFirestoreRepository.prototype.buildModelInstance = function () {
2372
- var _a = _super.prototype.buildModelInstance.call(this), fromFirestore = _a.fromFirestore, toFirestore = _a.toFirestore;
2373
- return {
2374
- toFirestore: function (data) {
2375
- var plain = toFirestore(data);
2376
- if (!!data.expiresIn)
2377
- plain.expiresIn = data.expiresIn.getTime();
2378
- return plain;
2379
- },
2380
- fromFirestore: function (snap) {
2381
- var instance = fromFirestore(snap);
2382
- if (!lodash.isNil(instance.expiresIn))
2383
- instance.expiresIn = new Date(snap.data().expiresIn);
2384
- return instance;
2385
- },
2386
- };
2387
- };
2388
- return CouponFirestoreRepository;
2237
+ var CouponFirestoreRepository = /** @class */ (function (_super) {
2238
+ __extends(CouponFirestoreRepository, _super);
2239
+ function CouponFirestoreRepository(firestore) {
2240
+ var _this = _super.call(this) || this;
2241
+ _this.firestore = firestore;
2242
+ _this.collectionName = 'coupons';
2243
+ _this.model = Coupon;
2244
+ return _this;
2245
+ }
2246
+ CouponFirestoreRepository.prototype.buildModelInstance = function () {
2247
+ var _this = this;
2248
+ return {
2249
+ toFirestore: function (data) {
2250
+ var _a;
2251
+ var plain = (data === null || data === void 0 ? void 0 : data.toPlain) ? data.toPlain() : data;
2252
+ if (!!plain.categories)
2253
+ plain.categories = (_a = plain === null || plain === void 0 ? void 0 : plain.categories) === null || _a === void 0 ? void 0 : _a.map(function (category) { return category.id; });
2254
+ return plain;
2255
+ },
2256
+ fromFirestore: function (snap) {
2257
+ var _a;
2258
+ var data = snap.data();
2259
+ Object.keys(data).forEach(function (key) {
2260
+ if (data[key] instanceof firebase__default["default"].firestore.Timestamp) {
2261
+ data[key] = data[key].toDate();
2262
+ }
2263
+ });
2264
+ data.categories = (_a = data === null || data === void 0 ? void 0 : data.categories) === null || _a === void 0 ? void 0 : _a.map(function (category) { return ({ id: category }); });
2265
+ if (data.checkout_type === exports.CheckoutTypes.SUBSCRIPTION)
2266
+ return ClubCoupon.toInstance(Object.assign({ id: snap.id }, data));
2267
+ if (data.checkout_type === exports.CheckoutTypes.ECOMMERCE)
2268
+ return StoreCoupon.toInstance(Object.assign({ id: snap.id }, data));
2269
+ return _this.model.toInstance(Object.assign({ id: snap.id }, data));
2270
+ },
2271
+ };
2272
+ };
2273
+ return CouponFirestoreRepository;
2389
2274
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2390
2275
 
2391
- var OrderFirestoreRepository = /** @class */ (function (_super) {
2392
- __extends(OrderFirestoreRepository, _super);
2393
- function OrderFirestoreRepository(firestore) {
2394
- var _this = _super.call(this) || this;
2395
- _this.firestore = firestore;
2396
- _this.collectionName = 'orders';
2397
- _this.model = Order;
2398
- return _this;
2399
- }
2400
- return OrderFirestoreRepository;
2276
+ var OrderFirestoreRepository = /** @class */ (function (_super) {
2277
+ __extends(OrderFirestoreRepository, _super);
2278
+ function OrderFirestoreRepository(firestore) {
2279
+ var _this = _super.call(this) || this;
2280
+ _this.firestore = firestore;
2281
+ _this.collectionName = 'orders';
2282
+ _this.model = Order;
2283
+ return _this;
2284
+ }
2285
+ return OrderFirestoreRepository;
2401
2286
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2402
2287
 
2403
- var PaymentFirestoreRepository = /** @class */ (function (_super) {
2404
- __extends(PaymentFirestoreRepository, _super);
2405
- function PaymentFirestoreRepository(firestore) {
2406
- var _this = _super.call(this) || this;
2407
- _this.firestore = firestore;
2408
- _this.collectionName = 'payments';
2409
- _this.model = Payment;
2410
- return _this;
2411
- }
2412
- return PaymentFirestoreRepository;
2288
+ var PaymentFirestoreRepository = /** @class */ (function (_super) {
2289
+ __extends(PaymentFirestoreRepository, _super);
2290
+ function PaymentFirestoreRepository(firestore) {
2291
+ var _this = _super.call(this) || this;
2292
+ _this.firestore = firestore;
2293
+ _this.collectionName = 'payments';
2294
+ _this.model = Payment;
2295
+ return _this;
2296
+ }
2297
+ return PaymentFirestoreRepository;
2413
2298
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2414
2299
 
2415
- var CheckoutSubscriptionFirestoreRepository = /** @class */ (function (_super) {
2416
- __extends(CheckoutSubscriptionFirestoreRepository, _super);
2417
- function CheckoutSubscriptionFirestoreRepository(firestore) {
2418
- var _this = _super.call(this) || this;
2419
- _this.firestore = firestore;
2420
- _this.collectionName = 'checkoutsSubscription';
2421
- _this.model = CheckoutSubscription;
2422
- return _this;
2423
- }
2424
- return CheckoutSubscriptionFirestoreRepository;
2300
+ var CheckoutSubscriptionFirestoreRepository = /** @class */ (function (_super) {
2301
+ __extends(CheckoutSubscriptionFirestoreRepository, _super);
2302
+ function CheckoutSubscriptionFirestoreRepository(firestore) {
2303
+ var _this = _super.call(this) || this;
2304
+ _this.firestore = firestore;
2305
+ _this.collectionName = 'checkoutsSubscription';
2306
+ _this.model = CheckoutSubscription;
2307
+ return _this;
2308
+ }
2309
+ return CheckoutSubscriptionFirestoreRepository;
2425
2310
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2426
2311
 
2427
- var SubscriptionPlanFirestoreRepository = /** @class */ (function (_super) {
2428
- __extends(SubscriptionPlanFirestoreRepository, _super);
2429
- function SubscriptionPlanFirestoreRepository(firestore) {
2430
- var _this = _super.call(this) || this;
2431
- _this.firestore = firestore;
2432
- _this.collectionName = 'subscriptionPlans';
2433
- _this.model = SubscriptionPlan;
2434
- return _this;
2435
- }
2436
- return SubscriptionPlanFirestoreRepository;
2312
+ var SubscriptionPlanFirestoreRepository = /** @class */ (function (_super) {
2313
+ __extends(SubscriptionPlanFirestoreRepository, _super);
2314
+ function SubscriptionPlanFirestoreRepository(firestore) {
2315
+ var _this = _super.call(this) || this;
2316
+ _this.firestore = firestore;
2317
+ _this.collectionName = 'subscriptionPlans';
2318
+ _this.model = SubscriptionPlan;
2319
+ return _this;
2320
+ }
2321
+ return SubscriptionPlanFirestoreRepository;
2437
2322
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2438
2323
 
2439
- var Buy2WinFirestoreRepository = /** @class */ (function (_super) {
2440
- __extends(Buy2WinFirestoreRepository, _super);
2441
- function Buy2WinFirestoreRepository(firestore) {
2442
- var _this = _super.call(this) || this;
2443
- _this.firestore = firestore;
2444
- _this.collectionName = 'buy2win';
2445
- _this.model = Buy2Win;
2446
- return _this;
2447
- }
2448
- return Buy2WinFirestoreRepository;
2324
+ var Buy2WinFirestoreRepository = /** @class */ (function (_super) {
2325
+ __extends(Buy2WinFirestoreRepository, _super);
2326
+ function Buy2WinFirestoreRepository(firestore) {
2327
+ var _this = _super.call(this) || this;
2328
+ _this.firestore = firestore;
2329
+ _this.collectionName = 'buy2win';
2330
+ _this.model = Buy2Win;
2331
+ return _this;
2332
+ }
2333
+ return Buy2WinFirestoreRepository;
2449
2334
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2450
2335
 
2451
- var LegacyOrderFirestoreRepository = /** @class */ (function (_super) {
2452
- __extends(LegacyOrderFirestoreRepository, _super);
2453
- function LegacyOrderFirestoreRepository(firestore) {
2454
- var _this = _super.call(this, firestore) || this;
2455
- _this.firestore = firestore;
2456
- _this.collectionName = 'legacyOrders';
2457
- return _this;
2458
- }
2459
- return LegacyOrderFirestoreRepository;
2336
+ var LegacyOrderFirestoreRepository = /** @class */ (function (_super) {
2337
+ __extends(LegacyOrderFirestoreRepository, _super);
2338
+ function LegacyOrderFirestoreRepository(firestore) {
2339
+ var _this = _super.call(this, firestore) || this;
2340
+ _this.firestore = firestore;
2341
+ _this.collectionName = 'legacyOrders';
2342
+ return _this;
2343
+ }
2344
+ return LegacyOrderFirestoreRepository;
2460
2345
  }(OrderFirestoreRepository));
2461
2346
 
2462
- var HomeFirestoreRepository = /** @class */ (function (_super) {
2463
- __extends(HomeFirestoreRepository, _super);
2464
- function HomeFirestoreRepository(firestore) {
2465
- var _this = _super.call(this) || this;
2466
- _this.firestore = firestore;
2467
- _this.homeToFirestore = function (home) {
2468
- var _a;
2469
- if ((_a = home.data) === null || _a === void 0 ? void 0 : _a.data) {
2470
- home.data.data.discoverProducts = home.data.data.discoverProducts.map(_this.homeCategoryGroupToPlain);
2471
- home.data.data.featuredProducts = home.data.data.featuredProducts.map(_this.homeCategoryGroupToPlain);
2472
- home.data.data.verticalProducts = home.data.data.verticalProducts.map(_this.homeCategoryGroupToPlain);
2473
- }
2474
- return home;
2475
- };
2476
- _this.homeCategoryGroupToPlain = function (homeCategoryGroup) { return ({
2477
- category: homeCategoryGroup.category.toPlain(),
2478
- products: homeCategoryGroup.products.map(function (product) { return product.toPlain(); }),
2479
- }); };
2480
- _this.homeFromFirestore = function (home) {
2481
- var _a;
2482
- if ((_a = home.data) === null || _a === void 0 ? void 0 : _a.data) {
2483
- home.data.data.discoverProducts = home.data.data.discoverProducts.map(_this.plainToHomeCategoryGroup);
2484
- home.data.data.featuredProducts = home.data.data.featuredProducts.map(_this.plainToHomeCategoryGroup);
2485
- home.data.data.verticalProducts = home.data.data.verticalProducts.map(_this.plainToHomeCategoryGroup);
2486
- home.data.createdAt =
2487
- home.data.createdAt instanceof firebase__default["default"].firestore.Timestamp ? home.data.createdAt.toDate() : home.data.createdAt;
2488
- home.data.expiresAt =
2489
- home.data.expiresAt instanceof firebase__default["default"].firestore.Timestamp ? home.data.expiresAt.toDate() : home.data.expiresAt;
2490
- }
2491
- return home;
2492
- };
2493
- _this.plainToHomeCategoryGroup = function (homeCategoryGroup) { return ({
2494
- category: Category.toInstance(homeCategoryGroup.category),
2495
- products: homeCategoryGroup.products.map(function (product) { return Product.toInstance(product); }),
2496
- }); };
2497
- _this.collectionName = 'dms';
2498
- _this.model = Home;
2499
- return _this;
2500
- }
2501
- HomeFirestoreRepository.prototype.buildModelInstance = function () {
2502
- var _this = this;
2503
- var _b = _super.prototype.buildModelInstance.call(this), fromFirestore = _b.fromFirestore, toFirestore = _b.toFirestore;
2504
- return {
2505
- toFirestore: function (data) {
2506
- var modifiedData = _this.homeToFirestore(data);
2507
- return toFirestore(modifiedData);
2508
- },
2509
- fromFirestore: function (snap) {
2510
- var instance = fromFirestore(snap);
2511
- return _this.homeFromFirestore(instance);
2512
- },
2513
- };
2514
- };
2515
- return HomeFirestoreRepository;
2516
- }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2517
-
2518
- var ShopMenuFirestoreRepository = /** @class */ (function (_super) {
2519
- __extends(ShopMenuFirestoreRepository, _super);
2520
- function ShopMenuFirestoreRepository(firestore) {
2521
- var _this = _super.call(this) || this;
2522
- _this.firestore = firestore;
2523
- _this.collectionName = 'shopMenus';
2524
- _this.model = ShopMenu;
2525
- return _this;
2526
- }
2527
- return ShopMenuFirestoreRepository;
2347
+ var HomeFirestoreRepository = /** @class */ (function (_super) {
2348
+ __extends(HomeFirestoreRepository, _super);
2349
+ function HomeFirestoreRepository(firestore) {
2350
+ var _this = _super.call(this) || this;
2351
+ _this.firestore = firestore;
2352
+ _this.collectionName = 'dms';
2353
+ _this.model = Home;
2354
+ return _this;
2355
+ }
2356
+ return HomeFirestoreRepository;
2528
2357
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2529
2358
 
2530
- var ShopSettingsFirestoreRepository = /** @class */ (function (_super) {
2531
- __extends(ShopSettingsFirestoreRepository, _super);
2532
- function ShopSettingsFirestoreRepository(firestore) {
2533
- var _this = _super.call(this) || this;
2534
- _this.firestore = firestore;
2535
- _this.collectionName = 'shopSettings';
2536
- _this.model = ShopSettings;
2537
- return _this;
2538
- }
2539
- return ShopSettingsFirestoreRepository;
2359
+ var ShopMenuFirestoreRepository = /** @class */ (function (_super) {
2360
+ __extends(ShopMenuFirestoreRepository, _super);
2361
+ function ShopMenuFirestoreRepository(firestore) {
2362
+ var _this = _super.call(this) || this;
2363
+ _this.firestore = firestore;
2364
+ _this.collectionName = 'shopMenus';
2365
+ _this.model = ShopMenu;
2366
+ return _this;
2367
+ }
2368
+ return ShopMenuFirestoreRepository;
2540
2369
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2541
2370
 
2542
- var AuthenticationFirebaseAuthService = /** @class */ (function () {
2543
- function AuthenticationFirebaseAuthService(firebaseAuth) {
2544
- this.firebaseAuth = firebaseAuth;
2545
- }
2546
- AuthenticationFirebaseAuthService.prototype.signInWithEmailAndPassword = function (data) {
2547
- return __awaiter(this, void 0, void 0, function () {
2548
- var credentials, user;
2549
- return __generator(this, function (_a) {
2550
- switch (_a.label) {
2551
- case 0: return [4 /*yield*/, this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)];
2552
- case 1:
2553
- credentials = _a.sent();
2554
- user = credentials.user;
2555
- return [2 /*return*/, {
2556
- id: user.uid,
2557
- displayName: user.displayName,
2558
- email: user.email,
2559
- phone: user.phoneNumber,
2560
- isAnonymous: false,
2561
- }];
2562
- }
2563
- });
2564
- });
2565
- };
2566
- AuthenticationFirebaseAuthService.prototype.signInWithGoogle = function () {
2567
- return __awaiter(this, void 0, void 0, function () {
2568
- var credentials, user;
2569
- return __generator(this, function (_a) {
2570
- switch (_a.label) {
2571
- case 0: return [4 /*yield*/, this.firebaseAuth.signInWithPopup(new firebase__default$1["default"].auth.GoogleAuthProvider())];
2572
- case 1:
2573
- credentials = _a.sent();
2574
- user = credentials.user;
2575
- return [2 /*return*/, {
2576
- id: user.uid,
2577
- displayName: user.displayName,
2578
- email: user.email,
2579
- phone: user.phoneNumber,
2580
- isAnonymous: false,
2581
- }];
2582
- }
2583
- });
2584
- });
2585
- };
2586
- AuthenticationFirebaseAuthService.prototype.signOut = function () {
2587
- return __awaiter(this, void 0, void 0, function () {
2588
- return __generator(this, function (_a) {
2589
- this.firebaseAuth.signOut();
2590
- return [2 /*return*/];
2591
- });
2592
- });
2593
- };
2594
- AuthenticationFirebaseAuthService.prototype.signInAnonymously = function () {
2595
- return __awaiter(this, void 0, void 0, function () {
2596
- var auth, user;
2597
- return __generator(this, function (_a) {
2598
- switch (_a.label) {
2599
- case 0: return [4 /*yield*/, this.firebaseAuth.signInAnonymously()];
2600
- case 1:
2601
- auth = _a.sent();
2602
- user = auth.user;
2603
- user.id = auth.user.uid;
2604
- return [2 /*return*/, user];
2605
- }
2606
- });
2607
- });
2608
- };
2609
- AuthenticationFirebaseAuthService.prototype.sendPasswordResetEmail = function (email) {
2610
- return __awaiter(this, void 0, void 0, function () {
2611
- return __generator(this, function (_a) {
2612
- return [2 /*return*/, this.firebaseAuth.sendPasswordResetEmail(email)];
2613
- });
2614
- });
2615
- };
2616
- return AuthenticationFirebaseAuthService;
2371
+ var AuthenticationFirebaseAuthService = /** @class */ (function () {
2372
+ function AuthenticationFirebaseAuthService(firebaseAuth) {
2373
+ this.firebaseAuth = firebaseAuth;
2374
+ }
2375
+ AuthenticationFirebaseAuthService.prototype.signInWithEmailAndPassword = function (data) {
2376
+ return __awaiter(this, void 0, void 0, function () {
2377
+ var credentials, user;
2378
+ return __generator(this, function (_a) {
2379
+ switch (_a.label) {
2380
+ case 0: return [4 /*yield*/, this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)];
2381
+ case 1:
2382
+ credentials = _a.sent();
2383
+ user = credentials.user;
2384
+ return [2 /*return*/, {
2385
+ id: user.uid,
2386
+ displayName: user.displayName,
2387
+ email: user.email,
2388
+ phone: user.phoneNumber,
2389
+ isAnonymous: false,
2390
+ }];
2391
+ }
2392
+ });
2393
+ });
2394
+ };
2395
+ AuthenticationFirebaseAuthService.prototype.signInWithGoogle = function () {
2396
+ return __awaiter(this, void 0, void 0, function () {
2397
+ var credentials, user;
2398
+ return __generator(this, function (_a) {
2399
+ switch (_a.label) {
2400
+ case 0: return [4 /*yield*/, this.firebaseAuth.signInWithPopup(new firebase__default$1["default"].auth.GoogleAuthProvider())];
2401
+ case 1:
2402
+ credentials = _a.sent();
2403
+ user = credentials.user;
2404
+ return [2 /*return*/, {
2405
+ id: user.uid,
2406
+ displayName: user.displayName,
2407
+ email: user.email,
2408
+ phone: user.phoneNumber,
2409
+ isAnonymous: false,
2410
+ }];
2411
+ }
2412
+ });
2413
+ });
2414
+ };
2415
+ AuthenticationFirebaseAuthService.prototype.signOut = function () {
2416
+ return __awaiter(this, void 0, void 0, function () {
2417
+ return __generator(this, function (_a) {
2418
+ this.firebaseAuth.signOut();
2419
+ return [2 /*return*/];
2420
+ });
2421
+ });
2422
+ };
2423
+ AuthenticationFirebaseAuthService.prototype.signInAnonymously = function () {
2424
+ return __awaiter(this, void 0, void 0, function () {
2425
+ var auth, user;
2426
+ return __generator(this, function (_a) {
2427
+ switch (_a.label) {
2428
+ case 0: return [4 /*yield*/, this.firebaseAuth.signInAnonymously()];
2429
+ case 1:
2430
+ auth = _a.sent();
2431
+ user = auth.user;
2432
+ user.id = auth.user.uid;
2433
+ return [2 /*return*/, user];
2434
+ }
2435
+ });
2436
+ });
2437
+ };
2438
+ return AuthenticationFirebaseAuthService;
2617
2439
  }());
2618
2440
 
2619
- var RegisterFirebaseAuthService = /** @class */ (function () {
2620
- function RegisterFirebaseAuthService(firebaseAuth) {
2621
- this.firebaseAuth = firebaseAuth;
2622
- }
2623
- RegisterFirebaseAuthService.prototype.register = function (params) {
2624
- return __awaiter(this, void 0, void 0, function () {
2625
- var auth, user, error_1;
2626
- return __generator(this, function (_a) {
2627
- switch (_a.label) {
2628
- case 0:
2629
- _a.trys.push([0, 2, , 3]);
2630
- return [4 /*yield*/, this.firebaseAuth.createUserWithEmailAndPassword(params.email, params.password)];
2631
- case 1:
2632
- auth = _a.sent();
2633
- user = auth.user;
2634
- user.sendEmailVerification();
2635
- user.id = auth.user.uid;
2636
- return [2 /*return*/, user];
2637
- case 2:
2638
- error_1 = _a.sent();
2639
- if (error_1.code === 'auth/email-already-in-use')
2640
- throw new UserAlreadyRegisteredError('Email already registered');
2641
- if (error_1.code === 'auth/weak-password')
2642
- throw new WeakPasswordError();
2643
- throw error_1;
2644
- case 3: return [2 /*return*/];
2645
- }
2646
- });
2647
- });
2648
- };
2649
- return RegisterFirebaseAuthService;
2441
+ var RegisterFirebaseAuthService = /** @class */ (function () {
2442
+ function RegisterFirebaseAuthService(firebaseAuth) {
2443
+ this.firebaseAuth = firebaseAuth;
2444
+ }
2445
+ RegisterFirebaseAuthService.prototype.register = function (params) {
2446
+ return __awaiter(this, void 0, void 0, function () {
2447
+ var auth, user, error_1;
2448
+ return __generator(this, function (_a) {
2449
+ switch (_a.label) {
2450
+ case 0:
2451
+ _a.trys.push([0, 2, , 3]);
2452
+ return [4 /*yield*/, this.firebaseAuth.createUserWithEmailAndPassword(params.email, params.password)];
2453
+ case 1:
2454
+ auth = _a.sent();
2455
+ user = auth.user;
2456
+ user.sendEmailVerification();
2457
+ user.id = auth.user.uid;
2458
+ return [2 /*return*/, user];
2459
+ case 2:
2460
+ error_1 = _a.sent();
2461
+ if (error_1.code === 'auth/email-already-in-use')
2462
+ throw new UserAlreadyRegisteredError('Email already registered');
2463
+ if (error_1.code === 'auth/weak-password')
2464
+ throw new WeakPasswordError();
2465
+ throw error_1;
2466
+ case 3: return [2 /*return*/];
2467
+ }
2468
+ });
2469
+ });
2470
+ };
2471
+ return RegisterFirebaseAuthService;
2650
2472
  }());
2651
2473
 
2652
- /**
2653
- * Generated bundle index. Do not edit.
2474
+ /**
2475
+ * Generated bundle index. Do not edit.
2654
2476
  */
2655
2477
 
2656
- Object.defineProperty(exports, 'add', {
2657
- enumerable: true,
2658
- get: function () { return dateFns.add; }
2659
- });
2660
- Object.defineProperty(exports, 'sub', {
2661
- enumerable: true,
2662
- get: function () { return dateFns.sub; }
2663
- });
2664
2478
  Object.defineProperty(exports, 'chunk', {
2665
2479
  enumerable: true,
2666
2480
  get: function () { return lodash.chunk; }
2667
2481
  });
2668
- Object.defineProperty(exports, 'get', {
2669
- enumerable: true,
2670
- get: function () { return lodash.get; }
2671
- });
2672
- Object.defineProperty(exports, 'isDate', {
2673
- enumerable: true,
2674
- get: function () { return lodash.isDate; }
2675
- });
2676
2482
  Object.defineProperty(exports, 'isEmpty', {
2677
2483
  enumerable: true,
2678
2484
  get: function () { return lodash.isEmpty; }
@@ -2697,14 +2503,9 @@
2697
2503
  enumerable: true,
2698
2504
  get: function () { return lodash.pick; }
2699
2505
  });
2700
- Object.defineProperty(exports, 'set', {
2701
- enumerable: true,
2702
- get: function () { return lodash.set; }
2703
- });
2704
2506
  exports.Address = Address;
2705
2507
  exports.Authentication = Authentication;
2706
2508
  exports.AuthenticationFirebaseAuthService = AuthenticationFirebaseAuthService;
2707
- exports.AxiosAdapter = AxiosAdapter;
2708
2509
  exports.Base = Base;
2709
2510
  exports.BaseModel = BaseModel;
2710
2511
  exports.BeautyProfile = BeautyProfile;
@@ -2717,11 +2518,11 @@
2717
2518
  exports.CheckoutFirestoreRepository = CheckoutFirestoreRepository;
2718
2519
  exports.CheckoutSubscription = CheckoutSubscription;
2719
2520
  exports.CheckoutSubscriptionFirestoreRepository = CheckoutSubscriptionFirestoreRepository;
2521
+ exports.ClubCoupon = ClubCoupon;
2720
2522
  exports.Coupon = Coupon;
2721
2523
  exports.CouponFirestoreRepository = CouponFirestoreRepository;
2722
2524
  exports.DuplicatedResultsError = DuplicatedResultsError;
2723
2525
  exports.Edition = Edition;
2724
- exports.FinancialCoupon = FinancialCoupon;
2725
2526
  exports.Home = Home;
2726
2527
  exports.HomeFirestoreRepository = HomeFirestoreRepository;
2727
2528
  exports.InvalidArgumentError = InvalidArgumentError;
@@ -2737,17 +2538,14 @@
2737
2538
  exports.Product = Product;
2738
2539
  exports.ProductFirestoreRepository = ProductFirestoreRepository;
2739
2540
  exports.ProductVariantFirestoreRepository = ProductVariantFirestoreRepository;
2740
- exports.ProductsIndex = ProductsIndex;
2741
- exports.RecoveryPassword = RecoveryPassword;
2742
2541
  exports.Register = Register;
2743
2542
  exports.RegisterFirebaseAuthService = RegisterFirebaseAuthService;
2744
2543
  exports.RequiredArgumentError = RequiredArgumentError;
2745
2544
  exports.ShippingMethod = ShippingMethod;
2746
2545
  exports.ShopMenu = ShopMenu;
2747
2546
  exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
2748
- exports.ShopSettings = ShopSettings;
2749
- exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
2750
2547
  exports.SignOut = SignOut;
2548
+ exports.StoreCoupon = StoreCoupon;
2751
2549
  exports.Subscription = Subscription;
2752
2550
  exports.SubscriptionEditionFirestoreRepository = SubscriptionEditionFirestoreRepository;
2753
2551
  exports.SubscriptionFirestoreRepository = SubscriptionFirestoreRepository;