@infrab4a/connect 4.1.0-beta.0 → 4.1.0-beta.1
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/models/wishlist.d.ts +2 -0
- 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/enums/index.d.ts +0 -1
- package/domain/shop-settings/helpers/beauty-questions.helper.d.ts +1 -1
- package/domain/shop-settings/models/index.d.ts +0 -2
- package/domain/shop-settings/models/shop-settings.d.ts +1 -2
- 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/home-data.type.d.ts +3 -3
- package/domain/shop-settings/models/types/index.d.ts +0 -4
- package/domain/shop-settings/models/types/menu-nav.type.d.ts +1 -1
- package/domain/shop-settings/models/types/shop-section.type.d.ts +1 -4
- package/domain/shop-settings/models/types/sub-menu.type.d.ts +2 -2
- package/domain/shop-settings/repositories/index.d.ts +0 -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/index.d.ts +2 -1
- package/domain/users/models/subscription/payment.d.ts +1 -1
- package/domain/users/models/subscription/subscription-materialization.d.ts +31 -0
- package/domain/users/models/subscription/subscription.d.ts +1 -0
- package/domain/users/models/user-address.d.ts +1 -1
- package/domain/users/models/user-payment-method.d.ts +1 -1
- package/domain/users/repositories/index.d.ts +6 -5
- package/domain/users/repositories/subscription-materialization.repository.d.ts +4 -0
- 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/{esm2022 → esm2020}/domain/catalog/models/wishlist.mjs +1 -1
- package/{esm2022 → esm2020}/domain/shop-settings/enums/index.mjs +1 -2
- package/esm2020/domain/shop-settings/models/index.mjs +5 -0
- package/{esm2022 → esm2020}/domain/shop-settings/models/shop-settings.mjs +1 -1
- package/esm2020/domain/shop-settings/models/types/index.mjs +11 -0
- package/{esm2022 → esm2020}/domain/shop-settings/models/types/shop-section.type.mjs +1 -1
- package/esm2020/domain/shop-settings/repositories/index.mjs +4 -0
- package/esm2020/domain/users/models/subscription/index.mjs +6 -0
- package/esm2020/domain/users/models/subscription/subscription-materialization.mjs +42 -0
- package/{esm2022 → esm2020}/domain/users/models/subscription/subscription.mjs +1 -1
- package/esm2020/domain/users/repositories/index.mjs +10 -0
- package/esm2020/domain/users/repositories/subscription-materialization.repository.mjs +2 -0
- package/esm2020/infra/firebase/firestore/repositories/shop-settings/index.mjs +4 -0
- package/esm2020/infra/firebase/firestore/repositories/users/index.mjs +10 -0
- package/esm2020/infra/firebase/firestore/repositories/users/subscription-materialization-firestore.repository.mjs +14 -0
- package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/helpers/attribute-option.helper.mjs +32 -32
- package/esm2020/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +71 -0
- package/esm2020/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +22 -0
- package/esm2020/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +125 -0
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +108 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +338 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +516 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.mjs +238 -0
- package/{esm2022 → esm2020}/utils/helpers/debug-decorator.helper.mjs +2 -2
- package/esm2020/utils/helpers/debug.helper.mjs +150 -0
- package/{esm2022 → esm2020}/utils/helpers/reflect.helper.mjs +2 -2
- package/fesm2015/infrab4a-connect.mjs +4988 -0
- package/fesm2015/infrab4a-connect.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/infrab4a-connect.mjs +434 -443
- package/fesm2020/infrab4a-connect.mjs.map +1 -0
- 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/repositories/shop-settings/index.d.ts +0 -2
- package/infra/firebase/firestore/repositories/users/index.d.ts +1 -0
- package/infra/firebase/firestore/repositories/users/subscription-materialization-firestore.repository.d.ts +7 -0
- 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 +11 -5
- 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/domain/shop-settings/enums/shop-page-name.enum.d.ts +0 -19
- package/domain/shop-settings/models/campaign-banner.d.ts +0 -11
- package/domain/shop-settings/models/campaign.d.ts +0 -10
- package/domain/shop-settings/models/types/campaign-page.d.ts +0 -17
- package/domain/shop-settings/models/types/sections.type.d.ts +0 -17
- package/domain/shop-settings/models/types/shop-gift.type.d.ts +0 -8
- package/domain/shop-settings/models/types/shop-post.type.d.ts +0 -7
- package/domain/shop-settings/repositories/campaign-banner.repository.d.ts +0 -4
- package/domain/shop-settings/repositories/campaign.repository.d.ts +0 -4
- package/esm2022/domain/shop-settings/enums/shop-page-name.enum.mjs +0 -21
- package/esm2022/domain/shop-settings/models/campaign-banner.mjs +0 -7
- package/esm2022/domain/shop-settings/models/campaign.mjs +0 -7
- package/esm2022/domain/shop-settings/models/index.mjs +0 -7
- package/esm2022/domain/shop-settings/models/types/campaign-page.mjs +0 -2
- package/esm2022/domain/shop-settings/models/types/index.mjs +0 -15
- package/esm2022/domain/shop-settings/models/types/sections.type.mjs +0 -2
- package/esm2022/domain/shop-settings/models/types/shop-gift.type.mjs +0 -2
- package/esm2022/domain/shop-settings/models/types/shop-post.type.mjs +0 -2
- package/esm2022/domain/shop-settings/repositories/campaign-banner.repository.mjs +0 -2
- package/esm2022/domain/shop-settings/repositories/campaign.repository.mjs +0 -2
- package/esm2022/domain/shop-settings/repositories/index.mjs +0 -6
- package/esm2022/domain/users/models/subscription/index.mjs +0 -5
- package/esm2022/domain/users/repositories/index.mjs +0 -9
- package/esm2022/infra/firebase/firestore/repositories/shop-settings/campaign-banner-firestore.repository.mjs +0 -14
- package/esm2022/infra/firebase/firestore/repositories/shop-settings/campaign-firestore.repository.mjs +0 -14
- package/esm2022/infra/firebase/firestore/repositories/shop-settings/index.mjs +0 -6
- package/esm2022/infra/firebase/firestore/repositories/users/index.mjs +0 -9
- package/esm2022/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +0 -71
- package/esm2022/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +0 -22
- package/esm2022/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +0 -125
- package/esm2022/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +0 -108
- package/esm2022/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +0 -339
- package/esm2022/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +0 -516
- package/esm2022/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.mjs +0 -236
- package/esm2022/utils/helpers/debug.helper.mjs +0 -150
- package/fesm2022/infrab4a-connect.mjs.map +0 -1
- package/infra/firebase/firestore/repositories/shop-settings/campaign-banner-firestore.repository.d.ts +0 -7
- package/infra/firebase/firestore/repositories/shop-settings/campaign-firestore.repository.d.ts +0 -7
- /package/{esm2022 → esm2020}/domain/catalog/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/helpers/round-product-price.helper.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/category-base.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/category-collection-children.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/category-filter.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/category-for-product.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/category.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/enums/product-genders.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/enums/shops.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/filter-option.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/filter.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/kit-product.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/product-base.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/product-for-category.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/product-for-kit.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/product.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/category-condition.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/category-metadata.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/category-product.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/product-evaluation.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/product-gender.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/product-metadata.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/product-review.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/shop-description.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/shop-price.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/stock.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/types/variant-grade.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/models/variant.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/category-collection-children.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/category-filter.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/category.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/filter-option.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/filter.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/product.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/subscription-product.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/variant.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/catalog/repositories/wishlist.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/base.model.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/identifier-fields.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/base-model-builder.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/identifier-model.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/model-base-structure.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/non-function-properties.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/model/types/non-function-property-name.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/create.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/crud.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/delete.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/enums/update-option-actions.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/enums/where.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/find.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/get.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/read.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/repository-find-filters.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/repository-find-result.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/repository-limit-options.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/repository-order-by-list.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/repository-update-params.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/types/where-options.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/generic/repository/update.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/address.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/types/location-bound.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/types/location-geometry.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/location/models/types/location-lat-lng.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/enums/filter-type.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/enums/questions-filters.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/helpers/beauty-questions.helper.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/home.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/shop-menu.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/banner.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/benefit.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/home-data.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/menu-nav.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/shop-banner.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/shop-brands.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/shop-carousel.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/shop-collection.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/models/types/sub-menu.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/repositories/home.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/repositories/shop-menu.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shop-settings/repositories/shop-settings.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/buy-2-win.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/campaign-dashboard.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/campaign-hashtag.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/checkout.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/coupon.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/enums/coupon-club-mens.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/enums/coupon-subtypes.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/enums/coupon-types.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/enums/exclusivities.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/coupons/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/enums/checkout-types.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/enums/order-status.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/line-item.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/order.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/payment.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/shipping-method.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/subscription/checkout.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/subscription/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/subscription/plan.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-address.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-billing.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-card.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-customer.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-document.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-item.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/models/types/payment-shipping.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/buy-2-win.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/campaign-dashboard.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/campaign-hashtag.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/checkout.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/coupon.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/legacy-order.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/order.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/payment.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/subscription/checkout.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/subscription/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/shopping/repositories/subscription/plan.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/errors/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/errors/unauthorized.error.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/errors/user-already-registered.error.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/errors/weak-password.error.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/beauty-profile.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/accessory-importances.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/area.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/beard-problems.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/beard-sizes.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/beauty-product-importances.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/body-problems.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/body-shapes.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/body-tattoos.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/face-skin-oilinesses.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/face-skin-problems.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/face-skin-tones.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/family-incomes.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/fragrance-importances.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/hair-colors.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/hair-problems.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/hair-strands.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/hair-types.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/office-position.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/product-spents.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/enums/user-type.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/lead.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/edition.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/enums/billing-status.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/enums/edition-status.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/enums/payment-type.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/enums/status.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/subscription/payment.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/user-address.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/user-payment-method.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/models/user.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/beauty-profile.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/edition.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/lead.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/subscription-payment.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/subscription.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/user-address.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/user-payment-method.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/repositories/user.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/services/authentication.service.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/services/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/services/register.service.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/services/types/basic-user-data.type.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/services/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/use-cases/authentication.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/use-cases/index.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/use-cases/recovery-password.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/use-cases/register.mjs +0 -0
- /package/{esm2022 → esm2020}/domain/users/use-cases/signout.mjs +0 -0
- /package/{esm2022 → esm2020}/errors/duplicated-results.error.mjs +0 -0
- /package/{esm2022 → esm2020}/errors/index.mjs +0 -0
- /package/{esm2022 → esm2020}/errors/invalid-argument.error.mjs +0 -0
- /package/{esm2022 → esm2020}/errors/not-found.error.mjs +0 -0
- /package/{esm2022 → esm2020}/errors/required-argument.error.mjs +0 -0
- /package/{esm2022 → esm2020}/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/adapters/axios.adapter.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/adapters/elastic-search.adapter.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/adapters/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/indexes/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/indexes/products-index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/types/elastic-search-result.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/elasticsearch/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/auth/authentication-firebase-auth.service.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/auth/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/auth/register-firebase-auth.service.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/auth/types/firebase-user-with-id.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/enums/firestore-field-type.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-create-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-crud-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-delete-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-helpers.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-sub-collection.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/mixins/with-update-firestore.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/catalog/category-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/catalog/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/catalog/product-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shop-settings/shop-settings-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/campaign-dashboard-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/campaign-hashtag-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/order-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/lead-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/subscription-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/user-address-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/user-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/types/firestore-interceptors.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/types/firestore-sub.repository.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/types/firestore.helpers.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/types/firestore.repository.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/firestore/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/firebase/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/enums/hasura-graphql-where.enum.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/enums/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/models/category-hasura-graphql.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/models/kit-product-hasura-graphql.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/models/product-hasura-graphql.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/models/variant-hasura-graphql.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/repositories/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/fields.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/graphql.repository.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/hasura-graphql-auth-options.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/hasura-graphql-fields.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/hasura-graphql-headers.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/nested-field.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/query-builder-options.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/hasura-graphql/types/variable-options.type.mjs +0 -0
- /package/{esm2022 → esm2020}/infra/index.mjs +0 -0
- /package/{esm2022 → esm2020}/infrab4a-connect.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/decorators/debug.class.decorator.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/decorators/index.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/decorators/trace.method.decorator.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/get.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/helpers/class-name.helper.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/helpers/index.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/index.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/is-uuid.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/is.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/log.utils.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/mixins/base.mixin.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/mixins/index.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/mixins/merge-constructor-params.type.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/mixins/mixin-ctor.type.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/parse-datetime.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/types/array-element.type.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/types/index.mjs +0 -0
- /package/{esm2022 → esm2020}/utils/types/prop.type.mjs +0 -0
|
@@ -257,6 +257,12 @@ var UserType;
|
|
|
257
257
|
UserType["Influencer"] = "Influencer";
|
|
258
258
|
})(UserType || (UserType = {}));
|
|
259
259
|
|
|
260
|
+
class Edition extends BaseModel {
|
|
261
|
+
static get identifiersFields() {
|
|
262
|
+
return ['id', 'subscriptionId'];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
260
266
|
var BillingStatus;
|
|
261
267
|
(function (BillingStatus) {
|
|
262
268
|
BillingStatus["PAYED"] = "PAGO";
|
|
@@ -281,12 +287,6 @@ var Status;
|
|
|
281
287
|
Status["CANCELLED"] = "Cancelado";
|
|
282
288
|
})(Status || (Status = {}));
|
|
283
289
|
|
|
284
|
-
class Edition extends BaseModel {
|
|
285
|
-
static get identifiersFields() {
|
|
286
|
-
return ['id', 'subscriptionId'];
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
290
|
class Payment extends BaseModel {
|
|
291
291
|
static get identifiersFields() {
|
|
292
292
|
return ['id'];
|
|
@@ -602,7 +602,6 @@ class ReflectHelper {
|
|
|
602
602
|
return true;
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
|
-
static { this._items = {}; }
|
|
606
605
|
static put({ key, target, property, value, propertyDescriptor }) {
|
|
607
606
|
const index = target.constructor.name;
|
|
608
607
|
ReflectHelper.items[key] = ReflectHelper.items[key] || {};
|
|
@@ -633,9 +632,9 @@ class ReflectHelper {
|
|
|
633
632
|
return false;
|
|
634
633
|
}
|
|
635
634
|
}
|
|
635
|
+
ReflectHelper._items = {};
|
|
636
636
|
|
|
637
637
|
class DebugDecoratorHelper {
|
|
638
|
-
static { this.DebugNamingMetadataKey = 'model:naming:decorator'; }
|
|
639
638
|
static set(target, options) {
|
|
640
639
|
ReflectHelper.add({
|
|
641
640
|
key: DebugDecoratorHelper.DebugNamingMetadataKey,
|
|
@@ -650,6 +649,7 @@ class DebugDecoratorHelper {
|
|
|
650
649
|
});
|
|
651
650
|
}
|
|
652
651
|
}
|
|
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
|
+
constructor(...namespace) {
|
|
673
|
+
this.namespaces = new Set();
|
|
674
|
+
this.push(...namespace);
|
|
675
|
+
}
|
|
676
676
|
static namespacesFor(target) {
|
|
677
677
|
if (isNil(target))
|
|
678
678
|
return [];
|
|
@@ -726,10 +726,6 @@ 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
|
-
}
|
|
733
729
|
get entries() {
|
|
734
730
|
return Array.from(get$1(this, 'namespaces', []));
|
|
735
731
|
}
|
|
@@ -809,6 +805,10 @@ class DebugHelper {
|
|
|
809
805
|
return [`[${this.namespace}]`, ...args].join(' ');
|
|
810
806
|
}
|
|
811
807
|
}
|
|
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) {
|
|
@@ -1072,130 +1072,6 @@ __decorate([
|
|
|
1072
1072
|
__metadata("design:type", Array)
|
|
1073
1073
|
], Subscription.prototype, "payment", void 0);
|
|
1074
1074
|
|
|
1075
|
-
class UserPaymentMethod extends BaseModel {
|
|
1076
|
-
static get identifiersFields() {
|
|
1077
|
-
return ['id', 'userId'];
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
class Lead extends BaseModel {
|
|
1082
|
-
static get identifiersFields() {
|
|
1083
|
-
return ['id'];
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
class UnauthorizedError extends CustomError {
|
|
1088
|
-
constructor(message) {
|
|
1089
|
-
super(message);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
var SignInMethods;
|
|
1094
|
-
(function (SignInMethods) {
|
|
1095
|
-
SignInMethods["EMAIL_PASSWORD"] = "email_password";
|
|
1096
|
-
SignInMethods["GOOGLE"] = "google";
|
|
1097
|
-
})(SignInMethods || (SignInMethods = {}));
|
|
1098
|
-
class Authentication {
|
|
1099
|
-
constructor(authService, userRepository) {
|
|
1100
|
-
this.authService = authService;
|
|
1101
|
-
this.userRepository = userRepository;
|
|
1102
|
-
}
|
|
1103
|
-
async signIn({ email, password }, signInMethod) {
|
|
1104
|
-
const method = this.getServiceByMethod(signInMethod);
|
|
1105
|
-
const userAuth = await this.authService[method]({ email, password });
|
|
1106
|
-
const user = this.userRepository.get({ id: userAuth.id });
|
|
1107
|
-
if (!isNil(user))
|
|
1108
|
-
return user;
|
|
1109
|
-
if (/^.+@b4a.com.br$/.test(userAuth.email))
|
|
1110
|
-
return this.createsUserByCredential(userAuth);
|
|
1111
|
-
throw new UnauthorizedError('Invalid credentials');
|
|
1112
|
-
}
|
|
1113
|
-
getServiceByMethod(signInMethod) {
|
|
1114
|
-
return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle';
|
|
1115
|
-
}
|
|
1116
|
-
async createsUserByCredential(user) {
|
|
1117
|
-
const [firstName, lastName] = user.displayName?.split(/\s/);
|
|
1118
|
-
const person = User.toInstance({
|
|
1119
|
-
...user,
|
|
1120
|
-
cpf: '',
|
|
1121
|
-
birthday: new Date(),
|
|
1122
|
-
firstName,
|
|
1123
|
-
lastName,
|
|
1124
|
-
acceptsNewsletter: false,
|
|
1125
|
-
area: Area.Transactional,
|
|
1126
|
-
officePosition: OfficePosition.Intern,
|
|
1127
|
-
type: UserType.Collaborator,
|
|
1128
|
-
});
|
|
1129
|
-
return this.userRepository.create(person);
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
class UserAlreadyRegisteredError extends CustomError {
|
|
1134
|
-
constructor(message) {
|
|
1135
|
-
super(message);
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
class WeakPasswordError extends CustomError {
|
|
1140
|
-
constructor(message = 'Weak password') {
|
|
1141
|
-
super(message);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
class Register {
|
|
1146
|
-
constructor(registerService, userRepository) {
|
|
1147
|
-
this.registerService = registerService;
|
|
1148
|
-
this.userRepository = userRepository;
|
|
1149
|
-
}
|
|
1150
|
-
async register(params) {
|
|
1151
|
-
const email = params.email.toLocaleLowerCase();
|
|
1152
|
-
const displayName = `${params.firstName} ${params.lastName}`;
|
|
1153
|
-
if (await this.userRepository.checkIfExistsByField('cpf', params.cpf))
|
|
1154
|
-
throw new UserAlreadyRegisteredError(`Usuário com CPF ${params.cpf} já registrado.`);
|
|
1155
|
-
if (await this.userRepository.checkIfExistsByField('email', params.email))
|
|
1156
|
-
throw new UserAlreadyRegisteredError(`Usuário com e-mail ${params.email} já registrado.`);
|
|
1157
|
-
const auth = await this.registerService.register({
|
|
1158
|
-
birthday: params.birthday,
|
|
1159
|
-
email,
|
|
1160
|
-
firstName: params.firstName,
|
|
1161
|
-
lastName: params.lastName,
|
|
1162
|
-
cpf: params.cpf,
|
|
1163
|
-
displayName,
|
|
1164
|
-
phone: params.phone,
|
|
1165
|
-
password: params.password,
|
|
1166
|
-
});
|
|
1167
|
-
delete params.password;
|
|
1168
|
-
const user = await this.userRepository.create({
|
|
1169
|
-
...params,
|
|
1170
|
-
id: auth.id,
|
|
1171
|
-
email,
|
|
1172
|
-
displayName,
|
|
1173
|
-
type: UserType.B2C,
|
|
1174
|
-
dateCreated: new Date(),
|
|
1175
|
-
dateModified: new Date(),
|
|
1176
|
-
});
|
|
1177
|
-
return user;
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
class SignOut {
|
|
1182
|
-
constructor(authService) {
|
|
1183
|
-
this.authService = authService;
|
|
1184
|
-
}
|
|
1185
|
-
async signOut() {
|
|
1186
|
-
await this.authService.signOut();
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
class RecoveryPassword {
|
|
1191
|
-
constructor(authService) {
|
|
1192
|
-
this.authService = authService;
|
|
1193
|
-
}
|
|
1194
|
-
async sendEmail(email) {
|
|
1195
|
-
await this.authService.sendPasswordResetEmail(email);
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
1075
|
class Filter extends BaseModel {
|
|
1200
1076
|
static get identifiersFields() {
|
|
1201
1077
|
return ['id'];
|
|
@@ -1463,6 +1339,164 @@ __decorate([
|
|
|
1463
1339
|
__metadata("design:type", Coupon)
|
|
1464
1340
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
1465
1341
|
|
|
1342
|
+
class SubscriptionMaterialization extends BaseModel {
|
|
1343
|
+
static get identifiersFields() {
|
|
1344
|
+
return ['id'];
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
__decorate([
|
|
1348
|
+
Type(() => User),
|
|
1349
|
+
__metadata("design:type", User)
|
|
1350
|
+
], SubscriptionMaterialization.prototype, "user", void 0);
|
|
1351
|
+
__decorate([
|
|
1352
|
+
Type(() => SubscriptionPlan),
|
|
1353
|
+
__metadata("design:type", SubscriptionPlan)
|
|
1354
|
+
], SubscriptionMaterialization.prototype, "subscriptionPlan", void 0);
|
|
1355
|
+
__decorate([
|
|
1356
|
+
Type(() => UserAddress),
|
|
1357
|
+
__metadata("design:type", UserAddress)
|
|
1358
|
+
], SubscriptionMaterialization.prototype, "shippingAddress", void 0);
|
|
1359
|
+
__decorate([
|
|
1360
|
+
Type(() => UserAddress),
|
|
1361
|
+
__metadata("design:type", UserAddress)
|
|
1362
|
+
], SubscriptionMaterialization.prototype, "billingAddress", void 0);
|
|
1363
|
+
__decorate([
|
|
1364
|
+
Type(() => Coupon),
|
|
1365
|
+
__metadata("design:type", Coupon)
|
|
1366
|
+
], SubscriptionMaterialization.prototype, "coupon", void 0);
|
|
1367
|
+
__decorate([
|
|
1368
|
+
Type(() => Edition),
|
|
1369
|
+
__metadata("design:type", Array)
|
|
1370
|
+
], SubscriptionMaterialization.prototype, "editions", void 0);
|
|
1371
|
+
__decorate([
|
|
1372
|
+
Type(() => SubscriptionPayment),
|
|
1373
|
+
__metadata("design:type", SubscriptionPayment)
|
|
1374
|
+
], SubscriptionMaterialization.prototype, "payment", void 0);
|
|
1375
|
+
|
|
1376
|
+
class UserPaymentMethod extends BaseModel {
|
|
1377
|
+
static get identifiersFields() {
|
|
1378
|
+
return ['id', 'userId'];
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
class Lead extends BaseModel {
|
|
1383
|
+
static get identifiersFields() {
|
|
1384
|
+
return ['id'];
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
class UnauthorizedError extends CustomError {
|
|
1389
|
+
constructor(message) {
|
|
1390
|
+
super(message);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
var SignInMethods;
|
|
1395
|
+
(function (SignInMethods) {
|
|
1396
|
+
SignInMethods["EMAIL_PASSWORD"] = "email_password";
|
|
1397
|
+
SignInMethods["GOOGLE"] = "google";
|
|
1398
|
+
})(SignInMethods || (SignInMethods = {}));
|
|
1399
|
+
class Authentication {
|
|
1400
|
+
constructor(authService, userRepository) {
|
|
1401
|
+
this.authService = authService;
|
|
1402
|
+
this.userRepository = userRepository;
|
|
1403
|
+
}
|
|
1404
|
+
async signIn({ email, password }, signInMethod) {
|
|
1405
|
+
const method = this.getServiceByMethod(signInMethod);
|
|
1406
|
+
const userAuth = await this.authService[method]({ email, password });
|
|
1407
|
+
const user = this.userRepository.get({ id: userAuth.id });
|
|
1408
|
+
if (!isNil(user))
|
|
1409
|
+
return user;
|
|
1410
|
+
if (/^.+@b4a.com.br$/.test(userAuth.email))
|
|
1411
|
+
return this.createsUserByCredential(userAuth);
|
|
1412
|
+
throw new UnauthorizedError('Invalid credentials');
|
|
1413
|
+
}
|
|
1414
|
+
getServiceByMethod(signInMethod) {
|
|
1415
|
+
return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle';
|
|
1416
|
+
}
|
|
1417
|
+
async createsUserByCredential(user) {
|
|
1418
|
+
const [firstName, lastName] = user.displayName?.split(/\s/);
|
|
1419
|
+
const person = User.toInstance({
|
|
1420
|
+
...user,
|
|
1421
|
+
cpf: '',
|
|
1422
|
+
birthday: new Date(),
|
|
1423
|
+
firstName,
|
|
1424
|
+
lastName,
|
|
1425
|
+
acceptsNewsletter: false,
|
|
1426
|
+
area: Area.Transactional,
|
|
1427
|
+
officePosition: OfficePosition.Intern,
|
|
1428
|
+
type: UserType.Collaborator,
|
|
1429
|
+
});
|
|
1430
|
+
return this.userRepository.create(person);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
class UserAlreadyRegisteredError extends CustomError {
|
|
1435
|
+
constructor(message) {
|
|
1436
|
+
super(message);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
class WeakPasswordError extends CustomError {
|
|
1441
|
+
constructor(message = 'Weak password') {
|
|
1442
|
+
super(message);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
class Register {
|
|
1447
|
+
constructor(registerService, userRepository) {
|
|
1448
|
+
this.registerService = registerService;
|
|
1449
|
+
this.userRepository = userRepository;
|
|
1450
|
+
}
|
|
1451
|
+
async register(params) {
|
|
1452
|
+
const email = params.email.toLocaleLowerCase();
|
|
1453
|
+
const displayName = `${params.firstName} ${params.lastName}`;
|
|
1454
|
+
if (await this.userRepository.checkIfExistsByField('cpf', params.cpf))
|
|
1455
|
+
throw new UserAlreadyRegisteredError(`Usuário com CPF ${params.cpf} já registrado.`);
|
|
1456
|
+
if (await this.userRepository.checkIfExistsByField('email', params.email))
|
|
1457
|
+
throw new UserAlreadyRegisteredError(`Usuário com e-mail ${params.email} já registrado.`);
|
|
1458
|
+
const auth = await this.registerService.register({
|
|
1459
|
+
birthday: params.birthday,
|
|
1460
|
+
email,
|
|
1461
|
+
firstName: params.firstName,
|
|
1462
|
+
lastName: params.lastName,
|
|
1463
|
+
cpf: params.cpf,
|
|
1464
|
+
displayName,
|
|
1465
|
+
phone: params.phone,
|
|
1466
|
+
password: params.password,
|
|
1467
|
+
});
|
|
1468
|
+
delete params.password;
|
|
1469
|
+
const user = await this.userRepository.create({
|
|
1470
|
+
...params,
|
|
1471
|
+
id: auth.id,
|
|
1472
|
+
email,
|
|
1473
|
+
displayName,
|
|
1474
|
+
type: UserType.B2C,
|
|
1475
|
+
dateCreated: new Date(),
|
|
1476
|
+
dateModified: new Date(),
|
|
1477
|
+
});
|
|
1478
|
+
return user;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
class SignOut {
|
|
1483
|
+
constructor(authService) {
|
|
1484
|
+
this.authService = authService;
|
|
1485
|
+
}
|
|
1486
|
+
async signOut() {
|
|
1487
|
+
await this.authService.signOut();
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
class RecoveryPassword {
|
|
1492
|
+
constructor(authService) {
|
|
1493
|
+
this.authService = authService;
|
|
1494
|
+
}
|
|
1495
|
+
async sendEmail(email) {
|
|
1496
|
+
await this.authService.sendPasswordResetEmail(email);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1466
1500
|
class RoundProductPricesHelper {
|
|
1467
1501
|
static roundProductPrices(product) {
|
|
1468
1502
|
product.price.price = Number(product.price.price.toFixed(2));
|
|
@@ -1519,27 +1553,6 @@ var QuestionsFilters;
|
|
|
1519
1553
|
QuestionsFilters["PRODUCT_SPENT"] = "Qual \u00E9 o seu nivel de gasto mensal em produtos de beleza e cuidados pessoais?";
|
|
1520
1554
|
})(QuestionsFilters || (QuestionsFilters = {}));
|
|
1521
1555
|
|
|
1522
|
-
var ShopPageName;
|
|
1523
|
-
(function (ShopPageName) {
|
|
1524
|
-
ShopPageName["LP_CLUB"] = "LP_CLUBE";
|
|
1525
|
-
ShopPageName["SUBSCRIBER_PANEL"] = "SUBSCRIBER_PANEL";
|
|
1526
|
-
ShopPageName["INVITE_FRIENDS"] = "INVITE_FRIENDS";
|
|
1527
|
-
ShopPageName["INVITE_AND_WIN"] = "INVITE_AND_WIN";
|
|
1528
|
-
ShopPageName["WIN_GLAMPOINTS"] = "WIN_GLAMPOINTS";
|
|
1529
|
-
ShopPageName["POSTS"] = "POSTS";
|
|
1530
|
-
ShopPageName["GLAMPOINTS_SHOWCASE"] = "GLAMPOINTS_SHOWCASE";
|
|
1531
|
-
ShopPageName["LP_EDITIONS"] = "LP_EDITIONS";
|
|
1532
|
-
ShopPageName["LP_GLAMBOX_EDITION"] = "LP_GLAMBOX_EDITION";
|
|
1533
|
-
ShopPageName["LP_GLAMBOX_PROMOTION"] = "LP_GLAMBOX_PROMOTION";
|
|
1534
|
-
ShopPageName["LP_GLAMBAG_PROMOTION"] = "LP_GLAMBAG_PROMOTION";
|
|
1535
|
-
ShopPageName["LP_GLAMPASS_PROMOTION"] = "LP_GLAMPASS_PROMOTION";
|
|
1536
|
-
ShopPageName["LP_SUBSCRIPTION_PROMOTION"] = "LP_SUBSCRIPTION_PROMOTION";
|
|
1537
|
-
ShopPageName["LP_GLAMPARTNER_PROMOTION"] = "LP_GLAMPARTNER_PROMOTION";
|
|
1538
|
-
ShopPageName["LP_GLAMQUEENS"] = "LP_GLAMQUEENS";
|
|
1539
|
-
ShopPageName["LP_INVITE"] = "LP_INVITE";
|
|
1540
|
-
ShopPageName["LP_LIVELO"] = "LP_LIVELO";
|
|
1541
|
-
})(ShopPageName || (ShopPageName = {}));
|
|
1542
|
-
|
|
1543
1556
|
class BeautyQuestionsHelper {
|
|
1544
1557
|
static getAnswers(filter) {
|
|
1545
1558
|
switch (filter) {
|
|
@@ -1585,18 +1598,6 @@ class BeautyQuestionsHelper {
|
|
|
1585
1598
|
}
|
|
1586
1599
|
}
|
|
1587
1600
|
|
|
1588
|
-
class Campaign extends BaseModel {
|
|
1589
|
-
static get identifiersFields() {
|
|
1590
|
-
return ['id'];
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
class CampaignBanner extends BaseModel {
|
|
1595
|
-
static get identifiersFields() {
|
|
1596
|
-
return ['id'];
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
1601
|
class Home extends BaseModel {
|
|
1601
1602
|
static get identifiersFields() {
|
|
1602
1603
|
return ['id'];
|
|
@@ -2186,6 +2187,17 @@ class SubscriptionFirestoreRepository extends withCrudFirestore(withHelpers(with
|
|
|
2186
2187
|
}
|
|
2187
2188
|
}
|
|
2188
2189
|
|
|
2190
|
+
class SubscriptionMaterializationFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
2191
|
+
constructor({ firestore, interceptors }) {
|
|
2192
|
+
super({
|
|
2193
|
+
firestore,
|
|
2194
|
+
collectionName: 'subscriptionMaterialization',
|
|
2195
|
+
model: SubscriptionMaterialization,
|
|
2196
|
+
interceptors,
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2189
2201
|
class SubscriptionPaymentFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription) {
|
|
2190
2202
|
constructor({ firestore, interceptors }, parentRepository) {
|
|
2191
2203
|
super({
|
|
@@ -2572,28 +2584,6 @@ class SubscriptionPlanFirestoreRepository extends withCrudFirestore(withHelpers(
|
|
|
2572
2584
|
}
|
|
2573
2585
|
}
|
|
2574
2586
|
|
|
2575
|
-
class CampaignBannerFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
2576
|
-
constructor({ firestore, interceptors, }) {
|
|
2577
|
-
super({
|
|
2578
|
-
firestore,
|
|
2579
|
-
collectionName: 'banners',
|
|
2580
|
-
model: CampaignBanner,
|
|
2581
|
-
interceptors,
|
|
2582
|
-
});
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
class CampaignFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
2587
|
-
constructor({ firestore, interceptors }) {
|
|
2588
|
-
super({
|
|
2589
|
-
firestore,
|
|
2590
|
-
collectionName: 'campaigns',
|
|
2591
|
-
model: Campaign,
|
|
2592
|
-
interceptors,
|
|
2593
|
-
});
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
|
|
2597
2587
|
class HomeFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
2598
2588
|
constructor({ firestore, interceptors }) {
|
|
2599
2589
|
super({
|
|
@@ -2742,38 +2732,38 @@ class RegisterFirebaseAuthService {
|
|
|
2742
2732
|
}
|
|
2743
2733
|
|
|
2744
2734
|
class AttributeOptionHelper {
|
|
2745
|
-
static { this.FindByAttribute = (attributeName, fields) => {
|
|
2746
|
-
if (fields.includes(attributeName))
|
|
2747
|
-
return { columnName: attributeName.toString(), attributeName, to: (value) => value, from: (value) => value };
|
|
2748
|
-
const field = fields.find((columnOption) => isObject(columnOption) && Object.keys(columnOption).includes(attributeName.toString()));
|
|
2749
|
-
const fieldOption = is(field)?.[attributeName];
|
|
2750
|
-
if (isNil(fieldOption))
|
|
2751
|
-
return { columnName: attributeName.toString(), attributeName };
|
|
2752
|
-
if (Array.isArray(fieldOption))
|
|
2753
|
-
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2754
|
-
return { attributeName, columnName: attributeName.toString(), ...fieldOption };
|
|
2755
|
-
}; }
|
|
2756
|
-
static { this.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName; }
|
|
2757
|
-
static { this.FindColumnOptionFromList = (columnName, fields) => {
|
|
2758
|
-
if (fields.includes(columnName))
|
|
2759
|
-
return { columnName, attributeName: columnName };
|
|
2760
|
-
const field = is(fields.find((field) => {
|
|
2761
|
-
if (!isObject(field))
|
|
2762
|
-
return false;
|
|
2763
|
-
const columnOption = Object.values(field).find((option) => AttributeOptionHelper.CheckIsColumnOption(option) && option.columnName === columnName ? option : {});
|
|
2764
|
-
return AttributeOptionHelper.CheckIsColumnOption(columnOption) && columnOption?.columnName === columnName;
|
|
2765
|
-
}) || {});
|
|
2766
|
-
const attributeName = Object.keys(field).find((fieldOptionFromList) => AttributeOptionHelper.CheckIsColumnOption(field[fieldOptionFromList]) || Array.isArray(field[fieldOptionFromList]));
|
|
2767
|
-
const fieldOption = field?.[attributeName];
|
|
2768
|
-
if (Array.isArray(fieldOption))
|
|
2769
|
-
return { attributeName: attributeName, fields: fieldOption };
|
|
2770
|
-
return {
|
|
2771
|
-
attributeName: attributeName || columnName,
|
|
2772
|
-
columnName,
|
|
2773
|
-
...fieldOption,
|
|
2774
|
-
};
|
|
2775
|
-
}; }
|
|
2776
2735
|
}
|
|
2736
|
+
AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
2737
|
+
if (fields.includes(attributeName))
|
|
2738
|
+
return { columnName: attributeName.toString(), attributeName, to: (value) => value, from: (value) => value };
|
|
2739
|
+
const field = fields.find((columnOption) => isObject(columnOption) && Object.keys(columnOption).includes(attributeName.toString()));
|
|
2740
|
+
const fieldOption = is(field)?.[attributeName];
|
|
2741
|
+
if (isNil(fieldOption))
|
|
2742
|
+
return { columnName: attributeName.toString(), attributeName };
|
|
2743
|
+
if (Array.isArray(fieldOption))
|
|
2744
|
+
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2745
|
+
return { attributeName, columnName: attributeName.toString(), ...fieldOption };
|
|
2746
|
+
};
|
|
2747
|
+
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2748
|
+
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
2749
|
+
if (fields.includes(columnName))
|
|
2750
|
+
return { columnName, attributeName: columnName };
|
|
2751
|
+
const field = is(fields.find((field) => {
|
|
2752
|
+
if (!isObject(field))
|
|
2753
|
+
return false;
|
|
2754
|
+
const columnOption = Object.values(field).find((option) => AttributeOptionHelper.CheckIsColumnOption(option) && option.columnName === columnName ? option : {});
|
|
2755
|
+
return AttributeOptionHelper.CheckIsColumnOption(columnOption) && columnOption?.columnName === columnName;
|
|
2756
|
+
}) || {});
|
|
2757
|
+
const attributeName = Object.keys(field).find((fieldOptionFromList) => AttributeOptionHelper.CheckIsColumnOption(field[fieldOptionFromList]) || Array.isArray(field[fieldOptionFromList]));
|
|
2758
|
+
const fieldOption = field?.[attributeName];
|
|
2759
|
+
if (Array.isArray(fieldOption))
|
|
2760
|
+
return { attributeName: attributeName, fields: fieldOption };
|
|
2761
|
+
return {
|
|
2762
|
+
attributeName: attributeName || columnName,
|
|
2763
|
+
columnName,
|
|
2764
|
+
...fieldOption,
|
|
2765
|
+
};
|
|
2766
|
+
};
|
|
2777
2767
|
|
|
2778
2768
|
var HasuraGraphQLWhere;
|
|
2779
2769
|
(function (HasuraGraphQLWhere) {
|
|
@@ -2806,211 +2796,211 @@ var HasuraGraphQLColumnType;
|
|
|
2806
2796
|
})(HasuraGraphQLColumnType || (HasuraGraphQLColumnType = {}));
|
|
2807
2797
|
|
|
2808
2798
|
class FilterOptionHelper {
|
|
2809
|
-
static { this.CheckIfIsFilterOption = (filter) => !isNil(filter?.operator); }
|
|
2810
|
-
static { this.GetValueFromFilter = (filter, fieldOption) => {
|
|
2811
|
-
if (!FilterOptionHelper.CheckIfIsFilterOption(filter))
|
|
2812
|
-
return filter;
|
|
2813
|
-
if (filter.operator === Where.ISNULL)
|
|
2814
|
-
return true;
|
|
2815
|
-
if (filter.operator === Where.ISNOTNULL)
|
|
2816
|
-
return false;
|
|
2817
|
-
const converter = fieldOption.to
|
|
2818
|
-
? fieldOption.to
|
|
2819
|
-
: (value) => filter.operator === Where.LIKE && !Array.isArray(filter.value) && value.indexOf('%') < 0
|
|
2820
|
-
? `%${value}%`
|
|
2821
|
-
: value;
|
|
2822
|
-
return Array.isArray(filter.value) && !fieldOption.fields && [Where.IN, Where.NOTIN].includes(filter.operator)
|
|
2823
|
-
? filter.value.map((fieldValue) => converter(fieldValue))
|
|
2824
|
-
: converter(filter.value);
|
|
2825
|
-
}; }
|
|
2826
2799
|
}
|
|
2800
|
+
FilterOptionHelper.CheckIfIsFilterOption = (filter) => !isNil(filter?.operator);
|
|
2801
|
+
FilterOptionHelper.GetValueFromFilter = (filter, fieldOption) => {
|
|
2802
|
+
if (!FilterOptionHelper.CheckIfIsFilterOption(filter))
|
|
2803
|
+
return filter;
|
|
2804
|
+
if (filter.operator === Where.ISNULL)
|
|
2805
|
+
return true;
|
|
2806
|
+
if (filter.operator === Where.ISNOTNULL)
|
|
2807
|
+
return false;
|
|
2808
|
+
const converter = fieldOption.to
|
|
2809
|
+
? fieldOption.to
|
|
2810
|
+
: (value) => filter.operator === Where.LIKE && !Array.isArray(filter.value) && value.indexOf('%') < 0
|
|
2811
|
+
? `%${value}%`
|
|
2812
|
+
: value;
|
|
2813
|
+
return Array.isArray(filter.value) && !fieldOption.fields && [Where.IN, Where.NOTIN].includes(filter.operator)
|
|
2814
|
+
? filter.value.map((fieldValue) => converter(fieldValue))
|
|
2815
|
+
: converter(filter.value);
|
|
2816
|
+
};
|
|
2827
2817
|
|
|
2828
2818
|
class BindFilterQueryHelper {
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2819
|
+
}
|
|
2820
|
+
BindFilterQueryHelper.MakeGraphQLWhere = (filter, fields) => Object.keys(filter).reduce((variables, fieldName) => {
|
|
2821
|
+
const columnOption = AttributeOptionHelper.FindByAttribute(fieldName, fields);
|
|
2822
|
+
if (!columnOption.bindFindFilter)
|
|
2823
|
+
return {
|
|
2824
|
+
...variables,
|
|
2825
|
+
...{
|
|
2826
|
+
[columnOption.columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, filter[fieldName], fields),
|
|
2827
|
+
},
|
|
2828
|
+
};
|
|
2829
|
+
const builtFilter = columnOption.bindFindFilter(filter[fieldName]);
|
|
2830
|
+
return {
|
|
2831
|
+
...variables,
|
|
2832
|
+
...Object.keys(builtFilter).reduce((variablesList, columnName) => ({
|
|
2833
|
+
...variablesList,
|
|
2834
|
+
[columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, builtFilter[columnName], fields),
|
|
2835
|
+
}), {}),
|
|
2836
|
+
};
|
|
2837
|
+
}, {});
|
|
2838
|
+
BindFilterQueryHelper.BuildWhereSentence = (field, options, fields) => {
|
|
2839
|
+
const fieldSentenceOptions = AttributeOptionHelper.FindByAttribute(field, fields);
|
|
2840
|
+
const isNestedField = !Array.isArray(options) &&
|
|
2841
|
+
isObject(options) &&
|
|
2842
|
+
isNil(options?.operator) &&
|
|
2843
|
+
isNil(options?.value) &&
|
|
2844
|
+
isNil(fieldSentenceOptions?.to);
|
|
2845
|
+
if (isNestedField)
|
|
2846
|
+
return Object.keys(options).reduce((variables, key) => {
|
|
2847
|
+
const fieldOptions = AttributeOptionHelper.FindByAttribute(key, fieldSentenceOptions?.fields || fields);
|
|
2848
|
+
const columnName = fieldOptions.columnName;
|
|
2849
|
+
const columnFields = fieldOptions.fields;
|
|
2832
2850
|
return {
|
|
2833
2851
|
...variables,
|
|
2834
|
-
|
|
2835
|
-
[columnOption.columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, filter[fieldName], fields),
|
|
2836
|
-
},
|
|
2852
|
+
[columnName]: BindFilterQueryHelper.BuildWhereSentence(key, is(is(options)[key]), fieldSentenceOptions?.fields || columnFields || fields),
|
|
2837
2853
|
};
|
|
2838
|
-
|
|
2854
|
+
}, {});
|
|
2855
|
+
if (!Array.isArray(options) && !isNil(fieldSentenceOptions.fields))
|
|
2839
2856
|
return {
|
|
2840
|
-
|
|
2841
|
-
...Object.keys(builtFilter).reduce((variablesList, columnName) => ({
|
|
2842
|
-
...variablesList,
|
|
2843
|
-
[columnName]: BindFilterQueryHelper.BuildWhereSentence(fieldName, builtFilter[columnName], fields),
|
|
2844
|
-
}), {}),
|
|
2857
|
+
[fieldSentenceOptions.fields[0]]: BindFilterQueryHelper.BuildOperatorSentence(options, fieldSentenceOptions),
|
|
2845
2858
|
};
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2859
|
+
if (!Array.isArray(options) && isObject(options) && !FilterOptionHelper.CheckIfIsFilterOption(options))
|
|
2860
|
+
options = Object.values(options)[0];
|
|
2861
|
+
return Array.isArray(options)
|
|
2862
|
+
? options.reduce((whereSentence, option) => ({
|
|
2863
|
+
...whereSentence,
|
|
2864
|
+
...BindFilterQueryHelper.BuildOperatorSentence(option, fieldSentenceOptions),
|
|
2865
|
+
}), {})
|
|
2866
|
+
: BindFilterQueryHelper.BuildOperatorSentence(options, fieldSentenceOptions);
|
|
2867
|
+
};
|
|
2868
|
+
BindFilterQueryHelper.BuildOperatorSentence = (options, fieldOption) => ({
|
|
2869
|
+
[BindFilterQueryHelper.GetHasuraOperator(options, fieldOption)]: FilterOptionHelper.GetValueFromFilter(options, fieldOption),
|
|
2870
|
+
});
|
|
2871
|
+
BindFilterQueryHelper.GetHasuraOperator = (options, fieldOption) => FilterOptionHelper.CheckIfIsFilterOption(options)
|
|
2872
|
+
? fieldOption.type === HasuraGraphQLColumnType.Jsonb
|
|
2873
|
+
? BindFilterQueryHelper.GetHasuraJsonbOperator(options)
|
|
2874
|
+
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2875
|
+
Object.keys(Where).find((operator) => Where[operator] === options?.operator))]
|
|
2876
|
+
: HasuraGraphQLWhere.EQUALS;
|
|
2877
|
+
BindFilterQueryHelper.GetHasuraJsonbOperator = (options) => options.operator === Where.IN
|
|
2878
|
+
? HasuraGraphQLWhere.JSON_CONTAINS
|
|
2879
|
+
: options.operator === Where.LIKE
|
|
2880
|
+
? HasuraGraphQLWhere.JSON_HAS_KEYS_ANY
|
|
2881
|
+
: HasuraGraphQLWhere[Object.keys(HasuraGraphQLWhere).find((graphQLOperator) => graphQLOperator ===
|
|
2882
|
+
Object.keys(Where).find((operator) => Where[operator] === options?.operator))];
|
|
2883
|
+
|
|
2884
|
+
class GraphQLFieldHelper {
|
|
2885
|
+
}
|
|
2886
|
+
GraphQLFieldHelper.CheckIsGraphQLParams = (params) => !isString(params) && Array.isArray(params) && params.length >= 0 && !!params[0].operation;
|
|
2887
|
+
GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields = (fields) => {
|
|
2888
|
+
return fields
|
|
2889
|
+
?.map((field) => {
|
|
2890
|
+
if (isString(field))
|
|
2891
|
+
return field.toString();
|
|
2892
|
+
if (field === 'affected_rows')
|
|
2893
|
+
return field;
|
|
2894
|
+
const fieldName = Object.keys(field).shift();
|
|
2895
|
+
const fieldValue = is(field[fieldName]);
|
|
2896
|
+
if (Array.isArray(fieldValue))
|
|
2897
|
+
return { [fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue) };
|
|
2898
|
+
if (!AttributeOptionHelper.CheckIsColumnOption(fieldValue))
|
|
2899
|
+
return;
|
|
2900
|
+
const isNestedField = !!fieldValue.fields;
|
|
2854
2901
|
if (isNestedField)
|
|
2855
|
-
return
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
if (!Array.isArray(options) && !isNil(fieldSentenceOptions.fields))
|
|
2902
|
+
return GraphQLFieldHelper.ConvertNestedFieldsToGraphQLFields(fieldName, fieldValue);
|
|
2903
|
+
return fieldValue.columnName;
|
|
2904
|
+
})
|
|
2905
|
+
.filter((field) => !!field);
|
|
2906
|
+
};
|
|
2907
|
+
GraphQLFieldHelper.ConvertFieldValueFrom = (data, fields) => Object.keys(data).reduce((result, columnName) => {
|
|
2908
|
+
const { attributeName, fields: attributeFields, from, } = AttributeOptionHelper.FindColumnOptionFromList(columnName, fields);
|
|
2909
|
+
if (!!attributeFields && Array.isArray(attributeFields)) {
|
|
2910
|
+
if (Array.isArray(data[columnName]))
|
|
2865
2911
|
return {
|
|
2866
|
-
|
|
2912
|
+
...result,
|
|
2913
|
+
[attributeName]: from
|
|
2914
|
+
? from(data[columnName], data)
|
|
2915
|
+
: is(data[columnName]).map((value) => GraphQLFieldHelper.ConvertFieldValueFrom(is(value), attributeFields)),
|
|
2867
2916
|
};
|
|
2868
|
-
if (
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
if (isString(field))
|
|
2900
|
-
return field.toString();
|
|
2901
|
-
if (field === 'affected_rows')
|
|
2902
|
-
return field;
|
|
2903
|
-
const fieldName = Object.keys(field).shift();
|
|
2904
|
-
const fieldValue = is(field[fieldName]);
|
|
2905
|
-
if (Array.isArray(fieldValue))
|
|
2906
|
-
return { [fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue) };
|
|
2907
|
-
if (!AttributeOptionHelper.CheckIsColumnOption(fieldValue))
|
|
2908
|
-
return;
|
|
2909
|
-
const isNestedField = !!fieldValue.fields;
|
|
2910
|
-
if (isNestedField)
|
|
2911
|
-
return GraphQLFieldHelper.ConvertNestedFieldsToGraphQLFields(fieldName, fieldValue);
|
|
2912
|
-
return fieldValue.columnName;
|
|
2913
|
-
})
|
|
2914
|
-
.filter((field) => !!field);
|
|
2915
|
-
}; }
|
|
2916
|
-
static { this.ConvertFieldValueFrom = (data, fields) => Object.keys(data).reduce((result, columnName) => {
|
|
2917
|
-
const { attributeName, fields: attributeFields, from, } = AttributeOptionHelper.FindColumnOptionFromList(columnName, fields);
|
|
2918
|
-
if (!!attributeFields && Array.isArray(attributeFields)) {
|
|
2919
|
-
if (Array.isArray(data[columnName]))
|
|
2920
|
-
return {
|
|
2921
|
-
...result,
|
|
2922
|
-
[attributeName]: from
|
|
2923
|
-
? from(data[columnName], data)
|
|
2924
|
-
: is(data[columnName]).map((value) => GraphQLFieldHelper.ConvertFieldValueFrom(is(value), attributeFields)),
|
|
2925
|
-
};
|
|
2926
|
-
if (isObject(data[columnName]))
|
|
2917
|
+
if (isObject(data[columnName]))
|
|
2918
|
+
return {
|
|
2919
|
+
...result,
|
|
2920
|
+
[attributeName]: !!from
|
|
2921
|
+
? from(data[columnName])
|
|
2922
|
+
: GraphQLFieldHelper.ConvertFieldValueFrom(is(data[columnName]), attributeFields),
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
if (!!from)
|
|
2926
|
+
return { ...result, [attributeName]: from(data[columnName], data) };
|
|
2927
|
+
return {
|
|
2928
|
+
...result,
|
|
2929
|
+
[attributeName]: isString(data[columnName]) ? parseDateTime(data[columnName].toString()) : data[columnName],
|
|
2930
|
+
};
|
|
2931
|
+
}, {});
|
|
2932
|
+
GraphQLFieldHelper.ConvertFieldValueTo = (instance, fields, update = false) => {
|
|
2933
|
+
const data = instance.toPlain?.() || instance;
|
|
2934
|
+
return Object.keys(data).reduce((result, attributeName) => {
|
|
2935
|
+
const { columnName, fields: attributeFields, foreignKeyColumn, to, bindPersistData, } = AttributeOptionHelper.FindByAttribute(attributeName, fields);
|
|
2936
|
+
if (bindPersistData)
|
|
2937
|
+
return {
|
|
2938
|
+
...result,
|
|
2939
|
+
...bindPersistData(data[attributeName], instance),
|
|
2940
|
+
};
|
|
2941
|
+
if (isNil(columnName))
|
|
2942
|
+
return result;
|
|
2943
|
+
if (!!foreignKeyColumn &&
|
|
2944
|
+
!isEmpty(foreignKeyColumn) &&
|
|
2945
|
+
!Object.keys(foreignKeyColumn).filter((key) => !is(data[attributeName])?.[key]).length)
|
|
2946
|
+
return Object.keys(foreignKeyColumn).reduce((object, current) => {
|
|
2947
|
+
const { columnName: foreignColumnName } = AttributeOptionHelper.FindByAttribute(foreignKeyColumn[current], fields);
|
|
2927
2948
|
return {
|
|
2928
|
-
...
|
|
2929
|
-
[
|
|
2930
|
-
? from(data[columnName])
|
|
2931
|
-
: GraphQLFieldHelper.ConvertFieldValueFrom(is(data[columnName]), attributeFields),
|
|
2949
|
+
...object,
|
|
2950
|
+
[foreignColumnName]: data[attributeName]?.[current],
|
|
2932
2951
|
};
|
|
2952
|
+
}, { ...result });
|
|
2953
|
+
if (update &&
|
|
2954
|
+
isObject(data[attributeName]) &&
|
|
2955
|
+
!isNil(attributeFields) &&
|
|
2956
|
+
!isDate(data[attributeName]))
|
|
2957
|
+
return result;
|
|
2958
|
+
if (!!columnName &&
|
|
2959
|
+
Array.isArray(attributeFields) &&
|
|
2960
|
+
isObject(data[attributeName])) {
|
|
2961
|
+
const converted = !isNil(columnName) && to
|
|
2962
|
+
? to(instance[attributeName], instance)
|
|
2963
|
+
: data[attributeName];
|
|
2964
|
+
return {
|
|
2965
|
+
...result,
|
|
2966
|
+
...(converted !== undefined
|
|
2967
|
+
? {
|
|
2968
|
+
[columnName]: {
|
|
2969
|
+
data: instance[attributeName] instanceof BaseModel
|
|
2970
|
+
? GraphQLFieldHelper.ConvertFieldValueTo(data[attributeName], attributeFields)
|
|
2971
|
+
: converted,
|
|
2972
|
+
},
|
|
2973
|
+
}
|
|
2974
|
+
: {}),
|
|
2975
|
+
};
|
|
2933
2976
|
}
|
|
2934
|
-
if (!!
|
|
2935
|
-
return { ...result, [attributeName]: from(data[columnName], data) };
|
|
2936
|
-
return {
|
|
2937
|
-
...result,
|
|
2938
|
-
[attributeName]: isString(data[columnName]) ? parseDateTime(data[columnName].toString()) : data[columnName],
|
|
2939
|
-
};
|
|
2940
|
-
}, {}); }
|
|
2941
|
-
static { this.ConvertFieldValueTo = (instance, fields, update = false) => {
|
|
2942
|
-
const data = instance.toPlain?.() || instance;
|
|
2943
|
-
return Object.keys(data).reduce((result, attributeName) => {
|
|
2944
|
-
const { columnName, fields: attributeFields, foreignKeyColumn, to, bindPersistData, } = AttributeOptionHelper.FindByAttribute(attributeName, fields);
|
|
2945
|
-
if (bindPersistData)
|
|
2946
|
-
return {
|
|
2947
|
-
...result,
|
|
2948
|
-
...bindPersistData(data[attributeName], instance),
|
|
2949
|
-
};
|
|
2950
|
-
if (isNil(columnName))
|
|
2951
|
-
return result;
|
|
2952
|
-
if (!!foreignKeyColumn &&
|
|
2953
|
-
!isEmpty(foreignKeyColumn) &&
|
|
2954
|
-
!Object.keys(foreignKeyColumn).filter((key) => !is(data[attributeName])?.[key]).length)
|
|
2955
|
-
return Object.keys(foreignKeyColumn).reduce((object, current) => {
|
|
2956
|
-
const { columnName: foreignColumnName } = AttributeOptionHelper.FindByAttribute(foreignKeyColumn[current], fields);
|
|
2957
|
-
return {
|
|
2958
|
-
...object,
|
|
2959
|
-
[foreignColumnName]: data[attributeName]?.[current],
|
|
2960
|
-
};
|
|
2961
|
-
}, { ...result });
|
|
2962
|
-
if (update &&
|
|
2963
|
-
isObject(data[attributeName]) &&
|
|
2964
|
-
!isNil(attributeFields) &&
|
|
2965
|
-
!isDate(data[attributeName]))
|
|
2966
|
-
return result;
|
|
2967
|
-
if (!!columnName &&
|
|
2968
|
-
Array.isArray(attributeFields) &&
|
|
2969
|
-
isObject(data[attributeName])) {
|
|
2970
|
-
const converted = !isNil(columnName) && to
|
|
2971
|
-
? to(instance[attributeName], instance)
|
|
2972
|
-
: data[attributeName];
|
|
2973
|
-
return {
|
|
2974
|
-
...result,
|
|
2975
|
-
...(converted !== undefined
|
|
2976
|
-
? {
|
|
2977
|
-
[columnName]: {
|
|
2978
|
-
data: instance[attributeName] instanceof BaseModel
|
|
2979
|
-
? GraphQLFieldHelper.ConvertFieldValueTo(data[attributeName], attributeFields)
|
|
2980
|
-
: converted,
|
|
2981
|
-
},
|
|
2982
|
-
}
|
|
2983
|
-
: {}),
|
|
2984
|
-
};
|
|
2985
|
-
}
|
|
2986
|
-
if (!!to)
|
|
2987
|
-
return {
|
|
2988
|
-
...result,
|
|
2989
|
-
[columnName]: to(instance[attributeName], instance),
|
|
2990
|
-
};
|
|
2991
|
-
return { ...result, [columnName]: data[attributeName] };
|
|
2992
|
-
}, {});
|
|
2993
|
-
}; }
|
|
2994
|
-
static { this.ConvertNestedFieldsToGraphQLFields = (fieldName, fieldValue) => {
|
|
2995
|
-
const hasCustomFilters = !!fieldValue.filters;
|
|
2996
|
-
if (hasCustomFilters)
|
|
2977
|
+
if (!!to)
|
|
2997
2978
|
return {
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
variables: {
|
|
3001
|
-
[`${fieldValue.columnName}_where`]: {
|
|
3002
|
-
name: 'where',
|
|
3003
|
-
type: fieldValue.filters.filterType,
|
|
3004
|
-
value: BindFilterQueryHelper.MakeGraphQLWhere(fieldValue.filters.filters, fieldValue.fields),
|
|
3005
|
-
required: true,
|
|
3006
|
-
},
|
|
3007
|
-
},
|
|
2979
|
+
...result,
|
|
2980
|
+
[columnName]: to(instance[attributeName], instance),
|
|
3008
2981
|
};
|
|
2982
|
+
return { ...result, [columnName]: data[attributeName] };
|
|
2983
|
+
}, {});
|
|
2984
|
+
};
|
|
2985
|
+
GraphQLFieldHelper.ConvertNestedFieldsToGraphQLFields = (fieldName, fieldValue) => {
|
|
2986
|
+
const hasCustomFilters = !!fieldValue.filters;
|
|
2987
|
+
if (hasCustomFilters)
|
|
3009
2988
|
return {
|
|
3010
|
-
|
|
2989
|
+
operation: fieldValue.columnName || fieldName,
|
|
2990
|
+
fields: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue.fields),
|
|
2991
|
+
variables: {
|
|
2992
|
+
[`${fieldValue.columnName}_where`]: {
|
|
2993
|
+
name: 'where',
|
|
2994
|
+
type: fieldValue.filters.filterType,
|
|
2995
|
+
value: BindFilterQueryHelper.MakeGraphQLWhere(fieldValue.filters.filters, fieldValue.fields),
|
|
2996
|
+
required: true,
|
|
2997
|
+
},
|
|
2998
|
+
},
|
|
3011
2999
|
};
|
|
3012
|
-
|
|
3013
|
-
|
|
3000
|
+
return {
|
|
3001
|
+
[fieldValue.columnName || fieldName]: GraphQLFieldHelper.ConvertModelFieldsToGraphQLFields(fieldValue.fields),
|
|
3002
|
+
};
|
|
3003
|
+
};
|
|
3014
3004
|
|
|
3015
3005
|
const withCreateHasuraGraphQL = (MixinBase) => {
|
|
3016
3006
|
return class CreateHasuraGraphQLMixin extends MixinBase {
|
|
@@ -3080,6 +3070,16 @@ const withDeleteHasuraGraphQL = (MixinBase) => {
|
|
|
3080
3070
|
|
|
3081
3071
|
const withHasuraGraphQL = (MixinBase) => {
|
|
3082
3072
|
return class HasuraGraphQLMixin extends MixinBase {
|
|
3073
|
+
constructor(...params) {
|
|
3074
|
+
const options = params[0];
|
|
3075
|
+
super(...params);
|
|
3076
|
+
this.tableName = options.tableName;
|
|
3077
|
+
this.endpoint = options.endpoint;
|
|
3078
|
+
this.authOptions = options.authOptions;
|
|
3079
|
+
this.model = options.model;
|
|
3080
|
+
this.fields = options.fields || this.model.identifiersFields;
|
|
3081
|
+
this.logger = DebugHelper.from(this);
|
|
3082
|
+
}
|
|
3083
3083
|
get headers() {
|
|
3084
3084
|
return {
|
|
3085
3085
|
'Content-Type': 'application/json',
|
|
@@ -3093,16 +3093,6 @@ const withHasuraGraphQL = (MixinBase) => {
|
|
|
3093
3093
|
}),
|
|
3094
3094
|
};
|
|
3095
3095
|
}
|
|
3096
|
-
constructor(...params) {
|
|
3097
|
-
const options = params[0];
|
|
3098
|
-
super(...params);
|
|
3099
|
-
this.tableName = options.tableName;
|
|
3100
|
-
this.endpoint = options.endpoint;
|
|
3101
|
-
this.authOptions = options.authOptions;
|
|
3102
|
-
this.model = options.model;
|
|
3103
|
-
this.fields = options.fields || this.model.identifiersFields;
|
|
3104
|
-
this.logger = DebugHelper.from(this);
|
|
3105
|
-
}
|
|
3106
3096
|
async mutation(operation, fields, variables) {
|
|
3107
3097
|
const resultQuery = mutation({
|
|
3108
3098
|
operation,
|
|
@@ -3719,7 +3709,6 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
3719
3709
|
slug,
|
|
3720
3710
|
shops: { operator: Where.IN, value: [shop] },
|
|
3721
3711
|
published: { operator: Where.EQUALS, value: true },
|
|
3722
|
-
isWishlist: { operator: Where.EQUALS, value: false },
|
|
3723
3712
|
},
|
|
3724
3713
|
options: {
|
|
3725
3714
|
enableCount: false,
|
|
@@ -4055,24 +4044,6 @@ class FilterOptionHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasu
|
|
|
4055
4044
|
}
|
|
4056
4045
|
|
|
4057
4046
|
class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
4058
|
-
get reviewsFields() {
|
|
4059
|
-
return [
|
|
4060
|
-
'id',
|
|
4061
|
-
'shop',
|
|
4062
|
-
'rate',
|
|
4063
|
-
'author',
|
|
4064
|
-
'email',
|
|
4065
|
-
'location',
|
|
4066
|
-
'review',
|
|
4067
|
-
'status',
|
|
4068
|
-
'title',
|
|
4069
|
-
{ personId: { columnName: 'person_id' } },
|
|
4070
|
-
'points',
|
|
4071
|
-
{ orderId: { columnName: 'order_id' } },
|
|
4072
|
-
{ createdAt: { columnName: 'created_at' } },
|
|
4073
|
-
{ updatedAt: { columnName: 'updated_at' } },
|
|
4074
|
-
];
|
|
4075
|
-
}
|
|
4076
4047
|
constructor({ endpoint, authOptions, interceptors, }) {
|
|
4077
4048
|
super({
|
|
4078
4049
|
tableName: 'product',
|
|
@@ -4273,6 +4244,24 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
4273
4244
|
},
|
|
4274
4245
|
];
|
|
4275
4246
|
}
|
|
4247
|
+
get reviewsFields() {
|
|
4248
|
+
return [
|
|
4249
|
+
'id',
|
|
4250
|
+
'shop',
|
|
4251
|
+
'rate',
|
|
4252
|
+
'author',
|
|
4253
|
+
'email',
|
|
4254
|
+
'location',
|
|
4255
|
+
'review',
|
|
4256
|
+
'status',
|
|
4257
|
+
'title',
|
|
4258
|
+
{ personId: { columnName: 'person_id' } },
|
|
4259
|
+
'points',
|
|
4260
|
+
{ orderId: { columnName: 'order_id' } },
|
|
4261
|
+
{ createdAt: { columnName: 'created_at' } },
|
|
4262
|
+
{ updatedAt: { columnName: 'updated_at' } },
|
|
4263
|
+
];
|
|
4264
|
+
}
|
|
4276
4265
|
async create(params) {
|
|
4277
4266
|
const { metadata, ...data } = params;
|
|
4278
4267
|
const product = await super.create(omit({ ...data, metadata: metadata || { description: null, title: null } }, ['reviews']));
|
|
@@ -4758,6 +4747,8 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4758
4747
|
},
|
|
4759
4748
|
},
|
|
4760
4749
|
{ personId: { columnName: 'person_id' } },
|
|
4750
|
+
{ personName: { columnName: 'person_name' } },
|
|
4751
|
+
{ personPhoto: { columnName: 'person_photo' } },
|
|
4761
4752
|
],
|
|
4762
4753
|
});
|
|
4763
4754
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
@@ -4907,5 +4898,5 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4907
4898
|
* Generated bundle index. Do not edit.
|
|
4908
4899
|
*/
|
|
4909
4900
|
|
|
4910
|
-
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository,
|
|
4901
|
+
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, Logger, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductSpents, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, is, isDebuggable, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
4911
4902
|
//# sourceMappingURL=infrab4a-connect.mjs.map
|