@infrab4a/connect 3.2.7 → 3.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/bundles/infrab4a-connect.umd.js +4517 -4567
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/index.d.ts +2 -2
- package/domain/catalog/models/category.d.ts +24 -24
- package/domain/catalog/models/enums/index.d.ts +2 -2
- package/domain/catalog/models/enums/product-genders.enum.d.ts +5 -5
- package/domain/catalog/models/enums/shops.enum.d.ts +6 -6
- package/domain/catalog/models/index.d.ts +6 -6
- package/domain/catalog/models/kit-product.d.ts +12 -12
- package/domain/catalog/models/product.d.ts +39 -39
- package/domain/catalog/models/types/category-condition.type.d.ts +4 -4
- package/domain/catalog/models/types/category-filter.type.d.ts +4 -4
- package/domain/catalog/models/types/category-metadata.type.d.ts +4 -4
- package/domain/catalog/models/types/index.d.ts +10 -10
- package/domain/catalog/models/types/product-gender.type.d.ts +1 -1
- package/domain/catalog/models/types/product-metadata.type.d.ts +4 -4
- package/domain/catalog/models/types/product-review.type.d.ts +17 -17
- package/domain/catalog/models/types/shop-description.type.d.ts +7 -7
- package/domain/catalog/models/types/shop-price.type.d.ts +6 -6
- package/domain/catalog/models/types/stock.type.d.ts +3 -3
- package/domain/catalog/models/types/variant-grade.type.d.ts +4 -4
- package/domain/catalog/models/variant.d.ts +18 -18
- package/domain/catalog/repositories/category.repository.d.ts +15 -15
- package/domain/catalog/repositories/index.d.ts +4 -4
- package/domain/catalog/repositories/product.repository.d.ts +12 -12
- package/domain/catalog/repositories/subscription-product.repository.d.ts +4 -4
- package/domain/catalog/repositories/variant.repository.d.ts +4 -4
- package/domain/generic/index.d.ts +2 -2
- package/domain/generic/model/base.model.d.ts +10 -10
- package/domain/generic/model/identifier-fields.d.ts +4 -4
- package/domain/generic/model/index.d.ts +3 -3
- package/domain/generic/model/types/base-model-builder.type.d.ts +15 -15
- package/domain/generic/model/types/identifier-model.type.d.ts +7 -7
- package/domain/generic/model/types/index.d.ts +5 -5
- package/domain/generic/model/types/model-base-structure.type.d.ts +6 -6
- package/domain/generic/model/types/non-function-properties.type.d.ts +12 -12
- package/domain/generic/model/types/non-function-property-name.type.d.ts +4 -4
- package/domain/generic/repository/create.repository.d.ts +8 -8
- package/domain/generic/repository/crud.repository.d.ts +19 -19
- package/domain/generic/repository/delete.repository.d.ts +7 -7
- package/domain/generic/repository/enums/index.d.ts +2 -2
- package/domain/generic/repository/enums/update-option-actions.enum.d.ts +7 -7
- package/domain/generic/repository/enums/where.enum.d.ts +14 -14
- package/domain/generic/repository/find.repository.d.ts +11 -11
- package/domain/generic/repository/get.repository.d.ts +5 -5
- package/domain/generic/repository/index.d.ts +9 -9
- package/domain/generic/repository/read.repository.d.ts +14 -14
- package/domain/generic/repository/types/index.d.ts +6 -6
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +13 -13
- package/domain/generic/repository/types/repository-find-result.type.d.ts +4 -4
- package/domain/generic/repository/types/repository-limit-options.type.d.ts +4 -4
- package/domain/generic/repository/types/repository-order-by-list.type.d.ts +5 -5
- package/domain/generic/repository/types/repository-update-params.type.d.ts +11 -11
- package/domain/generic/repository/types/where-options.type.d.ts +2 -2
- package/domain/generic/repository/update.repository.d.ts +6 -6
- package/domain/index.d.ts +6 -6
- package/domain/location/index.d.ts +1 -1
- package/domain/location/models/address.d.ts +22 -22
- package/domain/location/models/index.d.ts +2 -2
- package/domain/location/models/types/index.d.ts +3 -3
- package/domain/location/models/types/location-bound.type.d.ts +6 -6
- package/domain/location/models/types/location-geometry.type.d.ts +7 -7
- package/domain/location/models/types/location-lat-lng.type.d.ts +4 -4
- package/domain/shop-settings/enums/filter-type.enum.d.ts +19 -19
- package/domain/shop-settings/enums/index.d.ts +2 -2
- package/domain/shop-settings/enums/questions-filters.enum.d.ts +19 -19
- package/domain/shop-settings/helpers/beauty-questions.helper.d.ts +9 -9
- package/domain/shop-settings/helpers/index.d.ts +1 -1
- package/domain/shop-settings/index.d.ts +4 -4
- package/domain/shop-settings/models/home.d.ts +18 -18
- package/domain/shop-settings/models/index.d.ts +4 -3
- package/domain/shop-settings/models/shop-menu.d.ts +7 -7
- package/domain/shop-settings/models/shop-settings.d.ts +9 -0
- package/domain/shop-settings/models/types/banner.type.d.ts +6 -6
- package/domain/shop-settings/models/types/benefit.type.d.ts +5 -5
- package/domain/shop-settings/models/types/home-data.type.d.ts +15 -15
- package/domain/shop-settings/models/types/index.d.ts +10 -5
- package/domain/shop-settings/models/types/menu-nav.type.d.ts +8 -8
- package/domain/shop-settings/models/types/shop-banner.type.d.ts +10 -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 +8 -0
- package/domain/shop-settings/models/types/shop-section.type.d.ts +9 -0
- package/domain/shop-settings/models/types/sub-menu.type.d.ts +8 -8
- package/domain/shop-settings/repositories/home.repository.d.ts +4 -4
- package/domain/shop-settings/repositories/index.d.ts +3 -2
- package/domain/shop-settings/repositories/shop-menu.repository.d.ts +4 -4
- package/domain/shop-settings/repositories/shop-settings.repository.d.ts +4 -0
- package/domain/shopping/index.d.ts +2 -2
- package/domain/shopping/models/buy-2-win.d.ts +16 -16
- package/domain/shopping/models/checkout.d.ts +27 -27
- package/domain/shopping/models/coupons/coupon.d.ts +32 -32
- package/domain/shopping/models/coupons/enums/coupon-club-mens.enum.d.ts +5 -5
- package/domain/shopping/models/coupons/enums/coupon-subtypes.enum.d.ts +4 -4
- package/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +4 -4
- package/domain/shopping/models/coupons/enums/exclusivities.enum.d.ts +8 -8
- package/domain/shopping/models/coupons/enums/index.d.ts +3 -3
- package/domain/shopping/models/coupons/index.d.ts +2 -2
- package/domain/shopping/models/enums/checkout-types.enum.d.ts +5 -5
- package/domain/shopping/models/enums/index.d.ts +2 -2
- package/domain/shopping/models/enums/order-status.enum.d.ts +10 -10
- package/domain/shopping/models/index.d.ts +11 -11
- package/domain/shopping/models/line-item.d.ts +8 -8
- package/domain/shopping/models/order.d.ts +9 -9
- package/domain/shopping/models/payment.d.ts +67 -67
- package/domain/shopping/models/shipping-method.d.ts +16 -16
- package/domain/shopping/models/subscription/checkout.d.ts +21 -21
- package/domain/shopping/models/subscription/index.d.ts +2 -2
- package/domain/shopping/models/subscription/plan.d.ts +10 -10
- package/domain/shopping/models/types/index.d.ts +7 -7
- package/domain/shopping/models/types/payment-address.type.d.ts +12 -12
- package/domain/shopping/models/types/payment-billing.type.d.ts +7 -7
- package/domain/shopping/models/types/payment-card.type.d.ts +14 -14
- package/domain/shopping/models/types/payment-customer.type.d.ts +18 -18
- package/domain/shopping/models/types/payment-document.type.d.ts +6 -6
- package/domain/shopping/models/types/payment-item.type.d.ts +11 -11
- package/domain/shopping/models/types/payment-shipping.type.d.ts +10 -10
- package/domain/shopping/repositories/buy-2-win.repository.d.ts +4 -4
- package/domain/shopping/repositories/checkout.repository.d.ts +4 -4
- package/domain/shopping/repositories/coupon.repository.d.ts +4 -4
- package/domain/shopping/repositories/index.d.ts +7 -7
- package/domain/shopping/repositories/legacy-order.repository.d.ts +3 -3
- package/domain/shopping/repositories/order.repository.d.ts +4 -4
- package/domain/shopping/repositories/payment.repository.d.ts +4 -4
- package/domain/shopping/repositories/subscription/checkout.repository.d.ts +4 -4
- package/domain/shopping/repositories/subscription/index.d.ts +2 -2
- package/domain/shopping/repositories/subscription/plan.repository.d.ts +4 -4
- package/domain/users/errors/index.d.ts +3 -3
- package/domain/users/errors/unauthorized.error.d.ts +5 -5
- package/domain/users/errors/user-already-registered.error.d.ts +5 -5
- package/domain/users/errors/weak-password.error.d.ts +5 -5
- package/domain/users/index.d.ts +5 -5
- package/domain/users/models/beauty-profile.d.ts +11 -11
- package/domain/users/models/enums/accessory-importances.enum.d.ts +5 -5
- package/domain/users/models/enums/area.enum.d.ts +11 -11
- package/domain/users/models/enums/beard-problems.enum.d.ts +9 -9
- package/domain/users/models/enums/beard-sizes.enum.d.ts +7 -7
- package/domain/users/models/enums/beauty-product-importances.enum.d.ts +6 -6
- package/domain/users/models/enums/body-problems.enum.d.ts +11 -11
- package/domain/users/models/enums/body-shapes.enum.d.ts +7 -7
- package/domain/users/models/enums/body-tattoos.enum.d.ts +5 -5
- package/domain/users/models/enums/face-skin-oilinesses.enum.d.ts +7 -7
- package/domain/users/models/enums/face-skin-problems.enum.d.ts +10 -10
- package/domain/users/models/enums/face-skin-tones.enum.d.ts +8 -8
- package/domain/users/models/enums/family-incomes.enum.d.ts +8 -8
- package/domain/users/models/enums/fragrance-importances.enum.d.ts +5 -5
- package/domain/users/models/enums/hair-colors.enum.d.ts +10 -10
- package/domain/users/models/enums/hair-problems.enum.d.ts +10 -10
- package/domain/users/models/enums/hair-strands.enum.d.ts +8 -8
- package/domain/users/models/enums/hair-types.enum.d.ts +7 -7
- package/domain/users/models/enums/index.d.ts +20 -20
- package/domain/users/models/enums/office-position.enum.d.ts +6 -6
- package/domain/users/models/enums/product-spents.enum.d.ts +8 -8
- package/domain/users/models/enums/user-type.enum.d.ts +8 -8
- package/domain/users/models/index.d.ts +7 -7
- package/domain/users/models/lead.d.ts +7 -7
- package/domain/users/models/subscription/edition.d.ts +16 -16
- package/domain/users/models/subscription/enums/billing-status.enum.d.ts +3 -3
- package/domain/users/models/subscription/enums/edition-status.enum.d.ts +4 -4
- package/domain/users/models/subscription/enums/index.d.ts +4 -4
- package/domain/users/models/subscription/enums/payment-type.enum.d.ts +5 -5
- package/domain/users/models/subscription/enums/status.enum.d.ts +4 -4
- package/domain/users/models/subscription/index.d.ts +4 -4
- package/domain/users/models/subscription/payment.d.ts +13 -13
- package/domain/users/models/subscription/subscription.d.ts +28 -28
- package/domain/users/models/user-address.d.ts +7 -7
- package/domain/users/models/user-payment-method.d.ts +14 -14
- package/domain/users/models/user.d.ts +28 -28
- package/domain/users/repositories/beauty-profile.repository.d.ts +4 -4
- package/domain/users/repositories/edition.repository.d.ts +4 -4
- package/domain/users/repositories/index.d.ts +8 -8
- package/domain/users/repositories/lead.repository.d.ts +4 -4
- package/domain/users/repositories/subscription-payment.repository.d.ts +4 -4
- package/domain/users/repositories/subscription.repository.d.ts +4 -4
- package/domain/users/repositories/user-address.repository.d.ts +4 -4
- package/domain/users/repositories/user-payment-method.repository.d.ts +4 -4
- package/domain/users/repositories/user.repository.d.ts +6 -6
- package/domain/users/services/authentication.service.d.ts +12 -12
- package/domain/users/services/index.d.ts +3 -3
- package/domain/users/services/register.service.d.ts +7 -7
- package/domain/users/services/types/basic-user-data.type.d.ts +4 -4
- package/domain/users/services/types/index.d.ts +1 -1
- package/domain/users/use-cases/authentication.d.ts +21 -21
- package/domain/users/use-cases/index.d.ts +4 -4
- package/domain/users/use-cases/recovery-password.d.ts +6 -6
- package/domain/users/use-cases/register.d.ts +13 -13
- package/domain/users/use-cases/signout.d.ts +6 -6
- package/errors/duplicated-results.error.d.ts +5 -5
- package/errors/index.d.ts +4 -4
- package/errors/invalid-argument.error.d.ts +5 -5
- package/errors/not-found.error.d.ts +5 -5
- package/errors/required-argument.error.d.ts +6 -6
- package/esm2015/domain/catalog/index.js +3 -3
- package/esm2015/domain/catalog/models/category.js +10 -10
- package/esm2015/domain/catalog/models/enums/index.js +3 -3
- package/esm2015/domain/catalog/models/enums/product-genders.enum.js +7 -7
- package/esm2015/domain/catalog/models/enums/shops.enum.js +8 -8
- package/esm2015/domain/catalog/models/index.js +7 -7
- package/esm2015/domain/catalog/models/kit-product.js +18 -18
- package/esm2015/domain/catalog/models/product.js +17 -17
- package/esm2015/domain/catalog/models/types/category-condition.type.js +2 -2
- package/esm2015/domain/catalog/models/types/category-filter.type.js +2 -2
- package/esm2015/domain/catalog/models/types/category-metadata.type.js +2 -2
- package/esm2015/domain/catalog/models/types/index.js +11 -11
- package/esm2015/domain/catalog/models/types/product-gender.type.js +2 -2
- package/esm2015/domain/catalog/models/types/product-metadata.type.js +2 -2
- package/esm2015/domain/catalog/models/types/product-review.type.js +2 -2
- package/esm2015/domain/catalog/models/types/shop-description.type.js +2 -2
- package/esm2015/domain/catalog/models/types/shop-price.type.js +2 -2
- package/esm2015/domain/catalog/models/types/stock.type.js +2 -2
- package/esm2015/domain/catalog/models/types/variant-grade.type.js +2 -2
- package/esm2015/domain/catalog/models/variant.js +10 -10
- package/esm2015/domain/catalog/repositories/category.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/index.js +5 -5
- package/esm2015/domain/catalog/repositories/product.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/subscription-product.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/variant.repository.js +2 -2
- package/esm2015/domain/generic/index.js +3 -3
- package/esm2015/domain/generic/model/base.model.js +23 -23
- package/esm2015/domain/generic/model/identifier-fields.js +2 -2
- package/esm2015/domain/generic/model/index.js +4 -4
- package/esm2015/domain/generic/model/types/base-model-builder.type.js +2 -2
- package/esm2015/domain/generic/model/types/identifier-model.type.js +2 -2
- package/esm2015/domain/generic/model/types/index.js +6 -6
- package/esm2015/domain/generic/model/types/model-base-structure.type.js +2 -2
- package/esm2015/domain/generic/model/types/non-function-properties.type.js +2 -2
- package/esm2015/domain/generic/model/types/non-function-property-name.type.js +2 -2
- package/esm2015/domain/generic/repository/create.repository.js +2 -2
- package/esm2015/domain/generic/repository/crud.repository.js +2 -2
- package/esm2015/domain/generic/repository/delete.repository.js +2 -2
- package/esm2015/domain/generic/repository/enums/index.js +3 -3
- package/esm2015/domain/generic/repository/enums/update-option-actions.enum.js +9 -9
- package/esm2015/domain/generic/repository/enums/where.enum.js +16 -16
- package/esm2015/domain/generic/repository/find.repository.js +2 -2
- package/esm2015/domain/generic/repository/get.repository.js +2 -2
- package/esm2015/domain/generic/repository/index.js +10 -10
- package/esm2015/domain/generic/repository/read.repository.js +2 -2
- package/esm2015/domain/generic/repository/types/index.js +7 -7
- package/esm2015/domain/generic/repository/types/repository-find-filters.type.js +2 -2
- package/esm2015/domain/generic/repository/types/repository-find-result.type.js +2 -2
- package/esm2015/domain/generic/repository/types/repository-limit-options.type.js +2 -2
- package/esm2015/domain/generic/repository/types/repository-order-by-list.type.js +2 -2
- package/esm2015/domain/generic/repository/types/repository-update-params.type.js +2 -2
- package/esm2015/domain/generic/repository/types/where-options.type.js +2 -2
- package/esm2015/domain/generic/repository/update.repository.js +2 -2
- package/esm2015/domain/index.js +7 -7
- package/esm2015/domain/location/index.js +2 -2
- package/esm2015/domain/location/models/address.js +7 -7
- package/esm2015/domain/location/models/index.js +3 -3
- package/esm2015/domain/location/models/types/index.js +4 -4
- package/esm2015/domain/location/models/types/location-bound.type.js +2 -2
- package/esm2015/domain/location/models/types/location-geometry.type.js +2 -2
- package/esm2015/domain/location/models/types/location-lat-lng.type.js +2 -2
- package/esm2015/domain/shop-settings/enums/filter-type.enum.js +21 -21
- package/esm2015/domain/shop-settings/enums/index.js +3 -3
- package/esm2015/domain/shop-settings/enums/questions-filters.enum.js +21 -21
- package/esm2015/domain/shop-settings/helpers/beauty-questions.helper.js +46 -46
- package/esm2015/domain/shop-settings/helpers/index.js +2 -2
- package/esm2015/domain/shop-settings/index.js +5 -5
- package/esm2015/domain/shop-settings/models/home.js +7 -7
- package/esm2015/domain/shop-settings/models/index.js +5 -4
- package/esm2015/domain/shop-settings/models/shop-menu.js +7 -7
- package/esm2015/domain/shop-settings/models/shop-settings.js +7 -0
- package/esm2015/domain/shop-settings/models/types/banner.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/benefit.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/home-data.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/index.js +11 -6
- package/esm2015/domain/shop-settings/models/types/menu-nav.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/shop-banner.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-brands.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-carousel.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-collection.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-section.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/sub-menu.type.js +2 -2
- package/esm2015/domain/shop-settings/repositories/home.repository.js +2 -2
- package/esm2015/domain/shop-settings/repositories/index.js +4 -3
- package/esm2015/domain/shop-settings/repositories/shop-menu.repository.js +2 -2
- package/esm2015/domain/shop-settings/repositories/shop-settings.repository.js +2 -0
- package/esm2015/domain/shopping/index.js +3 -3
- package/esm2015/domain/shopping/models/buy-2-win.js +14 -14
- package/esm2015/domain/shopping/models/checkout.js +38 -38
- package/esm2015/domain/shopping/models/coupons/coupon.js +38 -38
- package/esm2015/domain/shopping/models/coupons/enums/coupon-club-mens.enum.js +7 -7
- package/esm2015/domain/shopping/models/coupons/enums/coupon-subtypes.enum.js +6 -6
- package/esm2015/domain/shopping/models/coupons/enums/coupon-types.enum.js +10 -10
- package/esm2015/domain/shopping/models/coupons/enums/exclusivities.enum.js +10 -10
- package/esm2015/domain/shopping/models/coupons/enums/index.js +4 -4
- package/esm2015/domain/shopping/models/coupons/index.js +3 -3
- package/esm2015/domain/shopping/models/enums/checkout-types.enum.js +7 -7
- package/esm2015/domain/shopping/models/enums/index.js +3 -3
- package/esm2015/domain/shopping/models/enums/order-status.enum.js +12 -12
- package/esm2015/domain/shopping/models/index.js +12 -12
- package/esm2015/domain/shopping/models/line-item.js +4 -4
- package/esm2015/domain/shopping/models/order.js +11 -11
- package/esm2015/domain/shopping/models/payment.js +169 -169
- package/esm2015/domain/shopping/models/shipping-method.js +7 -7
- package/esm2015/domain/shopping/models/subscription/checkout.js +28 -28
- package/esm2015/domain/shopping/models/subscription/index.js +3 -3
- package/esm2015/domain/shopping/models/subscription/plan.js +7 -7
- package/esm2015/domain/shopping/models/types/index.js +8 -8
- package/esm2015/domain/shopping/models/types/payment-address.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-billing.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-card.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-customer.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-document.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-item.type.js +2 -2
- package/esm2015/domain/shopping/models/types/payment-shipping.type.js +2 -2
- package/esm2015/domain/shopping/repositories/buy-2-win.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/checkout.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/coupon.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/index.js +8 -8
- package/esm2015/domain/shopping/repositories/legacy-order.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/order.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/payment.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/subscription/checkout.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/subscription/index.js +3 -3
- package/esm2015/domain/shopping/repositories/subscription/plan.repository.js +2 -2
- package/esm2015/domain/users/errors/index.js +4 -4
- package/esm2015/domain/users/errors/unauthorized.error.js +8 -8
- package/esm2015/domain/users/errors/user-already-registered.error.js +8 -8
- package/esm2015/domain/users/errors/weak-password.error.js +8 -8
- package/esm2015/domain/users/index.js +6 -6
- package/esm2015/domain/users/models/beauty-profile.js +12 -12
- package/esm2015/domain/users/models/enums/accessory-importances.enum.js +7 -7
- package/esm2015/domain/users/models/enums/area.enum.js +13 -13
- package/esm2015/domain/users/models/enums/beard-problems.enum.js +11 -11
- package/esm2015/domain/users/models/enums/beard-sizes.enum.js +9 -9
- package/esm2015/domain/users/models/enums/beauty-product-importances.enum.js +8 -8
- package/esm2015/domain/users/models/enums/body-problems.enum.js +13 -13
- package/esm2015/domain/users/models/enums/body-shapes.enum.js +9 -9
- package/esm2015/domain/users/models/enums/body-tattoos.enum.js +7 -7
- package/esm2015/domain/users/models/enums/face-skin-oilinesses.enum.js +9 -9
- package/esm2015/domain/users/models/enums/face-skin-problems.enum.js +12 -12
- package/esm2015/domain/users/models/enums/face-skin-tones.enum.js +10 -10
- package/esm2015/domain/users/models/enums/family-incomes.enum.js +10 -10
- package/esm2015/domain/users/models/enums/fragrance-importances.enum.js +7 -7
- package/esm2015/domain/users/models/enums/hair-colors.enum.js +12 -12
- package/esm2015/domain/users/models/enums/hair-problems.enum.js +12 -12
- package/esm2015/domain/users/models/enums/hair-strands.enum.js +10 -10
- package/esm2015/domain/users/models/enums/hair-types.enum.js +9 -9
- package/esm2015/domain/users/models/enums/index.js +21 -21
- package/esm2015/domain/users/models/enums/office-position.enum.js +8 -8
- package/esm2015/domain/users/models/enums/product-spents.enum.js +10 -10
- package/esm2015/domain/users/models/enums/user-type.enum.js +10 -10
- package/esm2015/domain/users/models/index.js +8 -8
- package/esm2015/domain/users/models/lead.js +7 -7
- package/esm2015/domain/users/models/subscription/edition.js +7 -7
- package/esm2015/domain/users/models/subscription/enums/billing-status.enum.js +5 -5
- package/esm2015/domain/users/models/subscription/enums/edition-status.enum.js +6 -6
- package/esm2015/domain/users/models/subscription/enums/index.js +5 -5
- package/esm2015/domain/users/models/subscription/enums/payment-type.enum.js +7 -7
- package/esm2015/domain/users/models/subscription/enums/status.enum.js +6 -6
- package/esm2015/domain/users/models/subscription/index.js +5 -5
- package/esm2015/domain/users/models/subscription/payment.js +14 -14
- package/esm2015/domain/users/models/subscription/subscription.js +43 -43
- package/esm2015/domain/users/models/user-address.js +7 -7
- package/esm2015/domain/users/models/user-payment-method.js +7 -7
- package/esm2015/domain/users/models/user.js +26 -26
- package/esm2015/domain/users/repositories/beauty-profile.repository.js +2 -2
- package/esm2015/domain/users/repositories/edition.repository.js +2 -2
- package/esm2015/domain/users/repositories/index.js +9 -9
- package/esm2015/domain/users/repositories/lead.repository.js +2 -2
- package/esm2015/domain/users/repositories/subscription-payment.repository.js +2 -2
- package/esm2015/domain/users/repositories/subscription.repository.js +2 -2
- package/esm2015/domain/users/repositories/user-address.repository.js +2 -2
- package/esm2015/domain/users/repositories/user-payment-method.repository.js +2 -2
- package/esm2015/domain/users/repositories/user.repository.js +2 -2
- package/esm2015/domain/users/services/authentication.service.js +2 -2
- package/esm2015/domain/users/services/index.js +4 -4
- package/esm2015/domain/users/services/register.service.js +2 -2
- package/esm2015/domain/users/services/types/basic-user-data.type.js +2 -2
- package/esm2015/domain/users/services/types/index.js +2 -2
- package/esm2015/domain/users/use-cases/authentication.js +40 -40
- package/esm2015/domain/users/use-cases/index.js +5 -5
- package/esm2015/domain/users/use-cases/recovery-password.js +12 -12
- package/esm2015/domain/users/use-cases/register.js +34 -34
- package/esm2015/domain/users/use-cases/signout.js +12 -12
- package/esm2015/errors/duplicated-results.error.js +8 -8
- package/esm2015/errors/index.js +5 -5
- package/esm2015/errors/invalid-argument.error.js +8 -8
- package/esm2015/errors/not-found.error.js +8 -8
- package/esm2015/errors/required-argument.error.js +9 -9
- package/esm2015/index.js +6 -6
- package/esm2015/infra/elasticsearch/adapters/axios.adapter.js +57 -57
- package/esm2015/infra/elasticsearch/adapters/elastic-search.adapter.js +2 -2
- package/esm2015/infra/elasticsearch/adapters/index.js +3 -3
- package/esm2015/infra/elasticsearch/index.js +4 -4
- package/esm2015/infra/elasticsearch/indexes/index.js +2 -2
- package/esm2015/infra/elasticsearch/indexes/products-index.js +93 -93
- package/esm2015/infra/elasticsearch/types/elastic-search-result.js +2 -2
- package/esm2015/infra/elasticsearch/types/index.js +2 -2
- package/esm2015/infra/firebase/auth/authentication-firebase-auth.service.js +52 -52
- package/esm2015/infra/firebase/auth/index.js +3 -3
- package/esm2015/infra/firebase/auth/register-firebase-auth.service.js +26 -26
- package/esm2015/infra/firebase/auth/types/firebase-user-with-id.type.js +2 -2
- package/esm2015/infra/firebase/firestore/index.js +4 -4
- package/esm2015/infra/firebase/firestore/mixins/index.js +10 -10
- package/esm2015/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +31 -31
- package/esm2015/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +10 -10
- package/esm2015/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +18 -18
- package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +92 -92
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +22 -22
- package/esm2015/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +24 -24
- package/esm2015/infra/firebase/firestore/mixins/with-helpers.mixin.js +17 -17
- package/esm2015/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +11 -11
- package/esm2015/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +45 -45
- package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +71 -71
- package/esm2015/infra/firebase/firestore/repositories/catalog/index.js +5 -5
- package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +52 -52
- package/esm2015/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/index.js +5 -5
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.js +56 -56
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/index.js +4 -3
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.js +12 -0
- package/esm2015/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +29 -29
- package/esm2015/infra/firebase/firestore/repositories/shopping/index.js +9 -9
- package/esm2015/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.js +9 -9
- package/esm2015/infra/firebase/firestore/repositories/shopping/order-firestore.repository.js +12 -35
- package/esm2015/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/users/index.js +9 -9
- package/esm2015/infra/firebase/firestore/repositories/users/lead-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/repositories/users/subscription-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/repositories/users/user-address-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +68 -68
- package/esm2015/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.js +14 -14
- package/esm2015/infra/firebase/firestore/types/firestore-sub.repository.type.js +2 -2
- package/esm2015/infra/firebase/firestore/types/firestore.helpers.type.js +2 -2
- package/esm2015/infra/firebase/firestore/types/firestore.repository.type.js +2 -2
- package/esm2015/infra/firebase/firestore/types/index.js +4 -4
- package/esm2015/infra/firebase/index.js +3 -3
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.js +13 -13
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-where.enum.js +15 -15
- package/esm2015/infra/hasura-graphql/enums/index.js +3 -3
- package/esm2015/infra/hasura-graphql/index.js +5 -5
- package/esm2015/infra/hasura-graphql/mixins/helpers/attribute-option.helper.js +31 -31
- package/esm2015/infra/hasura-graphql/mixins/helpers/filter-option.helper.js +22 -22
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +72 -86
- package/esm2015/infra/hasura-graphql/mixins/helpers/index.js +4 -5
- package/esm2015/infra/hasura-graphql/mixins/index.js +8 -8
- package/esm2015/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.js +45 -45
- package/esm2015/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.js +10 -10
- package/esm2015/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.js +29 -29
- package/esm2015/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.js +93 -45
- package/esm2015/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.js +35 -35
- package/esm2015/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.js +94 -94
- package/esm2015/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.js +56 -56
- package/esm2015/infra/hasura-graphql/models/category-hasura-graphql.js +4 -4
- package/esm2015/infra/hasura-graphql/models/index.js +5 -5
- package/esm2015/infra/hasura-graphql/models/kit-product-hasura-graphql.js +15 -15
- package/esm2015/infra/hasura-graphql/models/product-hasura-graphql.js +11 -11
- package/esm2015/infra/hasura-graphql/models/variant-hasura-graphql.js +9 -9
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +230 -240
- package/esm2015/infra/hasura-graphql/repositories/catalog/index.js +4 -4
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +455 -462
- package/esm2015/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.js +116 -116
- package/esm2015/infra/hasura-graphql/repositories/index.js +2 -2
- package/esm2015/infra/hasura-graphql/types/fields.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/graphql.repository.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-auth-options.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-fields.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-headers.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/index.js +9 -9
- package/esm2015/infra/hasura-graphql/types/nested-field.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/query-builder-options.type.js +2 -2
- package/esm2015/infra/hasura-graphql/types/variable-options.type.js +2 -2
- package/esm2015/infra/index.js +4 -4
- package/esm2015/infrab4a-connect.js +4 -4
- package/esm2015/utils/index.js +8 -8
- package/esm2015/utils/is-uuid.js +3 -3
- package/esm2015/utils/mixins/base.mixin.js +6 -6
- package/esm2015/utils/mixins/index.js +4 -4
- package/esm2015/utils/mixins/merge-constructor-params.type.js +2 -2
- package/esm2015/utils/mixins/mixin-ctor.type.js +2 -2
- package/esm2015/utils/parse-datetime.js +14 -14
- package/esm2015/utils/types/array-element.type.js +2 -2
- package/esm2015/utils/types/index.js +3 -3
- package/esm2015/utils/types/prop.type.js +2 -2
- package/fesm2015/infrab4a-connect.js +3072 -3112
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/index.d.ts +5 -5
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +14 -14
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +7 -7
- package/infra/elasticsearch/adapters/index.d.ts +2 -2
- package/infra/elasticsearch/index.d.ts +3 -3
- package/infra/elasticsearch/indexes/index.d.ts +1 -1
- package/infra/elasticsearch/indexes/products-index.d.ts +15 -15
- package/infra/elasticsearch/types/elastic-search-result.d.ts +7 -7
- package/infra/elasticsearch/types/index.d.ts +1 -1
- package/infra/firebase/auth/authentication-firebase-auth.service.d.ts +12 -12
- package/infra/firebase/auth/index.d.ts +2 -2
- package/infra/firebase/auth/register-firebase-auth.service.d.ts +8 -8
- package/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +3 -3
- package/infra/firebase/firestore/index.d.ts +3 -3
- package/infra/firebase/firestore/mixins/index.d.ts +9 -9
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +4 -4
- package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +11 -11
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +7 -7
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +7 -7
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +17 -17
- package/infra/firebase/firestore/repositories/catalog/index.d.ts +4 -4
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +11 -11
- package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/index.d.ts +4 -4
- package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +16 -16
- package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +3 -2
- package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.d.ts +8 -0
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +12 -12
- package/infra/firebase/firestore/repositories/shopping/index.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +7 -7
- package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +8 -13
- package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/users/index.d.ts +8 -8
- package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +17 -17
- package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +13 -13
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +6 -6
- package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +8 -8
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +12 -12
- package/infra/firebase/firestore/types/index.d.ts +3 -3
- package/infra/firebase/index.d.ts +2 -2
- package/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.d.ts +11 -11
- package/infra/hasura-graphql/enums/hasura-graphql-where.enum.d.ts +13 -13
- package/infra/hasura-graphql/enums/index.d.ts +2 -2
- package/infra/hasura-graphql/index.d.ts +4 -4
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +13 -13
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +6 -6
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +8 -8
- package/infra/hasura-graphql/mixins/helpers/index.d.ts +3 -4
- package/infra/hasura-graphql/mixins/index.d.ts +7 -7
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +8 -8
- package/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.d.ts +11 -11
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +7 -7
- package/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +31 -25
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +24 -24
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +11 -11
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +14 -14
- package/infra/hasura-graphql/models/category-hasura-graphql.d.ts +6 -6
- package/infra/hasura-graphql/models/index.d.ts +4 -4
- package/infra/hasura-graphql/models/kit-product-hasura-graphql.d.ts +6 -6
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +14 -14
- package/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +9 -9
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +27 -27
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +3 -3
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +28 -28
- package/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +14 -14
- package/infra/hasura-graphql/repositories/index.d.ts +1 -1
- package/infra/hasura-graphql/types/fields.type.d.ts +2 -2
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +21 -21
- package/infra/hasura-graphql/types/hasura-graphql-auth-options.type.d.ts +8 -8
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +36 -40
- package/infra/hasura-graphql/types/hasura-graphql-headers.type.d.ts +7 -7
- package/infra/hasura-graphql/types/index.d.ts +8 -8
- package/infra/hasura-graphql/types/nested-field.type.d.ts +7 -7
- package/infra/hasura-graphql/types/query-builder-options.type.d.ts +7 -7
- package/infra/hasura-graphql/types/variable-options.type.d.ts +9 -9
- package/infra/index.d.ts +3 -3
- package/infrab4a-connect.d.ts +5 -5
- package/package.json +2 -2
- package/utils/index.d.ts +7 -7
- package/utils/is-uuid.d.ts +1 -1
- package/utils/mixins/base.mixin.d.ts +3 -3
- package/utils/mixins/index.d.ts +3 -3
- package/utils/mixins/merge-constructor-params.type.d.ts +3 -3
- package/utils/mixins/mixin-ctor.type.d.ts +1 -1
- package/utils/parse-datetime.d.ts +1 -1
- package/utils/types/array-element.type.d.ts +1 -1
- package/utils/types/index.d.ts +2 -2
- package/utils/types/prop.type.d.ts +1 -1
- package/esm2015/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.js +0 -53
- package/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.d.ts +0 -10
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { BaseModel, UpdateOptionActions, } from '../../../domain';
|
|
3
|
-
import { isNil } from '../../../utils';
|
|
4
|
-
import { AttributeOptionHelper } from './helpers';
|
|
5
|
-
export const withUpdateHasuraGraphQL = (MixinBase) => {
|
|
6
|
-
const getValueByAction = (options) => {
|
|
7
|
-
if (options instanceof BaseModel)
|
|
8
|
-
return options.toPlain();
|
|
9
|
-
if (isNil(options === null || options === void 0 ? void 0 : options.action))
|
|
10
|
-
return options;
|
|
11
|
-
if ([UpdateOptionActions.REMOVE_FIELD.toString(), UpdateOptionActions.NULL.toString()].includes(options.action))
|
|
12
|
-
return null;
|
|
13
|
-
return options.value;
|
|
14
|
-
};
|
|
15
|
-
return class UpdateHasuraGraphQLMixin extends MixinBase {
|
|
16
|
-
constructor(...params) {
|
|
17
|
-
const options = params === null || params === void 0 ? void 0 : params[0];
|
|
18
|
-
super(...params);
|
|
19
|
-
this.updateGraphQLOperation = (options === null || options === void 0 ? void 0 : options.updateGraphQLOperation) || `update_${this.tableName}_by_pk`;
|
|
20
|
-
this.updateGraphQLObjectType = (options === null || options === void 0 ? void 0 : options.updateGraphQLObjectType) || `${this.tableName}_set_input`;
|
|
21
|
-
this.updateGraphQLPKType = (options === null || options === void 0 ? void 0 : options.updateGraphQLPKType) || `${this.tableName}_pk_columns_input`;
|
|
22
|
-
}
|
|
23
|
-
update(data) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const plainData = this.paramsToPlain(data);
|
|
26
|
-
yield this.mutation(this.updateGraphQLOperation, this.model.identifiersFields.map((field) => AttributeOptionHelper.FindByAttribute(field, this.fields).columnName), {
|
|
27
|
-
_set: {
|
|
28
|
-
type: this.updateGraphQLObjectType,
|
|
29
|
-
value: this.convertDataToHasura(this.model.toInstance(plainData), true),
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
pk_columns: { type: this.updateGraphQLPKType, value: this.getUpdateModelKeys(plainData), required: true },
|
|
33
|
-
});
|
|
34
|
-
return this.model.toInstance(plainData);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
paramsToPlain(params) {
|
|
38
|
-
const model = this.model;
|
|
39
|
-
if (model.isModel(params))
|
|
40
|
-
return params.toPlain();
|
|
41
|
-
return Object.keys(params).reduce((data, currentKey) => (Object.assign(Object.assign({}, data), (params[currentKey] !== undefined && { [currentKey]: getValueByAction(params[currentKey]) }))), {});
|
|
42
|
-
}
|
|
43
|
-
getUpdateModelKeys(data) {
|
|
44
|
-
const instance = this.model.toInstance(data);
|
|
45
|
-
return this.model.identifiersFields.reduce((ids, identifier) => {
|
|
46
|
-
var _a;
|
|
47
|
-
if (isNil(instance[identifier]))
|
|
48
|
-
return ids;
|
|
49
|
-
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, this.fields);
|
|
50
|
-
const value = ((_a = columnOption === null || columnOption === void 0 ? void 0 : columnOption.to) === null || _a === void 0 ? void 0 : _a.call(columnOption, data[identifier.toString()], instance)) || data[columnOption.attributeName];
|
|
51
|
-
return Object.assign(Object.assign({}, ids), { [columnOption.columnName]: value });
|
|
52
|
-
}, {});
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { BaseModel, UpdateOptionActions, } from '../../../domain';
|
|
3
|
+
import { isNil } from '../../../utils';
|
|
4
|
+
import { AttributeOptionHelper } from './helpers';
|
|
5
|
+
export const withUpdateHasuraGraphQL = (MixinBase) => {
|
|
6
|
+
const getValueByAction = (options) => {
|
|
7
|
+
if (options instanceof BaseModel)
|
|
8
|
+
return options.toPlain();
|
|
9
|
+
if (isNil(options === null || options === void 0 ? void 0 : options.action))
|
|
10
|
+
return options;
|
|
11
|
+
if ([UpdateOptionActions.REMOVE_FIELD.toString(), UpdateOptionActions.NULL.toString()].includes(options.action))
|
|
12
|
+
return null;
|
|
13
|
+
return options.value;
|
|
14
|
+
};
|
|
15
|
+
return class UpdateHasuraGraphQLMixin extends MixinBase {
|
|
16
|
+
constructor(...params) {
|
|
17
|
+
const options = params === null || params === void 0 ? void 0 : params[0];
|
|
18
|
+
super(...params);
|
|
19
|
+
this.updateGraphQLOperation = (options === null || options === void 0 ? void 0 : options.updateGraphQLOperation) || `update_${this.tableName}_by_pk`;
|
|
20
|
+
this.updateGraphQLObjectType = (options === null || options === void 0 ? void 0 : options.updateGraphQLObjectType) || `${this.tableName}_set_input`;
|
|
21
|
+
this.updateGraphQLPKType = (options === null || options === void 0 ? void 0 : options.updateGraphQLPKType) || `${this.tableName}_pk_columns_input`;
|
|
22
|
+
}
|
|
23
|
+
update(data) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const plainData = this.paramsToPlain(data);
|
|
26
|
+
yield this.mutation(this.updateGraphQLOperation, this.model.identifiersFields.map((field) => AttributeOptionHelper.FindByAttribute(field, this.fields).columnName), {
|
|
27
|
+
_set: {
|
|
28
|
+
type: this.updateGraphQLObjectType,
|
|
29
|
+
value: this.convertDataToHasura(this.model.toInstance(plainData), true),
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
pk_columns: { type: this.updateGraphQLPKType, value: this.getUpdateModelKeys(plainData), required: true },
|
|
33
|
+
});
|
|
34
|
+
return this.model.toInstance(plainData);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
paramsToPlain(params) {
|
|
38
|
+
const model = this.model;
|
|
39
|
+
if (model.isModel(params))
|
|
40
|
+
return params.toPlain();
|
|
41
|
+
return Object.keys(params).reduce((data, currentKey) => (Object.assign(Object.assign({}, data), (params[currentKey] !== undefined && { [currentKey]: getValueByAction(params[currentKey]) }))), {});
|
|
42
|
+
}
|
|
43
|
+
getUpdateModelKeys(data) {
|
|
44
|
+
const instance = this.model.toInstance(data);
|
|
45
|
+
return this.model.identifiersFields.reduce((ids, identifier) => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (isNil(instance[identifier]))
|
|
48
|
+
return ids;
|
|
49
|
+
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, this.fields);
|
|
50
|
+
const value = ((_a = columnOption === null || columnOption === void 0 ? void 0 : columnOption.to) === null || _a === void 0 ? void 0 : _a.call(columnOption, data[identifier.toString()], instance)) || data[columnOption.attributeName];
|
|
51
|
+
return Object.assign(Object.assign({}, ids), { [columnOption.columnName]: value });
|
|
52
|
+
}, {});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aC11cGRhdGUtaGFzdXJhLWdyYXBocWwubWl4aW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9pbmZyYS9oYXN1cmEtZ3JhcGhxbC9taXhpbnMvd2l0aC11cGRhdGUtaGFzdXJhLWdyYXBocWwubWl4aW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFDTCxTQUFTLEVBSVQsbUJBQW1CLEdBR3BCLE1BQU0saUJBQWlCLENBQUE7QUFDeEIsT0FBTyxFQUFFLEtBQUssRUFBcUMsTUFBTSxnQkFBZ0IsQ0FBQTtBQUd6RSxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFZakQsTUFBTSxDQUFDLE1BQU0sdUJBQXVCLEdBQUcsQ0FJckMsU0FBMkQsRUFJM0QsRUFBRTtJQUNGLE1BQU0sZ0JBQWdCLEdBQUcsQ0FBQyxPQUE2QixFQUFXLEVBQUU7UUFDbEUsSUFBSSxPQUFPLFlBQVksU0FBUztZQUFFLE9BQU8sT0FBTyxDQUFDLE9BQU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lID0gY29sdW1uT3B0aW9uPy50bz8uKGRhdGFbaWRlbnRpZmllci50b1N0cmluZygpXSwgaW5zdGFuY2UpIHx8IGRhdGFbY29sdW1uT3B0aW9uLmF0dHJpYnV0ZU5hbWVdXHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAuLi5pZHMsXHJcbiAgICAgICAgICBbY29sdW1uT3B0aW9uLmNvbHVtbk5hbWVdOiB2YWx1ZSxcclxuICAgICAgICB9XHJcbiAgICAgIH0sIHt9IGFzIE5vbkZ1bmN0aW9uQW5kSWRlbnRpZmllclByb3BlcnRpZXM8TUJhc2U+KVxyXG4gICAgfVxyXG4gIH0gYXMgYW55XHJcbn1cclxuIl19
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category } from '../../../domain';
|
|
2
|
-
export class CategoryHasuraGraphQL extends Category {
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Category } from '../../../domain';
|
|
2
|
+
export class CategoryHasuraGraphQL extends Category {
|
|
3
|
+
}
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnktaGFzdXJhLWdyYXBocWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9pbmZyYS9oYXN1cmEtZ3JhcGhxbC9tb2RlbHMvY2F0ZWdvcnktaGFzdXJhLWdyYXBocWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBRTFDLE1BQU0sT0FBTyxxQkFBc0IsU0FBUSxRQUFRO0NBSWxEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2F0ZWdvcnkgfSBmcm9tICcuLi8uLi8uLi9kb21haW4nXHJcblxyXG5leHBvcnQgY2xhc3MgQ2F0ZWdvcnlIYXN1cmFHcmFwaFFMIGV4dGVuZHMgQ2F0ZWdvcnkge1xyXG4gIGZpcmVzdG9yZUlkPzogc3RyaW5nXHJcbiAgYnJhbmRDb25kaXRpb24/OiBzdHJpbmdcclxuICB0YWdDb25kaXRpb24/OiBzdHJpbmdbXVxyXG59XHJcbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './category-hasura-graphql';
|
|
2
|
-
export * from './kit-product-hasura-graphql';
|
|
3
|
-
export * from './product-hasura-graphql';
|
|
4
|
-
export * from './variant-hasura-graphql';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './category-hasura-graphql';
|
|
2
|
+
export * from './kit-product-hasura-graphql';
|
|
3
|
+
export * from './product-hasura-graphql';
|
|
4
|
+
export * from './variant-hasura-graphql';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9pbmZyYS9oYXN1cmEtZ3JhcGhxbC9tb2RlbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywyQkFBMkIsQ0FBQTtBQUN6QyxjQUFjLDhCQUE4QixDQUFBO0FBQzVDLGNBQWMsMEJBQTBCLENBQUE7QUFDeEMsY0FBYywwQkFBMEIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY2F0ZWdvcnktaGFzdXJhLWdyYXBocWwnXHJcbmV4cG9ydCAqIGZyb20gJy4va2l0LXByb2R1Y3QtaGFzdXJhLWdyYXBocWwnXHJcbmV4cG9ydCAqIGZyb20gJy4vcHJvZHVjdC1oYXN1cmEtZ3JhcGhxbCdcclxuZXhwb3J0ICogZnJvbSAnLi92YXJpYW50LWhhc3VyYS1ncmFwaHFsJ1xyXG4iXX0=
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Type } from 'class-transformer';
|
|
3
|
-
import { KitProduct } from '../../../domain';
|
|
4
|
-
import { ProductHasuraGraphQL } from './product-hasura-graphql';
|
|
5
|
-
export class KitProductHasuraGraphQL extends KitProduct {
|
|
6
|
-
}
|
|
7
|
-
__decorate([
|
|
8
|
-
Type(() => ProductHasuraGraphQL),
|
|
9
|
-
__metadata("design:type", ProductHasuraGraphQL)
|
|
10
|
-
], KitProductHasuraGraphQL.prototype, "kit", void 0);
|
|
11
|
-
__decorate([
|
|
12
|
-
Type(() => ProductHasuraGraphQL),
|
|
13
|
-
__metadata("design:type", ProductHasuraGraphQL)
|
|
14
|
-
], KitProductHasuraGraphQL.prototype, "product", void 0);
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Type } from 'class-transformer';
|
|
3
|
+
import { KitProduct } from '../../../domain';
|
|
4
|
+
import { ProductHasuraGraphQL } from './product-hasura-graphql';
|
|
5
|
+
export class KitProductHasuraGraphQL extends KitProduct {
|
|
6
|
+
}
|
|
7
|
+
__decorate([
|
|
8
|
+
Type(() => ProductHasuraGraphQL),
|
|
9
|
+
__metadata("design:type", ProductHasuraGraphQL)
|
|
10
|
+
], KitProductHasuraGraphQL.prototype, "kit", void 0);
|
|
11
|
+
__decorate([
|
|
12
|
+
Type(() => ProductHasuraGraphQL),
|
|
13
|
+
__metadata("design:type", ProductHasuraGraphQL)
|
|
14
|
+
], KitProductHasuraGraphQL.prototype, "product", void 0);
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2l0LXByb2R1Y3QtaGFzdXJhLWdyYXBocWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmN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mFwaFFMKVxyXG4gIHByb2R1Y3Q6IFByb2R1Y3RIYXN1cmFHcmFwaFFMXHJcbn1cclxuIl19
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Type } from 'class-transformer';
|
|
3
|
-
import { Product } from '../../../domain';
|
|
4
|
-
import { KitProductHasuraGraphQL } from './kit-product-hasura-graphql';
|
|
5
|
-
export class ProductHasuraGraphQL extends Product {
|
|
6
|
-
}
|
|
7
|
-
__decorate([
|
|
8
|
-
Type(() => KitProductHasuraGraphQL),
|
|
9
|
-
__metadata("design:type", Array)
|
|
10
|
-
], ProductHasuraGraphQL.prototype, "kitProducts", void 0);
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Type } from 'class-transformer';
|
|
3
|
+
import { Product } from '../../../domain';
|
|
4
|
+
import { KitProductHasuraGraphQL } from './kit-product-hasura-graphql';
|
|
5
|
+
export class ProductHasuraGraphQL extends Product {
|
|
6
|
+
}
|
|
7
|
+
__decorate([
|
|
8
|
+
Type(() => KitProductHasuraGraphQL),
|
|
9
|
+
__metadata("design:type", Array)
|
|
10
|
+
], ProductHasuraGraphQL.prototype, "kitProducts", void 0);
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1oYXN1cmEtZ3JhcGhxbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2luZnJhL2hhc3VyYS1ncmFwaHFsL21vZGVscy9wcm9kdWN0LWhhc3VyYS1ncmFwaHFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFFeEMsT0FBTyxF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ant } from '../../../domain';
|
|
2
|
-
export class VariantHasuraGraphQL extends Variant {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.name = '';
|
|
6
|
-
this.hasVariants = false;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Variant } from '../../../domain';
|
|
2
|
+
export class VariantHasuraGraphQL extends Variant {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
this.name = '';
|
|
6
|
+
this.hasVariants = false;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudC1oYXN1cmEtZ3JhcGhxbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2luZnJhL2hhc3VyYS1ncmFwaHFsL21vZGVscy92YXJpYW50LWhhc3VyYS1ncmFwaHFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUV6QyxNQUFNLE9BQU8sb0JBQXFCLFNBQVEsT0FBTztJQUFqRDs7UUFNRSxTQUFJLEdBQUssRUFBRSxDQUFBO1FBQ1gsZ0JBQVcsR0FBSyxLQUFLLENBQUE7SUFDdkIsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVmFyaWFudCB9IGZyb20gJy4uLy4uLy4uL2RvbWFpbidcclxuXHJcbmV4cG9ydCBjbGFzcyBWYXJpYW50SGFzdXJhR3JhcGhRTCBleHRlbmRzIFZhcmlhbnQge1xyXG4gIGZpcmVzdG9yZUlkPzogc3RyaW5nXHJcbiAgZnVsbFByaWNlPzogbnVtYmVyXHJcbiAgc3Vic2NyaWJlckRpc2NvdW50UGVyY2VudGFnZT86IG51bWJlclxyXG4gIHN1YnNjcmliZXJQcmljZT86IG51bWJlclxyXG5cclxuICBuYW1lID8gPSAnJ1xyXG4gIGhhc1ZhcmlhbnRzID8gPSBmYWxzZVxyXG59XHJcbiJdfQ==
|