@infrab4a/connect 4.0.0-beta.49 → 4.0.0-beta.5
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.
- package/domain/catalog/index.d.ts +0 -1
- package/domain/catalog/models/category.d.ts +22 -5
- package/domain/catalog/models/index.d.ts +0 -5
- package/domain/catalog/models/kit-product.d.ts +4 -4
- package/domain/catalog/models/product.d.ts +35 -5
- package/domain/catalog/models/types/category-filter.type.d.ts +4 -0
- package/domain/catalog/models/types/index.d.ts +1 -2
- package/domain/catalog/models/types/shop-description.type.d.ts +0 -1
- package/domain/catalog/models/variant.d.ts +2 -1
- package/domain/catalog/repositories/category.repository.d.ts +3 -6
- package/domain/catalog/repositories/index.d.ts +0 -5
- package/domain/catalog/repositories/product.repository.d.ts +1 -4
- package/domain/generic/model/base.model.d.ts +5 -9
- package/domain/generic/model/types/base-model-builder.type.d.ts +2 -4
- package/domain/generic/model/types/identifier-model.type.d.ts +5 -6
- package/domain/generic/model/types/model-base-structure.type.d.ts +3 -9
- package/domain/generic/model/types/non-function-property-name.type.d.ts +3 -12
- package/domain/generic/repository/find.repository.d.ts +1 -6
- package/domain/generic/repository/get.repository.d.ts +2 -2
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +3 -3
- package/domain/generic/repository/types/repository-find-result.type.d.ts +1 -8
- package/domain/generic/repository/types/repository-order-by-list.type.d.ts +2 -2
- package/domain/generic/repository/types/repository-update-params.type.d.ts +2 -2
- package/domain/location/models/address.d.ts +3 -5
- package/domain/shop-settings/models/index.d.ts +0 -1
- package/domain/shop-settings/models/types/index.d.ts +1 -6
- package/domain/shop-settings/repositories/index.d.ts +0 -1
- package/domain/shopping/models/buy-2-win.d.ts +1 -3
- package/domain/shopping/models/checkout.d.ts +6 -5
- package/domain/shopping/models/coupons/coupon.d.ts +6 -34
- package/domain/shopping/models/index.d.ts +4 -5
- package/domain/shopping/models/order.d.ts +0 -1
- package/domain/shopping/models/shipping-method.d.ts +0 -1
- package/domain/shopping/models/subscription/checkout.d.ts +4 -3
- package/domain/shopping/repositories/index.d.ts +2 -4
- package/domain/users/models/lead.d.ts +0 -1
- package/domain/users/models/subscription/subscription.d.ts +3 -3
- package/domain/users/models/user-address.d.ts +2 -1
- package/domain/users/models/user.d.ts +3 -2
- package/esm2020/domain/catalog/index.mjs +1 -2
- package/esm2020/domain/catalog/models/category.mjs +6 -10
- package/esm2020/domain/catalog/models/index.mjs +1 -6
- package/esm2020/domain/catalog/models/kit-product.mjs +7 -7
- package/esm2020/domain/catalog/models/product.mjs +6 -8
- package/esm2020/domain/catalog/models/types/category-filter.type.mjs +2 -0
- package/esm2020/domain/catalog/models/types/index.mjs +2 -3
- package/esm2020/domain/catalog/models/types/shop-description.type.mjs +1 -1
- package/esm2020/domain/catalog/models/variant.mjs +4 -1
- package/esm2020/domain/catalog/repositories/category.repository.mjs +1 -1
- package/esm2020/domain/catalog/repositories/index.mjs +1 -6
- package/esm2020/domain/catalog/repositories/product.repository.mjs +1 -1
- package/esm2020/domain/generic/model/base.model.mjs +2 -3
- package/esm2020/domain/generic/model/types/base-model-builder.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/identifier-model.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/model-base-structure.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/non-function-property-name.type.mjs +1 -1
- package/esm2020/domain/generic/repository/find.repository.mjs +1 -1
- package/esm2020/domain/generic/repository/get.repository.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-find-filters.type.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-find-result.type.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-order-by-list.type.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-update-params.type.mjs +1 -1
- package/esm2020/domain/location/models/address.mjs +2 -2
- package/esm2020/domain/shop-settings/models/index.mjs +1 -2
- package/esm2020/domain/shop-settings/models/types/index.mjs +2 -7
- package/esm2020/domain/shop-settings/repositories/index.mjs +1 -2
- package/esm2020/domain/shopping/models/buy-2-win.mjs +2 -2
- package/esm2020/domain/shopping/models/checkout.mjs +7 -6
- package/esm2020/domain/shopping/models/coupons/coupon.mjs +16 -16
- package/esm2020/domain/shopping/models/index.mjs +5 -6
- package/esm2020/domain/shopping/models/order.mjs +1 -1
- package/esm2020/domain/shopping/models/shipping-method.mjs +1 -1
- package/esm2020/domain/shopping/models/subscription/checkout.mjs +6 -6
- package/esm2020/domain/shopping/repositories/index.mjs +3 -5
- package/esm2020/domain/users/models/lead.mjs +1 -1
- package/esm2020/domain/users/models/subscription/subscription.mjs +6 -6
- package/esm2020/domain/users/models/user-address.mjs +1 -1
- package/esm2020/domain/users/models/user.mjs +2 -2
- package/esm2020/domain/users/use-cases/authentication.mjs +2 -2
- package/esm2020/infra/elasticsearch/adapters/axios.adapter.mjs +11 -28
- package/esm2020/infra/elasticsearch/adapters/elastic-search.adapter.mjs +1 -1
- package/esm2020/infra/elasticsearch/indexes/products-index.mjs +51 -63
- package/esm2020/infra/elasticsearch/types/elastic-search-result.mjs +1 -1
- package/esm2020/infra/firebase/auth/authentication-firebase-auth.service.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-create-firestore.mixin.mjs +4 -8
- package/esm2020/infra/firebase/firestore/mixins/with-crud-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-delete-firestore.mixin.mjs +2 -6
- package/esm2020/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +8 -11
- package/esm2020/infra/firebase/firestore/mixins/with-firestore.mixin.mjs +4 -27
- package/esm2020/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +3 -6
- package/esm2020/infra/firebase/firestore/mixins/with-helpers.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-sub-collection.mixin.mjs +3 -5
- package/esm2020/infra/firebase/firestore/mixins/with-update-firestore.mixin.mjs +4 -7
- package/esm2020/infra/firebase/firestore/repositories/catalog/category-firestore.repository.mjs +8 -21
- package/esm2020/infra/firebase/firestore/repositories/catalog/product-firestore.repository.mjs +7 -15
- package/esm2020/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.mjs +30 -36
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/index.mjs +1 -2
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/index.mjs +4 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.mjs +4 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/order-firestore.repository.mjs +9 -11
- package/esm2020/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/users/lead-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/repositories/users/user-address-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/repositories/users/user-firestore.repository.mjs +6 -8
- package/esm2020/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.mjs +8 -10
- package/esm2020/infra/firebase/firestore/types/firestore-sub.repository.type.mjs +1 -1
- package/esm2020/infra/firebase/firestore/types/firestore.helpers.type.mjs +1 -1
- package/esm2020/infra/firebase/firestore/types/firestore.repository.type.mjs +1 -1
- package/esm2020/infra/firebase/firestore/types/index.mjs +3 -4
- package/esm2020/infra/hasura-graphql/mixins/helpers/attribute-option.helper.mjs +3 -3
- package/esm2020/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +5 -6
- package/esm2020/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +25 -36
- package/esm2020/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.mjs +4 -6
- package/esm2020/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.mjs +3 -5
- package/esm2020/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.mjs +15 -84
- package/esm2020/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.mjs +3 -5
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +24 -40
- package/esm2020/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.mjs +5 -7
- package/esm2020/infra/hasura-graphql/models/product-hasura-graphql.mjs +1 -1
- package/esm2020/infra/hasura-graphql/models/variant-hasura-graphql.mjs +1 -1
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +14 -131
- package/esm2020/infra/hasura-graphql/repositories/catalog/index.mjs +1 -6
- package/esm2020/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +20 -70
- package/esm2020/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.mjs +7 -9
- package/esm2020/infra/hasura-graphql/types/graphql.repository.type.mjs +1 -1
- package/esm2020/infra/hasura-graphql/types/hasura-graphql-fields.type.mjs +1 -1
- package/esm2020/utils/index.mjs +4 -6
- package/fesm2015/infrab4a-connect.mjs +421 -1969
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +422 -1926
- package/fesm2020/infrab4a-connect.mjs.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +5 -7
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +2 -3
- package/infra/elasticsearch/indexes/products-index.d.ts +10 -8
- package/infra/elasticsearch/types/elastic-search-result.d.ts +0 -2
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +1 -2
- package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +4 -13
- package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +4 -8
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +3 -3
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +5 -8
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +5 -6
- package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +0 -1
- package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shopping/index.d.ts +3 -5
- package/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +4 -3
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +5 -5
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +1 -3
- package/infra/firebase/firestore/types/index.d.ts +2 -3
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +3 -9
- package/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.d.ts +5 -5
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +2 -4
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +5 -8
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +1 -2
- package/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.d.ts +3 -3
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +15 -23
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +6 -7
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +3 -14
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +2 -2
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +0 -4
- package/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +0 -1
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +5 -12
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -5
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +4 -6
- package/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +4 -4
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +5 -7
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +3 -7
- package/package.json +1 -2
- package/utils/index.d.ts +22 -5
- package/domain/catalog/helpers/index.d.ts +0 -1
- package/domain/catalog/helpers/round-product-price.helper.d.ts +0 -4
- package/domain/catalog/models/category-base.d.ts +0 -30
- package/domain/catalog/models/category-collection-children.d.ts +0 -13
- package/domain/catalog/models/category-filter.d.ts +0 -13
- package/domain/catalog/models/category-for-product.d.ts +0 -5
- package/domain/catalog/models/filter-option.d.ts +0 -9
- package/domain/catalog/models/filter.d.ts +0 -12
- package/domain/catalog/models/product-base.d.ts +0 -40
- package/domain/catalog/models/product-for-category.d.ts +0 -7
- package/domain/catalog/models/product-for-kit.d.ts +0 -7
- package/domain/catalog/models/types/category-product.d.ts +0 -4
- package/domain/catalog/models/types/product-evaluation.type.d.ts +0 -6
- package/domain/catalog/models/wishlist.d.ts +0 -6
- package/domain/catalog/repositories/category-collection-children.repository.d.ts +0 -4
- package/domain/catalog/repositories/category-filter.repository.d.ts +0 -6
- package/domain/catalog/repositories/filter-option.repository.d.ts +0 -4
- package/domain/catalog/repositories/filter.repository.d.ts +0 -4
- package/domain/catalog/repositories/wishlist.repository.d.ts +0 -6
- package/domain/shop-settings/models/shop-settings.d.ts +0 -9
- package/domain/shop-settings/models/types/shop-banner.type.d.ts +0 -12
- package/domain/shop-settings/models/types/shop-brands.type.d.ts +0 -10
- package/domain/shop-settings/models/types/shop-carousel.type.d.ts +0 -5
- package/domain/shop-settings/models/types/shop-collection.type.d.ts +0 -9
- package/domain/shop-settings/models/types/shop-section.type.d.ts +0 -9
- package/domain/shop-settings/repositories/shop-settings.repository.d.ts +0 -4
- package/domain/shopping/models/campaign-dashboard.d.ts +0 -15
- package/domain/shopping/models/campaign-hashtag.d.ts +0 -18
- package/domain/shopping/repositories/campaign-dashboard.repository.d.ts +0 -4
- package/domain/shopping/repositories/campaign-hashtag.repository.d.ts +0 -4
- package/esm2020/domain/catalog/helpers/index.mjs +0 -2
- package/esm2020/domain/catalog/helpers/round-product-price.helper.mjs +0 -15
- package/esm2020/domain/catalog/models/category-base.mjs +0 -18
- package/esm2020/domain/catalog/models/category-collection-children.mjs +0 -13
- package/esm2020/domain/catalog/models/category-filter.mjs +0 -19
- package/esm2020/domain/catalog/models/category-for-product.mjs +0 -7
- package/esm2020/domain/catalog/models/filter-option.mjs +0 -7
- package/esm2020/domain/catalog/models/filter.mjs +0 -7
- package/esm2020/domain/catalog/models/product-base.mjs +0 -25
- package/esm2020/domain/catalog/models/product-for-category.mjs +0 -14
- package/esm2020/domain/catalog/models/product-for-kit.mjs +0 -14
- package/esm2020/domain/catalog/models/types/category-product.mjs +0 -2
- package/esm2020/domain/catalog/models/types/product-evaluation.type.mjs +0 -2
- package/esm2020/domain/catalog/models/wishlist.mjs +0 -7
- package/esm2020/domain/catalog/repositories/category-collection-children.repository.mjs +0 -2
- package/esm2020/domain/catalog/repositories/category-filter.repository.mjs +0 -2
- package/esm2020/domain/catalog/repositories/filter-option.repository.mjs +0 -2
- package/esm2020/domain/catalog/repositories/filter.repository.mjs +0 -2
- package/esm2020/domain/catalog/repositories/wishlist.repository.mjs +0 -2
- package/esm2020/domain/shop-settings/models/shop-settings.mjs +0 -7
- package/esm2020/domain/shop-settings/models/types/shop-banner.type.mjs +0 -2
- package/esm2020/domain/shop-settings/models/types/shop-brands.type.mjs +0 -2
- package/esm2020/domain/shop-settings/models/types/shop-carousel.type.mjs +0 -2
- package/esm2020/domain/shop-settings/models/types/shop-collection.type.mjs +0 -2
- package/esm2020/domain/shop-settings/models/types/shop-section.type.mjs +0 -2
- package/esm2020/domain/shop-settings/repositories/shop-settings.repository.mjs +0 -2
- package/esm2020/domain/shopping/models/campaign-dashboard.mjs +0 -7
- package/esm2020/domain/shopping/models/campaign-hashtag.mjs +0 -7
- package/esm2020/domain/shopping/repositories/campaign-dashboard.repository.mjs +0 -2
- package/esm2020/domain/shopping/repositories/campaign-hashtag.repository.mjs +0 -2
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.mjs +0 -14
- package/esm2020/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.mjs +0 -14
- package/esm2020/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.mjs +0 -14
- package/esm2020/infra/firebase/firestore/types/firestore-interceptors.type.mjs +0 -2
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.mjs +0 -39
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.mjs +0 -107
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.mjs +0 -105
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.mjs +0 -22
- package/esm2020/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.mjs +0 -236
- package/esm2020/utils/decorators/debug.class.decorator.mjs +0 -7
- package/esm2020/utils/decorators/index.mjs +0 -3
- package/esm2020/utils/decorators/trace.method.decorator.mjs +0 -81
- package/esm2020/utils/helpers/class-name.helper.mjs +0 -15
- package/esm2020/utils/helpers/debug-decorator.helper.mjs +0 -18
- package/esm2020/utils/helpers/debug.helper.mjs +0 -150
- package/esm2020/utils/helpers/index.mjs +0 -5
- package/esm2020/utils/helpers/reflect.helper.mjs +0 -165
- package/esm2020/utils/log.utils.mjs +0 -9
- package/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.d.ts +0 -7
- package/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.d.ts +0 -8
- package/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.d.ts +0 -8
- package/infra/firebase/firestore/types/firestore-interceptors.type.d.ts +0 -14
- package/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.d.ts +0 -10
- package/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.d.ts +0 -12
- package/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.d.ts +0 -18
- package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts +0 -10
- package/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +0 -27
- package/utils/decorators/debug.class.decorator.d.ts +0 -2
- package/utils/decorators/index.d.ts +0 -2
- package/utils/decorators/trace.method.decorator.d.ts +0 -14
- package/utils/helpers/class-name.helper.d.ts +0 -3
- package/utils/helpers/debug-decorator.helper.d.ts +0 -9
- package/utils/helpers/debug.helper.d.ts +0 -60
- package/utils/helpers/index.d.ts +0 -4
- package/utils/helpers/reflect.helper.d.ts +0 -50
- package/utils/log.utils.d.ts +0 -7
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare class Category extends
|
|
5
|
-
|
|
1
|
+
import { BaseModel, GenericIdentifier, NonFunctionPropertyNames } from '../../generic/model';
|
|
2
|
+
import { Shops } from './enums';
|
|
3
|
+
import { CategoryCondition, CategoryFilter, CategoryMetadata } from './types';
|
|
4
|
+
export declare class Category extends BaseModel<Category> {
|
|
5
|
+
id: string;
|
|
6
|
+
brandCategory: boolean;
|
|
7
|
+
brandLogo?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
image?: string;
|
|
11
|
+
brandCategoryBanner?: string;
|
|
12
|
+
brandCategoryBannerMobile?: string;
|
|
13
|
+
description: string;
|
|
14
|
+
conditions?: CategoryCondition;
|
|
15
|
+
products?: string[];
|
|
16
|
+
filters?: CategoryFilter[];
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
shop: Shops;
|
|
20
|
+
published: boolean;
|
|
21
|
+
metadata: CategoryMetadata;
|
|
22
|
+
identifierFields(): NonFunctionPropertyNames<Category>[];
|
|
6
23
|
static get identifiersFields(): GenericIdentifier[];
|
|
7
24
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export * from './category';
|
|
2
|
-
export * from './category-collection-children';
|
|
3
|
-
export * from './category-filter';
|
|
4
2
|
export * from './enums';
|
|
5
|
-
export * from './filter';
|
|
6
|
-
export * from './filter-option';
|
|
7
3
|
export * from './kit-product';
|
|
8
4
|
export * from './product';
|
|
9
5
|
export * from './types';
|
|
10
6
|
export * from './variant';
|
|
11
|
-
export * from './wishlist';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseModel } from '../../generic/model';
|
|
2
|
-
import {
|
|
3
|
-
declare type KitProductIdentifiers = 'productId' | '
|
|
2
|
+
import { Product } from './product';
|
|
3
|
+
declare type KitProductIdentifiers = 'productId' | 'kitProducId';
|
|
4
4
|
export declare class KitProduct extends BaseModel<KitProduct, KitProductIdentifiers> {
|
|
5
5
|
productId: string;
|
|
6
6
|
kitProductId: string;
|
|
7
7
|
quantity: number;
|
|
8
|
-
kit:
|
|
9
|
-
product:
|
|
8
|
+
kit: Product;
|
|
9
|
+
product: Product;
|
|
10
10
|
static get identifiersFields(): KitProductIdentifiers[];
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,9 +1,39 @@
|
|
|
1
|
-
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import { CategoryForProduct } from './category-for-product';
|
|
1
|
+
import { BaseModel, GenericIdentifier, NonFunctionPropertyNames } from '../../generic/model';
|
|
3
2
|
import { KitProduct } from './kit-product';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { ProductGender, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
|
|
4
|
+
import { Variant } from './variant';
|
|
5
|
+
export declare class Product extends BaseModel<Product> {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
description: ShopDescription;
|
|
10
|
+
sku: string;
|
|
11
|
+
price: ShopPrice;
|
|
12
|
+
hasVariants: boolean;
|
|
13
|
+
NCM: string;
|
|
14
|
+
EAN: string;
|
|
15
|
+
CEST: string;
|
|
16
|
+
weight: number;
|
|
17
|
+
stock: Stock;
|
|
18
|
+
costPrice: number;
|
|
19
|
+
images?: string[];
|
|
20
|
+
miniatures?: string[];
|
|
21
|
+
published: boolean;
|
|
22
|
+
createdAt?: Date;
|
|
23
|
+
updatedAt?: Date;
|
|
24
|
+
brand: string;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
type?: string;
|
|
27
|
+
categories?: string[];
|
|
28
|
+
reviews?: ProductReview[];
|
|
29
|
+
variant?: Variant;
|
|
30
|
+
video?: string;
|
|
31
|
+
isKit?: boolean;
|
|
32
|
+
rate?: number;
|
|
33
|
+
gender?: ProductGender;
|
|
34
|
+
shoppingCount?: number;
|
|
35
|
+
metadata: ProductMetadata;
|
|
7
36
|
kitProducts?: KitProduct[];
|
|
37
|
+
identifierFields(): NonFunctionPropertyNames<Product>[];
|
|
8
38
|
static get identifiersFields(): GenericIdentifier[];
|
|
9
39
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './category-condition.type';
|
|
2
|
+
export * from './category-filter.type';
|
|
2
3
|
export * from './category-metadata.type';
|
|
3
|
-
export * from './category-product';
|
|
4
|
-
export * from './product-evaluation.type';
|
|
5
4
|
export * from './product-gender.type';
|
|
6
5
|
export * from './product-metadata.type';
|
|
7
6
|
export * from './product-review.type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel } from '../../generic/model';
|
|
1
|
+
import { BaseModel, NonFunctionPropertyNames } from '../../generic/model';
|
|
2
2
|
import { ShopPrice, Stock, VariantGrade } from './types';
|
|
3
3
|
export declare type ProductVariantIdentifiers = 'id' | 'productId';
|
|
4
4
|
export declare class Variant extends BaseModel<Variant, ProductVariantIdentifiers> {
|
|
@@ -13,5 +13,6 @@ export declare class Variant extends BaseModel<Variant, ProductVariantIdentifier
|
|
|
13
13
|
weight: number;
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
|
+
identifierFields(): NonFunctionPropertyNames<Variant>[];
|
|
16
17
|
static get identifiersFields(): ProductVariantIdentifiers[];
|
|
17
18
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
-
import { Product } from '../models';
|
|
3
1
|
import { Category } from '../models/category';
|
|
2
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
4
3
|
import { Shops } from '../models/enums/shops.enum';
|
|
4
|
+
import { Product } from '../models';
|
|
5
5
|
export interface CategoryRepository extends CrudRepository<Category> {
|
|
6
6
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
7
|
-
|
|
8
|
-
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
7
|
+
getCategoriesForHome(categoryIds: string[], limit?: number): Promise<{
|
|
9
8
|
category: Category;
|
|
10
9
|
products: Product[];
|
|
11
10
|
}[]>;
|
|
@@ -13,6 +12,4 @@ export interface CategoryRepository extends CrudRepository<Category> {
|
|
|
13
12
|
limit?: number;
|
|
14
13
|
hasStock?: boolean;
|
|
15
14
|
}): Promise<Product[]>;
|
|
16
|
-
getChildren(parentId: number): Promise<Category[]>;
|
|
17
|
-
isChild(id: number, parentId: number): Promise<boolean>;
|
|
18
15
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export * from './category-collection-children.repository';
|
|
2
|
-
export * from './category-filter.repository';
|
|
3
1
|
export * from './category.repository';
|
|
4
|
-
export * from './filter-option.repository';
|
|
5
|
-
export * from './filter.repository';
|
|
6
2
|
export * from './product.repository';
|
|
7
3
|
export * from './subscription-product.repository';
|
|
8
4
|
export * from './variant.repository';
|
|
9
|
-
export * from './wishlist.repository';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
2
1
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
|
-
import { Product,
|
|
2
|
+
import { Product, ProductReview } from '../models';
|
|
4
3
|
export declare type ReviewStatusParams = 'pending' | 'approved' | 'rejected';
|
|
5
4
|
export declare type ReviewWithProductData = ProductReview & {
|
|
6
5
|
productId: string;
|
|
@@ -10,6 +9,4 @@ export declare type ReviewWithProductData = ProductReview & {
|
|
|
10
9
|
export interface ProductRepository extends CrudRepository<Product> {
|
|
11
10
|
getBySlug(slug: string): Promise<Product>;
|
|
12
11
|
fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
|
|
13
|
-
cleanShoppingCountFromIds(ids: string[]): Promise<any>;
|
|
14
|
-
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male'>): Promise<RepositoryFindResult<Product>>;
|
|
15
12
|
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ModelBaseStructure, NonFunctionAndIdentifierProperties,
|
|
2
|
-
export declare type GenericIdentifier<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare class BaseModel<Model extends ModelBaseStructure<Model, Identifiers>, Identifiers = GenericIdentifier> implements ModelBaseStructure<Model, Identifiers> {
|
|
6
|
-
get identifier(): {
|
|
7
|
-
[key in Extract<NonFunctionAndIdentifierPropertyNames<Model>, Identifiers>]: Model[key];
|
|
8
|
-
};
|
|
1
|
+
import { ModelBaseStructure, NonFunctionAndIdentifierProperties, NonFunctionProperties } from './types';
|
|
2
|
+
export declare type GenericIdentifier<T = 'id'> = T;
|
|
3
|
+
export declare class BaseModel<Model, Identifiers = GenericIdentifier> implements ModelBaseStructure<Model, Identifiers> {
|
|
4
|
+
get identifier(): NonFunctionAndIdentifierProperties<Model>;
|
|
9
5
|
get identifiersFields(): Identifiers[];
|
|
10
6
|
constructor(args?: Partial<Model>);
|
|
11
|
-
static toInstance<T>(this: new () => T, data?: Partial<
|
|
7
|
+
static toInstance<T extends ModelBaseStructure>(this: new () => T, data?: Partial<NonFunctionProperties<T>>): T;
|
|
12
8
|
static isModel<T extends ModelBaseStructure>(this: new () => T, value: any): value is T;
|
|
13
9
|
toPlain(): any;
|
|
14
10
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PartialIdentifiersModel } from './identifier-model.type';
|
|
2
|
-
import { ModelBaseStructure } from './model-base-structure.type';
|
|
3
1
|
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
4
2
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
5
|
-
export interface BaseModelBuilder<T
|
|
3
|
+
export interface BaseModelBuilder<T, Identifiers = NonFunctionAndIdentifierPropertyNames<T>, P extends T & {
|
|
6
4
|
prototype: unknown;
|
|
7
5
|
} = T & {
|
|
8
6
|
prototype: unknown;
|
|
@@ -12,6 +10,6 @@ export interface BaseModelBuilder<T extends ModelBaseStructure<T>, Identifiers =
|
|
|
12
10
|
prototype: {
|
|
13
11
|
[key in keyof P['prototype']]: P['prototype'][key];
|
|
14
12
|
};
|
|
15
|
-
toInstance
|
|
13
|
+
toInstance(this: new () => T, data?: Partial<NonFunctionAndIdentifierPropertiesWithNoPartial<T>>): T;
|
|
16
14
|
isModel(model: any): model is T;
|
|
17
15
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { PropType } from '../../../../utils';
|
|
1
|
+
import { ArrayElement, PropType } from '../../../../utils';
|
|
2
2
|
import { ModelBaseStructure } from './model-base-structure.type';
|
|
3
|
+
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
3
4
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
4
|
-
export declare type IdentifierModel<Model extends ModelBaseStructure> =
|
|
5
|
-
export declare type IdentifiersModel<Model extends ModelBaseStructure> =
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export declare type PartialIdentifiersModel<Model extends ModelBaseStructure> = Partial<IdentifiersModel<Model>>;
|
|
5
|
+
export declare type IdentifierModel<Model extends ModelBaseStructure> = ArrayElement<PropType<Model, 'identifiersFields'>>;
|
|
6
|
+
export declare type IdentifiersModel<Model extends ModelBaseStructure> = Pick<NonFunctionAndIdentifierPropertiesWithNoPartial<Model>, Extract<NonFunctionAndIdentifierPropertyNames<Model>, IdentifierModel<Model>>>;
|
|
7
|
+
export declare type PartialIdentifiersModel<Model extends ModelBaseStructure> = Partial<Pick<NonFunctionAndIdentifierPropertiesWithNoPartial<Model>, Extract<NonFunctionAndIdentifierPropertyNames<Model>, IdentifierModel<Model>>>>;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare type
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare type ModelBaseStructure<M extends ModelBaseStructureRecord = ModelBaseStructureRecord, I = M['identifiersFields'][number]> = {
|
|
6
|
-
identifier: {
|
|
7
|
-
[key in Extract<NonFunctionAndIdentifierPropertyNames<M>, I>]: M[key];
|
|
8
|
-
};
|
|
1
|
+
import { NonFunctionAndIdentifierProperties } from './non-function-properties.type';
|
|
2
|
+
export declare type ModelBaseStructure<M = any, I = any> = {
|
|
3
|
+
identifier: NonFunctionAndIdentifierProperties<M>;
|
|
9
4
|
identifiersFields: I[];
|
|
10
5
|
toPlain: any;
|
|
11
6
|
};
|
|
12
|
-
export {};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export declare type
|
|
2
|
-
|
|
3
|
-
[P in keyof T]-?: IfEquals<{
|
|
4
|
-
[Q in P]: T[P];
|
|
5
|
-
}, {
|
|
6
|
-
-readonly [Q in P]: T[P];
|
|
7
|
-
}, never, P>;
|
|
8
|
-
}[keyof T];
|
|
9
|
-
export declare type WritableKeys<T> = Exclude<keyof T, ReadonlyKeys<T>>;
|
|
10
|
-
export declare type NonFunctionPropertyNames<T, P = T, E extends WritableKeys<P> = WritableKeys<P>> = {
|
|
11
|
-
[K in E]: P[K] extends Function ? never : K extends 'identifiersFields' ? never : K;
|
|
1
|
+
export declare type NonFunctionPropertyNames<T, E extends keyof T = keyof T> = {
|
|
2
|
+
[K in E]: T[K] extends Function ? never : K;
|
|
12
3
|
}[E];
|
|
13
|
-
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<
|
|
4
|
+
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<T, Exclude<keyof T, 'identifier' | 'identifiersFields'>>;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { ModelBaseStructure,
|
|
1
|
+
import { ModelBaseStructure, NonFunctionPropertyNames } from '../model/types';
|
|
2
2
|
import { RepositoryFindFielters, RepositoryFindResult, RepositoryLimitOptions, RepositoryOrderBy } from './types';
|
|
3
3
|
export declare type FindRepositoryParams<Model extends ModelBaseStructure> = {
|
|
4
4
|
filters?: RepositoryFindFielters<Model>;
|
|
5
5
|
fields?: NonFunctionPropertyNames<Model>[];
|
|
6
6
|
limits?: RepositoryLimitOptions<Model>;
|
|
7
7
|
orderBy?: RepositoryOrderBy<Model>;
|
|
8
|
-
options?: {
|
|
9
|
-
enableCount?: boolean;
|
|
10
|
-
minimal?: Array<NonFunctionAndIdentifierPropertyNames<Model> | {}>;
|
|
11
|
-
maximum?: Array<NonFunctionAndIdentifierPropertyNames<Model> | {}>;
|
|
12
|
-
};
|
|
13
8
|
};
|
|
14
9
|
export interface FindRepository<Model extends ModelBaseStructure, Params = FindRepositoryParams<Model>> {
|
|
15
10
|
find(options?: Params): Promise<RepositoryFindResult<Model>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type GetRepositoryParams<Model extends ModelBaseStructure> =
|
|
1
|
+
import { ModelBaseStructure, NonFunctionAndIdentifierProperties } from '../model/types';
|
|
2
|
+
export declare type GetRepositoryParams<Model extends ModelBaseStructure> = NonFunctionAndIdentifierProperties<Model>;
|
|
3
3
|
export interface GetRepository<Model extends ModelBaseStructure, Params = GetRepositoryParams<Model>> {
|
|
4
4
|
get(identifiers: Params): Promise<Model>;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from '../../../../utils';
|
|
2
2
|
import { ModelBaseStructure } from '../../model';
|
|
3
|
-
import {
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
4
4
|
import { Where } from '../enums/where.enum';
|
|
5
5
|
export declare type RepositoryFindFieltersOptions<Model, FieldName extends keyof Model> = {
|
|
6
6
|
operator: Where;
|
|
@@ -8,6 +8,6 @@ export declare type RepositoryFindFieltersOptions<Model, FieldName extends keyof
|
|
|
8
8
|
};
|
|
9
9
|
export declare type RepositoryFindField<Model, FieldName extends keyof Model> = RepositoryFindFieltersOptions<Model, FieldName> | RepositoryFindFieltersOptions<Model, FieldName>[] | Partial<PropType<Model, FieldName>>;
|
|
10
10
|
export declare type NestedRepositoryFindFieltersOptions<Model> = {
|
|
11
|
-
[key in
|
|
11
|
+
[key in NonFunctionPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure<PropType<Model, key>> ? NestedRepositoryFindFieltersOptions<PropType<Model, key>> : PropType<Required<Model>, key> extends any[] ? PropType<Required<Model>, key>[number] extends ModelBaseStructure ? NestedRepositoryFindFieltersOptions<PropType<Required<Model>, key>[number]> : PropType<Required<Model>, key>[number] extends Record<string, any> ? NestedRepositoryFindFieltersOptions<PropType<Required<Model>, key>[number]> : RepositoryFindField<Model, key> : PropType<Model, key> extends Record<string, any> ? NestedRepositoryFindFieltersOptions<Required<PropType<Model, key>>> : RepositoryFindField<Model, key>;
|
|
12
12
|
};
|
|
13
|
-
export declare type RepositoryFindFielters<Model extends ModelBaseStructure
|
|
13
|
+
export declare type RepositoryFindFielters<Model extends ModelBaseStructure<Model>> = NestedRepositoryFindFieltersOptions<Model>;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from '../../model';
|
|
2
|
-
declare type SortableFields<Model, K extends NonFunctionAndIdentifierPropertiesWithNoPartial<Model> = NonFunctionAndIdentifierPropertiesWithNoPartial<Model>> = {
|
|
3
|
-
[key in keyof K]: K[key];
|
|
4
|
-
};
|
|
5
1
|
export declare type RepositoryFindResult<Model> = {
|
|
6
2
|
data: Model[];
|
|
7
|
-
count
|
|
8
|
-
minimal?: SortableFields<Model>;
|
|
9
|
-
maximum?: SortableFields<Model>;
|
|
3
|
+
count: number;
|
|
10
4
|
};
|
|
11
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonFunctionPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
2
2
|
export declare type RepositoryOrderBy<Model> = {
|
|
3
|
-
[key in
|
|
3
|
+
[key in NonFunctionPropertyNames<Model>]?: 'asc' | 'desc';
|
|
4
4
|
};
|
|
5
5
|
export declare type RepositoryOrderByList<Model> = RepositoryOrderBy<Model>[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ModelBaseStructure } from '../..';
|
|
2
2
|
import { PropType } from '../../../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
4
4
|
export declare type UpdateOptionAction = 'removeField' | 'update' | 'merge' | 'remove' | 'null';
|
|
5
5
|
export declare type UpdateOptions<T> = {
|
|
6
6
|
action: UpdateOptionAction;
|
|
7
7
|
value?: T;
|
|
8
8
|
};
|
|
9
9
|
export declare type RepositoryUpdateParams<Model extends ModelBaseStructure> = {
|
|
10
|
-
[key in
|
|
10
|
+
[key in NonFunctionPropertyNames<Model>]?: UpdateOptions<PropType<Model, key>> | PropType<Model, key>;
|
|
11
11
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
2
|
import { LocationGeometry } from './types/location-geometry.type';
|
|
3
|
-
export declare abstract class Address<
|
|
4
|
-
id: string;
|
|
3
|
+
export declare abstract class Address<Identifiers = GenericIdentifier> extends BaseModel<Address, Identifiers> {
|
|
5
4
|
default?: boolean;
|
|
6
5
|
recipient?: string;
|
|
7
6
|
zip?: string;
|
|
8
7
|
street?: string;
|
|
9
8
|
number?: string;
|
|
10
9
|
extension?: string;
|
|
11
|
-
reference?: string;
|
|
12
10
|
district?: string;
|
|
13
11
|
city?: string;
|
|
14
12
|
regionalPole?: string;
|
|
@@ -20,5 +18,5 @@ export declare abstract class Address<ChildAddress extends ModelBaseStructure<Ch
|
|
|
20
18
|
formattedAddress?: string;
|
|
21
19
|
placeId?: string;
|
|
22
20
|
geometry?: LocationGeometry;
|
|
23
|
-
static get identifiersFields():
|
|
21
|
+
static get identifiersFields(): string[];
|
|
24
22
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export * from './banner.type';
|
|
2
2
|
export * from './benefit.type';
|
|
3
|
-
export * from './home-data.type';
|
|
4
3
|
export * from './menu-nav.type';
|
|
5
|
-
export * from './shop-banner.type';
|
|
6
|
-
export * from './shop-brands.type';
|
|
7
|
-
export * from './shop-carousel.type';
|
|
8
|
-
export * from './shop-collection.type';
|
|
9
|
-
export * from './shop-section.type';
|
|
10
4
|
export * from './sub-menu.type';
|
|
5
|
+
export * from './home-data.type';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Category, Shops } from '../../catalog/models';
|
|
2
1
|
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
+
import { Shops, Category } from '../../catalog/models';
|
|
3
3
|
export declare class Buy2Win extends BaseModel<Buy2Win> {
|
|
4
4
|
active: boolean;
|
|
5
5
|
cartValue: number;
|
|
@@ -9,8 +9,6 @@ export declare class Buy2Win extends BaseModel<Buy2Win> {
|
|
|
9
9
|
name: string;
|
|
10
10
|
products?: string[];
|
|
11
11
|
shop: Shops;
|
|
12
|
-
activeCategory?: boolean;
|
|
13
|
-
cartValueMin?: number;
|
|
14
12
|
startDate: Date;
|
|
15
13
|
updatedAt?: Date;
|
|
16
14
|
categories: Category[];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Address } from '../../location/models/address';
|
|
2
2
|
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
3
|
-
import { User
|
|
3
|
+
import { User } from '../../users/models/user';
|
|
4
4
|
import { Coupon } from './coupons/coupon';
|
|
5
5
|
import { LineItem } from './line-item';
|
|
6
6
|
import { ShippingMethod } from './shipping-method';
|
|
7
|
+
import { Shops } from '../../catalog/models/enums/shops.enum';
|
|
7
8
|
export declare class Checkout extends BaseModel<Checkout> {
|
|
8
9
|
id?: string;
|
|
9
10
|
paymentId?: string;
|
|
10
|
-
status?:
|
|
11
|
+
status?: string;
|
|
11
12
|
createdAt?: Date;
|
|
12
13
|
updatedAt?: Date;
|
|
13
14
|
completedAt?: Date;
|
|
@@ -18,8 +19,8 @@ export declare class Checkout extends BaseModel<Checkout> {
|
|
|
18
19
|
glampoints?: number;
|
|
19
20
|
lineItems?: LineItem[];
|
|
20
21
|
user?: User;
|
|
21
|
-
shippingAddress?:
|
|
22
|
-
billingAddress?:
|
|
22
|
+
shippingAddress?: Address;
|
|
23
|
+
billingAddress?: Address;
|
|
23
24
|
shipping?: ShippingMethod;
|
|
24
25
|
coupon?: Coupon;
|
|
25
26
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -5,44 +5,16 @@ import { CouponTypes, Exclusivities } from './enums';
|
|
|
5
5
|
import { ClubeDaMensPlan } from './enums/coupon-club-mens.enum';
|
|
6
6
|
export declare class Coupon extends BaseModel<Coupon> {
|
|
7
7
|
id: string;
|
|
8
|
-
|
|
9
|
-
discount
|
|
10
|
-
subscriber: {
|
|
11
|
-
type: CouponTypes;
|
|
12
|
-
value: number;
|
|
13
|
-
};
|
|
14
|
-
non_subscriber: {
|
|
15
|
-
type: CouponTypes;
|
|
16
|
-
value: number;
|
|
17
|
-
};
|
|
18
|
-
subscription?: {
|
|
19
|
-
type: CouponTypes;
|
|
20
|
-
value: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
useLimits: {
|
|
24
|
-
subscriber: {
|
|
25
|
-
unlimited?: boolean;
|
|
26
|
-
total?: number;
|
|
27
|
-
limitedPerUser?: boolean;
|
|
28
|
-
};
|
|
29
|
-
non_subscriber: {
|
|
30
|
-
unlimited?: boolean;
|
|
31
|
-
total?: number;
|
|
32
|
-
limitedPerUser?: boolean;
|
|
33
|
-
};
|
|
34
|
-
subscription?: {
|
|
35
|
-
unlimited?: boolean;
|
|
36
|
-
total?: number;
|
|
37
|
-
limitedPerUser?: boolean;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
8
|
+
type: CouponTypes;
|
|
9
|
+
discount?: number;
|
|
40
10
|
user?: string;
|
|
41
|
-
userExclusiveEmail?: string
|
|
11
|
+
userExclusiveEmail?: string;
|
|
42
12
|
campaign?: string;
|
|
43
13
|
nickname: string;
|
|
44
14
|
beginAt: Date;
|
|
45
15
|
expiresIn?: Date;
|
|
16
|
+
useLimit?: number;
|
|
17
|
+
useLimitPerUser?: boolean;
|
|
46
18
|
shopAvailability: Shops;
|
|
47
19
|
personId?: number;
|
|
48
20
|
influencerEmail?: string;
|
|
@@ -53,7 +25,7 @@ export declare class Coupon extends BaseModel<Coupon> {
|
|
|
53
25
|
createdAt: Date;
|
|
54
26
|
updatedAt?: Date;
|
|
55
27
|
checkoutType: CheckoutTypes;
|
|
56
|
-
exclusivityType?:
|
|
28
|
+
exclusivityType?: Exclusivities;
|
|
57
29
|
get isInfluencer(): boolean;
|
|
58
30
|
static get identifiersFields(): GenericIdentifier[];
|
|
59
31
|
static createCoupon(userId: string): Coupon;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export * from './buy-2-win';
|
|
2
|
-
export * from './campaign-dashboard';
|
|
3
|
-
export * from './campaign-hashtag';
|
|
4
|
-
export * from './checkout';
|
|
5
1
|
export * from './coupons';
|
|
6
2
|
export * from './enums';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './checkout';
|
|
7
5
|
export * from './line-item';
|
|
8
6
|
export * from './order';
|
|
9
7
|
export * from './payment';
|
|
10
8
|
export * from './shipping-method';
|
|
11
9
|
export * from './subscription';
|
|
12
|
-
export * from './
|
|
10
|
+
export * from './buy-2-win';
|
|
11
|
+
export * from './buy-2-win';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Address } from '../../../location/models/address';
|
|
1
2
|
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
|
-
import { User, UserAddress } from '../../../users';
|
|
3
3
|
import { Coupon } from '../coupons/coupon';
|
|
4
|
+
import { User } from '../../../users/models/user';
|
|
4
5
|
import { SubscriptionPlan } from './plan';
|
|
5
6
|
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription> {
|
|
6
7
|
id?: string;
|
|
@@ -12,8 +13,8 @@ export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription
|
|
|
12
13
|
discount?: number;
|
|
13
14
|
subTotalPrice?: number;
|
|
14
15
|
totalPrice?: number;
|
|
15
|
-
shippingAddress:
|
|
16
|
-
billingAddress?:
|
|
16
|
+
shippingAddress: Address;
|
|
17
|
+
billingAddress?: Address;
|
|
17
18
|
subscriptionPlan: SubscriptionPlan;
|
|
18
19
|
coupon?: Coupon;
|
|
19
20
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export * from './buy-2-win.repository';
|
|
2
|
-
export * from './campaign-dashboard.repository';
|
|
3
|
-
export * from './campaign-hashtag.repository';
|
|
4
1
|
export * from './checkout.repository';
|
|
5
2
|
export * from './coupon.repository';
|
|
6
|
-
export * from './legacy-order.repository';
|
|
7
3
|
export * from './order.repository';
|
|
8
4
|
export * from './payment.repository';
|
|
9
5
|
export * from './subscription';
|
|
6
|
+
export * from './buy-2-win.repository';
|
|
7
|
+
export * from './legacy-order.repository';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Address } from '../../../location/models/address';
|
|
1
2
|
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
3
|
import { Coupon } from '../../../shopping/models/coupons/coupon';
|
|
3
4
|
import { SubscriptionPlan } from '../../../shopping/models/subscription/plan';
|
|
4
5
|
import { User } from '../user';
|
|
5
|
-
import { UserAddress } from '../user-address';
|
|
6
6
|
import { Edition } from './edition';
|
|
7
7
|
import { Status } from './enums/status.enum';
|
|
8
8
|
import { SubscriptionPayment } from './payment';
|
|
@@ -19,8 +19,8 @@ export declare class Subscription extends BaseModel<Subscription> {
|
|
|
19
19
|
updatedAt: Date;
|
|
20
20
|
user: User;
|
|
21
21
|
subscriptionPlan: SubscriptionPlan;
|
|
22
|
-
shippingAddress:
|
|
23
|
-
billingAddress?:
|
|
22
|
+
shippingAddress: Address;
|
|
23
|
+
billingAddress?: Address;
|
|
24
24
|
coupon?: Coupon;
|
|
25
25
|
editions: Edition[];
|
|
26
26
|
payment?: SubscriptionPayment[];
|