@infrab4a/connect 4.0.0-beta.8 → 4.0.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.
- package/domain/catalog/helpers/index.d.ts +1 -0
- package/domain/catalog/helpers/round-product-price.helper.d.ts +4 -0
- package/domain/catalog/index.d.ts +1 -0
- package/domain/catalog/models/category-base.d.ts +30 -0
- package/domain/catalog/models/category-collection-children.d.ts +13 -0
- package/domain/catalog/models/category-filter.d.ts +13 -0
- package/domain/catalog/models/category-for-product.d.ts +5 -0
- package/domain/catalog/models/category.d.ts +5 -22
- package/domain/catalog/models/filter-option.d.ts +9 -0
- package/domain/catalog/models/filter.d.ts +12 -0
- package/domain/catalog/models/index.d.ts +5 -0
- package/domain/catalog/models/kit-product.d.ts +4 -4
- package/domain/catalog/models/product-base.d.ts +40 -0
- package/domain/catalog/models/product-for-category.d.ts +7 -0
- package/domain/catalog/models/product-for-kit.d.ts +7 -0
- package/domain/catalog/models/product.d.ts +5 -35
- package/domain/catalog/models/types/category-product.d.ts +4 -0
- package/domain/catalog/models/types/index.d.ts +2 -1
- package/domain/catalog/models/types/product-evaluation.type.d.ts +6 -0
- package/domain/catalog/models/types/shop-description.type.d.ts +1 -0
- package/domain/catalog/models/variant.d.ts +1 -2
- package/domain/catalog/models/wishlist.d.ts +6 -0
- package/domain/catalog/repositories/category-collection-children.repository.d.ts +4 -0
- package/domain/catalog/repositories/category-filter.repository.d.ts +6 -0
- package/domain/catalog/repositories/category.repository.d.ts +6 -3
- package/domain/catalog/repositories/filter-option.repository.d.ts +4 -0
- package/domain/catalog/repositories/filter.repository.d.ts +4 -0
- package/domain/catalog/repositories/index.d.ts +5 -0
- package/domain/catalog/repositories/product.repository.d.ts +4 -1
- package/domain/catalog/repositories/wishlist.repository.d.ts +6 -0
- package/domain/generic/model/base.model.d.ts +9 -5
- package/domain/generic/model/types/base-model-builder.type.d.ts +4 -2
- package/domain/generic/model/types/identifier-model.type.d.ts +6 -5
- package/domain/generic/model/types/model-base-structure.type.d.ts +9 -3
- package/domain/generic/model/types/non-function-property-name.type.d.ts +12 -3
- package/domain/generic/repository/find.repository.d.ts +7 -1
- 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 +11 -1
- 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 +5 -3
- package/domain/shop-settings/models/index.d.ts +1 -0
- package/domain/shop-settings/models/shop-settings.d.ts +9 -0
- package/domain/shop-settings/models/types/index.d.ts +6 -1
- package/domain/shop-settings/models/types/shop-banner.type.d.ts +12 -0
- package/domain/shop-settings/models/types/shop-brands.type.d.ts +10 -0
- package/domain/shop-settings/models/types/shop-carousel.type.d.ts +5 -0
- package/domain/shop-settings/models/types/shop-collection.type.d.ts +9 -0
- package/domain/shop-settings/models/types/shop-section.type.d.ts +9 -0
- package/domain/shop-settings/repositories/index.d.ts +1 -0
- package/domain/shop-settings/repositories/shop-settings.repository.d.ts +4 -0
- package/domain/shopping/models/buy-2-win.d.ts +3 -1
- package/domain/shopping/models/campaign-dashboard.d.ts +15 -0
- package/domain/shopping/models/campaign-hashtag.d.ts +18 -0
- package/domain/shopping/models/checkout.d.ts +5 -6
- package/domain/shopping/models/coupons/coupon.d.ts +34 -6
- package/domain/shopping/models/index.d.ts +5 -4
- package/domain/shopping/models/order.d.ts +1 -0
- package/domain/shopping/models/shipping-method.d.ts +1 -0
- package/domain/shopping/models/subscription/checkout.d.ts +3 -4
- package/domain/shopping/repositories/campaign-dashboard.repository.d.ts +4 -0
- package/domain/shopping/repositories/campaign-hashtag.repository.d.ts +4 -0
- package/domain/shopping/repositories/index.d.ts +4 -2
- package/domain/users/models/lead.d.ts +1 -0
- package/domain/users/models/subscription/subscription.d.ts +3 -3
- package/domain/users/models/user-address.d.ts +1 -2
- package/domain/users/models/user.d.ts +2 -3
- package/esm2020/domain/catalog/helpers/index.mjs +2 -0
- package/esm2020/domain/catalog/helpers/round-product-price.helper.mjs +15 -0
- package/esm2020/domain/catalog/index.mjs +2 -1
- package/esm2020/domain/catalog/models/category-base.mjs +18 -0
- package/esm2020/domain/catalog/models/category-collection-children.mjs +13 -0
- package/esm2020/domain/catalog/models/category-filter.mjs +19 -0
- package/esm2020/domain/catalog/models/category-for-product.mjs +7 -0
- package/esm2020/domain/catalog/models/category.mjs +10 -6
- package/esm2020/domain/catalog/models/filter-option.mjs +7 -0
- package/esm2020/domain/catalog/models/filter.mjs +7 -0
- package/esm2020/domain/catalog/models/index.mjs +6 -1
- package/esm2020/domain/catalog/models/kit-product.mjs +7 -7
- package/esm2020/domain/catalog/models/product-base.mjs +25 -0
- package/esm2020/domain/catalog/models/product-for-category.mjs +14 -0
- package/esm2020/domain/catalog/models/product-for-kit.mjs +14 -0
- package/esm2020/domain/catalog/models/product.mjs +8 -6
- package/esm2020/domain/catalog/models/types/category-product.mjs +2 -0
- package/esm2020/domain/catalog/models/types/index.mjs +3 -2
- package/esm2020/domain/catalog/models/types/product-evaluation.type.mjs +2 -0
- package/esm2020/domain/catalog/models/types/shop-description.type.mjs +1 -1
- package/esm2020/domain/catalog/models/variant.mjs +1 -4
- package/esm2020/domain/catalog/models/wishlist.mjs +7 -0
- package/esm2020/domain/catalog/repositories/category-collection-children.repository.mjs +2 -0
- package/esm2020/domain/catalog/repositories/category-filter.repository.mjs +2 -0
- package/esm2020/domain/catalog/repositories/category.repository.mjs +1 -1
- package/esm2020/domain/catalog/repositories/filter-option.repository.mjs +2 -0
- package/esm2020/domain/catalog/repositories/filter.repository.mjs +2 -0
- package/esm2020/domain/catalog/repositories/index.mjs +6 -1
- package/esm2020/domain/catalog/repositories/product.repository.mjs +1 -1
- package/esm2020/domain/catalog/repositories/wishlist.repository.mjs +2 -0
- package/esm2020/domain/generic/model/base.model.mjs +3 -2
- 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 +2 -1
- package/esm2020/domain/shop-settings/models/shop-settings.mjs +7 -0
- package/esm2020/domain/shop-settings/models/types/index.mjs +7 -2
- package/esm2020/domain/shop-settings/models/types/shop-banner.type.mjs +2 -0
- package/esm2020/domain/shop-settings/models/types/shop-brands.type.mjs +2 -0
- package/esm2020/domain/shop-settings/models/types/shop-carousel.type.mjs +2 -0
- package/esm2020/domain/shop-settings/models/types/shop-collection.type.mjs +2 -0
- package/esm2020/domain/shop-settings/models/types/shop-section.type.mjs +2 -0
- package/esm2020/domain/shop-settings/repositories/index.mjs +2 -1
- package/esm2020/domain/shop-settings/repositories/shop-settings.repository.mjs +2 -0
- package/esm2020/domain/shopping/models/buy-2-win.mjs +2 -2
- package/esm2020/domain/shopping/models/campaign-dashboard.mjs +7 -0
- package/esm2020/domain/shopping/models/campaign-hashtag.mjs +7 -0
- package/esm2020/domain/shopping/models/checkout.mjs +6 -7
- package/esm2020/domain/shopping/models/coupons/coupon.mjs +16 -16
- package/esm2020/domain/shopping/models/index.mjs +6 -5
- 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/campaign-dashboard.repository.mjs +2 -0
- package/esm2020/domain/shopping/repositories/campaign-hashtag.repository.mjs +2 -0
- package/esm2020/domain/shopping/repositories/index.mjs +5 -3
- 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 +28 -11
- package/esm2020/infra/elasticsearch/adapters/elastic-search.adapter.mjs +1 -1
- package/esm2020/infra/elasticsearch/indexes/products-index.mjs +63 -51
- package/esm2020/infra/elasticsearch/types/elastic-search-result.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-create-firestore.mixin.mjs +8 -4
- package/esm2020/infra/firebase/firestore/mixins/with-crud-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-delete-firestore.mixin.mjs +6 -2
- package/esm2020/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +11 -8
- package/esm2020/infra/firebase/firestore/mixins/with-firestore.mixin.mjs +27 -4
- package/esm2020/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +6 -3
- package/esm2020/infra/firebase/firestore/mixins/with-helpers.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-sub-collection.mixin.mjs +5 -3
- package/esm2020/infra/firebase/firestore/mixins/with-update-firestore.mixin.mjs +7 -4
- package/esm2020/infra/firebase/firestore/repositories/catalog/category-firestore.repository.mjs +21 -8
- package/esm2020/infra/firebase/firestore/repositories/catalog/product-firestore.repository.mjs +15 -7
- package/esm2020/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.mjs +36 -30
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/index.mjs +2 -1
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.mjs +14 -0
- package/esm2020/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.mjs +14 -0
- package/esm2020/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.mjs +14 -0
- package/esm2020/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/index.mjs +6 -4
- package/esm2020/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.mjs +6 -4
- package/esm2020/infra/firebase/firestore/repositories/shopping/order-firestore.repository.mjs +11 -9
- package/esm2020/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/users/lead-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/repositories/users/user-address-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/repositories/users/user-firestore.repository.mjs +8 -6
- package/esm2020/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.mjs +10 -8
- package/esm2020/infra/firebase/firestore/types/firestore-interceptors.type.mjs +2 -0
- 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 +4 -3
- 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 +6 -5
- package/esm2020/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +36 -25
- package/esm2020/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.mjs +6 -4
- 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 +5 -3
- package/esm2020/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.mjs +126 -20
- package/esm2020/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.mjs +5 -3
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +40 -22
- package/esm2020/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.mjs +7 -5
- 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-collection-children-hasura-graphql.repository.mjs +39 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.mjs +107 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +131 -14
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.mjs +105 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.mjs +22 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/index.mjs +6 -1
- package/esm2020/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +70 -20
- package/esm2020/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.mjs +9 -7
- package/esm2020/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.mjs +236 -0
- 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/decorators/debug.class.decorator.mjs +7 -0
- package/esm2020/utils/decorators/index.mjs +3 -0
- package/esm2020/utils/decorators/trace.method.decorator.mjs +81 -0
- package/esm2020/utils/helpers/class-name.helper.mjs +15 -0
- package/esm2020/utils/helpers/debug-decorator.helper.mjs +18 -0
- package/esm2020/utils/helpers/debug.helper.mjs +150 -0
- package/esm2020/utils/helpers/index.mjs +5 -0
- package/esm2020/utils/helpers/reflect.helper.mjs +165 -0
- package/esm2020/utils/index.mjs +6 -3
- package/esm2020/utils/log.utils.mjs +9 -0
- package/fesm2015/infrab4a-connect.mjs +1999 -417
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +1965 -419
- package/fesm2020/infrab4a-connect.mjs.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +7 -5
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +3 -2
- package/infra/elasticsearch/indexes/products-index.d.ts +8 -10
- package/infra/elasticsearch/types/elastic-search-result.d.ts +2 -0
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +2 -1
- 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 +13 -4
- 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 +8 -4
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +3 -3
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +8 -5
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +6 -5
- package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +1 -0
- package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.d.ts +7 -0
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.d.ts +8 -0
- package/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.d.ts +8 -0
- package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shopping/index.d.ts +5 -3
- package/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +3 -4
- package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +3 -4
- 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 +3 -4
- package/infra/firebase/firestore/types/firestore-interceptors.type.d.ts +14 -0
- 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 +3 -1
- package/infra/firebase/firestore/types/index.d.ts +3 -2
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +9 -3
- 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 +4 -2
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +9 -5
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +2 -1
- 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 +24 -15
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +7 -6
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +15 -3
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +2 -2
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +4 -0
- package/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +1 -0
- package/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.d.ts +10 -0
- package/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.d.ts +12 -0
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +12 -5
- package/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.d.ts +18 -0
- package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts +10 -0
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +5 -0
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +6 -4
- package/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +4 -4
- package/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +27 -0
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +9 -6
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +7 -3
- package/package.json +2 -1
- package/utils/decorators/debug.class.decorator.d.ts +2 -0
- package/utils/decorators/index.d.ts +2 -0
- package/utils/decorators/trace.method.decorator.d.ts +14 -0
- package/utils/helpers/class-name.helper.d.ts +3 -0
- package/utils/helpers/debug-decorator.helper.d.ts +9 -0
- package/utils/helpers/debug.helper.d.ts +60 -0
- package/utils/helpers/index.d.ts +4 -0
- package/utils/helpers/reflect.helper.d.ts +50 -0
- package/utils/index.d.ts +5 -2
- package/utils/log.utils.d.ts +7 -0
- package/domain/catalog/models/types/category-filter.type.d.ts +0 -4
- package/esm2020/domain/catalog/models/types/category-filter.type.mjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './round-product-price.helper';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
|
|
2
|
+
import { Shops } from './enums';
|
|
3
|
+
import { Filter } from './filter';
|
|
4
|
+
import { CategoryCondition, CategoryMetadata } from './types';
|
|
5
|
+
export declare class CategoryBase<ChildCategory extends ModelBaseStructure<ChildCategory, Identifiers> = ModelBaseStructure<any, any>, Identifiers = ChildCategory['identifiersFields']> extends BaseModel<ChildCategory, Identifiers> {
|
|
6
|
+
id: string;
|
|
7
|
+
brandCategory: boolean;
|
|
8
|
+
brandLogo?: string;
|
|
9
|
+
name: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
image?: string;
|
|
12
|
+
brandCategoryBanner?: string;
|
|
13
|
+
brandCategoryBannerMobile?: string;
|
|
14
|
+
description: string;
|
|
15
|
+
conditions?: CategoryCondition;
|
|
16
|
+
products?: string[];
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
|
+
shop?: Shops;
|
|
20
|
+
shops?: string[];
|
|
21
|
+
published: boolean;
|
|
22
|
+
metadata: CategoryMetadata;
|
|
23
|
+
isCollection?: boolean;
|
|
24
|
+
isWishlist?: boolean;
|
|
25
|
+
reference?: string;
|
|
26
|
+
parentId?: number;
|
|
27
|
+
parent?: CategoryBase;
|
|
28
|
+
filters?: Filter[];
|
|
29
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
|
+
export declare type CategoryCollectionChildrenIdentifiers = 'collectionId' | 'categoryId';
|
|
3
|
+
export declare class CategoryCollectionChildren extends BaseModel<CategoryCollectionChildren, CategoryCollectionChildrenIdentifiers> {
|
|
4
|
+
collectionId: number;
|
|
5
|
+
categoryId: number;
|
|
6
|
+
parentCollectionId?: number;
|
|
7
|
+
parentCategoryId?: number;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
reference?: string;
|
|
11
|
+
parent?: CategoryCollectionChildren;
|
|
12
|
+
static get identifiersFields(): CategoryCollectionChildrenIdentifiers[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
|
+
import { Category } from './category';
|
|
3
|
+
import { Filter } from './filter';
|
|
4
|
+
declare type CategoryFilterIdentifiers = 'id' | 'filterId' | 'categoryId';
|
|
5
|
+
export declare class CategoryFilter extends BaseModel<CategoryFilter, CategoryFilterIdentifiers> {
|
|
6
|
+
id: number;
|
|
7
|
+
filterId: number;
|
|
8
|
+
categoryId: number;
|
|
9
|
+
filter?: Filter;
|
|
10
|
+
category?: Category;
|
|
11
|
+
static get identifiersFields(): CategoryFilterIdentifiers[];
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare class Category extends
|
|
5
|
-
|
|
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>[];
|
|
1
|
+
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { CategoryBase } from './category-base';
|
|
3
|
+
import { ProductForCategory } from './product-for-category';
|
|
4
|
+
export declare class Category extends CategoryBase<Category, GenericIdentifier> {
|
|
5
|
+
childrenProducts?: ProductForCategory[];
|
|
23
6
|
static get identifiersFields(): GenericIdentifier[];
|
|
24
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
+
export declare class FilterOption extends BaseModel<FilterOption> {
|
|
3
|
+
id: string;
|
|
4
|
+
filterId: number;
|
|
5
|
+
description: string;
|
|
6
|
+
createdAt?: Date;
|
|
7
|
+
updatedAt?: Date;
|
|
8
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { FilterOption } from './filter-option';
|
|
3
|
+
export declare class Filter extends BaseModel<Filter> {
|
|
4
|
+
id: number;
|
|
5
|
+
description: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
options?: FilterOption[];
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
12
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from './category';
|
|
2
|
+
export * from './category-collection-children';
|
|
3
|
+
export * from './category-filter';
|
|
2
4
|
export * from './enums';
|
|
5
|
+
export * from './filter';
|
|
6
|
+
export * from './filter-option';
|
|
3
7
|
export * from './kit-product';
|
|
4
8
|
export * from './product';
|
|
5
9
|
export * from './types';
|
|
6
10
|
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 { ProductForKit } from './product-for-kit';
|
|
3
|
+
declare type KitProductIdentifiers = 'productId' | 'kitProductId';
|
|
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: ProductForKit;
|
|
9
|
+
product: ProductForKit;
|
|
10
10
|
static get identifiersFields(): KitProductIdentifiers[];
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
|
|
2
|
+
import { ProductEvaluation, ProductGender, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
|
|
3
|
+
import { Variant } from './variant';
|
|
4
|
+
export declare class ProductBase<ChildProduct extends ModelBaseStructure<ChildProduct, Identifiers>, Identifiers = ChildProduct['identifiersFields']> extends BaseModel<ChildProduct, Identifiers> {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
slug: string;
|
|
8
|
+
description: ShopDescription;
|
|
9
|
+
sku: string;
|
|
10
|
+
price: ShopPrice;
|
|
11
|
+
hasVariants: boolean;
|
|
12
|
+
NCM: string;
|
|
13
|
+
EAN: string;
|
|
14
|
+
CEST: string;
|
|
15
|
+
weight: number;
|
|
16
|
+
stock: Stock;
|
|
17
|
+
costPrice: number;
|
|
18
|
+
images?: string[];
|
|
19
|
+
miniatures?: string[];
|
|
20
|
+
published: boolean;
|
|
21
|
+
createdAt?: Date;
|
|
22
|
+
updatedAt?: Date;
|
|
23
|
+
brand: string;
|
|
24
|
+
tags?: string[];
|
|
25
|
+
filters?: 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;
|
|
36
|
+
private reviewsTotal?;
|
|
37
|
+
get evaluation(): ProductEvaluation;
|
|
38
|
+
set evaluation(evaluation: ProductEvaluation);
|
|
39
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { KitProduct } from './kit-product';
|
|
3
|
+
import { ProductBase } from './product-base';
|
|
4
|
+
export declare class ProductForCategory extends ProductBase<ProductForCategory, GenericIdentifier> {
|
|
5
|
+
kitProducts?: KitProduct[];
|
|
6
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { CategoryForProduct } from './category-for-product';
|
|
3
|
+
import { ProductBase } from './product-base';
|
|
4
|
+
export declare class ProductForKit extends ProductBase<ProductForKit, GenericIdentifier> {
|
|
5
|
+
category: CategoryForProduct;
|
|
6
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
7
|
+
}
|
|
@@ -1,39 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { CategoryForProduct } from './category-for-product';
|
|
2
3
|
import { KitProduct } from './kit-product';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
4
|
+
import { ProductBase } from './product-base';
|
|
5
|
+
export declare class Product extends ProductBase<Product, GenericIdentifier> {
|
|
6
|
+
category: CategoryForProduct;
|
|
36
7
|
kitProducts?: KitProduct[];
|
|
37
|
-
identifierFields(): NonFunctionPropertyNames<Product>[];
|
|
38
8
|
static get identifiersFields(): GenericIdentifier[];
|
|
39
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './category-condition.type';
|
|
2
|
-
export * from './category-filter.type';
|
|
3
2
|
export * from './category-metadata.type';
|
|
3
|
+
export * from './category-product';
|
|
4
|
+
export * from './product-evaluation.type';
|
|
4
5
|
export * from './product-gender.type';
|
|
5
6
|
export * from './product-metadata.type';
|
|
6
7
|
export * from './product-review.type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } 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,6 +13,5 @@ export declare class Variant extends BaseModel<Variant, ProductVariantIdentifier
|
|
|
13
13
|
weight: number;
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
|
-
identifierFields(): NonFunctionPropertyNames<Variant>[];
|
|
17
16
|
static get identifiersFields(): ProductVariantIdentifiers[];
|
|
18
17
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
+
import { CategoryFilter } from '../models';
|
|
3
|
+
export interface CategoryFilterRepository extends CrudRepository<CategoryFilter> {
|
|
4
|
+
deleteByCategoryAndFilter(categoryId: number, filterId: number): Promise<any>;
|
|
5
|
+
deleteByCategory(categoryId: number): Promise<any>;
|
|
6
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Category } from '../models/category';
|
|
2
1
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
|
-
import { Shops } from '../models/enums/shops.enum';
|
|
4
2
|
import { Product } from '../models';
|
|
3
|
+
import { Category } from '../models/category';
|
|
4
|
+
import { Shops } from '../models/enums/shops.enum';
|
|
5
5
|
export interface CategoryRepository extends CrudRepository<Category> {
|
|
6
6
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
7
|
-
|
|
7
|
+
getCategoryByShop(shop: string): Promise<Category[]>;
|
|
8
|
+
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
8
9
|
category: Category;
|
|
9
10
|
products: Product[];
|
|
10
11
|
}[]>;
|
|
@@ -12,4 +13,6 @@ export interface CategoryRepository extends CrudRepository<Category> {
|
|
|
12
13
|
limit?: number;
|
|
13
14
|
hasStock?: boolean;
|
|
14
15
|
}): Promise<Product[]>;
|
|
16
|
+
getChildren(parentId: number): Promise<Category[]>;
|
|
17
|
+
isChild(id: number, parentId: number): Promise<boolean>;
|
|
15
18
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
export * from './category-collection-children.repository';
|
|
2
|
+
export * from './category-filter.repository';
|
|
1
3
|
export * from './category.repository';
|
|
4
|
+
export * from './filter-option.repository';
|
|
5
|
+
export * from './filter.repository';
|
|
2
6
|
export * from './product.repository';
|
|
3
7
|
export * from './subscription-product.repository';
|
|
4
8
|
export * from './variant.repository';
|
|
9
|
+
export * from './wishlist.repository';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
1
2
|
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
-
import { Product, ProductReview } from '../models';
|
|
3
|
+
import { Product, ProductGender, ProductReview } from '../models';
|
|
3
4
|
export declare type ReviewStatusParams = 'pending' | 'approved' | 'rejected';
|
|
4
5
|
export declare type ReviewWithProductData = ProductReview & {
|
|
5
6
|
productId: string;
|
|
@@ -9,4 +10,6 @@ export declare type ReviewWithProductData = ProductReview & {
|
|
|
9
10
|
export interface ProductRepository extends CrudRepository<Product> {
|
|
10
11
|
getBySlug(slug: string): Promise<Product>;
|
|
11
12
|
fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
|
|
13
|
+
cleanShoppingCountFromIds(ids: string[]): Promise<any>;
|
|
14
|
+
findCatalog(params: FindRepositoryParams<Product>, mainGender?: Extract<ProductGender, 'female' | 'male'>): Promise<RepositoryFindResult<Product>>;
|
|
12
15
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CategoryRepository } from '.';
|
|
2
|
+
import { Wishlist } from '../models/wishlist';
|
|
3
|
+
export interface WishlistRepository extends CategoryRepository {
|
|
4
|
+
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
5
|
+
getWishlistByPerson(personId: string): Promise<Wishlist[]>;
|
|
6
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { ModelBaseStructure, NonFunctionAndIdentifierProperties,
|
|
2
|
-
export declare type GenericIdentifier<
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ModelBaseStructure, NonFunctionAndIdentifierProperties, NonFunctionAndIdentifierPropertyNames } from './types';
|
|
2
|
+
export declare type GenericIdentifier<M = {
|
|
3
|
+
id: string;
|
|
4
|
+
}, T = NonFunctionAndIdentifierPropertyNames<M>> = T;
|
|
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
|
+
};
|
|
5
9
|
get identifiersFields(): Identifiers[];
|
|
6
10
|
constructor(args?: Partial<Model>);
|
|
7
|
-
static toInstance<T
|
|
11
|
+
static toInstance<T>(this: new () => T, data?: Partial<NonFunctionAndIdentifierProperties<T>>): T;
|
|
8
12
|
static isModel<T extends ModelBaseStructure>(this: new () => T, value: any): value is T;
|
|
9
13
|
toPlain(): any;
|
|
10
14
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PartialIdentifiersModel } from './identifier-model.type';
|
|
2
|
+
import { ModelBaseStructure } from './model-base-structure.type';
|
|
1
3
|
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
2
4
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
3
|
-
export interface BaseModelBuilder<T
|
|
5
|
+
export interface BaseModelBuilder<T extends ModelBaseStructure<T>, Identifiers = NonFunctionAndIdentifierPropertyNames<T> | any, P extends T & {
|
|
4
6
|
prototype: unknown;
|
|
5
7
|
} = T & {
|
|
6
8
|
prototype: unknown;
|
|
@@ -10,6 +12,6 @@ export interface BaseModelBuilder<T, Identifiers = NonFunctionAndIdentifierPrope
|
|
|
10
12
|
prototype: {
|
|
11
13
|
[key in keyof P['prototype']]: P['prototype'][key];
|
|
12
14
|
};
|
|
13
|
-
toInstance(this: new () =>
|
|
15
|
+
toInstance<E>(this: new () => E, data?: NonFunctionAndIdentifierPropertiesWithNoPartial<T> | PartialIdentifiersModel<T>): E;
|
|
14
16
|
isModel(model: any): model is T;
|
|
15
17
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropType } from '../../../../utils';
|
|
2
2
|
import { ModelBaseStructure } from './model-base-structure.type';
|
|
3
|
-
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
4
3
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
5
|
-
export declare type IdentifierModel<Model extends ModelBaseStructure> =
|
|
6
|
-
export declare type IdentifiersModel<Model extends ModelBaseStructure> =
|
|
7
|
-
|
|
4
|
+
export declare type IdentifierModel<Model extends ModelBaseStructure> = Extract<NonFunctionAndIdentifierPropertyNames<Model>, PropType<Model, 'identifiersFields'>[number]>;
|
|
5
|
+
export declare type IdentifiersModel<Model extends ModelBaseStructure> = {
|
|
6
|
+
[K in IdentifierModel<Model>]: Model[K];
|
|
7
|
+
};
|
|
8
|
+
export declare type PartialIdentifiersModel<Model extends ModelBaseStructure> = Partial<IdentifiersModel<Model>>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { NonFunctionAndIdentifierPropertyNames } from '..';
|
|
2
|
+
declare type ModelBaseStructureRecord = Record<string, any> & {
|
|
3
|
+
identifiersFields: any[];
|
|
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
|
+
};
|
|
4
9
|
identifiersFields: I[];
|
|
5
10
|
toPlain: any;
|
|
6
11
|
};
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export declare type
|
|
2
|
-
|
|
1
|
+
export declare type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
|
|
2
|
+
export declare type ReadonlyKeys<T> = {
|
|
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;
|
|
3
12
|
}[E];
|
|
4
|
-
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<
|
|
13
|
+
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<Omit<T, 'identifier' | 'identifiersFields'>>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { ModelBaseStructure, NonFunctionPropertyNames } from '../model/types';
|
|
1
|
+
import { ModelBaseStructure, NonFunctionAndIdentifierPropertyNames, 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
|
+
distinct?: Array<NonFunctionAndIdentifierPropertyNames<Model> | {}>;
|
|
13
|
+
};
|
|
8
14
|
};
|
|
9
15
|
export interface FindRepository<Model extends ModelBaseStructure, Params = FindRepositoryParams<Model>> {
|
|
10
16
|
find(options?: Params): Promise<RepositoryFindResult<Model>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type GetRepositoryParams<Model extends ModelBaseStructure> =
|
|
1
|
+
import { IdentifiersModel, ModelBaseStructure } from '../model/types';
|
|
2
|
+
export declare type GetRepositoryParams<Model extends ModelBaseStructure> = IdentifiersModel<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 { NonFunctionAndIdentifierPropertyNames } 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 NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? 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> = NestedRepositoryFindFieltersOptions<Model>;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import { NonFunctionAndIdentifierPropertiesWithNoPartial, NonFunctionAndIdentifierPropertyNames } from '../../model';
|
|
2
|
+
declare type SortableFields<Model, K extends NonFunctionAndIdentifierPropertiesWithNoPartial<Model> = NonFunctionAndIdentifierPropertiesWithNoPartial<Model>> = {
|
|
3
|
+
[key in keyof K]: K[key];
|
|
4
|
+
};
|
|
1
5
|
export declare type RepositoryFindResult<Model> = {
|
|
2
6
|
data: Model[];
|
|
3
|
-
count
|
|
7
|
+
count?: number;
|
|
8
|
+
minimal?: SortableFields<Model>;
|
|
9
|
+
maximum?: SortableFields<Model>;
|
|
10
|
+
distinct?: {
|
|
11
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]: Model[key] extends string ? Model[key][] : Model[key] extends number ? Model[key][] : Model[key] extends boolean ? Model[key][] : Model[key] extends Date ? Model[key][] : never;
|
|
12
|
+
};
|
|
4
13
|
};
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonFunctionAndIdentifierPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
2
2
|
export declare type RepositoryOrderBy<Model> = {
|
|
3
|
-
[key in
|
|
3
|
+
[key in NonFunctionAndIdentifierPropertyNames<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 { NonFunctionAndIdentifierPropertyNames } 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 NonFunctionAndIdentifierPropertyNames<Model>]?: UpdateOptions<PropType<Model, key>> | PropType<Model, key>;
|
|
11
11
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic
|
|
1
|
+
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic';
|
|
2
2
|
import { LocationGeometry } from './types/location-geometry.type';
|
|
3
|
-
export declare abstract class Address<Identifiers =
|
|
3
|
+
export declare abstract class Address<ChildAddress extends ModelBaseStructure<ChildAddress, Identifiers>, Identifiers = ChildAddress['identifiersFields']> extends BaseModel<ChildAddress, Identifiers> {
|
|
4
|
+
id: string;
|
|
4
5
|
default?: boolean;
|
|
5
6
|
recipient?: string;
|
|
6
7
|
zip?: string;
|
|
7
8
|
street?: string;
|
|
8
9
|
number?: string;
|
|
9
10
|
extension?: string;
|
|
11
|
+
reference?: string;
|
|
10
12
|
district?: string;
|
|
11
13
|
city?: string;
|
|
12
14
|
regionalPole?: string;
|
|
@@ -18,5 +20,5 @@ export declare abstract class Address<Identifiers = GenericIdentifier> extends B
|
|
|
18
20
|
formattedAddress?: string;
|
|
19
21
|
placeId?: string;
|
|
20
22
|
geometry?: LocationGeometry;
|
|
21
|
-
static get identifiersFields():
|
|
23
|
+
static get identifiersFields(): Array<GenericIdentifier | {}>;
|
|
22
24
|
}
|