@infrab4a/connect 3.9.0-beta.8 → 3.9.1-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 +5170 -5263
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/index.d.ts +2 -2
- package/domain/catalog/models/category-filter.d.ts +9 -9
- package/domain/catalog/models/category.d.ts +25 -25
- 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/filter-option.d.ts +10 -10
- package/domain/catalog/models/filter.d.ts +13 -13
- package/domain/catalog/models/index.d.ts +9 -9
- package/domain/catalog/models/kit-product.d.ts +12 -12
- package/domain/catalog/models/product.d.ts +40 -40
- package/domain/catalog/models/types/category-condition.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 +9 -9
- 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-filter.repository.d.ts +5 -5
- package/domain/catalog/repositories/category.repository.d.ts +15 -15
- package/domain/catalog/repositories/filter-option.repository.d.ts +4 -4
- package/domain/catalog/repositories/filter.repository.d.ts +4 -4
- package/domain/catalog/repositories/index.d.ts +7 -7
- package/domain/catalog/repositories/product.repository.d.ts +13 -13
- 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 +14 -14
- 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 -4
- package/domain/shop-settings/models/shop-menu.d.ts +7 -7
- package/domain/shop-settings/models/shop-settings.d.ts +9 -9
- 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 -10
- package/domain/shop-settings/models/types/menu-nav.type.d.ts +8 -8
- package/domain/shop-settings/models/types/shop-banner.type.d.ts +12 -12
- package/domain/shop-settings/models/types/shop-brands.type.d.ts +10 -10
- package/domain/shop-settings/models/types/shop-carousel.type.d.ts +5 -5
- package/domain/shop-settings/models/types/shop-collection.type.d.ts +9 -9
- package/domain/shop-settings/models/types/shop-section.type.d.ts +9 -9
- 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 -3
- package/domain/shop-settings/repositories/shop-menu.repository.d.ts +4 -4
- package/domain/shop-settings/repositories/shop-settings.repository.d.ts +4 -4
- package/domain/shopping/index.d.ts +2 -2
- package/domain/shopping/models/buy-2-win.d.ts +18 -16
- package/domain/shopping/models/campaign-dashboard.d.ts +15 -15
- package/domain/shopping/models/campaign-hashtag.d.ts +18 -18
- 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 +12 -12
- 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/campaign-dashboard.repository.d.ts +4 -4
- package/domain/shopping/repositories/campaign-hashtag.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 +9 -9
- 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 +8 -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-filter.js +10 -10
- package/esm2015/domain/catalog/models/category.js +17 -17
- 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/filter-option.js +10 -10
- package/esm2015/domain/catalog/models/filter.js +10 -10
- package/esm2015/domain/catalog/models/index.js +10 -10
- 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-metadata.type.js +2 -2
- package/esm2015/domain/catalog/models/types/index.js +10 -10
- 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-filter.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/category.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/filter-option.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/filter.repository.js +2 -2
- package/esm2015/domain/catalog/repositories/index.js +8 -8
- 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 -5
- package/esm2015/domain/shop-settings/models/shop-menu.js +7 -7
- package/esm2015/domain/shop-settings/models/shop-settings.js +7 -7
- 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 -11
- 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 -2
- package/esm2015/domain/shop-settings/models/types/shop-brands.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/shop-carousel.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/shop-collection.type.js +2 -2
- package/esm2015/domain/shop-settings/models/types/shop-section.type.js +2 -2
- 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 -4
- package/esm2015/domain/shop-settings/repositories/shop-menu.repository.js +2 -2
- package/esm2015/domain/shop-settings/repositories/shop-settings.repository.js +2 -2
- package/esm2015/domain/shopping/index.js +3 -3
- package/esm2015/domain/shopping/models/buy-2-win.js +14 -14
- package/esm2015/domain/shopping/models/campaign-dashboard.js +7 -7
- package/esm2015/domain/shopping/models/campaign-hashtag.js +7 -7
- 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 +13 -13
- 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/campaign-dashboard.repository.js +2 -2
- package/esm2015/domain/shopping/repositories/campaign-hashtag.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 +10 -10
- 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 +76 -76
- package/esm2015/infra/elasticsearch/adapters/elastic-search.adapter.js +2 -0
- 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 +110 -126
- 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/enums/firestore-field-type.enum.js +10 -10
- package/esm2015/infra/firebase/firestore/enums/index.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 +98 -98
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +49 -49
- 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 +73 -73
- package/esm2015/infra/firebase/firestore/repositories/catalog/index.js +5 -5
- package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +55 -55
- 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 -4
- 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 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.js +12 -12
- package/esm2015/infra/firebase/firestore/repositories/shopping/campaign-hashtag-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 +11 -11
- 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 +40 -40
- 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/bind-filter-query.helper.js +53 -53
- package/esm2015/infra/hasura-graphql/mixins/helpers/filter-option.helper.js +22 -22
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +86 -86
- package/esm2015/infra/hasura-graphql/mixins/helpers/index.js +5 -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 +50 -50
- 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-filter-hasura-graphql.repository.js +24 -24
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +323 -322
- package/esm2015/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.js +123 -123
- package/esm2015/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.js +21 -21
- package/esm2015/infra/hasura-graphql/repositories/catalog/index.js +7 -7
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +490 -481
- 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 +3537 -3604
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/index.d.ts +5 -5
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +16 -15
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +8 -0
- 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 +13 -14
- package/infra/elasticsearch/types/elastic-search-result.d.ts +9 -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/enums/firestore-field-type.enum.d.ts +8 -8
- package/infra/firebase/firestore/enums/index.d.ts +1 -1
- 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 +18 -18
- package/infra/firebase/firestore/repositories/catalog/index.d.ts +4 -4
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +12 -12
- 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 -3
- 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 -8
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +8 -8
- package/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.d.ts +9 -9
- package/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.d.ts +9 -9
- 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 +10 -10
- 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 +13 -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 +14 -14
- 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/bind-filter-query.helper.d.ts +10 -10
- 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 +4 -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 +20 -20
- 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-filter-hasura-graphql.repository.d.ts +11 -11
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +31 -31
- package/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.d.ts +18 -18
- package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts +10 -10
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +6 -6
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +29 -29
- 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 +40 -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 +1 -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/elasticsearch/adapters/elastic.adapter.js +0 -63
- package/infra/elasticsearch/adapters/elastic.adapter.d.ts +0 -23
package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FilterOption } from '../../../../domain';
|
|
2
|
-
import { FilterOptionRepository } from '../../../../domain/catalog/repositories';
|
|
3
|
-
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
-
declare const FilterOptionHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<FilterOption> & import("../../../../domain").CrudRepository<FilterOption, import("../../../../domain").CrudParams<FilterOption>> & import("../../../../domain").UpdateRepository<FilterOption, import("../../../../domain").RepositoryUpdateParams<FilterOption>> & {
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<FilterOption>): Partial<FilterOption>;
|
|
6
|
-
}, [import("../../mixins").ConstructorParams<FilterOption> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
-
export declare class FilterOptionHasuraGraphQLRepository extends FilterOptionHasuraGraphQLRepository_base implements FilterOptionRepository {
|
|
8
|
-
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
1
|
+
import { FilterOption } from '../../../../domain';
|
|
2
|
+
import { FilterOptionRepository } from '../../../../domain/catalog/repositories';
|
|
3
|
+
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
+
declare const FilterOptionHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<FilterOption> & import("../../../../domain").CrudRepository<FilterOption, import("../../../../domain").CrudParams<FilterOption>> & import("../../../../domain").UpdateRepository<FilterOption, import("../../../../domain").RepositoryUpdateParams<FilterOption>> & {
|
|
5
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<FilterOption>): Partial<FilterOption>;
|
|
6
|
+
}, [import("../../mixins").ConstructorParams<FilterOption> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
+
export declare class FilterOptionHasuraGraphQLRepository extends FilterOptionHasuraGraphQLRepository_base implements FilterOptionRepository {
|
|
8
|
+
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './category-filter-hasura-graphql.repository';
|
|
2
|
-
export * from './category-hasura-graphql.repository';
|
|
3
|
-
export * from './filter-hasura-graphql.repository';
|
|
4
|
-
export * from './filter-option-hasura-graphql.repository';
|
|
5
|
-
export * from './product-hasura-graphql.repository';
|
|
6
|
-
export * from './variant-hasura-graphql.repository';
|
|
1
|
+
export * from './category-filter-hasura-graphql.repository';
|
|
2
|
+
export * from './category-hasura-graphql.repository';
|
|
3
|
+
export * from './filter-hasura-graphql.repository';
|
|
4
|
+
export * from './filter-option-hasura-graphql.repository';
|
|
5
|
+
export * from './product-hasura-graphql.repository';
|
|
6
|
+
export * from './variant-hasura-graphql.repository';
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData, UpdateRepositoryParams } from '../../../../domain';
|
|
2
|
-
import { ProductHasuraGraphQL } from '../../models';
|
|
3
|
-
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
-
declare const ProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").CrudRepository<ProductHasuraGraphQL, import("../../../../domain").CrudParams<ProductHasuraGraphQL>> & import("../../../../domain").UpdateRepository<ProductHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>> & {
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>): Partial<ProductHasuraGraphQL>;
|
|
6
|
-
}, [import("../../mixins").ConstructorParams<ProductHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
-
export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQLRepository_base implements ProductRepository {
|
|
8
|
-
private get reviewsFields();
|
|
9
|
-
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
10
|
-
create(params: CreateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
11
|
-
get(identifiers: GetRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
12
|
-
find(params?: FindRepositoryParams<ProductHasuraGraphQL>): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
13
|
-
getBySlug(slug: string): Promise<ProductHasuraGraphQL>;
|
|
14
|
-
update(params: UpdateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
15
|
-
fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
|
|
16
|
-
private updateCategories;
|
|
17
|
-
private updateKitProducts;
|
|
18
|
-
private updateReviews;
|
|
19
|
-
private updateMetadata;
|
|
20
|
-
private getId;
|
|
21
|
-
private findReviewsByProduct;
|
|
22
|
-
private findReview;
|
|
23
|
-
private getReviewByPersonId;
|
|
24
|
-
private getReviewByAuthorAndEmail;
|
|
25
|
-
private bindReviewToModel;
|
|
26
|
-
private bindReviewToHasura;
|
|
27
|
-
cleanShoppingCountFromIds(ids: string[]): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
1
|
+
import { CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, ProductRepository, RepositoryFindResult, ReviewStatusParams, ReviewWithProductData, UpdateRepositoryParams } from '../../../../domain';
|
|
2
|
+
import { ProductHasuraGraphQL } from '../../models';
|
|
3
|
+
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
+
declare const ProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").CrudRepository<ProductHasuraGraphQL, import("../../../../domain").CrudParams<ProductHasuraGraphQL>> & import("../../../../domain").UpdateRepository<ProductHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>> & {
|
|
5
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>): Partial<ProductHasuraGraphQL>;
|
|
6
|
+
}, [import("../../mixins").ConstructorParams<ProductHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
+
export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQLRepository_base implements ProductRepository {
|
|
8
|
+
private get reviewsFields();
|
|
9
|
+
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
10
|
+
create(params: CreateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
11
|
+
get(identifiers: GetRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
12
|
+
find(params?: FindRepositoryParams<ProductHasuraGraphQL>): Promise<RepositoryFindResult<ProductHasuraGraphQL>>;
|
|
13
|
+
getBySlug(slug: string): Promise<ProductHasuraGraphQL>;
|
|
14
|
+
update(params: UpdateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
|
|
15
|
+
fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
|
|
16
|
+
private updateCategories;
|
|
17
|
+
private updateKitProducts;
|
|
18
|
+
private updateReviews;
|
|
19
|
+
private updateMetadata;
|
|
20
|
+
private getId;
|
|
21
|
+
private findReviewsByProduct;
|
|
22
|
+
private findReview;
|
|
23
|
+
private getReviewByPersonId;
|
|
24
|
+
private getReviewByAuthorAndEmail;
|
|
25
|
+
private bindReviewToModel;
|
|
26
|
+
private bindReviewToHasura;
|
|
27
|
+
cleanShoppingCountFromIds(ids: string[]): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { FindRepositoryParams, GetRepositoryParams, RepositoryFindResult, UpdateRepositoryParams, VariantRepository } from '../../../../domain';
|
|
2
|
-
import { VariantHasuraGraphQL } from '../../models';
|
|
3
|
-
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
-
declare const VariantHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<VariantHasuraGraphQL> & import("../../../../domain").CrudRepository<VariantHasuraGraphQL, import("../../../../domain").CrudParams<VariantHasuraGraphQL>> & import("../../../../domain").UpdateRepository<VariantHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<VariantHasuraGraphQL>> & {
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<VariantHasuraGraphQL>): Partial<VariantHasuraGraphQL>;
|
|
6
|
-
}, [import("../../mixins").ConstructorParams<VariantHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
-
export declare class VariantHasuraGraphQLRepository extends VariantHasuraGraphQLRepository_base implements VariantRepository {
|
|
8
|
-
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
9
|
-
get(identifiers: GetRepositoryParams<VariantHasuraGraphQL>): Promise<VariantHasuraGraphQL>;
|
|
10
|
-
find(params?: FindRepositoryParams<VariantHasuraGraphQL>): Promise<RepositoryFindResult<VariantHasuraGraphQL>>;
|
|
11
|
-
update(params: UpdateRepositoryParams<VariantHasuraGraphQL>): Promise<VariantHasuraGraphQL>;
|
|
12
|
-
private getId;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
import { FindRepositoryParams, GetRepositoryParams, RepositoryFindResult, UpdateRepositoryParams, VariantRepository } from '../../../../domain';
|
|
2
|
+
import { VariantHasuraGraphQL } from '../../models';
|
|
3
|
+
import { HasuraGraphQLAuthOptions } from '../../types';
|
|
4
|
+
declare const VariantHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<VariantHasuraGraphQL> & import("../../../../domain").CrudRepository<VariantHasuraGraphQL, import("../../../../domain").CrudParams<VariantHasuraGraphQL>> & import("../../../../domain").UpdateRepository<VariantHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<VariantHasuraGraphQL>> & {
|
|
5
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<VariantHasuraGraphQL>): Partial<VariantHasuraGraphQL>;
|
|
6
|
+
}, [import("../../mixins").ConstructorParams<VariantHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
+
export declare class VariantHasuraGraphQLRepository extends VariantHasuraGraphQLRepository_base implements VariantRepository {
|
|
8
|
+
constructor(endpoint: string, authOptions: HasuraGraphQLAuthOptions);
|
|
9
|
+
get(identifiers: GetRepositoryParams<VariantHasuraGraphQL>): Promise<VariantHasuraGraphQL>;
|
|
10
|
+
find(params?: FindRepositoryParams<VariantHasuraGraphQL>): Promise<RepositoryFindResult<VariantHasuraGraphQL>>;
|
|
11
|
+
update(params: UpdateRepositoryParams<VariantHasuraGraphQL>): Promise<VariantHasuraGraphQL>;
|
|
12
|
+
private getId;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './catalog';
|
|
1
|
+
export * from './catalog';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NestedField } from './nested-field.type';
|
|
2
|
-
export declare type Fields = Array<string | object | NestedField | 'aggregate' | 'nodes'>;
|
|
1
|
+
import { NestedField } from './nested-field.type';
|
|
2
|
+
export declare type Fields = Array<string | object | NestedField | 'aggregate' | 'nodes'>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { BaseModelBuilder, ModelBaseStructure } from '../../../domain';
|
|
2
|
-
import { HasuraGraphQLAuthOptions } from './hasura-graphql-auth-options.type';
|
|
3
|
-
import { HasuraGraphQLFields } from './hasura-graphql-fields.type';
|
|
4
|
-
import { VariableOptions } from './variable-options.type';
|
|
5
|
-
export declare type GraphQLParams<Model extends ModelBaseStructure> = {
|
|
6
|
-
operation: string;
|
|
7
|
-
fields?: HasuraGraphQLFields<Model>;
|
|
8
|
-
variables?: VariableOptions;
|
|
9
|
-
};
|
|
10
|
-
export declare type GraphQLRepository<Model extends ModelBaseStructure> = {
|
|
11
|
-
tableName: string;
|
|
12
|
-
model: BaseModelBuilder<Model>;
|
|
13
|
-
fields: HasuraGraphQLFields<Model>;
|
|
14
|
-
endpoint: string;
|
|
15
|
-
authOptions: HasuraGraphQLAuthOptions;
|
|
16
|
-
mutation: <ReturnFields = any>(operation: string, fields?: string[] | HasuraGraphQLFields<Model>, variables?: VariableOptions) => Promise<ReturnFields>;
|
|
17
|
-
query: <ReturnFields = any>(operation: string | GraphQLParams<Model>[], fields?: string[] | HasuraGraphQLFields<Model>, variables?: VariableOptions) => Promise<ReturnFields>;
|
|
18
|
-
getAttributeGraphQLTypeOf: <FieldValue>(value: FieldValue) => string;
|
|
19
|
-
convertDataFromHasura: (data: Record<string, string | number>) => Model;
|
|
20
|
-
convertDataToHasura(instance: Model, update?: boolean): Record<string, string | number>;
|
|
21
|
-
};
|
|
1
|
+
import { BaseModelBuilder, ModelBaseStructure } from '../../../domain';
|
|
2
|
+
import { HasuraGraphQLAuthOptions } from './hasura-graphql-auth-options.type';
|
|
3
|
+
import { HasuraGraphQLFields } from './hasura-graphql-fields.type';
|
|
4
|
+
import { VariableOptions } from './variable-options.type';
|
|
5
|
+
export declare type GraphQLParams<Model extends ModelBaseStructure> = {
|
|
6
|
+
operation: string;
|
|
7
|
+
fields?: HasuraGraphQLFields<Model>;
|
|
8
|
+
variables?: VariableOptions;
|
|
9
|
+
};
|
|
10
|
+
export declare type GraphQLRepository<Model extends ModelBaseStructure> = {
|
|
11
|
+
tableName: string;
|
|
12
|
+
model: BaseModelBuilder<Model>;
|
|
13
|
+
fields: HasuraGraphQLFields<Model>;
|
|
14
|
+
endpoint: string;
|
|
15
|
+
authOptions: HasuraGraphQLAuthOptions;
|
|
16
|
+
mutation: <ReturnFields = any>(operation: string, fields?: string[] | HasuraGraphQLFields<Model>, variables?: VariableOptions) => Promise<ReturnFields>;
|
|
17
|
+
query: <ReturnFields = any>(operation: string | GraphQLParams<Model>[], fields?: string[] | HasuraGraphQLFields<Model>, variables?: VariableOptions) => Promise<ReturnFields>;
|
|
18
|
+
getAttributeGraphQLTypeOf: <FieldValue>(value: FieldValue) => string;
|
|
19
|
+
convertDataFromHasura: (data: Record<string, string | number>) => Model;
|
|
20
|
+
convertDataToHasura(instance: Model, update?: boolean): Record<string, string | number>;
|
|
21
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare type HasuraGraphQLAuthOptions = {
|
|
2
|
-
adminSecret?: string;
|
|
3
|
-
authRole?: {
|
|
4
|
-
role: string;
|
|
5
|
-
userId: string;
|
|
6
|
-
};
|
|
7
|
-
authToken?: string;
|
|
8
|
-
};
|
|
1
|
+
export declare type HasuraGraphQLAuthOptions = {
|
|
2
|
+
adminSecret?: string;
|
|
3
|
+
authRole?: {
|
|
4
|
+
role: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
};
|
|
7
|
+
authToken?: string;
|
|
8
|
+
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { ModelBaseStructure, NestedRepositoryFindFieltersOptions, NonFunctionAndIdentifierPropertyNames, RepositoryFindField } from '../../../domain';
|
|
2
|
-
import { PropType } from '../../../utils';
|
|
3
|
-
import { HasuraGraphQLColumnType } from '../enums';
|
|
4
|
-
export declare type ColumnOptions<FieldType, Model, ValueFrom = any> = {
|
|
5
|
-
type?: HasuraGraphQLColumnType;
|
|
6
|
-
columnName?: string;
|
|
7
|
-
filters?: {
|
|
8
|
-
filterType: HasuraGraphQLColumnType | string;
|
|
9
|
-
filters: NestedRepositoryFindFieltersOptions<FieldType>;
|
|
10
|
-
};
|
|
11
|
-
fields?: HasuraGraphQLFields<FieldType extends any[] ? FieldType[number] : FieldType>;
|
|
12
|
-
foreignKeyColumn?: Partial<Record<NonFunctionAndIdentifierPropertyNames<FieldType extends any[] ? FieldType[number] : FieldType>, NonFunctionAndIdentifierPropertyNames<Model> | (string & {})>> | {};
|
|
13
|
-
from?: (value: ValueFrom | ValueFrom[], data?: any) => FieldType;
|
|
14
|
-
to?: (value: FieldType, instance?: Model) => ValueFrom;
|
|
15
|
-
bindFindFilter?: (sentence: RepositoryFindField<Model, keyof Model>) => Record<string, RepositoryFindField<any, any> | ValueFrom> | RepositoryFindField<any, any> | ValueFrom;
|
|
16
|
-
bindPersistData?: (value: FieldType, instance?: Model) => Record<string, ValueFrom>;
|
|
17
|
-
};
|
|
18
|
-
export declare type AggregateOptionNames = 'avg' | 'count' | 'max' | 'min' | 'stddev' | 'stddev_pop' | 'stddev_samp' | 'sum' | 'var_pop' | 'var_samp' | 'variance';
|
|
19
|
-
export declare type AggregateOptionFields<Model, Type, Properties extends keyof Model = keyof Model> = {
|
|
20
|
-
[K in Properties]: PropType<Model, K> extends Type ? K : never;
|
|
21
|
-
}[Properties] | string;
|
|
22
|
-
export declare type AggregateOptions<Model> = {
|
|
23
|
-
avg?: Array<AggregateOptionFields<Model, number>>;
|
|
24
|
-
max?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
25
|
-
min?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
26
|
-
stddev?: Array<AggregateOptionFields<Model, number>>;
|
|
27
|
-
stddev_pop?: Array<AggregateOptionFields<Model, number>>;
|
|
28
|
-
stddev_samp?: Array<AggregateOptionFields<Model, number>>;
|
|
29
|
-
sum?: Array<AggregateOptionFields<Model, number>>;
|
|
30
|
-
var_pop?: Array<AggregateOptionFields<Model, number>>;
|
|
31
|
-
var_samp?: Array<AggregateOptionFields<Model, number>>;
|
|
32
|
-
variance?: Array<AggregateOptionFields<Model, number>>;
|
|
33
|
-
};
|
|
34
|
-
export declare type HasuraGraphQLFields<Model> = ((Model extends ModelBaseStructure ? NonFunctionAndIdentifierPropertyNames<Model> | {
|
|
35
|
-
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? HasuraGraphQLFields<PropType<Model, key>> : PropType<Model, key> extends any[] ? PropType<Model, key>[] extends ModelBaseStructure[] ? HasuraGraphQLFields<PropType<Model, key>[]> : never : never;
|
|
36
|
-
} | {
|
|
37
|
-
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: key extends 'aggregate' ? never : PropType<Model, key> extends ModelBaseStructure ? ColumnOptions<PropType<Model, key>, Model> : ColumnOptions<PropType<Model, key>, Model>;
|
|
38
|
-
} | Record<string, ColumnOptions<PropType<Model, any>, Model>> : string) | {
|
|
39
|
-
aggregate: Array<AggregateOptions<Model> | 'count'>;
|
|
40
|
-
} | 'affected_rows')[];
|
|
1
|
+
import { ModelBaseStructure, NestedRepositoryFindFieltersOptions, NonFunctionAndIdentifierPropertyNames, RepositoryFindField } from '../../../domain';
|
|
2
|
+
import { PropType } from '../../../utils';
|
|
3
|
+
import { HasuraGraphQLColumnType } from '../enums';
|
|
4
|
+
export declare type ColumnOptions<FieldType, Model, ValueFrom = any> = {
|
|
5
|
+
type?: HasuraGraphQLColumnType;
|
|
6
|
+
columnName?: string;
|
|
7
|
+
filters?: {
|
|
8
|
+
filterType: HasuraGraphQLColumnType | string;
|
|
9
|
+
filters: NestedRepositoryFindFieltersOptions<FieldType>;
|
|
10
|
+
};
|
|
11
|
+
fields?: HasuraGraphQLFields<FieldType extends any[] ? FieldType[number] : FieldType>;
|
|
12
|
+
foreignKeyColumn?: Partial<Record<NonFunctionAndIdentifierPropertyNames<FieldType extends any[] ? FieldType[number] : FieldType>, NonFunctionAndIdentifierPropertyNames<Model> | (string & {})>> | {};
|
|
13
|
+
from?: (value: ValueFrom | ValueFrom[], data?: any) => FieldType;
|
|
14
|
+
to?: (value: FieldType, instance?: Model) => ValueFrom;
|
|
15
|
+
bindFindFilter?: (sentence: RepositoryFindField<Model, keyof Model>) => Record<string, RepositoryFindField<any, any> | ValueFrom> | RepositoryFindField<any, any> | ValueFrom;
|
|
16
|
+
bindPersistData?: (value: FieldType, instance?: Model) => Record<string, ValueFrom>;
|
|
17
|
+
};
|
|
18
|
+
export declare type AggregateOptionNames = 'avg' | 'count' | 'max' | 'min' | 'stddev' | 'stddev_pop' | 'stddev_samp' | 'sum' | 'var_pop' | 'var_samp' | 'variance';
|
|
19
|
+
export declare type AggregateOptionFields<Model, Type, Properties extends keyof Model = keyof Model> = {
|
|
20
|
+
[K in Properties]: PropType<Model, K> extends Type ? K : never;
|
|
21
|
+
}[Properties] | string;
|
|
22
|
+
export declare type AggregateOptions<Model> = {
|
|
23
|
+
avg?: Array<AggregateOptionFields<Model, number>>;
|
|
24
|
+
max?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
25
|
+
min?: Array<AggregateOptionFields<Model, number | Date>>;
|
|
26
|
+
stddev?: Array<AggregateOptionFields<Model, number>>;
|
|
27
|
+
stddev_pop?: Array<AggregateOptionFields<Model, number>>;
|
|
28
|
+
stddev_samp?: Array<AggregateOptionFields<Model, number>>;
|
|
29
|
+
sum?: Array<AggregateOptionFields<Model, number>>;
|
|
30
|
+
var_pop?: Array<AggregateOptionFields<Model, number>>;
|
|
31
|
+
var_samp?: Array<AggregateOptionFields<Model, number>>;
|
|
32
|
+
variance?: Array<AggregateOptionFields<Model, number>>;
|
|
33
|
+
};
|
|
34
|
+
export declare type HasuraGraphQLFields<Model> = ((Model extends ModelBaseStructure ? NonFunctionAndIdentifierPropertyNames<Model> | {
|
|
35
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? HasuraGraphQLFields<PropType<Model, key>> : PropType<Model, key> extends any[] ? PropType<Model, key>[] extends ModelBaseStructure[] ? HasuraGraphQLFields<PropType<Model, key>[]> : never : never;
|
|
36
|
+
} | {
|
|
37
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: key extends 'aggregate' ? never : PropType<Model, key> extends ModelBaseStructure ? ColumnOptions<PropType<Model, key>, Model> : ColumnOptions<PropType<Model, key>, Model>;
|
|
38
|
+
} | Record<string, ColumnOptions<PropType<Model, any>, Model>> : string) | {
|
|
39
|
+
aggregate: Array<AggregateOptions<Model> | 'count'>;
|
|
40
|
+
} | 'affected_rows')[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare type HasuraGraphQLHeaders = {
|
|
2
|
-
Authorization?: string;
|
|
3
|
-
'Content-Type': string;
|
|
4
|
-
'X-Hasura-Admin-Secret'?: string;
|
|
5
|
-
'X-Hasura-Role'?: string;
|
|
6
|
-
'X-Hasura-User-Id'?: string;
|
|
7
|
-
};
|
|
1
|
+
export declare type HasuraGraphQLHeaders = {
|
|
2
|
+
Authorization?: string;
|
|
3
|
+
'Content-Type': string;
|
|
4
|
+
'X-Hasura-Admin-Secret'?: string;
|
|
5
|
+
'X-Hasura-Role'?: string;
|
|
6
|
+
'X-Hasura-User-Id'?: string;
|
|
7
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './fields.type';
|
|
2
|
-
export * from './graphql.repository.type';
|
|
3
|
-
export * from './nested-field.type';
|
|
4
|
-
export * from './query-builder-options.type';
|
|
5
|
-
export * from './variable-options.type';
|
|
6
|
-
export * from './hasura-graphql-auth-options.type';
|
|
7
|
-
export * from './hasura-graphql-fields.type';
|
|
8
|
-
export * from './hasura-graphql-headers.type';
|
|
1
|
+
export * from './fields.type';
|
|
2
|
+
export * from './graphql.repository.type';
|
|
3
|
+
export * from './nested-field.type';
|
|
4
|
+
export * from './query-builder-options.type';
|
|
5
|
+
export * from './variable-options.type';
|
|
6
|
+
export * from './hasura-graphql-auth-options.type';
|
|
7
|
+
export * from './hasura-graphql-fields.type';
|
|
8
|
+
export * from './hasura-graphql-headers.type';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fields } from './fields.type';
|
|
2
|
-
import { QueryBuilderOptions } from './query-builder-options.type';
|
|
3
|
-
export declare type NestedField = {
|
|
4
|
-
operation: string;
|
|
5
|
-
variables: QueryBuilderOptions[];
|
|
6
|
-
fields: Fields;
|
|
7
|
-
};
|
|
1
|
+
import { Fields } from './fields.type';
|
|
2
|
+
import { QueryBuilderOptions } from './query-builder-options.type';
|
|
3
|
+
export declare type NestedField = {
|
|
4
|
+
operation: string;
|
|
5
|
+
variables: QueryBuilderOptions[];
|
|
6
|
+
fields: Fields;
|
|
7
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fields } from './fields.type';
|
|
2
|
-
import { VariableOptions } from './variable-options.type';
|
|
3
|
-
export interface QueryBuilderOptions {
|
|
4
|
-
operation: string;
|
|
5
|
-
fields?: Fields;
|
|
6
|
-
variables?: VariableOptions;
|
|
7
|
-
}
|
|
1
|
+
import { Fields } from './fields.type';
|
|
2
|
+
import { VariableOptions } from './variable-options.type';
|
|
3
|
+
export interface QueryBuilderOptions {
|
|
4
|
+
operation: string;
|
|
5
|
+
fields?: Fields;
|
|
6
|
+
variables?: VariableOptions;
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare type VariableOptions = {
|
|
2
|
-
type?: string;
|
|
3
|
-
name?: string;
|
|
4
|
-
value: any;
|
|
5
|
-
list?: boolean;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
} | {
|
|
8
|
-
[k: string]: any;
|
|
9
|
-
};
|
|
1
|
+
export declare type VariableOptions = {
|
|
2
|
+
type?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
value: any;
|
|
5
|
+
list?: boolean;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
package/infra/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './elasticsearch';
|
|
2
|
-
export * from './firebase';
|
|
3
|
-
export * from './hasura-graphql';
|
|
1
|
+
export * from './elasticsearch';
|
|
2
|
+
export * from './firebase';
|
|
3
|
+
export * from './hasura-graphql';
|
package/infrab4a-connect.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="@infrab4a/connect" />
|
|
5
|
-
export * from './index';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@infrab4a/connect" />
|
|
5
|
+
export * from './index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.1-beta.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"url": "https://github.com/B4AGroup/b4a-firebase-libs"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@elastic/elasticsearch": "^8.7.0",
|
|
13
12
|
"axios": "^0.27.2",
|
|
14
13
|
"class-transformer": "^0.5.1",
|
|
15
14
|
"date-fns": "^2.28.0",
|
package/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { add, addDays, addBusinessDays, addMonths, addYears, endOfDay, format, formatISO9075, parseISO, startOfDay, sub } from 'date-fns';
|
|
2
|
-
import { chunk, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set } from 'lodash';
|
|
3
|
-
export * from './mixins';
|
|
4
|
-
export * from './is-uuid';
|
|
5
|
-
export * from './types';
|
|
6
|
-
export * from './parse-datetime';
|
|
7
|
-
export { add, addDays, addBusinessDays, addMonths, addYears, chunk, endOfDay, format, formatISO9075, isBoolean, isDate, isEmpty, isInteger, isNil, isNaN, isNumber, isObject, isString, parseISO, now, omit, pick, set, startOfDay, sub, };
|
|
1
|
+
import { add, addDays, addBusinessDays, addMonths, addYears, endOfDay, format, formatISO9075, parseISO, startOfDay, sub } from 'date-fns';
|
|
2
|
+
import { chunk, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set } from 'lodash';
|
|
3
|
+
export * from './mixins';
|
|
4
|
+
export * from './is-uuid';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './parse-datetime';
|
|
7
|
+
export { add, addDays, addBusinessDays, addMonths, addYears, chunk, endOfDay, format, formatISO9075, isBoolean, isDate, isEmpty, isInteger, isNil, isNaN, isNumber, isObject, isString, parseISO, now, omit, pick, set, startOfDay, sub, };
|
package/utils/is-uuid.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isUUID: (value: string) => boolean;
|
|
1
|
+
export declare const isUUID: (value: string) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class Base {
|
|
2
|
-
constructor(...args: Array<any>);
|
|
3
|
-
}
|
|
1
|
+
export declare class Base {
|
|
2
|
+
constructor(...args: Array<any>);
|
|
3
|
+
}
|
package/utils/mixins/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './mixin-ctor.type';
|
|
2
|
-
export * from './base.mixin';
|
|
3
|
-
export * from './merge-constructor-params.type';
|
|
1
|
+
export * from './mixin-ctor.type';
|
|
2
|
+
export * from './base.mixin';
|
|
3
|
+
export * from './merge-constructor-params.type';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare type Tail<T extends any[]> = T extends [any, ...infer U] ? U : never;
|
|
2
|
-
export declare type MergeConstructorParams<NewParams, CurrentParams extends any[]> = CurrentParams extends [] ? [NewParams, ...any] : CurrentParams[0] extends never ? [NewParams, ...any] : [CurrentParams[0] & NewParams, ...Tail<CurrentParams>];
|
|
3
|
-
export {};
|
|
1
|
+
declare type Tail<T extends any[]> = T extends [any, ...infer U] ? U : never;
|
|
2
|
+
export declare type MergeConstructorParams<NewParams, CurrentParams extends any[]> = CurrentParams extends [] ? [NewParams, ...any] : CurrentParams[0] extends never ? [NewParams, ...any] : [CurrentParams[0] & NewParams, ...Tail<CurrentParams>];
|
|
3
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type MixinCtor<T = any, A extends any[] = any[]> = new (...args: A) => T;
|
|
1
|
+
export declare type MixinCtor<T = any, A extends any[] = any[]> = new (...args: A) => T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const parseDateTime: (value: string) => string | Date;
|
|
1
|
+
export declare const parseDateTime: (value: string) => string | Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
1
|
+
export declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
package/utils/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './prop.type';
|
|
2
|
-
export * from './array-element.type';
|
|
1
|
+
export * from './prop.type';
|
|
2
|
+
export * from './array-element.type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
|
|
1
|
+
export declare type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { Client } from '@elastic/elasticsearch';
|
|
3
|
-
import { NotFoundError } from '../../../errors';
|
|
4
|
-
export class ElasticAdapter {
|
|
5
|
-
constructor(config) {
|
|
6
|
-
this.config = config;
|
|
7
|
-
this.client = new Client(config);
|
|
8
|
-
}
|
|
9
|
-
get(index, id) {
|
|
10
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
try {
|
|
12
|
-
const data = yield this.client.get({ index, id });
|
|
13
|
-
return data._source;
|
|
14
|
-
}
|
|
15
|
-
catch (erro) {
|
|
16
|
-
throw new NotFoundError(erro.message);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
query(index, query) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const result = yield this.client.search({
|
|
23
|
-
index,
|
|
24
|
-
query,
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
total: result.hits.total,
|
|
28
|
-
hits: result.hits.hits,
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
save(index, data) {
|
|
33
|
-
return this.client.index({
|
|
34
|
-
index,
|
|
35
|
-
document: data,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
update(index, id, data) {
|
|
39
|
-
try {
|
|
40
|
-
return this.client.update({
|
|
41
|
-
index,
|
|
42
|
-
id,
|
|
43
|
-
doc: data,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
console.log(error);
|
|
48
|
-
throw new Error(error.message);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
delete(index, id) {
|
|
52
|
-
try {
|
|
53
|
-
this.client.delete({
|
|
54
|
-
index,
|
|
55
|
-
id,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
console.log(error);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxhc3RpYy5hZGFwdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvaW5mcmEvZWxhc3RpY3NlYXJjaC9hZGFwdGVycy9lbGFzdGljLmFkYXB0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUUvQyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFPL0MsTUFBTSxPQUFPLGNBQWM7SUFFekIsWUFBNkIsTUFBMkI7UUFBM0IsV0FBTSxHQUFOLE1BQU0sQ0FBcUI7UUFDdEQsSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUNsQyxDQUFDO0lBRUssR0FBRyxDQUFDLEtBQWEsRUFBRSxFQUFVOztZQUNqQyxJQUFJO2dCQUNGLE1BQU0sSUFBSSxHQUFHLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQTtnQkFDakQsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFBO2FBQ3BCO1lBQUMsT0FBTyxJQUFJLEVBQUU7Z0JBQ2IsTUFBTSxJQUFJLGFBQWEsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUE7YUFDdEM7UUFDSCxDQUFDO0tBQUE7SUFFSyxLQUFLLENBQUMsS0FBYSxFQUFFLEtBQVU7O1lBQ25DLE1BQU0sTUFBTSxHQUFHLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUM7Z0JBQ3RDLEtBQUs7Z0JBQ0wsS0FBSzthQUNOLENBQUMsQ0FBQTtZQUVGLE9BQU87Z0JBQ0wsS0FBSyxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSztnQkFDeEIsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSTthQUN2QixDQUFBO1FBQ0gsQ0FBQztLQUFBO0lBRUQsSUFBSSxDQUFDLEtBQWEsRUFBRSxJQUFnQjtRQUNsQyxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDO1lBQ3ZCLEtBQUs7WUFDTCxRQUFRLEVBQUUsSUFBSTtTQUNmLENBQUMsQ0FBQTtJQUNKLENBQUM7SUFFRCxNQUFNLENBQUMsS0FBYSxFQUFFLEVBQVUsRUFBRSxJQUFnQjtRQUNoRCxJQUFJO1lBQ0YsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQztnQkFDeEIsS0FBSztnQkFDTCxFQUFFO2dCQUNGLEdBQUcsRUFBRSxJQUFJO2FBQ1YsQ0FBQyxDQUFBO1NBQ0g7UUFBQyxPQUFPLEtBQUssRUFBRTtZQUNkLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7WUFDbEIsTUFBTSxJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUE7U0FDL0I7SUFDSCxDQUFDO0lBRUQsTUFBTSxDQUFDLEtBQWEsRUFBRSxFQUFVO1FBQzlCLElBQUk7WUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQztnQkFDakIsS0FBSztnQkFDTCxFQUFFO2FBQ0gsQ0FBQyxDQUFBO1NBQ0g7UUFBQyxPQUFPLEtBQUssRUFBRTtZQUNkLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7U0FDbkI7SUFDSCxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDbGllbnQgfSBmcm9tICdAZWxhc3RpYy9lbGFzdGljc2VhcmNoJ1xyXG5pbXBvcnQgeyBCYXNlTW9kZWwgfSBmcm9tICcuLi8uLi8uLi9kb21haW4nXHJcbmltcG9ydCB7IE5vdEZvdW5kRXJyb3IgfSBmcm9tICcuLi8uLi8uLi9lcnJvcnMnXHJcblxyXG5leHBvcnQgdHlwZSBFbGFzdGljU2VhcmNoQ29uZmlnID0ge1xyXG4gIGNsb3VkOiB7IGlkOiBzdHJpbmcgfVxyXG4gIGF1dGg6IHsgYXBpS2V5OiBzdHJpbmcgfVxyXG59XHJcblxyXG5leHBvcnQgY2xhc3MgRWxhc3RpY0FkYXB0ZXI8VCBleHRlbmRzIEJhc2VNb2RlbDxUPj4ge1xyXG4gIGNsaWVudDogQ2xpZW50XHJcbiAgY29uc3RydWN0b3IocHJpdmF0ZSByZWFkb25seSBjb25maWc6IEVsYXN0aWNTZWFyY2hDb25maWcpIHtcclxuICAgIHRoaXMuY2xpZW50ID0gbmV3IENsaWVudChjb25maWcpXHJcbiAgfVxyXG5cclxuICBhc3luYyBnZXQoaW5kZXg6IHN0cmluZywgaWQ6IHN0cmluZykge1xyXG4gICAgdHJ5IHtcclxuICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHRoaXMuY2xpZW50LmdldCh7IGluZGV4LCBpZCB9KVxyXG4gICAgICByZXR1cm4gZGF0YS5fc291cmNlXHJcbiAgICB9IGNhdGNoIChlcnJvKSB7XHJcbiAgICAgIHRocm93IG5ldyBOb3RGb3VuZEVycm9yKGVycm8ubWVzc2FnZSlcclxuICAgIH1cclxuICB9XHJcblxyXG4gIGFzeW5jIHF1ZXJ5KGluZGV4OiBzdHJpbmcsIHF1ZXJ5OiBhbnkpIHtcclxuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRoaXMuY2xpZW50LnNlYXJjaCh7XHJcbiAgICAgIGluZGV4LFxyXG4gICAgICBxdWVyeSxcclxuICAgIH0pXHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgdG90YWw6IHJlc3VsdC5oaXRzLnRvdGFsLFxyXG4gICAgICBoaXRzOiByZXN1bHQuaGl0cy5oaXRzLFxyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgc2F2ZShpbmRleDogc3RyaW5nLCBkYXRhOiBQYXJ0aWFsPFQ+KSB7XHJcbiAgICByZXR1cm4gdGhpcy5jbGllbnQuaW5kZXgoe1xyXG4gICAgICBpbmRleCxcclxuICAgICAgZG9jdW1lbnQ6IGRhdGEsXHJcbiAgICB9KVxyXG4gIH1cclxuXHJcbiAgdXBkYXRlKGluZGV4OiBzdHJpbmcsIGlkOiBzdHJpbmcsIGRhdGE6IFBhcnRpYWw8VD4pIHtcclxuICAgIHRyeSB7XHJcbiAgICAgIHJldHVybiB0aGlzLmNsaWVudC51cGRhdGUoe1xyXG4gICAgICAgIGluZGV4LFxyXG4gICAgICAgIGlkLFxyXG4gICAgICAgIGRvYzogZGF0YSxcclxuICAgICAgfSlcclxuICAgIH0gY2F0Y2ggKGVycm9yKSB7XHJcbiAgICAgIGNvbnNvbGUubG9nKGVycm9yKVxyXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IubWVzc2FnZSlcclxuICAgIH1cclxuICB9XHJcblxyXG4gIGRlbGV0ZShpbmRleDogc3RyaW5nLCBpZDogc3RyaW5nKSB7XHJcbiAgICB0cnkge1xyXG4gICAgICB0aGlzLmNsaWVudC5kZWxldGUoe1xyXG4gICAgICAgIGluZGV4LFxyXG4gICAgICAgIGlkLFxyXG4gICAgICB9KVxyXG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgY29uc29sZS5sb2coZXJyb3IpXHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Client } from '@elastic/elasticsearch';
|
|
2
|
-
import { BaseModel } from '../../../domain';
|
|
3
|
-
export declare type ElasticSearchConfig = {
|
|
4
|
-
cloud: {
|
|
5
|
-
id: string;
|
|
6
|
-
};
|
|
7
|
-
auth: {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare class ElasticAdapter<T extends BaseModel<T>> {
|
|
12
|
-
private readonly config;
|
|
13
|
-
client: Client;
|
|
14
|
-
constructor(config: ElasticSearchConfig);
|
|
15
|
-
get(index: string, id: string): Promise<unknown>;
|
|
16
|
-
query(index: string, query: any): Promise<{
|
|
17
|
-
total: number | import("@elastic/elasticsearch/lib/api/types").SearchTotalHits;
|
|
18
|
-
hits: import("@elastic/elasticsearch/lib/api/types").SearchHit<unknown>[];
|
|
19
|
-
}>;
|
|
20
|
-
save(index: string, data: Partial<T>): Promise<import("@elastic/elasticsearch/lib/api/types").WriteResponseBase>;
|
|
21
|
-
update(index: string, id: string, data: Partial<T>): Promise<import("@elastic/elasticsearch/lib/api/types").UpdateResponse<unknown>>;
|
|
22
|
-
delete(index: string, id: string): void;
|
|
23
|
-
}
|