@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,18 @@
|
|
|
1
|
+
import { Type } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { RequestContext } from '../../../api/common/request-context';
|
|
3
|
+
import { ConfigService } from '../../../config/config.service';
|
|
4
|
+
import { HasCustomFields } from '../../../config/custom-field/custom-field-types';
|
|
5
|
+
import { TransactionalConnection } from '../../../connection/transactional-connection';
|
|
6
|
+
import { VendureEntity } from '../../../entity/base/base.entity';
|
|
7
|
+
export declare class CustomFieldRelationService {
|
|
8
|
+
private connection;
|
|
9
|
+
private configService;
|
|
10
|
+
constructor(connection: TransactionalConnection, configService: ConfigService);
|
|
11
|
+
updateRelations<T extends HasCustomFields & VendureEntity>(ctx: RequestContext, entityType: Type<T>, input: {
|
|
12
|
+
customFields?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
}, entity: T): Promise<T>;
|
|
16
|
+
private isRelationalType;
|
|
17
|
+
private isId;
|
|
18
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CustomFieldRelationService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const pick_1 = require("@vendure/common/lib/pick");
|
|
15
|
+
const shared_utils_1 = require("@vendure/common/lib/shared-utils");
|
|
16
|
+
const config_service_1 = require("../../../config/config.service");
|
|
17
|
+
const transactional_connection_1 = require("../../../connection/transactional-connection");
|
|
18
|
+
let CustomFieldRelationService = class CustomFieldRelationService {
|
|
19
|
+
constructor(connection, configService) {
|
|
20
|
+
this.connection = connection;
|
|
21
|
+
this.configService = configService;
|
|
22
|
+
}
|
|
23
|
+
async updateRelations(ctx, entityType, input, entity) {
|
|
24
|
+
if (input.customFields) {
|
|
25
|
+
const relationCustomFields = this.configService.customFields[entityType.name].filter(this.isRelationalType);
|
|
26
|
+
for (const field of relationCustomFields) {
|
|
27
|
+
const inputIdName = shared_utils_1.getGraphQlInputName(field);
|
|
28
|
+
const idOrIds = input.customFields[inputIdName];
|
|
29
|
+
if (idOrIds !== undefined) {
|
|
30
|
+
let relations;
|
|
31
|
+
if (idOrIds === null) {
|
|
32
|
+
relations = null;
|
|
33
|
+
}
|
|
34
|
+
else if (field.list && Array.isArray(idOrIds) && idOrIds.every(id => this.isId(id))) {
|
|
35
|
+
relations = await this.connection.getRepository(ctx, field.entity).findByIds(idOrIds);
|
|
36
|
+
}
|
|
37
|
+
else if (!field.list && this.isId(idOrIds)) {
|
|
38
|
+
relations = await this.connection.getRepository(ctx, field.entity).findOne(idOrIds);
|
|
39
|
+
}
|
|
40
|
+
if (relations !== undefined) {
|
|
41
|
+
entity.customFields = Object.assign(Object.assign({}, entity.customFields), { [field.name]: relations });
|
|
42
|
+
await this.connection
|
|
43
|
+
.getRepository(ctx, entityType)
|
|
44
|
+
.save(pick_1.pick(entity, ['id', 'customFields']), { reload: false });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return entity;
|
|
50
|
+
}
|
|
51
|
+
isRelationalType(input) {
|
|
52
|
+
return input.type === 'relation';
|
|
53
|
+
}
|
|
54
|
+
isId(input) {
|
|
55
|
+
return typeof input === 'string' || typeof input === 'number';
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
CustomFieldRelationService = __decorate([
|
|
59
|
+
common_1.Injectable(),
|
|
60
|
+
__metadata("design:paramtypes", [transactional_connection_1.TransactionalConnection, config_service_1.ConfigService])
|
|
61
|
+
], CustomFieldRelationService);
|
|
62
|
+
exports.CustomFieldRelationService = CustomFieldRelationService;
|
|
63
|
+
//# sourceMappingURL=custom-field-relation.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-field-relation.service.js","sourceRoot":"","sources":["../../../../src/service/helpers/custom-field-relation/custom-field-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAgD;AAEhD,mEAAuE;AAGvE,mEAA+D;AAO/D,2FAAuF;AAIvF,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;IACnC,YAAoB,UAAmC,EAAU,aAA4B;QAAzE,eAAU,GAAV,UAAU,CAAyB;QAAU,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAQjG,KAAK,CAAC,eAAe,CACjB,GAAmB,EACnB,UAAmB,EACnB,KAAgD,EAChD,MAAS;QAET,IAAI,KAAK,CAAC,YAAY,EAAE;YACpB,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CACxD,UAAU,CAAC,IAA0B,CACxC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAEhC,KAAK,MAAM,KAAK,IAAI,oBAAoB,EAAE;gBACtC,MAAM,WAAW,GAAG,kCAAmB,CAAC,KAAK,CAAC,CAAC;gBAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;gBAChD,IAAI,OAAO,KAAK,SAAS,EAAE;oBACvB,IAAI,SAA6D,CAAC;oBAClE,IAAI,OAAO,KAAK,IAAI,EAAE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mBAAU,EAAE;qCAEuB,kDAAuB,EAAyB,8BAAa;GADpF,0BAA0B,CAoDtC;AApDY,gEAA0B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RequestContext } from '../../../api/common/request-context';
|
|
2
|
+
import { StateMachineConfig } from '../../../common/finite-state-machine/types';
|
|
3
|
+
import { ConfigService } from '../../../config/config.service';
|
|
4
|
+
import { Fulfillment } from '../../../entity/fulfillment/fulfillment.entity';
|
|
5
|
+
import { Order } from '../../../entity/order/order.entity';
|
|
6
|
+
import { HistoryService } from '../../services/history.service';
|
|
7
|
+
import { FulfillmentState, FulfillmentTransitionData } from './fulfillment-state';
|
|
8
|
+
export declare class FulfillmentStateMachine {
|
|
9
|
+
private configService;
|
|
10
|
+
private historyService;
|
|
11
|
+
readonly config: StateMachineConfig<FulfillmentState, FulfillmentTransitionData>;
|
|
12
|
+
private readonly initialState;
|
|
13
|
+
constructor(configService: ConfigService, historyService: HistoryService);
|
|
14
|
+
getInitialState(): FulfillmentState;
|
|
15
|
+
canTransition(currentState: FulfillmentState, newState: FulfillmentState): boolean;
|
|
16
|
+
getNextStates(fulfillment: Fulfillment): ReadonlyArray<FulfillmentState>;
|
|
17
|
+
transition(ctx: RequestContext, fulfillment: Fulfillment, orders: Order[], state: FulfillmentState): Promise<void>;
|
|
18
|
+
private onTransitionStart;
|
|
19
|
+
private onTransitionEnd;
|
|
20
|
+
private initConfig;
|
|
21
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FulfillmentStateMachine = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
15
|
+
const errors_1 = require("../../../common/error/errors");
|
|
16
|
+
const finite_state_machine_1 = require("../../../common/finite-state-machine/finite-state-machine");
|
|
17
|
+
const merge_transition_definitions_1 = require("../../../common/finite-state-machine/merge-transition-definitions");
|
|
18
|
+
const validate_transition_definition_1 = require("../../../common/finite-state-machine/validate-transition-definition");
|
|
19
|
+
const utils_1 = require("../../../common/utils");
|
|
20
|
+
const config_service_1 = require("../../../config/config.service");
|
|
21
|
+
const history_service_1 = require("../../services/history.service");
|
|
22
|
+
const fulfillment_state_1 = require("./fulfillment-state");
|
|
23
|
+
let FulfillmentStateMachine = class FulfillmentStateMachine {
|
|
24
|
+
constructor(configService, historyService) {
|
|
25
|
+
this.configService = configService;
|
|
26
|
+
this.historyService = historyService;
|
|
27
|
+
this.initialState = 'Created';
|
|
28
|
+
this.config = this.initConfig();
|
|
29
|
+
}
|
|
30
|
+
getInitialState() {
|
|
31
|
+
return this.initialState;
|
|
32
|
+
}
|
|
33
|
+
canTransition(currentState, newState) {
|
|
34
|
+
return new finite_state_machine_1.FSM(this.config, currentState).canTransitionTo(newState);
|
|
35
|
+
}
|
|
36
|
+
getNextStates(fulfillment) {
|
|
37
|
+
const fsm = new finite_state_machine_1.FSM(this.config, fulfillment.state);
|
|
38
|
+
return fsm.getNextStates();
|
|
39
|
+
}
|
|
40
|
+
async transition(ctx, fulfillment, orders, state) {
|
|
41
|
+
const fsm = new finite_state_machine_1.FSM(this.config, fulfillment.state);
|
|
42
|
+
await fsm.transitionTo(state, { ctx, orders, fulfillment });
|
|
43
|
+
fulfillment.state = fsm.currentState;
|
|
44
|
+
}
|
|
45
|
+
async onTransitionStart(fromState, toState, data) {
|
|
46
|
+
const { fulfillmentHandlers } = this.configService.shippingOptions;
|
|
47
|
+
const fulfillmentHandler = fulfillmentHandlers.find(h => h.code === data.fulfillment.handlerCode);
|
|
48
|
+
if (fulfillmentHandler) {
|
|
49
|
+
const result = await utils_1.awaitPromiseOrObservable(fulfillmentHandler.onFulfillmentTransition(fromState, toState, data));
|
|
50
|
+
if (result === false || typeof result === 'string') {
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async onTransitionEnd(fromState, toState, data) {
|
|
56
|
+
const historyEntryPromises = data.orders.map(order => this.historyService.createHistoryEntryForOrder({
|
|
57
|
+
orderId: order.id,
|
|
58
|
+
type: generated_types_1.HistoryEntryType.ORDER_FULFILLMENT_TRANSITION,
|
|
59
|
+
ctx: data.ctx,
|
|
60
|
+
data: {
|
|
61
|
+
fulfillmentId: data.fulfillment.id,
|
|
62
|
+
from: fromState,
|
|
63
|
+
to: toState,
|
|
64
|
+
},
|
|
65
|
+
}));
|
|
66
|
+
await Promise.all(historyEntryPromises);
|
|
67
|
+
}
|
|
68
|
+
initConfig() {
|
|
69
|
+
var _a;
|
|
70
|
+
const customProcesses = (_a = this.configService.shippingOptions.customFulfillmentProcess) !== null && _a !== void 0 ? _a : [];
|
|
71
|
+
const allTransitions = customProcesses.reduce((transitions, process) => merge_transition_definitions_1.mergeTransitionDefinitions(transitions, process.transitions), fulfillment_state_1.fulfillmentStateTransitions);
|
|
72
|
+
const validationResult = validate_transition_definition_1.validateTransitionDefinition(allTransitions, 'Pending');
|
|
73
|
+
return {
|
|
74
|
+
transitions: allTransitions,
|
|
75
|
+
onTransitionStart: async (fromState, toState, data) => {
|
|
76
|
+
for (const process of customProcesses) {
|
|
77
|
+
if (typeof process.onTransitionStart === 'function') {
|
|
78
|
+
const result = await utils_1.awaitPromiseOrObservable(process.onTransitionStart(fromState, toState, data));
|
|
79
|
+
if (result === false || typeof result === 'string') {
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return this.onTransitionStart(fromState, toState, data);
|
|
85
|
+
},
|
|
86
|
+
onTransitionEnd: async (fromState, toState, data) => {
|
|
87
|
+
for (const process of customProcesses) {
|
|
88
|
+
if (typeof process.onTransitionEnd === 'function') {
|
|
89
|
+
await utils_1.awaitPromiseOrObservable(process.onTransitionEnd(fromState, toState, data));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
await this.onTransitionEnd(fromState, toState, data);
|
|
93
|
+
},
|
|
94
|
+
onError: async (fromState, toState, message) => {
|
|
95
|
+
for (const process of customProcesses) {
|
|
96
|
+
if (typeof process.onTransitionError === 'function') {
|
|
97
|
+
await utils_1.awaitPromiseOrObservable(process.onTransitionError(fromState, toState, message));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
throw new errors_1.IllegalOperationError(message || 'error.cannot-transition-fulfillment-from-to', {
|
|
101
|
+
fromState,
|
|
102
|
+
toState,
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
FulfillmentStateMachine = __decorate([
|
|
109
|
+
common_1.Injectable(),
|
|
110
|
+
__metadata("design:paramtypes", [config_service_1.ConfigService, history_service_1.HistoryService])
|
|
111
|
+
], FulfillmentStateMachine);
|
|
112
|
+
exports.FulfillmentStateMachine = FulfillmentStateMachine;
|
|
113
|
+
//# sourceMappingURL=fulfillment-state-machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fulfillment-state-machine.js","sourceRoot":"","sources":["../../../../src/service/helpers/fulfillment-state-machine/fulfillment-state-machine.ts"],"names":[],"mappings":";;;;;;;;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AS,EAAE,OAAO,EAAE,OAAO,CAAC,CACzD,CAAC;qBACL;iBACJ;gBACD,MAAM,IAAI,8BAAqB,CAAC,OAAO,IAAI,6CAA6C,EAAE;oBACtF,SAAS;oBACT,OAAO;iBACV,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AA5HY,uBAAuB;IADnC,mBAAU,EAAE;qCAK0B,8BAAa,EAA0B,gCAAc;GAJ/E,uBAAuB,CA4HnC;AA5HY,0DAAuB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RequestContext } from '../../../api/common/request-context';
|
|
2
|
+
import { Transitions } from '../../../common/finite-state-machine/types';
|
|
3
|
+
import { Fulfillment } from '../../../entity/fulfillment/fulfillment.entity';
|
|
4
|
+
import { Order } from '../../../entity/order/order.entity';
|
|
5
|
+
export declare type FulfillmentState = 'Created' | 'Pending' | 'Shipped' | 'Delivered' | 'Cancelled';
|
|
6
|
+
export declare const fulfillmentStateTransitions: Transitions<FulfillmentState>;
|
|
7
|
+
export interface FulfillmentTransitionData {
|
|
8
|
+
ctx: RequestContext;
|
|
9
|
+
orders: Order[];
|
|
10
|
+
fulfillment: Fulfillment;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fulfillmentStateTransitions = void 0;
|
|
4
|
+
exports.fulfillmentStateTransitions = {
|
|
5
|
+
Created: {
|
|
6
|
+
to: ['Pending'],
|
|
7
|
+
},
|
|
8
|
+
Pending: {
|
|
9
|
+
to: ['Shipped', 'Delivered', 'Cancelled'],
|
|
10
|
+
},
|
|
11
|
+
Shipped: {
|
|
12
|
+
to: ['Delivered', 'Cancelled'],
|
|
13
|
+
},
|
|
14
|
+
Delivered: {
|
|
15
|
+
to: ['Cancelled'],
|
|
16
|
+
},
|
|
17
|
+
Cancelled: {
|
|
18
|
+
to: [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=fulfillment-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fulfillment-state.js","sourceRoot":"","sources":["../../../../src/service/helpers/fulfillment-state-machine/fulfillment-state.ts"],"names":[],"mappings":";;;AAaa,QAAA,2BAA2B,GAAkC;IACtE,OAAO,EAAE;QACL,EAAE,EAAE,CAAC,SAAS,CAAC;KAClB;IACD,OAAO,EAAE;QACL,EAAE,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC;KAC5C;IACD,OAAO,EAAE;QACL,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACjC;IACD,SAAS,EAAE;QACP,EAAE,EAAE,CAAC,WAAW,CAAC;KACpB;IACD,SAAS,EAAE;QACP,EAAE,EAAE,EAAE;KACT;CACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { Connection } from 'typeorm';
|
|
3
|
+
import { ColumnMetadata } from 'typeorm/metadata/ColumnMetadata';
|
|
4
|
+
export declare function getColumnMetadata<T>(connection: Connection, entity: Type<T>): {
|
|
5
|
+
columns: ColumnMetadata[];
|
|
6
|
+
translationColumns: ColumnMetadata[];
|
|
7
|
+
alias: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function getEntityAlias<T>(connection: Connection, entity: Type<T>): string;
|
|
10
|
+
export declare function escapeCalculatedColumnExpression(connection: Connection, expression: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.escapeCalculatedColumnExpression = exports.getEntityAlias = exports.getColumnMetadata = void 0;
|
|
4
|
+
function getColumnMetadata(connection, entity) {
|
|
5
|
+
const metadata = connection.getMetadata(entity);
|
|
6
|
+
const columns = metadata.columns;
|
|
7
|
+
let translationColumns = [];
|
|
8
|
+
const relations = metadata.relations;
|
|
9
|
+
const translationRelation = relations.find(r => r.propertyName === 'translations');
|
|
10
|
+
if (translationRelation) {
|
|
11
|
+
const translationMetadata = connection.getMetadata(translationRelation.type);
|
|
12
|
+
translationColumns = translationColumns.concat(translationMetadata.columns.filter(c => !c.relationMetadata));
|
|
13
|
+
}
|
|
14
|
+
const alias = metadata.name.toLowerCase();
|
|
15
|
+
return { columns, translationColumns, alias };
|
|
16
|
+
}
|
|
17
|
+
exports.getColumnMetadata = getColumnMetadata;
|
|
18
|
+
function getEntityAlias(connection, entity) {
|
|
19
|
+
return connection.getMetadata(entity).name.toLowerCase();
|
|
20
|
+
}
|
|
21
|
+
exports.getEntityAlias = getEntityAlias;
|
|
22
|
+
function escapeCalculatedColumnExpression(connection, expression) {
|
|
23
|
+
return expression.replace(/\b([a-z]+[A-Z]\w+)\b/g, substring => connection.driver.escape(substring));
|
|
24
|
+
}
|
|
25
|
+
exports.escapeCalculatedColumnExpression = escapeCalculatedColumnExpression;
|
|
26
|
+
//# sourceMappingURL=connection-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-utils.js","sourceRoot":"","sources":["../../../../src/service/helpers/list-query-builder/connection-utils.ts"],"names":[],"mappings":";;;AAUA,SAAgB,iBAAiB,CAAI,UAAsB,EAAE,MAAe;IACxE,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,IAAI,kBAAkB,GAAqB,EAAE,CAAC;IAC9C,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;IAErC,MAAM,mBAAmB,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,cAAc,CAAC,CAAC;IACnF,IAAI,mBAAmB,EAAE;QACrB,MAAM,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC7E,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAC1C,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAC/D,CAAC;KACL;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC1C,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC;AAClD,CAAC;AAfD,8CAeC;AAED,SAAgB,cAAc,CAAI,UAAsB,EAAE,MAAe;IACrE,OAAO,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAC7D,CAAC;AAFD,wCAEC;AAMD,SAAgB,gCAAgC,CAAC,UAAsB,EAAE,UAAkB;IACvF,OAAO,UAAU,CAAC,OAAO,CAAC,uBAAuB,EAAE,SAAS,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AACzG,CAAC;AAFD,4EAEC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCalculatedColumns = void 0;
|
|
4
|
+
const calculated_decorator_1 = require("../../../common/calculated-decorator");
|
|
5
|
+
function getCalculatedColumns(entity) {
|
|
6
|
+
const calculatedColumns = [];
|
|
7
|
+
const prototype = entity.prototype;
|
|
8
|
+
if (prototype.hasOwnProperty(calculated_decorator_1.CALCULATED_PROPERTIES)) {
|
|
9
|
+
for (const property of prototype[calculated_decorator_1.CALCULATED_PROPERTIES]) {
|
|
10
|
+
calculatedColumns.push(property);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return calculatedColumns;
|
|
14
|
+
}
|
|
15
|
+
exports.getCalculatedColumns = getCalculatedColumns;
|
|
16
|
+
//# sourceMappingURL=get-calculated-columns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-calculated-columns.js","sourceRoot":"","sources":["../../../../src/service/helpers/list-query-builder/get-calculated-columns.ts"],"names":[],"mappings":";;;AAEA,+EAAyG;AAMzG,SAAgB,oBAAoB,CAAC,MAAiB;IAClD,MAAM,iBAAiB,GAAiC,EAAE,CAAC;IAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,IAAI,SAAS,CAAC,cAAc,CAAC,4CAAqB,CAAC,EAAE;QACjD,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,4CAAqB,CAAC,EAAE;YACrD,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpC;KACJ;IACD,OAAO,iBAAiB,CAAC;AAC7B,CAAC;AATD,oDASC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnApplicationBootstrap } from '@nestjs/common';
|
|
2
|
+
import { ID, Type } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { FindConditions, FindOneOptions, SelectQueryBuilder } from 'typeorm';
|
|
4
|
+
import { RequestContext } from '../../../api/common/request-context';
|
|
5
|
+
import { ListQueryOptions } from '../../../common/types/common-types';
|
|
6
|
+
import { ConfigService } from '../../../config/config.service';
|
|
7
|
+
import { TransactionalConnection } from '../../../connection/transactional-connection';
|
|
8
|
+
import { VendureEntity } from '../../../entity/base/base.entity';
|
|
9
|
+
export declare type ExtendedListQueryOptions<T extends VendureEntity> = {
|
|
10
|
+
relations?: string[];
|
|
11
|
+
channelId?: ID;
|
|
12
|
+
where?: FindConditions<T>;
|
|
13
|
+
orderBy?: FindOneOptions<T>['order'];
|
|
14
|
+
ctx?: RequestContext;
|
|
15
|
+
customPropertyMap?: {
|
|
16
|
+
[name: string]: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare class ListQueryBuilder implements OnApplicationBootstrap {
|
|
20
|
+
private connection;
|
|
21
|
+
private configService;
|
|
22
|
+
constructor(connection: TransactionalConnection, configService: ConfigService);
|
|
23
|
+
onApplicationBootstrap(): any;
|
|
24
|
+
build<T extends VendureEntity>(entity: Type<T>, options?: ListQueryOptions<T>, extendedOptions?: ExtendedListQueryOptions<T>): SelectQueryBuilder<T>;
|
|
25
|
+
private parseTakeSkipParams;
|
|
26
|
+
private normalizeCustomPropertyMap;
|
|
27
|
+
private joinCalculatedColumnRelations;
|
|
28
|
+
private applyTranslationConditions;
|
|
29
|
+
private registerSQLiteRegexpFunction;
|
|
30
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ListQueryBuilder = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
15
|
+
const unique_1 = require("@vendure/common/lib/unique");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const FindOptionsUtils_1 = require("typeorm/find-options/FindOptionsUtils");
|
|
18
|
+
const errors_1 = require("../../../common/error/errors");
|
|
19
|
+
const config_service_1 = require("../../../config/config.service");
|
|
20
|
+
const vendure_logger_1 = require("../../../config/logger/vendure-logger");
|
|
21
|
+
const transactional_connection_1 = require("../../../connection/transactional-connection");
|
|
22
|
+
const connection_utils_1 = require("./connection-utils");
|
|
23
|
+
const get_calculated_columns_1 = require("./get-calculated-columns");
|
|
24
|
+
const parse_channel_param_1 = require("./parse-channel-param");
|
|
25
|
+
const parse_filter_params_1 = require("./parse-filter-params");
|
|
26
|
+
const parse_sort_params_1 = require("./parse-sort-params");
|
|
27
|
+
let ListQueryBuilder = class ListQueryBuilder {
|
|
28
|
+
constructor(connection, configService) {
|
|
29
|
+
this.connection = connection;
|
|
30
|
+
this.configService = configService;
|
|
31
|
+
}
|
|
32
|
+
onApplicationBootstrap() {
|
|
33
|
+
this.registerSQLiteRegexpFunction();
|
|
34
|
+
}
|
|
35
|
+
build(entity, options = {}, extendedOptions = {}) {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
const apiType = (_b = (_a = extendedOptions.ctx) === null || _a === void 0 ? void 0 : _a.apiType) !== null && _b !== void 0 ? _b : 'shop';
|
|
38
|
+
const rawConnection = this.connection.rawConnection;
|
|
39
|
+
const { take, skip } = this.parseTakeSkipParams(apiType, options);
|
|
40
|
+
const repo = extendedOptions.ctx
|
|
41
|
+
? this.connection.getRepository(extendedOptions.ctx, entity)
|
|
42
|
+
: this.connection.getRepository(entity);
|
|
43
|
+
const qb = repo.createQueryBuilder(entity.name.toLowerCase());
|
|
44
|
+
FindOptionsUtils_1.FindOptionsUtils.applyFindManyOptionsOrConditionsToQueryBuilder(qb, {
|
|
45
|
+
relations: extendedOptions.relations,
|
|
46
|
+
take,
|
|
47
|
+
skip,
|
|
48
|
+
where: extendedOptions.where || {},
|
|
49
|
+
});
|
|
50
|
+
FindOptionsUtils_1.FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias.metadata);
|
|
51
|
+
this.applyTranslationConditions(qb, entity, extendedOptions.ctx);
|
|
52
|
+
this.joinCalculatedColumnRelations(qb, entity, options);
|
|
53
|
+
const { customPropertyMap } = extendedOptions;
|
|
54
|
+
if (customPropertyMap) {
|
|
55
|
+
this.normalizeCustomPropertyMap(customPropertyMap, qb);
|
|
56
|
+
}
|
|
57
|
+
const sort = parse_sort_params_1.parseSortParams(rawConnection, entity, Object.assign({}, options.sort, extendedOptions.orderBy), customPropertyMap);
|
|
58
|
+
const filter = parse_filter_params_1.parseFilterParams(rawConnection, entity, options.filter, customPropertyMap);
|
|
59
|
+
if (filter.length) {
|
|
60
|
+
const filterOperator = (_c = options.filterOperator) !== null && _c !== void 0 ? _c : generated_types_1.LogicalOperator.AND;
|
|
61
|
+
if (filterOperator === generated_types_1.LogicalOperator.AND) {
|
|
62
|
+
filter.forEach(({ clause, parameters }) => {
|
|
63
|
+
qb.andWhere(clause, parameters);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
qb.andWhere(new typeorm_1.Brackets(qb1 => {
|
|
68
|
+
filter.forEach(({ clause, parameters }) => {
|
|
69
|
+
qb1.orWhere(clause, parameters);
|
|
70
|
+
});
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (extendedOptions.channelId) {
|
|
75
|
+
const channelFilter = parse_channel_param_1.parseChannelParam(rawConnection, entity, extendedOptions.channelId);
|
|
76
|
+
if (channelFilter) {
|
|
77
|
+
qb.andWhere(channelFilter.clause, channelFilter.parameters);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
qb.orderBy(sort);
|
|
81
|
+
return qb;
|
|
82
|
+
}
|
|
83
|
+
parseTakeSkipParams(apiType, options) {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
const { shopListQueryLimit, adminListQueryLimit } = this.configService.apiOptions;
|
|
86
|
+
const takeLimit = apiType === 'admin' ? adminListQueryLimit : shopListQueryLimit;
|
|
87
|
+
if (options.take && options.take > takeLimit) {
|
|
88
|
+
throw new errors_1.UserInputError('error.list-query-limit-exceeded', { limit: takeLimit });
|
|
89
|
+
}
|
|
90
|
+
const rawConnection = this.connection.rawConnection;
|
|
91
|
+
const skip = Math.max((_a = options.skip) !== null && _a !== void 0 ? _a : 0, 0);
|
|
92
|
+
let take = Math.min(Math.max((_b = options.take) !== null && _b !== void 0 ? _b : 0, 0), takeLimit) || takeLimit;
|
|
93
|
+
if (options.skip !== undefined && options.take === undefined) {
|
|
94
|
+
take = takeLimit;
|
|
95
|
+
}
|
|
96
|
+
return { take, skip };
|
|
97
|
+
}
|
|
98
|
+
normalizeCustomPropertyMap(customPropertyMap, qb) {
|
|
99
|
+
for (const [key, value] of Object.entries(customPropertyMap)) {
|
|
100
|
+
const parts = customPropertyMap[key].split('.');
|
|
101
|
+
const entityPart = 2 <= parts.length ? parts[parts.length - 2] : qb.alias;
|
|
102
|
+
const columnPart = parts[parts.length - 1];
|
|
103
|
+
const relationAlias = qb.expressionMap.aliases.find(a => a.metadata.tableNameWithoutPrefix === entityPart);
|
|
104
|
+
if (relationAlias) {
|
|
105
|
+
customPropertyMap[key] = `${relationAlias.name}.${columnPart}`;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
vendure_logger_1.Logger.error(`The customPropertyMap entry "${key}:${value}" could not be resolved to a related table`);
|
|
109
|
+
delete customPropertyMap[key];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
joinCalculatedColumnRelations(qb, entity, options) {
|
|
114
|
+
const calculatedColumns = get_calculated_columns_1.getCalculatedColumns(entity);
|
|
115
|
+
const filterAndSortFields = unique_1.unique([
|
|
116
|
+
...Object.keys(options.filter || {}),
|
|
117
|
+
...Object.keys(options.sort || {}),
|
|
118
|
+
]);
|
|
119
|
+
const alias = connection_utils_1.getEntityAlias(this.connection.rawConnection, entity);
|
|
120
|
+
for (const field of filterAndSortFields) {
|
|
121
|
+
const calculatedColumnDef = calculatedColumns.find(c => c.name === field);
|
|
122
|
+
const instruction = calculatedColumnDef === null || calculatedColumnDef === void 0 ? void 0 : calculatedColumnDef.listQuery;
|
|
123
|
+
if (instruction) {
|
|
124
|
+
const relations = instruction.relations || [];
|
|
125
|
+
for (const relation of relations) {
|
|
126
|
+
const relationIsAlreadyJoined = qb.expressionMap.joinAttributes.find(ja => ja.entityOrProperty === `${alias}.${relation}`);
|
|
127
|
+
if (!relationIsAlreadyJoined) {
|
|
128
|
+
const propertyPath = relation.includes('.') ? relation : `${alias}.${relation}`;
|
|
129
|
+
const relationAlias = relation.includes('.')
|
|
130
|
+
? relation.split('.').reverse()[0]
|
|
131
|
+
: relation;
|
|
132
|
+
qb.innerJoinAndSelect(propertyPath, relationAlias);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (typeof instruction.query === 'function') {
|
|
136
|
+
instruction.query(qb);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
applyTranslationConditions(qb, entity, ctx) {
|
|
142
|
+
const languageCode = (ctx === null || ctx === void 0 ? void 0 : ctx.languageCode) || this.configService.defaultLanguageCode;
|
|
143
|
+
const { columns, translationColumns, alias } = connection_utils_1.getColumnMetadata(this.connection.rawConnection, entity);
|
|
144
|
+
if (translationColumns.length) {
|
|
145
|
+
const translationsAlias = qb.connection.namingStrategy.eagerJoinRelationAlias(alias, 'translations');
|
|
146
|
+
qb.andWhere(new typeorm_1.Brackets(qb1 => {
|
|
147
|
+
qb1.where(`${translationsAlias}.languageCode = :languageCode`, { languageCode });
|
|
148
|
+
if (languageCode !== this.configService.defaultLanguageCode) {
|
|
149
|
+
qb1.orWhere(new typeorm_1.Brackets(qb2 => {
|
|
150
|
+
const translationEntity = translationColumns[0].entityMetadata.target;
|
|
151
|
+
const subQb1 = this.connection.rawConnection
|
|
152
|
+
.createQueryBuilder(translationEntity, 'translation')
|
|
153
|
+
.where(`translation.base = ${alias}.id`)
|
|
154
|
+
.andWhere('translation.languageCode = :defaultLanguageCode');
|
|
155
|
+
const subQb2 = this.connection.rawConnection
|
|
156
|
+
.createQueryBuilder(translationEntity, 'translation')
|
|
157
|
+
.where(`translation.base = ${alias}.id`)
|
|
158
|
+
.andWhere('translation.languageCode = :nonDefaultLanguageCode');
|
|
159
|
+
qb2.where(`EXISTS (${subQb1.getQuery()})`).andWhere(`NOT EXISTS (${subQb2.getQuery()})`);
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
qb1.orWhere(new typeorm_1.Brackets(qb2 => {
|
|
164
|
+
const translationEntity = translationColumns[0].entityMetadata.target;
|
|
165
|
+
const subQb1 = this.connection.rawConnection
|
|
166
|
+
.createQueryBuilder(translationEntity, 'translation')
|
|
167
|
+
.where(`translation.base = ${alias}.id`)
|
|
168
|
+
.andWhere('translation.languageCode = :defaultLanguageCode');
|
|
169
|
+
const subQb2 = this.connection.rawConnection
|
|
170
|
+
.createQueryBuilder(translationEntity, 'translation')
|
|
171
|
+
.where(`translation.base = ${alias}.id`)
|
|
172
|
+
.andWhere('translation.languageCode != :defaultLanguageCode');
|
|
173
|
+
qb2.where(`NOT EXISTS (${subQb1.getQuery()})`).andWhere(`EXISTS (${subQb2.getQuery()})`);
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
qb.setParameters({
|
|
177
|
+
nonDefaultLanguageCode: languageCode,
|
|
178
|
+
defaultLanguageCode: this.configService.defaultLanguageCode,
|
|
179
|
+
});
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
registerSQLiteRegexpFunction() {
|
|
184
|
+
const regexpFn = (pattern, value) => {
|
|
185
|
+
const result = new RegExp(`${pattern}`, 'i').test(value);
|
|
186
|
+
return result ? 1 : 0;
|
|
187
|
+
};
|
|
188
|
+
const dbType = this.connection.rawConnection.options.type;
|
|
189
|
+
if (dbType === 'better-sqlite3') {
|
|
190
|
+
const driver = this.connection.rawConnection.driver;
|
|
191
|
+
driver.databaseConnection.function('regexp', regexpFn);
|
|
192
|
+
}
|
|
193
|
+
if (dbType === 'sqljs') {
|
|
194
|
+
const driver = this.connection.rawConnection.driver;
|
|
195
|
+
driver.databaseConnection.create_function('regexp', regexpFn);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
ListQueryBuilder = __decorate([
|
|
200
|
+
common_1.Injectable(),
|
|
201
|
+
__metadata("design:paramtypes", [transactional_connection_1.TransactionalConnection, config_service_1.ConfigService])
|
|
202
|
+
], ListQueryBuilder);
|
|
203
|
+
exports.ListQueryBuilder = ListQueryBuilder;
|
|
204
|
+
//# sourceMappingURL=list-query-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-query-builder.js","sourceRoot":"","sources":["../../../../src/service/helpers/list-query-builder/list-query-builder.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAoE;AACpE,yEAAsE;AAEtE,uDAAoD;AACpD,qCAAwG;AAGxG,4EAAyE;AAIzE,yDAA8D;AAE9D,mEAA+D;AAC/D,0EAA+D;AAC/D,2FAAuF;AAGvF,yDAAuE;AACvE,qEAAgE;AAChE,+DAA0D;AAC1D,+DAA0D;AAC1D,2DAAsD;AAsItD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IACzB,YAAoB,UAAmC,EAAU,aAA4B;QAAzE,eAAU,GAAV,UAAU,CAAyB;QAAU,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAGjG,sBAAsB;QAClB,IAAI,CAAC,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAMD,KAAK,CACD,MAAe,EACf,UAA+B,EAAE,EACjC,kBAA+C,EAAE;;QAEjD,MAAM,OAAO,GAAG,MAAA,MAAA,eAAe,CAAC,GAAG,0CAAE,OAAO,mCAAI,MAAM,CAAC;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACpD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO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8BAAa;GADpF,gBAAgB,CAoQ5B;AApQY,4CAAgB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ID, Type } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { Connection } from 'typeorm';
|
|
3
|
+
import { VendureEntity } from '../../../entity/base/base.entity';
|
|
4
|
+
import { WhereCondition } from './parse-filter-params';
|
|
5
|
+
export declare function parseChannelParam<T extends VendureEntity>(connection: Connection, entity: Type<T>, channelId: ID): WhereCondition | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseChannelParam = void 0;
|
|
4
|
+
function parseChannelParam(connection, entity, channelId) {
|
|
5
|
+
const metadata = connection.getMetadata(entity);
|
|
6
|
+
const alias = metadata.name.toLowerCase();
|
|
7
|
+
const relations = metadata.relations;
|
|
8
|
+
const channelRelation = relations.find(r => r.propertyName === 'channels');
|
|
9
|
+
if (!channelRelation) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
clause: `${alias}__channels.id = :channelId`,
|
|
14
|
+
parameters: { channelId },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.parseChannelParam = parseChannelParam;
|
|
18
|
+
//# sourceMappingURL=parse-channel-param.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-channel-param.js","sourceRoot":"","sources":["../../../../src/service/helpers/list-query-builder/parse-channel-param.ts"],"names":[],"mappings":";;;AAWA,SAAgB,iBAAiB,CAC7B,UAAsB,EACtB,MAAe,EACf,SAAa;IAEb,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;IACrC,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC;IAC3E,IAAI,CAAC,eAAe,EAAE;QAClB,OAAO;KACV;IACD,OAAO;QACH,MAAM,EAAE,GAAG,KAAK,4BAA4B;QAC5C,UAAU,EAAE,EAAE,SAAS,EAAE;KAC5B,CAAC;AACN,CAAC;AAhBD,8CAgBC"}
|