@infrab4a/connect 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/infrab4a-connect.umd.js +2173 -267
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/category.d.ts +5 -4
- package/domain/catalog/models/index.d.ts +3 -2
- package/domain/catalog/models/kit-product.d.ts +12 -0
- package/domain/catalog/models/product.d.ts +9 -4
- package/domain/catalog/models/types/product-review.type.d.ts +10 -8
- package/domain/catalog/models/variant.d.ts +7 -3
- package/domain/catalog/repositories/category.repository.d.ts +1 -1
- package/domain/catalog/repositories/product.repository.d.ts +10 -3
- package/domain/catalog/repositories/subscription-product.repository.d.ts +1 -1
- package/domain/catalog/repositories/variant.repository.d.ts +1 -1
- package/domain/generic/model/base.model.d.ts +10 -0
- package/domain/{general → generic}/model/index.d.ts +0 -1
- package/domain/generic/model/types/base-model-builder.type.d.ts +15 -0
- package/domain/generic/model/types/identifier-model.type.d.ts +7 -0
- package/domain/{general → generic}/model/types/index.d.ts +2 -0
- package/domain/generic/model/types/model-base-structure.type.d.ts +6 -0
- package/domain/generic/model/types/non-function-properties.type.d.ts +12 -0
- package/domain/generic/model/types/non-function-property-name.type.d.ts +4 -0
- package/domain/generic/repository/create.repository.d.ts +8 -0
- package/domain/generic/repository/crud.repository.d.ts +19 -0
- package/domain/generic/repository/delete.repository.d.ts +7 -0
- package/domain/{general → generic}/repository/enums/where.enum.d.ts +5 -2
- package/domain/generic/repository/find.repository.d.ts +11 -0
- package/domain/generic/repository/get.repository.d.ts +5 -0
- package/domain/generic/repository/read.repository.d.ts +14 -0
- package/domain/{general → generic}/repository/types/index.d.ts +1 -0
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +13 -0
- package/domain/{general → generic}/repository/types/repository-update-params.type.d.ts +4 -4
- package/domain/generic/repository/types/where-options.type.d.ts +2 -0
- package/domain/generic/repository/update.repository.d.ts +6 -0
- package/domain/index.d.ts +1 -1
- package/domain/location/models/address.d.ts +3 -2
- package/domain/shop-settings/models/home.d.ts +3 -3
- package/domain/shop-settings/models/shop-menu.d.ts +3 -3
- package/domain/shop-settings/repositories/home.repository.d.ts +1 -1
- package/domain/shop-settings/repositories/shop-menu.repository.d.ts +1 -1
- package/domain/shopping/models/buy-2-win.d.ts +3 -5
- package/domain/shopping/models/checkout.d.ts +7 -9
- package/domain/shopping/models/coupons/coupon.d.ts +13 -15
- package/domain/shopping/models/coupons/enums/coupon-subtypes.enum.d.ts +4 -0
- package/domain/shopping/models/coupons/enums/coupon-types.enum.d.ts +6 -0
- package/domain/shopping/models/coupons/enums/index.d.ts +2 -1
- package/domain/shopping/models/coupons/financial-coupon.d.ts +9 -0
- package/domain/shopping/models/coupons/index.d.ts +1 -2
- package/domain/shopping/models/payment.d.ts +3 -5
- package/domain/shopping/models/shipping-method.d.ts +3 -5
- package/domain/shopping/models/subscription/checkout.d.ts +3 -5
- package/domain/shopping/models/subscription/plan.d.ts +3 -5
- package/domain/shopping/repositories/buy-2-win.repository.d.ts +1 -1
- package/domain/shopping/repositories/checkout.repository.d.ts +1 -1
- package/domain/shopping/repositories/coupon.repository.d.ts +1 -1
- package/domain/shopping/repositories/order.repository.d.ts +1 -1
- package/domain/shopping/repositories/payment.repository.d.ts +1 -1
- package/domain/shopping/repositories/subscription/checkout.repository.d.ts +1 -1
- package/domain/shopping/repositories/subscription/plan.repository.d.ts +1 -1
- package/domain/users/errors/unauthorized.error.d.ts +2 -1
- package/domain/users/errors/user-already-registered.error.d.ts +2 -1
- package/domain/users/errors/weak-password.error.d.ts +2 -1
- package/domain/users/models/beauty-profile.d.ts +4 -5
- package/domain/users/models/lead.d.ts +3 -5
- package/domain/users/models/subscription/edition.d.ts +4 -5
- package/domain/users/models/subscription/payment.d.ts +4 -5
- package/domain/users/models/subscription/subscription.d.ts +3 -5
- package/domain/users/models/user-address.d.ts +3 -3
- package/domain/users/models/user-payment-method.d.ts +4 -4
- package/domain/users/models/user.d.ts +13 -10
- package/domain/users/repositories/beauty-profile.repository.d.ts +1 -1
- package/domain/users/repositories/edition.repository.d.ts +1 -1
- package/domain/users/repositories/lead.repository.d.ts +1 -1
- package/domain/users/repositories/subscription-payment.repository.d.ts +1 -1
- package/domain/users/repositories/subscription.repository.d.ts +1 -1
- package/domain/users/repositories/user-address.repository.d.ts +1 -1
- package/domain/users/repositories/user-payment-method.repository.d.ts +1 -1
- package/domain/users/repositories/user.repository.d.ts +2 -2
- package/errors/duplicated-results.error.d.ts +2 -1
- package/errors/invalid-argument.error.d.ts +2 -1
- package/errors/not-found.error.d.ts +2 -1
- package/errors/required-argument.error.d.ts +2 -1
- package/esm2015/domain/catalog/models/category.js +5 -2
- package/esm2015/domain/catalog/models/index.js +4 -3
- package/esm2015/domain/catalog/models/kit-product.js +18 -0
- package/esm2015/domain/catalog/models/product.js +12 -2
- package/esm2015/domain/catalog/models/types/product-review.type.js +1 -1
- package/esm2015/domain/catalog/models/variant.js +5 -2
- package/esm2015/domain/catalog/repositories/category.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/product.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/subscription-product.repository.js +1 -1
- package/esm2015/domain/catalog/repositories/variant.repository.js +1 -1
- package/esm2015/domain/{general → generic}/index.js +1 -1
- package/esm2015/domain/generic/model/base.model.js +23 -0
- package/esm2015/domain/{general → generic}/model/identifier-fields.js +1 -1
- package/esm2015/domain/generic/model/index.js +4 -0
- package/esm2015/domain/generic/model/types/base-model-builder.type.js +2 -0
- package/esm2015/domain/generic/model/types/identifier-model.type.js +2 -0
- package/esm2015/domain/generic/model/types/index.js +6 -0
- package/esm2015/domain/generic/model/types/model-base-structure.type.js +2 -0
- package/esm2015/domain/generic/model/types/non-function-properties.type.js +2 -0
- package/esm2015/domain/generic/model/types/non-function-property-name.type.js +2 -0
- package/esm2015/domain/generic/repository/create.repository.js +2 -0
- package/esm2015/domain/generic/repository/crud.repository.js +2 -0
- package/esm2015/domain/generic/repository/delete.repository.js +2 -0
- package/esm2015/domain/{general → generic}/repository/enums/index.js +1 -1
- package/esm2015/domain/{general → generic}/repository/enums/update-option-actions.enum.js +1 -1
- package/esm2015/domain/generic/repository/enums/where.enum.js +15 -0
- package/esm2015/domain/generic/repository/find.repository.js +2 -0
- package/esm2015/domain/generic/repository/get.repository.js +2 -0
- package/esm2015/domain/{general → generic}/repository/index.js +1 -1
- package/esm2015/domain/generic/repository/read.repository.js +2 -0
- package/esm2015/domain/generic/repository/types/index.js +7 -0
- package/esm2015/domain/generic/repository/types/repository-find-filters.type.js +2 -0
- package/esm2015/domain/{general → generic}/repository/types/repository-find-result.type.js +1 -1
- package/esm2015/domain/{general → generic}/repository/types/repository-limit-options.type.js +1 -1
- package/esm2015/domain/{general → generic}/repository/types/repository-order-by-list.type.js +1 -1
- package/esm2015/domain/generic/repository/types/repository-update-params.type.js +2 -0
- package/esm2015/domain/generic/repository/types/where-options.type.js +2 -0
- package/esm2015/domain/generic/repository/update.repository.js +2 -0
- package/esm2015/domain/index.js +2 -2
- package/esm2015/domain/location/models/address.js +5 -2
- package/esm2015/domain/shop-settings/models/home.js +3 -3
- package/esm2015/domain/shop-settings/models/shop-menu.js +3 -3
- package/esm2015/domain/shop-settings/repositories/home.repository.js +1 -1
- package/esm2015/domain/shop-settings/repositories/shop-menu.repository.js +1 -1
- package/esm2015/domain/shopping/models/buy-2-win.js +3 -3
- package/esm2015/domain/shopping/models/checkout.js +6 -15
- package/esm2015/domain/shopping/models/coupons/coupon.js +4 -12
- package/esm2015/domain/shopping/models/coupons/enums/coupon-subtypes.enum.js +6 -0
- package/esm2015/domain/shopping/models/coupons/enums/coupon-types.enum.js +8 -0
- package/esm2015/domain/shopping/models/coupons/enums/index.js +3 -2
- package/esm2015/domain/shopping/models/coupons/financial-coupon.js +28 -0
- package/esm2015/domain/shopping/models/coupons/index.js +2 -3
- package/esm2015/domain/shopping/models/payment.js +3 -3
- package/esm2015/domain/shopping/models/shipping-method.js +3 -3
- package/esm2015/domain/shopping/models/subscription/checkout.js +3 -3
- package/esm2015/domain/shopping/models/subscription/plan.js +3 -3
- package/esm2015/domain/shopping/repositories/buy-2-win.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/checkout.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/coupon.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/order.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/payment.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/subscription/checkout.repository.js +1 -1
- package/esm2015/domain/shopping/repositories/subscription/plan.repository.js +1 -1
- package/esm2015/domain/users/errors/unauthorized.error.js +3 -2
- package/esm2015/domain/users/errors/user-already-registered.error.js +3 -2
- package/esm2015/domain/users/errors/weak-password.error.js +3 -2
- package/esm2015/domain/users/models/beauty-profile.js +4 -4
- package/esm2015/domain/users/models/lead.js +3 -3
- package/esm2015/domain/users/models/subscription/edition.js +4 -4
- package/esm2015/domain/users/models/subscription/payment.js +4 -4
- package/esm2015/domain/users/models/subscription/subscription.js +3 -3
- package/esm2015/domain/users/models/user-address.js +3 -3
- package/esm2015/domain/users/models/user-payment-method.js +4 -4
- package/esm2015/domain/users/models/user.js +5 -5
- package/esm2015/domain/users/repositories/beauty-profile.repository.js +1 -1
- package/esm2015/domain/users/repositories/edition.repository.js +1 -1
- package/esm2015/domain/users/repositories/lead.repository.js +1 -1
- package/esm2015/domain/users/repositories/subscription-payment.repository.js +1 -1
- package/esm2015/domain/users/repositories/subscription.repository.js +1 -1
- package/esm2015/domain/users/repositories/user-address.repository.js +1 -1
- package/esm2015/domain/users/repositories/user-payment-method.repository.js +1 -1
- package/esm2015/domain/users/repositories/user.repository.js +1 -1
- package/esm2015/errors/duplicated-results.error.js +3 -2
- package/esm2015/errors/invalid-argument.error.js +3 -2
- package/esm2015/errors/not-found.error.js +3 -2
- package/esm2015/errors/required-argument.error.js +3 -2
- package/esm2015/infra/elasticsearch/adapters/axios.adapter.js +36 -1
- package/esm2015/infra/elasticsearch/adapters/elastic-search.adapter.js +1 -1
- package/esm2015/infra/elasticsearch/indexes/products-index.js +35 -1
- package/esm2015/infra/firebase/auth/authentication-firebase-auth.service.js +2 -2
- package/esm2015/infra/firebase/auth/register-firebase-auth.service.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +2 -2
- package/esm2015/infra/firebase/firestore/mixins/with-crud-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +9 -10
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +2 -6
- package/esm2015/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-helpers.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +4 -4
- package/esm2015/infra/firebase/firestore/models/user-search.js +3 -3
- package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +4 -2
- package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +37 -8
- package/esm2015/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +11 -21
- package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +2 -2
- package/esm2015/infra/firebase/firestore/types/firestore-sub.repository.type.js +1 -1
- package/esm2015/infra/firebase/firestore/types/firestore.helpers.type.js +1 -1
- package/esm2015/infra/firebase/firestore/types/firestore.repository.type.js +1 -1
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.js +13 -0
- package/esm2015/infra/hasura-graphql/enums/hasura-graphql-where.enum.js +15 -0
- package/esm2015/infra/hasura-graphql/enums/index.js +3 -0
- package/esm2015/infra/hasura-graphql/index.js +5 -0
- package/esm2015/infra/hasura-graphql/mixins/helpers/attribute-option.helper.js +31 -0
- package/esm2015/infra/hasura-graphql/mixins/helpers/filter-option.helper.js +18 -0
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +72 -0
- package/esm2015/infra/hasura-graphql/mixins/helpers/index.js +4 -0
- package/esm2015/infra/hasura-graphql/mixins/index.js +8 -0
- package/esm2015/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.js +45 -0
- package/esm2015/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.js +10 -0
- package/esm2015/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.js +29 -0
- package/esm2015/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.js +93 -0
- package/esm2015/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.js +35 -0
- package/esm2015/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.js +94 -0
- package/esm2015/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.js +56 -0
- package/esm2015/infra/hasura-graphql/models/category-hasura-graphql.js +4 -0
- package/esm2015/infra/hasura-graphql/models/index.js +5 -0
- package/esm2015/infra/hasura-graphql/models/kit-product-hasura-graphql.js +15 -0
- package/esm2015/infra/hasura-graphql/models/product-hasura-graphql.js +11 -0
- package/esm2015/infra/hasura-graphql/models/variant-hasura-graphql.js +9 -0
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +136 -0
- package/esm2015/infra/hasura-graphql/repositories/catalog/index.js +4 -0
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +375 -0
- package/esm2015/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.js +107 -0
- package/esm2015/infra/hasura-graphql/repositories/index.js +2 -0
- package/esm2015/infra/hasura-graphql/types/fields.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/graphql.repository.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-auth-options.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-fields.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-headers.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/index.js +9 -0
- package/esm2015/infra/hasura-graphql/types/nested-field.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/query-builder-options.type.js +2 -0
- package/esm2015/infra/hasura-graphql/types/variable-options.type.js +2 -0
- package/esm2015/infra/index.js +2 -1
- package/esm2015/utils/index.js +6 -4
- package/esm2015/utils/is-uuid.js +3 -0
- package/esm2015/utils/mixins/index.js +2 -1
- package/esm2015/utils/mixins/merge-constructor-params.type.js +2 -0
- package/esm2015/utils/mixins/mixin-ctor.type.js +1 -1
- package/esm2015/utils/parse-datetime.js +14 -0
- package/esm2015/utils/types/array-element.type.js +2 -0
- package/esm2015/utils/types/index.js +2 -1
- package/fesm2015/infrab4a-connect.js +1375 -142
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +3 -0
- package/infra/elasticsearch/adapters/elastic-search.adapter.d.ts +3 -0
- package/infra/elasticsearch/indexes/products-index.d.ts +5 -1
- package/infra/firebase/auth/authentication-firebase-auth.service.d.ts +1 -1
- package/infra/firebase/auth/register-firebase-auth.service.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +3 -16
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +3 -28
- package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +3 -14
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +3 -19
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +3 -14
- package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +3 -14
- package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +5 -4
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +7 -14
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +6 -15
- package/infra/firebase/firestore/models/user-search.d.ts +3 -3
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +5 -44
- package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +4 -51
- package/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +1 -42
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +7 -3
- package/infra/hasura-graphql/enums/hasura-graphql-column-type.enum.d.ts +11 -0
- package/infra/hasura-graphql/enums/hasura-graphql-where.enum.d.ts +13 -0
- package/infra/hasura-graphql/enums/index.d.ts +2 -0
- package/infra/hasura-graphql/index.d.ts +4 -0
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +13 -0
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +6 -0
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +8 -0
- package/infra/hasura-graphql/mixins/helpers/index.d.ts +3 -0
- package/infra/hasura-graphql/mixins/index.d.ts +7 -0
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +8 -0
- package/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.d.ts +11 -0
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +7 -0
- package/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +31 -0
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +24 -0
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +11 -0
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +14 -0
- package/infra/hasura-graphql/models/category-hasura-graphql.d.ts +6 -0
- package/infra/hasura-graphql/models/index.d.ts +4 -0
- package/infra/hasura-graphql/models/kit-product-hasura-graphql.d.ts +6 -0
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +9 -0
- package/infra/hasura-graphql/models/variant-hasura-graphql.d.ts +9 -0
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +22 -0
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +3 -0
- package/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.d.ts +26 -0
- package/infra/hasura-graphql/repositories/catalog/variant-hasura-graphql.repository.d.ts +13 -0
- package/infra/hasura-graphql/repositories/index.d.ts +1 -0
- package/infra/hasura-graphql/types/fields.type.d.ts +2 -0
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +21 -0
- package/infra/hasura-graphql/types/hasura-graphql-auth-options.type.d.ts +8 -0
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +36 -0
- package/infra/hasura-graphql/types/hasura-graphql-headers.type.d.ts +7 -0
- package/infra/hasura-graphql/types/index.d.ts +8 -0
- package/infra/hasura-graphql/types/nested-field.type.d.ts +7 -0
- package/infra/hasura-graphql/types/query-builder-options.type.d.ts +7 -0
- package/infra/hasura-graphql/types/variable-options.type.d.ts +9 -0
- package/infra/index.d.ts +1 -0
- package/package.json +5 -3
- package/utils/index.d.ts +5 -4
- package/utils/is-uuid.d.ts +1 -0
- package/utils/mixins/index.d.ts +1 -0
- package/utils/mixins/merge-constructor-params.type.d.ts +3 -0
- package/utils/mixins/mixin-ctor.type.d.ts +1 -1
- package/utils/parse-datetime.d.ts +1 -0
- package/utils/types/array-element.type.d.ts +1 -0
- package/utils/types/index.d.ts +1 -0
- package/domain/general/model/base-model-with-identifier-fields.d.ts +0 -3
- package/domain/general/model/base.model.d.ts +0 -6
- package/domain/general/model/types/base-model-builder.type.d.ts +0 -5
- package/domain/general/model/types/non-function-properties.type.d.ts +0 -2
- package/domain/general/model/types/non-function-property-name.type.d.ts +0 -3
- package/domain/general/repository/create.repository.d.ts +0 -5
- package/domain/general/repository/crud.repository.d.ts +0 -7
- package/domain/general/repository/delete.repository.d.ts +0 -5
- package/domain/general/repository/find.repository.d.ts +0 -5
- package/domain/general/repository/get.repository.d.ts +0 -5
- package/domain/general/repository/read.repository.d.ts +0 -5
- package/domain/general/repository/types/repository-find-filters.type.d.ts +0 -14
- package/domain/general/repository/update.repository.d.ts +0 -5
- package/domain/shopping/models/coupons/club-coupon.d.ts +0 -7
- package/domain/shopping/models/coupons/enums/discount-type.enum.d.ts +0 -5
- package/domain/shopping/models/coupons/store-coupon.d.ts +0 -8
- package/esm2015/domain/general/model/base-model-with-identifier-fields.js +0 -2
- package/esm2015/domain/general/model/base.model.js +0 -13
- package/esm2015/domain/general/model/index.js +0 -5
- package/esm2015/domain/general/model/types/base-model-builder.type.js +0 -2
- package/esm2015/domain/general/model/types/index.js +0 -4
- package/esm2015/domain/general/model/types/non-function-properties.type.js +0 -2
- package/esm2015/domain/general/model/types/non-function-property-name.type.js +0 -2
- package/esm2015/domain/general/repository/create.repository.js +0 -2
- package/esm2015/domain/general/repository/crud.repository.js +0 -2
- package/esm2015/domain/general/repository/delete.repository.js +0 -2
- package/esm2015/domain/general/repository/enums/where.enum.js +0 -12
- package/esm2015/domain/general/repository/find.repository.js +0 -2
- package/esm2015/domain/general/repository/get.repository.js +0 -2
- package/esm2015/domain/general/repository/read.repository.js +0 -2
- package/esm2015/domain/general/repository/types/index.js +0 -6
- package/esm2015/domain/general/repository/types/repository-find-filters.type.js +0 -2
- package/esm2015/domain/general/repository/types/repository-update-params.type.js +0 -2
- package/esm2015/domain/general/repository/update.repository.js +0 -2
- package/esm2015/domain/shopping/models/coupons/club-coupon.js +0 -18
- package/esm2015/domain/shopping/models/coupons/enums/discount-type.enum.js +0 -7
- package/esm2015/domain/shopping/models/coupons/store-coupon.js +0 -23
- /package/domain/{general → generic}/index.d.ts +0 -0
- /package/domain/{general → generic}/model/identifier-fields.d.ts +0 -0
- /package/domain/{general → generic}/repository/enums/index.d.ts +0 -0
- /package/domain/{general → generic}/repository/enums/update-option-actions.enum.d.ts +0 -0
- /package/domain/{general → generic}/repository/index.d.ts +0 -0
- /package/domain/{general → generic}/repository/types/repository-find-result.type.d.ts +0 -0
- /package/domain/{general → generic}/repository/types/repository-limit-options.type.d.ts +0 -0
- /package/domain/{general → generic}/repository/types/repository-order-by-list.type.d.ts +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
2
|
-
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
4
|
-
export declare class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
+
export declare class ShippingMethod extends BaseModel<ShippingMethod> {
|
|
5
3
|
id: string;
|
|
6
4
|
CNPJ: string;
|
|
7
5
|
DaysToDelivery: number;
|
|
@@ -14,5 +12,5 @@ export declare class ShippingMethod extends BaseModel<ShippingMethod> implements
|
|
|
14
12
|
State: string;
|
|
15
13
|
ZipEnd: number;
|
|
16
14
|
ZipStart: number;
|
|
17
|
-
|
|
15
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
18
16
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Address } from '../../../location/models/address';
|
|
2
|
-
import { BaseModel } from '../../../
|
|
2
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
3
3
|
import { Coupon } from '../coupons/coupon';
|
|
4
|
-
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
5
|
-
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
6
4
|
import { User } from '../../../users/models/user';
|
|
7
5
|
import { SubscriptionPlan } from './plan';
|
|
8
|
-
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription>
|
|
6
|
+
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription> {
|
|
9
7
|
id?: string;
|
|
10
8
|
user: User;
|
|
11
9
|
createdAt: Date;
|
|
@@ -19,5 +17,5 @@ export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription
|
|
|
19
17
|
billingAddress?: Address;
|
|
20
18
|
subscriptionPlan: SubscriptionPlan;
|
|
21
19
|
coupon?: Coupon;
|
|
22
|
-
|
|
20
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
23
21
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { BaseModel } from '../../../
|
|
2
|
-
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
4
|
-
export declare class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
|
+
export declare class SubscriptionPlan extends BaseModel<SubscriptionPlan> {
|
|
5
3
|
id: string;
|
|
6
4
|
name: string;
|
|
7
5
|
billingPrice: number;
|
|
8
6
|
recurrencePrice: number;
|
|
9
7
|
recurrenceCycle: number;
|
|
10
8
|
maxAttempts: number;
|
|
11
|
-
|
|
9
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
12
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Buy2Win } from '../models/buy-2-win';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
3
|
export interface Buy2WinRepository extends CrudRepository<Buy2Win> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Checkout } from '../models/checkout';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
3
|
export interface CheckoutRepository extends CrudRepository<Checkout> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Coupon } from '../models/coupons/coupon';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
3
|
export interface CouponRepository extends CrudRepository<Coupon> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { Payment } from '../models/payment';
|
|
3
3
|
export interface PaymentRepository extends CrudRepository<Payment> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CheckoutSubscription } from '../../models/subscription/checkout';
|
|
2
|
-
import { CrudRepository } from '../../../
|
|
2
|
+
import { CrudRepository } from '../../../generic/repository/crud.repository';
|
|
3
3
|
export interface CheckoutSubscriptionRepository extends CrudRepository<CheckoutSubscription> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SubscriptionPlan } from '../../models/subscription/plan';
|
|
2
|
-
import { CrudRepository } from '../../../
|
|
2
|
+
import { CrudRepository } from '../../../generic/repository/crud.repository';
|
|
3
3
|
export interface SubscriptionPlanRepository extends CrudRepository<SubscriptionPlan> {
|
|
4
4
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
2
|
-
import { IdentifierFields } from '../../general/model/identifier-fields';
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type';
|
|
1
|
+
import { BaseModel } from '../../generic/model/base.model';
|
|
4
2
|
import { BeardSizes, HairTypes } from './enums';
|
|
5
|
-
export declare
|
|
3
|
+
export declare type BeautyProfileIdentifiers = 'id' | 'userId';
|
|
4
|
+
export declare class BeautyProfile extends BaseModel<BeautyProfile, BeautyProfileIdentifiers> {
|
|
6
5
|
id: string;
|
|
7
6
|
userId: string;
|
|
8
7
|
beardSize?: BeardSizes;
|
|
9
8
|
hairType?: HairTypes;
|
|
10
9
|
toPlain(): any;
|
|
11
|
-
|
|
10
|
+
static get identifiersFields(): BeautyProfileIdentifiers[];
|
|
12
11
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
2
|
-
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../general/model/types';
|
|
4
|
-
export declare class Lead extends BaseModel<Lead> implements IdentifierFields<Lead> {
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
+
export declare class Lead extends BaseModel<Lead> {
|
|
5
3
|
id: string;
|
|
6
4
|
acceptsNewsletter: boolean;
|
|
7
5
|
email: string;
|
|
8
|
-
|
|
6
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
9
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { BaseModel } from '../../../
|
|
2
|
-
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type';
|
|
1
|
+
import { BaseModel } from '../../../generic/model/base.model';
|
|
4
2
|
import { EditionStatus, BillingStatus } from './enums';
|
|
5
|
-
export declare
|
|
3
|
+
export declare type EditionIdentifiers = 'id' | 'subscriptionId';
|
|
4
|
+
export declare class Edition extends BaseModel<Edition, EditionIdentifiers> {
|
|
6
5
|
id: string;
|
|
7
6
|
subscriptionId: string;
|
|
8
7
|
billingStatus: BillingStatus;
|
|
@@ -13,5 +12,5 @@ export declare class Edition extends BaseModel<Edition> implements IdentifierFie
|
|
|
13
12
|
draftId?: string;
|
|
14
13
|
createdAt: Date;
|
|
15
14
|
updatedAt: Date;
|
|
16
|
-
|
|
15
|
+
static get identifiersFields(): EditionIdentifiers[];
|
|
17
16
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { BaseModel } from '../../../
|
|
2
|
-
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
3
|
-
import { NonFunctionPropertyNames } from '../../../general/model/types';
|
|
1
|
+
import { BaseModel } from '../../../generic/model/base.model';
|
|
4
2
|
import { Payment } from '../../../shopping/models/payment';
|
|
5
3
|
import { PaymentType } from './enums/payment-type.enum';
|
|
6
|
-
export declare
|
|
4
|
+
export declare type SubscriptionPaymentIdentifiers = 'id' | 'subscriptionId';
|
|
5
|
+
export declare class SubscriptionPayment extends BaseModel<SubscriptionPayment, SubscriptionPaymentIdentifiers> {
|
|
7
6
|
id: string;
|
|
8
7
|
subscriptionId: string;
|
|
9
8
|
paymentType: PaymentType;
|
|
10
9
|
createdAt: Date;
|
|
11
10
|
attempts?: number;
|
|
12
11
|
payment: Payment;
|
|
13
|
-
|
|
12
|
+
static get identifiersFields(): SubscriptionPaymentIdentifiers[];
|
|
14
13
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Address } from '../../../location/models/address';
|
|
2
|
-
import { BaseModel } from '../../../
|
|
2
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
3
3
|
import { Coupon } from '../../../shopping/models/coupons/coupon';
|
|
4
|
-
import { IdentifierFields } from '../../../general/model/identifier-fields';
|
|
5
|
-
import { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type';
|
|
6
4
|
import { SubscriptionPlan } from '../../../shopping/models/subscription/plan';
|
|
7
5
|
import { User } from '../user';
|
|
8
6
|
import { Edition } from './edition';
|
|
9
7
|
import { Status } from './enums/status.enum';
|
|
10
8
|
import { SubscriptionPayment } from './payment';
|
|
11
|
-
export declare class Subscription extends BaseModel<Subscription>
|
|
9
|
+
export declare class Subscription extends BaseModel<Subscription> {
|
|
12
10
|
id: string;
|
|
13
11
|
nextPayment: Date;
|
|
14
12
|
recurrence: boolean;
|
|
@@ -26,5 +24,5 @@ export declare class Subscription extends BaseModel<Subscription> implements Ide
|
|
|
26
24
|
coupon?: Coupon;
|
|
27
25
|
editions: Edition[];
|
|
28
26
|
payment?: SubscriptionPayment[];
|
|
29
|
-
|
|
27
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
30
28
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address } from '../../location/models/address';
|
|
2
|
-
|
|
3
|
-
export declare class UserAddress extends Address {
|
|
2
|
+
export declare type UserAddressIdentifiers = 'id' | 'userId';
|
|
3
|
+
export declare class UserAddress extends Address<UserAddressIdentifiers> {
|
|
4
4
|
id: string;
|
|
5
5
|
userId: string;
|
|
6
|
-
|
|
6
|
+
static get identifiersFields(): UserAddressIdentifiers[];
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
2
|
-
|
|
3
|
-
export declare class UserPaymentMethod extends BaseModel<UserPaymentMethod> {
|
|
1
|
+
import { BaseModel } from '../../generic/model/base.model';
|
|
2
|
+
export declare type UserPaymentIdentifiers = 'id' | 'userId';
|
|
3
|
+
export declare class UserPaymentMethod extends BaseModel<UserPaymentMethod, UserPaymentIdentifiers> {
|
|
4
4
|
brand: string;
|
|
5
5
|
cpf: string;
|
|
6
6
|
holderName: string;
|
|
@@ -10,5 +10,5 @@ export declare class UserPaymentMethod extends BaseModel<UserPaymentMethod> {
|
|
|
10
10
|
userId: string;
|
|
11
11
|
id: string;
|
|
12
12
|
fingerprint: string;
|
|
13
|
-
|
|
13
|
+
static get identifiersFields(): UserPaymentIdentifiers[];
|
|
14
14
|
}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
2
|
-
import {
|
|
3
|
-
import { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types';
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
+
import { NonFunctionProperties, ModelBaseStructure } from '../../generic/model/types';
|
|
4
3
|
import { Area, OfficePosition, UserType } from './enums';
|
|
5
4
|
import { BeautyProfile } from './beauty-profile';
|
|
6
|
-
export declare class User extends BaseModel<User>
|
|
5
|
+
export declare class User extends BaseModel<User> {
|
|
7
6
|
id: string;
|
|
8
7
|
cpf?: string;
|
|
9
8
|
email: string;
|
|
10
|
-
firstName
|
|
11
|
-
lastName
|
|
9
|
+
firstName?: string;
|
|
10
|
+
lastName?: string;
|
|
12
11
|
displayName?: string;
|
|
13
|
-
phone
|
|
12
|
+
phone?: string;
|
|
14
13
|
birthday?: Date;
|
|
15
|
-
acceptsNewsletter
|
|
14
|
+
acceptsNewsletter?: boolean;
|
|
16
15
|
type?: UserType;
|
|
17
16
|
area?: Area;
|
|
18
17
|
officePosition?: OfficePosition;
|
|
19
18
|
isSubscriber?: boolean;
|
|
20
19
|
subscriptionPlan?: string;
|
|
20
|
+
badgeId?: number;
|
|
21
|
+
badgeMultiplier?: number;
|
|
22
|
+
dateCreated?: Date;
|
|
23
|
+
dateModified?: Date;
|
|
21
24
|
beautyProfile?: BeautyProfile;
|
|
22
|
-
static toInstance<T
|
|
23
|
-
identifierFields(): NonFunctionPropertyNames<User>[];
|
|
25
|
+
static toInstance<T extends ModelBaseStructure<User>>(this: new () => T, data?: Partial<NonFunctionProperties<User>>): T;
|
|
24
26
|
toPlain(): any;
|
|
27
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
25
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { BeautyProfile } from '../models/beauty-profile';
|
|
3
3
|
export interface BeautyProfileRepository extends CrudRepository<BeautyProfile> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { Edition } from '../models/subscription/edition';
|
|
3
3
|
export interface EditionRepository extends CrudRepository<Edition> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { SubscriptionPayment } from '../models/subscription/payment';
|
|
3
3
|
export interface SubscriptionPaymentRepository extends CrudRepository<SubscriptionPayment> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { Subscription } from '../models/subscription/subscription';
|
|
3
3
|
export interface SubscriptionRepository extends CrudRepository<Subscription> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
2
|
import { UserAddress } from '../models/user-address';
|
|
3
3
|
export interface UserAddressRepository extends CrudRepository<UserAddress> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UserPaymentMethod } from '../models/user-payment-method';
|
|
2
|
-
import { CrudRepository } from '../../
|
|
2
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
3
3
|
export interface UserPaymentMethodRepository extends CrudRepository<UserPaymentMethod> {
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CrudRepository } from '../../
|
|
2
|
-
import { NonFunctionPropertyNames } from '../../
|
|
1
|
+
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
+
import { NonFunctionPropertyNames } from '../../generic';
|
|
3
3
|
import { User } from '../models/user';
|
|
4
4
|
export interface UserRepository extends CrudRepository<User> {
|
|
5
5
|
checkIfExistsByField(field: Extract<NonFunctionPropertyNames<User>, 'cpf' | 'email'>, value: string): Promise<boolean>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
2
|
export class Category extends BaseModel {
|
|
3
3
|
identifierFields() {
|
|
4
4
|
return ['id'];
|
|
5
5
|
}
|
|
6
|
+
static get identifiersFields() {
|
|
7
|
+
return ['id'];
|
|
8
|
+
}
|
|
6
9
|
}
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9tb2RlbHMvY2F0ZWdvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBK0MsTUFBTSxxQkFBcUIsQ0FBQTtBQUs1RixNQUFNLE9BQU8sUUFBUyxTQUFRLFNB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1bmN0aW9uUHJvcGVydHlOYW1lczxDYXRlZ29yeT5bXSB7XG4gICAgcmV0dXJuIFsnaWQnXVxuICB9XG5cbiAgc3RhdGljIGdldCBpZGVudGlmaWVyc0ZpZWxkcygpOiBHZW5lcmljSWRlbnRpZmllcltdIHtcbiAgICByZXR1cm4gWydpZCddXG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from './enums';
|
|
2
|
-
export * from './types';
|
|
3
1
|
export * from './category';
|
|
2
|
+
export * from './enums';
|
|
3
|
+
export * from './kit-product';
|
|
4
4
|
export * from './product';
|
|
5
|
+
export * from './types';
|
|
5
6
|
export * from './variant';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9tb2RlbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxlQUFlLENBQUE7QUFDN0IsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxXQUFXLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NhdGVnb3J5J1xuZXhwb3J0ICogZnJvbSAnLi9lbnVtcydcbmV4cG9ydCAqIGZyb20gJy4va2l0LXByb2R1Y3QnXG5leHBvcnQgKiBmcm9tICcuL3Byb2R1Y3QnXG5leHBvcnQgKiBmcm9tICcuL3R5cGVzJ1xuZXhwb3J0ICogZnJvbSAnLi92YXJpYW50J1xuIl19
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Type } from 'class-transformer';
|
|
3
|
+
import { BaseModel } from '../../generic/model';
|
|
4
|
+
import { Product } from './product';
|
|
5
|
+
export class KitProduct extends BaseModel {
|
|
6
|
+
static get identifiersFields() {
|
|
7
|
+
return ['productId', 'kitProducId'];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
__decorate([
|
|
11
|
+
Type(() => Product),
|
|
12
|
+
__metadata("design:type", Product)
|
|
13
|
+
], KitProduct.prototype, "kit", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
Type(() => Product),
|
|
16
|
+
__metadata("design:type", Product)
|
|
17
|
+
], KitProduct.prototype, "product", void 0);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2l0LXByb2R1Y3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9tb2RlbHMva2l0LXByb2R1Y3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUV4QyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUE7QUFFL0MsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUluQyxNQUFNLE9BQU8sVUFBVyxTQUFRLFNBQTRDO0lBVzFFLE1BQU0sS0FBSyxpQkFBaUI7UUFDMUIsT0FBTyxDQUFDLFdBQVcsRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUNyQyxDQUFDO0NBQ0Y7QUFSQztJQURDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUM7OEJBQ2YsT0FBTzt1Q0FBQTtBQUdaO0lBREMsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDLE9BQU8sQ0FBQzs4QkFDWCxPQUFPOzJDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ2NsYXNzLXRyYW5zZm9ybWVyJ1xuXG5pbXBvcnQgeyBCYXNlTW9kZWwgfSBmcm9tICcuLi8uLi9nZW5lcmljL21vZGVsJ1xuXG5pbXBvcnQgeyBQcm9kdWN0IH0gZnJvbSAnLi9wcm9kdWN0J1xuXG50eXBlIEtpdFByb2R1Y3RJZGVudGlmaWVycyA9ICdwcm9kdWN0SWQnIHwgJ2tpdFByb2R1Y0lkJ1xuXG5leHBvcnQgY2xhc3MgS2l0UHJvZHVjdCBleHRlbmRzIEJhc2VNb2RlbDxLaXRQcm9kdWN0LCBLaXRQcm9kdWN0SWRlbnRpZmllcnM+IHtcbiAgcHJvZHVjdElkOiBzdHJpbmdcbiAga2l0UHJvZHVjdElkOiBzdHJpbmdcbiAgcXVhbnRpdHk6IG51bWJlclxuXG4gIEBUeXBlKCgpID0+IFByb2R1Y3QpXG4gIGtpdDogUHJvZHVjdFxuXG4gIEBUeXBlKCgpID0+IFByb2R1Y3QpXG4gIHByb2R1Y3Q6IFByb2R1Y3RcblxuICBzdGF0aWMgZ2V0IGlkZW50aWZpZXJzRmllbGRzKCk6IEtpdFByb2R1Y3RJZGVudGlmaWVyc1tdIHtcbiAgICByZXR1cm4gWydwcm9kdWN0SWQnLCAna2l0UHJvZHVjSWQnXVxuICB9XG59XG4iXX0=
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Type } from 'class-transformer';
|
|
3
|
+
import { BaseModel } from '../../generic/model';
|
|
4
|
+
import { KitProduct } from './kit-product';
|
|
2
5
|
export class Product extends BaseModel {
|
|
3
6
|
identifierFields() {
|
|
4
7
|
return ['id'];
|
|
@@ -7,5 +10,12 @@ export class Product extends BaseModel {
|
|
|
7
10
|
var _a, _b, _c, _d, _e, _f;
|
|
8
11
|
return Object.assign(Object.assign(Object.assign({}, (((_b = (_a = this.description) === null || _a === void 0 ? void 0 : _a[shop]) === null || _b === void 0 ? void 0 : _b.description) ? { description: (_d = (_c = this.description) === null || _c === void 0 ? void 0 : _c[shop]) === null || _d === void 0 ? void 0 : _d.description } : {})), (((_e = this.price) === null || _e === void 0 ? void 0 : _e[shop]) || {})), (((_f = this.stock) === null || _f === void 0 ? void 0 : _f[shop]) || {}));
|
|
9
12
|
}
|
|
13
|
+
static get identifiersFields() {
|
|
14
|
+
return ['id'];
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
|
-
|
|
17
|
+
__decorate([
|
|
18
|
+
Type(() => KitProduct),
|
|
19
|
+
__metadata("design:type", Array)
|
|
20
|
+
], Product.prototype, "kitProducts", void 0);
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL21vZGVscy9wcm9kdWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDeEMsT0FBTyxFQUFFLFNBQVMsRUFBK0MsTUFBTSxxQkFBcUIsQ0FBQTtBQUc1RixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBSTFDLE1BQU0sT0FBTyxPQUFRLFNBQVEsU0FBa0I7SUFrQzdDLGdCQUFnQjtRQUNkLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUNmLENBQUM7SUFFRCxhQUFhLENBQUMsSUFBVzs7UUFDdkIscURBQ0ssQ0FBQyxDQU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1cm4gWydpZCddXG4gIH1cblxuICBnZXRJbmZvQnlTaG9wKHNob3A6IFNob3BzKTogU2hvcERlc2NyaXB0aW9uICYgU2hvcFByaWNlICYgU3RvY2sge1xuICAgIHJldHVybiB7XG4gICAgICAuLi4odGhpcy5kZXNjcmlwdGlvbj8uW3Nob3BdPy5kZXNjcmlwdGlvbiA/IHsgZGVzY3JpcHRpb246IHRoaXMuZGVzY3JpcHRpb24/LltzaG9wXT8uZGVzY3JpcHRpb24gfSA6IHt9KSxcbiAgICAgIC4uLih0aGlzLnByaWNlPy5bc2hvcF0gfHwge30pLFxuICAgICAgLi4uKHRoaXMuc3RvY2s/LltzaG9wXSB8fCB7fSksXG4gICAgfVxuICB9XG5cbiAgc3RhdGljIGdldCBpZGVudGlmaWVyc0ZpZWxkcygpOiBHZW5lcmljSWRlbnRpZmllcltdIHtcbiAgICByZXR1cm4gWydpZCddXG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1yZXZpZXcudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL21vZGVscy90eXBlcy9wcm9kdWN0LXJldmlldy50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBTaG9wcyB9IGZyb20gJy4uL2VudW1zL3Nob3BzLmVudW0nXG5cbmV4cG9ydCB0eXBlIFByb2R1Y3RSZXZpZXcgPSB7XG4gIGlkPzogc3RyaW5nXG4gIHNob3A6IFNob3BzXG4gIHJhdGU6IG51bWJlclxuICBhdXRob3I/OiBzdHJpbmdcbiAgZW1haWw/OiBzdHJpbmdcbiAgbG9jYXRpb24/OiBzdHJpbmdcbiAgcmV2aWV3Pzogc3RyaW5nXG4gIHN0YXR1cz86IGJvb2xlYW5cbiAgdGl0bGU/OiBzdHJpbmdcbiAgcGVyc29uSWQ/OiBudW1iZXJcbiAgcG9pbnRzPzogbnVtYmVyXG4gIG9yZGVySWQ/OiBzdHJpbmdcbiAgY3JlYXRlZEF0PzogRGF0ZVxuICB1cGRhdGVkQXQ/OiBEYXRlXG59XG4iXX0=
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { BaseModel } from '../../
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
2
|
export class Variant extends BaseModel {
|
|
3
3
|
identifierFields() {
|
|
4
4
|
return ['id'];
|
|
5
5
|
}
|
|
6
|
+
static get identifiersFields() {
|
|
7
|
+
return ['id', 'productId'];
|
|
8
|
+
}
|
|
6
9
|
}
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL21vZGVscy92YXJpYW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQTRCLE1BQU0scUJBQXFCLENBQUE7QUFNekUsTUFBTSxPQUFPLE9BQVEsU0FBUSxTQUE2QztJQWF4RSxnQkFBZ0I7UUFDZCxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDZixDQUFDO0lBRUQsTUFBTSxLQUFLLGlCQUFpQjtRQUMxQixPQUFPLENBQUMsSUFBSSxFQUFFLFdBQVcsQ0FBQyxDQUFBO0lBQzVCLENBQUM7Q0FDRiIsInNv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 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaXB0aW9uLXByb2R1Y3QucmVwb3NpdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL3JlcG9zaXRvcmllcy9zdWJzY3JpcHRpb24tcHJvZHVjdC5yZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDcnVkUmVwb3NpdG9yeSB9IGZyb20gJy4uLy4uL2dlbmVyaWMvcmVwb3NpdG9yeS9jcnVkLnJlcG9zaXRvcnknXG5pbXBvcnQgeyBQcm9kdWN0IH0gZnJvbSAnLi4vbW9kZWxzJ1xuXG5leHBvcnQgaW50ZXJmYWNlIFN1YnNjcmlwdGlvblByb2R1Y3RSZXBvc2l0b3J5IGV4dGVuZHMgQ3J1ZFJlcG9zaXRvcnk8UHJvZHVjdD4ge31cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFudC5yZXBvc2l0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvZG9tYWluL2NhdGFsb2cvcmVwb3NpdG9yaWVzL3ZhcmlhbnQucmVwb3NpdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ3J1ZFJlcG9zaXRvcnkgfSBmcm9tICcuLi8uLi9nZW5lcmljL3JlcG9zaXRvcnkvY3J1ZC5yZXBvc2l0b3J5J1xuaW1wb3J0IHsgVmFyaWFudCB9IGZyb20gJy4uL21vZGVscy92YXJpYW50J1xuXG5leHBvcnQgaW50ZXJmYWNlIFZhcmlhbnRSZXBvc2l0b3J5IGV4dGVuZHMgQ3J1ZFJlcG9zaXRvcnk8VmFyaWFudD4ge31cbiJdfQ==
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './model';
|
|
2
2
|
export * from './repository';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vZ2VuZXJpYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFNBQVMsQ0FBQTtBQUN2QixjQUFjLGNBQWMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbW9kZWwnXG5leHBvcnQgKiBmcm9tICcuL3JlcG9zaXRvcnknXG4iXX0=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { instanceToPlain, plainToInstance } from 'class-transformer';
|
|
2
|
+
export class BaseModel {
|
|
3
|
+
get identifier() {
|
|
4
|
+
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
5
|
+
return fields.reduce((object, field) => (Object.assign(Object.assign({}, object), { [field]: this[field] })), {});
|
|
6
|
+
}
|
|
7
|
+
get identifiersFields() {
|
|
8
|
+
return this.constructor.identifiersFields;
|
|
9
|
+
}
|
|
10
|
+
constructor(args) {
|
|
11
|
+
Object.assign(this, args);
|
|
12
|
+
}
|
|
13
|
+
static toInstance(data) {
|
|
14
|
+
return plainToInstance(this, data || {});
|
|
15
|
+
}
|
|
16
|
+
static isModel(value) {
|
|
17
|
+
return value instanceof this;
|
|
18
|
+
}
|
|
19
|
+
toPlain() {
|
|
20
|
+
return instanceToPlain(this);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9nZW5lcmljL21vZGVsL2Jhc2UubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxlQUFlLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQVdwRSxNQUFNLE9BQU8sU0FBUztJQUNwQixJQUFJLFVBQVU7UUFDWixNQUFNLE1BQU0sR0FBSSxJQUFJLENBQUMsV0FBdUMsQ0FBQyxpQkFBaUIsQ0FBQyxNQUFNLENBQ25GLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxLQUFLLEtBQUssWUFBWSxDQUNsQyxDQUFBO1FBRUQsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUNsQixDQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLGlDQUFNLE1BQU0sS0FBRSxDQUFDLEtBQUssQ0FBQyxFQUFFLElBQUksQ0FBQyxLQUFlLENBQUMsSUFBRyxFQUNsRSxFQUErQyxDQUNoRCxDQUFBO0lBQ0gsQ0FBQztJQUVELElBQUksaUJBQWlCO1FBQ25CLE9BQVEsSUFBSSxDQUFDLFdBQW9ELENBQUMsaUJBQWlCLENBQUE7SUFDckYsQ0FBQztJQUVELFlBQVksSUFBcUI7UUFDL0IsTUFBTSxDQUFDLE1BQU0sQ0FB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cbiAgfVxufVxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllci1maWVsZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vZ2VuZXJpYy9tb2RlbC9pZGVudGlmaWVyLWZpZWxkcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTm9uRnVuY3Rpb25Qcm9wZXJ0eU5hbWVzIH0gZnJvbSAnLi90eXBlcy9ub24tZnVuY3Rpb24tcHJvcGVydHktbmFtZS50eXBlJ1xuXG5leHBvcnQgaW50ZXJmYWNlIElkZW50aWZpZXJGaWVsZHM8TW9kZWw+IHtcbiAgaWRlbnRpZmllckZpZWxkczogKCkgPT4gTm9uRnVuY3Rpb25Qcm9wZXJ0eU5hbWVzPE1vZGVsPltdXG59XG4iXX0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './base.model';
|
|
2
|
+
export * from './identifier-fields';
|
|
3
|
+
export * from './types';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vZ2VuZXJpYy9tb2RlbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQTtBQUM1QixjQUFjLHFCQUFxQixDQUFBO0FBQ25DLGNBQWMsU0FBUyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9iYXNlLm1vZGVsJ1xuZXhwb3J0ICogZnJvbSAnLi9pZGVudGlmaWVyLWZpZWxkcydcbmV4cG9ydCAqIGZyb20gJy4vdHlwZXMnXG4iXX0=
|