@vendure/core 1.4.7 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/api/common/extract-session-token.d.ts +3 -0
- package/cli/api/common/extract-session-token.js +35 -0
- package/cli/api/common/extract-session-token.js.map +1 -0
- package/cli/api/common/get-api-type.d.ts +3 -0
- package/cli/api/common/get-api-type.js +12 -0
- package/cli/api/common/get-api-type.js.map +1 -0
- package/cli/api/common/graphql-value-transformer.d.ts +30 -0
- package/cli/api/common/graphql-value-transformer.js +199 -0
- package/cli/api/common/graphql-value-transformer.js.map +1 -0
- package/cli/api/common/id-codec.d.ts +11 -0
- package/cli/api/common/id-codec.js +94 -0
- package/cli/api/common/id-codec.js.map +1 -0
- package/cli/api/common/id-codec.service.d.ts +7 -0
- package/cli/api/common/id-codec.service.js +33 -0
- package/cli/api/common/id-codec.service.js.map +1 -0
- package/cli/api/common/parse-context.d.ts +16 -0
- package/cli/api/common/parse-context.js +39 -0
- package/cli/api/common/parse-context.js.map +1 -0
- package/cli/api/common/request-context.d.ts +55 -0
- package/cli/api/common/request-context.js +143 -0
- package/cli/api/common/request-context.js.map +1 -0
- package/cli/api/common/set-session-token.d.ts +9 -0
- package/cli/api/common/set-session-token.js +27 -0
- package/cli/api/common/set-session-token.js.map +1 -0
- package/cli/api/decorators/allow.decorator.d.ts +3 -0
- package/cli/api/decorators/allow.decorator.js +8 -0
- package/cli/api/decorators/allow.decorator.js.map +1 -0
- package/cli/api/decorators/api.decorator.d.ts +1 -0
- package/cli/api/decorators/api.decorator.js +10 -0
- package/cli/api/decorators/api.decorator.js.map +1 -0
- package/cli/api/decorators/request-context.decorator.d.ts +1 -0
- package/cli/api/decorators/request-context.decorator.js +14 -0
- package/cli/api/decorators/request-context.decorator.js.map +1 -0
- package/cli/api/decorators/transaction.decorator.d.ts +3 -0
- package/cli/api/decorators/transaction.decorator.js +11 -0
- package/cli/api/decorators/transaction.decorator.js.map +1 -0
- package/cli/api/index.d.ts +11 -0
- package/cli/api/index.js +23 -0
- package/cli/api/index.js.map +1 -0
- package/cli/api/middleware/auth-guard.d.ts +21 -0
- package/cli/api/middleware/auth-guard.js +151 -0
- package/cli/api/middleware/auth-guard.js.map +1 -0
- package/cli/api/middleware/exception-logger.filter.d.ts +6 -0
- package/cli/api/middleware/exception-logger.filter.js +82 -0
- package/cli/api/middleware/exception-logger.filter.js.map +1 -0
- package/cli/api/middleware/id-interceptor.d.ts +12 -0
- package/cli/api/middleware/id-interceptor.js +56 -0
- package/cli/api/middleware/id-interceptor.js.map +1 -0
- package/cli/api/middleware/transaction-interceptor.d.ts +12 -0
- package/cli/api/middleware/transaction-interceptor.js +46 -0
- package/cli/api/middleware/transaction-interceptor.js.map +1 -0
- package/cli/api/resolvers/admin/search.resolver.d.ts +17 -0
- package/cli/api/resolvers/admin/search.resolver.js +81 -0
- package/cli/api/resolvers/admin/search.resolver.js.map +1 -0
- package/cli/cache/index.d.ts +1 -0
- package/cli/cache/index.js +14 -0
- package/cli/cache/index.js.map +1 -0
- package/cli/cache/request-context-cache.service.d.ts +9 -0
- package/cli/cache/request-context-cache.service.js +39 -0
- package/cli/cache/request-context-cache.service.js.map +1 -0
- package/cli/cli/cli-utils.d.ts +1 -0
- package/cli/cli/cli-utils.js +8 -0
- package/cli/cli/cli-utils.js.map +1 -0
- package/cli/cli/index.d.ts +1 -0
- package/cli/cli/index.js +14 -0
- package/cli/cli/index.js.map +1 -0
- package/cli/cli/populate.d.ts +5 -0
- package/cli/cli/populate.js +106 -0
- package/cli/cli/populate.js.map +1 -0
- package/cli/cli/vendure-cli.d.ts +2 -0
- package/cli/cli/vendure-cli.js +119 -0
- package/cli/cli/vendure-cli.js.map +1 -0
- package/cli/common/async-queue.d.ts +17 -0
- package/cli/common/async-queue.js +56 -0
- package/cli/common/async-queue.js.map +1 -0
- package/cli/common/calculated-decorator.d.ts +12 -0
- package/cli/common/calculated-decorator.js +22 -0
- package/cli/common/calculated-decorator.js.map +1 -0
- package/cli/common/configurable-operation.d.ts +53 -0
- package/cli/common/configurable-operation.js +96 -0
- package/cli/common/configurable-operation.js.map +1 -0
- package/cli/common/constants.d.ts +7 -0
- package/cli/common/constants.js +66 -0
- package/cli/common/constants.js.map +1 -0
- package/cli/common/error/error-result.d.ts +8 -0
- package/cli/common/error/error-result.js +11 -0
- package/cli/common/error/error-result.js.map +1 -0
- package/cli/common/error/errors.d.ts +31 -0
- package/cli/common/error/errors.js +48 -0
- package/cli/common/error/errors.js.map +1 -0
- package/cli/common/error/generated-graphql-admin-errors.d.ts +309 -0
- package/cli/common/error/generated-graphql-admin-errors.js +446 -0
- package/cli/common/error/generated-graphql-admin-errors.js.map +1 -0
- package/cli/common/error/generated-graphql-shop-errors.d.ts +254 -0
- package/cli/common/error/generated-graphql-shop-errors.js +370 -0
- package/cli/common/error/generated-graphql-shop-errors.js.map +1 -0
- package/cli/common/finite-state-machine/finite-state-machine.d.ts +14 -0
- package/cli/common/finite-state-machine/finite-state-machine.js +55 -0
- package/cli/common/finite-state-machine/finite-state-machine.js.map +1 -0
- package/cli/common/finite-state-machine/merge-transition-definitions.d.ts +2 -0
- package/cli/common/finite-state-machine/merge-transition-definitions.js +27 -0
- package/cli/common/finite-state-machine/merge-transition-definitions.js.map +1 -0
- package/cli/common/finite-state-machine/types.d.ts +16 -0
- package/cli/common/finite-state-machine/types.js +3 -0
- package/cli/common/finite-state-machine/types.js.map +1 -0
- package/cli/common/finite-state-machine/validate-transition-definition.d.ts +5 -0
- package/cli/common/finite-state-machine/validate-transition-definition.js +41 -0
- package/cli/common/finite-state-machine/validate-transition-definition.js.map +1 -0
- package/cli/common/generate-public-id.d.ts +1 -0
- package/cli/common/generate-public-id.js +10 -0
- package/cli/common/generate-public-id.js.map +1 -0
- package/cli/common/index.d.ts +15 -0
- package/cli/common/index.js +28 -0
- package/cli/common/index.js.map +1 -0
- package/cli/common/injector.d.ts +8 -0
- package/cli/common/injector.js +16 -0
- package/cli/common/injector.js.map +1 -0
- package/cli/common/permission-definition.d.ts +23 -0
- package/cli/common/permission-definition.js +53 -0
- package/cli/common/permission-definition.js.map +1 -0
- package/cli/common/self-refreshing-cache.d.ts +15 -0
- package/cli/common/self-refreshing-cache.js +56 -0
- package/cli/common/self-refreshing-cache.js.map +1 -0
- package/cli/common/tax-utils.d.ts +4 -0
- package/cli/common/tax-utils.js +20 -0
- package/cli/common/tax-utils.js.map +1 -0
- package/cli/common/ttl-cache.d.ts +13 -0
- package/cli/common/ttl-cache.js +48 -0
- package/cli/common/ttl-cache.js.map +1 -0
- package/cli/common/types/adjustment-source.d.ts +14 -0
- package/cli/common/types/adjustment-source.js +18 -0
- package/cli/common/types/adjustment-source.js.map +1 -0
- package/cli/common/types/common-types.d.ts +97 -0
- package/cli/common/types/common-types.js +3 -0
- package/cli/common/types/common-types.js.map +1 -0
- package/cli/common/types/entity-relation-paths.d.ts +16 -0
- package/cli/common/types/entity-relation-paths.js +3 -0
- package/cli/common/types/entity-relation-paths.js.map +1 -0
- package/cli/common/types/injectable-strategy.d.ts +5 -0
- package/cli/common/types/injectable-strategy.js +3 -0
- package/cli/common/types/injectable-strategy.js.map +1 -0
- package/cli/common/types/locale-types.d.ts +43 -0
- package/cli/common/types/locale-types.js +3 -0
- package/cli/common/types/locale-types.js.map +1 -0
- package/cli/common/utils.d.ts +11 -0
- package/cli/common/utils.js +66 -0
- package/cli/common/utils.js.map +1 -0
- package/cli/config/asset-naming-strategy/asset-naming-strategy.d.ts +6 -0
- package/cli/config/asset-naming-strategy/asset-naming-strategy.js +3 -0
- package/cli/config/asset-naming-strategy/asset-naming-strategy.js.map +1 -0
- package/cli/config/asset-naming-strategy/default-asset-naming-strategy.d.ts +11 -0
- package/cli/config/asset-naming-strategy/default-asset-naming-strategy.js +55 -0
- package/cli/config/asset-naming-strategy/default-asset-naming-strategy.js.map +1 -0
- package/cli/config/asset-preview-strategy/asset-preview-strategy.d.ts +6 -0
- package/cli/config/asset-preview-strategy/asset-preview-strategy.js +3 -0
- package/cli/config/asset-preview-strategy/asset-preview-strategy.js.map +1 -0
- package/cli/config/asset-preview-strategy/no-asset-preview-strategy.d.ts +6 -0
- package/cli/config/asset-preview-strategy/no-asset-preview-strategy.js +11 -0
- package/cli/config/asset-preview-strategy/no-asset-preview-strategy.js.map +1 -0
- package/cli/config/asset-storage-strategy/asset-storage-strategy.d.ts +13 -0
- package/cli/config/asset-storage-strategy/asset-storage-strategy.js +3 -0
- package/cli/config/asset-storage-strategy/asset-storage-strategy.js.map +1 -0
- package/cli/config/asset-storage-strategy/no-asset-storage-strategy.d.ts +13 -0
- package/cli/config/asset-storage-strategy/no-asset-storage-strategy.js +30 -0
- package/cli/config/asset-storage-strategy/no-asset-storage-strategy.js.map +1 -0
- package/cli/config/auth/authentication-strategy.d.ts +10 -0
- package/cli/config/auth/authentication-strategy.js +3 -0
- package/cli/config/auth/authentication-strategy.js.map +1 -0
- package/cli/config/auth/bcrypt-password-hashing-strategy.d.ts +7 -0
- package/cli/config/auth/bcrypt-password-hashing-strategy.js +21 -0
- package/cli/config/auth/bcrypt-password-hashing-strategy.js.map +1 -0
- package/cli/config/auth/default-password-validation-strategy.d.ts +10 -0
- package/cli/config/auth/default-password-validation-strategy.js +24 -0
- package/cli/config/auth/default-password-validation-strategy.js.map +1 -0
- package/cli/config/auth/native-authentication-strategy.d.ts +21 -0
- package/cli/config/auth/native-authentication-strategy.js +87 -0
- package/cli/config/auth/native-authentication-strategy.js.map +1 -0
- package/cli/config/auth/password-hashing-strategy.d.ts +5 -0
- package/cli/config/auth/password-hashing-strategy.js +3 -0
- package/cli/config/auth/password-hashing-strategy.js.map +1 -0
- package/cli/config/auth/password-validation-strategy.d.ts +5 -0
- package/cli/config/auth/password-validation-strategy.js +3 -0
- package/cli/config/auth/password-validation-strategy.js.map +1 -0
- package/cli/config/catalog/collection-filter.d.ts +13 -0
- package/cli/config/catalog/collection-filter.js +15 -0
- package/cli/config/catalog/collection-filter.js.map +1 -0
- package/cli/config/catalog/default-collection-filters.d.ts +52 -0
- package/cli/config/catalog/default-collection-filters.js +112 -0
- package/cli/config/catalog/default-collection-filters.js.map +1 -0
- package/cli/config/catalog/default-product-variant-price-calculation-strategy.d.ts +8 -0
- package/cli/config/catalog/default-product-variant-price-calculation-strategy.js +31 -0
- package/cli/config/catalog/default-product-variant-price-calculation-strategy.js.map +1 -0
- package/cli/config/catalog/default-stock-display-strategy.d.ts +8 -0
- package/cli/config/catalog/default-stock-display-strategy.js +17 -0
- package/cli/config/catalog/default-stock-display-strategy.js.map +1 -0
- package/cli/config/catalog/product-variant-price-calculation-strategy.d.ts +13 -0
- package/cli/config/catalog/product-variant-price-calculation-strategy.js +3 -0
- package/cli/config/catalog/product-variant-price-calculation-strategy.js.map +1 -0
- package/cli/config/catalog/stock-display-strategy.d.ts +6 -0
- package/cli/config/catalog/stock-display-strategy.js +3 -0
- package/cli/config/catalog/stock-display-strategy.js.map +1 -0
- package/cli/config/config-helpers.d.ts +3 -0
- package/cli/config/config-helpers.js +15 -0
- package/cli/config/config-helpers.js.map +1 -0
- package/cli/config/config.module.d.ts +16 -0
- package/cli/config/config.module.js +120 -0
- package/cli/config/config.module.js.map +1 -0
- package/cli/config/config.service.d.ts +30 -0
- package/cli/config/config.service.js +86 -0
- package/cli/config/config.service.js.map +1 -0
- package/cli/config/custom-field/custom-field-types.d.ts +65 -0
- package/cli/config/custom-field/custom-field-types.js +3 -0
- package/cli/config/custom-field/custom-field-types.js.map +1 -0
- package/cli/config/default-config.d.ts +2 -0
- package/cli/config/default-config.js +174 -0
- package/cli/config/default-config.js.map +1 -0
- package/cli/config/entity-id-strategy/auto-increment-id-strategy.d.ts +6 -0
- package/cli/config/entity-id-strategy/auto-increment-id-strategy.js +17 -0
- package/cli/config/entity-id-strategy/auto-increment-id-strategy.js.map +1 -0
- package/cli/config/entity-id-strategy/entity-id-strategy.d.ts +7 -0
- package/cli/config/entity-id-strategy/entity-id-strategy.js +3 -0
- package/cli/config/entity-id-strategy/entity-id-strategy.js.map +1 -0
- package/cli/config/entity-id-strategy/uuid-id-strategy.d.ts +6 -0
- package/cli/config/entity-id-strategy/uuid-id-strategy.js +16 -0
- package/cli/config/entity-id-strategy/uuid-id-strategy.js.map +1 -0
- package/cli/config/fulfillment/custom-fulfillment-process.d.ts +9 -0
- package/cli/config/fulfillment/custom-fulfillment-process.js +3 -0
- package/cli/config/fulfillment/custom-fulfillment-process.js.map +1 -0
- package/cli/config/fulfillment/fulfillment-handler.d.ts +21 -0
- package/cli/config/fulfillment/fulfillment-handler.js +23 -0
- package/cli/config/fulfillment/fulfillment-handler.js.map +1 -0
- package/cli/config/fulfillment/manual-fulfillment-handler.d.ts +11 -0
- package/cli/config/fulfillment/manual-fulfillment-handler.js +26 -0
- package/cli/config/fulfillment/manual-fulfillment-handler.js.map +1 -0
- package/cli/config/index.d.ts +61 -0
- package/cli/config/index.js +74 -0
- package/cli/config/index.js.map +1 -0
- package/cli/config/job-queue/inspectable-job-queue-strategy.d.ts +12 -0
- package/cli/config/job-queue/inspectable-job-queue-strategy.js +11 -0
- package/cli/config/job-queue/inspectable-job-queue-strategy.js.map +1 -0
- package/cli/config/job-queue/job-queue-strategy.d.ts +8 -0
- package/cli/config/job-queue/job-queue-strategy.js +3 -0
- package/cli/config/job-queue/job-queue-strategy.js.map +1 -0
- package/cli/config/logger/default-logger.d.ts +24 -0
- package/cli/config/logger/default-logger.js +90 -0
- package/cli/config/logger/default-logger.js.map +1 -0
- package/cli/config/logger/noop-logger.d.ts +8 -0
- package/cli/config/logger/noop-logger.js +17 -0
- package/cli/config/logger/noop-logger.js.map +1 -0
- package/cli/config/logger/typeorm-logger.d.ts +15 -0
- package/cli/config/logger/typeorm-logger.js +74 -0
- package/cli/config/logger/typeorm-logger.js.map +1 -0
- package/cli/config/logger/vendure-logger.d.ts +32 -0
- package/cli/config/logger/vendure-logger.js +68 -0
- package/cli/config/logger/vendure-logger.js.map +1 -0
- package/cli/config/merge-config.d.ts +2 -0
- package/cli/config/merge-config.js +34 -0
- package/cli/config/merge-config.js.map +1 -0
- package/cli/config/order/changed-price-handling-strategy.d.ts +7 -0
- package/cli/config/order/changed-price-handling-strategy.js +3 -0
- package/cli/config/order/changed-price-handling-strategy.js.map +1 -0
- package/cli/config/order/custom-order-process.d.ts +9 -0
- package/cli/config/order/custom-order-process.js +3 -0
- package/cli/config/order/custom-order-process.js.map +1 -0
- package/cli/config/order/default-changed-price-handling-strategy.d.ts +6 -0
- package/cli/config/order/default-changed-price-handling-strategy.js +10 -0
- package/cli/config/order/default-changed-price-handling-strategy.js.map +1 -0
- package/cli/config/order/default-order-item-price-calculation-strategy.d.ts +7 -0
- package/cli/config/order/default-order-item-price-calculation-strategy.js +13 -0
- package/cli/config/order/default-order-item-price-calculation-strategy.js.map +1 -0
- package/cli/config/order/default-order-placed-strategy.d.ts +7 -0
- package/cli/config/order/default-order-placed-strategy.js +13 -0
- package/cli/config/order/default-order-placed-strategy.js.map +1 -0
- package/cli/config/order/default-stock-allocation-strategy.d.ts +7 -0
- package/cli/config/order/default-stock-allocation-strategy.js +11 -0
- package/cli/config/order/default-stock-allocation-strategy.js.map +1 -0
- package/cli/config/order/merge-orders-strategy.d.ts +7 -0
- package/cli/config/order/merge-orders-strategy.js +29 -0
- package/cli/config/order/merge-orders-strategy.js.map +1 -0
- package/cli/config/order/order-by-code-access-strategy.d.ts +11 -0
- package/cli/config/order/order-by-code-access-strategy.js +25 -0
- package/cli/config/order/order-by-code-access-strategy.js.map +1 -0
- package/cli/config/order/order-code-strategy.d.ts +8 -0
- package/cli/config/order/order-code-strategy.js +11 -0
- package/cli/config/order/order-code-strategy.js.map +1 -0
- package/cli/config/order/order-item-price-calculation-strategy.d.ts +9 -0
- package/cli/config/order/order-item-price-calculation-strategy.js +3 -0
- package/cli/config/order/order-item-price-calculation-strategy.js.map +1 -0
- package/cli/config/order/order-merge-strategy.d.ts +14 -0
- package/cli/config/order/order-merge-strategy.js +12 -0
- package/cli/config/order/order-merge-strategy.js.map +1 -0
- package/cli/config/order/order-placed-strategy.d.ts +7 -0
- package/cli/config/order/order-placed-strategy.js +3 -0
- package/cli/config/order/order-placed-strategy.js.map +1 -0
- package/cli/config/order/stock-allocation-strategy.d.ts +7 -0
- package/cli/config/order/stock-allocation-strategy.js +3 -0
- package/cli/config/order/stock-allocation-strategy.js.map +1 -0
- package/cli/config/order/use-existing-strategy.d.ts +6 -0
- package/cli/config/order/use-existing-strategy.js +11 -0
- package/cli/config/order/use-existing-strategy.js.map +1 -0
- package/cli/config/order/use-guest-if-existing-empty-strategy.d.ts +6 -0
- package/cli/config/order/use-guest-if-existing-empty-strategy.js +13 -0
- package/cli/config/order/use-guest-if-existing-empty-strategy.js.map +1 -0
- package/cli/config/order/use-guest-strategy.d.ts +6 -0
- package/cli/config/order/use-guest-strategy.js +11 -0
- package/cli/config/order/use-guest-strategy.js.map +1 -0
- package/cli/config/payment/custom-payment-process.d.ts +9 -0
- package/cli/config/payment/custom-payment-process.js +3 -0
- package/cli/config/payment/custom-payment-process.js.map +1 -0
- package/cli/config/payment/dummy-payment-method-handler.d.ts +17 -0
- package/cli/config/payment/dummy-payment-method-handler.js +74 -0
- package/cli/config/payment/dummy-payment-method-handler.js.map +1 -0
- package/cli/config/payment/example-payment-method-handler.d.ts +11 -0
- package/cli/config/payment/example-payment-method-handler.js +59 -0
- package/cli/config/payment/example-payment-method-handler.js.map +1 -0
- package/cli/config/payment/payment-method-eligibility-checker.d.ts +13 -0
- package/cli/config/payment/payment-method-eligibility-checker.js +15 -0
- package/cli/config/payment/payment-method-eligibility-checker.js.map +1 -0
- package/cli/config/payment/payment-method-handler.d.ts +73 -0
- package/cli/config/payment/payment-method-handler.js +36 -0
- package/cli/config/payment/payment-method-handler.js.map +1 -0
- package/cli/config/promotion/actions/buy-x-get-y-free-action.d.ts +37 -0
- package/cli/config/promotion/actions/buy-x-get-y-free-action.js +30 -0
- package/cli/config/promotion/actions/buy-x-get-y-free-action.js.map +1 -0
- package/cli/config/promotion/actions/facet-values-percentage-discount-action.d.ts +17 -0
- package/cli/config/promotion/actions/facet-values-percentage-discount-action.js +39 -0
- package/cli/config/promotion/actions/facet-values-percentage-discount-action.js.map +1 -0
- package/cli/config/promotion/actions/free-shipping-action.d.ts +2 -0
- package/cli/config/promotion/actions/free-shipping-action.js +14 -0
- package/cli/config/promotion/actions/free-shipping-action.js.map +1 -0
- package/cli/config/promotion/actions/order-fixed-discount-action.d.ts +9 -0
- package/cli/config/promotion/actions/order-fixed-discount-action.js +21 -0
- package/cli/config/promotion/actions/order-fixed-discount-action.js.map +1 -0
- package/cli/config/promotion/actions/order-percentage-discount-action.d.ts +10 -0
- package/cli/config/promotion/actions/order-percentage-discount-action.js +23 -0
- package/cli/config/promotion/actions/order-percentage-discount-action.js.map +1 -0
- package/cli/config/promotion/actions/product-percentage-discount-action.d.ts +22 -0
- package/cli/config/promotion/actions/product-percentage-discount-action.js +36 -0
- package/cli/config/promotion/actions/product-percentage-discount-action.js.map +1 -0
- package/cli/config/promotion/conditions/buy-x-get-y-free-condition.d.ts +37 -0
- package/cli/config/promotion/conditions/buy-x-get-y-free-condition.js +71 -0
- package/cli/config/promotion/conditions/buy-x-get-y-free-condition.js.map +1 -0
- package/cli/config/promotion/conditions/contains-products-condition.d.ts +19 -0
- package/cli/config/promotion/conditions/contains-products-condition.js +38 -0
- package/cli/config/promotion/conditions/contains-products-condition.js.map +1 -0
- package/cli/config/promotion/conditions/customer-group-condition.d.ts +14 -0
- package/cli/config/promotion/conditions/customer-group-condition.js +72 -0
- package/cli/config/promotion/conditions/customer-group-condition.js.map +1 -0
- package/cli/config/promotion/conditions/has-facet-values-condition.d.ts +14 -0
- package/cli/config/promotion/conditions/has-facet-values-condition.js +31 -0
- package/cli/config/promotion/conditions/has-facet-values-condition.js.map +1 -0
- package/cli/config/promotion/conditions/min-order-amount-condition.d.ts +14 -0
- package/cli/config/promotion/conditions/min-order-amount-condition.js +27 -0
- package/cli/config/promotion/conditions/min-order-amount-condition.js.map +1 -0
- package/cli/config/promotion/index.d.ts +170 -0
- package/cli/config/promotion/index.js +50 -0
- package/cli/config/promotion/index.js.map +1 -0
- package/cli/config/promotion/promotion-action.d.ts +56 -0
- package/cli/config/promotion/promotion-action.js +49 -0
- package/cli/config/promotion/promotion-action.js.map +1 -0
- package/cli/config/promotion/promotion-condition.d.ts +19 -0
- package/cli/config/promotion/promotion-condition.js +19 -0
- package/cli/config/promotion/promotion-condition.js.map +1 -0
- package/cli/config/promotion/utils/facet-value-checker.d.ts +9 -0
- package/cli/config/promotion/utils/facet-value-checker.js +31 -0
- package/cli/config/promotion/utils/facet-value-checker.js.map +1 -0
- package/cli/config/session-cache/in-memory-session-cache-strategy.d.ts +11 -0
- package/cli/config/session-cache/in-memory-session-cache-strategy.js +44 -0
- package/cli/config/session-cache/in-memory-session-cache-strategy.js.map +1 -0
- package/cli/config/session-cache/noop-session-cache-strategy.d.ts +7 -0
- package/cli/config/session-cache/noop-session-cache-strategy.js +19 -0
- package/cli/config/session-cache/noop-session-cache-strategy.js.map +1 -0
- package/cli/config/session-cache/session-cache-strategy.d.ts +25 -0
- package/cli/config/session-cache/session-cache-strategy.js +3 -0
- package/cli/config/session-cache/session-cache-strategy.js.map +1 -0
- package/cli/config/shipping-method/default-shipping-calculator.d.ts +51 -0
- package/cli/config/shipping-method/default-shipping-calculator.js +69 -0
- package/cli/config/shipping-method/default-shipping-calculator.js.map +1 -0
- package/cli/config/shipping-method/default-shipping-eligibility-checker.d.ts +19 -0
- package/cli/config/shipping-method/default-shipping-eligibility-checker.js +27 -0
- package/cli/config/shipping-method/default-shipping-eligibility-checker.js.map +1 -0
- package/cli/config/shipping-method/shipping-calculator.d.ts +20 -0
- package/cli/config/shipping-method/shipping-calculator.js +15 -0
- package/cli/config/shipping-method/shipping-calculator.js.map +1 -0
- package/cli/config/shipping-method/shipping-eligibility-checker.d.ts +19 -0
- package/cli/config/shipping-method/shipping-eligibility-checker.js +38 -0
- package/cli/config/shipping-method/shipping-eligibility-checker.js.map +1 -0
- package/cli/config/tax/default-tax-line-calculation-strategy.d.ts +5 -0
- package/cli/config/tax/default-tax-line-calculation-strategy.js +11 -0
- package/cli/config/tax/default-tax-line-calculation-strategy.js.map +1 -0
- package/cli/config/tax/default-tax-zone-strategy.d.ts +6 -0
- package/cli/config/tax/default-tax-zone-strategy.js +10 -0
- package/cli/config/tax/default-tax-zone-strategy.js.map +1 -0
- package/cli/config/tax/tax-line-calculation-strategy.d.ts +17 -0
- package/cli/config/tax/tax-line-calculation-strategy.js +3 -0
- package/cli/config/tax/tax-line-calculation-strategy.js.map +1 -0
- package/cli/config/tax/tax-zone-strategy.d.ts +6 -0
- package/cli/config/tax/tax-zone-strategy.js +3 -0
- package/cli/config/tax/tax-zone-strategy.js.map +1 -0
- package/cli/config/vendure-config.d.ts +192 -0
- package/cli/config/vendure-config.js +3 -0
- package/cli/config/vendure-config.js.map +1 -0
- package/cli/connection/connection.module.d.ts +7 -0
- package/cli/connection/connection.module.js +61 -0
- package/cli/connection/connection.module.js.map +1 -0
- package/cli/connection/transaction-subscriber.d.ts +19 -0
- package/cli/connection/transaction-subscriber.js +54 -0
- package/cli/connection/transaction-subscriber.js.map +1 -0
- package/cli/connection/transaction-wrapper.d.ts +9 -0
- package/cli/connection/transaction-wrapper.js +79 -0
- package/cli/connection/transaction-wrapper.js.map +1 -0
- package/cli/connection/transactional-connection.d.ts +25 -0
- package/cli/connection/transactional-connection.js +170 -0
- package/cli/connection/transactional-connection.js.map +1 -0
- package/cli/connection/types.d.ts +8 -0
- package/cli/connection/types.js +3 -0
- package/cli/connection/types.js.map +1 -0
- package/cli/entity/address/address.entity.d.ts +22 -0
- package/cli/entity/address/address.entity.js +80 -0
- package/cli/entity/address/address.entity.js.map +1 -0
- package/cli/entity/administrator/administrator.entity.d.ts +15 -0
- package/cli/entity/administrator/administrator.entity.js +52 -0
- package/cli/entity/administrator/administrator.entity.js.map +1 -0
- package/cli/entity/asset/asset.entity.d.ts +26 -0
- package/cli/entity/asset/asset.entity.js +79 -0
- package/cli/entity/asset/asset.entity.js.map +1 -0
- package/cli/entity/asset/orderable-asset.entity.d.ts +10 -0
- package/cli/entity/asset/orderable-asset.entity.js +34 -0
- package/cli/entity/asset/orderable-asset.entity.js.map +1 -0
- package/cli/entity/authentication-method/authentication-method.entity.d.ts +5 -0
- package/cli/entity/authentication-method/authentication-method.entity.js +27 -0
- package/cli/entity/authentication-method/authentication-method.entity.js.map +1 -0
- package/cli/entity/authentication-method/external-authentication-method.entity.d.ts +8 -0
- package/cli/entity/authentication-method/external-authentication-method.entity.js +37 -0
- package/cli/entity/authentication-method/external-authentication-method.entity.js.map +1 -0
- package/cli/entity/authentication-method/native-authentication-method.entity.d.ts +11 -0
- package/cli/entity/authentication-method/native-authentication-method.entity.js +49 -0
- package/cli/entity/authentication-method/native-authentication-method.entity.js.map +1 -0
- package/cli/entity/base/base.entity.d.ts +7 -0
- package/cli/entity/base/base.entity.js +37 -0
- package/cli/entity/base/base.entity.js.map +1 -0
- package/cli/entity/channel/channel.entity.d.ts +17 -0
- package/cli/entity/channel/channel.entity.js +67 -0
- package/cli/entity/channel/channel.entity.js.map +1 -0
- package/cli/entity/collection/collection-asset.entity.d.ts +8 -0
- package/cli/entity/collection/collection-asset.entity.js +34 -0
- package/cli/entity/collection/collection-asset.entity.js.map +1 -0
- package/cli/entity/collection/collection-translation.entity.d.ts +16 -0
- package/cli/entity/collection/collection-translation.entity.js +52 -0
- package/cli/entity/collection/collection-translation.entity.js.map +1 -0
- package/cli/entity/collection/collection.entity.d.ts +29 -0
- package/cli/entity/collection/collection.entity.js +81 -0
- package/cli/entity/collection/collection.entity.js.map +1 -0
- package/cli/entity/country/country-translation.entity.d.ts +14 -0
- package/cli/entity/country/country-translation.entity.js +44 -0
- package/cli/entity/country/country-translation.entity.js.map +1 -0
- package/cli/entity/country/country.entity.d.ts +13 -0
- package/cli/entity/country/country.entity.js +43 -0
- package/cli/entity/country/country.entity.js.map +1 -0
- package/cli/entity/custom-entity-fields.d.ts +68 -0
- package/cli/entity/custom-entity-fields.js +106 -0
- package/cli/entity/custom-entity-fields.js.map +1 -0
- package/cli/entity/customer/customer.entity.d.ts +25 -0
- package/cli/entity/customer/customer.entity.js +82 -0
- package/cli/entity/customer/customer.entity.js.map +1 -0
- package/cli/entity/customer-group/customer-group.entity.d.ts +11 -0
- package/cli/entity/customer-group/customer-group.entity.js +39 -0
- package/cli/entity/customer-group/customer-group.entity.js.map +1 -0
- package/cli/entity/entities.d.ts +124 -0
- package/cli/entity/entities.js +128 -0
- package/cli/entity/entities.js.map +1 -0
- package/cli/entity/entity-id.decorator.d.ts +18 -0
- package/cli/entity/entity-id.decorator.js +40 -0
- package/cli/entity/entity-id.decorator.js.map +1 -0
- package/cli/entity/facet/facet-translation.entity.d.ts +14 -0
- package/cli/entity/facet/facet-translation.entity.js +44 -0
- package/cli/entity/facet/facet-translation.entity.js.map +1 -0
- package/cli/entity/facet/facet.entity.d.ts +18 -0
- package/cli/entity/facet/facet.entity.js +54 -0
- package/cli/entity/facet/facet.entity.js.map +1 -0
- package/cli/entity/facet-value/facet-value-translation.entity.d.ts +13 -0
- package/cli/entity/facet-value/facet-value-translation.entity.js +44 -0
- package/cli/entity/facet-value/facet-value-translation.entity.js.map +1 -0
- package/cli/entity/facet-value/facet-value.entity.d.ts +17 -0
- package/cli/entity/facet-value/facet-value.entity.js +50 -0
- package/cli/entity/facet-value/facet-value.entity.js.map +1 -0
- package/cli/entity/fulfillment/fulfillment.entity.d.ts +15 -0
- package/cli/entity/fulfillment/fulfillment.entity.js +51 -0
- package/cli/entity/fulfillment/fulfillment.entity.js.map +1 -0
- package/cli/entity/global-settings/global-settings.entity.d.ts +12 -0
- package/cli/entity/global-settings/global-settings.entity.js +42 -0
- package/cli/entity/global-settings/global-settings.entity.js.map +1 -0
- package/cli/entity/history-entry/customer-history-entry.entity.d.ts +7 -0
- package/cli/entity/history-entry/customer-history-entry.entity.js +30 -0
- package/cli/entity/history-entry/customer-history-entry.entity.js.map +1 -0
- package/cli/entity/history-entry/history-entry.entity.d.ts +9 -0
- package/cli/entity/history-entry/history-entry.entity.js +40 -0
- package/cli/entity/history-entry/history-entry.entity.js.map +1 -0
- package/cli/entity/history-entry/order-history-entry.entity.d.ts +7 -0
- package/cli/entity/history-entry/order-history-entry.entity.js +30 -0
- package/cli/entity/history-entry/order-history-entry.entity.js.map +1 -0
- package/cli/entity/index.d.ts +52 -0
- package/cli/entity/index.js +65 -0
- package/cli/entity/index.js.map +1 -0
- package/cli/entity/order/order.entity.d.ts +48 -0
- package/cli/entity/order/order.entity.js +277 -0
- package/cli/entity/order/order.entity.js.map +1 -0
- package/cli/entity/order-item/order-item.entity.d.ts +35 -0
- package/cli/entity/order-item/order-item.entity.js +182 -0
- package/cli/entity/order-item/order-item.entity.js.map +1 -0
- package/cli/entity/order-line/order-line.entity.d.ts +44 -0
- package/cli/entity/order-line/order-line.entity.js +275 -0
- package/cli/entity/order-line/order-line.entity.js.map +1 -0
- package/cli/entity/order-modification/order-modification.entity.d.ts +21 -0
- package/cli/entity/order-modification/order-modification.entity.js +81 -0
- package/cli/entity/order-modification/order-modification.entity.js.map +1 -0
- package/cli/entity/payment/payment.entity.d.ts +17 -0
- package/cli/entity/payment/payment.entity.js +59 -0
- package/cli/entity/payment/payment.entity.js.map +1 -0
- package/cli/entity/payment-method/payment-method.entity.d.ts +18 -0
- package/cli/entity/payment-method/payment-method.entity.js +60 -0
- package/cli/entity/payment-method/payment-method.entity.js.map +1 -0
- package/cli/entity/product/product-asset.entity.d.ts +8 -0
- package/cli/entity/product/product-asset.entity.js +34 -0
- package/cli/entity/product/product-asset.entity.js.map +1 -0
- package/cli/entity/product/product-translation.entity.d.ts +16 -0
- package/cli/entity/product/product-translation.entity.js +52 -0
- package/cli/entity/product/product-translation.entity.js.map +1 -0
- package/cli/entity/product/product.entity.d.ts +28 -0
- package/cli/entity/product/product.entity.js +75 -0
- package/cli/entity/product/product.entity.js.map +1 -0
- package/cli/entity/product-option/product-option-translation.entity.d.ts +14 -0
- package/cli/entity/product-option/product-option-translation.entity.js +44 -0
- package/cli/entity/product-option/product-option-translation.entity.js.map +1 -0
- package/cli/entity/product-option/product-option.entity.d.ts +17 -0
- package/cli/entity/product-option/product-option.entity.js +53 -0
- package/cli/entity/product-option/product-option.entity.js.map +1 -0
- package/cli/entity/product-option-group/product-option-group-translation.entity.d.ts +14 -0
- package/cli/entity/product-option-group/product-option-group-translation.entity.js +44 -0
- package/cli/entity/product-option-group/product-option-group-translation.entity.js.map +1 -0
- package/cli/entity/product-option-group/product-option-group.entity.d.ts +18 -0
- package/cli/entity/product-option-group/product-option-group.entity.js +53 -0
- package/cli/entity/product-option-group/product-option-group.entity.js.map +1 -0
- package/cli/entity/product-variant/product-variant-asset.entity.d.ts +8 -0
- package/cli/entity/product-variant/product-variant-asset.entity.js +34 -0
- package/cli/entity/product-variant/product-variant-asset.entity.js.map +1 -0
- package/cli/entity/product-variant/product-variant-price.entity.d.ts +9 -0
- package/cli/entity/product-variant/product-variant-price.entity.js +39 -0
- package/cli/entity/product-variant/product-variant-price.entity.js.map +1 -0
- package/cli/entity/product-variant/product-variant-translation.entity.d.ts +14 -0
- package/cli/entity/product-variant/product-variant-translation.entity.js +44 -0
- package/cli/entity/product-variant/product-variant-translation.entity.js.map +1 -0
- package/cli/entity/product-variant/product-variant.entity.d.ts +49 -0
- package/cli/entity/product-variant/product-variant.entity.js +155 -0
- package/cli/entity/product-variant/product-variant.entity.js.map +1 -0
- package/cli/entity/promotion/promotion.entity.d.ts +56 -0
- package/cli/entity/promotion/promotion.entity.js +157 -0
- package/cli/entity/promotion/promotion.entity.js.map +1 -0
- package/cli/entity/refund/refund.entity.d.ts +21 -0
- package/cli/entity/refund/refund.entity.js +78 -0
- package/cli/entity/refund/refund.entity.js.map +1 -0
- package/cli/entity/role/role.entity.d.ts +12 -0
- package/cli/entity/role/role.entity.js +43 -0
- package/cli/entity/role/role.entity.js.map +1 -0
- package/cli/entity/session/anonymous-session.entity.d.ts +5 -0
- package/cli/entity/session/anonymous-session.entity.js +25 -0
- package/cli/entity/session/anonymous-session.entity.js.map +1 -0
- package/cli/entity/session/authenticated-session.entity.d.ts +8 -0
- package/cli/entity/session/authenticated-session.entity.js +34 -0
- package/cli/entity/session/authenticated-session.entity.js.map +1 -0
- package/cli/entity/session/session.entity.d.ts +13 -0
- package/cli/entity/session/session.entity.js +54 -0
- package/cli/entity/session/session.entity.js.map +1 -0
- package/cli/entity/shipping-line/shipping-line.entity.d.ts +24 -0
- package/cli/entity/shipping-line/shipping-line.entity.js +128 -0
- package/cli/entity/shipping-line/shipping-line.entity.js.map +1 -0
- package/cli/entity/shipping-method/shipping-method-translation.entity.d.ts +16 -0
- package/cli/entity/shipping-method/shipping-method-translation.entity.js +48 -0
- package/cli/entity/shipping-method/shipping-method-translation.entity.js.map +1 -0
- package/cli/entity/shipping-method/shipping-method.entity.d.ts +28 -0
- package/cli/entity/shipping-method/shipping-method.entity.js +92 -0
- package/cli/entity/shipping-method/shipping-method.entity.js.map +1 -0
- package/cli/entity/stock-movement/allocation.entity.d.ts +9 -0
- package/cli/entity/stock-movement/allocation.entity.js +32 -0
- package/cli/entity/stock-movement/allocation.entity.js.map +1 -0
- package/cli/entity/stock-movement/cancellation.entity.d.ts +9 -0
- package/cli/entity/stock-movement/cancellation.entity.js +32 -0
- package/cli/entity/stock-movement/cancellation.entity.js.map +1 -0
- package/cli/entity/stock-movement/release.entity.d.ts +9 -0
- package/cli/entity/stock-movement/release.entity.js +32 -0
- package/cli/entity/stock-movement/release.entity.js.map +1 -0
- package/cli/entity/stock-movement/sale.entity.d.ts +9 -0
- package/cli/entity/stock-movement/sale.entity.js +32 -0
- package/cli/entity/stock-movement/sale.entity.js.map +1 -0
- package/cli/entity/stock-movement/stock-adjustment.entity.d.ts +7 -0
- package/cli/entity/stock-movement/stock-adjustment.entity.js +27 -0
- package/cli/entity/stock-movement/stock-adjustment.entity.js.map +1 -0
- package/cli/entity/stock-movement/stock-movement.entity.d.ts +8 -0
- package/cli/entity/stock-movement/stock-movement.entity.js +36 -0
- package/cli/entity/stock-movement/stock-movement.entity.js.map +1 -0
- package/cli/entity/surcharge/surcharge.entity.d.ts +18 -0
- package/cli/entity/surcharge/surcharge.entity.js +82 -0
- package/cli/entity/surcharge/surcharge.entity.js.map +1 -0
- package/cli/entity/tag/tag.entity.d.ts +6 -0
- package/cli/entity/tag/tag.entity.js +29 -0
- package/cli/entity/tag/tag.entity.js.map +1 -0
- package/cli/entity/tax-category/tax-category.entity.d.ts +10 -0
- package/cli/entity/tax-category/tax-category.entity.js +38 -0
- package/cli/entity/tax-category/tax-category.entity.js.map +1 -0
- package/cli/entity/tax-rate/tax-rate.entity.d.ts +24 -0
- package/cli/entity/tax-rate/tax-rate.entity.js +81 -0
- package/cli/entity/tax-rate/tax-rate.entity.js.map +1 -0
- package/cli/entity/user/user.entity.d.ts +19 -0
- package/cli/entity/user/user.entity.js +69 -0
- package/cli/entity/user/user.entity.js.map +1 -0
- package/cli/entity/value-transformers.d.ts +5 -0
- package/cli/entity/value-transformers.js +13 -0
- package/cli/entity/value-transformers.js.map +1 -0
- package/cli/entity/zone/zone.entity.d.ts +11 -0
- package/cli/entity/zone/zone.entity.js +40 -0
- package/cli/entity/zone/zone.entity.js.map +1 -0
- package/cli/event-bus/event-bus.d.ts +15 -0
- package/cli/event-bus/event-bus.js +51 -0
- package/cli/event-bus/event-bus.js.map +1 -0
- package/cli/event-bus/event-bus.module.d.ts +2 -0
- package/cli/event-bus/event-bus.module.js +23 -0
- package/cli/event-bus/event-bus.module.js.map +1 -0
- package/cli/event-bus/events/account-registration-event.d.ts +8 -0
- package/cli/event-bus/events/account-registration-event.js +13 -0
- package/cli/event-bus/events/account-registration-event.js.map +1 -0
- package/cli/event-bus/events/account-verified-event.d.ts +8 -0
- package/cli/event-bus/events/account-verified-event.js +13 -0
- package/cli/event-bus/events/account-verified-event.js.map +1 -0
- package/cli/event-bus/events/administrator-event.d.ts +10 -0
- package/cli/event-bus/events/administrator-event.js +11 -0
- package/cli/event-bus/events/administrator-event.js.map +1 -0
- package/cli/event-bus/events/asset-channel-event.d.ts +11 -0
- package/cli/event-bus/events/asset-channel-event.js +15 -0
- package/cli/event-bus/events/asset-channel-event.js.map +1 -0
- package/cli/event-bus/events/asset-event.d.ts +11 -0
- package/cli/event-bus/events/asset-event.js +14 -0
- package/cli/event-bus/events/asset-event.js.map +1 -0
- package/cli/event-bus/events/attempted-login-event.d.ts +8 -0
- package/cli/event-bus/events/attempted-login-event.js +14 -0
- package/cli/event-bus/events/attempted-login-event.js.map +1 -0
- package/cli/event-bus/events/change-channel-event.d.ts +13 -0
- package/cli/event-bus/events/change-channel-event.js +16 -0
- package/cli/event-bus/events/change-channel-event.js.map +1 -0
- package/cli/event-bus/events/channel-event.d.ts +10 -0
- package/cli/event-bus/events/channel-event.js +11 -0
- package/cli/event-bus/events/channel-event.js.map +1 -0
- package/cli/event-bus/events/collection-event.d.ts +10 -0
- package/cli/event-bus/events/collection-event.js +11 -0
- package/cli/event-bus/events/collection-event.js.map +1 -0
- package/cli/event-bus/events/collection-modification-event.d.ts +10 -0
- package/cli/event-bus/events/collection-modification-event.js +14 -0
- package/cli/event-bus/events/collection-modification-event.js.map +1 -0
- package/cli/event-bus/events/country-event.d.ts +10 -0
- package/cli/event-bus/events/country-event.js +11 -0
- package/cli/event-bus/events/country-event.js.map +1 -0
- package/cli/event-bus/events/coupon-code-event.d.ts +10 -0
- package/cli/event-bus/events/coupon-code-event.js +15 -0
- package/cli/event-bus/events/coupon-code-event.js.map +1 -0
- package/cli/event-bus/events/customer-address-event.d.ts +15 -0
- package/cli/event-bus/events/customer-address-event.js +18 -0
- package/cli/event-bus/events/customer-address-event.js.map +1 -0
- package/cli/event-bus/events/customer-event.d.ts +13 -0
- package/cli/event-bus/events/customer-event.js +14 -0
- package/cli/event-bus/events/customer-event.js.map +1 -0
- package/cli/event-bus/events/customer-group-entity-event.d.ts +10 -0
- package/cli/event-bus/events/customer-group-entity-event.js +11 -0
- package/cli/event-bus/events/customer-group-entity-event.js.map +1 -0
- package/cli/event-bus/events/customer-group-event.d.ts +18 -0
- package/cli/event-bus/events/customer-group-event.js +25 -0
- package/cli/event-bus/events/customer-group-event.js.map +1 -0
- package/cli/event-bus/events/facet-event.d.ts +10 -0
- package/cli/event-bus/events/facet-event.js +11 -0
- package/cli/event-bus/events/facet-event.js.map +1 -0
- package/cli/event-bus/events/facet-value-event.d.ts +10 -0
- package/cli/event-bus/events/facet-value-event.js +11 -0
- package/cli/event-bus/events/facet-value-event.js.map +1 -0
- package/cli/event-bus/events/fulfillment-event.d.ts +14 -0
- package/cli/event-bus/events/fulfillment-event.js +11 -0
- package/cli/event-bus/events/fulfillment-event.js.map +1 -0
- package/cli/event-bus/events/fulfillment-state-transition-event.d.ts +11 -0
- package/cli/event-bus/events/fulfillment-state-transition-event.js +15 -0
- package/cli/event-bus/events/fulfillment-state-transition-event.js.map +1 -0
- package/cli/event-bus/events/global-settings-event.d.ts +7 -0
- package/cli/event-bus/events/global-settings-event.js +11 -0
- package/cli/event-bus/events/global-settings-event.js.map +1 -0
- package/cli/event-bus/events/history-entry-event.d.ts +14 -0
- package/cli/event-bus/events/history-entry-event.js +12 -0
- package/cli/event-bus/events/history-entry-event.js.map +1 -0
- package/cli/event-bus/events/identifier-change-event.d.ts +9 -0
- package/cli/event-bus/events/identifier-change-event.js +14 -0
- package/cli/event-bus/events/identifier-change-event.js.map +1 -0
- package/cli/event-bus/events/identifier-change-request-event.d.ts +8 -0
- package/cli/event-bus/events/identifier-change-request-event.js +13 -0
- package/cli/event-bus/events/identifier-change-request-event.js.map +1 -0
- package/cli/event-bus/events/login-event.d.ts +8 -0
- package/cli/event-bus/events/login-event.js +13 -0
- package/cli/event-bus/events/login-event.js.map +1 -0
- package/cli/event-bus/events/logout-event.d.ts +6 -0
- package/cli/event-bus/events/logout-event.js +12 -0
- package/cli/event-bus/events/logout-event.js.map +1 -0
- package/cli/event-bus/events/order-event.d.ts +9 -0
- package/cli/event-bus/events/order-event.js +14 -0
- package/cli/event-bus/events/order-event.js.map +1 -0
- package/cli/event-bus/events/order-line-event.d.ts +10 -0
- package/cli/event-bus/events/order-line-event.js +15 -0
- package/cli/event-bus/events/order-line-event.js.map +1 -0
- package/cli/event-bus/events/order-placed-event.d.ts +11 -0
- package/cli/event-bus/events/order-placed-event.js +15 -0
- package/cli/event-bus/events/order-placed-event.js.map +1 -0
- package/cli/event-bus/events/order-state-transition-event.d.ts +11 -0
- package/cli/event-bus/events/order-state-transition-event.js +15 -0
- package/cli/event-bus/events/order-state-transition-event.js.map +1 -0
- package/cli/event-bus/events/password-reset-event.d.ts +8 -0
- package/cli/event-bus/events/password-reset-event.js +13 -0
- package/cli/event-bus/events/password-reset-event.js.map +1 -0
- package/cli/event-bus/events/password-reset-verified-event.d.ts +8 -0
- package/cli/event-bus/events/password-reset-verified-event.js +13 -0
- package/cli/event-bus/events/password-reset-verified-event.js.map +1 -0
- package/cli/event-bus/events/payment-method-event.d.ts +10 -0
- package/cli/event-bus/events/payment-method-event.js +11 -0
- package/cli/event-bus/events/payment-method-event.js.map +1 -0
- package/cli/event-bus/events/payment-state-transition-event.d.ts +13 -0
- package/cli/event-bus/events/payment-state-transition-event.js +16 -0
- package/cli/event-bus/events/payment-state-transition-event.js.map +1 -0
- package/cli/event-bus/events/product-channel-event.d.ts +11 -0
- package/cli/event-bus/events/product-channel-event.js +15 -0
- package/cli/event-bus/events/product-channel-event.js.map +1 -0
- package/cli/event-bus/events/product-event.d.ts +11 -0
- package/cli/event-bus/events/product-event.js +14 -0
- package/cli/event-bus/events/product-event.js.map +1 -0
- package/cli/event-bus/events/product-option-event.d.ts +10 -0
- package/cli/event-bus/events/product-option-event.js +11 -0
- package/cli/event-bus/events/product-option-event.js.map +1 -0
- package/cli/event-bus/events/product-option-group-change-event.d.ts +11 -0
- package/cli/event-bus/events/product-option-group-change-event.js +15 -0
- package/cli/event-bus/events/product-option-group-change-event.js.map +1 -0
- package/cli/event-bus/events/product-option-group-event.d.ts +10 -0
- package/cli/event-bus/events/product-option-group-event.js +11 -0
- package/cli/event-bus/events/product-option-group-event.js.map +1 -0
- package/cli/event-bus/events/product-variant-channel-event.d.ts +11 -0
- package/cli/event-bus/events/product-variant-channel-event.js +15 -0
- package/cli/event-bus/events/product-variant-channel-event.js.map +1 -0
- package/cli/event-bus/events/product-variant-event.d.ts +11 -0
- package/cli/event-bus/events/product-variant-event.js +14 -0
- package/cli/event-bus/events/product-variant-event.js.map +1 -0
- package/cli/event-bus/events/promotion-event.d.ts +10 -0
- package/cli/event-bus/events/promotion-event.js +11 -0
- package/cli/event-bus/events/promotion-event.js.map +1 -0
- package/cli/event-bus/events/refund-state-transition-event.d.ts +13 -0
- package/cli/event-bus/events/refund-state-transition-event.js +16 -0
- package/cli/event-bus/events/refund-state-transition-event.js.map +1 -0
- package/cli/event-bus/events/role-change-event.d.ts +11 -0
- package/cli/event-bus/events/role-change-event.js +15 -0
- package/cli/event-bus/events/role-change-event.js.map +1 -0
- package/cli/event-bus/events/role-event.d.ts +10 -0
- package/cli/event-bus/events/role-event.js +11 -0
- package/cli/event-bus/events/role-event.js.map +1 -0
- package/cli/event-bus/events/shipping-method-event.d.ts +10 -0
- package/cli/event-bus/events/shipping-method-event.js +11 -0
- package/cli/event-bus/events/shipping-method-event.js.map +1 -0
- package/cli/event-bus/events/stock-movement-event.d.ts +10 -0
- package/cli/event-bus/events/stock-movement-event.js +15 -0
- package/cli/event-bus/events/stock-movement-event.js.map +1 -0
- package/cli/event-bus/events/tax-category-event.d.ts +10 -0
- package/cli/event-bus/events/tax-category-event.js +11 -0
- package/cli/event-bus/events/tax-category-event.js.map +1 -0
- package/cli/event-bus/events/tax-rate-event.d.ts +10 -0
- package/cli/event-bus/events/tax-rate-event.js +11 -0
- package/cli/event-bus/events/tax-rate-event.js.map +1 -0
- package/cli/event-bus/events/tax-rate-modification-event.d.ts +8 -0
- package/cli/event-bus/events/tax-rate-modification-event.js +13 -0
- package/cli/event-bus/events/tax-rate-modification-event.js.map +1 -0
- package/cli/event-bus/events/zone-event.d.ts +10 -0
- package/cli/event-bus/events/zone-event.js +11 -0
- package/cli/event-bus/events/zone-event.js.map +1 -0
- package/cli/event-bus/events/zone-members-event.d.ts +11 -0
- package/cli/event-bus/events/zone-members-event.js +15 -0
- package/cli/event-bus/events/zone-members-event.js.map +1 -0
- package/cli/event-bus/index.d.ts +55 -0
- package/cli/event-bus/index.js +68 -0
- package/cli/event-bus/index.js.map +1 -0
- package/cli/event-bus/vendure-entity-event.d.ts +9 -0
- package/cli/event-bus/vendure-entity-event.js +15 -0
- package/cli/event-bus/vendure-entity-event.js.map +1 -0
- package/cli/event-bus/vendure-event.d.ts +4 -0
- package/cli/event-bus/vendure-event.js +10 -0
- package/cli/event-bus/vendure-event.js.map +1 -0
- package/cli/health-check/constants.d.ts +1 -0
- package/cli/health-check/constants.js +5 -0
- package/cli/health-check/constants.js.map +1 -0
- package/cli/i18n/i18n-error.d.ts +13 -0
- package/cli/i18n/i18n-error.js +16 -0
- package/cli/i18n/i18n-error.js.map +1 -0
- package/cli/job-queue/constants.d.ts +1 -0
- package/cli/job-queue/constants.js +5 -0
- package/cli/job-queue/constants.js.map +1 -0
- package/cli/job-queue/in-memory-job-queue-strategy.d.ts +34 -0
- package/cli/job-queue/in-memory-job-queue-strategy.js +187 -0
- package/cli/job-queue/in-memory-job-queue-strategy.js.map +1 -0
- package/cli/job-queue/index.d.ts +11 -0
- package/cli/job-queue/index.js +24 -0
- package/cli/job-queue/index.js.map +1 -0
- package/cli/job-queue/injectable-job-queue-strategy.d.ts +12 -0
- package/cli/job-queue/injectable-job-queue-strategy.js +21 -0
- package/cli/job-queue/injectable-job-queue-strategy.js.map +1 -0
- package/cli/job-queue/job-buffer/in-memory-job-buffer-storage-strategy.d.ts +13 -0
- package/cli/job-queue/job-buffer/in-memory-job-buffer-storage-strategy.js +47 -0
- package/cli/job-queue/job-buffer/in-memory-job-buffer-storage-strategy.js.map +1 -0
- package/cli/job-queue/job-buffer/job-buffer-storage-strategy.d.ts +11 -0
- package/cli/job-queue/job-buffer/job-buffer-storage-strategy.js +3 -0
- package/cli/job-queue/job-buffer/job-buffer-storage-strategy.js.map +1 -0
- package/cli/job-queue/job-buffer/job-buffer.d.ts +7 -0
- package/cli/job-queue/job-buffer/job-buffer.js +3 -0
- package/cli/job-queue/job-buffer/job-buffer.js.map +1 -0
- package/cli/job-queue/job-buffer/job-buffer.service.d.ts +16 -0
- package/cli/job-queue/job-buffer/job-buffer.service.js +76 -0
- package/cli/job-queue/job-buffer/job-buffer.service.js.map +1 -0
- package/cli/job-queue/job-queue.d.ts +16 -0
- package/cli/job-queue/job-queue.js +59 -0
- package/cli/job-queue/job-queue.js.map +1 -0
- package/cli/job-queue/job-queue.service.d.ts +27 -0
- package/cli/job-queue/job-queue.service.js +84 -0
- package/cli/job-queue/job-queue.service.js.map +1 -0
- package/cli/job-queue/job.d.ts +41 -0
- package/cli/job-queue/job.js +160 -0
- package/cli/job-queue/job.js.map +1 -0
- package/cli/job-queue/polling-job-queue-strategy.d.ts +26 -0
- package/cli/job-queue/polling-job-queue-strategy.js +163 -0
- package/cli/job-queue/polling-job-queue-strategy.js.map +1 -0
- package/cli/job-queue/queue-name-process-storage.d.ts +7 -0
- package/cli/job-queue/queue-name-process-storage.js +40 -0
- package/cli/job-queue/queue-name-process-storage.js.map +1 -0
- package/cli/job-queue/subscribable-job.d.ts +13 -0
- package/cli/job-queue/subscribable-job.js +52 -0
- package/cli/job-queue/subscribable-job.js.map +1 -0
- package/cli/job-queue/types.d.ts +22 -0
- package/cli/job-queue/types.js +3 -0
- package/cli/job-queue/types.js.map +1 -0
- package/cli/populate.d.ts +4 -4
- package/cli/populate.js +38 -25
- package/cli/populate.js.map +1 -1
- package/cli/process-context/process-context.d.ts +7 -0
- package/cli/process-context/process-context.js +18 -0
- package/cli/process-context/process-context.js.map +1 -0
- package/cli/service/helpers/config-arg/config-arg.service.d.ts +31 -0
- package/cli/service/helpers/config-arg/config-arg.service.js +88 -0
- package/cli/service/helpers/config-arg/config-arg.service.js.map +1 -0
- package/cli/service/helpers/custom-field-relation/custom-field-relation.service.d.ts +18 -0
- package/cli/service/helpers/custom-field-relation/custom-field-relation.service.js +63 -0
- package/cli/service/helpers/custom-field-relation/custom-field-relation.service.js.map +1 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state-machine.d.ts +21 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state-machine.js +113 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state-machine.js.map +1 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state.d.ts +11 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state.js +21 -0
- package/cli/service/helpers/fulfillment-state-machine/fulfillment-state.js.map +1 -0
- package/cli/service/helpers/list-query-builder/connection-utils.d.ts +10 -0
- package/cli/service/helpers/list-query-builder/connection-utils.js +26 -0
- package/cli/service/helpers/list-query-builder/connection-utils.js.map +1 -0
- package/cli/service/helpers/list-query-builder/get-calculated-columns.d.ts +3 -0
- package/cli/service/helpers/list-query-builder/get-calculated-columns.js +16 -0
- package/cli/service/helpers/list-query-builder/get-calculated-columns.js.map +1 -0
- package/cli/service/helpers/list-query-builder/list-query-builder.d.ts +30 -0
- package/cli/service/helpers/list-query-builder/list-query-builder.js +204 -0
- package/cli/service/helpers/list-query-builder/list-query-builder.js.map +1 -0
- package/cli/service/helpers/list-query-builder/parse-channel-param.d.ts +5 -0
- package/cli/service/helpers/list-query-builder/parse-channel-param.js +18 -0
- package/cli/service/helpers/list-query-builder/parse-channel-param.js.map +1 -0
- package/cli/service/helpers/list-query-builder/parse-filter-params.d.ts +13 -0
- package/cli/service/helpers/list-query-builder/parse-filter-params.js +155 -0
- package/cli/service/helpers/list-query-builder/parse-filter-params.js.map +1 -0
- package/cli/service/helpers/list-query-builder/parse-sort-params.d.ts +7 -0
- package/cli/service/helpers/list-query-builder/parse-sort-params.js +50 -0
- package/cli/service/helpers/list-query-builder/parse-sort-params.js.map +1 -0
- package/cli/service/helpers/order-calculator/order-calculator.d.ts +32 -0
- package/cli/service/helpers/order-calculator/order-calculator.js +311 -0
- package/cli/service/helpers/order-calculator/order-calculator.js.map +1 -0
- package/cli/service/helpers/order-calculator/prorate.d.ts +1 -0
- package/cli/service/helpers/order-calculator/prorate.js +35 -0
- package/cli/service/helpers/order-calculator/prorate.js.map +1 -0
- package/cli/service/helpers/order-merger/order-merger.d.ts +40 -0
- package/cli/service/helpers/order-merger/order-merger.js +97 -0
- package/cli/service/helpers/order-merger/order-merger.js.map +1 -0
- package/cli/service/helpers/order-modifier/order-modifier.d.ts +45 -0
- package/cli/service/helpers/order-modifier/order-modifier.js +423 -0
- package/cli/service/helpers/order-modifier/order-modifier.js.map +1 -0
- package/cli/service/helpers/order-state-machine/order-state-machine.d.ts +29 -0
- package/cli/service/helpers/order-state-machine/order-state-machine.js +240 -0
- package/cli/service/helpers/order-state-machine/order-state-machine.js.map +1 -0
- package/cli/service/helpers/order-state-machine/order-state.d.ts +9 -0
- package/cli/service/helpers/order-state-machine/order-state.js +64 -0
- package/cli/service/helpers/order-state-machine/order-state.js.map +1 -0
- package/cli/service/helpers/password-cipher/password-cipher.d.ts +7 -0
- package/cli/service/helpers/password-cipher/password-cipher.js +31 -0
- package/cli/service/helpers/password-cipher/password-cipher.js.map +1 -0
- package/cli/service/helpers/payment-state-machine/payment-state-machine.d.ts +20 -0
- package/cli/service/helpers/payment-state-machine/payment-state-machine.js +113 -0
- package/cli/service/helpers/payment-state-machine/payment-state-machine.js.map +1 -0
- package/cli/service/helpers/payment-state-machine/payment-state.d.ts +11 -0
- package/cli/service/helpers/payment-state-machine/payment-state.js +24 -0
- package/cli/service/helpers/payment-state-machine/payment-state.js.map +1 -0
- package/cli/service/helpers/product-price-applicator/product-price-applicator.d.ts +15 -0
- package/cli/service/helpers/product-price-applicator/product-price-applicator.js +64 -0
- package/cli/service/helpers/product-price-applicator/product-price-applicator.js.map +1 -0
- package/cli/service/helpers/refund-state-machine/refund-state-machine.d.ts +14 -0
- package/cli/service/helpers/refund-state-machine/refund-state-machine.js +65 -0
- package/cli/service/helpers/refund-state-machine/refund-state-machine.js.map +1 -0
- package/cli/service/helpers/refund-state-machine/refund-state.d.ts +11 -0
- package/cli/service/helpers/refund-state-machine/refund-state.js +15 -0
- package/cli/service/helpers/refund-state-machine/refund-state.js.map +1 -0
- package/cli/service/helpers/request-context/request-context.service.d.ts +29 -0
- package/{dist/api/common → cli/service/helpers/request-context}/request-context.service.js +50 -18
- package/cli/service/helpers/request-context/request-context.service.js.map +1 -0
- package/cli/service/helpers/shipping-calculator/shipping-calculator.d.ts +18 -0
- package/cli/service/helpers/shipping-calculator/shipping-calculator.js +50 -0
- package/cli/service/helpers/shipping-calculator/shipping-calculator.js.map +1 -0
- package/cli/service/helpers/translatable-saver/translatable-saver.d.ts +24 -0
- package/cli/service/helpers/translatable-saver/translatable-saver.js +64 -0
- package/cli/service/helpers/translatable-saver/translatable-saver.js.map +1 -0
- package/cli/service/helpers/translatable-saver/translation-differ.d.ts +17 -0
- package/cli/service/helpers/translatable-saver/translation-differ.js +65 -0
- package/cli/service/helpers/translatable-saver/translation-differ.js.map +1 -0
- package/cli/service/helpers/utils/address-to-line.d.ts +3 -0
- package/cli/service/helpers/utils/address-to-line.js +21 -0
- package/cli/service/helpers/utils/address-to-line.js.map +1 -0
- package/cli/service/helpers/utils/get-user-channels-permissions.d.ts +10 -0
- package/cli/service/helpers/utils/get-user-channels-permissions.js +26 -0
- package/cli/service/helpers/utils/get-user-channels-permissions.js.map +1 -0
- package/cli/service/helpers/utils/order-utils.d.ts +9 -0
- package/cli/service/helpers/utils/order-utils.js +64 -0
- package/cli/service/helpers/utils/order-utils.js.map +1 -0
- package/cli/service/helpers/utils/patch-entity.d.ts +5 -0
- package/cli/service/helpers/utils/patch-entity.js +17 -0
- package/cli/service/helpers/utils/patch-entity.js.map +1 -0
- package/cli/service/helpers/utils/samples-each.d.ts +1 -0
- package/cli/service/helpers/utils/samples-each.js +18 -0
- package/cli/service/helpers/utils/samples-each.js.map +1 -0
- package/cli/service/helpers/utils/translate-entity.d.ts +24 -0
- package/cli/service/helpers/utils/translate-entity.js +99 -0
- package/cli/service/helpers/utils/translate-entity.js.map +1 -0
- package/cli/service/helpers/verification-token-generator/verification-token-generator.d.ts +7 -0
- package/cli/service/helpers/verification-token-generator/verification-token-generator.js +44 -0
- package/cli/service/helpers/verification-token-generator/verification-token-generator.js.map +1 -0
- package/cli/service/services/administrator.service.d.ts +36 -0
- package/cli/service/services/administrator.service.js +230 -0
- package/cli/service/services/administrator.service.js.map +1 -0
- package/cli/service/services/asset.service.d.ts +63 -0
- package/cli/service/services/asset.service.js +478 -0
- package/cli/service/services/asset.service.js.map +1 -0
- package/cli/service/services/channel.service.d.ts +38 -0
- package/cli/service/services/channel.service.js +222 -0
- package/cli/service/services/channel.service.js.map +1 -0
- package/cli/service/services/country.service.d.ts +24 -0
- package/cli/service/services/country.service.js +119 -0
- package/cli/service/services/country.service.js.map +1 -0
- package/cli/service/services/customer.service.d.ts +62 -0
- package/cli/service/services/customer.service.js +662 -0
- package/cli/service/services/customer.service.js.map +1 -0
- package/cli/service/services/facet-value.service.d.ts +32 -0
- package/cli/service/services/facet-value.service.js +151 -0
- package/cli/service/services/facet-value.service.js.map +1 -0
- package/cli/service/services/fulfillment.service.d.ts +32 -0
- package/cli/service/services/fulfillment.service.js +106 -0
- package/cli/service/services/fulfillment.service.js.map +1 -0
- package/cli/service/services/global-settings.service.d.ts +17 -0
- package/cli/service/services/global-settings.service.js +74 -0
- package/cli/service/services/global-settings.service.js.map +1 -0
- package/cli/service/services/history.service.d.ts +139 -0
- package/cli/service/services/history.service.js +143 -0
- package/cli/service/services/history.service.js.map +1 -0
- package/cli/service/services/order.service.d.ts +136 -0
- package/cli/service/services/order.service.js +1158 -0
- package/cli/service/services/order.service.js.map +1 -0
- package/cli/service/services/payment-method.service.d.ts +37 -0
- package/cli/service/services/payment-method.service.js +178 -0
- package/cli/service/services/payment-method.service.js.map +1 -0
- package/cli/service/services/payment.service.d.ts +32 -0
- package/cli/service/services/payment.service.js +216 -0
- package/cli/service/services/payment.service.js.map +1 -0
- package/cli/service/services/product-variant.service.d.ts +70 -0
- package/cli/service/services/product-variant.service.js +560 -0
- package/cli/service/services/product-variant.service.js.map +1 -0
- package/cli/service/services/promotion.service.d.ts +41 -0
- package/cli/service/services/promotion.service.js +219 -0
- package/cli/service/services/promotion.service.js.map +1 -0
- package/cli/service/services/role.service.d.ts +39 -0
- package/cli/service/services/role.service.js +240 -0
- package/cli/service/services/role.service.js.map +1 -0
- package/cli/service/services/session.service.d.ts +38 -0
- package/cli/service/services/session.service.js +228 -0
- package/cli/service/services/session.service.js.map +1 -0
- package/cli/service/services/shipping-method.service.d.ts +36 -0
- package/cli/service/services/shipping-method.service.js +181 -0
- package/cli/service/services/shipping-method.service.js.map +1 -0
- package/cli/service/services/stock-movement.service.d.ts +39 -0
- package/cli/service/services/stock-movement.service.js +214 -0
- package/cli/service/services/stock-movement.service.js.map +1 -0
- package/cli/service/services/tag.service.d.ts +21 -0
- package/cli/service/services/tag.service.js +82 -0
- package/cli/service/services/tag.service.js.map +1 -0
- package/cli/service/services/tax-category.service.d.ts +16 -0
- package/cli/service/services/tax-category.service.js +95 -0
- package/cli/service/services/tax-category.service.js.map +1 -0
- package/cli/service/services/tax-rate.service.d.ts +28 -0
- package/cli/service/services/tax-rate.service.js +134 -0
- package/cli/service/services/tax-rate.service.js.map +1 -0
- package/cli/service/services/user.service.d.ts +37 -0
- package/cli/service/services/user.service.js +287 -0
- package/cli/service/services/user.service.js.map +1 -0
- package/cli/service/services/zone.service.d.ts +26 -0
- package/cli/service/services/zone.service.js +168 -0
- package/cli/service/services/zone.service.js.map +1 -0
- package/dist/api/api.module.js +0 -2
- package/dist/api/api.module.js.map +1 -1
- package/dist/api/common/request-context.d.ts +3 -1
- package/dist/api/common/request-context.js +3 -1
- package/dist/api/common/request-context.js.map +1 -1
- package/dist/api/config/configure-graphql-module.js +2 -0
- package/dist/api/config/configure-graphql-module.js.map +1 -1
- package/dist/api/config/generate-permissions.js +29 -4
- package/dist/api/config/generate-permissions.js.map +1 -1
- package/dist/api/config/graphql-custom-fields.js +27 -16
- package/dist/api/config/graphql-custom-fields.js.map +1 -1
- package/dist/api/decorators/request-context.decorator.js +9 -2
- package/dist/api/decorators/request-context.decorator.js.map +1 -1
- package/dist/api/middleware/auth-guard.d.ts +1 -1
- package/dist/api/middleware/auth-guard.js +1 -1
- package/dist/api/middleware/auth-guard.js.map +1 -1
- package/dist/api/middleware/transaction-interceptor.d.ts +9 -0
- package/dist/api/middleware/transaction-interceptor.js +16 -1
- package/dist/api/middleware/transaction-interceptor.js.map +1 -1
- package/dist/api/resolvers/admin/global-settings.resolver.js +1 -1
- package/dist/api/resolvers/admin/global-settings.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/order-line-entity.resolver.d.ts +5 -3
- package/dist/api/resolvers/entity/order-line-entity.resolver.js +16 -2
- package/dist/api/resolvers/entity/order-line-entity.resolver.js.map +1 -1
- package/dist/api/schema/admin-api/customer.api.graphql +4 -0
- package/dist/api/schema/admin-api/order.api.graphql +6 -0
- package/dist/api/schema/common/common-enums.graphql +1 -0
- package/dist/api/schema/common/common-error-results.graphql +22 -0
- package/dist/api/schema/common/common-types.graphql +25 -0
- package/dist/api/schema/shop-api/shop-error-results.graphql +7 -29
- package/dist/api/schema/shop-api/shop.api.graphql +4 -2
- package/dist/bootstrap.js +6 -3
- package/dist/bootstrap.js.map +1 -1
- package/dist/common/constants.d.ts +1 -0
- package/dist/common/constants.js +2 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/error/generated-graphql-admin-errors.d.ts +22 -0
- package/dist/common/error/generated-graphql-admin-errors.js +33 -2
- package/dist/common/error/generated-graphql-admin-errors.js.map +1 -1
- package/dist/common/error/generated-graphql-shop-errors.d.ts +7 -0
- package/dist/common/error/generated-graphql-shop-errors.js +12 -2
- package/dist/common/error/generated-graphql-shop-errors.js.map +1 -1
- package/dist/common/finite-state-machine/finite-state-machine.js +2 -1
- package/dist/common/finite-state-machine/finite-state-machine.js.map +1 -1
- package/dist/common/types/common-types.d.ts +3 -0
- package/dist/config/auth/default-password-validation-strategy.d.ts +23 -0
- package/dist/config/auth/default-password-validation-strategy.js +37 -0
- package/dist/config/auth/default-password-validation-strategy.js.map +1 -0
- package/dist/config/auth/password-validation-strategy.d.ts +22 -0
- package/dist/config/auth/password-validation-strategy.js +3 -0
- package/dist/config/auth/password-validation-strategy.js.map +1 -0
- package/dist/config/config.module.js +2 -1
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/default-config.js +4 -0
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/promotion/index.d.ts +4 -0
- package/dist/config/promotion/index.js +4 -0
- package/dist/config/promotion/index.js.map +1 -1
- package/dist/config/vendure-config.d.ts +53 -0
- package/dist/connection/connection.module.d.ts +1 -1
- package/dist/connection/transaction-wrapper.d.ts +5 -1
- package/dist/connection/transaction-wrapper.js +9 -3
- package/dist/connection/transaction-wrapper.js.map +1 -1
- package/dist/connection/transactional-connection.d.ts +7 -3
- package/dist/connection/transactional-connection.js +3 -3
- 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.d.ts +3 -0
- package/dist/data-import/index.js +3 -0
- package/dist/data-import/index.js.map +1 -1
- package/dist/data-import/providers/asset-importer/asset-importer.d.ts +12 -1
- package/dist/data-import/providers/asset-importer/asset-importer.js +12 -2
- package/dist/data-import/providers/asset-importer/asset-importer.js.map +1 -1
- package/dist/data-import/providers/import-parser/import-parser.d.ts +59 -0
- package/dist/data-import/providers/import-parser/import-parser.js +12 -0
- package/dist/data-import/providers/import-parser/import-parser.js.map +1 -1
- package/dist/data-import/providers/importer/fast-importer.service.d.ts +21 -3
- package/dist/data-import/providers/importer/fast-importer.service.js +53 -17
- package/dist/data-import/providers/importer/fast-importer.service.js.map +1 -1
- package/dist/data-import/providers/importer/importer.d.ts +18 -0
- package/dist/data-import/providers/importer/importer.js +35 -19
- package/dist/data-import/providers/importer/importer.js.map +1 -1
- package/dist/data-import/providers/populator/populator.d.ts +13 -4
- package/dist/data-import/providers/populator/populator.js +32 -20
- package/dist/data-import/providers/populator/populator.js.map +1 -1
- package/dist/event-bus/event-bus.js +12 -3
- package/dist/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/events/order-event.d.ts +17 -0
- package/dist/event-bus/events/order-event.js +22 -0
- package/dist/event-bus/events/order-event.js.map +1 -0
- package/dist/event-bus/events/order-line-event.d.ts +18 -0
- package/dist/event-bus/events/order-line-event.js +23 -0
- package/dist/event-bus/events/order-line-event.js.map +1 -0
- package/dist/event-bus/index.d.ts +2 -0
- package/dist/event-bus/index.js +2 -0
- package/dist/event-bus/index.js.map +1 -1
- package/dist/i18n/messages/en.json +1 -0
- package/dist/job-queue/job-queue.service.js +3 -0
- package/dist/job-queue/job-queue.service.js.map +1 -1
- package/dist/plugin/plugin-common.module.js +3 -0
- package/dist/plugin/plugin-common.module.js.map +1 -1
- package/dist/service/helpers/list-query-builder/list-query-builder.d.ts +19 -2
- package/dist/service/helpers/list-query-builder/list-query-builder.js +1 -1
- 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 +4 -1
- package/dist/service/helpers/list-query-builder/parse-filter-params.js.map +1 -1
- package/dist/service/helpers/order-calculator/order-calculator.d.ts +11 -1
- package/dist/service/helpers/order-calculator/order-calculator.js +10 -0
- package/dist/service/helpers/order-calculator/order-calculator.js.map +1 -1
- package/dist/service/helpers/order-calculator/prorate.js +1 -1
- package/dist/service/helpers/order-calculator/prorate.js.map +1 -1
- package/dist/service/helpers/order-modifier/order-modifier.d.ts +10 -1
- package/dist/service/helpers/order-modifier/order-modifier.js +86 -3
- package/dist/service/helpers/order-modifier/order-modifier.js.map +1 -1
- package/dist/service/helpers/request-context/request-context.service.d.ts +57 -0
- package/dist/service/helpers/request-context/request-context.service.js +155 -0
- package/dist/service/helpers/request-context/request-context.service.js.map +1 -0
- package/dist/service/helpers/slug-validator/slug-validator.js +15 -6
- package/dist/service/helpers/slug-validator/slug-validator.js.map +1 -1
- package/dist/service/helpers/utils/order-utils.js +1 -1
- package/dist/service/helpers/utils/order-utils.js.map +1 -1
- package/dist/service/helpers/utils/translate-entity.js +1 -2
- package/dist/service/helpers/utils/translate-entity.js.map +1 -1
- package/dist/service/index.d.ts +3 -0
- package/dist/service/index.js +3 -0
- package/dist/service/index.js.map +1 -1
- package/dist/service/service.module.js +2 -0
- package/dist/service/service.module.js.map +1 -1
- package/dist/service/services/asset.service.d.ts +1 -1
- package/dist/service/services/asset.service.js +5 -3
- package/dist/service/services/asset.service.js.map +1 -1
- package/dist/service/services/customer-group.service.d.ts +3 -1
- package/dist/service/services/customer-group.service.js +8 -3
- package/dist/service/services/customer-group.service.js.map +1 -1
- package/dist/service/services/customer.service.d.ts +3 -3
- package/dist/service/services/customer.service.js +32 -4
- package/dist/service/services/customer.service.js.map +1 -1
- package/dist/service/services/history.service.d.ts +1 -0
- package/dist/service/services/history.service.js.map +1 -1
- package/dist/service/services/order.service.d.ts +15 -0
- package/dist/service/services/order.service.js +85 -31
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/product-variant.service.d.ts +1 -0
- package/dist/service/services/product-variant.service.js +18 -5
- package/dist/service/services/product-variant.service.js.map +1 -1
- package/dist/service/services/promotion.service.js +2 -1
- package/dist/service/services/promotion.service.js.map +1 -1
- package/dist/service/services/session.service.js +1 -2
- package/dist/service/services/session.service.js.map +1 -1
- package/dist/service/services/user.service.d.ts +5 -4
- package/dist/service/services/user.service.js +30 -3
- package/dist/service/services/user.service.js.map +1 -1
- package/package.json +3 -3
- package/dist/api/common/request-context.service.d.ts +0 -30
- package/dist/api/common/request-context.service.js.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.customerGroup = void 0;
|
|
23
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
24
|
+
const ttl_cache_1 = require("../../../common/ttl-cache");
|
|
25
|
+
const utils_1 = require("../../../common/utils");
|
|
26
|
+
const event_bus_1 = require("../../../event-bus/event-bus");
|
|
27
|
+
const customer_group_event_1 = require("../../../event-bus/events/customer-group-event");
|
|
28
|
+
const promotion_condition_1 = require("../promotion-condition");
|
|
29
|
+
let customerService;
|
|
30
|
+
let subscription;
|
|
31
|
+
const fiveMinutes = 5 * 60 * 1000;
|
|
32
|
+
const cache = new ttl_cache_1.TtlCache({ ttl: fiveMinutes });
|
|
33
|
+
exports.customerGroup = new promotion_condition_1.PromotionCondition({
|
|
34
|
+
code: 'customer_group',
|
|
35
|
+
description: [{ languageCode: generated_types_1.LanguageCode.en, value: 'Customer is a member of the specified group' }],
|
|
36
|
+
args: {
|
|
37
|
+
customerGroupId: {
|
|
38
|
+
type: 'ID',
|
|
39
|
+
ui: { component: 'customer-group-form-input' },
|
|
40
|
+
label: [{ languageCode: generated_types_1.LanguageCode.en, value: 'Customer group' }],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
async init(injector) {
|
|
44
|
+
const { CustomerService } = await Promise.resolve().then(() => __importStar(require('../../../service/services/customer.service')));
|
|
45
|
+
customerService = injector.get(CustomerService);
|
|
46
|
+
subscription = injector
|
|
47
|
+
.get(event_bus_1.EventBus)
|
|
48
|
+
.ofType(customer_group_event_1.CustomerGroupEvent)
|
|
49
|
+
.subscribe(event => {
|
|
50
|
+
for (const customer of event.customers) {
|
|
51
|
+
cache.delete(customer.id);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
destroy() {
|
|
56
|
+
subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
|
|
57
|
+
},
|
|
58
|
+
async check(ctx, order, args) {
|
|
59
|
+
if (!order.customer) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const customerId = order.customer.id;
|
|
63
|
+
let groupIds = cache.get(customerId);
|
|
64
|
+
if (!groupIds) {
|
|
65
|
+
const groups = await customerService.getCustomerGroups(ctx, customerId);
|
|
66
|
+
groupIds = groups.map(g => g.id);
|
|
67
|
+
cache.set(customerId, groupIds);
|
|
68
|
+
}
|
|
69
|
+
return !!groupIds.find(id => utils_1.idsAreEqual(id, args.customerGroupId));
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=customer-group-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-group-condition.js","sourceRoot":"","sources":["../../../../src/config/promotion/conditions/customer-group-condition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAmE;AAInE,yDAAqD;AACrD,iDAAoD;AACpD,4DAAwD;AACxD,yFAAoF;AACpF,gEAA4D;AAE5D,IAAI,eAAqF,CAAC;AAC1F,IAAI,YAAsC,CAAC;AAE3C,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAClC,MAAM,KAAK,GAAG,IAAI,oBAAQ,CAAW,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;AAE9C,QAAA,aAAa,GAAG,IAAI,wCAAkB,CAAC;IAChD,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,8BAAY,CAAC,EAAE,EAAE,KAAK,EAAE,6CAA6C,EAAE,CAAC;IACtG,IAAI,EAAE;QACF,eAAe,EAAE;YACb,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,EAAE,SAAS,EAAE,2BAA2B,EAAE;YAC9C,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,8BAAY,CAAC,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;SACtE;KACJ;IACD,KAAK,CAAC,IAAI,CAAC,QAAQ;QAEf,MAAM,EAAE,eAAe,EAAE,GAAG,wDAAa,4CAA4C,GAAC,CAAC;QACvF,eAAe,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAChD,YAAY,GAAG,QAAQ;aAClB,GAAG,CAAC,oBAAQ,CAAC;aACb,MAAM,CAAC,yCAAkB,CAAC;aAC1B,SAAS,CAAC,KAAK,CAAC,EAAE;YAGf,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE;gBACpC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;aAC7B;QACL,CAAC,CAAC,CAAC;IACX,CAAC;IACD,OAAO;QACH,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAE,CAAC;IAChC,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI;QACxB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACjB,OAAO,KAAK,CAAC;SAChB;QACD,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,EAAE;YACX,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,iBAAiB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YACxE,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACjC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SACnC;QACD,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,mBAAW,CAAC,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PromotionCondition } from '../promotion-condition';
|
|
2
|
+
export declare const hasFacetValues: PromotionCondition<{
|
|
3
|
+
minimum: {
|
|
4
|
+
type: "int";
|
|
5
|
+
defaultValue: number;
|
|
6
|
+
};
|
|
7
|
+
facets: {
|
|
8
|
+
type: "ID";
|
|
9
|
+
list: true;
|
|
10
|
+
ui: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, "at_least_n_with_facets", boolean>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasFacetValues = void 0;
|
|
4
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
5
|
+
const transactional_connection_1 = require("../../../connection/transactional-connection");
|
|
6
|
+
const promotion_condition_1 = require("../promotion-condition");
|
|
7
|
+
const facet_value_checker_1 = require("../utils/facet-value-checker");
|
|
8
|
+
let facetValueChecker;
|
|
9
|
+
exports.hasFacetValues = new promotion_condition_1.PromotionCondition({
|
|
10
|
+
code: 'at_least_n_with_facets',
|
|
11
|
+
description: [
|
|
12
|
+
{ languageCode: generated_types_1.LanguageCode.en, value: 'Buy at least { minimum } products with the given facets' },
|
|
13
|
+
],
|
|
14
|
+
args: {
|
|
15
|
+
minimum: { type: 'int', defaultValue: 1 },
|
|
16
|
+
facets: { type: 'ID', list: true, ui: { component: 'facet-value-form-input' } },
|
|
17
|
+
},
|
|
18
|
+
init(injector) {
|
|
19
|
+
facetValueChecker = new facet_value_checker_1.FacetValueChecker(injector.get(transactional_connection_1.TransactionalConnection));
|
|
20
|
+
},
|
|
21
|
+
async check(ctx, order, args) {
|
|
22
|
+
let matches = 0;
|
|
23
|
+
for (const line of order.lines) {
|
|
24
|
+
if (await facetValueChecker.hasFacetValues(line, args.facets)) {
|
|
25
|
+
matches += line.quantity;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return args.minimum <= matches;
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=has-facet-values-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-facet-values-condition.js","sourceRoot":"","sources":["../../../../src/config/promotion/conditions/has-facet-values-condition.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AAEnE,2FAAuF;AACvF,gEAA4D;AAC5D,sEAAiE;AAEjE,IAAI,iBAAoC,CAAC;AAE5B,QAAA,cAAc,GAAG,IAAI,wCAAkB,CAAC;IACjD,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE;QACT,EAAE,YAAY,EAAE,8BAAY,CAAC,EAAE,EAAE,KAAK,EAAE,yDAAyD,EAAE;KACtG;IACD,IAAI,EAAE;QACF,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE;QACzC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,wBAAwB,EAAE,EAAE;KAClF;IACD,IAAI,CAAC,QAAQ;QACT,iBAAiB,GAAG,IAAI,uCAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,kDAAuB,CAAC,CAAC,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI;QACxB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE;YAC5B,IAAI,MAAM,iBAAiB,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;gBAC3D,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC;aAC5B;SACJ;QACD,OAAO,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC;IACnC,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PromotionCondition } from '../promotion-condition';
|
|
2
|
+
export declare const minimumOrderAmount: PromotionCondition<{
|
|
3
|
+
amount: {
|
|
4
|
+
type: "int";
|
|
5
|
+
defaultValue: number;
|
|
6
|
+
ui: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
taxInclusive: {
|
|
11
|
+
type: "boolean";
|
|
12
|
+
defaultValue: false;
|
|
13
|
+
};
|
|
14
|
+
}, "minimum_order_amount", boolean>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.minimumOrderAmount = void 0;
|
|
4
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
5
|
+
const promotion_condition_1 = require("../promotion-condition");
|
|
6
|
+
exports.minimumOrderAmount = new promotion_condition_1.PromotionCondition({
|
|
7
|
+
description: [{ languageCode: generated_types_1.LanguageCode.en, value: 'If order total is greater than { amount }' }],
|
|
8
|
+
code: 'minimum_order_amount',
|
|
9
|
+
args: {
|
|
10
|
+
amount: {
|
|
11
|
+
type: 'int',
|
|
12
|
+
defaultValue: 100,
|
|
13
|
+
ui: { component: 'currency-form-input' },
|
|
14
|
+
},
|
|
15
|
+
taxInclusive: { type: 'boolean', defaultValue: false },
|
|
16
|
+
},
|
|
17
|
+
check(ctx, order, args) {
|
|
18
|
+
if (args.taxInclusive) {
|
|
19
|
+
return order.subTotalWithTax >= args.amount;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return order.subTotal >= args.amount;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
priorityValue: 10,
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=min-order-amount-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min-order-amount-condition.js","sourceRoot":"","sources":["../../../../src/config/promotion/conditions/min-order-amount-condition.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AAEnE,gEAA4D;AAE/C,QAAA,kBAAkB,GAAG,IAAI,wCAAkB,CAAC;IACrD,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,8BAAY,CAAC,EAAE,EAAE,KAAK,EAAE,2CAA2C,EAAE,CAAC;IACpG,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACF,MAAM,EAAE;YACJ,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,GAAG;YACjB,EAAE,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE;SAC3C;QACD,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE;KACzD;IACD,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI;QAClB,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,OAAO,KAAK,CAAC,eAAe,IAAI,IAAI,CAAC,MAAM,CAAC;SAC/C;aAAM;YACH,OAAO,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC;SACxC;IACL,CAAC;IACD,aAAa,EAAE,EAAE;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export * from './promotion-action';
|
|
2
|
+
export * from './promotion-condition';
|
|
3
|
+
export * from './actions/facet-values-percentage-discount-action';
|
|
4
|
+
export * from './actions/order-percentage-discount-action';
|
|
5
|
+
export * from './actions/product-percentage-discount-action';
|
|
6
|
+
export * from './conditions/has-facet-values-condition';
|
|
7
|
+
export * from './conditions/min-order-amount-condition';
|
|
8
|
+
export * from './conditions/contains-products-condition';
|
|
9
|
+
export * from './conditions/customer-group-condition';
|
|
10
|
+
export * from './utils/facet-value-checker';
|
|
11
|
+
export declare const defaultPromotionActions: (import("./promotion-action").PromotionItemAction<{}, import("./promotion-condition").PromotionCondition<{
|
|
12
|
+
amountX: {
|
|
13
|
+
type: "int";
|
|
14
|
+
defaultValue: number;
|
|
15
|
+
};
|
|
16
|
+
variantIdsX: {
|
|
17
|
+
type: "ID";
|
|
18
|
+
list: true;
|
|
19
|
+
ui: {
|
|
20
|
+
component: string;
|
|
21
|
+
};
|
|
22
|
+
label: {
|
|
23
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
amountY: {
|
|
28
|
+
type: "int";
|
|
29
|
+
defaultValue: number;
|
|
30
|
+
};
|
|
31
|
+
variantIdsY: {
|
|
32
|
+
type: "ID";
|
|
33
|
+
list: true;
|
|
34
|
+
ui: {
|
|
35
|
+
component: string;
|
|
36
|
+
};
|
|
37
|
+
label: {
|
|
38
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
39
|
+
value: string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
}, "buy_x_get_y_free", false | {
|
|
43
|
+
freeItemIds: import("@vendure/common/lib/shared-types").ID[];
|
|
44
|
+
}>[]> | import("./promotion-action").PromotionItemAction<{
|
|
45
|
+
discount: {
|
|
46
|
+
type: "int";
|
|
47
|
+
ui: {
|
|
48
|
+
component: string;
|
|
49
|
+
suffix: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
facets: {
|
|
53
|
+
type: "ID";
|
|
54
|
+
list: true;
|
|
55
|
+
ui: {
|
|
56
|
+
component: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}, []> | import("./promotion-action").PromotionShippingAction<{}, []> | import("./promotion-action").PromotionOrderAction<{
|
|
60
|
+
discount: {
|
|
61
|
+
type: "int";
|
|
62
|
+
ui: {
|
|
63
|
+
component: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, []> | import("./promotion-action").PromotionItemAction<{
|
|
67
|
+
discount: {
|
|
68
|
+
type: "int";
|
|
69
|
+
ui: {
|
|
70
|
+
component: string;
|
|
71
|
+
suffix: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
productVariantIds: {
|
|
75
|
+
type: "ID";
|
|
76
|
+
list: true;
|
|
77
|
+
ui: {
|
|
78
|
+
component: string;
|
|
79
|
+
};
|
|
80
|
+
label: {
|
|
81
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
82
|
+
value: string;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
}, []>)[];
|
|
86
|
+
export declare const defaultPromotionConditions: (import("./promotion-condition").PromotionCondition<{
|
|
87
|
+
amountX: {
|
|
88
|
+
type: "int";
|
|
89
|
+
defaultValue: number;
|
|
90
|
+
};
|
|
91
|
+
variantIdsX: {
|
|
92
|
+
type: "ID";
|
|
93
|
+
list: true;
|
|
94
|
+
ui: {
|
|
95
|
+
component: string;
|
|
96
|
+
};
|
|
97
|
+
label: {
|
|
98
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
99
|
+
value: string;
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
amountY: {
|
|
103
|
+
type: "int";
|
|
104
|
+
defaultValue: number;
|
|
105
|
+
};
|
|
106
|
+
variantIdsY: {
|
|
107
|
+
type: "ID";
|
|
108
|
+
list: true;
|
|
109
|
+
ui: {
|
|
110
|
+
component: string;
|
|
111
|
+
};
|
|
112
|
+
label: {
|
|
113
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
114
|
+
value: string;
|
|
115
|
+
}[];
|
|
116
|
+
};
|
|
117
|
+
}, "buy_x_get_y_free", false | {
|
|
118
|
+
freeItemIds: import("@vendure/common/lib/shared-types").ID[];
|
|
119
|
+
}> | import("./promotion-condition").PromotionCondition<{
|
|
120
|
+
minimum: {
|
|
121
|
+
type: "int";
|
|
122
|
+
defaultValue: number;
|
|
123
|
+
};
|
|
124
|
+
productVariantIds: {
|
|
125
|
+
type: "ID";
|
|
126
|
+
list: true;
|
|
127
|
+
ui: {
|
|
128
|
+
component: string;
|
|
129
|
+
};
|
|
130
|
+
label: {
|
|
131
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
132
|
+
value: string;
|
|
133
|
+
}[];
|
|
134
|
+
};
|
|
135
|
+
}, "contains_products", boolean> | import("./promotion-condition").PromotionCondition<{
|
|
136
|
+
customerGroupId: {
|
|
137
|
+
type: "ID";
|
|
138
|
+
ui: {
|
|
139
|
+
component: string;
|
|
140
|
+
};
|
|
141
|
+
label: {
|
|
142
|
+
languageCode: import("@vendure/common/lib/generated-types").LanguageCode.en;
|
|
143
|
+
value: string;
|
|
144
|
+
}[];
|
|
145
|
+
};
|
|
146
|
+
}, "customer_group", boolean> | import("./promotion-condition").PromotionCondition<{
|
|
147
|
+
minimum: {
|
|
148
|
+
type: "int";
|
|
149
|
+
defaultValue: number;
|
|
150
|
+
};
|
|
151
|
+
facets: {
|
|
152
|
+
type: "ID";
|
|
153
|
+
list: true;
|
|
154
|
+
ui: {
|
|
155
|
+
component: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}, "at_least_n_with_facets", boolean> | import("./promotion-condition").PromotionCondition<{
|
|
159
|
+
amount: {
|
|
160
|
+
type: "int";
|
|
161
|
+
defaultValue: number;
|
|
162
|
+
ui: {
|
|
163
|
+
component: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
taxInclusive: {
|
|
167
|
+
type: "boolean";
|
|
168
|
+
defaultValue: false;
|
|
169
|
+
};
|
|
170
|
+
}, "minimum_order_amount", boolean>)[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.defaultPromotionConditions = exports.defaultPromotionActions = void 0;
|
|
14
|
+
const buy_x_get_y_free_action_1 = require("./actions/buy-x-get-y-free-action");
|
|
15
|
+
const facet_values_percentage_discount_action_1 = require("./actions/facet-values-percentage-discount-action");
|
|
16
|
+
const free_shipping_action_1 = require("./actions/free-shipping-action");
|
|
17
|
+
const order_fixed_discount_action_1 = require("./actions/order-fixed-discount-action");
|
|
18
|
+
const order_percentage_discount_action_1 = require("./actions/order-percentage-discount-action");
|
|
19
|
+
const product_percentage_discount_action_1 = require("./actions/product-percentage-discount-action");
|
|
20
|
+
const buy_x_get_y_free_condition_1 = require("./conditions/buy-x-get-y-free-condition");
|
|
21
|
+
const contains_products_condition_1 = require("./conditions/contains-products-condition");
|
|
22
|
+
const customer_group_condition_1 = require("./conditions/customer-group-condition");
|
|
23
|
+
const has_facet_values_condition_1 = require("./conditions/has-facet-values-condition");
|
|
24
|
+
const min_order_amount_condition_1 = require("./conditions/min-order-amount-condition");
|
|
25
|
+
__exportStar(require("./promotion-action"), exports);
|
|
26
|
+
__exportStar(require("./promotion-condition"), exports);
|
|
27
|
+
__exportStar(require("./actions/facet-values-percentage-discount-action"), exports);
|
|
28
|
+
__exportStar(require("./actions/order-percentage-discount-action"), exports);
|
|
29
|
+
__exportStar(require("./actions/product-percentage-discount-action"), exports);
|
|
30
|
+
__exportStar(require("./conditions/has-facet-values-condition"), exports);
|
|
31
|
+
__exportStar(require("./conditions/min-order-amount-condition"), exports);
|
|
32
|
+
__exportStar(require("./conditions/contains-products-condition"), exports);
|
|
33
|
+
__exportStar(require("./conditions/customer-group-condition"), exports);
|
|
34
|
+
__exportStar(require("./utils/facet-value-checker"), exports);
|
|
35
|
+
exports.defaultPromotionActions = [
|
|
36
|
+
order_fixed_discount_action_1.orderFixedDiscount,
|
|
37
|
+
order_percentage_discount_action_1.orderPercentageDiscount,
|
|
38
|
+
facet_values_percentage_discount_action_1.discountOnItemWithFacets,
|
|
39
|
+
product_percentage_discount_action_1.productsPercentageDiscount,
|
|
40
|
+
free_shipping_action_1.freeShipping,
|
|
41
|
+
buy_x_get_y_free_action_1.buyXGetYFreeAction,
|
|
42
|
+
];
|
|
43
|
+
exports.defaultPromotionConditions = [
|
|
44
|
+
min_order_amount_condition_1.minimumOrderAmount,
|
|
45
|
+
has_facet_values_condition_1.hasFacetValues,
|
|
46
|
+
contains_products_condition_1.containsProducts,
|
|
47
|
+
customer_group_condition_1.customerGroup,
|
|
48
|
+
buy_x_get_y_free_condition_1.buyXGetYFreeCondition,
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/promotion/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+EAAuE;AACvE,+GAA6F;AAC7F,yEAA8D;AAC9D,uFAA2E;AAC3E,iGAAqF;AACrF,qGAA0F;AAC1F,wFAAgF;AAChF,0FAA4E;AAC5E,oFAAsE;AACtE,wFAAyE;AACzE,wFAA6E;AAE7E,qDAAmC;AACnC,wDAAsC;AACtC,oFAAkE;AAClE,6EAA2D;AAC3D,+EAA6D;AAC7D,0EAAwD;AACxD,0EAAwD;AACxD,2EAAyD;AACzD,wEAAsD;AACtD,8DAA4C;AAE/B,QAAA,uBAAuB,GAAG;IACnC,gDAAkB;IAClB,0DAAuB;IACvB,kEAAwB;IACxB,+DAA0B;IAC1B,mCAAY;IACZ,4CAAkB;CACrB,CAAC;AACW,QAAA,0BAA0B,GAAG;IACtC,+CAAkB;IAClB,2CAAc;IACd,8CAAgB;IAChB,wCAAa;IACb,kDAAqB;CACxB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ConfigArg } from '@vendure/common/lib/generated-types';
|
|
2
|
+
import { RequestContext } from '../../api/common/request-context';
|
|
3
|
+
import { ConfigArgs, ConfigArgValues, ConfigurableOperationDef, ConfigurableOperationDefOptions } from '../../common/configurable-operation';
|
|
4
|
+
import { PromotionState } from '../../entity';
|
|
5
|
+
import { OrderItem } from '../../entity/order-item/order-item.entity';
|
|
6
|
+
import { OrderLine } from '../../entity/order-line/order-line.entity';
|
|
7
|
+
import { Order } from '../../entity/order/order.entity';
|
|
8
|
+
import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity';
|
|
9
|
+
import { PromotionCondition } from './promotion-condition';
|
|
10
|
+
declare type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
|
|
11
|
+
declare type ConditionCheckReturnType<T extends PromotionCondition<any>> = Exclude<Awaited<ReturnType<T['check']>>, false>;
|
|
12
|
+
export declare type ConditionTuple<C extends Array<PromotionCondition<any>>> = [...C];
|
|
13
|
+
declare type CodesStateTuple<T extends ConditionTuple<Array<PromotionCondition<any>>>> = {
|
|
14
|
+
[K in keyof T]: T[K] extends PromotionCondition<any> ? [T[K]['code'], ConditionCheckReturnType<T[K]>] : never;
|
|
15
|
+
};
|
|
16
|
+
declare type TupleToUnion<T extends any[]> = T[number];
|
|
17
|
+
export declare type ConditionState<U extends Array<PromotionCondition<any>>, T extends [string, any] = TupleToUnion<CodesStateTuple<ConditionTuple<U>>>> = {
|
|
18
|
+
[key in T[0]]: Extract<T, [key, any]>[1];
|
|
19
|
+
};
|
|
20
|
+
export declare type ExecutePromotionItemActionFn<T extends ConfigArgs, U extends Array<PromotionCondition<any>>> = (ctx: RequestContext, orderItem: OrderItem, orderLine: OrderLine, args: ConfigArgValues<T>, state: ConditionState<U>) => number | Promise<number>;
|
|
21
|
+
export declare type ExecutePromotionOrderActionFn<T extends ConfigArgs, U extends Array<PromotionCondition<any>>> = (ctx: RequestContext, order: Order, args: ConfigArgValues<T>, state: ConditionState<U>) => number | Promise<number>;
|
|
22
|
+
export declare type ExecutePromotionShippingActionFn<T extends ConfigArgs, U extends Array<PromotionCondition<any>>> = (ctx: RequestContext, shippingLine: ShippingLine, order: Order, args: ConfigArgValues<T>, state: ConditionState<U>) => number | Promise<number>;
|
|
23
|
+
export interface PromotionActionConfig<T extends ConfigArgs, U extends Array<PromotionCondition<any>> | undefined> extends ConfigurableOperationDefOptions<T> {
|
|
24
|
+
priorityValue?: number;
|
|
25
|
+
conditions?: U extends undefined ? undefined : ConditionTuple<Exclude<U, undefined>>;
|
|
26
|
+
}
|
|
27
|
+
export interface PromotionItemActionConfig<T extends ConfigArgs, U extends PromotionCondition[]> extends PromotionActionConfig<T, U> {
|
|
28
|
+
execute: ExecutePromotionItemActionFn<T, U>;
|
|
29
|
+
}
|
|
30
|
+
export interface PromotionOrderActionConfig<T extends ConfigArgs, U extends PromotionCondition[]> extends PromotionActionConfig<T, U> {
|
|
31
|
+
execute: ExecutePromotionOrderActionFn<T, U>;
|
|
32
|
+
}
|
|
33
|
+
export interface PromotionShippingActionConfig<T extends ConfigArgs, U extends PromotionCondition[]> extends PromotionActionConfig<T, U> {
|
|
34
|
+
execute: ExecutePromotionShippingActionFn<T, U>;
|
|
35
|
+
}
|
|
36
|
+
export declare abstract class PromotionAction<T extends ConfigArgs = {}, U extends PromotionCondition[] | undefined = any> extends ConfigurableOperationDef<T> {
|
|
37
|
+
readonly priorityValue: number;
|
|
38
|
+
readonly conditions?: U;
|
|
39
|
+
protected constructor(config: PromotionActionConfig<T, U>);
|
|
40
|
+
}
|
|
41
|
+
export declare class PromotionItemAction<T extends ConfigArgs = ConfigArgs, U extends Array<PromotionCondition<any>> = []> extends PromotionAction<T, U> {
|
|
42
|
+
private readonly executeFn;
|
|
43
|
+
constructor(config: PromotionItemActionConfig<T, U>);
|
|
44
|
+
execute(ctx: RequestContext, orderItem: OrderItem, orderLine: OrderLine, args: ConfigArg[], state: PromotionState): number | Promise<number>;
|
|
45
|
+
}
|
|
46
|
+
export declare class PromotionOrderAction<T extends ConfigArgs = ConfigArgs, U extends PromotionCondition[] = []> extends PromotionAction<T, U> {
|
|
47
|
+
private readonly executeFn;
|
|
48
|
+
constructor(config: PromotionOrderActionConfig<T, U>);
|
|
49
|
+
execute(ctx: RequestContext, order: Order, args: ConfigArg[], state: PromotionState): number | Promise<number>;
|
|
50
|
+
}
|
|
51
|
+
export declare class PromotionShippingAction<T extends ConfigArgs = ConfigArgs, U extends PromotionCondition[] = []> extends PromotionAction<T, U> {
|
|
52
|
+
private readonly executeFn;
|
|
53
|
+
constructor(config: PromotionShippingActionConfig<T, U>);
|
|
54
|
+
execute(ctx: RequestContext, shippingLine: ShippingLine, order: Order, args: ConfigArg[], state: PromotionState): number | Promise<number>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromotionShippingAction = exports.PromotionOrderAction = exports.PromotionItemAction = exports.PromotionAction = void 0;
|
|
4
|
+
const pick_1 = require("@vendure/common/lib/pick");
|
|
5
|
+
const configurable_operation_1 = require("../../common/configurable-operation");
|
|
6
|
+
class PromotionAction extends configurable_operation_1.ConfigurableOperationDef {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super(config);
|
|
9
|
+
this.priorityValue = config.priorityValue || 0;
|
|
10
|
+
this.conditions = config.conditions;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.PromotionAction = PromotionAction;
|
|
14
|
+
class PromotionItemAction extends PromotionAction {
|
|
15
|
+
constructor(config) {
|
|
16
|
+
super(config);
|
|
17
|
+
this.executeFn = config.execute;
|
|
18
|
+
}
|
|
19
|
+
execute(ctx, orderItem, orderLine, args, state) {
|
|
20
|
+
const actionState = this.conditions
|
|
21
|
+
? pick_1.pick(state, this.conditions.map(c => c.code))
|
|
22
|
+
: {};
|
|
23
|
+
return this.executeFn(ctx, orderItem, orderLine, this.argsArrayToHash(args), actionState);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.PromotionItemAction = PromotionItemAction;
|
|
27
|
+
class PromotionOrderAction extends PromotionAction {
|
|
28
|
+
constructor(config) {
|
|
29
|
+
super(config);
|
|
30
|
+
this.executeFn = config.execute;
|
|
31
|
+
}
|
|
32
|
+
execute(ctx, order, args, state) {
|
|
33
|
+
const actionState = this.conditions ? pick_1.pick(state, this.conditions.map(c => c.code)) : {};
|
|
34
|
+
return this.executeFn(ctx, order, this.argsArrayToHash(args), actionState);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.PromotionOrderAction = PromotionOrderAction;
|
|
38
|
+
class PromotionShippingAction extends PromotionAction {
|
|
39
|
+
constructor(config) {
|
|
40
|
+
super(config);
|
|
41
|
+
this.executeFn = config.execute;
|
|
42
|
+
}
|
|
43
|
+
execute(ctx, shippingLine, order, args, state) {
|
|
44
|
+
const actionState = this.conditions ? pick_1.pick(state, this.conditions.map(c => c.code)) : {};
|
|
45
|
+
return this.executeFn(ctx, shippingLine, order, this.argsArrayToHash(args), actionState);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.PromotionShippingAction = PromotionShippingAction;
|
|
49
|
+
//# sourceMappingURL=promotion-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-action.js","sourceRoot":"","sources":["../../../src/config/promotion/promotion-action.ts"],"names":[],"mappings":";;;AACA,mDAAgD;AAGhD,gFAK6C;AAgM7C,MAAsB,eAGpB,SAAQ,iDAA2B;IAYjC,YAAsB,MAAmC;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACxC,CAAC;CACJ;AApBD,0CAoBC;AAuBD,MAAa,mBAGX,SAAQ,eAAqB;IAE3B,YAAY,MAAuC;QAC/C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;IACpC,CAAC;IAGD,OAAO,CACH,GAAmB,EACnB,SAAoB,EACpB,SAAoB,EACpB,IAAiB,EACjB,KAAqB;QAErB,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU;YAC/B,CAAC,CAAC,WAAI,CACA,KAAK,EACL,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACnC;YACH,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,IAAI,CAAC,SAAS,CACjB,GAAG,EACH,SAAS,EACT,SAAS,EACT,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAC1B,WAAgC,CACnC,CAAC;IACN,CAAC;CACJ;AAhCD,kDAgCC;AAuBD,MAAa,oBAGX,SAAQ,eAAqB;IAE3B,YAAY,MAAwC;QAChD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;IACpC,CAAC;IAGD,OAAO,CAAC,GAAmB,EAAE,KAAY,EAAE,IAAiB,EAAE,KAAqB;QAC/E,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,WAAgC,CAAC,CAAC;IACpG,CAAC;CACJ;AAfD,oDAeC;AAUD,MAAa,uBAGX,SAAQ,eAAqB;IAE3B,YAAY,MAA2C;QACnD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;IACpC,CAAC;IAGD,OAAO,CACH,GAAmB,EACnB,YAA0B,EAC1B,KAAY,EACZ,IAAiB,EACjB,KAAqB;QAErB,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,OAAO,IAAI,CAAC,SAAS,CACjB,GAAG,EACH,YAAY,EACZ,KAAK,EACL,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAC1B,WAAgC,CACnC,CAAC;IACN,CAAC;CACJ;AA3BD,0DA2BC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConfigArg } from '@vendure/common/lib/generated-types';
|
|
2
|
+
import { RequestContext } from '../../api/common/request-context';
|
|
3
|
+
import { ConfigArgs, ConfigArgValues, ConfigurableOperationDef, ConfigurableOperationDefOptions } from '../../common/configurable-operation';
|
|
4
|
+
import { Order } from '../../entity/order/order.entity';
|
|
5
|
+
export declare type PromotionConditionState = Record<string, unknown>;
|
|
6
|
+
export declare type CheckPromotionConditionResult = boolean | PromotionConditionState;
|
|
7
|
+
export declare type CheckPromotionConditionFn<T extends ConfigArgs, R extends CheckPromotionConditionResult> = (ctx: RequestContext, order: Order, args: ConfigArgValues<T>) => R | Promise<R>;
|
|
8
|
+
export interface PromotionConditionConfig<T extends ConfigArgs, C extends string, R extends CheckPromotionConditionResult> extends ConfigurableOperationDefOptions<T> {
|
|
9
|
+
code: C;
|
|
10
|
+
check: CheckPromotionConditionFn<T, R>;
|
|
11
|
+
priorityValue?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class PromotionCondition<T extends ConfigArgs = ConfigArgs, C extends string = string, R extends CheckPromotionConditionResult = any> extends ConfigurableOperationDef<T> {
|
|
14
|
+
readonly priorityValue: number;
|
|
15
|
+
private readonly checkFn;
|
|
16
|
+
get code(): C;
|
|
17
|
+
constructor(config: PromotionConditionConfig<T, C, R>);
|
|
18
|
+
check(ctx: RequestContext, order: Order, args: ConfigArg[]): Promise<R>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromotionCondition = void 0;
|
|
4
|
+
const configurable_operation_1 = require("../../common/configurable-operation");
|
|
5
|
+
class PromotionCondition extends configurable_operation_1.ConfigurableOperationDef {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(config);
|
|
8
|
+
this.checkFn = config.check;
|
|
9
|
+
this.priorityValue = config.priorityValue || 0;
|
|
10
|
+
}
|
|
11
|
+
get code() {
|
|
12
|
+
return super.code;
|
|
13
|
+
}
|
|
14
|
+
async check(ctx, order, args) {
|
|
15
|
+
return this.checkFn(ctx, order, this.argsArrayToHash(args));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.PromotionCondition = PromotionCondition;
|
|
19
|
+
//# sourceMappingURL=promotion-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-condition.js","sourceRoot":"","sources":["../../../src/config/promotion/promotion-condition.ts"],"names":[],"mappings":";;;AAGA,gFAK6C;AAuD7C,MAAa,kBAIX,SAAQ,iDAA2B;IAgBjC,YAAY,MAAyC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,CAAC,CAAC;IACnD,CAAC;IARD,IAAI,IAAI;QACJ,OAAO,KAAK,CAAC,IAAS,CAAC;IAC3B,CAAC;IAaD,KAAK,CAAC,KAAK,CAAC,GAAmB,EAAE,KAAY,EAAE,IAAiB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ;AAlCD,gDAkCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ID } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { TransactionalConnection } from '../../../connection/transactional-connection';
|
|
3
|
+
import { OrderLine } from '../../../entity/order-line/order-line.entity';
|
|
4
|
+
export declare class FacetValueChecker {
|
|
5
|
+
private connection;
|
|
6
|
+
private variantCache;
|
|
7
|
+
constructor(connection: TransactionalConnection);
|
|
8
|
+
hasFacetValues(orderLine: OrderLine, facetValueIds: ID[]): Promise<boolean>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FacetValueChecker = void 0;
|
|
4
|
+
const unique_1 = require("@vendure/common/lib/unique");
|
|
5
|
+
const ttl_cache_1 = require("../../../common/ttl-cache");
|
|
6
|
+
const utils_1 = require("../../../common/utils");
|
|
7
|
+
const product_variant_entity_1 = require("../../../entity/product-variant/product-variant.entity");
|
|
8
|
+
class FacetValueChecker {
|
|
9
|
+
constructor(connection) {
|
|
10
|
+
this.connection = connection;
|
|
11
|
+
this.variantCache = new ttl_cache_1.TtlCache({ ttl: 5000 });
|
|
12
|
+
}
|
|
13
|
+
async hasFacetValues(orderLine, facetValueIds) {
|
|
14
|
+
let variant = this.variantCache.get(orderLine.productVariant.id);
|
|
15
|
+
if (!variant) {
|
|
16
|
+
variant = await this.connection
|
|
17
|
+
.getRepository(product_variant_entity_1.ProductVariant)
|
|
18
|
+
.findOne(orderLine.productVariant.id, {
|
|
19
|
+
relations: ['product', 'product.facetValues', 'facetValues'],
|
|
20
|
+
});
|
|
21
|
+
if (!variant) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
this.variantCache.set(variant.id, variant);
|
|
25
|
+
}
|
|
26
|
+
const allFacetValues = unique_1.unique([...variant.facetValues, ...variant.product.facetValues], 'id');
|
|
27
|
+
return facetValueIds.reduce((result, id) => result && !!allFacetValues.find(fv => utils_1.idsAreEqual(fv.id, id)), true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.FacetValueChecker = FacetValueChecker;
|
|
31
|
+
//# sourceMappingURL=facet-value-checker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet-value-checker.js","sourceRoot":"","sources":["../../../../src/config/promotion/utils/facet-value-checker.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AAEpD,yDAAqD;AACrD,iDAAoD;AAGpD,mGAAwF;AAwCxF,MAAa,iBAAiB;IAG1B,YAAoB,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;QAF/C,iBAAY,GAAG,IAAI,oBAAQ,CAAqB,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAEb,CAAC;IAO3D,KAAK,CAAC,cAAc,CAAC,SAAoB,EAAE,aAAmB;QAC1D,IAAI,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU;iBAC1B,aAAa,CAAC,uCAAc,CAAC;iBAC7B,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE;gBAClC,SAAS,EAAE,CAAC,SAAS,EAAE,qBAAqB,EAAE,aAAa,CAAC;aAC/D,CAAC,CAAC;YACP,IAAI,CAAC,OAAO,EAAE;gBACV,OAAO,KAAK,CAAC;aAChB;YACD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;SAC9C;QACD,MAAM,cAAc,GAAG,eAAM,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;QAC9F,OAAO,aAAa,CAAC,MAAM,CACvB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,mBAAW,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAC7E,IAAe,CAClB,CAAC;IACN,CAAC;CACJ;AA7BD,8CA6BC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CachedSession, SessionCacheStrategy } from './session-cache-strategy';
|
|
2
|
+
export declare class InMemorySessionCacheStrategy implements SessionCacheStrategy {
|
|
3
|
+
private readonly cache;
|
|
4
|
+
private readonly cacheSize;
|
|
5
|
+
constructor(cacheSize?: number);
|
|
6
|
+
delete(sessionToken: string): void;
|
|
7
|
+
get(sessionToken: string): CachedSession | undefined;
|
|
8
|
+
set(session: CachedSession): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
private first;
|
|
11
|
+
}
|