@infrab4a/connect 4.2.0-beta.1 → 4.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/domain/catalog/models/category-collection-children.d.ts +1 -1
- package/domain/catalog/models/category-filter.d.ts +1 -1
- package/domain/catalog/models/kit-product.d.ts +1 -1
- package/domain/catalog/models/types/category-condition.type.d.ts +1 -1
- package/domain/catalog/models/types/category-metadata.type.d.ts +1 -1
- package/domain/catalog/models/types/category-product.d.ts +1 -1
- package/domain/catalog/models/types/product-evaluation.type.d.ts +1 -1
- package/domain/catalog/models/types/product-gender.type.d.ts +1 -1
- package/domain/catalog/models/types/product-metadata.type.d.ts +1 -1
- package/domain/catalog/models/types/product-review.type.d.ts +1 -1
- package/domain/catalog/models/types/shop-description.type.d.ts +1 -1
- package/domain/catalog/models/types/shop-price.type.d.ts +1 -1
- package/domain/catalog/models/types/stock.type.d.ts +1 -1
- package/domain/catalog/models/types/variant-grade.type.d.ts +1 -1
- package/domain/catalog/models/variant.d.ts +1 -1
- package/domain/catalog/repositories/product.repository.d.ts +2 -2
- package/domain/generic/model/base.model.d.ts +1 -1
- package/domain/generic/model/types/identifier-model.type.d.ts +3 -3
- package/domain/generic/model/types/model-base-structure.type.d.ts +2 -2
- package/domain/generic/model/types/non-function-properties.type.d.ts +6 -6
- package/domain/generic/model/types/non-function-property-name.type.d.ts +5 -5
- package/domain/generic/repository/create.repository.d.ts +1 -1
- package/domain/generic/repository/crud.repository.d.ts +2 -2
- package/domain/generic/repository/delete.repository.d.ts +1 -1
- package/domain/generic/repository/find.repository.d.ts +1 -1
- package/domain/generic/repository/get.repository.d.ts +1 -1
- package/domain/generic/repository/read.repository.d.ts +2 -2
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +4 -4
- package/domain/generic/repository/types/repository-find-result.type.d.ts +2 -2
- package/domain/generic/repository/types/repository-limit-options.type.d.ts +1 -1
- package/domain/generic/repository/types/repository-order-by-list.type.d.ts +2 -2
- package/domain/generic/repository/types/repository-update-params.type.d.ts +3 -3
- package/domain/generic/repository/types/where-options.type.d.ts +1 -1
- package/domain/generic/repository/update.repository.d.ts +1 -1
- package/domain/location/models/types/location-bound.type.d.ts +1 -1
- package/domain/location/models/types/location-geometry.type.d.ts +1 -1
- package/domain/location/models/types/location-lat-lng.type.d.ts +1 -1
- package/domain/shop-settings/helpers/beauty-questions.helper.d.ts +1 -1
- package/domain/shop-settings/models/types/banner.type.d.ts +1 -1
- package/domain/shop-settings/models/types/benefit.type.d.ts +1 -1
- package/domain/shop-settings/models/types/campaign-page.d.ts +4 -4
- package/domain/shop-settings/models/types/home-data.type.d.ts +3 -3
- package/domain/shop-settings/models/types/menu-nav.type.d.ts +1 -1
- package/domain/shop-settings/models/types/sections.type.d.ts +11 -11
- package/domain/shop-settings/models/types/shop-home.d.ts +2 -2
- package/domain/shop-settings/models/types/shop-section.type.d.ts +1 -1
- package/domain/shop-settings/models/types/sub-menu.type.d.ts +2 -2
- package/domain/shopping/models/types/payment-address.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-billing.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-card.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-customer.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-document.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-item.type.d.ts +1 -1
- package/domain/shopping/models/types/payment-shipping.type.d.ts +1 -1
- package/domain/users/models/beauty-profile.d.ts +1 -1
- package/domain/users/models/subscription/edition.d.ts +1 -1
- package/domain/users/models/subscription/payment.d.ts +1 -1
- package/domain/users/models/user-address.d.ts +1 -1
- package/domain/users/models/user-payment-method.d.ts +1 -1
- package/domain/users/services/authentication.service.d.ts +1 -1
- package/domain/users/services/register.service.d.ts +1 -1
- package/domain/users/services/types/basic-user-data.type.d.ts +1 -1
- package/domain/users/use-cases/authentication.d.ts +2 -2
- package/domain/users/use-cases/register.d.ts +1 -1
- package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/helpers/attribute-option.helper.mjs +32 -32
- package/esm2022/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +71 -0
- package/esm2022/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +22 -0
- package/esm2022/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +125 -0
- package/esm2022/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +108 -0
- package/esm2022/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +516 -0
- package/{esm2020 → esm2022}/utils/helpers/debug-decorator.helper.mjs +2 -2
- package/esm2022/utils/helpers/debug.helper.mjs +150 -0
- package/{esm2020 → esm2022}/utils/helpers/reflect.helper.mjs +2 -2
- package/{fesm2020 → fesm2022}/infrab4a-connect.mjs +256 -256
- package/{fesm2020 → fesm2022}/infrab4a-connect.mjs.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +1 -1
- package/infra/elasticsearch/types/elastic-search-result.d.ts +1 -1
- package/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +1 -1
- package/infra/firebase/firestore/types/firestore-interceptors.type.d.ts +1 -1
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +1 -1
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +1 -1
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +3 -3
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +2 -2
- package/infra/hasura-graphql/types/fields.type.d.ts +1 -1
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +2 -2
- package/infra/hasura-graphql/types/hasura-graphql-auth-options.type.d.ts +1 -1
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +6 -6
- package/infra/hasura-graphql/types/hasura-graphql-headers.type.d.ts +1 -1
- package/infra/hasura-graphql/types/nested-field.type.d.ts +1 -1
- package/infra/hasura-graphql/types/variable-options.type.d.ts +1 -1
- package/package.json +5 -11
- package/utils/decorators/trace.method.decorator.d.ts +3 -3
- package/utils/helpers/debug-decorator.helper.d.ts +1 -1
- package/utils/helpers/debug.helper.d.ts +3 -3
- package/utils/helpers/reflect.helper.d.ts +7 -7
- package/utils/index.d.ts +1 -1
- package/utils/mixins/merge-constructor-params.type.d.ts +2 -2
- package/utils/mixins/mixin-ctor.type.d.ts +1 -1
- package/utils/types/array-element.type.d.ts +1 -1
- package/utils/types/prop.type.d.ts +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +0 -71
- package/esm2020/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +0 -22
- package/esm2020/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +0 -125
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +0 -108
- package/esm2020/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +0 -516
- package/esm2020/utils/helpers/debug.helper.mjs +0 -150
- package/fesm2015/infrab4a-connect.mjs +0 -4976
- package/fesm2015/infrab4a-connect.mjs.map +0 -1
- /package/{esm2020 → esm2022}/domain/catalog/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/helpers/round-product-price.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/category-base.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/category-collection-children.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/category-filter.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/category-for-product.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/category.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/enums/product-genders.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/enums/shops.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/filter-option.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/filter.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/kit-product.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/product-base.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/product-for-category.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/product-for-kit.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/product.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/category-condition.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/category-metadata.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/category-product.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/product-evaluation.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/product-gender.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/product-metadata.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/product-review.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/shop-description.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/shop-price.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/stock.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/types/variant-grade.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/variant.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/models/wishlist.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/category-collection-children.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/category-filter.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/category.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/filter-option.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/filter.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/product.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/subscription-product.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/variant.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/catalog/repositories/wishlist.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/base.model.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/identifier-fields.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/base-model-builder.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/identifier-model.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/model-base-structure.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/non-function-properties.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/model/types/non-function-property-name.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/create.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/crud.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/delete.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/enums/update-option-actions.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/enums/where.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/find.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/get.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/read.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/repository-find-filters.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/repository-find-result.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/repository-limit-options.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/repository-order-by-list.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/repository-update-params.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/types/where-options.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/generic/repository/update.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/address.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/types/location-bound.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/types/location-geometry.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/location/models/types/location-lat-lng.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/enums/filter-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/enums/questions-filters.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/enums/shop-page-name.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/helpers/beauty-questions.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/campaign-banner.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/campaign.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/home.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/shop-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/shop-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/banner.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/benefit.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/campaign-page.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/home-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/menu-nav.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/sections.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-banner.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-brands.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-carousel.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-collection.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-gift.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-home.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-post.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/shop-section.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/models/types/sub-menu.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/campaign-banner.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/campaign.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/home.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/shop-menu.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shop-settings/repositories/shop-settings.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/buy-2-win.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/campaign-dashboard.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/campaign-hashtag.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/checkout.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/coupon.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/enums/coupon-club-mens.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/enums/coupon-subtypes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/enums/coupon-types.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/enums/exclusivities.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/coupons/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/enums/checkout-types.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/enums/order-status.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/line-item.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/order.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/payment.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/shipping-method.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/subscription/checkout.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/subscription/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/subscription/plan.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-address.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-billing.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-card.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-customer.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-document.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-item.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/models/types/payment-shipping.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/buy-2-win.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/campaign-dashboard.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/campaign-hashtag.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/checkout.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/coupon.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/legacy-order.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/order.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/payment.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/subscription/checkout.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/subscription/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/shopping/repositories/subscription/plan.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/errors/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/errors/unauthorized.error.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/errors/user-already-registered.error.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/errors/weak-password.error.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/beauty-profile.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/accessory-importances.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/area.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/beard-problems.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/beard-sizes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/beauty-product-importances.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/body-problems.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/body-shapes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/body-tattoos.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/face-skin-oilinesses.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/face-skin-problems.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/face-skin-tones.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/family-incomes.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/fragrance-importances.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/hair-colors.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/hair-problems.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/hair-strands.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/hair-types.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/office-position.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/product-spents.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/enums/user-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/lead.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/edition.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/enums/billing-status.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/enums/edition-status.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/enums/payment-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/enums/status.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/payment.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/subscription/subscription.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/user-address.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/user-payment-method.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/models/user.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/beauty-profile.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/edition.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/lead.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/subscription-payment.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/subscription.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/user-address.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/user-payment-method.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/repositories/user.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/services/authentication.service.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/services/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/services/register.service.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/services/types/basic-user-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/services/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/use-cases/authentication.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/use-cases/index.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/use-cases/recovery-password.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/use-cases/register.mjs +0 -0
- /package/{esm2020 → esm2022}/domain/users/use-cases/signout.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/duplicated-results.error.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/index.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/invalid-argument.error.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/not-found.error.mjs +0 -0
- /package/{esm2020 → esm2022}/errors/required-argument.error.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/adapters/axios.adapter.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/adapters/elastic-search.adapter.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/adapters/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/indexes/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/indexes/products-index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/types/elastic-search-result.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/elasticsearch/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/auth/authentication-firebase-auth.service.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/auth/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/auth/register-firebase-auth.service.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/auth/types/firebase-user-with-id.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/enums/firestore-field-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-create-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-crud-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-delete-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-helpers.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-sub-collection.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/mixins/with-update-firestore.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/catalog/category-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/catalog/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/catalog/product-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shop-settings/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/order-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/lead-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/subscription-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/user-address-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/user-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/types/firestore-interceptors.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/types/firestore-sub.repository.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/types/firestore.helpers.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/types/firestore.repository.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/firestore/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/firebase/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/enums/hasura-graphql-where.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/models/category-hasura-graphql.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/models/kit-product-hasura-graphql.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/models/product-hasura-graphql.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/models/variant-hasura-graphql.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/repositories/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/fields.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/graphql.repository.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/hasura-graphql-auth-options.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/hasura-graphql-fields.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/hasura-graphql-headers.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/nested-field.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/query-builder-options.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/hasura-graphql/types/variable-options.type.mjs +0 -0
- /package/{esm2020 → esm2022}/infra/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infrab4a-connect.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/decorators/debug.class.decorator.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/decorators/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/decorators/trace.method.decorator.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/get.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/helpers/class-name.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/is-uuid.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/is.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/log.utils.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/mixins/base.mixin.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/mixins/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/mixins/merge-constructor-params.type.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/mixins/mixin-ctor.type.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/parse-datetime.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/types/array-element.type.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/types/prop.type.mjs +0 -0
|
@@ -602,6 +602,7 @@ class ReflectHelper {
|
|
|
602
602
|
return true;
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
|
+
static { this._items = {}; }
|
|
605
606
|
static put({ key, target, property, value, propertyDescriptor }) {
|
|
606
607
|
const index = target.constructor.name;
|
|
607
608
|
ReflectHelper.items[key] = ReflectHelper.items[key] || {};
|
|
@@ -632,9 +633,9 @@ class ReflectHelper {
|
|
|
632
633
|
return false;
|
|
633
634
|
}
|
|
634
635
|
}
|
|
635
|
-
ReflectHelper._items = {};
|
|
636
636
|
|
|
637
637
|
class DebugDecoratorHelper {
|
|
638
|
+
static { this.DebugNamingMetadataKey = 'model:naming:decorator'; }
|
|
638
639
|
static set(target, options) {
|
|
639
640
|
ReflectHelper.add({
|
|
640
641
|
key: DebugDecoratorHelper.DebugNamingMetadataKey,
|
|
@@ -649,7 +650,6 @@ class DebugDecoratorHelper {
|
|
|
649
650
|
});
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
|
-
DebugDecoratorHelper.DebugNamingMetadataKey = 'model:naming:decorator';
|
|
653
653
|
|
|
654
654
|
class ClassNameHelper {
|
|
655
655
|
static get(clazz) {
|
|
@@ -669,10 +669,10 @@ const isDebuggable = (object) => {
|
|
|
669
669
|
return 'debug' in object;
|
|
670
670
|
};
|
|
671
671
|
class DebugHelper {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}
|
|
672
|
+
static { this.logs$ = new Subject(); }
|
|
673
|
+
static { this.traces$ = new Subject(); }
|
|
674
|
+
static { this.errors$ = new Subject(); }
|
|
675
|
+
static { this.isDebuggable = isDebuggable; }
|
|
676
676
|
static namespacesFor(target) {
|
|
677
677
|
if (isNil(target))
|
|
678
678
|
return [];
|
|
@@ -726,6 +726,10 @@ class DebugHelper {
|
|
|
726
726
|
DebugHelper.replace(target, { with: debug });
|
|
727
727
|
return { original, debug };
|
|
728
728
|
}
|
|
729
|
+
constructor(...namespace) {
|
|
730
|
+
this.namespaces = new Set();
|
|
731
|
+
this.push(...namespace);
|
|
732
|
+
}
|
|
729
733
|
get entries() {
|
|
730
734
|
return Array.from(get$1(this, 'namespaces', []));
|
|
731
735
|
}
|
|
@@ -805,10 +809,6 @@ class DebugHelper {
|
|
|
805
809
|
return [`[${this.namespace}]`, ...args].join(' ');
|
|
806
810
|
}
|
|
807
811
|
}
|
|
808
|
-
DebugHelper.logs$ = new Subject();
|
|
809
|
-
DebugHelper.traces$ = new Subject();
|
|
810
|
-
DebugHelper.errors$ = new Subject();
|
|
811
|
-
DebugHelper.isDebuggable = isDebuggable;
|
|
812
812
|
|
|
813
813
|
function Debug(opts) {
|
|
814
814
|
return function (target) {
|
|
@@ -2720,38 +2720,38 @@ class RegisterFirebaseAuthService {
|
|
|
2720
2720
|
}
|
|
2721
2721
|
|
|
2722
2722
|
class AttributeOptionHelper {
|
|
2723
|
+
static { this.FindByAttribute = (attributeName, fields) => {
|
|
2724
|
+
if (fields.includes(attributeName))
|
|
2725
|
+
return { columnName: attributeName.toString(), attributeName, to: (value) => value, from: (value) => value };
|
|
2726
|
+
const field = fields.find((columnOption) => isObject(columnOption) && Object.keys(columnOption).includes(attributeName.toString()));
|
|
2727
|
+
const fieldOption = is(field)?.[attributeName];
|
|
2728
|
+
if (isNil(fieldOption))
|
|
2729
|
+
return { columnName: attributeName.toString(), attributeName };
|
|
2730
|
+
if (Array.isArray(fieldOption))
|
|
2731
|
+
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2732
|
+
return { attributeName, columnName: attributeName.toString(), ...fieldOption };
|
|
2733
|
+
}; }
|
|
2734
|
+
static { this.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName; }
|
|
2735
|
+
static { this.FindColumnOptionFromList = (columnName, fields) => {
|
|
2736
|
+
if (fields.includes(columnName))
|
|
2737
|
+
return { columnName, attributeName: columnName };
|
|
2738
|
+
const field = is(fields.find((field) => {
|
|
2739
|
+
if (!isObject(field))
|
|
2740
|
+
return false;
|
|
2741
|
+
const columnOption = Object.values(field).find((option) => AttributeOptionHelper.CheckIsColumnOption(option) && option.columnName === columnName ? option : {});
|
|
2742
|
+
return AttributeOptionHelper.CheckIsColumnOption(columnOption) && columnOption?.columnName === columnName;
|
|
2743
|
+
}) || {});
|
|
2744
|
+
const attributeName = Object.keys(field).find((fieldOptionFromList) => AttributeOptionHelper.CheckIsColumnOption(field[fieldOptionFromList]) || Array.isArray(field[fieldOptionFromList]));
|
|
2745
|
+
const fieldOption = field?.[attributeName];
|
|
2746
|
+
if (Array.isArray(fieldOption))
|
|
2747
|
+
return { attributeName: attributeName, fields: fieldOption };
|
|
2748
|
+
return {
|
|
2749
|
+
attributeName: attributeName || columnName,
|
|
2750
|
+
columnName,
|
|
2751
|
+
...fieldOption,
|
|
2752
|
+
};
|
|
2753
|
+
}; }
|
|
2723
2754
|
}
|
|
2724
|
-
AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
2725
|
-
if (fields.includes(attributeName))
|
|
2726
|
-
return { columnName: attributeName.toString(), attributeName, to: (value) => value, from: (value) => value };
|
|
2727
|
-
const field = fields.find((columnOption) => isObject(columnOption) && Object.keys(columnOption).includes(attributeName.toString()));
|
|
2728
|
-
const fieldOption = is(field)?.[attributeName];
|
|
2729
|
-
if (isNil(fieldOption))
|
|
2730
|
-
return { columnName: attributeName.toString(), attributeName };
|
|
2731
|
-
if (Array.isArray(fieldOption))
|
|
2732
|
-
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2733
|
-
return { attributeName, columnName: attributeName.toString(), ...fieldOption };
|
|
2734
|
-
};
|
|
2735
|
-
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2736
|
-
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
2737
|
-
if (fields.includes(columnName))
|
|
2738
|
-
return { columnName, attributeName: columnName };
|
|
2739
|
-
const field = is(fields.find((field) => {
|
|
2740
|
-
if (!isObject(field))
|
|
2741
|
-
return false;
|
|
2742
|
-
const columnOption = Object.values(field).find((option) => AttributeOptionHelper.CheckIsColumnOption(option) && option.columnName === columnName ? option : {});
|
|
2743
|
-
return AttributeOptionHelper.CheckIsColumnOption(columnOption) && columnOption?.columnName === columnName;
|
|
2744
|
-
}) || {});
|
|
2745
|
-
const attributeName = Object.keys(field).find((fieldOptionFromList) => AttributeOptionHelper.CheckIsColumnOption(field[fieldOptionFromList]) || Array.isArray(field[fieldOptionFromList]));
|
|
2746
|
-
const fieldOption = field?.[attributeName];
|
|
2747
|
-
if (Array.isArray(fieldOption))
|
|
2748
|
-
return { attributeName: attributeName, fields: fieldOption };
|
|
2749
|
-
return {
|
|
2750
|
-
attributeName: attributeName || columnName,
|
|
2751
|
-
columnName,
|
|
2752
|
-
...fieldOption,
|
|
2753
|
-
};
|
|
2754
|
-
};
|
|
2755
2755
|
|
|
2756
2756
|
var HasuraGraphQLWhere;
|
|
2757
2757
|
(function (HasuraGraphQLWhere) {
|
|
@@ -2784,211 +2784,211 @@ var HasuraGraphQLColumnType;
|
|
|
2784
2784
|
})(HasuraGraphQLColumnType || (HasuraGraphQLColumnType = {}));
|
|
2785
2785
|
|
|
2786
2786
|
class FilterOptionHelper {
|
|
2787
|
+
static { this.CheckIfIsFilterOption = (filter) => !isNil(filter?.operator); }
|
|
2788
|
+
static { this.GetValueFromFilter = (filter, fieldOption) => {
|
|
2789
|
+
if (!FilterOptionHelper.CheckIfIsFilterOption(filter))
|
|
2790
|
+
return filter;
|
|
2791
|
+
if (filter.operator === Where.ISNULL)
|
|
2792
|
+
return true;
|
|
2793
|
+
if (filter.operator === Where.ISNOTNULL)
|
|
2794
|
+
return false;
|
|
2795
|
+
const converter = fieldOption.to
|
|
2796
|
+
? fieldOption.to
|
|
2797
|
+
: (value) => filter.operator === Where.LIKE && !Array.isArray(filter.value) && value.indexOf('%') < 0
|
|
2798
|
+
? `%${value}%`
|
|
2799
|
+
: value;
|
|
2800
|
+
return Array.isArray(filter.value) && !fieldOption.fields && [Where.IN, Where.NOTIN].includes(filter.operator)
|
|
2801
|
+
? filter.value.map((fieldValue) => converter(fieldValue))
|
|
2802
|
+
: converter(filter.value);
|
|
2803
|
+
}; }
|
|
2787
2804
|
}
|
|
2788
|
-
FilterOptionHelper.CheckIfIsFilterOption = (filter) => !isNil(filter?.operator);
|
|
2789
|
-
FilterOptionHelper.GetValueFromFilter = (filter, fieldOption) => {
|
|
2790
|
-
if (!FilterOptionHelper.CheckIfIsFilterOption(filter))
|
|
2791
|
-
return filter;
|
|
2792
|
-
if (filter.operator === Where.ISNULL)
|
|
2793
|
-
return true;
|
|
2794
|
-
if (filter.operator === Where.ISNOTNULL)
|
|
2795
|
-
return false;
|
|
2796
|
-
const converter = fieldOption.to
|
|
2797
|
-
? fieldOption.to
|
|
2798
|
-
: (value) => filter.operator === Where.LIKE && !Array.isArray(filter.value) && value.indexOf('%') < 0
|
|
2799
|
-
? `%${value}%`
|
|
2800
|
-
: value;
|
|
2801
|
-
return Array.isArray(filter.value) && !fieldOption.fields && [Where.IN, Where.NOTIN].includes(filter.operator)
|
|
2802
|
-
? filter.value.map((fieldValue) => converter(fieldValue))
|
|
2803
|
-
: converter(filter.value);
|
|
2804
|
-
};
|
|
2805
2805
|
|
|
2806
2806
|
class BindFilterQueryHelper {
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
if (!columnOption.bindFindFilter)
|
|
2811
|
-
return {
|
|
2812
|
-
...variables,
|
|
2813
|
-
...{
|
|
2814
|
-
[columnOption.columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, filter[fieldName], fields),
|
|
2815
|
-
},
|
|
2816
|
-
};
|
|
2817
|
-
const builtFilter = columnOption.bindFindFilter(filter[fieldName]);
|
|
2818
|
-
return {
|
|
2819
|
-
...variables,
|
|
2820
|
-
...Object.keys(builtFilter).reduce((variablesList, columnName) => ({
|
|
2821
|
-
...variablesList,
|
|
2822
|
-
[columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, builtFilter[columnName], fields),
|
|
2823
|
-
}), {}),
|
|
2824
|
-
};
|
|
2825
|
-
}, {});
|
|
2826
|
-
BindFilterQueryHelper.BuildWhereSentence = (field, options, fields) => {
|
|
2827
|
-
const fieldSentenceOptions = AttributeOptionHelper.FindByAttribute(field, fields);
|
|
2828
|
-
const isNestedField = !Array.isArray(options) &&
|
|
2829
|
-
isObject(options) &&
|
|
2830
|
-
isNil(options?.operator) &&
|
|
2831
|
-
isNil(options?.value) &&
|
|
2832
|
-
isNil(fieldSentenceOptions?.to);
|
|
2833
|
-
if (isNestedField)
|
|
2834
|
-
return Object.keys(options).reduce((variables, key) => {
|
|
2835
|
-
const fieldOptions = AttributeOptionHelper.FindByAttribute(key, fieldSentenceOptions?.fields || fields);
|
|
2836
|
-
const columnName = fieldOptions.columnName;
|
|
2837
|
-
const columnFields = fieldOptions.fields;
|
|
2807
|
+
static { this.MakeGraphQLWhere = (filter, fields) => Object.keys(filter).reduce((variables, fieldName) => {
|
|
2808
|
+
const columnOption = AttributeOptionHelper.FindByAttribute(fieldName, fields);
|
|
2809
|
+
if (!columnOption.bindFindFilter)
|
|
2838
2810
|
return {
|
|
2839
2811
|
...variables,
|
|
2840
|
-
|
|
2812
|
+
...{
|
|
2813
|
+
[columnOption.columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, filter[fieldName], fields),
|
|
2814
|
+
},
|
|
2841
2815
|
};
|
|
2842
|
-
|
|
2843
|
-
if (!Array.isArray(options) && !isNil(fieldSentenceOptions.fields))
|
|
2816
|
+
const builtFilter = columnOption.bindFindFilter(filter[fieldName]);
|
|
2844
2817
|
return {
|
|
2845
|
-
|
|
2818
|
+
...variables,
|
|
2819
|
+
...Object.keys(builtFilter).reduce((variablesList, columnName) => ({
|
|
2820
|
+
...variablesList,
|
|
2821
|
+
[columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, builtFilter[columnName], fields),
|
|
2822
|
+
}), {}),
|
|
2846
2823
|
};
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
};
|
|
2856
|
-
BindFilterQueryHelper.BuildOperatorSentence = (options, fieldOption) => ({
|
|
2857
|
-
[BindFilterQueryHelper.GetHasuraOperator(options, fieldOption)]: FilterOptionHelper.GetValueFromFilter(options, fieldOption),
|
|
2858
|
-
});
|
|
2859
|
-
BindFilterQueryHelper.GetHasuraOperator = (options, fieldOption) => FilterOptionHelper.CheckIfIsFilterOption(options)
|
|
2860
|
-
? fieldOption.type === HasuraGraphQLColumnType.Jsonb
|
|
2861
|
-
? BindFilterQueryHelper.GetHasuraJsonbOperator(options)
|
|
2862
|
-
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2863
|
-
Object.keys(Where).find((operator) => Where[operator] === options?.operator))]
|
|
2864
|
-
: HasuraGraphQLWhere.EQUALS;
|
|
2865
|
-
BindFilterQueryHelper.GetHasuraJsonbOperator = (options) => options.operator === Where.IN
|
|
2866
|
-
? HasuraGraphQLWhere.JSON_CONTAINS
|
|
2867
|
-
: options.operator === Where.LIKE
|
|
2868
|
-
? HasuraGraphQLWhere.JSON_HAS_KEYS_ANY
|
|
2869
|
-
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2870
|
-
Object.keys(Where).find((operator) => Where[operator] === options?.operator))];
|
|
2871
|
-
|
|
2872
|
-
class GraphQLFieldHelper {
|
|
2873
|
-
}
|
|
2874
|
-
GraphQLFieldHelper.CheckIsGraphQLParams = (params) => !isString(params) && Array.isArray(params) && params.length >= 0 && !!params[0].operation;
|
|
2875
|
-
GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields = (fields) => {
|
|
2876
|
-
return fields
|
|
2877
|
-
?.map((field) => {
|
|
2878
|
-
if (isString(field))
|
|
2879
|
-
return field.toString();
|
|
2880
|
-
if (field === 'affected_rows')
|
|
2881
|
-
return field;
|
|
2882
|
-
const fieldName = Object.keys(field).shift();
|
|
2883
|
-
const fieldValue = is(field[fieldName]);
|
|
2884
|
-
if (Array.isArray(fieldValue))
|
|
2885
|
-
return { [fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue) };
|
|
2886
|
-
if (!AttributeOptionHelper.CheckIsColumnOption(fieldValue))
|
|
2887
|
-
return;
|
|
2888
|
-
const isNestedField = !!fieldValue.fields;
|
|
2824
|
+
}, {}); }
|
|
2825
|
+
static { this.BuildWhereSentence = (field, options, fields) => {
|
|
2826
|
+
const fieldSentenceOptions = AttributeOptionHelper.FindByAttribute(field, fields);
|
|
2827
|
+
const isNestedField = !Array.isArray(options) &&
|
|
2828
|
+
isObject(options) &&
|
|
2829
|
+
isNil(options?.operator) &&
|
|
2830
|
+
isNil(options?.value) &&
|
|
2831
|
+
isNil(fieldSentenceOptions?.to);
|
|
2889
2832
|
if (isNestedField)
|
|
2890
|
-
return
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
};
|
|
2895
|
-
GraphQLFieldHelper.ConvertFieldValueFrom = (data, fields) => Object.keys(data).reduce((result, columnName) => {
|
|
2896
|
-
const { attributeName, fields: attributeFields, from, } = AttributeOptionHelper.FindColumnOptionFromList(columnName, fields);
|
|
2897
|
-
if (!!attributeFields && Array.isArray(attributeFields)) {
|
|
2898
|
-
if (Array.isArray(data[columnName]))
|
|
2899
|
-
return {
|
|
2900
|
-
...result,
|
|
2901
|
-
[attributeName]: from
|
|
2902
|
-
? from(data[columnName], data)
|
|
2903
|
-
: is(data[columnName]).map((value) => GraphQLFieldHelper.ConvertFieldValueFrom(is(value), attributeFields)),
|
|
2904
|
-
};
|
|
2905
|
-
if (isObject(data[columnName]))
|
|
2906
|
-
return {
|
|
2907
|
-
...result,
|
|
2908
|
-
[attributeName]: !!from
|
|
2909
|
-
? from(data[columnName])
|
|
2910
|
-
: GraphQLFieldHelper.ConvertFieldValueFrom(is(data[columnName]), attributeFields),
|
|
2911
|
-
};
|
|
2912
|
-
}
|
|
2913
|
-
if (!!from)
|
|
2914
|
-
return { ...result, [attributeName]: from(data[columnName], data) };
|
|
2915
|
-
return {
|
|
2916
|
-
...result,
|
|
2917
|
-
[attributeName]: isString(data[columnName]) ? parseDateTime(data[columnName].toString()) : data[columnName],
|
|
2918
|
-
};
|
|
2919
|
-
}, {});
|
|
2920
|
-
GraphQLFieldHelper.ConvertFieldValueTo = (instance, fields, update = false) => {
|
|
2921
|
-
const data = instance.toPlain?.() || instance;
|
|
2922
|
-
return Object.keys(data).reduce((result, attributeName) => {
|
|
2923
|
-
const { columnName, fields: attributeFields, foreignKeyColumn, to, bindPersistData, } = AttributeOptionHelper.FindByAttribute(attributeName, fields);
|
|
2924
|
-
if (bindPersistData)
|
|
2925
|
-
return {
|
|
2926
|
-
...result,
|
|
2927
|
-
...bindPersistData(data[attributeName], instance),
|
|
2928
|
-
};
|
|
2929
|
-
if (isNil(columnName))
|
|
2930
|
-
return result;
|
|
2931
|
-
if (!!foreignKeyColumn &&
|
|
2932
|
-
!isEmpty(foreignKeyColumn) &&
|
|
2933
|
-
!Object.keys(foreignKeyColumn).filter((key) => !is(data[attributeName])?.[key]).length)
|
|
2934
|
-
return Object.keys(foreignKeyColumn).reduce((object, current) => {
|
|
2935
|
-
const { columnName: foreignColumnName } = AttributeOptionHelper.FindByAttribute(foreignKeyColumn[current], fields);
|
|
2833
|
+
return Object.keys(options).reduce((variables, key) => {
|
|
2834
|
+
const fieldOptions = AttributeOptionHelper.FindByAttribute(key, fieldSentenceOptions?.fields || fields);
|
|
2835
|
+
const columnName = fieldOptions.columnName;
|
|
2836
|
+
const columnFields = fieldOptions.fields;
|
|
2936
2837
|
return {
|
|
2937
|
-
...
|
|
2938
|
-
[
|
|
2838
|
+
...variables,
|
|
2839
|
+
[columnName]: BindFilterQueryHelper.BuildWhereSentence(key, is(is(options)[key]), fieldSentenceOptions?.fields || columnFields || fields),
|
|
2939
2840
|
};
|
|
2940
|
-
}, {
|
|
2941
|
-
if (
|
|
2942
|
-
isObject(data[attributeName]) &&
|
|
2943
|
-
!isNil(attributeFields) &&
|
|
2944
|
-
!isDate(data[attributeName]))
|
|
2945
|
-
return result;
|
|
2946
|
-
if (!!columnName &&
|
|
2947
|
-
Array.isArray(attributeFields) &&
|
|
2948
|
-
isObject(data[attributeName])) {
|
|
2949
|
-
const converted = !isNil(columnName) && to
|
|
2950
|
-
? to(instance[attributeName], instance)
|
|
2951
|
-
: data[attributeName];
|
|
2841
|
+
}, {});
|
|
2842
|
+
if (!Array.isArray(options) && !isNil(fieldSentenceOptions.fields))
|
|
2952
2843
|
return {
|
|
2953
|
-
|
|
2954
|
-
...(converted !== undefined
|
|
2955
|
-
? {
|
|
2956
|
-
[columnName]: {
|
|
2957
|
-
data: instance[attributeName] instanceof BaseModel
|
|
2958
|
-
? GraphQLFieldHelper.ConvertFieldValueTo(data[attributeName], attributeFields)
|
|
2959
|
-
: converted,
|
|
2960
|
-
},
|
|
2961
|
-
}
|
|
2962
|
-
: {}),
|
|
2844
|
+
[fieldSentenceOptions.fields[0]]: BindFilterQueryHelper.BuildOperatorSentence(options, fieldSentenceOptions),
|
|
2963
2845
|
};
|
|
2846
|
+
if (!Array.isArray(options) && isObject(options) && !FilterOptionHelper.CheckIfIsFilterOption(options))
|
|
2847
|
+
options = Object.values(options)[0];
|
|
2848
|
+
return Array.isArray(options)
|
|
2849
|
+
? options.reduce((whereSentence, option) => ({
|
|
2850
|
+
...whereSentence,
|
|
2851
|
+
...BindFilterQueryHelper.BuildOperatorSentence(option, fieldSentenceOptions),
|
|
2852
|
+
}), {})
|
|
2853
|
+
: BindFilterQueryHelper.BuildOperatorSentence(options, fieldSentenceOptions);
|
|
2854
|
+
}; }
|
|
2855
|
+
static { this.BuildOperatorSentence = (options, fieldOption) => ({
|
|
2856
|
+
[BindFilterQueryHelper.GetHasuraOperator(options, fieldOption)]: FilterOptionHelper.GetValueFromFilter(options, fieldOption),
|
|
2857
|
+
}); }
|
|
2858
|
+
static { this.GetHasuraOperator = (options, fieldOption) => FilterOptionHelper.CheckIfIsFilterOption(options)
|
|
2859
|
+
? fieldOption.type === HasuraGraphQLColumnType.Jsonb
|
|
2860
|
+
? BindFilterQueryHelper.GetHasuraJsonbOperator(options)
|
|
2861
|
+
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2862
|
+
Object.keys(Where).find((operator) => Where[operator] === options?.operator))]
|
|
2863
|
+
: HasuraGraphQLWhere.EQUALS; }
|
|
2864
|
+
static { this.GetHasuraJsonbOperator = (options) => options.operator === Where.IN
|
|
2865
|
+
? HasuraGraphQLWhere.JSON_CONTAINS
|
|
2866
|
+
: options.operator === Where.LIKE
|
|
2867
|
+
? HasuraGraphQLWhere.JSON_HAS_KEYS_ANY
|
|
2868
|
+
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2869
|
+
Object.keys(Where).find((operator) => Where[operator] === options?.operator))]; }
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
class GraphQLFieldHelper {
|
|
2873
|
+
static { this.CheckIsGraphQLParams = (params) => !isString(params) && Array.isArray(params) && params.length >= 0 && !!params[0].operation; }
|
|
2874
|
+
static { this.ConvertModelFieldsToGraphQLFields = (fields) => {
|
|
2875
|
+
return fields
|
|
2876
|
+
?.map((field) => {
|
|
2877
|
+
if (isString(field))
|
|
2878
|
+
return field.toString();
|
|
2879
|
+
if (field === 'affected_rows')
|
|
2880
|
+
return field;
|
|
2881
|
+
const fieldName = Object.keys(field).shift();
|
|
2882
|
+
const fieldValue = is(field[fieldName]);
|
|
2883
|
+
if (Array.isArray(fieldValue))
|
|
2884
|
+
return { [fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue) };
|
|
2885
|
+
if (!AttributeOptionHelper.CheckIsColumnOption(fieldValue))
|
|
2886
|
+
return;
|
|
2887
|
+
const isNestedField = !!fieldValue.fields;
|
|
2888
|
+
if (isNestedField)
|
|
2889
|
+
return GraphQLFieldHelper.ConvertNestedFieldsToGraphQLFields(fieldName, fieldValue);
|
|
2890
|
+
return fieldValue.columnName;
|
|
2891
|
+
})
|
|
2892
|
+
.filter((field) => !!field);
|
|
2893
|
+
}; }
|
|
2894
|
+
static { this.ConvertFieldValueFrom = (data, fields) => Object.keys(data).reduce((result, columnName) => {
|
|
2895
|
+
const { attributeName, fields: attributeFields, from, } = AttributeOptionHelper.FindColumnOptionFromList(columnName, fields);
|
|
2896
|
+
if (!!attributeFields && Array.isArray(attributeFields)) {
|
|
2897
|
+
if (Array.isArray(data[columnName]))
|
|
2898
|
+
return {
|
|
2899
|
+
...result,
|
|
2900
|
+
[attributeName]: from
|
|
2901
|
+
? from(data[columnName], data)
|
|
2902
|
+
: is(data[columnName]).map((value) => GraphQLFieldHelper.ConvertFieldValueFrom(is(value), attributeFields)),
|
|
2903
|
+
};
|
|
2904
|
+
if (isObject(data[columnName]))
|
|
2905
|
+
return {
|
|
2906
|
+
...result,
|
|
2907
|
+
[attributeName]: !!from
|
|
2908
|
+
? from(data[columnName])
|
|
2909
|
+
: GraphQLFieldHelper.ConvertFieldValueFrom(is(data[columnName]), attributeFields),
|
|
2910
|
+
};
|
|
2964
2911
|
}
|
|
2965
|
-
if (!!
|
|
2912
|
+
if (!!from)
|
|
2913
|
+
return { ...result, [attributeName]: from(data[columnName], data) };
|
|
2914
|
+
return {
|
|
2915
|
+
...result,
|
|
2916
|
+
[attributeName]: isString(data[columnName]) ? parseDateTime(data[columnName].toString()) : data[columnName],
|
|
2917
|
+
};
|
|
2918
|
+
}, {}); }
|
|
2919
|
+
static { this.ConvertFieldValueTo = (instance, fields, update = false) => {
|
|
2920
|
+
const data = instance.toPlain?.() || instance;
|
|
2921
|
+
return Object.keys(data).reduce((result, attributeName) => {
|
|
2922
|
+
const { columnName, fields: attributeFields, foreignKeyColumn, to, bindPersistData, } = AttributeOptionHelper.FindByAttribute(attributeName, fields);
|
|
2923
|
+
if (bindPersistData)
|
|
2924
|
+
return {
|
|
2925
|
+
...result,
|
|
2926
|
+
...bindPersistData(data[attributeName], instance),
|
|
2927
|
+
};
|
|
2928
|
+
if (isNil(columnName))
|
|
2929
|
+
return result;
|
|
2930
|
+
if (!!foreignKeyColumn &&
|
|
2931
|
+
!isEmpty(foreignKeyColumn) &&
|
|
2932
|
+
!Object.keys(foreignKeyColumn).filter((key) => !is(data[attributeName])?.[key]).length)
|
|
2933
|
+
return Object.keys(foreignKeyColumn).reduce((object, current) => {
|
|
2934
|
+
const { columnName: foreignColumnName } = AttributeOptionHelper.FindByAttribute(foreignKeyColumn[current], fields);
|
|
2935
|
+
return {
|
|
2936
|
+
...object,
|
|
2937
|
+
[foreignColumnName]: data[attributeName]?.[current],
|
|
2938
|
+
};
|
|
2939
|
+
}, { ...result });
|
|
2940
|
+
if (update &&
|
|
2941
|
+
isObject(data[attributeName]) &&
|
|
2942
|
+
!isNil(attributeFields) &&
|
|
2943
|
+
!isDate(data[attributeName]))
|
|
2944
|
+
return result;
|
|
2945
|
+
if (!!columnName &&
|
|
2946
|
+
Array.isArray(attributeFields) &&
|
|
2947
|
+
isObject(data[attributeName])) {
|
|
2948
|
+
const converted = !isNil(columnName) && to
|
|
2949
|
+
? to(instance[attributeName], instance)
|
|
2950
|
+
: data[attributeName];
|
|
2951
|
+
return {
|
|
2952
|
+
...result,
|
|
2953
|
+
...(converted !== undefined
|
|
2954
|
+
? {
|
|
2955
|
+
[columnName]: {
|
|
2956
|
+
data: instance[attributeName] instanceof BaseModel
|
|
2957
|
+
? GraphQLFieldHelper.ConvertFieldValueTo(data[attributeName], attributeFields)
|
|
2958
|
+
: converted,
|
|
2959
|
+
},
|
|
2960
|
+
}
|
|
2961
|
+
: {}),
|
|
2962
|
+
};
|
|
2963
|
+
}
|
|
2964
|
+
if (!!to)
|
|
2965
|
+
return {
|
|
2966
|
+
...result,
|
|
2967
|
+
[columnName]: to(instance[attributeName], instance),
|
|
2968
|
+
};
|
|
2969
|
+
return { ...result, [columnName]: data[attributeName] };
|
|
2970
|
+
}, {});
|
|
2971
|
+
}; }
|
|
2972
|
+
static { this.ConvertNestedFieldsToGraphQLFields = (fieldName, fieldValue) => {
|
|
2973
|
+
const hasCustomFilters = !!fieldValue.filters;
|
|
2974
|
+
if (hasCustomFilters)
|
|
2966
2975
|
return {
|
|
2967
|
-
|
|
2968
|
-
|
|
2976
|
+
operation: fieldValue.columnName || fieldName,
|
|
2977
|
+
fields: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue.fields),
|
|
2978
|
+
variables: {
|
|
2979
|
+
[`${fieldValue.columnName}_where`]: {
|
|
2980
|
+
name: 'where',
|
|
2981
|
+
type: fieldValue.filters.filterType,
|
|
2982
|
+
value: BindFilterQueryHelper.MakeGraphQLWhere(fieldValue.filters.filters, fieldValue.fields),
|
|
2983
|
+
required: true,
|
|
2984
|
+
},
|
|
2985
|
+
},
|
|
2969
2986
|
};
|
|
2970
|
-
return { ...result, [columnName]: data[attributeName] };
|
|
2971
|
-
}, {});
|
|
2972
|
-
};
|
|
2973
|
-
GraphQLFieldHelper.ConvertNestedFieldsToGraphQLFields = (fieldName, fieldValue) => {
|
|
2974
|
-
const hasCustomFilters = !!fieldValue.filters;
|
|
2975
|
-
if (hasCustomFilters)
|
|
2976
2987
|
return {
|
|
2977
|
-
|
|
2978
|
-
fields: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue.fields),
|
|
2979
|
-
variables: {
|
|
2980
|
-
[`${fieldValue.columnName}_where`]: {
|
|
2981
|
-
name: 'where',
|
|
2982
|
-
type: fieldValue.filters.filterType,
|
|
2983
|
-
value: BindFilterQueryHelper.MakeGraphQLWhere(fieldValue.filters.filters, fieldValue.fields),
|
|
2984
|
-
required: true,
|
|
2985
|
-
},
|
|
2986
|
-
},
|
|
2988
|
+
[fieldValue.columnName || fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue.fields),
|
|
2987
2989
|
};
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
};
|
|
2991
|
-
};
|
|
2990
|
+
}; }
|
|
2991
|
+
}
|
|
2992
2992
|
|
|
2993
2993
|
const withCreateHasuraGraphQL = (MixinBase) => {
|
|
2994
2994
|
return class CreateHasuraGraphQLMixin extends MixinBase {
|
|
@@ -3058,16 +3058,6 @@ const withDeleteHasuraGraphQL = (MixinBase) => {
|
|
|
3058
3058
|
|
|
3059
3059
|
const withHasuraGraphQL = (MixinBase) => {
|
|
3060
3060
|
return class HasuraGraphQLMixin extends MixinBase {
|
|
3061
|
-
constructor(...params) {
|
|
3062
|
-
const options = params[0];
|
|
3063
|
-
super(...params);
|
|
3064
|
-
this.tableName = options.tableName;
|
|
3065
|
-
this.endpoint = options.endpoint;
|
|
3066
|
-
this.authOptions = options.authOptions;
|
|
3067
|
-
this.model = options.model;
|
|
3068
|
-
this.fields = options.fields || this.model.identifiersFields;
|
|
3069
|
-
this.logger = DebugHelper.from(this);
|
|
3070
|
-
}
|
|
3071
3061
|
get headers() {
|
|
3072
3062
|
return {
|
|
3073
3063
|
'Content-Type': 'application/json',
|
|
@@ -3081,6 +3071,16 @@ const withHasuraGraphQL = (MixinBase) => {
|
|
|
3081
3071
|
}),
|
|
3082
3072
|
};
|
|
3083
3073
|
}
|
|
3074
|
+
constructor(...params) {
|
|
3075
|
+
const options = params[0];
|
|
3076
|
+
super(...params);
|
|
3077
|
+
this.tableName = options.tableName;
|
|
3078
|
+
this.endpoint = options.endpoint;
|
|
3079
|
+
this.authOptions = options.authOptions;
|
|
3080
|
+
this.model = options.model;
|
|
3081
|
+
this.fields = options.fields || this.model.identifiersFields;
|
|
3082
|
+
this.logger = DebugHelper.from(this);
|
|
3083
|
+
}
|
|
3084
3084
|
async mutation(operation, fields, variables) {
|
|
3085
3085
|
const resultQuery = mutation({
|
|
3086
3086
|
operation,
|
|
@@ -4032,6 +4032,24 @@ class FilterOptionHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasu
|
|
|
4032
4032
|
}
|
|
4033
4033
|
|
|
4034
4034
|
class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
4035
|
+
get reviewsFields() {
|
|
4036
|
+
return [
|
|
4037
|
+
'id',
|
|
4038
|
+
'shop',
|
|
4039
|
+
'rate',
|
|
4040
|
+
'author',
|
|
4041
|
+
'email',
|
|
4042
|
+
'location',
|
|
4043
|
+
'review',
|
|
4044
|
+
'status',
|
|
4045
|
+
'title',
|
|
4046
|
+
{ personId: { columnName: 'person_id' } },
|
|
4047
|
+
'points',
|
|
4048
|
+
{ orderId: { columnName: 'order_id' } },
|
|
4049
|
+
{ createdAt: { columnName: 'created_at' } },
|
|
4050
|
+
{ updatedAt: { columnName: 'updated_at' } },
|
|
4051
|
+
];
|
|
4052
|
+
}
|
|
4035
4053
|
constructor({ endpoint, authOptions, interceptors, }) {
|
|
4036
4054
|
super({
|
|
4037
4055
|
tableName: 'product',
|
|
@@ -4232,24 +4250,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
4232
4250
|
},
|
|
4233
4251
|
];
|
|
4234
4252
|
}
|
|
4235
|
-
get reviewsFields() {
|
|
4236
|
-
return [
|
|
4237
|
-
'id',
|
|
4238
|
-
'shop',
|
|
4239
|
-
'rate',
|
|
4240
|
-
'author',
|
|
4241
|
-
'email',
|
|
4242
|
-
'location',
|
|
4243
|
-
'review',
|
|
4244
|
-
'status',
|
|
4245
|
-
'title',
|
|
4246
|
-
{ personId: { columnName: 'person_id' } },
|
|
4247
|
-
'points',
|
|
4248
|
-
{ orderId: { columnName: 'order_id' } },
|
|
4249
|
-
{ createdAt: { columnName: 'created_at' } },
|
|
4250
|
-
{ updatedAt: { columnName: 'updated_at' } },
|
|
4251
|
-
];
|
|
4252
|
-
}
|
|
4253
4253
|
async create(params) {
|
|
4254
4254
|
const { metadata, ...data } = params;
|
|
4255
4255
|
const product = await super.create(omit({ ...data, metadata: metadata || { description: null, title: null } }, ['reviews']));
|