@infrab4a/connect 1.0.0-beta.39 → 1.0.0-beta.4
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/bundles/infrab4a-connect.umd.js +212 -2113
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/category.d.ts +4 -5
- package/domain/catalog/models/index.d.ts +2 -3
- package/domain/catalog/models/product.d.ts +4 -9
- package/domain/catalog/models/types/product-review.type.d.ts +8 -10
- package/domain/catalog/models/variant.d.ts +3 -7
- package/domain/catalog/repositories/category.repository.d.ts +1 -1
- package/domain/catalog/repositories/product.repository.d.ts +3 -10
- package/domain/catalog/repositories/subscription-product.repository.d.ts +1 -1
- package/domain/catalog/repositories/variant.repository.d.ts +1 -1
- package/domain/general/model/base-model-with-identifier-fields.d.ts +3 -0
- package/domain/general/model/base.model.d.ts +6 -0
- package/domain/{generic → general}/model/index.d.ts +1 -0
- package/domain/general/model/types/base-model-builder.type.d.ts +5 -0
- package/domain/{generic → general}/model/types/index.d.ts +0 -2
- package/domain/general/model/types/non-function-properties.type.d.ts +2 -0
- package/domain/general/model/types/non-function-property-name.type.d.ts +3 -0
- package/domain/general/repository/create.repository.d.ts +5 -0
- package/domain/general/repository/crud.repository.d.ts +7 -0
- package/domain/general/repository/delete.repository.d.ts +5 -0
- package/domain/{generic → general}/repository/enums/where.enum.d.ts +2 -5
- package/domain/general/repository/find.repository.d.ts +5 -0
- package/domain/general/repository/get.repository.d.ts +5 -0
- package/domain/general/repository/read.repository.d.ts +5 -0
- package/domain/{generic → general}/repository/types/index.d.ts +0 -1
- package/domain/general/repository/types/repository-find-filters.type.d.ts +14 -0
- package/domain/{generic → general}/repository/types/repository-update-params.type.d.ts +4 -4
- package/domain/general/repository/update.repository.d.ts +5 -0
- package/domain/index.d.ts +1 -1
- package/domain/location/models/address.d.ts +2 -3
- package/domain/shop-settings/models/home.d.ts +3 -3
- package/domain/shop-settings/models/shop-menu.d.ts +3 -3
- package/domain/shop-settings/repositories/home.repository.d.ts +1 -1
- package/domain/shop-settings/repositories/shop-menu.repository.d.ts +1 -1
- package/domain/shopping/models/buy-2-win.d.ts +5 -3
- package/domain/shopping/models/checkout.d.ts +9 -7
- package/domain/shopping/models/coupons/club-coupon.d.ts +7 -0
- package/domain/shopping/models/coupons/coupon.d.ts +15 -13
- package/domain/shopping/models/coupons/enums/discount-type.enum.d.ts +5 -0
- package/domain/shopping/models/coupons/enums/index.d.ts +1 -2
- package/domain/shopping/models/coupons/index.d.ts +2 -1
- package/domain/shopping/models/coupons/store-coupon.d.ts +8 -0
- package/domain/shopping/models/payment.d.ts +5 -3
- package/domain/shopping/models/shipping-method.d.ts +5 -3
- package/domain/shopping/models/subscription/checkout.d.ts +5 -3
- package/domain/shopping/models/subscription/plan.d.ts +5 -3
- package/domain/shopping/repositories/buy-2-win.repository.d.ts +1 -1
- package/domain/shopping/repositories/checkout.repository.d.ts +1 -1
- package/domain/shopping/repositories/coupon.repository.d.ts +1 -1
- package/domain/shopping/repositories/order.repository.d.ts +1 -1
- package/domain/shopping/repositories/payment.repository.d.ts +1 -1
- package/domain/shopping/repositories/subscription/checkout.repository.d.ts +1 -1
- package/domain/shopping/repositories/subscription/plan.repository.d.ts +1 -1
- package/domain/users/errors/unauthorized.error.d.ts +1 -2
- package/domain/users/errors/user-already-registered.error.d.ts +1 -2
- package/domain/users/errors/weak-password.error.d.ts +1 -2
- package/domain/users/models/beauty-profile.d.ts +5 -4
- package/domain/users/models/lead.d.ts +5 -3
- package/domain/users/models/subscription/edition.d.ts +5 -4
- package/domain/users/models/subscription/payment.d.ts +5 -4
- package/domain/users/models/subscription/subscription.d.ts +5 -3
- package/domain/users/models/user-address.d.ts +3 -3
- package/domain/users/models/user-payment-method.d.ts +4 -4
- package/domain/users/models/user.d.ts +10 -11
- package/domain/users/repositories/beauty-profile.repository.d.ts +1 -1
- package/domain/users/repositories/edition.repository.d.ts +1 -1
- package/domain/users/repositories/lead.repository.d.ts +1 -1
- package/domain/users/repositories/subscription-payment.repository.d.ts +1 -1
- package/domain/users/repositories/subscription.repository.d.ts +1 -1
- package/domain/users/repositories/user-address.repository.d.ts +1 -1
- package/domain/users/repositories/user-payment-method.repository.d.ts +1 -1
- package/domain/users/repositories/user.repository.d.ts +2 -2
- package/errors/duplicated-results.error.d.ts +1 -2
- package/errors/invalid-argument.error.d.ts +1 -2
- package/errors/not-found.error.d.ts +1 -2
- package/errors/required-argument.error.d.ts +1 -2
- package/esm2015/domain/catalog/models/category.js +2 -5
- package/esm2015/domain/catalog/models/index.js +3 -4
- package/esm2015/domain/catalog/models/product.js +2 -12
- package/esm2015/domain/catalog/models/types/product-review.type.js +1 -1
- package/esm2015/domain/catalog/models/variant.js +2 -5
- package/esm2015/domain/catalog/repositories/category.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/product.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/subscription-product.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/variant.repository.js +1 -1
- package/esm2015/domain/{generic → general}/index.js +1 -1
- package/esm2015/domain/general/model/base-model-with-identifier-fields.js +2 -0
- package/esm2015/domain/general/model/base.model.js +13 -0
- package/esm2015/domain/{generic → general}/model/identifier-fields.js +1 -1
- package/esm2015/domain/general/model/index.js +5 -0
- package/esm2015/domain/general/model/types/base-model-builder.type.js +2 -0
- package/esm2015/domain/general/model/types/index.js +4 -0
- package/esm2015/domain/general/model/types/non-function-properties.type.js +2 -0
- package/esm2015/domain/general/model/types/non-function-property-name.type.js +2 -0
- package/esm2015/domain/general/repository/create.repository.js +2 -0
- package/esm2015/domain/general/repository/crud.repository.js +2 -0
- package/esm2015/domain/general/repository/delete.repository.js +2 -0
- package/esm2015/domain/{generic → general}/repository/enums/index.js +1 -1
- package/esm2015/domain/{generic → general}/repository/enums/update-option-actions.enum.js +1 -1
- package/esm2015/domain/general/repository/enums/where.enum.js +12 -0
- package/esm2015/domain/general/repository/find.repository.js +2 -0
- package/esm2015/domain/general/repository/get.repository.js +2 -0
- package/esm2015/domain/{generic → general}/repository/index.js +1 -1
- package/esm2015/domain/general/repository/read.repository.js +2 -0
- package/esm2015/domain/general/repository/types/index.js +6 -0
- package/esm2015/domain/general/repository/types/repository-find-filters.type.js +2 -0
- package/esm2015/domain/{generic → general}/repository/types/repository-find-result.type.js +1 -1
- package/esm2015/domain/{generic → general}/repository/types/repository-limit-options.type.js +1 -1
- package/esm2015/domain/{generic → general}/repository/types/repository-order-by-list.type.js +1 -1
- package/esm2015/domain/general/repository/types/repository-update-params.type.js +2 -0
- package/esm2015/domain/general/repository/update.repository.js +2 -0
- package/esm2015/domain/index.js +2 -2
- package/esm2015/domain/location/models/address.js +2 -5
- package/esm2015/domain/shop-settings/models/home.js +3 -3
- package/esm2015/domain/shop-settings/models/shop-menu.js +3 -3
- package/esm2015/domain/shop-settings/repositories/home.repository.js +1 -1
- package/esm2015/domain/shop-settings/repositories/shop-menu.repository.js +1 -1
- package/esm2015/domain/shopping/models/buy-2-win.js +3 -3
- package/esm2015/domain/shopping/models/checkout.js +14 -6
- package/esm2015/domain/shopping/models/coupons/club-coupon.js +18 -0
- package/esm2015/domain/shopping/models/coupons/coupon.js +12 -4
- package/esm2015/domain/shopping/models/coupons/enums/discount-type.enum.js +7 -0
- package/esm2015/domain/shopping/models/coupons/enums/index.js +2 -3
- package/esm2015/domain/shopping/models/coupons/index.js +3 -2
- package/esm2015/domain/shopping/models/coupons/store-coupon.js +23 -0
- package/esm2015/domain/shopping/models/payment.js +3 -3
- package/esm2015/domain/shopping/models/shipping-method.js +3 -3
- package/esm2015/domain/shopping/models/subscription/checkout.js +3 -3
- package/esm2015/domain/shopping/models/subscription/plan.js +3 -3
- package/esm2015/domain/shopping/repositories/buy-2-win.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/checkout.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/coupon.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/order.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/payment.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/subscription/checkout.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/subscription/plan.repository.js +1 -1
- package/esm2015/domain/users/errors/unauthorized.error.js +2 -3
- package/esm2015/domain/users/errors/user-already-registered.error.js +2 -3
- package/esm2015/domain/users/errors/weak-password.error.js +2 -3
- package/esm2015/domain/users/models/beauty-profile.js +4 -4
- package/esm2015/domain/users/models/lead.js +3 -3
- package/esm2015/domain/users/models/subscription/edition.js +4 -4
- package/esm2015/domain/users/models/subscription/payment.js +4 -4
- package/esm2015/domain/users/models/subscription/subscription.js +3 -3
- package/esm2015/domain/users/models/user-address.js +3 -3
- package/esm2015/domain/users/models/user-payment-method.js +4 -4
- package/esm2015/domain/users/models/user.js +5 -5
- package/esm2015/domain/users/repositories/beauty-profile.repository.js +1 -1
- package/esm2015/domain/users/repositories/edition.repository.js +1 -1
- package/esm2015/domain/users/repositories/lead.repository.js +1 -1
- package/esm2015/domain/users/repositories/subscription-payment.repository.js +1 -1
- package/esm2015/domain/users/repositories/subscription.repository.js +1 -1
- package/esm2015/domain/users/repositories/user-address.repository.js +1 -1
- package/esm2015/domain/users/repositories/user-payment-method.repository.js +1 -1
- package/esm2015/domain/users/repositories/user.repository.js +1 -1
- package/esm2015/errors/duplicated-results.error.js +2 -3
- package/esm2015/errors/invalid-argument.error.js +2 -3
- package/esm2015/errors/not-found.error.js +2 -3
- package/esm2015/errors/required-argument.error.js +2 -3
- package/esm2015/infra/elasticsearch/adapters/axios.adapter.js +1 -36
- package/esm2015/infra/elasticsearch/adapters/elastic-search.adapter.js +1 -1
- package/esm2015/infra/elasticsearch/indexes/products-index.js +1 -35
- package/esm2015/infra/firebase/auth/authentication-firebase-auth.service.js +2 -2
- package/esm2015/infra/firebase/auth/register-firebase-auth.service.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +2 -2
- package/esm2015/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +10 -9
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +6 -2
- package/esm2015/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-helpers.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +4 -4
- package/esm2015/infra/firebase/firestore/models/user-search.js +3 -3
- package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +2 -4
- package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +8 -37
- package/esm2015/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +21 -11
- package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +2 -2
- package/esm2015/infra/firebase/firestore/types/firestore-sub.repository.type.js +1 -1
- package/esm2015/infra/firebase/firestore/types/firestore.helpers.type.js +1 -1
- package/esm2015/infra/firebase/firestore/types/firestore.repository.type.js +1 -1
- package/esm2015/infra/index.js +1 -2
- package/esm2015/utils/index.js +4 -6
- package/esm2015/utils/mixins/index.js +1 -2
- package/esm2015/utils/mixins/mixin-ctor.type.js +1 -1
- package/esm2015/utils/types/index.js +1 -2
- package/fesm2015/infrab4a-connect.js +141 -1369
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +0 -3
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +0 -3
- package/infra/elasticsearch/indexes/products-index.d.ts +1 -5
- package/infra/firebase/auth/authentication-firebase-auth.service.d.ts +1 -1
- package/infra/firebase/auth/register-firebase-auth.service.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +16 -3
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +28 -3
- package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +14 -3
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +19 -3
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +14 -3
- package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +14 -3
- package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +4 -5
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +14 -7
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +15 -6
- package/infra/firebase/firestore/models/user-search.d.ts +3 -3
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +44 -5
- package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +51 -4
- package/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +42 -1
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +3 -7
- package/infra/index.d.ts +0 -1
- package/package.json +3 -5
- package/utils/index.d.ts +4 -5
- package/utils/mixins/index.d.ts +0 -1
- package/utils/mixins/mixin-ctor.type.d.ts +1 -1
- package/utils/types/index.d.ts +0 -1
- package/domain/catalog/models/kit-product.d.ts +0 -12
- package/domain/generic/model/base.model.d.ts +0 -10
- package/domain/generic/model/types/base-model-builder.type.d.ts +0 -15
- package/domain/generic/model/types/identifier-model.type.d.ts +0 -7
- package/domain/generic/model/types/model-base-structure.type.d.ts +0 -6
- package/domain/generic/model/types/non-function-properties.type.d.ts +0 -12
- package/domain/generic/model/types/non-function-property-name.type.d.ts +0 -4
- package/domain/generic/repository/create.repository.d.ts +0 -8
- package/domain/generic/repository/crud.repository.d.ts +0 -19
- package/domain/generic/repository/delete.repository.d.ts +0 -7
- package/domain/generic/repository/find.repository.d.ts +0 -11
- package/domain/generic/repository/get.repository.d.ts +0 -5
- package/domain/generic/repository/read.repository.d.ts +0 -14
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +0 -13
- package/domain/generic/repository/types/where-options.type.d.ts +0 -2
- package/domain/generic/repository/update.repository.d.ts +0 -6
- package/domain/shopping/models/coupons/enums/coupon-subtypes.enum.d.ts +0 -4
- package/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +0 -6
- package/domain/shopping/models/coupons/financial-coupon.d.ts +0 -9
- package/esm2015/domain/catalog/models/kit-product.js +0 -18
- package/esm2015/domain/generic/model/base.model.js +0 -23
- package/esm2015/domain/generic/model/index.js +0 -4
- package/esm2015/domain/generic/model/types/base-model-builder.type.js +0 -2
- package/esm2015/domain/generic/model/types/identifier-model.type.js +0 -2
- package/esm2015/domain/generic/model/types/index.js +0 -6
- package/esm2015/domain/generic/model/types/model-base-structure.type.js +0 -2
- package/esm2015/domain/generic/model/types/non-function-properties.type.js +0 -2
- package/esm2015/domain/generic/model/types/non-function-property-name.type.js +0 -2
- package/esm2015/domain/generic/repository/create.repository.js +0 -2
- package/esm2015/domain/generic/repository/crud.repository.js +0 -2
- package/esm2015/domain/generic/repository/delete.repository.js +0 -2
- package/esm2015/domain/generic/repository/enums/where.enum.js +0 -15
- package/esm2015/domain/generic/repository/find.repository.js +0 -2
- package/esm2015/domain/generic/repository/get.repository.js +0 -2
- package/esm2015/domain/generic/repository/read.repository.js +0 -2
- package/esm2015/domain/generic/repository/types/index.js +0 -7
- package/esm2015/domain/generic/repository/types/repository-find-filters.type.js +0 -2
- package/esm2015/domain/generic/repository/types/repository-update-params.type.js +0 -2
- package/esm2015/domain/generic/repository/types/where-options.type.js +0 -2
- package/esm2015/domain/generic/repository/update.repository.js +0 -2
- package/esm2015/domain/shopping/models/coupons/enums/coupon-subtypes.enum.js +0 -6
- package/esm2015/domain/shopping/models/coupons/enums/coupon-types.enum.js +0 -8
- package/esm2015/domain/shopping/models/coupons/financial-coupon.js +0 -28
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.js +0 -13
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-where.enum.js +0 -15
- package/esm2015/infra/hasura-graphql/enums/index.js +0 -3
- package/esm2015/infra/hasura-graphql/index.js +0 -5
- package/esm2015/infra/hasura-graphql/mixins/helpers/attribute-option.helper.js +0 -31
- package/esm2015/infra/hasura-graphql/mixins/helpers/filter-option.helper.js +0 -18
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +0 -72
- package/esm2015/infra/hasura-graphql/mixins/helpers/index.js +0 -4
- package/esm2015/infra/hasura-graphql/mixins/index.js +0 -8
- package/esm2015/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.js +0 -45
- package/esm2015/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.js +0 -10
- package/esm2015/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.js +0 -29
- package/esm2015/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.js +0 -93
- package/esm2015/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.js +0 -35
- package/esm2015/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.js +0 -94
- package/esm2015/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.js +0 -56
- package/esm2015/infra/hasura-graphql/models/category-hasura-graphql.js +0 -4
- package/esm2015/infra/hasura-graphql/models/index.js +0 -5
- package/esm2015/infra/hasura-graphql/models/kit-product-hasura-graphql.js +0 -15
- package/esm2015/infra/hasura-graphql/models/product-hasura-graphql.js +0 -11
- package/esm2015/infra/hasura-graphql/models/variant-hasura-graphql.js +0 -9
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +0 -136
- package/esm2015/infra/hasura-graphql/repositories/catalog/index.js +0 -4
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +0 -375
- package/esm2015/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.js +0 -100
- package/esm2015/infra/hasura-graphql/repositories/index.js +0 -2
- package/esm2015/infra/hasura-graphql/types/fields.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/graphql.repository.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-auth-options.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-fields.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-headers.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/index.js +0 -9
- package/esm2015/infra/hasura-graphql/types/nested-field.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/query-builder-options.type.js +0 -2
- package/esm2015/infra/hasura-graphql/types/variable-options.type.js +0 -2
- package/esm2015/utils/is-uuid.js +0 -3
- package/esm2015/utils/mixins/merge-constructor-params.type.js +0 -2
- package/esm2015/utils/parse-datetime.js +0 -14
- package/esm2015/utils/types/array-element.type.js +0 -2
- package/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.d.ts +0 -11
- package/infra/hasura-graphql/enums/hasura-graphql-where.enum.d.ts +0 -13
- package/infra/hasura-graphql/enums/index.d.ts +0 -2
- package/infra/hasura-graphql/index.d.ts +0 -4
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +0 -13
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +0 -6
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +0 -8
- package/infra/hasura-graphql/mixins/helpers/index.d.ts +0 -3
- package/infra/hasura-graphql/mixins/index.d.ts +0 -7
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +0 -8
- package/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.d.ts +0 -11
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +0 -7
- package/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +0 -31
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +0 -24
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +0 -11
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +0 -14
- package/infra/hasura-graphql/models/category-hasura-graphql.d.ts +0 -6
- package/infra/hasura-graphql/models/index.d.ts +0 -4
- package/infra/hasura-graphql/models/kit-product-hasura-graphql.d.ts +0 -6
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +0 -9
- package/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +0 -9
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +0 -22
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -3
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +0 -26
- package/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +0 -13
- package/infra/hasura-graphql/repositories/index.d.ts +0 -1
- package/infra/hasura-graphql/types/fields.type.d.ts +0 -2
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +0 -21
- package/infra/hasura-graphql/types/hasura-graphql-auth-options.type.d.ts +0 -8
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +0 -36
- package/infra/hasura-graphql/types/hasura-graphql-headers.type.d.ts +0 -7
- package/infra/hasura-graphql/types/index.d.ts +0 -8
- package/infra/hasura-graphql/types/nested-field.type.d.ts +0 -7
- package/infra/hasura-graphql/types/query-builder-options.type.d.ts +0 -7
- package/infra/hasura-graphql/types/variable-options.type.d.ts +0 -9
- package/utils/is-uuid.d.ts +0 -1
- package/utils/mixins/merge-constructor-params.type.d.ts +0 -3
- package/utils/parse-datetime.d.ts +0 -1
- package/utils/types/array-element.type.d.ts +0 -1
- /package/domain/{generic → general}/index.d.ts +0 -0
- /package/domain/{generic → general}/model/identifier-fields.d.ts +0 -0
- /package/domain/{generic → general}/repository/enums/index.d.ts +0 -0
- /package/domain/{generic → general}/repository/enums/update-option-actions.enum.d.ts +0 -0
- /package/domain/{generic → general}/repository/index.d.ts +0 -0
- /package/domain/{generic → general}/repository/types/repository-find-result.type.d.ts +0 -0
- /package/domain/{generic → general}/repository/types/repository-limit-options.type.d.ts +0 -0
- /package/domain/{generic → general}/repository/types/repository-order-by-list.type.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseModel,
|
|
1
|
+
import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
|
|
2
2
|
import { Shops } from './enums';
|
|
3
3
|
import { CategoryCondition, CategoryFilter } from './types';
|
|
4
|
-
export declare class Category extends BaseModel<Category> {
|
|
4
|
+
export declare class Category extends BaseModel<Category> implements IdentifierFields<Category> {
|
|
5
5
|
id: string;
|
|
6
6
|
brandCategory: boolean;
|
|
7
7
|
brandLogo?: string;
|
|
@@ -14,10 +14,9 @@ export declare class Category extends BaseModel<Category> {
|
|
|
14
14
|
conditions?: CategoryCondition;
|
|
15
15
|
products?: string[];
|
|
16
16
|
filters?: CategoryFilter[];
|
|
17
|
-
createdAt
|
|
18
|
-
updatedAt
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
19
|
shop: Shops;
|
|
20
20
|
published: boolean;
|
|
21
21
|
identifierFields(): NonFunctionPropertyNames<Category>[];
|
|
22
|
-
static get identifiersFields(): GenericIdentifier[];
|
|
23
22
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { BaseModel,
|
|
1
|
+
import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
|
|
2
2
|
import { Shops } from './enums/shops.enum';
|
|
3
|
-
import { KitProduct } from './kit-product';
|
|
4
3
|
import { ProductReview, ShopDescription, ShopPrice, ShopsDescription, ShopsPrice, Stock } from './types';
|
|
5
4
|
import { Variant } from './variant';
|
|
6
|
-
export declare class Product extends BaseModel<Product> {
|
|
5
|
+
export declare class Product extends BaseModel<Product> implements IdentifierFields<Product> {
|
|
7
6
|
id: string;
|
|
8
7
|
name: string;
|
|
9
8
|
slug: string;
|
|
@@ -22,8 +21,8 @@ export declare class Product extends BaseModel<Product> {
|
|
|
22
21
|
miniatures?: string[];
|
|
23
22
|
published: boolean;
|
|
24
23
|
publishedGlam: boolean;
|
|
25
|
-
createdAt
|
|
26
|
-
updatedAt
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
27
26
|
brand: string;
|
|
28
27
|
tags?: string[];
|
|
29
28
|
type?: string;
|
|
@@ -31,10 +30,6 @@ export declare class Product extends BaseModel<Product> {
|
|
|
31
30
|
reviews?: ProductReview[];
|
|
32
31
|
variant?: Variant;
|
|
33
32
|
video?: string;
|
|
34
|
-
isKit?: boolean;
|
|
35
|
-
rate?: number;
|
|
36
|
-
kitProducts?: KitProduct[];
|
|
37
33
|
identifierFields(): NonFunctionPropertyNames<Product>[];
|
|
38
34
|
getInfoByShop(shop: Shops): ShopDescription & ShopPrice & Stock;
|
|
39
|
-
static get identifiersFields(): GenericIdentifier[];
|
|
40
35
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { Shops } from '../enums/shops.enum';
|
|
2
2
|
export declare type ProductReview = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
author: string;
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
email: string;
|
|
6
|
+
location: string;
|
|
5
7
|
rate: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
status?: boolean;
|
|
11
|
-
title?: string;
|
|
8
|
+
review: string;
|
|
9
|
+
status: boolean;
|
|
10
|
+
title: string;
|
|
11
|
+
shop?: Shops;
|
|
12
12
|
personId?: number;
|
|
13
13
|
points?: number;
|
|
14
14
|
orderId?: string;
|
|
15
|
-
createdAt?: Date;
|
|
16
|
-
updatedAt?: Date;
|
|
17
15
|
};
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { BaseModel, NonFunctionPropertyNames } from '../../
|
|
1
|
+
import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
|
|
2
2
|
import { ShopsPrice, Stock, VariantGrade } from './types';
|
|
3
|
-
export declare
|
|
4
|
-
export declare class Variant extends BaseModel<Variant, ProductVariantIdentifiers> {
|
|
3
|
+
export declare class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {
|
|
5
4
|
id: string;
|
|
6
5
|
productId: string;
|
|
7
6
|
sku: string;
|
|
8
7
|
price: ShopsPrice;
|
|
9
8
|
EAN: string;
|
|
10
9
|
stock: Stock;
|
|
11
|
-
grade
|
|
10
|
+
grade: VariantGrade[];
|
|
12
11
|
costPrice: number;
|
|
13
12
|
weight: number;
|
|
14
|
-
createdAt?: Date;
|
|
15
|
-
updatedAt?: Date;
|
|
16
13
|
identifierFields(): NonFunctionPropertyNames<Variant>[];
|
|
17
|
-
static get identifiersFields(): ProductVariantIdentifiers[];
|
|
18
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Category } from '../models/category';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
3
3
|
import { Shops } from '../models/enums/shops.enum';
|
|
4
4
|
import { Product } from '../models';
|
|
5
5
|
export interface CategoryRepository extends CrudRepository<Category> {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
2
|
-
import { Product,
|
|
3
|
-
export declare type ReviewStatusParams = 'pending' | 'approved' | 'rejected';
|
|
4
|
-
export declare type ReviewWithProductData = ProductReview & {
|
|
5
|
-
productId: string;
|
|
6
|
-
productName: string;
|
|
7
|
-
productSku: string;
|
|
8
|
-
};
|
|
1
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
2
|
+
import { Product, Shops } from '../models';
|
|
9
3
|
export interface ProductRepository extends CrudRepository<Product> {
|
|
10
|
-
getBySlug(slug: string): Promise<Product>;
|
|
11
|
-
fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
|
|
4
|
+
getBySlug(slug: string, shop: Shops): Promise<Product>;
|
|
12
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
2
2
|
import { Product } from '../models';
|
|
3
3
|
export interface SubscriptionProductRepository extends CrudRepository<Product> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
2
2
|
import { Variant } from '../models/variant';
|
|
3
3
|
export interface VariantRepository extends CrudRepository<Variant> {
|
|
4
4
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { NonFunctionProperties } from '../model/types/non-function-properties.type';
|
|
3
|
+
export interface CreateRepository<Model extends BaseModelWithIdentifier<Model>> {
|
|
4
|
+
create(data: NonFunctionProperties<BaseModelWithIdentifier<Model>>): Promise<Model>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { CreateRepository } from './create.repository';
|
|
3
|
+
import { DeleteRepository } from './delete.repository';
|
|
4
|
+
import { ReadRepository } from './read.repository';
|
|
5
|
+
import { UpdateRepository } from './update.repository';
|
|
6
|
+
export interface CrudRepository<Model extends BaseModelWithIdentifier<Model>> extends CreateRepository<Model>, DeleteRepository<Model>, ReadRepository<Model>, UpdateRepository<Model> {
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { NonFunctionProperties } from '../model/types/non-function-properties.type';
|
|
3
|
+
export interface DeleteRepository<Model extends BaseModelWithIdentifier<Model>> {
|
|
4
|
+
delete(identifiers: NonFunctionProperties<BaseModelWithIdentifier<Model>>): Promise<void>;
|
|
5
|
+
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export declare enum Where {
|
|
2
2
|
EQUALS = "==",
|
|
3
|
+
NOTEQUALS = "!=",
|
|
3
4
|
GT = ">",
|
|
4
5
|
GTE = ">=",
|
|
5
6
|
IN = "in",
|
|
6
|
-
NOTIN = "not in",
|
|
7
7
|
LT = "<",
|
|
8
8
|
LTE = "<=",
|
|
9
|
-
LIKE = "like"
|
|
10
|
-
NOTLIKE = "not like",
|
|
11
|
-
ISNULL = "is null",
|
|
12
|
-
ISNOTNULL = "is not null"
|
|
9
|
+
LIKE = "like"
|
|
13
10
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { RepositoryFindFielters, RepositoryFindResult, RepositoryLimitOptions, RepositoryOrderByList } from './types';
|
|
3
|
+
export interface FindRepository<Model extends BaseModelWithIdentifier<Model>> {
|
|
4
|
+
find(filters?: RepositoryFindFielters<Model>[], limits?: RepositoryLimitOptions<Model>, orderBy?: RepositoryOrderByList<Model>): Promise<RepositoryFindResult<Model>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { NonFunctionProperties } from '../model/types/non-function-properties.type';
|
|
3
|
+
export interface GetRepository<Model extends BaseModelWithIdentifier<Model>> {
|
|
4
|
+
get(identifiers: NonFunctionProperties<BaseModelWithIdentifier<Model>>): Promise<Model>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { FindRepository } from './find.repository';
|
|
3
|
+
import { GetRepository } from './get.repository';
|
|
4
|
+
export interface ReadRepository<Model extends BaseModelWithIdentifier<Model>> extends FindRepository<Model>, GetRepository<Model> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NonFunctionPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
2
|
+
import { PropType } from '../../../../utils';
|
|
3
|
+
import { Where } from '../enums/where.enum';
|
|
4
|
+
export declare type RepositoryFindFieltersOptions<Model, FieldName extends keyof Model> = {
|
|
5
|
+
operator: Where;
|
|
6
|
+
value: PropType<Model, FieldName> | PropType<Model, FieldName>[];
|
|
7
|
+
};
|
|
8
|
+
export declare type NestedRepositoryFindFieltersOptions<Model> = {
|
|
9
|
+
[key in NonFunctionPropertyNames<Model>]?: RepositoryFindFieltersOptions<Model, key>;
|
|
10
|
+
};
|
|
11
|
+
export declare type RepositoryFindField<Model, FieldName extends keyof Model> = RepositoryFindFieltersOptions<Model, FieldName> | Partial<PropType<Model, FieldName>> | NestedRepositoryFindFieltersOptions<PropType<Model, FieldName>>;
|
|
12
|
+
export declare type RepositoryFindFielters<Model> = {
|
|
13
|
+
[key in NonFunctionPropertyNames<Model>]?: RepositoryFindField<Model, key>;
|
|
14
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PropType } from '../../../../utils';
|
|
1
|
+
import { BaseModelWithIdentifier } from '../../model/base-model-with-identifier-fields';
|
|
3
2
|
import { NonFunctionPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
3
|
+
import { PropType } from '../../../../utils';
|
|
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
|
-
export declare type RepositoryUpdateParams<Model
|
|
9
|
+
export declare type RepositoryUpdateParams<Model> = {
|
|
10
10
|
[key in NonFunctionPropertyNames<Model>]?: UpdateOptions<PropType<Model, key>> | PropType<Model, key>;
|
|
11
|
-
}
|
|
11
|
+
} | BaseModelWithIdentifier<Model>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseModelWithIdentifier } from '../model/base-model-with-identifier-fields';
|
|
2
|
+
import { RepositoryUpdateParams } from './types/repository-update-params.type';
|
|
3
|
+
export interface UpdateRepository<Model extends BaseModelWithIdentifier<Model>> {
|
|
4
|
+
update(data: RepositoryUpdateParams<Model>): Promise<Model>;
|
|
5
|
+
}
|
package/domain/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } from '../../general/model/base.model';
|
|
2
2
|
import { LocationGeometry } from './types/location-geometry.type';
|
|
3
|
-
export declare abstract class Address
|
|
3
|
+
export declare abstract class Address extends BaseModel<Address> {
|
|
4
4
|
default?: boolean;
|
|
5
5
|
recipient?: string;
|
|
6
6
|
zip?: string;
|
|
@@ -18,5 +18,4 @@ export declare abstract class Address<Identifiers = GenericIdentifier> extends B
|
|
|
18
18
|
formattedAddress?: string;
|
|
19
19
|
placeId?: string;
|
|
20
20
|
geometry?: LocationGeometry;
|
|
21
|
-
static get identifiersFields(): string[];
|
|
22
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseModel,
|
|
1
|
+
import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
|
|
2
2
|
import { Banner, Benefit, HomeDataStructure } from './types';
|
|
3
|
-
export declare class Home extends BaseModel<Home> {
|
|
3
|
+
export declare class Home extends BaseModel<Home> implements IdentifierFields<Home> {
|
|
4
4
|
benefitsSection: Benefit[];
|
|
5
5
|
blockBanners: Banner[];
|
|
6
6
|
blogBanner: Banner;
|
|
@@ -13,5 +13,5 @@ export declare class Home extends BaseModel<Home> {
|
|
|
13
13
|
verticalCarousels: string[];
|
|
14
14
|
id: string;
|
|
15
15
|
data: HomeDataStructure;
|
|
16
|
-
|
|
16
|
+
identifierFields(): NonFunctionPropertyNames<Home>[];
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseModel,
|
|
1
|
+
import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model';
|
|
2
2
|
import { MenuNav } from './types/menu-nav.type';
|
|
3
|
-
export declare class ShopMenu extends BaseModel<ShopMenu> {
|
|
3
|
+
export declare class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {
|
|
4
4
|
menuNav: MenuNav[];
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
identifierFields(): NonFunctionPropertyNames<ShopMenu>[];
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
2
2
|
import { ShopMenu } from '../models/shop-menu';
|
|
3
3
|
export interface ShopMenuRepository extends CrudRepository<ShopMenu> {
|
|
4
4
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } from '../../general/model/base.model';
|
|
2
|
+
import { IdentifierFields } from '../../general/model/identifier-fields';
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
2
4
|
import { Shops, Category } from '../../catalog/models';
|
|
3
|
-
export declare class Buy2Win extends BaseModel<Buy2Win> {
|
|
5
|
+
export declare class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {
|
|
4
6
|
active: boolean;
|
|
5
7
|
cartValue: number;
|
|
6
8
|
createdAt: Date;
|
|
@@ -12,5 +14,5 @@ export declare class Buy2Win extends BaseModel<Buy2Win> {
|
|
|
12
14
|
startDate: Date;
|
|
13
15
|
updatedAt?: Date;
|
|
14
16
|
categories: Category[];
|
|
15
|
-
|
|
17
|
+
identifierFields(): NonFunctionPropertyNames<Buy2Win>[];
|
|
16
18
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Address } from '../../location/models/address';
|
|
2
|
-
import { BaseModel
|
|
2
|
+
import { BaseModel } from '../../general/model/base.model';
|
|
3
|
+
import { IdentifierFields } from '../../general/model/identifier-fields';
|
|
4
|
+
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
3
5
|
import { User } from '../../users/models/user';
|
|
4
|
-
import {
|
|
6
|
+
import { StoreCoupon } from './coupons/store-coupon';
|
|
5
7
|
import { LineItem } from './line-item';
|
|
6
8
|
import { ShippingMethod } from './shipping-method';
|
|
7
9
|
import { Shops } from '../../catalog/models/enums/shops.enum';
|
|
8
|
-
export declare class Checkout extends BaseModel<Checkout> {
|
|
10
|
+
export declare class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {
|
|
9
11
|
id?: string;
|
|
10
12
|
paymentId?: string;
|
|
11
13
|
status?: string;
|
|
@@ -13,8 +15,6 @@ export declare class Checkout extends BaseModel<Checkout> {
|
|
|
13
15
|
updatedAt?: Date;
|
|
14
16
|
completedAt?: Date;
|
|
15
17
|
discount?: number;
|
|
16
|
-
subTotalPrice?: number;
|
|
17
|
-
totalPrice?: number;
|
|
18
18
|
shop: Shops;
|
|
19
19
|
glampoints?: number;
|
|
20
20
|
lineItems?: LineItem[];
|
|
@@ -22,6 +22,8 @@ export declare class Checkout extends BaseModel<Checkout> {
|
|
|
22
22
|
shippingAddress?: Address;
|
|
23
23
|
billingAddress?: Address;
|
|
24
24
|
shipping?: ShippingMethod;
|
|
25
|
-
coupon?:
|
|
26
|
-
|
|
25
|
+
coupon?: StoreCoupon;
|
|
26
|
+
get subTotalPrice(): number;
|
|
27
|
+
get totalPrice(): number;
|
|
28
|
+
identifierFields(): NonFunctionPropertyNames<Checkout>[];
|
|
27
29
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CheckoutTypes } from '../enums/checkout-types.enum';
|
|
2
|
+
import { Coupon } from './coupon';
|
|
3
|
+
export declare class ClubCoupon extends Coupon<ClubCoupon> {
|
|
4
|
+
plan: string;
|
|
5
|
+
checkoutType: CheckoutTypes;
|
|
6
|
+
static isClubCoupon(coupon: Coupon): coupon is ClubCoupon;
|
|
7
|
+
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } from '../../../general/model/base.model';
|
|
2
2
|
import { CheckoutTypes } from '../enums/checkout-types.enum';
|
|
3
|
+
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
4
|
+
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
3
5
|
import { Shops } from '../../../catalog/models/enums/shops.enum';
|
|
4
|
-
import {
|
|
5
|
-
export declare class Coupon extends BaseModel<Coupon> {
|
|
6
|
+
import { DiscountType, Exclusivities } from './enums';
|
|
7
|
+
export declare class Coupon<CouponSubType extends Coupon = any> extends BaseModel<CouponSubType> implements IdentifierFields<Coupon> {
|
|
6
8
|
id: string;
|
|
7
|
-
type: CouponTypes;
|
|
8
|
-
discount?: number;
|
|
9
|
-
user?: string;
|
|
10
|
-
recipient?: string;
|
|
11
|
-
store?: Shops;
|
|
12
|
-
campaign?: string;
|
|
13
9
|
name: string;
|
|
14
10
|
nickname: string;
|
|
15
|
-
|
|
11
|
+
expiresAt: Date;
|
|
12
|
+
beginAt: Date;
|
|
13
|
+
discountType: DiscountType;
|
|
14
|
+
discount?: number;
|
|
16
15
|
useLimit?: number;
|
|
17
|
-
|
|
18
|
-
updatedAt?: Date;
|
|
16
|
+
quantityPerUser?: number;
|
|
19
17
|
shopAvailability: Shops;
|
|
20
18
|
personId?: number;
|
|
21
19
|
influencerEmail?: string;
|
|
20
|
+
recipient?: string;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt?: Date;
|
|
22
23
|
checkoutType: CheckoutTypes;
|
|
23
24
|
exclusivityType?: Exclusivities;
|
|
24
25
|
get isInfluencer(): boolean;
|
|
25
|
-
|
|
26
|
+
identifierFields(): NonFunctionPropertyNames<Coupon>[];
|
|
27
|
+
calculeDiscount(amount: number): number;
|
|
26
28
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CheckoutTypes } from '../enums/checkout-types.enum';
|
|
2
|
+
import { Category } from '../../../catalog';
|
|
3
|
+
import { Coupon } from './coupon';
|
|
4
|
+
export declare class StoreCoupon extends Coupon<StoreCoupon> {
|
|
5
|
+
checkoutType: CheckoutTypes;
|
|
6
|
+
categories: Category[];
|
|
7
|
+
static isStoreCoupon(coupon: Coupon): coupon is StoreCoupon;
|
|
8
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } from '../../general/model/base.model';
|
|
2
|
+
import { IdentifierFields } from '../../general/model/identifier-fields';
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
2
4
|
import { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types';
|
|
3
|
-
export declare class Payment extends BaseModel<Payment> {
|
|
5
|
+
export declare class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {
|
|
4
6
|
id: number;
|
|
5
7
|
object: string;
|
|
6
8
|
status: string;
|
|
@@ -63,5 +65,5 @@ export declare class Payment extends BaseModel<Payment> {
|
|
|
63
65
|
privateLabel: string;
|
|
64
66
|
pixQrCode: string;
|
|
65
67
|
pixExpirationDate: string;
|
|
66
|
-
|
|
68
|
+
identifierFields(): NonFunctionPropertyNames<Payment>[];
|
|
67
69
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { BaseModel
|
|
2
|
-
|
|
1
|
+
import { BaseModel } from '../../general/model/base.model';
|
|
2
|
+
import { IdentifierFields } from '../../general/model/identifier-fields';
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
4
|
+
export declare class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {
|
|
3
5
|
id: string;
|
|
4
6
|
CNPJ: string;
|
|
5
7
|
DaysToDelivery: number;
|
|
@@ -12,5 +14,5 @@ export declare class ShippingMethod extends BaseModel<ShippingMethod> {
|
|
|
12
14
|
State: string;
|
|
13
15
|
ZipEnd: number;
|
|
14
16
|
ZipStart: number;
|
|
15
|
-
|
|
17
|
+
identifierFields(): NonFunctionPropertyNames<ShippingMethod>[];
|
|
16
18
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Address } from '../../../location/models/address';
|
|
2
|
-
import { BaseModel
|
|
2
|
+
import { BaseModel } from '../../../general/model/base.model';
|
|
3
3
|
import { Coupon } from '../coupons/coupon';
|
|
4
|
+
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
5
|
+
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
4
6
|
import { User } from '../../../users/models/user';
|
|
5
7
|
import { SubscriptionPlan } from './plan';
|
|
6
|
-
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription> {
|
|
8
|
+
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription> implements IdentifierFields<CheckoutSubscription> {
|
|
7
9
|
id?: string;
|
|
8
10
|
user: User;
|
|
9
11
|
createdAt: Date;
|
|
@@ -17,5 +19,5 @@ export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription
|
|
|
17
19
|
billingAddress?: Address;
|
|
18
20
|
subscriptionPlan: SubscriptionPlan;
|
|
19
21
|
coupon?: Coupon;
|
|
20
|
-
|
|
22
|
+
identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[];
|
|
21
23
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { BaseModel
|
|
2
|
-
|
|
1
|
+
import { BaseModel } from '../../../general/model/base.model';
|
|
2
|
+
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
3
|
+
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
4
|
+
export declare class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {
|
|
3
5
|
id: string;
|
|
4
6
|
name: string;
|
|
5
7
|
billingPrice: number;
|
|
6
8
|
recurrencePrice: number;
|
|
7
9
|
recurrenceCycle: number;
|
|
8
10
|
maxAttempts: number;
|
|
9
|
-
|
|
11
|
+
identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[];
|
|
10
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Buy2Win } from '../models/buy-2-win';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
3
3
|
export interface Buy2WinRepository extends CrudRepository<Buy2Win> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Checkout } from '../models/checkout';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
3
3
|
export interface CheckoutRepository extends CrudRepository<Checkout> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Coupon } from '../models/coupons/coupon';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../general/repository/crud.repository';
|
|
3
3
|
export interface CouponRepository extends CrudRepository<Coupon> {
|
|
4
4
|
}
|