@vendure/core 1.9.4 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.js +5 -1
- package/cli/index.js.map +1 -1
- package/cli/populate.js +7 -25
- package/cli/populate.js.map +1 -1
- package/cli/vendure-cli.js +12 -12
- package/cli/vendure-cli.js.map +1 -1
- package/dist/api/api-internal-modules.d.ts +4 -2
- package/dist/api/api-internal-modules.js +15 -7
- package/dist/api/api-internal-modules.js.map +1 -1
- package/dist/api/api.module.d.ts +1 -1
- package/dist/api/api.module.js +7 -6
- package/dist/api/api.module.js.map +1 -1
- package/dist/api/common/configurable-operation-codec.js +1 -1
- package/dist/api/common/configurable-operation-codec.js.map +1 -1
- package/dist/api/common/custom-field-relation-resolver.service.js +2 -2
- package/dist/api/common/custom-field-relation-resolver.service.js.map +1 -1
- package/dist/api/common/get-api-type.d.ts +1 -1
- package/dist/api/common/graphql-value-transformer.d.ts +2 -2
- package/dist/api/common/graphql-value-transformer.js +9 -9
- package/dist/api/common/graphql-value-transformer.js.map +1 -1
- package/dist/api/common/id-codec.d.ts +1 -1
- package/dist/api/common/id-codec.js +6 -3
- package/dist/api/common/id-codec.js.map +1 -1
- package/dist/api/common/id-codec.service.js +1 -1
- package/dist/api/common/id-codec.service.js.map +1 -1
- package/dist/api/common/parse-context.d.ts +2 -2
- package/dist/api/common/request-context.d.ts +5 -2
- package/dist/api/common/request-context.js +10 -6
- package/dist/api/common/request-context.js.map +1 -1
- package/dist/api/common/set-session-token.js +1 -1
- package/dist/api/common/set-session-token.js.map +1 -1
- package/dist/api/common/validate-custom-field-value.js +2 -1
- package/dist/api/common/validate-custom-field-value.js.map +1 -1
- package/dist/api/config/configure-graphql-module.js +24 -21
- package/dist/api/config/configure-graphql-module.js.map +1 -1
- package/dist/api/config/generate-active-order-types.d.ts +1 -1
- package/dist/api/config/generate-active-order-types.js +6 -5
- package/dist/api/config/generate-active-order-types.js.map +1 -1
- package/dist/api/config/generate-auth-types.js +3 -3
- package/dist/api/config/generate-auth-types.js.map +1 -1
- package/dist/api/config/generate-error-code-enum.js +2 -2
- package/dist/api/config/generate-error-code-enum.js.map +1 -1
- package/dist/api/config/generate-list-options.d.ts +1 -1
- package/dist/api/config/generate-list-options.js +40 -31
- package/dist/api/config/generate-list-options.js.map +1 -1
- package/dist/api/config/generate-permissions.js +2 -2
- package/dist/api/config/generate-permissions.js.map +1 -1
- package/dist/api/config/generate-resolvers.d.ts +53 -51
- package/dist/api/config/generate-resolvers.js +9 -4
- package/dist/api/config/generate-resolvers.js.map +1 -1
- package/dist/api/config/graphql-custom-fields.js +59 -51
- package/dist/api/config/graphql-custom-fields.js.map +1 -1
- package/dist/api/config/money-scalar.d.ts +9 -0
- package/dist/api/config/money-scalar.js +74 -0
- package/dist/api/config/money-scalar.js.map +1 -0
- package/dist/api/decorators/allow.decorator.js +1 -1
- package/dist/api/decorators/allow.decorator.js.map +1 -1
- package/dist/api/decorators/api.decorator.js +2 -2
- package/dist/api/decorators/api.decorator.js.map +1 -1
- package/dist/api/decorators/relations.decorator.d.ts +5 -5
- package/dist/api/decorators/relations.decorator.js +14 -15
- package/dist/api/decorators/relations.decorator.js.map +1 -1
- package/dist/api/decorators/request-context.decorator.js +2 -1
- package/dist/api/decorators/request-context.decorator.js.map +1 -1
- package/dist/api/decorators/transaction.decorator.d.ts +1 -1
- package/dist/api/decorators/transaction.decorator.js +1 -1
- package/dist/api/decorators/transaction.decorator.js.map +1 -1
- package/dist/api/index.js +5 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/middleware/asset-interceptor-plugin.d.ts +2 -2
- package/dist/api/middleware/asset-interceptor-plugin.js +4 -4
- package/dist/api/middleware/asset-interceptor-plugin.js.map +1 -1
- package/dist/api/middleware/auth-guard.js +5 -5
- package/dist/api/middleware/auth-guard.js.map +1 -1
- package/dist/api/middleware/exception-logger.filter.js +1 -1
- package/dist/api/middleware/exception-logger.filter.js.map +1 -1
- package/dist/api/middleware/id-codec-plugin.d.ts +2 -2
- package/dist/api/middleware/id-codec-plugin.js +5 -4
- package/dist/api/middleware/id-codec-plugin.js.map +1 -1
- package/dist/api/middleware/id-interceptor.js +2 -2
- package/dist/api/middleware/id-interceptor.js.map +1 -1
- package/dist/api/middleware/transaction-interceptor.js +6 -4
- package/dist/api/middleware/transaction-interceptor.js.map +1 -1
- package/dist/api/middleware/translate-error-result-interceptor.js +3 -3
- package/dist/api/middleware/translate-error-result-interceptor.js.map +1 -1
- package/dist/api/middleware/translate-errors-plugin.d.ts +1 -1
- package/dist/api/middleware/translate-errors-plugin.js +2 -2
- package/dist/api/middleware/translate-errors-plugin.js.map +1 -1
- package/dist/api/middleware/validate-custom-fields-interceptor.js +4 -4
- package/dist/api/middleware/validate-custom-fields-interceptor.js.map +1 -1
- package/dist/api/resolvers/admin/administrator.resolver.js +39 -39
- package/dist/api/resolvers/admin/administrator.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/asset.resolver.js +36 -36
- package/dist/api/resolvers/admin/asset.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/auth.resolver.js +24 -24
- package/dist/api/resolvers/admin/auth.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/channel.resolver.js +31 -30
- package/dist/api/resolvers/admin/channel.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/collection.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/collection.resolver.js +56 -56
- package/dist/api/resolvers/admin/collection.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/country.resolver.js +26 -26
- package/dist/api/resolvers/admin/country.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/customer-group.resolver.js +36 -36
- package/dist/api/resolvers/admin/customer-group.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/customer.resolver.js +56 -56
- package/dist/api/resolvers/admin/customer.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/draft-order.resolver.d.ts +3 -3
- package/dist/api/resolvers/admin/draft-order.resolver.js +62 -62
- package/dist/api/resolvers/admin/draft-order.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/facet.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/facet.resolver.js +62 -62
- package/dist/api/resolvers/admin/facet.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/global-settings.resolver.js +20 -17
- package/dist/api/resolvers/admin/global-settings.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/import.resolver.d.ts +2 -2
- package/dist/api/resolvers/admin/import.resolver.js +5 -5
- package/dist/api/resolvers/admin/import.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/job.resolver.js +25 -25
- package/dist/api/resolvers/admin/job.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/order.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/order.resolver.js +87 -87
- package/dist/api/resolvers/admin/order.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/payment-method.resolver.js +32 -32
- package/dist/api/resolvers/admin/payment-method.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/product-option.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/product-option.resolver.js +36 -36
- package/dist/api/resolvers/admin/product-option.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/product.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/product.resolver.js +98 -98
- package/dist/api/resolvers/admin/product.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/promotion.resolver.js +42 -42
- package/dist/api/resolvers/admin/promotion.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/role.resolver.js +26 -26
- package/dist/api/resolvers/admin/role.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/search.resolver.js +17 -17
- package/dist/api/resolvers/admin/search.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/seller.resolver.d.ts +13 -0
- package/dist/api/resolvers/admin/seller.resolver.js +96 -0
- package/dist/api/resolvers/admin/seller.resolver.js.map +1 -0
- package/dist/api/resolvers/admin/shipping-method.resolver.js +43 -43
- package/dist/api/resolvers/admin/shipping-method.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/stock-location.resolver.d.ts +12 -0
- package/dist/api/resolvers/admin/stock-location.resolver.js +96 -0
- package/dist/api/resolvers/admin/stock-location.resolver.js.map +1 -0
- package/dist/api/resolvers/admin/tag.resolver.js +24 -24
- package/dist/api/resolvers/admin/tag.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/tax-category.resolver.js +23 -23
- package/dist/api/resolvers/admin/tax-category.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/tax-rate.resolver.js +26 -26
- package/dist/api/resolvers/admin/tax-rate.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/zone.resolver.js +33 -33
- package/dist/api/resolvers/admin/zone.resolver.js.map +1 -1
- package/dist/api/resolvers/base/base-auth.resolver.js +6 -6
- package/dist/api/resolvers/base/base-auth.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/administrator-entity.resolver.js +4 -4
- package/dist/api/resolvers/entity/administrator-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/asset-entity.resolver.js +4 -4
- package/dist/api/resolvers/entity/asset-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/channel-entity.resolver.d.ts +10 -0
- package/dist/api/resolvers/entity/channel-entity.resolver.js +56 -0
- package/dist/api/resolvers/entity/channel-entity.resolver.js.map +1 -0
- package/dist/api/resolvers/entity/collection-entity.resolver.js +42 -42
- package/dist/api/resolvers/entity/collection-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/country-entity.resolver.js +7 -7
- package/dist/api/resolvers/entity/country-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/customer-entity.resolver.d.ts +2 -2
- package/dist/api/resolvers/entity/customer-entity.resolver.js +23 -23
- package/dist/api/resolvers/entity/customer-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/customer-group-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/customer-group-entity.resolver.js +6 -6
- package/dist/api/resolvers/entity/customer-group-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/facet-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/facet-entity.resolver.js +11 -11
- package/dist/api/resolvers/entity/facet-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/facet-value-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/facet-value-entity.resolver.js +10 -10
- package/dist/api/resolvers/entity/facet-value-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/fulfillment-entity.resolver.d.ts +3 -6
- package/dist/api/resolvers/entity/fulfillment-entity.resolver.js +14 -14
- package/dist/api/resolvers/entity/fulfillment-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/fulfillment-line-entity.resolver.d.ts +11 -0
- package/dist/api/resolvers/entity/fulfillment-line-entity.resolver.js +59 -0
- package/dist/api/resolvers/entity/fulfillment-line-entity.resolver.js.map +1 -0
- package/dist/api/resolvers/entity/job-entity.resolver.js +7 -7
- package/dist/api/resolvers/entity/job-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/order-entity.resolver.d.ts +12 -7
- package/dist/api/resolvers/entity/order-entity.resolver.js +88 -32
- package/dist/api/resolvers/entity/order-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/order-line-entity.resolver.d.ts +2 -2
- package/dist/api/resolvers/entity/order-line-entity.resolver.js +18 -20
- package/dist/api/resolvers/entity/order-line-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/payment-entity.resolver.js +11 -11
- package/dist/api/resolvers/entity/payment-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/payment-method-entity.resolver.js +1 -1
- package/dist/api/resolvers/entity/payment-method-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/product-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/product-entity.resolver.js +47 -47
- package/dist/api/resolvers/entity/product-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/product-option-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/product-option-entity.resolver.js +12 -12
- package/dist/api/resolvers/entity/product-option-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/product-option-group-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/product-option-group-entity.resolver.js +11 -11
- package/dist/api/resolvers/entity/product-option-group-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/product-variant-entity.resolver.d.ts +11 -2
- package/dist/api/resolvers/entity/product-variant-entity.resolver.js +93 -50
- package/dist/api/resolvers/entity/product-variant-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/refund-entity.resolver.d.ts +0 -4
- package/dist/api/resolvers/entity/refund-entity.resolver.js +1 -23
- package/dist/api/resolvers/entity/refund-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/refund-line-entity.resolver.d.ts +11 -0
- package/dist/api/resolvers/entity/refund-line-entity.resolver.js +55 -0
- package/dist/api/resolvers/entity/refund-line-entity.resolver.js.map +1 -0
- package/dist/api/resolvers/entity/role-entity.resolver.js +4 -4
- package/dist/api/resolvers/entity/role-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/shipping-line-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/shipping-line-entity.resolver.js +4 -4
- package/dist/api/resolvers/entity/shipping-line-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/shipping-method-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/shipping-method-entity.resolver.js +14 -14
- package/dist/api/resolvers/entity/shipping-method-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/tax-rate-entity.resolver.js +5 -5
- package/dist/api/resolvers/entity/tax-rate-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/user-entity.resolver.js +4 -4
- package/dist/api/resolvers/entity/user-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/zone-entity.resolver.d.ts +3 -2
- package/dist/api/resolvers/entity/zone-entity.resolver.js +8 -8
- package/dist/api/resolvers/entity/zone-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-auth.resolver.js +80 -80
- package/dist/api/resolvers/shop/shop-auth.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-customer.resolver.js +27 -27
- package/dist/api/resolvers/shop/shop-customer.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-environment.resolver.js +3 -3
- package/dist/api/resolvers/shop/shop-environment.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-order.resolver.d.ts +2 -2
- package/dist/api/resolvers/shop/shop-order.resolver.js +105 -107
- package/dist/api/resolvers/shop/shop-order.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-products.resolver.js +30 -30
- package/dist/api/resolvers/shop/shop-products.resolver.js.map +1 -1
- package/dist/api/schema/admin-api/channel.api.graphql +2 -0
- package/dist/api/schema/admin-api/collection-admin.type.graphql +1 -0
- package/dist/api/schema/admin-api/collection.api.graphql +3 -0
- package/dist/api/schema/admin-api/order-admin.type.graphql +14 -2
- package/dist/api/schema/admin-api/order.api.graphql +4 -9
- package/dist/api/schema/admin-api/payment-method.api.graphql +9 -4
- package/dist/api/schema/admin-api/product-admin.type.graphql +3 -2
- package/dist/api/schema/admin-api/product.api.graphql +9 -2
- package/dist/api/schema/admin-api/promotion.api.graphql +8 -2
- package/dist/api/schema/admin-api/seller.api.graphql +29 -0
- package/dist/api/schema/admin-api/shipping-method.api.graphql +2 -2
- package/dist/api/schema/admin-api/stock-level.type.graphql +9 -0
- package/dist/api/schema/admin-api/stock-location.api.graphql +34 -0
- package/dist/api/schema/admin-api/stock-location.type.graphql +7 -0
- package/dist/api/schema/common/asset.type.graphql +1 -0
- package/dist/api/schema/common/channel.type.graphql +3 -1
- package/dist/api/schema/common/common-error-results.graphql +7 -0
- package/dist/api/schema/common/common-types.graphql +7 -3
- package/dist/api/schema/common/custom-field-types.graphql +13 -0
- package/dist/api/schema/common/order.type.graphql +68 -49
- package/dist/api/schema/common/payment-method.type.graphql +9 -0
- package/dist/api/schema/common/product-search.type.graphql +3 -3
- package/dist/api/schema/common/product.type.graphql +2 -2
- package/dist/api/schema/common/promotion.type.graphql +12 -0
- package/dist/api/schema/common/seller.type.graphql +6 -0
- package/dist/api/schema/shop-api/shop.api.graphql +8 -3
- package/dist/app.module.js +1 -1
- package/dist/app.module.js.map +1 -1
- package/dist/bootstrap.d.ts +1 -1
- package/dist/bootstrap.js +27 -43
- package/dist/bootstrap.js.map +1 -1
- package/dist/cache/cache.module.js +1 -1
- package/dist/cache/cache.module.js.map +1 -1
- package/dist/cache/index.js +5 -1
- package/dist/cache/index.js.map +1 -1
- package/dist/common/async-queue.d.ts +3 -3
- package/dist/common/async-queue.js +2 -2
- package/dist/common/async-queue.js.map +1 -1
- package/dist/common/configurable-operation.d.ts +11 -11
- package/dist/common/configurable-operation.js +5 -5
- package/dist/common/configurable-operation.js.map +1 -1
- package/dist/common/constants.js +4 -3
- package/dist/common/constants.js.map +1 -1
- package/dist/common/error/error-result.d.ts +3 -3
- package/dist/common/error/errors.d.ts +1 -2
- package/dist/common/error/errors.js.map +1 -1
- package/dist/common/error/generated-graphql-admin-errors.d.ts +160 -89
- package/dist/common/error/generated-graphql-admin-errors.js +123 -113
- package/dist/common/error/generated-graphql-admin-errors.js.map +1 -1
- package/dist/common/error/generated-graphql-shop-errors.d.ts +79 -43
- package/dist/common/error/generated-graphql-shop-errors.js +65 -55
- package/dist/common/error/generated-graphql-shop-errors.js.map +1 -1
- package/dist/common/finite-state-machine/finite-state-machine.d.ts +4 -2
- package/dist/common/finite-state-machine/finite-state-machine.js +20 -8
- package/dist/common/finite-state-machine/finite-state-machine.js.map +1 -1
- package/dist/common/finite-state-machine/merge-transition-definitions.js +1 -1
- package/dist/common/finite-state-machine/merge-transition-definitions.js.map +1 -1
- package/dist/common/finite-state-machine/types.d.ts +4 -4
- package/dist/common/generate-public-id.js +3 -2
- package/dist/common/generate-public-id.js.map +1 -1
- package/dist/common/index.js +5 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/permission-definition.d.ts +1 -1
- package/dist/common/round-money.d.ts +1 -0
- package/dist/common/round-money.js +13 -0
- package/dist/common/round-money.js.map +1 -0
- package/dist/common/self-refreshing-cache.d.ts +1 -2
- package/dist/common/self-refreshing-cache.js +11 -7
- package/dist/common/self-refreshing-cache.js.map +1 -1
- package/dist/common/tax-utils.js +2 -2
- package/dist/common/tax-utils.js.map +1 -1
- package/dist/common/types/adjustment-source.d.ts +1 -1
- package/dist/common/types/common-types.d.ts +11 -11
- package/dist/common/types/entity-relation-paths.d.ts +8 -8
- package/dist/common/types/locale-types.d.ts +7 -7
- package/dist/common/utils.d.ts +5 -1
- package/dist/common/utils.js +21 -3
- package/dist/common/utils.js.map +1 -1
- package/dist/config/asset-import-strategy/default-asset-import-strategy.js +4 -6
- package/dist/config/asset-import-strategy/default-asset-import-strategy.js.map +1 -1
- package/dist/config/asset-naming-strategy/default-asset-naming-strategy.js +1 -1
- package/dist/config/asset-naming-strategy/default-asset-naming-strategy.js.map +1 -1
- package/dist/config/asset-storage-strategy/asset-storage-strategy.d.ts +1 -0
- package/dist/config/asset-storage-strategy/no-asset-storage-strategy.d.ts +1 -0
- package/dist/config/auth/native-authentication-strategy.js +7 -26
- package/dist/config/auth/native-authentication-strategy.js.map +1 -1
- package/dist/config/catalog/collection-filter.d.ts +1 -1
- package/dist/config/catalog/collection-filter.js +1 -1
- package/dist/config/catalog/collection-filter.js.map +1 -1
- package/dist/config/catalog/default-collection-filters.js +10 -7
- package/dist/config/catalog/default-collection-filters.js.map +1 -1
- package/dist/config/catalog/default-product-variant-price-calculation-strategy.js +3 -2
- package/dist/config/catalog/default-product-variant-price-calculation-strategy.js.map +1 -1
- package/dist/config/catalog/default-product-variant-price-selection-strategy.d.ts +10 -0
- package/dist/config/catalog/default-product-variant-price-selection-strategy.js +15 -0
- package/dist/config/catalog/default-product-variant-price-selection-strategy.js.map +1 -0
- package/dist/config/catalog/default-stock-location-strategy.d.ts +25 -0
- package/dist/config/catalog/default-stock-location-strategy.js +70 -0
- package/dist/config/catalog/default-stock-location-strategy.js.map +1 -0
- package/dist/config/catalog/product-variant-price-calculation-strategy.d.ts +3 -2
- package/dist/config/catalog/product-variant-price-selection-strategy.d.ts +6 -0
- package/dist/config/catalog/product-variant-price-selection-strategy.js +3 -0
- package/dist/config/catalog/product-variant-price-selection-strategy.js.map +1 -0
- package/dist/config/catalog/stock-location-strategy.d.ts +74 -0
- package/dist/config/{fulfillment/custom-fulfillment-process.js → catalog/stock-location-strategy.js} +1 -1
- package/dist/config/catalog/stock-location-strategy.js.map +1 -0
- package/dist/config/config-helpers.d.ts +6 -1
- package/dist/config/config-helpers.js +34 -6
- package/dist/config/config-helpers.js.map +1 -1
- package/dist/config/config.module.js +14 -7
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/config.service.d.ts +3 -3
- package/dist/config/config.service.js +3 -3
- package/dist/config/config.service.js.map +1 -1
- package/dist/config/custom-field/custom-field-types.d.ts +18 -15
- package/dist/config/default-config.js +21 -2
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/entity/auto-increment-id-strategy.js.map +1 -0
- package/dist/config/entity/bigint-money-strategy.d.ts +17 -0
- package/dist/config/entity/bigint-money-strategy.js +45 -0
- package/dist/config/entity/bigint-money-strategy.js.map +1 -0
- package/dist/config/entity/default-money-strategy.d.ts +14 -0
- package/dist/config/entity/default-money-strategy.js +23 -0
- package/dist/config/entity/default-money-strategy.js.map +1 -0
- package/dist/config/{entity-id-strategy → entity}/entity-id-strategy.d.ts +1 -1
- package/dist/config/entity/entity-id-strategy.js.map +1 -0
- package/dist/config/entity/money-strategy.d.ts +61 -0
- package/dist/config/{order/custom-order-process.js → entity/money-strategy.js} +1 -1
- package/dist/config/entity/money-strategy.js.map +1 -0
- package/dist/config/entity/uuid-id-strategy.js.map +1 -0
- package/dist/config/entity-metadata/add-foreign-key-indices.js +1 -1
- package/dist/config/entity-metadata/add-foreign-key-indices.js.map +1 -1
- package/dist/config/entity-metadata/entity-metadata-modifier.d.ts +1 -1
- package/dist/config/fulfillment/default-fulfillment-process.d.ts +24 -0
- package/dist/config/fulfillment/default-fulfillment-process.js +131 -0
- package/dist/config/fulfillment/default-fulfillment-process.js.map +1 -0
- package/dist/config/fulfillment/fulfillment-handler.d.ts +5 -6
- package/dist/config/fulfillment/fulfillment-handler.js +3 -3
- package/dist/config/fulfillment/fulfillment-handler.js.map +1 -1
- package/dist/config/fulfillment/{custom-fulfillment-process.d.ts → fulfillment-process.d.ts} +16 -2
- package/dist/config/{payment/custom-payment-process.js → fulfillment/fulfillment-process.js} +1 -1
- package/dist/config/fulfillment/fulfillment-process.js.map +1 -0
- package/dist/config/index.d.ts +27 -8
- package/dist/config/index.js +32 -9
- package/dist/config/index.js.map +1 -1
- package/dist/config/job-queue/job-queue-strategy.d.ts +3 -3
- package/dist/config/logger/default-logger.js +5 -5
- package/dist/config/logger/typeorm-logger.js +4 -3
- package/dist/config/logger/typeorm-logger.js.map +1 -1
- package/dist/config/merge-config.js +4 -4
- package/dist/config/merge-config.js.map +1 -1
- package/dist/config/order/active-order-strategy.d.ts +1 -1
- package/dist/config/order/changed-price-handling-strategy.d.ts +3 -3
- package/dist/config/order/default-active-order-strategy.js +3 -22
- package/dist/config/order/default-active-order-strategy.js.map +1 -1
- package/dist/config/order/default-guest-checkout-strategy.d.ts +63 -0
- package/dist/config/order/default-guest-checkout-strategy.js +55 -0
- package/dist/config/order/default-guest-checkout-strategy.js.map +1 -0
- package/dist/config/order/default-order-process.d.ts +143 -0
- package/dist/config/order/default-order-process.js +307 -0
- package/dist/config/order/default-order-process.js.map +1 -0
- package/dist/config/order/default-order-seller-strategy.d.ts +11 -0
- package/dist/config/order/default-order-seller-strategy.js +15 -0
- package/dist/config/order/default-order-seller-strategy.js.map +1 -0
- package/dist/config/order/guest-checkout-strategy.d.ts +30 -0
- package/dist/config/order/guest-checkout-strategy.js +3 -0
- package/dist/config/order/guest-checkout-strategy.js.map +1 -0
- package/dist/config/order/merge-orders-strategy.js +1 -1
- package/dist/config/order/merge-orders-strategy.js.map +1 -1
- package/dist/config/order/order-by-code-access-strategy.js +1 -1
- package/dist/config/order/order-by-code-access-strategy.js.map +1 -1
- package/dist/config/order/order-code-strategy.js +1 -1
- package/dist/config/order/order-code-strategy.js.map +1 -1
- package/dist/config/order/order-merge-strategy.d.ts +1 -1
- package/dist/config/order/{custom-order-process.d.ts → order-process.d.ts} +15 -2
- package/dist/config/order/order-process.js +3 -0
- package/dist/config/order/order-process.js.map +1 -0
- package/dist/config/order/order-seller-strategy.d.ts +56 -0
- package/dist/config/order/order-seller-strategy.js +3 -0
- package/dist/config/order/order-seller-strategy.js.map +1 -0
- package/dist/config/payment/default-payment-process.d.ts +16 -0
- package/dist/config/payment/default-payment-process.js +70 -0
- package/dist/config/payment/default-payment-process.js.map +1 -0
- package/dist/config/payment/example-payment-method-handler.js +1 -1
- package/dist/config/payment/example-payment-method-handler.js.map +1 -1
- package/dist/config/payment/payment-method-eligibility-checker.d.ts +2 -2
- package/dist/config/payment/payment-method-eligibility-checker.js.map +1 -1
- package/dist/config/payment/payment-method-handler.d.ts +9 -9
- package/dist/config/payment/payment-method-handler.js +1 -1
- package/dist/config/payment/payment-method-handler.js.map +1 -1
- package/dist/config/payment/{custom-payment-process.d.ts → payment-process.d.ts} +17 -3
- package/dist/config/payment/payment-process.js +3 -0
- package/dist/config/payment/payment-process.js.map +1 -0
- package/dist/config/promotion/actions/buy-x-get-y-free-action.d.ts +4 -3
- package/dist/config/promotion/actions/buy-x-get-y-free-action.js +6 -9
- package/dist/config/promotion/actions/buy-x-get-y-free-action.js.map +1 -1
- package/dist/config/promotion/actions/facet-values-percentage-discount-action.js +1 -1
- package/dist/config/promotion/actions/facet-values-percentage-discount-action.js.map +1 -1
- package/dist/config/promotion/actions/product-percentage-discount-action.js +2 -2
- package/dist/config/promotion/actions/product-percentage-discount-action.js.map +1 -1
- package/dist/config/promotion/conditions/buy-x-get-y-free-condition.d.ts +3 -2
- package/dist/config/promotion/conditions/buy-x-get-y-free-condition.js +16 -10
- package/dist/config/promotion/conditions/buy-x-get-y-free-condition.js.map +1 -1
- package/dist/config/promotion/conditions/contains-products-condition.js +1 -1
- package/dist/config/promotion/conditions/contains-products-condition.js.map +1 -1
- package/dist/config/promotion/conditions/customer-group-condition.js +2 -21
- package/dist/config/promotion/conditions/customer-group-condition.js.map +1 -1
- package/dist/config/promotion/conditions/has-facet-values-condition.js +1 -1
- package/dist/config/promotion/conditions/has-facet-values-condition.js.map +1 -1
- package/dist/config/promotion/index.d.ts +6 -2
- package/dist/config/promotion/index.js +5 -1
- package/dist/config/promotion/index.js.map +1 -1
- package/dist/config/promotion/promotion-action.d.ts +13 -14
- package/dist/config/promotion/promotion-action.js +5 -5
- package/dist/config/promotion/promotion-action.js.map +1 -1
- package/dist/config/promotion/promotion-condition.d.ts +4 -4
- package/dist/config/promotion/promotion-condition.js +3 -3
- package/dist/config/promotion/promotion-condition.js.map +1 -1
- package/dist/config/promotion/utils/facet-value-checker.d.ts +0 -1
- package/dist/config/promotion/utils/facet-value-checker.js +6 -5
- package/dist/config/promotion/utils/facet-value-checker.js.map +1 -1
- package/dist/config/session-cache/in-memory-session-cache-strategy.js +1 -1
- package/dist/config/session-cache/session-cache-strategy.d.ts +6 -6
- package/dist/config/shipping-method/default-shipping-calculator.d.ts +1 -2
- package/dist/config/shipping-method/default-shipping-calculator.js +2 -2
- package/dist/config/shipping-method/default-shipping-calculator.js.map +1 -1
- package/dist/config/shipping-method/default-shipping-line-assignment-strategy.d.ts +8 -0
- package/dist/config/shipping-method/default-shipping-line-assignment-strategy.js +10 -0
- package/dist/config/shipping-method/default-shipping-line-assignment-strategy.js.map +1 -0
- package/dist/config/shipping-method/shipping-calculator.d.ts +2 -2
- package/dist/config/shipping-method/shipping-eligibility-checker.d.ts +2 -2
- package/dist/config/shipping-method/shipping-eligibility-checker.js +1 -1
- package/dist/config/shipping-method/shipping-eligibility-checker.js.map +1 -1
- package/dist/config/shipping-method/shipping-line-assignment-strategy.d.ts +20 -0
- package/dist/config/shipping-method/shipping-line-assignment-strategy.js +3 -0
- package/dist/config/shipping-method/shipping-line-assignment-strategy.js.map +1 -0
- package/dist/config/tax/default-tax-line-calculation-strategy.js +2 -2
- package/dist/config/tax/tax-line-calculation-strategy.d.ts +1 -3
- package/dist/config/vendure-config.d.ts +90 -14
- package/dist/connection/connection.module.d.ts +2 -2
- package/dist/connection/connection.module.js +1 -1
- package/dist/connection/connection.module.js.map +1 -1
- package/dist/connection/index.js +5 -1
- package/dist/connection/index.js.map +1 -1
- package/dist/connection/transaction-subscriber.d.ts +1 -1
- package/dist/connection/transaction-subscriber.js +6 -7
- package/dist/connection/transaction-subscriber.js.map +1 -1
- package/dist/connection/transaction-wrapper.js +2 -4
- package/dist/connection/transaction-wrapper.js.map +1 -1
- package/dist/connection/transactional-connection.d.ts +7 -6
- package/dist/connection/transactional-connection.js +18 -37
- package/dist/connection/transactional-connection.js.map +1 -1
- package/dist/data-import/data-import.module.js +1 -1
- package/dist/data-import/data-import.module.js.map +1 -1
- package/dist/data-import/index.js +5 -1
- package/dist/data-import/index.js.map +1 -1
- package/dist/data-import/providers/asset-importer/asset-importer.js +2 -2
- package/dist/data-import/providers/asset-importer/asset-importer.js.map +1 -1
- package/dist/data-import/providers/import-parser/import-parser.js +7 -7
- package/dist/data-import/providers/import-parser/import-parser.js.map +1 -1
- package/dist/data-import/providers/importer/fast-importer.service.d.ts +1 -2
- package/dist/data-import/providers/importer/fast-importer.service.js +15 -16
- package/dist/data-import/providers/importer/fast-importer.service.js.map +1 -1
- package/dist/data-import/providers/importer/importer.d.ts +1 -1
- package/dist/data-import/providers/importer/importer.js +6 -6
- package/dist/data-import/providers/importer/importer.js.map +1 -1
- package/dist/data-import/providers/populator/populator.js +11 -12
- package/dist/data-import/providers/populator/populator.js.map +1 -1
- package/dist/data-import/types.d.ts +2 -2
- package/dist/entity/address/address.entity.d.ts +1 -1
- package/dist/entity/address/address.entity.js +17 -15
- package/dist/entity/address/address.entity.js.map +1 -1
- package/dist/entity/administrator/administrator.entity.js +8 -8
- package/dist/entity/administrator/administrator.entity.js.map +1 -1
- package/dist/entity/asset/asset.entity.js +15 -15
- package/dist/entity/asset/asset.entity.js.map +1 -1
- package/dist/entity/asset/orderable-asset.entity.js +4 -3
- package/dist/entity/asset/orderable-asset.entity.js.map +1 -1
- package/dist/entity/authentication-method/authentication-method.entity.js +4 -3
- package/dist/entity/authentication-method/authentication-method.entity.js.map +1 -1
- package/dist/entity/authentication-method/external-authentication-method.entity.js +4 -4
- package/dist/entity/authentication-method/external-authentication-method.entity.js.map +1 -1
- package/dist/entity/authentication-method/native-authentication-method.entity.js +7 -7
- package/dist/entity/authentication-method/native-authentication-method.entity.js.map +1 -1
- package/dist/entity/base/base.entity.js +3 -3
- package/dist/entity/base/base.entity.js.map +1 -1
- package/dist/entity/channel/channel.entity.d.ts +6 -2
- package/dist/entity/channel/channel.entity.js +26 -10
- package/dist/entity/channel/channel.entity.js.map +1 -1
- package/dist/entity/collection/collection-asset.entity.js +3 -3
- package/dist/entity/collection/collection-asset.entity.js.map +1 -1
- package/dist/entity/collection/collection-translation.entity.js +9 -7
- package/dist/entity/collection/collection-translation.entity.js.map +1 -1
- package/dist/entity/collection/collection.entity.d.ts +4 -0
- package/dist/entity/collection/collection.entity.js +22 -28
- package/dist/entity/collection/collection.entity.js.map +1 -1
- package/dist/entity/country/country-translation.entity.js +6 -5
- package/dist/entity/country/country-translation.entity.js.map +1 -1
- package/dist/entity/country/country.entity.js +5 -5
- package/dist/entity/country/country.entity.js.map +1 -1
- package/dist/entity/custom-entity-fields.d.ts +8 -0
- package/dist/entity/custom-entity-fields.js +13 -1
- package/dist/entity/custom-entity-fields.js.map +1 -1
- package/dist/entity/customer/customer.entity.js +16 -16
- package/dist/entity/customer/customer.entity.js.map +1 -1
- package/dist/entity/customer-group/customer-group.entity.js +4 -4
- package/dist/entity/customer-group/customer-group.entity.js.map +1 -1
- package/dist/entity/entities.d.ts +28 -12
- package/dist/entity/entities.js +28 -12
- package/dist/entity/entities.js.map +1 -1
- package/dist/entity/entity-id.decorator.js +1 -1
- package/dist/entity/facet/facet-translation.entity.js +6 -5
- package/dist/entity/facet/facet-translation.entity.js.map +1 -1
- package/dist/entity/facet/facet.entity.js +8 -8
- package/dist/entity/facet/facet.entity.js.map +1 -1
- package/dist/entity/facet-value/facet-value-translation.entity.js +6 -5
- package/dist/entity/facet-value/facet-value-translation.entity.js.map +1 -1
- package/dist/entity/facet-value/facet-value.entity.js +8 -7
- package/dist/entity/facet-value/facet-value.entity.js.map +1 -1
- package/dist/entity/fulfillment/fulfillment.entity.d.ts +3 -3
- package/dist/entity/fulfillment/fulfillment.entity.js +10 -10
- package/dist/entity/fulfillment/fulfillment.entity.js.map +1 -1
- package/dist/entity/global-settings/global-settings.entity.js +5 -5
- package/dist/entity/global-settings/global-settings.entity.js.map +1 -1
- package/dist/entity/history-entry/customer-history-entry.entity.js +3 -2
- package/dist/entity/history-entry/customer-history-entry.entity.js.map +1 -1
- package/dist/entity/history-entry/history-entry.entity.js +7 -6
- package/dist/entity/history-entry/history-entry.entity.js.map +1 -1
- package/dist/entity/history-entry/order-history-entry.entity.js +3 -2
- package/dist/entity/history-entry/order-history-entry.entity.js.map +1 -1
- package/dist/entity/index.d.ts +30 -18
- package/dist/entity/index.js +35 -19
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/money.decorator.d.ts +27 -0
- package/dist/entity/money.decorator.js +36 -0
- package/dist/entity/money.decorator.js.map +1 -0
- package/dist/entity/order/order.entity.d.ts +7 -3
- package/dist/entity/order/order.entity.js +60 -42
- package/dist/entity/order/order.entity.js.map +1 -1
- package/dist/entity/order-line/order-line.entity.d.ts +79 -20
- package/dist/entity/order-line/order-line.entity.js +205 -107
- package/dist/entity/order-line/order-line.entity.js.map +1 -1
- package/dist/entity/order-line-reference/fulfillment-line.entity.d.ts +15 -0
- package/dist/entity/order-line-reference/fulfillment-line.entity.js +43 -0
- package/dist/entity/order-line-reference/fulfillment-line.entity.js.map +1 -0
- package/dist/entity/order-line-reference/order-line-reference.entity.d.ts +15 -0
- package/dist/entity/order-line-reference/order-line-reference.entity.js +44 -0
- package/dist/entity/order-line-reference/order-line-reference.entity.js.map +1 -0
- package/dist/entity/order-line-reference/order-modification-line.entity.d.ts +15 -0
- package/dist/entity/order-line-reference/order-modification-line.entity.js +43 -0
- package/dist/entity/order-line-reference/order-modification-line.entity.js.map +1 -0
- package/dist/entity/order-line-reference/refund-line.entity.d.ts +15 -0
- package/dist/entity/order-line-reference/refund-line.entity.js +43 -0
- package/dist/entity/order-line-reference/refund-line.entity.js.map +1 -0
- package/dist/entity/order-modification/order-modification.entity.d.ts +2 -2
- package/dist/entity/order-modification/order-modification.entity.js +17 -16
- package/dist/entity/order-modification/order-modification.entity.js.map +1 -1
- package/dist/entity/payment/payment.entity.js +11 -9
- package/dist/entity/payment/payment.entity.js.map +1 -1
- package/dist/entity/payment-method/payment-method-translation.entity.d.ts +15 -0
- package/dist/entity/payment-method/payment-method-translation.entity.js +49 -0
- package/dist/entity/payment-method/payment-method-translation.entity.js.map +1 -0
- package/dist/entity/payment-method/payment-method.entity.d.ts +5 -3
- package/dist/entity/payment-method/payment-method.entity.js +12 -15
- package/dist/entity/payment-method/payment-method.entity.js.map +1 -1
- package/dist/entity/product/product-asset.entity.js +3 -3
- package/dist/entity/product/product-asset.entity.js.map +1 -1
- package/dist/entity/product/product-translation.entity.js +9 -7
- package/dist/entity/product/product-translation.entity.js.map +1 -1
- package/dist/entity/product/product.entity.js +14 -13
- package/dist/entity/product/product.entity.js.map +1 -1
- package/dist/entity/product-option/product-option-translation.entity.js +6 -5
- package/dist/entity/product-option/product-option-translation.entity.js.map +1 -1
- package/dist/entity/product-option/product-option.entity.js +8 -7
- package/dist/entity/product-option/product-option.entity.js.map +1 -1
- package/dist/entity/product-option-group/product-option-group-translation.entity.js +6 -5
- package/dist/entity/product-option-group/product-option-group-translation.entity.js.map +1 -1
- package/dist/entity/product-option-group/product-option-group.entity.d.ts +1 -1
- package/dist/entity/product-option-group/product-option-group.entity.js +9 -8
- package/dist/entity/product-option-group/product-option-group.entity.js.map +1 -1
- package/dist/entity/product-variant/product-variant-asset.entity.js +3 -3
- package/dist/entity/product-variant/product-variant-asset.entity.js.map +1 -1
- package/dist/entity/product-variant/product-variant-price.entity.d.ts +2 -0
- package/dist/entity/product-variant/product-variant-price.entity.js +11 -4
- package/dist/entity/product-variant/product-variant-price.entity.js.map +1 -1
- package/dist/entity/product-variant/product-variant-translation.entity.js +6 -5
- package/dist/entity/product-variant/product-variant-translation.entity.js.map +1 -1
- package/dist/entity/product-variant/product-variant.entity.d.ts +3 -3
- package/dist/entity/product-variant/product-variant.entity.js +37 -36
- package/dist/entity/product-variant/product-variant.entity.js.map +1 -1
- package/dist/entity/promotion/promotion-translation.entity.d.ts +15 -0
- package/dist/entity/promotion/promotion-translation.entity.js +49 -0
- package/dist/entity/promotion/promotion-translation.entity.js.map +1 -0
- package/dist/entity/promotion/promotion.entity.d.ts +7 -6
- package/dist/entity/promotion/promotion.entity.js +26 -23
- package/dist/entity/promotion/promotion.entity.js.map +1 -1
- package/dist/entity/refund/refund.entity.d.ts +2 -2
- package/dist/entity/refund/refund.entity.js +19 -17
- package/dist/entity/refund/refund.entity.js.map +1 -1
- package/dist/entity/register-custom-entity-fields.js +16 -12
- package/dist/entity/register-custom-entity-fields.js.map +1 -1
- package/dist/entity/role/role.entity.js +6 -6
- package/dist/entity/role/role.entity.js.map +1 -1
- package/dist/entity/run-entity-metadata-modifiers.d.ts +1 -1
- package/dist/entity/run-entity-metadata-modifiers.js +1 -1
- package/dist/entity/run-entity-metadata-modifiers.js.map +1 -1
- package/dist/entity/seller/seller.entity.d.ts +17 -0
- package/dist/entity/seller/seller.entity.js +44 -0
- package/dist/entity/seller/seller.entity.js.map +1 -0
- package/dist/entity/session/anonymous-session.entity.js +1 -1
- package/dist/entity/session/anonymous-session.entity.js.map +1 -1
- package/dist/entity/session/authenticated-session.entity.js +4 -3
- package/dist/entity/session/authenticated-session.entity.js.map +1 -1
- package/dist/entity/session/session.entity.js +12 -10
- package/dist/entity/session/session.entity.js.map +1 -1
- package/dist/entity/set-entity-id-strategy.d.ts +1 -1
- package/dist/entity/set-entity-id-strategy.js +4 -4
- package/dist/entity/set-entity-id-strategy.js.map +1 -1
- package/dist/entity/set-money-strategy.d.ts +3 -0
- package/dist/entity/set-money-strategy.js +16 -0
- package/dist/entity/set-money-strategy.js.map +1 -0
- package/dist/entity/shipping-line/shipping-line.entity.d.ts +1 -1
- package/dist/entity/shipping-line/shipping-line.entity.js +30 -26
- package/dist/entity/shipping-line/shipping-line.entity.js.map +1 -1
- package/dist/entity/shipping-method/shipping-method-translation.entity.js +7 -6
- package/dist/entity/shipping-method/shipping-method-translation.entity.js.map +1 -1
- package/dist/entity/shipping-method/shipping-method.entity.js +14 -13
- package/dist/entity/shipping-method/shipping-method.entity.js.map +1 -1
- package/dist/entity/stock-level/stock-level.entity.d.ts +20 -0
- package/dist/entity/stock-level/stock-level.entity.js +60 -0
- package/dist/entity/stock-level/stock-level.entity.js.map +1 -0
- package/dist/entity/stock-location/stock-location.entity.d.ts +19 -0
- package/dist/entity/stock-location/stock-location.entity.js +50 -0
- package/dist/entity/stock-location/stock-location.entity.js.map +1 -0
- package/dist/entity/stock-movement/allocation.entity.js +3 -2
- package/dist/entity/stock-movement/allocation.entity.js.map +1 -1
- package/dist/entity/stock-movement/cancellation.entity.d.ts +2 -2
- package/dist/entity/stock-movement/cancellation.entity.js +5 -5
- package/dist/entity/stock-movement/cancellation.entity.js.map +1 -1
- package/dist/entity/stock-movement/release.entity.d.ts +2 -2
- package/dist/entity/stock-movement/release.entity.js +5 -5
- package/dist/entity/stock-movement/release.entity.js.map +1 -1
- package/dist/entity/stock-movement/sale.entity.js +2 -2
- package/dist/entity/stock-movement/sale.entity.js.map +1 -1
- package/dist/entity/stock-movement/stock-adjustment.entity.js +1 -1
- package/dist/entity/stock-movement/stock-adjustment.entity.js.map +1 -1
- package/dist/entity/stock-movement/stock-movement.entity.d.ts +4 -0
- package/dist/entity/stock-movement/stock-movement.entity.js +17 -5
- package/dist/entity/stock-movement/stock-movement.entity.js.map +1 -1
- package/dist/entity/subscribers.js +2 -1
- package/dist/entity/subscribers.js.map +1 -1
- package/dist/entity/surcharge/surcharge.entity.d.ts +1 -1
- package/dist/entity/surcharge/surcharge.entity.js +18 -15
- package/dist/entity/surcharge/surcharge.entity.js.map +1 -1
- package/dist/entity/tag/tag.entity.js +2 -2
- package/dist/entity/tag/tag.entity.js.map +1 -1
- package/dist/entity/tax-category/tax-category.entity.js +4 -4
- package/dist/entity/tax-category/tax-category.entity.js.map +1 -1
- package/dist/entity/tax-rate/tax-rate.entity.js +16 -13
- package/dist/entity/tax-rate/tax-rate.entity.js.map +1 -1
- package/dist/entity/user/user.entity.js +9 -9
- package/dist/entity/user/user.entity.js.map +1 -1
- package/dist/entity/validate-custom-fields-config.js +5 -3
- package/dist/entity/validate-custom-fields-config.js.map +1 -1
- package/dist/entity/zone/zone.entity.js +5 -5
- package/dist/entity/zone/zone.entity.js.map +1 -1
- package/dist/event-bus/event-bus.d.ts +10 -0
- package/dist/event-bus/event-bus.js +14 -2
- package/dist/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/event-bus.module.js +1 -1
- package/dist/event-bus/event-bus.module.js.map +1 -1
- package/dist/event-bus/events/administrator-event.d.ts +1 -1
- package/dist/event-bus/events/asset-event.d.ts +1 -1
- package/dist/event-bus/events/channel-event.d.ts +1 -1
- package/dist/event-bus/events/collection-event.d.ts +1 -1
- package/dist/event-bus/events/country-event.d.ts +1 -1
- package/dist/event-bus/events/customer-address-event.d.ts +1 -1
- package/dist/event-bus/events/customer-event.d.ts +1 -1
- package/dist/event-bus/events/customer-group-entity-event.d.ts +1 -1
- package/dist/event-bus/events/customer-group-event.d.ts +1 -1
- package/dist/event-bus/events/facet-event.d.ts +1 -1
- package/dist/event-bus/events/facet-value-event.d.ts +1 -1
- package/dist/event-bus/events/fulfillment-event.d.ts +4 -4
- package/dist/event-bus/events/history-entry-event.d.ts +1 -1
- package/dist/event-bus/events/payment-method-event.d.ts +1 -1
- package/dist/event-bus/events/product-event.d.ts +1 -1
- package/dist/event-bus/events/product-option-event.d.ts +1 -1
- package/dist/event-bus/events/product-option-group-event.d.ts +1 -1
- package/dist/event-bus/events/product-variant-event.d.ts +1 -1
- package/dist/event-bus/events/promotion-event.d.ts +1 -1
- package/dist/event-bus/events/role-event.d.ts +1 -1
- package/dist/event-bus/events/search-event.d.ts +1 -1
- package/dist/event-bus/events/shipping-method-event.d.ts +1 -1
- package/dist/event-bus/events/tax-category-event.d.ts +1 -1
- package/dist/event-bus/events/tax-rate-event.d.ts +1 -1
- package/dist/event-bus/events/zone-event.d.ts +1 -1
- package/dist/event-bus/index.js +5 -1
- package/dist/event-bus/index.js.map +1 -1
- package/dist/health-check/health-check.controller.js +3 -3
- package/dist/health-check/health-check.controller.js.map +1 -1
- package/dist/health-check/health-check.module.js +2 -2
- package/dist/health-check/health-check.module.js.map +1 -1
- package/dist/health-check/index.js +5 -1
- package/dist/health-check/index.js.map +1 -1
- package/dist/health-check/worker-health-indicator.js +2 -2
- package/dist/health-check/worker-health-indicator.js.map +1 -1
- package/dist/i18n/i18n.module.js +1 -1
- package/dist/i18n/i18n.module.js.map +1 -1
- package/dist/i18n/i18n.service.js +11 -5
- package/dist/i18n/i18n.service.js.map +1 -1
- package/dist/i18n/index.js +5 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/job-queue/in-memory-job-queue-strategy.d.ts +1 -1
- package/dist/job-queue/in-memory-job-queue-strategy.js +14 -15
- package/dist/job-queue/in-memory-job-queue-strategy.js.map +1 -1
- package/dist/job-queue/index.js +5 -1
- package/dist/job-queue/index.js.map +1 -1
- package/dist/job-queue/injectable-job-queue-strategy.d.ts +2 -2
- package/dist/job-queue/job-buffer/job-buffer.d.ts +1 -1
- package/dist/job-queue/job-buffer/job-buffer.service.js +2 -2
- package/dist/job-queue/job-buffer/job-buffer.service.js.map +1 -1
- package/dist/job-queue/job-queue.d.ts +1 -1
- package/dist/job-queue/job-queue.js +6 -6
- package/dist/job-queue/job-queue.js.map +1 -1
- package/dist/job-queue/job-queue.module.js +1 -1
- package/dist/job-queue/job-queue.module.js.map +1 -1
- package/dist/job-queue/job-queue.service.js +4 -4
- package/dist/job-queue/job-queue.service.js.map +1 -1
- package/dist/job-queue/job.d.ts +2 -2
- package/dist/job-queue/job.js +36 -27
- package/dist/job-queue/job.js.map +1 -1
- package/dist/job-queue/polling-job-queue-strategy.d.ts +3 -3
- package/dist/job-queue/polling-job-queue-strategy.js +12 -13
- package/dist/job-queue/polling-job-queue-strategy.js.map +1 -1
- package/dist/job-queue/subscribable-job.d.ts +2 -2
- package/dist/job-queue/subscribable-job.js +11 -10
- package/dist/job-queue/subscribable-job.js.map +1 -1
- package/dist/job-queue/types.d.ts +1 -1
- package/dist/migrate.js +19 -19
- package/dist/migrate.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.d.ts +1 -1
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.js +1 -1
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/job-record-buffer.entity.js +3 -3
- package/dist/plugin/default-job-queue-plugin/job-record-buffer.entity.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/job-record.entity.js +12 -12
- package/dist/plugin/default-job-queue-plugin/job-record.entity.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.js +6 -7
- package/dist/plugin/default-job-queue-plugin/sql-job-buffer-storage-strategy.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/sql-job-queue-strategy.d.ts +1 -1
- package/dist/plugin/default-job-queue-plugin/sql-job-queue-strategy.js +3 -3
- package/dist/plugin/default-job-queue-plugin/sql-job-queue-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/api/api-extensions.js +1 -1
- package/dist/plugin/default-search-plugin/api/api-extensions.js.map +1 -1
- package/dist/plugin/default-search-plugin/api/fulltext-search.resolver.d.ts +3 -2
- package/dist/plugin/default-search-plugin/api/fulltext-search.resolver.js +30 -30
- package/dist/plugin/default-search-plugin/api/fulltext-search.resolver.js.map +1 -1
- package/dist/plugin/default-search-plugin/default-search-plugin.js +8 -8
- package/dist/plugin/default-search-plugin/default-search-plugin.js.map +1 -1
- package/dist/plugin/default-search-plugin/entities/search-index-item.entity.js +28 -27
- package/dist/plugin/default-search-plugin/entities/search-index-item.entity.js.map +1 -1
- package/dist/plugin/default-search-plugin/fulltext-search.service.js +5 -5
- package/dist/plugin/default-search-plugin/fulltext-search.service.js.map +1 -1
- package/dist/plugin/default-search-plugin/index.js +5 -1
- package/dist/plugin/default-search-plugin/index.js.map +1 -1
- package/dist/plugin/default-search-plugin/indexer/indexer.controller.js +48 -31
- package/dist/plugin/default-search-plugin/indexer/indexer.controller.js.map +1 -1
- package/dist/plugin/default-search-plugin/indexer/mutable-request-context.js.map +1 -1
- package/dist/plugin/default-search-plugin/indexer/search-index.service.d.ts +12 -12
- package/dist/plugin/default-search-plugin/indexer/search-index.service.js +22 -14
- package/dist/plugin/default-search-plugin/indexer/search-index.service.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/collection-job-buffer.js +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/collection-job-buffer.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/search-index-job-buffer.js +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/search-index-job-buffer.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/search-job-buffer.service.js +4 -4
- package/dist/plugin/default-search-plugin/search-job-buffer/search-job-buffer.service.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +11 -11
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js +12 -12
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-common.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js +12 -8
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js +9 -9
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/types.d.ts +22 -22
- package/dist/plugin/dynamic-plugin-api.module.js +8 -8
- package/dist/plugin/dynamic-plugin-api.module.js.map +1 -1
- package/dist/plugin/index.js +5 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/plugin-common.module.js +1 -1
- package/dist/plugin/plugin-common.module.js.map +1 -1
- package/dist/plugin/plugin-utils.js +2 -2
- package/dist/plugin/plugin-utils.js.map +1 -1
- package/dist/plugin/plugin.module.js +2 -2
- package/dist/plugin/plugin.module.js.map +1 -1
- package/dist/plugin/vendure-plugin.d.ts +1 -1
- package/dist/plugin/vendure-plugin.js +3 -3
- package/dist/plugin/vendure-plugin.js.map +1 -1
- package/dist/process-context/process-context.d.ts +1 -1
- package/dist/process-context/process-context.module.js +2 -2
- package/dist/process-context/process-context.module.js.map +1 -1
- package/dist/service/helpers/active-order/active-order.service.d.ts +2 -2
- package/dist/service/helpers/active-order/active-order.service.js +8 -8
- package/dist/service/helpers/active-order/active-order.service.js.map +1 -1
- package/dist/service/helpers/config-arg/config-arg.service.d.ts +2 -2
- package/dist/service/helpers/config-arg/config-arg.service.js +2 -2
- package/dist/service/helpers/config-arg/config-arg.service.js.map +1 -1
- package/dist/service/helpers/custom-field-relation/custom-field-relation.service.js +10 -5
- package/dist/service/helpers/custom-field-relation/custom-field-relation.service.js.map +1 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js +7 -8
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js.map +1 -1
- package/dist/service/helpers/external-authentication/external-authentication.service.js +2 -2
- package/dist/service/helpers/external-authentication/external-authentication.service.js.map +1 -1
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state-machine.d.ts +7 -13
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state-machine.js +18 -48
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state-machine.js.map +1 -1
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state.d.ts +13 -5
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state.js +0 -18
- package/dist/service/helpers/fulfillment-state-machine/fulfillment-state.js.map +1 -1
- package/dist/service/helpers/list-query-builder/list-query-builder.d.ts +3 -3
- package/dist/service/helpers/list-query-builder/list-query-builder.js +25 -21
- package/dist/service/helpers/list-query-builder/list-query-builder.js.map +1 -1
- package/dist/service/helpers/list-query-builder/parse-filter-params.js +8 -6
- package/dist/service/helpers/list-query-builder/parse-filter-params.js.map +1 -1
- package/dist/service/helpers/list-query-builder/parse-sort-params.d.ts +1 -1
- package/dist/service/helpers/list-query-builder/parse-sort-params.js +4 -4
- package/dist/service/helpers/list-query-builder/parse-sort-params.js.map +1 -1
- package/dist/service/helpers/locale-string-hydrator/locale-string-hydrator.js +5 -3
- package/dist/service/helpers/locale-string-hydrator/locale-string-hydrator.js.map +1 -1
- package/dist/service/helpers/order-calculator/order-calculator.d.ts +3 -14
- package/dist/service/helpers/order-calculator/order-calculator.js +46 -118
- package/dist/service/helpers/order-calculator/order-calculator.js.map +1 -1
- package/dist/service/helpers/order-merger/order-merger.d.ts +5 -5
- package/dist/service/helpers/order-merger/order-merger.js +4 -4
- package/dist/service/helpers/order-merger/order-merger.js.map +1 -1
- package/dist/service/helpers/order-modifier/order-modifier.d.ts +4 -2
- package/dist/service/helpers/order-modifier/order-modifier.js +205 -104
- package/dist/service/helpers/order-modifier/order-modifier.js.map +1 -1
- package/dist/service/helpers/order-splitter/order-splitter.d.ts +16 -0
- package/dist/service/helpers/order-splitter/order-splitter.js +122 -0
- package/dist/service/helpers/order-splitter/order-splitter.js.map +1 -0
- package/dist/service/helpers/order-state-machine/order-state-machine.d.ts +6 -23
- package/dist/service/helpers/order-state-machine/order-state-machine.js +16 -188
- package/dist/service/helpers/order-state-machine/order-state-machine.js.map +1 -1
- package/dist/service/helpers/order-state-machine/order-state.d.ts +32 -4
- package/dist/service/helpers/order-state-machine/order-state.js +0 -64
- package/dist/service/helpers/order-state-machine/order-state.js.map +1 -1
- package/dist/service/helpers/password-cipher/password-cipher.js +1 -1
- package/dist/service/helpers/password-cipher/password-cipher.js.map +1 -1
- package/dist/service/helpers/payment-state-machine/payment-state-machine.d.ts +5 -10
- package/dist/service/helpers/payment-state-machine/payment-state-machine.js +16 -38
- package/dist/service/helpers/payment-state-machine/payment-state-machine.js.map +1 -1
- package/dist/service/helpers/payment-state-machine/payment-state.d.ts +10 -4
- package/dist/service/helpers/payment-state-machine/payment-state.js +0 -21
- package/dist/service/helpers/payment-state-machine/payment-state.js.map +1 -1
- package/dist/service/helpers/product-price-applicator/product-price-applicator.js +7 -8
- package/dist/service/helpers/product-price-applicator/product-price-applicator.js.map +1 -1
- package/dist/service/helpers/refund-state-machine/refund-state-machine.d.ts +4 -2
- package/dist/service/helpers/refund-state-machine/refund-state-machine.js +3 -2
- package/dist/service/helpers/refund-state-machine/refund-state-machine.js.map +1 -1
- package/dist/service/helpers/refund-state-machine/refund-state.d.ts +1 -1
- package/dist/service/helpers/request-context/request-context.service.d.ts +2 -1
- package/dist/service/helpers/request-context/request-context.service.js +12 -6
- package/dist/service/helpers/request-context/request-context.service.js.map +1 -1
- package/dist/service/helpers/shipping-calculator/shipping-calculator.d.ts +1 -1
- package/dist/service/helpers/shipping-calculator/shipping-calculator.js +1 -1
- package/dist/service/helpers/shipping-calculator/shipping-calculator.js.map +1 -1
- package/dist/service/helpers/slug-validator/slug-validator.d.ts +2 -2
- package/dist/service/helpers/slug-validator/slug-validator.js +7 -7
- package/dist/service/helpers/slug-validator/slug-validator.js.map +1 -1
- package/dist/service/helpers/translatable-saver/translatable-saver.js +3 -3
- package/dist/service/helpers/translatable-saver/translatable-saver.js.map +1 -1
- package/dist/service/helpers/translatable-saver/translation-differ.d.ts +1 -1
- package/dist/service/helpers/translatable-saver/translation-differ.js +2 -2
- package/dist/service/helpers/translatable-saver/translation-differ.js.map +1 -1
- package/dist/service/helpers/translator/translator.service.js +2 -2
- package/dist/service/helpers/translator/translator.service.js.map +1 -1
- package/dist/service/helpers/utils/get-user-channels-permissions.d.ts +1 -1
- package/dist/service/helpers/utils/get-user-channels-permissions.js +1 -1
- package/dist/service/helpers/utils/get-user-channels-permissions.js.map +1 -1
- package/dist/service/helpers/utils/move-to-index.js +2 -2
- package/dist/service/helpers/utils/move-to-index.js.map +1 -1
- package/dist/service/helpers/utils/order-utils.d.ts +5 -1
- package/dist/service/helpers/utils/order-utils.js +58 -27
- package/dist/service/helpers/utils/order-utils.js.map +1 -1
- package/dist/service/helpers/utils/patch-entity.d.ts +1 -1
- package/dist/service/helpers/utils/translate-entity.d.ts +5 -5
- package/dist/service/helpers/utils/translate-entity.js +1 -1
- package/dist/service/helpers/utils/translate-entity.js.map +1 -1
- package/dist/service/helpers/verification-token-generator/verification-token-generator.js +3 -3
- package/dist/service/helpers/verification-token-generator/verification-token-generator.js.map +1 -1
- package/dist/service/index.d.ts +7 -2
- package/dist/service/index.js +12 -3
- package/dist/service/index.js.map +1 -1
- package/dist/service/initializer.service.d.ts +5 -1
- package/dist/service/initializer.service.js +12 -4
- package/dist/service/initializer.service.js.map +1 -1
- package/dist/service/service.module.js +10 -2
- package/dist/service/service.module.js.map +1 -1
- package/dist/service/services/administrator.service.js +30 -18
- package/dist/service/services/administrator.service.js.map +1 -1
- package/dist/service/services/asset.service.d.ts +1 -0
- package/dist/service/services/asset.service.js +36 -27
- package/dist/service/services/asset.service.js.map +1 -1
- package/dist/service/services/auth.service.js +5 -5
- package/dist/service/services/auth.service.js.map +1 -1
- package/dist/service/services/channel.service.d.ts +7 -4
- package/dist/service/services/channel.service.js +64 -28
- package/dist/service/services/channel.service.js.map +1 -1
- package/dist/service/services/collection.service.d.ts +6 -1
- package/dist/service/services/collection.service.js +50 -30
- package/dist/service/services/collection.service.js.map +1 -1
- package/dist/service/services/country.service.js +5 -5
- package/dist/service/services/country.service.js.map +1 -1
- package/dist/service/services/customer-group.service.d.ts +1 -1
- package/dist/service/services/customer-group.service.js +13 -10
- package/dist/service/services/customer-group.service.js.map +1 -1
- package/dist/service/services/customer.service.d.ts +2 -2
- package/dist/service/services/customer.service.js +40 -37
- package/dist/service/services/customer.service.js.map +1 -1
- package/dist/service/services/facet-value.service.d.ts +1 -1
- package/dist/service/services/facet-value.service.js +9 -8
- package/dist/service/services/facet-value.service.js.map +1 -1
- package/dist/service/services/facet.service.js +26 -17
- package/dist/service/services/facet.service.js.map +1 -1
- package/dist/service/services/fulfillment.service.d.ts +6 -24
- package/dist/service/services/fulfillment.service.js +50 -70
- package/dist/service/services/fulfillment.service.js.map +1 -1
- package/dist/service/services/global-settings.service.d.ts +3 -1
- package/dist/service/services/global-settings.service.js +16 -11
- package/dist/service/services/global-settings.service.js.map +1 -1
- package/dist/service/services/history.service.d.ts +5 -5
- package/dist/service/services/history.service.js +3 -3
- package/dist/service/services/history.service.js.map +1 -1
- package/dist/service/services/order-testing.service.js +11 -18
- package/dist/service/services/order-testing.service.js.map +1 -1
- package/dist/service/services/order.service.d.ts +11 -18
- package/dist/service/services/order.service.js +250 -411
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/payment-method.service.d.ts +5 -1
- package/dist/service/services/payment-method.service.js +62 -35
- package/dist/service/services/payment-method.service.js.map +1 -1
- package/dist/service/services/payment.service.d.ts +2 -3
- package/dist/service/services/payment.service.js +74 -20
- package/dist/service/services/payment.service.js.map +1 -1
- package/dist/service/services/product-option-group.service.js +19 -16
- package/dist/service/services/product-option-group.service.js.map +1 -1
- package/dist/service/services/product-option.service.d.ts +1 -1
- package/dist/service/services/product-option.service.js +11 -10
- package/dist/service/services/product-option.service.js.map +1 -1
- package/dist/service/services/product-variant.service.d.ts +4 -2
- package/dist/service/services/product-variant.service.js +51 -32
- package/dist/service/services/product-variant.service.js.map +1 -1
- package/dist/service/services/product.service.js +43 -36
- package/dist/service/services/product.service.js.map +1 -1
- package/dist/service/services/promotion.service.d.ts +7 -3
- package/dist/service/services/promotion.service.js +80 -55
- package/dist/service/services/promotion.service.js.map +1 -1
- package/dist/service/services/role.service.js +20 -16
- package/dist/service/services/role.service.js.map +1 -1
- package/dist/service/services/search.service.js +2 -2
- package/dist/service/services/search.service.js.map +1 -1
- package/dist/service/services/seller.service.d.ts +25 -0
- package/dist/service/services/seller.service.js +79 -0
- package/dist/service/services/seller.service.js.map +1 -0
- package/dist/service/services/session.service.d.ts +3 -3
- package/dist/service/services/session.service.js +22 -19
- package/dist/service/services/session.service.js.map +1 -1
- package/dist/service/services/shipping-method.service.js +15 -12
- package/dist/service/services/shipping-method.service.js.map +1 -1
- package/dist/service/services/stock-level.service.d.ts +43 -0
- package/dist/service/services/stock-level.service.js +125 -0
- package/dist/service/services/stock-level.service.js.map +1 -0
- package/dist/service/services/stock-location.service.d.ts +34 -0
- package/dist/service/services/stock-location.service.js +129 -0
- package/dist/service/services/stock-location.service.js.map +1 -0
- package/dist/service/services/stock-movement.service.d.ts +14 -13
- package/dist/service/services/stock-movement.service.js +128 -105
- package/dist/service/services/stock-movement.service.js.map +1 -1
- package/dist/service/services/tag.service.js +6 -3
- package/dist/service/services/tag.service.js.map +1 -1
- package/dist/service/services/tax-category.service.js +9 -6
- package/dist/service/services/tax-category.service.js.map +1 -1
- package/dist/service/services/tax-rate.service.d.ts +2 -2
- package/dist/service/services/tax-rate.service.js +14 -10
- package/dist/service/services/tax-rate.service.js.map +1 -1
- package/dist/service/services/user.service.js +26 -13
- package/dist/service/services/user.service.js.map +1 -1
- package/dist/service/services/zone.service.js +12 -10
- package/dist/service/services/zone.service.js.map +1 -1
- package/dist/worker/index.js +5 -1
- package/dist/worker/index.js.map +1 -1
- package/dist/worker/worker-health.service.js +2 -2
- package/dist/worker/worker-health.service.js.map +1 -1
- package/dist/worker/worker.module.js +1 -1
- package/dist/worker/worker.module.js.map +1 -1
- package/package.json +105 -103
- package/dist/api/resolvers/entity/order-item-entity.resolver.d.ts +0 -10
- package/dist/api/resolvers/entity/order-item-entity.resolver.js +0 -52
- package/dist/api/resolvers/entity/order-item-entity.resolver.js.map +0 -1
- package/dist/api/schema/admin-api/asset-admin.type.graphql +0 -3
- package/dist/config/entity-id-strategy/auto-increment-id-strategy.js.map +0 -1
- package/dist/config/entity-id-strategy/entity-id-strategy.js.map +0 -1
- package/dist/config/entity-id-strategy/uuid-id-strategy.js.map +0 -1
- package/dist/config/fulfillment/custom-fulfillment-process.js.map +0 -1
- package/dist/config/order/custom-order-process.js.map +0 -1
- package/dist/config/payment/custom-payment-process.js.map +0 -1
- package/dist/connection/remove-custom-fields-with-eager-relations.d.ts +0 -34
- package/dist/connection/remove-custom-fields-with-eager-relations.js +0 -58
- package/dist/connection/remove-custom-fields-with-eager-relations.js.map +0 -1
- package/dist/entity/order-item/order-item.entity.d.ts +0 -97
- package/dist/entity/order-item/order-item.entity.js +0 -228
- package/dist/entity/order-item/order-item.entity.js.map +0 -1
- package/dist/service/helpers/list-query-builder/parse-channel-param.d.ts +0 -9
- package/dist/service/helpers/list-query-builder/parse-channel-param.js +0 -22
- package/dist/service/helpers/list-query-builder/parse-channel-param.js.map +0 -1
- /package/dist/config/{entity-id-strategy → entity}/auto-increment-id-strategy.d.ts +0 -0
- /package/dist/config/{entity-id-strategy → entity}/auto-increment-id-strategy.js +0 -0
- /package/dist/config/{entity-id-strategy → entity}/entity-id-strategy.js +0 -0
- /package/dist/config/{entity-id-strategy → entity}/uuid-id-strategy.d.ts +0 -0
- /package/dist/config/{entity-id-strategy → entity}/uuid-id-strategy.js +0 -0
|
@@ -34,7 +34,7 @@ class SqliteSearchStrategy {
|
|
|
34
34
|
facetValuesQb.andWhere('si.enabled = :enabled', { enabled: true });
|
|
35
35
|
}
|
|
36
36
|
const facetValuesResult = await facetValuesQb.getRawMany();
|
|
37
|
-
return search_strategy_utils_1.createFacetIdCountMap(facetValuesResult);
|
|
37
|
+
return (0, search_strategy_utils_1.createFacetIdCountMap)(facetValuesResult);
|
|
38
38
|
}
|
|
39
39
|
async getCollectionIds(ctx, input, enabledOnly) {
|
|
40
40
|
const collectionsQb = this.connection
|
|
@@ -50,7 +50,7 @@ class SqliteSearchStrategy {
|
|
|
50
50
|
collectionsQb.andWhere('si.enabled = :enabled', { enabled: true });
|
|
51
51
|
}
|
|
52
52
|
const collectionsResult = await collectionsQb.getRawMany();
|
|
53
|
-
return search_strategy_utils_1.createCollectionIdCountMap(collectionsResult);
|
|
53
|
+
return (0, search_strategy_utils_1.createCollectionIdCountMap)(collectionsResult);
|
|
54
54
|
}
|
|
55
55
|
async getSearchResults(ctx, input, enabledOnly) {
|
|
56
56
|
const take = input.take || 25;
|
|
@@ -83,7 +83,7 @@ class SqliteSearchStrategy {
|
|
|
83
83
|
.limit(take)
|
|
84
84
|
.offset(skip)
|
|
85
85
|
.getRawMany()
|
|
86
|
-
.then(res => res.map(r => search_strategy_utils_1.mapToSearchResult(r, ctx.channel.
|
|
86
|
+
.then(res => res.map(r => (0, search_strategy_utils_1.mapToSearchResult)(r, ctx.channel.defaultCurrencyCode)));
|
|
87
87
|
}
|
|
88
88
|
async getTotalCount(ctx, input, enabledOnly) {
|
|
89
89
|
const innerQb = this.applyTermAndFilters(ctx, this.connection.getRepository(ctx, search_index_item_entity_1.SearchIndexItem).createQueryBuilder('si'), input);
|
|
@@ -127,7 +127,7 @@ class SqliteSearchStrategy {
|
|
|
127
127
|
if (facetValueIds === null || facetValueIds === void 0 ? void 0 : facetValueIds.length) {
|
|
128
128
|
qb.andWhere(new typeorm_1.Brackets(qb1 => {
|
|
129
129
|
for (const id of facetValueIds) {
|
|
130
|
-
const placeholder = search_strategy_utils_1.createPlaceholderFromId(id);
|
|
130
|
+
const placeholder = (0, search_strategy_utils_1.createPlaceholderFromId)(id);
|
|
131
131
|
const clause = `(',' || si.facetValueIds || ',') LIKE :${placeholder}`;
|
|
132
132
|
const params = { [placeholder]: `%,${id},%` };
|
|
133
133
|
if (facetValueOperator === generated_types_1.LogicalOperator.AND) {
|
|
@@ -148,14 +148,14 @@ class SqliteSearchStrategy {
|
|
|
148
148
|
throw new errors_1.UserInputError('error.facetfilterinput-invalid-input');
|
|
149
149
|
}
|
|
150
150
|
if (facetValueFilter.and) {
|
|
151
|
-
const placeholder = search_strategy_utils_1.createPlaceholderFromId(facetValueFilter.and);
|
|
151
|
+
const placeholder = (0, search_strategy_utils_1.createPlaceholderFromId)(facetValueFilter.and);
|
|
152
152
|
const clause = `(',' || si.facetValueIds || ',') LIKE :${placeholder}`;
|
|
153
153
|
const params = { [placeholder]: `%,${facetValueFilter.and},%` };
|
|
154
154
|
qb2.where(clause, params);
|
|
155
155
|
}
|
|
156
156
|
if ((_b = facetValueFilter.or) === null || _b === void 0 ? void 0 : _b.length) {
|
|
157
157
|
for (const id of facetValueFilter.or) {
|
|
158
|
-
const placeholder = search_strategy_utils_1.createPlaceholderFromId(id);
|
|
158
|
+
const placeholder = (0, search_strategy_utils_1.createPlaceholderFromId)(id);
|
|
159
159
|
const clause = `(',' || si.facetValueIds || ',') LIKE :${placeholder}`;
|
|
160
160
|
const params = { [placeholder]: `%,${id},%` };
|
|
161
161
|
qb2.orWhere(clause, params);
|
|
@@ -166,16 +166,16 @@ class SqliteSearchStrategy {
|
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
168
168
|
if (collectionId) {
|
|
169
|
-
qb.andWhere(
|
|
169
|
+
qb.andWhere("(',' || si.collectionIds || ',') LIKE :collectionId", {
|
|
170
170
|
collectionId: `%,${collectionId},%`,
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
if (collectionSlug) {
|
|
174
|
-
qb.andWhere(
|
|
174
|
+
qb.andWhere("(',' || si.collectionSlugs || ',') LIKE :collectionSlug", {
|
|
175
175
|
collectionSlug: `%,${collectionSlug},%`,
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
search_strategy_utils_1.applyLanguageConstraints(qb, ctx.languageCode, ctx.channel.defaultLanguageCode);
|
|
178
|
+
(0, search_strategy_utils_1.applyLanguageConstraints)(qb, ctx.languageCode, ctx.channel.defaultLanguageCode);
|
|
179
179
|
qb.andWhere('si.channelId = :channelId', { channelId: ctx.channelId });
|
|
180
180
|
if (input.groupByProduct === true) {
|
|
181
181
|
qb.groupBy('si.productId');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-search-strategy.js","sourceRoot":"","sources":["../../../../src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts"],"names":[],"mappings":";;;AAAA,yEAAoF;AAEpF,qCAAuD;AAEvD,gCAA+C;AAG/C,yDAA8D;AAC9D,2FAAuF;AACvF,mFAAuE;AAIvE,mEAMiC;AAEjC;;;GAGG;AACH,MAAa,oBAAoB;IAAjC;QACqB,kBAAa,GAAG,CAAC,CAAC;IAuNvC,CAAC;IAnNG,KAAK,CAAC,IAAI,CAAC,QAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,kDAAuB,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,uBAAmB,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,gBAAgB,CAClB,GAAmB,EACnB,KAAkB,EAClB,WAAoB;QAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU;aAChC,aAAa,CAAC,GAAG,EAAE,0CAAe,CAAC;aACnC,kBAAkB,CAAC,IAAI,CAAC;aACxB,MAAM,CAAC,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC;aAC/C,SAAS,CAAC,gCAAgC,EAAE,aAAa,CAAC,CAAC;QAEhE,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;YACvB,aAAa,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;SAChD;QACD,IAAI,WAAW,EAAE;YACb,aAAa,CAAC,QAAQ,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SACtE;QACD,MAAM,iBAAiB,GAAG,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC;QAC3D,OAAO,6CAAqB,
|
|
1
|
+
{"version":3,"file":"sqlite-search-strategy.js","sourceRoot":"","sources":["../../../../src/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.ts"],"names":[],"mappings":";;;AAAA,yEAAoF;AAEpF,qCAAuD;AAEvD,gCAA+C;AAG/C,yDAA8D;AAC9D,2FAAuF;AACvF,mFAAuE;AAIvE,mEAMiC;AAEjC;;;GAGG;AACH,MAAa,oBAAoB;IAAjC;QACqB,kBAAa,GAAG,CAAC,CAAC;IAuNvC,CAAC;IAnNG,KAAK,CAAC,IAAI,CAAC,QAAkB;QACzB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,kDAAuB,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,uBAAmB,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,gBAAgB,CAClB,GAAmB,EACnB,KAAkB,EAClB,WAAoB;QAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU;aAChC,aAAa,CAAC,GAAG,EAAE,0CAAe,CAAC;aACnC,kBAAkB,CAAC,IAAI,CAAC;aACxB,MAAM,CAAC,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC;aAC/C,SAAS,CAAC,gCAAgC,EAAE,aAAa,CAAC,CAAC;QAEhE,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;QACpD,IA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YACL,CAAC,CAAC,CACL,CAAC;SACL;QACD,IAAI,YAAY,EAAE;YACd,EAAE,CAAC,QAAQ,CAAC,qDAAqD,EAAE;gBAC/D,YAAY,EAAE,KAAK,YAAY,IAAI;aACtC,CAAC,CAAC;SACN;QACD,IAAI,cAAc,EAAE;YAChB,EAAE,CAAC,QAAQ,CAAC,yDAAyD,EAAE;gBACnE,cAAc,EAAE,KAAK,cAAc,IAAI;aAC1C,CAAC,CAAC;SACN;QAED,IAAA,gDAAwB,EAAC,EAAE,EAAE,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAChF,EAAE,CAAC,QAAQ,CAAC,2BAA2B,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;QAEvE,IAAI,KAAK,CAAC,cAAc,KAAK,IAAI,EAAE;YAC/B,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;SAC9B;QAED,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAxND,oDAwNC"}
|
|
@@ -126,54 +126,54 @@ export interface DefaultSearchPluginInitOptions {
|
|
|
126
126
|
export interface SearchInput extends GeneratedSearchInput {
|
|
127
127
|
inStock?: boolean;
|
|
128
128
|
}
|
|
129
|
-
export
|
|
129
|
+
export type ReindexMessageResponse = {
|
|
130
130
|
total: number;
|
|
131
131
|
completed: number;
|
|
132
132
|
duration: number;
|
|
133
133
|
};
|
|
134
|
-
export
|
|
134
|
+
export type ReindexMessageData = {
|
|
135
135
|
ctx: SerializedRequestContext;
|
|
136
136
|
};
|
|
137
|
-
export
|
|
137
|
+
export type UpdateProductMessageData = {
|
|
138
138
|
ctx: SerializedRequestContext;
|
|
139
139
|
productId: ID;
|
|
140
140
|
};
|
|
141
|
-
export
|
|
141
|
+
export type UpdateVariantMessageData = {
|
|
142
142
|
ctx: SerializedRequestContext;
|
|
143
143
|
variantIds: ID[];
|
|
144
144
|
};
|
|
145
|
-
export
|
|
145
|
+
export type UpdateVariantsByIdMessageData = {
|
|
146
146
|
ctx: SerializedRequestContext;
|
|
147
147
|
ids: ID[];
|
|
148
148
|
};
|
|
149
|
-
export
|
|
149
|
+
export type UpdateAssetMessageData = {
|
|
150
150
|
ctx: SerializedRequestContext;
|
|
151
151
|
asset: JsonCompatible<Required<Asset>>;
|
|
152
152
|
};
|
|
153
|
-
export
|
|
153
|
+
export type ProductChannelMessageData = {
|
|
154
154
|
ctx: SerializedRequestContext;
|
|
155
155
|
productId: ID;
|
|
156
156
|
channelId: ID;
|
|
157
157
|
};
|
|
158
|
-
export
|
|
158
|
+
export type VariantChannelMessageData = {
|
|
159
159
|
ctx: SerializedRequestContext;
|
|
160
160
|
productVariantId: ID;
|
|
161
161
|
channelId: ID;
|
|
162
162
|
};
|
|
163
|
-
|
|
163
|
+
type NamedJobData<Type extends string, MessageData> = {
|
|
164
164
|
type: Type;
|
|
165
165
|
} & MessageData;
|
|
166
|
-
export
|
|
167
|
-
export
|
|
168
|
-
export
|
|
169
|
-
export
|
|
170
|
-
export
|
|
171
|
-
export
|
|
172
|
-
export
|
|
173
|
-
export
|
|
174
|
-
export
|
|
175
|
-
export
|
|
176
|
-
export
|
|
177
|
-
export
|
|
178
|
-
export
|
|
166
|
+
export type ReindexJobData = NamedJobData<'reindex', ReindexMessageData>;
|
|
167
|
+
export type UpdateProductJobData = NamedJobData<'update-product', UpdateProductMessageData>;
|
|
168
|
+
export type UpdateVariantsJobData = NamedJobData<'update-variants', UpdateVariantMessageData>;
|
|
169
|
+
export type DeleteProductJobData = NamedJobData<'delete-product', UpdateProductMessageData>;
|
|
170
|
+
export type DeleteVariantJobData = NamedJobData<'delete-variant', UpdateVariantMessageData>;
|
|
171
|
+
export type UpdateVariantsByIdJobData = NamedJobData<'update-variants-by-id', UpdateVariantsByIdMessageData>;
|
|
172
|
+
export type UpdateAssetJobData = NamedJobData<'update-asset', UpdateAssetMessageData>;
|
|
173
|
+
export type DeleteAssetJobData = NamedJobData<'delete-asset', UpdateAssetMessageData>;
|
|
174
|
+
export type AssignProductToChannelJobData = NamedJobData<'assign-product-to-channel', ProductChannelMessageData>;
|
|
175
|
+
export type RemoveProductFromChannelJobData = NamedJobData<'remove-product-from-channel', ProductChannelMessageData>;
|
|
176
|
+
export type AssignVariantToChannelJobData = NamedJobData<'assign-variant-to-channel', VariantChannelMessageData>;
|
|
177
|
+
export type RemoveVariantFromChannelJobData = NamedJobData<'remove-variant-from-channel', VariantChannelMessageData>;
|
|
178
|
+
export type UpdateIndexQueueJobData = ReindexJobData | UpdateProductJobData | UpdateVariantsJobData | DeleteProductJobData | DeleteVariantJobData | UpdateVariantsByIdJobData | UpdateAssetJobData | DeleteAssetJobData | AssignProductToChannelJobData | RemoveProductFromChannelJobData | AssignVariantToChannelJobData | RemoveVariantFromChannelJobData;
|
|
179
179
|
export {};
|
|
@@ -10,16 +10,16 @@ const dynamicApiModuleClassMap = {};
|
|
|
10
10
|
* any configured plugins.
|
|
11
11
|
*/
|
|
12
12
|
function createDynamicGraphQlModulesForPlugins(apiType) {
|
|
13
|
-
return config_helpers_1.getConfig()
|
|
13
|
+
return (0, config_helpers_1.getConfig)()
|
|
14
14
|
.plugins.map(plugin => {
|
|
15
|
-
const pluginModule = plugin_metadata_1.isDynamicModule(plugin) ? plugin.module : plugin;
|
|
16
|
-
const resolvers = plugin_metadata_1.graphQLResolversFor(plugin, apiType) || [];
|
|
15
|
+
const pluginModule = (0, plugin_metadata_1.isDynamicModule)(plugin) ? plugin.module : plugin;
|
|
16
|
+
const resolvers = (0, plugin_metadata_1.graphQLResolversFor)(plugin, apiType) || [];
|
|
17
17
|
if (resolvers.length) {
|
|
18
18
|
const className = dynamicClassName(pluginModule, apiType);
|
|
19
19
|
dynamicApiModuleClassMap[className] = class {
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(dynamicApiModuleClassMap[className], 'name', { value: className });
|
|
22
|
-
const { imports } = plugin_metadata_1.getModuleMetadata(pluginModule);
|
|
22
|
+
const { imports } = (0, plugin_metadata_1.getModuleMetadata)(pluginModule);
|
|
23
23
|
return {
|
|
24
24
|
module: dynamicApiModuleClassMap[className],
|
|
25
25
|
imports: [pluginModule, ...imports],
|
|
@@ -34,10 +34,10 @@ exports.createDynamicGraphQlModulesForPlugins = createDynamicGraphQlModulesForPl
|
|
|
34
34
|
* This function retrieves any dynamic modules which were created with createDynamicGraphQlModulesForPlugins.
|
|
35
35
|
*/
|
|
36
36
|
function getDynamicGraphQlModulesForPlugins(apiType) {
|
|
37
|
-
return config_helpers_1.getConfig()
|
|
37
|
+
return (0, config_helpers_1.getConfig)()
|
|
38
38
|
.plugins.map(plugin => {
|
|
39
|
-
const pluginModule = plugin_metadata_1.isDynamicModule(plugin) ? plugin.module : plugin;
|
|
40
|
-
const resolvers = plugin_metadata_1.graphQLResolversFor(plugin, apiType) || [];
|
|
39
|
+
const pluginModule = (0, plugin_metadata_1.isDynamicModule)(plugin) ? plugin.module : plugin;
|
|
40
|
+
const resolvers = (0, plugin_metadata_1.graphQLResolversFor)(plugin, apiType) || [];
|
|
41
41
|
const className = dynamicClassName(pluginModule, apiType);
|
|
42
42
|
return dynamicApiModuleClassMap[className];
|
|
43
43
|
})
|
|
@@ -45,6 +45,6 @@ function getDynamicGraphQlModulesForPlugins(apiType) {
|
|
|
45
45
|
}
|
|
46
46
|
exports.getDynamicGraphQlModulesForPlugins = getDynamicGraphQlModulesForPlugins;
|
|
47
47
|
function dynamicClassName(module, apiType) {
|
|
48
|
-
return module.name +
|
|
48
|
+
return module.name + 'Dynamic' + (apiType === 'shop' ? 'Shop' : 'Admin') + 'Module';
|
|
49
49
|
}
|
|
50
50
|
//# sourceMappingURL=dynamic-plugin-api.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-plugin-api.module.js","sourceRoot":"","sources":["../../src/plugin/dynamic-plugin-api.module.ts"],"names":[],"mappings":";;;AAEA,mEAAsE;AAEtE,6DAAqD;AAErD,uDAA4F;AAE5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sFAmBC;AAED;;GAEG;AACH,SAAgB,kCAAkC,CAAC,OAAyB;IACxE,OAAO,IAAA,0BAAS,GAAE;SACb,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QAClB,MAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QACtE,MAAM,SAAS,GAAG,IAAA,qCAAmB,EAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;QAE7D,MAAM,SAAS,GAAG,gBAAgB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC,CAAC;SACD,MAAM,CAAC,iCAAkB,CAAC,CAAC;AACpC,CAAC;AAVD,gFAUC;AAED,SAAS,gBAAgB,CAAC,MAAiB,EAAE,OAAyB;IAClE,OAAO,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC;AACxF,CAAC"}
|
package/dist/plugin/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/plugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,sFAAoE;AACpE,sFAAoE;AACpE,6FAA2E;AAC3E,mDAAiC;AACjC,yDAAuC;AACvC,iDAA+B"}
|
|
@@ -37,7 +37,7 @@ const service_module_1 = require("../service/service.module");
|
|
|
37
37
|
let PluginCommonModule = class PluginCommonModule {
|
|
38
38
|
};
|
|
39
39
|
PluginCommonModule = __decorate([
|
|
40
|
-
common_1.Module({
|
|
40
|
+
(0, common_1.Module)({
|
|
41
41
|
imports: [
|
|
42
42
|
event_bus_module_1.EventBusModule,
|
|
43
43
|
config_module_1.ConfigModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-common.module.js","sourceRoot":"","sources":["../../src/plugin/plugin-common.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,wDAAoD;AACpD,2DAAuD;AACvD,uEAAmE;AACnE,0EAAqE;AACrE,oEAA+D;AAC/D,6EAAwE;AACxE,qDAAiD;AACjD,oEAA+D;AAC/D,sFAAiF;AACjF,8DAA0D;AAE1D;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"plugin-common.module.js","sourceRoot":"","sources":["../../src/plugin/plugin-common.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AAExC,wDAAoD;AACpD,2DAAuD;AACvD,uEAAmE;AACnE,0EAAqE;AACrE,oEAA+D;AAC/D,6EAAwE;AACxE,qDAAiD;AACjD,oEAA+D;AAC/D,sFAAiF;AACjF,8DAA0D;AAE1D;;;;;;;;;;;;;;;GAeG;AA2BI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IA1B9B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,iCAAc;YACd,4BAAY;YACZ,oCAAgB,CAAC,SAAS,EAAE;YAC5B,8BAAa;YACb,iCAAc;YACd,uCAAiB;YACjB,0BAAW;YACX,wBAAU;YACV,6CAAoB;YACpB,qCAAgB;SACnB;QACD,OAAO,EAAE;YACL,iCAAc;YACd,4BAAY;YACZ,oCAAgB,CAAC,SAAS,EAAE;YAC5B,8BAAa;YACb,iCAAc;YACd,uCAAiB;YACjB,0BAAW;YACX,wBAAU;YACV,6CAAoB;YACpB,qCAAgB;SACnB;KACJ,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
|
|
@@ -37,11 +37,11 @@ const config_1 = require("../config");
|
|
|
37
37
|
function createProxyHandler(options) {
|
|
38
38
|
const route = options.route.charAt(0) === '/' ? options.route : '/' + options.route;
|
|
39
39
|
const proxyHostname = options.hostname || 'localhost';
|
|
40
|
-
const middleware = http_proxy_middleware_1.createProxyMiddleware({
|
|
40
|
+
const middleware = (0, http_proxy_middleware_1.createProxyMiddleware)({
|
|
41
41
|
// TODO: how do we detect https?
|
|
42
42
|
target: `http://${proxyHostname}:${options.port}`,
|
|
43
43
|
pathRewrite: {
|
|
44
|
-
[`^${route}`]:
|
|
44
|
+
[`^${route}`]: '/' + (options.basePath || ''),
|
|
45
45
|
},
|
|
46
46
|
logProvider(provider) {
|
|
47
47
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utils.js","sourceRoot":"","sources":["../../src/plugin/plugin-utils.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAE9D,sCAAwE;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,kBAAkB,CAAC,OAAqB;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,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O,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;gBACxC,CAAC;gBACD,KAAK,CAAC,OAAe;oBACjB,eAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;gBACzC,CAAC;aACJ,CAAC;QACN,CAAC;KACJ,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACtB,CAAC;AA9BD,gDA8BC;AAwCD,MAAM,qBAAqB,GAA2C,EAAE,CAAC;AAEzE;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,WAAmB,EAAE,IAAY;IAC1E,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC;AAFD,oEAEC;AAED,SAAgB,wBAAwB;IACpC,OAAO,qBAAqB,CAAC;AACjC,CAAC;AAFD,4DAEC"}
|
|
@@ -19,12 +19,12 @@ let PluginModule = PluginModule_1 = class PluginModule {
|
|
|
19
19
|
static forRoot() {
|
|
20
20
|
return {
|
|
21
21
|
module: PluginModule_1,
|
|
22
|
-
imports: [...config_helpers_1.getConfig().plugins],
|
|
22
|
+
imports: [...(0, config_helpers_1.getConfig)().plugins],
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
PluginModule = PluginModule_1 = __decorate([
|
|
27
|
-
common_1.Module({
|
|
27
|
+
(0, common_1.Module)({
|
|
28
28
|
imports: [config_module_1.ConfigModule],
|
|
29
29
|
})
|
|
30
30
|
], PluginModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../src/plugin/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AAEvD,6DAAqD;AACrD,2DAAuD;AAIvD;;;GAGG;
|
|
1
|
+
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../src/plugin/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AAEvD,6DAAqD;AACrD,2DAAuD;AAIvD;;;GAGG;AAII,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACrB,MAAM,CAAC,OAAO;QACV,OAAO;YACH,MAAM,EAAE,cAAY;YACpB,OAAO,EAAE,CAAC,GAAG,IAAA,0BAAS,GAAE,CAAC,OAAO,CAAC;SACpC,CAAC;IACN,CAAC;CACJ,CAAA;AAPY,YAAY;IAHxB,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,4BAAY,CAAC;KAC1B,CAAC;GACW,YAAY,CAOxB;AAPY,oCAAY"}
|
|
@@ -80,7 +80,7 @@ export interface APIExtensionDefinition {
|
|
|
80
80
|
* @docsCategory plugin
|
|
81
81
|
* @docsPage VendurePluginMetadata
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
83
|
+
export type PluginConfigurationFn = (config: RuntimeVendureConfig) => RuntimeVendureConfig | Promise<RuntimeVendureConfig>;
|
|
84
84
|
/**
|
|
85
85
|
* @description
|
|
86
86
|
* The VendurePlugin decorator is a means of configuring and/or extending the functionality of the Vendure server. A Vendure plugin is
|
|
@@ -42,7 +42,7 @@ const plugin_metadata_1 = require("./plugin-metadata");
|
|
|
42
42
|
* @docsCategory plugin
|
|
43
43
|
*/
|
|
44
44
|
function VendurePlugin(pluginMetadata) {
|
|
45
|
-
//
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
46
46
|
return (target) => {
|
|
47
47
|
for (const metadataProperty of Object.values(plugin_metadata_1.PLUGIN_METADATA)) {
|
|
48
48
|
const property = metadataProperty;
|
|
@@ -50,7 +50,7 @@ function VendurePlugin(pluginMetadata) {
|
|
|
50
50
|
Reflect.defineMetadata(property, pluginMetadata[property], target);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
const nestModuleMetadata = pick_1.pick(pluginMetadata, Object.values(constants_1.MODULE_METADATA));
|
|
53
|
+
const nestModuleMetadata = (0, pick_1.pick)(pluginMetadata, Object.values(constants_1.MODULE_METADATA));
|
|
54
54
|
// Automatically add any of the Plugin's "providers" to the "exports" array. This is done
|
|
55
55
|
// because when a plugin defines GraphQL resolvers, these resolvers are used to dynamically
|
|
56
56
|
// created a new Module in the ApiModule, and if those resolvers depend on any providers,
|
|
@@ -67,7 +67,7 @@ function VendurePlugin(pluginMetadata) {
|
|
|
67
67
|
return true;
|
|
68
68
|
});
|
|
69
69
|
nestModuleMetadata.exports = [...(nestModuleMetadata.exports || []), ...exportedProviders];
|
|
70
|
-
common_1.Module(nestModuleMetadata)(target);
|
|
70
|
+
(0, common_1.Module)(nestModuleMetadata)(target);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
exports.VendurePlugin = VendurePlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendure-plugin.js","sourceRoot":"","sources":["../../src/plugin/vendure-plugin.ts"],"names":[],"mappings":";;;AAAA,2CAAoE;AACpE,wDAA2D;AAE3D,uCAAgF;AAChF,mDAAgD;AAMhD,uDAAoD;AAsFpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,aAAa,CAAC,cAAqC;IAC/D,
|
|
1
|
+
{"version":3,"file":"vendure-plugin.js","sourceRoot":"","sources":["../../src/plugin/vendure-plugin.ts"],"names":[],"mappings":";;;AAAA,2CAAoE;AACpE,wDAA2D;AAE3D,uCAAgF;AAChF,mDAAgD;AAMhD,uDAAoD;AAsFpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,aAAa,CAAC,cAAqC;IAC/D,wDAAwD;IACxD,OAAO,CAAC,MAAgB,EAAE,EAAE;QACxB,KAAK,MAAM,gBAAgB,IAAI,MAAM,CAAC,MAAM,CAAC,iCAAe,CAAC,EAAE;YAC3D,MAAM,QAAQ,GAAG,gBAA+C,CAAC;YACjE,IAAI,cAAc,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE;gBAClC,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;aACtE;SACJ;QACD,MAAM,kBAAkB,GAAG,IAAA,WAAI,EAAC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,2BAAe,CAAQ,CAAC,CAAC;QACvF,yFAAyF;QACzF,2FAA2F;QAC3F,yFAAyF;QACzF,uFAAuF;QACvF,0BAA0B;QAC1B,uGAAuG;QACvG,MAAM,wBAAwB,GAAG,CAAC,sBAAe,EAAE,iBAAU,EAAE,gBAAS,EAAE,eAAQ,CAAC,CAAC;QACpF,MAAM,iBAAiB,GAAG,CAAC,kBAAkB,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YAC7E,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE;gBAC3B,IAAI,wBAAwB,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAc,CAAC,EAAE;oBAC5D,OAAO,KAAK,CAAC;iBAChB;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,kBAAkB,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,kBAAkB,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,GAAG,iBAAiB,CAAC,CAAC;QAC3F,IAAA,eAAM,EAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC;AACN,CAAC;AA5BD,sCA4BC;AAED,SAAS,eAAe,CAAC,QAAkB;IACvC,OAAO,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -12,8 +12,8 @@ const process_context_1 = require("./process-context");
|
|
|
12
12
|
let ProcessContextModule = class ProcessContextModule {
|
|
13
13
|
};
|
|
14
14
|
ProcessContextModule = __decorate([
|
|
15
|
-
common_1.Global(),
|
|
16
|
-
common_1.Module({
|
|
15
|
+
(0, common_1.Global)(),
|
|
16
|
+
(0, common_1.Module)({
|
|
17
17
|
providers: [process_context_1.ProcessContext],
|
|
18
18
|
exports: [process_context_1.ProcessContext],
|
|
19
19
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-context.module.js","sourceRoot":"","sources":["../../src/process-context/process-context.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+D;AAE/D,uDAAmD;
|
|
1
|
+
{"version":3,"file":"process-context.module.js","sourceRoot":"","sources":["../../src/process-context/process-context.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+D;AAE/D,uDAAmD;AAO5C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oBAAoB;IALhC,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACJ,SAAS,EAAE,CAAC,gCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC5B,CAAC;GACW,oBAAoB,CAAG;AAAvB,oDAAoB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestContext } from '../../../api/common/request-context';
|
|
2
|
-
import { ConfigService } from '../../../config/
|
|
3
|
-
import { TransactionalConnection } from '../../../connection/
|
|
2
|
+
import { ConfigService } from '../../../config/config.service';
|
|
3
|
+
import { TransactionalConnection } from '../../../connection/transactional-connection';
|
|
4
4
|
import { Order } from '../../../entity/order/order.entity';
|
|
5
5
|
import { OrderService } from '../../services/order.service';
|
|
6
6
|
import { SessionService } from '../../services/session.service';
|
|
@@ -11,9 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ActiveOrderService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
14
|
+
const errors_1 = require("../../../common/error/errors");
|
|
15
|
+
const config_service_1 = require("../../../config/config.service");
|
|
16
|
+
const transactional_connection_1 = require("../../../connection/transactional-connection");
|
|
17
17
|
const order_entity_1 = require("../../../entity/order/order.entity");
|
|
18
18
|
const order_service_1 = require("../../services/order.service");
|
|
19
19
|
const session_service_1 = require("../../services/session.service");
|
|
@@ -32,7 +32,7 @@ let ActiveOrderService = class ActiveOrderService {
|
|
|
32
32
|
}
|
|
33
33
|
async getOrderFromContext(ctx, createIfNotExists = false) {
|
|
34
34
|
if (!ctx.session) {
|
|
35
|
-
throw new
|
|
35
|
+
throw new errors_1.InternalServerError('error.no-active-session');
|
|
36
36
|
}
|
|
37
37
|
let order = ctx.session.activeOrderId
|
|
38
38
|
? await this.connection
|
|
@@ -88,7 +88,7 @@ let ActiveOrderService = class ActiveOrderService {
|
|
|
88
88
|
// none of the configured strategies have a `createActiveOrder` method defined.
|
|
89
89
|
// In this case, we should throw an error because it is assumed that such a configuration
|
|
90
90
|
// indicates that an external order creation mechanism should be defined.
|
|
91
|
-
throw new
|
|
91
|
+
throw new errors_1.UserInputError('error.order-could-not-be-determined-or-created');
|
|
92
92
|
}
|
|
93
93
|
if (order && ctx.session) {
|
|
94
94
|
await this.sessionService.setActiveOrder(ctx, ctx.session, order);
|
|
@@ -98,11 +98,11 @@ let ActiveOrderService = class ActiveOrderService {
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
ActiveOrderService = __decorate([
|
|
101
|
-
common_1.Injectable(),
|
|
101
|
+
(0, common_1.Injectable)(),
|
|
102
102
|
__metadata("design:paramtypes", [session_service_1.SessionService,
|
|
103
103
|
order_service_1.OrderService,
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
transactional_connection_1.TransactionalConnection,
|
|
105
|
+
config_service_1.ConfigService])
|
|
106
106
|
], ActiveOrderService);
|
|
107
107
|
exports.ActiveOrderService = ActiveOrderService;
|
|
108
108
|
//# sourceMappingURL=active-order.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-order.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/active-order/active-order.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAG5C,
|
|
1
|
+
{"version":3,"file":"active-order.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/active-order/active-order.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAG5C,yDAAmF;AACnF,mEAA+D;AAC/D,2FAAuF;AACvF,qEAA2D;AAC3D,gEAA4D;AAC5D,oEAAgE;AAEhE;;;;;GAKG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC3B,YACY,cAA8B,EAC9B,YAA0B,EAC1B,UAAmC,EACnC,aAA4B;QAH5B,mBAAc,GAAd,cAAc,CAAgB;QAC9B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAyB;QACnC,kBAAa,GAAb,aAAa,CAAe;IACrC,CAAC;IAcJ,KAAK,CAAC,mBAAmB,CAAC,GAAmB,EAAE,iBAAiB,GAAG,KAAK;QACpE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YACd,MAAM,IAAI,4BAAmB,CAAC,yBAAyB,CAAC,CAAC;SAC5D;QACD,IAAI,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa;YACjC,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU;iBAChB,aAAa,CAAC,GAAG,EAAE,oBAAK,CAAC;iBACzB,kBAAkB,CAAC,OAAO,CAAC;iBAC3B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,CAAC;iBACrC,KAAK,CAAC,qBAAqB,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;iBACpE,QAAQ,CAAC,yBAAyB,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;iBACjE,MAAM,EAAE;YACf,CAAC,CAAC,SAAS,CAAC;QAChB,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,EAAE;YACjC,sDAAsD;YACtD,qEAAqE;YACrE,M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AI,KAAK,EAAE;oBACP,MAAM;iBACT;gBACD,IAAI,iBAAiB,IAAI,OAAO,QAAQ,CAAC,iBAAiB,KAAK,UAAU,EAAE;oBACvE,KAAK,GAAG,MAAM,QAAQ,CAAC,iBAAiB,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;iBAChE;gBACD,IAAI,KAAK,EAAE;oBACP,MAAM;iBACT;aACJ;YAED,IAAI,CAAC,KAAK,IAAI,iBAAiB,EAAE;gBAC7B,2EAA2E;gBAC3E,+EAA+E;gBAC/E,yFAAyF;gBACzF,yEAAyE;gBACzE,MAAM,IAAI,uBAAc,CAAC,gDAAgD,CAAC,CAAC;aAC9E;YAED,IAAI,KAAK,IAAI,GAAG,CAAC,OAAO,EAAE;gBACtB,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;aACrE;SACJ;QACD,OAAO,KAAK,IAAI,SAAS,CAAC;IAC9B,CAAC;CACJ,CAAA;AA7GY,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAGmB,gCAAc;QAChB,4BAAY;QACd,kDAAuB;QACpB,8BAAa;GAL/B,kBAAkB,CA6G9B;AA7GY,gDAAkB"}
|
|
@@ -8,7 +8,7 @@ import { PromotionAction } from '../../../config/promotion/promotion-action';
|
|
|
8
8
|
import { PromotionCondition } from '../../../config/promotion/promotion-condition';
|
|
9
9
|
import { ShippingCalculator } from '../../../config/shipping-method/shipping-calculator';
|
|
10
10
|
import { ShippingEligibilityChecker } from '../../../config/shipping-method/shipping-eligibility-checker';
|
|
11
|
-
export
|
|
11
|
+
export type ConfigDefTypeMap = {
|
|
12
12
|
CollectionFilter: CollectionFilter;
|
|
13
13
|
FulfillmentHandler: FulfillmentHandler;
|
|
14
14
|
PaymentMethodEligibilityChecker: PaymentMethodEligibilityChecker;
|
|
@@ -18,7 +18,7 @@ export declare type ConfigDefTypeMap = {
|
|
|
18
18
|
ShippingCalculator: ShippingCalculator;
|
|
19
19
|
ShippingEligibilityChecker: ShippingEligibilityChecker;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type ConfigDefType = keyof ConfigDefTypeMap;
|
|
22
22
|
/**
|
|
23
23
|
* This helper class provides methods relating to ConfigurableOperationDef instances.
|
|
24
24
|
*/
|
|
@@ -37,7 +37,7 @@ let ConfigArgService = class ConfigArgService {
|
|
|
37
37
|
const defsOfType = this.getDefinitions(defType);
|
|
38
38
|
const match = defsOfType.find(def => def.code === code);
|
|
39
39
|
if (!match) {
|
|
40
|
-
throw new errors_1.UserInputError(
|
|
40
|
+
throw new errors_1.UserInputError('error.no-configurable-operation-def-with-code-found', {
|
|
41
41
|
code,
|
|
42
42
|
type: defType,
|
|
43
43
|
});
|
|
@@ -99,7 +99,7 @@ let ConfigArgService = class ConfigArgService {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
ConfigArgService = __decorate([
|
|
102
|
-
common_1.Injectable(),
|
|
102
|
+
(0, common_1.Injectable)(),
|
|
103
103
|
__metadata("design:paramtypes", [config_service_1.ConfigService])
|
|
104
104
|
], ConfigArgService);
|
|
105
105
|
exports.ConfigArgService = ConfigArgService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-arg.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/config-arg/config-arg.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAI5C,yDAA8D;AAE9D,mEAA+D;AAsB/D;;GAEG;
|
|
1
|
+
{"version":3,"file":"config-arg.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/config-arg/config-arg.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAI5C,yDAA8D;AAE9D,mEAA+D;AAsB/D;;GAEG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGzB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAC5C,IAAI,CAAC,i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C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;wBACpD,KAAK,GAAG,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,KAAK,EAAE,IAAI,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC;qBACzE;yBAAM;wBACH,KAAK,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;qBAC5D;iBACJ;gBAAC,OAAO,CAAM,EAAE;oBACb,SAAS;iBACZ;gBAED,IAAI,CAAC,KAAK,EAAE;oBACR,MAAM,IAAI,uBAAc,CAAC,yCAAyC,EAAE;wBAChE,IAAI;qBACP,CAAC,CAAC;iBACN;aACJ;SACJ;IACL,CAAC;CACJ,CAAA;AA/FY,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAI0B,8BAAa;GAHvC,gBAAgB,CA+F5B;AA/FY,4CAAgB"}
|
|
@@ -13,6 +13,7 @@ exports.CustomFieldRelationService = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const pick_1 = require("@vendure/common/lib/pick");
|
|
15
15
|
const shared_utils_1 = require("@vendure/common/lib/shared-utils");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
16
17
|
const config_service_1 = require("../../../config/config.service");
|
|
17
18
|
const transactional_connection_1 = require("../../../connection/transactional-connection");
|
|
18
19
|
let CustomFieldRelationService = class CustomFieldRelationService {
|
|
@@ -30,7 +31,7 @@ let CustomFieldRelationService = class CustomFieldRelationService {
|
|
|
30
31
|
if (input.customFields) {
|
|
31
32
|
const relationCustomFields = this.configService.customFields[entityType.name].filter(this.isRelationalType);
|
|
32
33
|
for (const field of relationCustomFields) {
|
|
33
|
-
const inputIdName = shared_utils_1.getGraphQlInputName(field);
|
|
34
|
+
const inputIdName = (0, shared_utils_1.getGraphQlInputName)(field);
|
|
34
35
|
const idOrIds = input.customFields[inputIdName];
|
|
35
36
|
if (idOrIds !== undefined) {
|
|
36
37
|
let relations;
|
|
@@ -39,16 +40,20 @@ let CustomFieldRelationService = class CustomFieldRelationService {
|
|
|
39
40
|
relations = null;
|
|
40
41
|
}
|
|
41
42
|
else if (field.list && Array.isArray(idOrIds) && idOrIds.every(id => this.isId(id))) {
|
|
42
|
-
relations = await this.connection
|
|
43
|
+
relations = await this.connection
|
|
44
|
+
.getRepository(ctx, field.entity)
|
|
45
|
+
.findBy({ id: (0, typeorm_1.In)(idOrIds) });
|
|
43
46
|
}
|
|
44
47
|
else if (!field.list && this.isId(idOrIds)) {
|
|
45
|
-
relations = await this.connection
|
|
48
|
+
relations = await this.connection
|
|
49
|
+
.getRepository(ctx, field.entity)
|
|
50
|
+
.findOne({ where: { id: idOrIds } });
|
|
46
51
|
}
|
|
47
52
|
if (relations !== undefined) {
|
|
48
53
|
entity.customFields = Object.assign(Object.assign({}, entity.customFields), { [field.name]: relations });
|
|
49
54
|
await this.connection
|
|
50
55
|
.getRepository(ctx, entityType)
|
|
51
|
-
.save(pick_1.pick(entity, ['id', 'customFields']), { reload: false });
|
|
56
|
+
.save((0, pick_1.pick)(entity, ['id', 'customFields']), { reload: false });
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
}
|
|
@@ -63,7 +68,7 @@ let CustomFieldRelationService = class CustomFieldRelationService {
|
|
|
63
68
|
}
|
|
64
69
|
};
|
|
65
70
|
CustomFieldRelationService = __decorate([
|
|
66
|
-
common_1.Injectable(),
|
|
71
|
+
(0, common_1.Injectable)(),
|
|
67
72
|
__metadata("design:paramtypes", [transactional_connection_1.TransactionalConnection, config_service_1.ConfigService])
|
|
68
73
|
], CustomFieldRelationService);
|
|
69
74
|
exports.CustomFieldRelationService = CustomFieldRelationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-field-relation.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/custom-field-relation/custom-field-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAgD;AAEhD,mEAAuE;
|
|
1
|
+
{"version":3,"file":"custom-field-relation.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/custom-field-relation/custom-field-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAgD;AAEhD,mEAAuE;AACvE,qCAA6B;AAG7B,mEAA+D;AAO/D,2FAAuF;AAIhF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACnC,YAAoB,UAAmC,EAAU,aAA4B;QAAzE,eAAU,GAAV,UAAU,CAAyB;QAAU,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEjG;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACjB,GAAmB,EACnB,UAAmB,EACnB,KAAgD,EAChD,MAAS;QAET,IAAI,KAAK,CAAC,YAAY,EAAE;YACpB,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CACxD,UAAU,CAAC,IAA0B,CACxC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAEhC,KAAK,MAAM,KAAK,IAAI,oBAAoB,EAAE;gBACtC,MAAM,WAAW,GAAG,IAAA,kCAAmB,EAAC,KAAK,CAAC,CAAC;gBAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;gBAChD,IAAI,OAAO,KAAK,SAAS,EAAE;oBACvB,IAAI,SAA6D,CAAC;oBAClE,IAAI,OAAO,KAAK,IAAI,EAAE;wBAClB,uDAAuD;wBACvD,SAAS,GAAG,IAAI,CAAC;qBACpB;yBAAM,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE;wBACnF,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU;6BAC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