@vendure/core 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/common/validate-custom-field-value.d.ts +1 -1
- package/dist/api/common/validate-custom-field-value.js +12 -2
- package/dist/api/common/validate-custom-field-value.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-list-options.js +7 -2
- package/dist/api/config/generate-list-options.js.map +1 -1
- package/dist/api/config/graphql-custom-fields.d.ts +2 -0
- package/dist/api/config/graphql-custom-fields.js +43 -1
- package/dist/api/config/graphql-custom-fields.js.map +1 -1
- package/dist/api/resolvers/admin/search.resolver.js +1 -1
- package/dist/api/resolvers/admin/search.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/tax-category.resolver.js +2 -2
- package/dist/api/resolvers/admin/tax-category.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/tax-rate.resolver.js +2 -2
- package/dist/api/resolvers/admin/tax-rate.resolver.js.map +1 -1
- package/dist/api/resolvers/shop/shop-order.resolver.js +1 -1
- package/dist/api/resolvers/shop/shop-order.resolver.js.map +1 -1
- package/dist/api/schema/admin-api/order.api.graphql +4 -1
- package/dist/api/schema/common/common-types.graphql +12 -0
- package/dist/api/schema/common/custom-field-types.graphql +9 -0
- package/dist/api/schema/shop-api/shop.api.graphql +1 -1
- package/dist/common/configurable-operation.d.ts +2 -24
- package/dist/common/configurable-operation.js +1 -1
- package/dist/common/configurable-operation.js.map +1 -1
- package/dist/common/self-refreshing-cache.d.ts +9 -4
- package/dist/common/self-refreshing-cache.js +26 -20
- package/dist/common/self-refreshing-cache.js.map +1 -1
- package/dist/common/types/entity-relation-paths.d.ts +1 -1
- package/dist/config/auth/bcrypt-password-hashing-strategy.d.ts +1 -1
- package/dist/config/auth/bcrypt-password-hashing-strategy.js +11 -7
- package/dist/config/auth/bcrypt-password-hashing-strategy.js.map +1 -1
- package/dist/config/catalog/collection-filter.d.ts +1 -1
- package/dist/config/catalog/collection-filter.js +1 -1
- package/dist/config/catalog/default-collection-filters.d.ts +4 -4
- package/dist/config/catalog/default-collection-filters.js +4 -2
- package/dist/config/catalog/default-collection-filters.js.map +1 -1
- package/dist/config/custom-field/custom-field-types.d.ts +16 -8
- package/dist/config/default-config.js +8 -1
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/index.d.ts +9 -5
- package/dist/config/index.js +9 -5
- package/dist/config/index.js.map +1 -1
- package/dist/config/merge-config.d.ts +7 -0
- package/dist/config/merge-config.js +7 -0
- package/dist/config/merge-config.js.map +1 -1
- package/dist/config/payment/payment-method-handler.d.ts +2 -2
- package/dist/config/promotion/actions/buy-x-get-y-free-action.d.ts +2 -2
- package/dist/config/promotion/actions/facet-values-percentage-discount-action.d.ts +2 -2
- package/dist/config/promotion/actions/order-fixed-discount-action.d.ts +1 -1
- package/dist/config/promotion/actions/order-percentage-discount-action.d.ts +1 -1
- package/dist/config/promotion/actions/product-percentage-discount-action.d.ts +2 -2
- package/dist/config/promotion/conditions/buy-x-get-y-free-condition.d.ts +2 -2
- package/dist/config/promotion/conditions/contains-products-condition.d.ts +1 -1
- package/dist/config/promotion/conditions/customer-group-condition.d.ts +1 -1
- package/dist/config/promotion/conditions/has-facet-values-condition.d.ts +1 -1
- package/dist/config/promotion/conditions/min-order-amount-condition.d.ts +1 -1
- package/dist/config/promotion/index.d.ts +13 -21
- package/dist/config/shipping-method/default-shipping-calculator.d.ts +4 -4
- package/dist/config/shipping-method/default-shipping-eligibility-checker.d.ts +1 -1
- package/dist/connection/connection.module.d.ts +1 -1
- package/dist/connection/transaction-subscriber.js +8 -1
- package/dist/connection/transaction-subscriber.js.map +1 -1
- package/dist/data-import/providers/import-parser/import-parser.d.ts +40 -40
- package/dist/data-import/providers/import-parser/import-parser.js +343 -56
- package/dist/data-import/providers/import-parser/import-parser.js.map +1 -1
- package/dist/data-import/providers/importer/importer.d.ts +1 -0
- package/dist/data-import/providers/importer/importer.js +69 -41
- package/dist/data-import/providers/importer/importer.js.map +1 -1
- package/dist/data-import/providers/populator/populator.js +9 -1
- package/dist/data-import/providers/populator/populator.js.map +1 -1
- package/dist/entity/country/country-translation.entity.d.ts +4 -1
- package/dist/entity/country/country-translation.entity.js +5 -0
- package/dist/entity/country/country-translation.entity.js.map +1 -1
- package/dist/entity/country/country.entity.d.ts +4 -1
- package/dist/entity/country/country.entity.js +5 -0
- package/dist/entity/country/country.entity.js.map +1 -1
- package/dist/entity/custom-entity-fields.d.ts +28 -12
- package/dist/entity/custom-entity-fields.js +44 -20
- package/dist/entity/custom-entity-fields.js.map +1 -1
- package/dist/entity/customer-group/customer-group.entity.d.ts +4 -1
- package/dist/entity/customer-group/customer-group.entity.js +6 -1
- package/dist/entity/customer-group/customer-group.entity.js.map +1 -1
- package/dist/entity/payment-method/payment-method.entity.d.ts +4 -1
- package/dist/entity/payment-method/payment-method.entity.js +5 -0
- package/dist/entity/payment-method/payment-method.entity.js.map +1 -1
- package/dist/entity/promotion/promotion.entity.d.ts +4 -1
- package/dist/entity/promotion/promotion.entity.js +5 -0
- package/dist/entity/promotion/promotion.entity.js.map +1 -1
- package/dist/entity/register-custom-entity-fields.js +9 -1
- package/dist/entity/register-custom-entity-fields.js.map +1 -1
- package/dist/entity/tax-category/tax-category.entity.d.ts +4 -1
- package/dist/entity/tax-category/tax-category.entity.js +5 -0
- package/dist/entity/tax-category/tax-category.entity.js.map +1 -1
- package/dist/entity/tax-rate/tax-rate.entity.d.ts +4 -1
- package/dist/entity/tax-rate/tax-rate.entity.js +5 -0
- package/dist/entity/tax-rate/tax-rate.entity.js.map +1 -1
- package/dist/entity/zone/zone.entity.d.ts +4 -1
- package/dist/entity/zone/zone.entity.js +5 -0
- package/dist/entity/zone/zone.entity.js.map +1 -1
- package/dist/event-bus/events/account-verified-event.d.ts +16 -0
- package/dist/event-bus/events/account-verified-event.js +21 -0
- package/dist/event-bus/events/account-verified-event.js.map +1 -0
- package/dist/event-bus/events/administrator-event.d.ts +18 -0
- package/dist/event-bus/events/administrator-event.js +19 -0
- package/dist/event-bus/events/administrator-event.js.map +1 -0
- package/dist/event-bus/events/asset-event.d.ts +17 -9
- package/dist/event-bus/events/asset-event.js +15 -9
- package/dist/event-bus/events/asset-event.js.map +1 -1
- package/dist/event-bus/events/change-channel-event.d.ts +22 -0
- package/dist/event-bus/events/change-channel-event.js +25 -0
- package/dist/event-bus/events/change-channel-event.js.map +1 -0
- package/dist/event-bus/events/channel-event.d.ts +18 -0
- package/dist/event-bus/events/channel-event.js +19 -0
- package/dist/event-bus/events/channel-event.js.map +1 -0
- package/dist/event-bus/events/collection-event.d.ts +18 -0
- package/dist/event-bus/events/collection-event.js +19 -0
- package/dist/event-bus/events/collection-event.js.map +1 -0
- package/dist/event-bus/events/country-event.d.ts +18 -0
- package/dist/event-bus/events/country-event.js +19 -0
- package/dist/event-bus/events/country-event.js.map +1 -0
- package/dist/event-bus/events/coupon-code-event.d.ts +19 -0
- package/dist/event-bus/events/coupon-code-event.js +24 -0
- package/dist/event-bus/events/coupon-code-event.js.map +1 -0
- package/dist/event-bus/events/customer-address-event.d.ts +21 -6
- package/dist/event-bus/events/customer-address-event.js +16 -6
- package/dist/event-bus/events/customer-address-event.js.map +1 -1
- package/dist/event-bus/events/customer-event.d.ts +16 -6
- package/dist/event-bus/events/customer-event.js +13 -7
- package/dist/event-bus/events/customer-event.js.map +1 -1
- package/dist/event-bus/events/customer-group-entity-event.d.ts +19 -0
- package/dist/event-bus/events/customer-group-entity-event.js +21 -0
- package/dist/event-bus/events/customer-group-entity-event.js.map +1 -0
- package/dist/event-bus/events/customer-group-event.d.ts +17 -0
- package/dist/event-bus/events/customer-group-event.js +21 -1
- package/dist/event-bus/events/customer-group-event.js.map +1 -1
- package/dist/event-bus/events/facet-event.d.ts +18 -0
- package/dist/event-bus/events/facet-event.js +19 -0
- package/dist/event-bus/events/facet-event.js.map +1 -0
- package/dist/event-bus/events/facet-value-event.d.ts +18 -0
- package/dist/event-bus/events/facet-value-event.js +19 -0
- package/dist/event-bus/events/facet-value-event.js.map +1 -0
- package/dist/event-bus/events/fulfillment-event.d.ts +27 -0
- package/dist/event-bus/events/fulfillment-event.js +19 -0
- package/dist/event-bus/events/fulfillment-event.js.map +1 -0
- package/dist/event-bus/events/global-settings-event.d.ts +16 -0
- package/dist/event-bus/events/global-settings-event.js +20 -0
- package/dist/event-bus/events/global-settings-event.js.map +1 -0
- package/dist/event-bus/events/history-entry-event.d.ts +22 -0
- package/dist/event-bus/events/history-entry-event.js +20 -0
- package/dist/event-bus/events/history-entry-event.js.map +1 -0
- package/dist/event-bus/events/order-placed-event.d.ts +22 -0
- package/dist/event-bus/events/order-placed-event.js +26 -0
- package/dist/event-bus/events/order-placed-event.js.map +1 -0
- package/dist/event-bus/events/order-state-transition-event.js.map +1 -1
- package/dist/event-bus/events/password-reset-verified-event.d.ts +16 -0
- package/dist/event-bus/events/password-reset-verified-event.js +21 -0
- package/dist/event-bus/events/password-reset-verified-event.js.map +1 -0
- package/dist/event-bus/events/payment-method-event.d.ts +18 -0
- package/dist/event-bus/events/payment-method-event.js +19 -0
- package/dist/event-bus/events/payment-method-event.js.map +1 -0
- package/dist/event-bus/events/product-event.d.ts +14 -6
- package/dist/event-bus/events/product-event.js +13 -7
- package/dist/event-bus/events/product-event.js.map +1 -1
- package/dist/event-bus/events/product-option-event.d.ts +18 -0
- package/dist/event-bus/events/product-option-event.js +19 -0
- package/dist/event-bus/events/product-option-event.js.map +1 -0
- package/dist/event-bus/events/product-option-group-change-event.d.ts +19 -0
- package/dist/event-bus/events/product-option-group-change-event.js +23 -0
- package/dist/event-bus/events/product-option-group-change-event.js.map +1 -0
- package/dist/event-bus/events/product-option-group-event.d.ts +18 -0
- package/dist/event-bus/events/product-option-group-event.js +19 -0
- package/dist/event-bus/events/product-option-group-event.js.map +1 -0
- package/dist/event-bus/events/product-variant-event.d.ts +14 -6
- package/dist/event-bus/events/product-variant-event.js +13 -7
- package/dist/event-bus/events/product-variant-event.js.map +1 -1
- package/dist/event-bus/events/promotion-event.d.ts +18 -0
- package/dist/event-bus/events/promotion-event.js +19 -0
- package/dist/event-bus/events/promotion-event.js.map +1 -0
- package/dist/event-bus/events/role-change-event.d.ts +20 -0
- package/dist/event-bus/events/role-change-event.js +24 -0
- package/dist/event-bus/events/role-change-event.js.map +1 -0
- package/dist/event-bus/events/role-event.d.ts +18 -0
- package/dist/event-bus/events/role-event.js +19 -0
- package/dist/event-bus/events/role-event.js.map +1 -0
- package/dist/event-bus/events/shipping-method-event.d.ts +18 -0
- package/dist/event-bus/events/shipping-method-event.js +19 -0
- package/dist/event-bus/events/shipping-method-event.js.map +1 -0
- package/dist/event-bus/events/tax-category-event.d.ts +18 -0
- package/dist/event-bus/events/tax-category-event.js +19 -0
- package/dist/event-bus/events/tax-category-event.js.map +1 -0
- package/dist/event-bus/events/tax-rate-event.d.ts +18 -0
- package/dist/event-bus/events/tax-rate-event.js +19 -0
- package/dist/event-bus/events/tax-rate-event.js.map +1 -0
- package/dist/event-bus/events/tax-rate-modification-event.d.ts +1 -0
- package/dist/event-bus/events/tax-rate-modification-event.js +1 -0
- package/dist/event-bus/events/tax-rate-modification-event.js.map +1 -1
- package/dist/event-bus/events/zone-event.d.ts +18 -0
- package/dist/event-bus/events/zone-event.js +19 -0
- package/dist/event-bus/events/zone-event.js.map +1 -0
- package/dist/event-bus/events/zone-members-event.d.ts +19 -0
- package/dist/event-bus/events/zone-members-event.js +23 -0
- package/dist/event-bus/events/zone-members-event.js.map +1 -0
- package/dist/event-bus/index.d.ts +32 -4
- package/dist/event-bus/index.js +32 -4
- package/dist/event-bus/index.js.map +1 -1
- package/dist/event-bus/vendure-entity-event.d.ts +17 -0
- package/dist/event-bus/vendure-entity-event.js +23 -0
- package/dist/event-bus/vendure-entity-event.js.map +1 -0
- package/dist/i18n/messages/en.json +2 -1
- package/dist/plugin/default-search-plugin/api/fulltext-search.resolver.js +1 -1
- package/dist/plugin/default-search-plugin/api/fulltext-search.resolver.js.map +1 -1
- package/dist/plugin/default-search-plugin/indexer/indexer.controller.js +1 -1
- package/dist/plugin/default-search-plugin/indexer/indexer.controller.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js.map +1 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.d.ts +7 -0
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js +28 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js.map +1 -1
- package/dist/service/helpers/order-calculator/order-calculator.js +3 -0
- package/dist/service/helpers/order-calculator/order-calculator.js.map +1 -1
- package/dist/service/helpers/order-state-machine/order-state-machine.d.ts +3 -1
- package/dist/service/helpers/order-state-machine/order-state-machine.js +10 -2
- package/dist/service/helpers/order-state-machine/order-state-machine.js.map +1 -1
- package/dist/service/helpers/product-price-applicator/product-price-applicator.js +1 -1
- package/dist/service/services/administrator.service.d.ts +3 -1
- package/dist/service/services/administrator.service.js +16 -2
- package/dist/service/services/administrator.service.js.map +1 -1
- package/dist/service/services/asset.service.js +14 -6
- package/dist/service/services/asset.service.js.map +1 -1
- package/dist/service/services/channel.service.d.ts +4 -2
- package/dist/service/services/channel.service.js +14 -3
- package/dist/service/services/channel.service.js.map +1 -1
- package/dist/service/services/collection.service.js +11 -4
- package/dist/service/services/collection.service.js.map +1 -1
- package/dist/service/services/country.service.d.ts +3 -3
- package/dist/service/services/country.service.js +8 -4
- package/dist/service/services/country.service.js.map +1 -1
- package/dist/service/services/customer-group.service.js +8 -1
- package/dist/service/services/customer-group.service.js.map +1 -1
- package/dist/service/services/customer.service.js +13 -8
- package/dist/service/services/customer.service.js.map +1 -1
- package/dist/service/services/facet-value.service.d.ts +3 -1
- package/dist/service/services/facet-value.service.js +10 -3
- package/dist/service/services/facet-value.service.js.map +1 -1
- package/dist/service/services/facet.service.d.ts +3 -1
- package/dist/service/services/facet.service.js +10 -3
- package/dist/service/services/facet.service.js.map +1 -1
- package/dist/service/services/fulfillment.service.js +7 -1
- package/dist/service/services/fulfillment.service.js.map +1 -1
- package/dist/service/services/global-settings.service.d.ts +3 -1
- package/dist/service/services/global-settings.service.js +7 -2
- package/dist/service/services/global-settings.service.js.map +1 -1
- package/dist/service/services/history.service.d.ts +3 -1
- package/dist/service/services/history.service.js +20 -6
- package/dist/service/services/history.service.js.map +1 -1
- package/dist/service/services/order.service.d.ts +4 -1
- package/dist/service/services/order.service.js +67 -20
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/payment-method.service.js +10 -1
- package/dist/service/services/payment-method.service.js.map +1 -1
- package/dist/service/services/product-option-group.service.d.ts +3 -1
- package/dist/service/services/product-option-group.service.js +9 -3
- package/dist/service/services/product-option-group.service.js.map +1 -1
- package/dist/service/services/product-option.service.d.ts +3 -1
- package/dist/service/services/product-option.service.js +9 -3
- package/dist/service/services/product-option.service.js.map +1 -1
- package/dist/service/services/product-variant.service.js +5 -4
- package/dist/service/services/product-variant.service.js.map +1 -1
- package/dist/service/services/product.service.d.ts +1 -1
- package/dist/service/services/product.service.js +8 -5
- package/dist/service/services/product.service.js.map +1 -1
- package/dist/service/services/promotion.service.d.ts +3 -1
- package/dist/service/services/promotion.service.js +10 -3
- package/dist/service/services/promotion.service.js.map +1 -1
- package/dist/service/services/role.service.d.ts +3 -1
- package/dist/service/services/role.service.js +12 -4
- package/dist/service/services/role.service.js.map +1 -1
- package/dist/service/services/shipping-method.service.d.ts +3 -1
- package/dist/service/services/shipping-method.service.js +10 -3
- package/dist/service/services/shipping-method.service.js.map +1 -1
- package/dist/service/services/stock-movement.service.d.ts +11 -0
- package/dist/service/services/stock-movement.service.js +15 -5
- package/dist/service/services/stock-movement.service.js.map +1 -1
- package/dist/service/services/tax-category.service.d.ts +3 -1
- package/dist/service/services/tax-category.service.js +8 -2
- package/dist/service/services/tax-category.service.js.map +1 -1
- package/dist/service/services/tax-rate.service.js +4 -0
- package/dist/service/services/tax-rate.service.js.map +1 -1
- package/dist/service/services/zone.service.d.ts +5 -3
- package/dist/service/services/zone.service.js +24 -12
- package/dist/service/services/zone.service.js.map +1 -1
- package/package.json +5 -5
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CustomerGroup = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base/base.entity");
|
|
15
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
15
16
|
const customer_entity_1 = require("../customer/customer.entity");
|
|
16
17
|
/**
|
|
17
18
|
* @description
|
|
@@ -30,9 +31,13 @@ __decorate([
|
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], CustomerGroup.prototype, "name", void 0);
|
|
32
33
|
__decorate([
|
|
33
|
-
typeorm_1.ManyToMany(
|
|
34
|
+
typeorm_1.ManyToMany(type => customer_entity_1.Customer, customer => customer.groups),
|
|
34
35
|
__metadata("design:type", Array)
|
|
35
36
|
], CustomerGroup.prototype, "customers", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomCustomerGroupFields),
|
|
39
|
+
__metadata("design:type", custom_entity_fields_1.CustomCustomerGroupFields)
|
|
40
|
+
], CustomerGroup.prototype, "customFields", void 0);
|
|
36
41
|
CustomerGroup = __decorate([
|
|
37
42
|
typeorm_1.Entity(),
|
|
38
43
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-group.entity.js","sourceRoot":"","sources":["../../../src/entity/customer-group/customer-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAqD;
|
|
1
|
+
{"version":3,"file":"customer-group.entity.js","sourceRoot":"","sources":["../../../src/entity/customer-group/customer-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAqD;AAGrD,qDAAoD;AACpD,kEAAoE;AACpE,iEAAuD;AAEvD;;;;;;GAMG;AAEH,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,2BAAa;IAC5C,YAAY,KAAkC;QAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CASJ,CAAA;AAPa;IAAT,gBAAM,EAAE;;2CAAc;AAGvB;IADC,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,0BAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;;gDACpC;AAGtB;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,gDAAyB,CAAC;8BAC5B,gDAAyB;mDAAC;AAX/B,aAAa;IADzB,gBAAM,EAAE;;GACI,aAAa,CAYzB;AAZY,sCAAa"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ConfigurableOperation } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { ChannelAware } from '../../common/types/common-types';
|
|
4
|
+
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
4
5
|
import { VendureEntity } from '../base/base.entity';
|
|
5
6
|
import { Channel } from '../channel/channel.entity';
|
|
7
|
+
import { CustomPaymentMethodFields } from '../custom-entity-fields';
|
|
6
8
|
/**
|
|
7
9
|
* @description
|
|
8
10
|
* A PaymentMethod is created automatically according to the configured {@link PaymentMethodHandler}s defined
|
|
@@ -10,7 +12,7 @@ import { Channel } from '../channel/channel.entity';
|
|
|
10
12
|
*
|
|
11
13
|
* @docsCategory entities
|
|
12
14
|
*/
|
|
13
|
-
export declare class PaymentMethod extends VendureEntity implements ChannelAware {
|
|
15
|
+
export declare class PaymentMethod extends VendureEntity implements ChannelAware, HasCustomFields {
|
|
14
16
|
constructor(input?: DeepPartial<PaymentMethod>);
|
|
15
17
|
name: string;
|
|
16
18
|
code: string;
|
|
@@ -19,4 +21,5 @@ export declare class PaymentMethod extends VendureEntity implements ChannelAware
|
|
|
19
21
|
checker: ConfigurableOperation | null;
|
|
20
22
|
handler: ConfigurableOperation;
|
|
21
23
|
channels: Channel[];
|
|
24
|
+
customFields: CustomPaymentMethodFields;
|
|
22
25
|
}
|
|
@@ -13,6 +13,7 @@ exports.PaymentMethod = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base/base.entity");
|
|
15
15
|
const channel_entity_1 = require("../channel/channel.entity");
|
|
16
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
16
17
|
/**
|
|
17
18
|
* @description
|
|
18
19
|
* A PaymentMethod is created automatically according to the configured {@link PaymentMethodHandler}s defined
|
|
@@ -54,6 +55,10 @@ __decorate([
|
|
|
54
55
|
typeorm_1.JoinTable(),
|
|
55
56
|
__metadata("design:type", Array)
|
|
56
57
|
], PaymentMethod.prototype, "channels", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomPaymentMethodFields),
|
|
60
|
+
__metadata("design:type", custom_entity_fields_1.CustomPaymentMethodFields)
|
|
61
|
+
], PaymentMethod.prototype, "customFields", void 0);
|
|
57
62
|
PaymentMethod = __decorate([
|
|
58
63
|
typeorm_1.Entity(),
|
|
59
64
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-method.entity.js","sourceRoot":"","sources":["../../../src/entity/payment-method/payment-method.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,qCAAgE;
|
|
1
|
+
{"version":3,"file":"payment-method.entity.js","sourceRoot":"","sources":["../../../src/entity/payment-method/payment-method.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,qCAAgE;AAIhE,qDAAoD;AACpD,8DAAoD;AACpD,kEAAoE;AAEpE;;;;;;GAMG;AAEH,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,2BAAa;IAC5C,YAAY,KAAkC;QAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAoBJ,CAAA;AAlB4B;IAAxB,gBAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAAc;AAEb;IAAxB,gBAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAAc;AAEb;IAAxB,gBAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;kDAAqB;AAEnC;IAAT,gBAAM,EAAE;;8CAAkB;AAEgB;IAA1C,gBAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAAuC;AAE1D;IAAtB,gBAAM,CAAC,aAAa,CAAC;;8CAAgC;AAItD;IAFC,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAO,CAAC;IAC3B,mBAAS,EAAE;;+CACQ;AAGpB;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,gDAAyB,CAAC;8BAC5B,gDAAyB;mDAAC;AAtB/B,aAAa;IADzB,gBAAM,EAAE;;GACI,aAAa,CAuBzB;AAvBY,sCAAa"}
|
|
@@ -3,9 +3,11 @@ import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
|
3
3
|
import { RequestContext } from '../../api/common/request-context';
|
|
4
4
|
import { AdjustmentSource } from '../../common/types/adjustment-source';
|
|
5
5
|
import { ChannelAware, SoftDeletable } from '../../common/types/common-types';
|
|
6
|
+
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
6
7
|
import { PromotionAction } from '../../config/promotion/promotion-action';
|
|
7
8
|
import { PromotionCondition, PromotionConditionState } from '../../config/promotion/promotion-condition';
|
|
8
9
|
import { Channel } from '../channel/channel.entity';
|
|
10
|
+
import { CustomPromotionFields } from '../custom-entity-fields';
|
|
9
11
|
import { OrderItem } from '../order-item/order-item.entity';
|
|
10
12
|
import { OrderLine } from '../order-line/order-line.entity';
|
|
11
13
|
import { Order } from '../order/order.entity';
|
|
@@ -35,7 +37,7 @@ export declare type PromotionTestResult = boolean | PromotionState;
|
|
|
35
37
|
*
|
|
36
38
|
* @docsCategory entities
|
|
37
39
|
*/
|
|
38
|
-
export declare class Promotion extends AdjustmentSource implements ChannelAware, SoftDeletable {
|
|
40
|
+
export declare class Promotion extends AdjustmentSource implements ChannelAware, SoftDeletable, HasCustomFields {
|
|
39
41
|
type: AdjustmentType;
|
|
40
42
|
private readonly allConditions;
|
|
41
43
|
private readonly allActions;
|
|
@@ -51,6 +53,7 @@ export declare class Promotion extends AdjustmentSource implements ChannelAware,
|
|
|
51
53
|
name: string;
|
|
52
54
|
enabled: boolean;
|
|
53
55
|
channels: Channel[];
|
|
56
|
+
customFields: CustomPromotionFields;
|
|
54
57
|
conditions: ConfigurableOperation[];
|
|
55
58
|
actions: ConfigurableOperation[];
|
|
56
59
|
/**
|
|
@@ -16,6 +16,7 @@ const adjustment_source_1 = require("../../common/types/adjustment-source");
|
|
|
16
16
|
const config_helpers_1 = require("../../config/config-helpers");
|
|
17
17
|
const promotion_action_1 = require("../../config/promotion/promotion-action");
|
|
18
18
|
const channel_entity_1 = require("../channel/channel.entity");
|
|
19
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
19
20
|
/**
|
|
20
21
|
* @description
|
|
21
22
|
* A Promotion is used to define a set of conditions under which promotions actions (typically discounts)
|
|
@@ -142,6 +143,10 @@ __decorate([
|
|
|
142
143
|
typeorm_1.JoinTable(),
|
|
143
144
|
__metadata("design:type", Array)
|
|
144
145
|
], Promotion.prototype, "channels", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomPromotionFields),
|
|
148
|
+
__metadata("design:type", custom_entity_fields_1.CustomPromotionFields)
|
|
149
|
+
], Promotion.prototype, "customFields", void 0);
|
|
145
150
|
__decorate([
|
|
146
151
|
typeorm_1.Column('simple-json'),
|
|
147
152
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/entity/promotion/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAwG;AAExG,qCAAgE;AAGhE,4EAAwE;AAExE,gEAAwD;
|
|
1
|
+
{"version":3,"file":"promotion.entity.js","sourceRoot":"","sources":["../../../src/entity/promotion/promotion.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAwG;AAExG,qCAAgE;AAGhE,4EAAwE;AAExE,gEAAwD;AAExD,8EAKiD;AAEjD,8DAAoD;AACpD,kEAAgE;AA0BhE;;;;;;;;;GASG;AAEH,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,oCAAgB;IAO3C,YACI,KAGC;QAED,KAAK,CAAC,KAAK,CAAC,CAAC;QAZjB,SAAI,GAAG,gCAAc,CAAC,SAAS,CAAC;QACf,kBAAa,GAA2C,EAAE,CAAC;QAC3D,eAAU,GAEvB,EAAE,CAAC;QASH,MAAM,UAAU,GACZ,CAAC,KAAK,IAAI,KAAK,CAAC,mBAAmB,CAAC,IAAI,0BAAS,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,IAAI,EAAE,CAAC;QACnG,MAAM,OAAO,GACT,CAAC,KAAK,IAAI,KAAK,CAAC,gBAAgB,CAAC,IAAI,0BAAS,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAC7F,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAG,EAAE,EAAE,CAAC,CAAC;QACpF,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,iCAAM,IAAI,KAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAG,EAAE,EAAE,CAAC,CAAC;IAClF,CAAC;IAiDD,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GACI,SAAS,CA+JrB;AA/JY,8BAAS"}
|
|
@@ -167,8 +167,11 @@ function registerCustomEntityFields(config) {
|
|
|
167
167
|
registerCustomFieldsForEntity(config, 'Asset', custom_entity_fields_1.CustomAssetFields);
|
|
168
168
|
registerCustomFieldsForEntity(config, 'Collection', custom_entity_fields_1.CustomCollectionFields);
|
|
169
169
|
registerCustomFieldsForEntity(config, 'Collection', custom_entity_fields_1.CustomCollectionFieldsTranslation, true);
|
|
170
|
-
registerCustomFieldsForEntity(config, 'Customer', custom_entity_fields_1.CustomCustomerFields);
|
|
171
170
|
registerCustomFieldsForEntity(config, 'Channel', custom_entity_fields_1.CustomChannelFields);
|
|
171
|
+
registerCustomFieldsForEntity(config, 'Country', custom_entity_fields_1.CustomCountryFields);
|
|
172
|
+
registerCustomFieldsForEntity(config, 'Country', custom_entity_fields_1.CustomCountryFieldsTranslation, true);
|
|
173
|
+
registerCustomFieldsForEntity(config, 'Customer', custom_entity_fields_1.CustomCustomerFields);
|
|
174
|
+
registerCustomFieldsForEntity(config, 'CustomerGroup', custom_entity_fields_1.CustomCustomerGroupFields);
|
|
172
175
|
registerCustomFieldsForEntity(config, 'Facet', custom_entity_fields_1.CustomFacetFields);
|
|
173
176
|
registerCustomFieldsForEntity(config, 'Facet', custom_entity_fields_1.CustomFacetFieldsTranslation, true);
|
|
174
177
|
registerCustomFieldsForEntity(config, 'FacetValue', custom_entity_fields_1.CustomFacetValueFields);
|
|
@@ -176,6 +179,7 @@ function registerCustomEntityFields(config) {
|
|
|
176
179
|
registerCustomFieldsForEntity(config, 'Fulfillment', custom_entity_fields_1.CustomFulfillmentFields);
|
|
177
180
|
registerCustomFieldsForEntity(config, 'Order', custom_entity_fields_1.CustomOrderFields);
|
|
178
181
|
registerCustomFieldsForEntity(config, 'OrderLine', custom_entity_fields_1.CustomOrderLineFields);
|
|
182
|
+
registerCustomFieldsForEntity(config, 'PaymentMethod', custom_entity_fields_1.CustomPaymentMethodFields);
|
|
179
183
|
registerCustomFieldsForEntity(config, 'Product', custom_entity_fields_1.CustomProductFields);
|
|
180
184
|
registerCustomFieldsForEntity(config, 'Product', custom_entity_fields_1.CustomProductFieldsTranslation, true);
|
|
181
185
|
registerCustomFieldsForEntity(config, 'ProductOption', custom_entity_fields_1.CustomProductOptionFields);
|
|
@@ -184,10 +188,14 @@ function registerCustomEntityFields(config) {
|
|
|
184
188
|
registerCustomFieldsForEntity(config, 'ProductOptionGroup', custom_entity_fields_1.CustomProductOptionGroupFieldsTranslation, true);
|
|
185
189
|
registerCustomFieldsForEntity(config, 'ProductVariant', custom_entity_fields_1.CustomProductVariantFields);
|
|
186
190
|
registerCustomFieldsForEntity(config, 'ProductVariant', custom_entity_fields_1.CustomProductVariantFieldsTranslation, true);
|
|
191
|
+
registerCustomFieldsForEntity(config, 'Promotion', custom_entity_fields_1.CustomPromotionFields);
|
|
192
|
+
registerCustomFieldsForEntity(config, 'TaxCategory', custom_entity_fields_1.CustomTaxCategoryFields);
|
|
193
|
+
registerCustomFieldsForEntity(config, 'TaxRate', custom_entity_fields_1.CustomTaxRateFields);
|
|
187
194
|
registerCustomFieldsForEntity(config, 'User', custom_entity_fields_1.CustomUserFields);
|
|
188
195
|
registerCustomFieldsForEntity(config, 'GlobalSettings', custom_entity_fields_1.CustomGlobalSettingsFields);
|
|
189
196
|
registerCustomFieldsForEntity(config, 'ShippingMethod', custom_entity_fields_1.CustomShippingMethodFields);
|
|
190
197
|
registerCustomFieldsForEntity(config, 'ShippingMethod', custom_entity_fields_1.CustomShippingMethodFieldsTranslation, true);
|
|
198
|
+
registerCustomFieldsForEntity(config, 'Zone', custom_entity_fields_1.CustomZoneFields);
|
|
191
199
|
}
|
|
192
200
|
exports.registerCustomEntityFields = registerCustomEntityFields;
|
|
193
201
|
//# sourceMappingURL=register-custom-entity-fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-custom-entity-fields.js","sourceRoot":"","sources":["../../src/entity/register-custom-entity-fields.ts"],"names":[],"mappings":";;;AACA,mEAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"register-custom-entity-fields.js","sourceRoot":"","sources":["../../src/entity/register-custom-entity-fields.ts"],"names":[],"mappings":";;;AACA,mEAA+D;AAC/D,qCASiB;AACjB,sDAAmD;AAGnD,oEAAyD;AAGzD,iEAmCgC;AAEhC;;GAEG;AACH,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEhC;;GAEG;AACH,SAAS,6BAA6B,CAClC,MAAqB,EACrB,UAA8B;AAC9B,0CAA0C;AAC1C,IAAqB,EACrB,WAAW,GAAG,KAAK;IAEnB,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC;IACjD,IAAI,YAAY,EAAE;QACd,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;YACpC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;YAC3D,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;YAC5B,MAAM,cAAc,GAAG,GAAG,EAAE;gBACxB,IAAI,WAAW,CAAC,IAAI,KAAK,UAAU,EAAE;oBACjC,IAAI,WAAW,CAAC,IAAI,EAAE;wBAClB,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;wBACrF,mBAAS,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;qBAC/B;yBAAM;wBACH,mBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC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B,EAAE,IAAI,CAAC,CAAC;IACvF,6BAA6B,CAAC,MAAM,EAAE,eAAe,EAAE,gDAAyB,CAAC,CAAC;IAClF,6BAA6B,CAAC,MAAM,EAAE,eAAe,EAAE,2DAAoC,EAAE,IAAI,CAAC,CAAC;IACnG,6BAA6B,CAAC,MAAM,EAAE,oBAAoB,EAAE,qDAA8B,CAAC,CAAC;IAC5F,6BAA6B,CACzB,MAAM,EACN,oBAAoB,EACpB,gEAAyC,EACzC,IAAI,CACP,CAAC;IACF,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,iDAA0B,CAAC,CAAC;IACpF,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,4DAAqC,EAAE,IAAI,CAAC,CAAC;IACrG,6BAA6B,CAAC,MAAM,EAAE,WAAW,EAAE,4CAAqB,CAAC,CAAC;IAC1E,6BAA6B,CAAC,MAAM,EAAE,aAAa,EAAE,8CAAuB,CAAC,CAAC;IAC9E,6BAA6B,CAAC,MAAM,EAAE,SAAS,EAAE,0CAAmB,CAAC,CAAC;IACtE,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,uCAAgB,CAAC,CAAC;IAChE,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,iDAA0B,CAAC,CAAC;IACpF,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,iDAA0B,CAAC,CAAC;IACpF,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,EAAE,4DAAqC,EAAE,IAAI,CAAC,CAAC;IACrG,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,uCAAgB,CAAC,CAAC;AACpE,CAAC;AAxCD,gEAwCC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
2
3
|
import { VendureEntity } from '../base/base.entity';
|
|
4
|
+
import { CustomTaxCategoryFields } from '../custom-entity-fields';
|
|
3
5
|
/**
|
|
4
6
|
* @description
|
|
5
7
|
* A TaxCategory defines what type of taxes to apply to a {@link ProductVariant}.
|
|
6
8
|
*
|
|
7
9
|
* @docsCategory entities
|
|
8
10
|
*/
|
|
9
|
-
export declare class TaxCategory extends VendureEntity {
|
|
11
|
+
export declare class TaxCategory extends VendureEntity implements HasCustomFields {
|
|
10
12
|
constructor(input?: DeepPartial<TaxCategory>);
|
|
11
13
|
name: string;
|
|
12
14
|
isDefault: boolean;
|
|
15
|
+
customFields: CustomTaxCategoryFields;
|
|
13
16
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TaxCategory = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base/base.entity");
|
|
15
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
15
16
|
/**
|
|
16
17
|
* @description
|
|
17
18
|
* A TaxCategory defines what type of taxes to apply to a {@link ProductVariant}.
|
|
@@ -31,6 +32,10 @@ __decorate([
|
|
|
31
32
|
typeorm_1.Column({ default: false }),
|
|
32
33
|
__metadata("design:type", Boolean)
|
|
33
34
|
], TaxCategory.prototype, "isDefault", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomTaxCategoryFields),
|
|
37
|
+
__metadata("design:type", custom_entity_fields_1.CustomTaxCategoryFields)
|
|
38
|
+
], TaxCategory.prototype, "customFields", void 0);
|
|
34
39
|
TaxCategory = __decorate([
|
|
35
40
|
typeorm_1.Entity(),
|
|
36
41
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-category.entity.js","sourceRoot":"","sources":["../../../src/entity/tax-category/tax-category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAyC;
|
|
1
|
+
{"version":3,"file":"tax-category.entity.js","sourceRoot":"","sources":["../../../src/entity/tax-category/tax-category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAyC;AAGzC,qDAAoD;AACpD,kEAAkE;AAElE;;;;;GAKG;AAEH,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,2BAAa;IAC1C,YAAY,KAAgC;QACxC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAQJ,CAAA;AANa;IAAT,gBAAM,EAAE;;yCAAc;AAEK;IAA3B,gBAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CAAoB;AAG/C;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,8CAAuB,CAAC;8BAC1B,8CAAuB;iDAAC;AAV7B,WAAW;IADvB,gBAAM,EAAE;;GACI,WAAW,CAWvB;AAXY,kCAAW"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { TaxLine } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
3
4
|
import { VendureEntity } from '../base/base.entity';
|
|
5
|
+
import { CustomTaxRateFields } from '../custom-entity-fields';
|
|
4
6
|
import { CustomerGroup } from '../customer-group/customer-group.entity';
|
|
5
7
|
import { TaxCategory } from '../tax-category/tax-category.entity';
|
|
6
8
|
import { Zone } from '../zone/zone.entity';
|
|
@@ -14,7 +16,7 @@ import { Zone } from '../zone/zone.entity';
|
|
|
14
16
|
*
|
|
15
17
|
* @docsCategory entities
|
|
16
18
|
*/
|
|
17
|
-
export declare class TaxRate extends VendureEntity {
|
|
19
|
+
export declare class TaxRate extends VendureEntity implements HasCustomFields {
|
|
18
20
|
constructor(input?: DeepPartial<TaxRate>);
|
|
19
21
|
name: string;
|
|
20
22
|
enabled: boolean;
|
|
@@ -22,6 +24,7 @@ export declare class TaxRate extends VendureEntity {
|
|
|
22
24
|
category: TaxCategory;
|
|
23
25
|
zone: Zone;
|
|
24
26
|
customerGroup?: CustomerGroup;
|
|
27
|
+
customFields: CustomTaxRateFields;
|
|
25
28
|
/**
|
|
26
29
|
* Returns the tax component of a given gross price.
|
|
27
30
|
*/
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const tax_utils_1 = require("../../common/tax-utils");
|
|
15
15
|
const utils_1 = require("../../common/utils");
|
|
16
16
|
const base_entity_1 = require("../base/base.entity");
|
|
17
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
17
18
|
const customer_group_entity_1 = require("../customer-group/customer-group.entity");
|
|
18
19
|
const tax_category_entity_1 = require("../tax-category/tax-category.entity");
|
|
19
20
|
const value_transformers_1 = require("../value-transformers");
|
|
@@ -90,6 +91,10 @@ __decorate([
|
|
|
90
91
|
typeorm_1.ManyToOne(type => customer_group_entity_1.CustomerGroup, { nullable: true }),
|
|
91
92
|
__metadata("design:type", customer_group_entity_1.CustomerGroup)
|
|
92
93
|
], TaxRate.prototype, "customerGroup", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomTaxRateFields),
|
|
96
|
+
__metadata("design:type", custom_entity_fields_1.CustomTaxRateFields)
|
|
97
|
+
], TaxRate.prototype, "customFields", void 0);
|
|
93
98
|
TaxRate = __decorate([
|
|
94
99
|
typeorm_1.Entity(),
|
|
95
100
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-rate.entity.js","sourceRoot":"","sources":["../../../src/entity/tax-rate/tax-rate.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,qCAAoD;AAEpD,sDAAgG;AAChG,8CAAiD;
|
|
1
|
+
{"version":3,"file":"tax-rate.entity.js","sourceRoot":"","sources":["../../../src/entity/tax-rate/tax-rate.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,qCAAoD;AAEpD,sDAAgG;AAChG,8CAAiD;AAEjD,qDAAoD;AACpD,k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I,uCAAkB,EAAE,EAAE,CAAC;;sCAAe;AAG1G;IADC,mBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAW,CAAC;8BACrB,iCAAW;yCAAC;AAGtB;IADC,mBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,kBAAI,CAAC;8BAClB,kBAAI;qCAAC;AAGX;IADC,mBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACrC,qCAAa;8CAAC;AAG9B;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,0CAAmB,CAAC;8BACtB,0CAAmB;6CAAC;AArBzB,OAAO;IADnB,gBAAM,EAAE;;GACI,OAAO,CA6DnB;AA7DY,0BAAO"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
2
3
|
import { VendureEntity } from '../base/base.entity';
|
|
3
4
|
import { Country } from '../country/country.entity';
|
|
5
|
+
import { CustomZoneFields } from '../custom-entity-fields';
|
|
4
6
|
/**
|
|
5
7
|
* @description
|
|
6
8
|
* A Zone is a grouping of one or more {@link Country} entities. It is used for
|
|
@@ -8,8 +10,9 @@ import { Country } from '../country/country.entity';
|
|
|
8
10
|
*
|
|
9
11
|
* @docsCategory entities
|
|
10
12
|
*/
|
|
11
|
-
export declare class Zone extends VendureEntity {
|
|
13
|
+
export declare class Zone extends VendureEntity implements HasCustomFields {
|
|
12
14
|
constructor(input?: DeepPartial<Zone>);
|
|
13
15
|
name: string;
|
|
14
16
|
members: Country[];
|
|
17
|
+
customFields: CustomZoneFields;
|
|
15
18
|
}
|
|
@@ -13,6 +13,7 @@ exports.Zone = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base/base.entity");
|
|
15
15
|
const country_entity_1 = require("../country/country.entity");
|
|
16
|
+
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
16
17
|
/**
|
|
17
18
|
* @description
|
|
18
19
|
* A Zone is a grouping of one or more {@link Country} entities. It is used for
|
|
@@ -34,6 +35,10 @@ __decorate([
|
|
|
34
35
|
typeorm_1.JoinTable(),
|
|
35
36
|
__metadata("design:type", Array)
|
|
36
37
|
], Zone.prototype, "members", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
typeorm_1.Column(type => custom_entity_fields_1.CustomZoneFields),
|
|
40
|
+
__metadata("design:type", custom_entity_fields_1.CustomZoneFields)
|
|
41
|
+
], Zone.prototype, "customFields", void 0);
|
|
37
42
|
Zone = __decorate([
|
|
38
43
|
typeorm_1.Entity(),
|
|
39
44
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zone.entity.js","sourceRoot":"","sources":["../../../src/entity/zone/zone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAgE;
|
|
1
|
+
{"version":3,"file":"zone.entity.js","sourceRoot":"","sources":["../../../src/entity/zone/zone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAgE;AAGhE,qDAAoD;AACpD,8DAAoD;AACpD,kEAA2D;AAE3D;;;;;;GAMG;AAEH,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,2BAAa;IACnC,YAAY,KAAyB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAUJ,CAAA;AARa;IAAT,gBAAM,EAAE;;kCAAc;AAIvB;IAFC,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAO,CAAC;IAC3B,mBAAS,EAAE;;qCACO;AAGnB;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,uCAAgB,CAAC;8BACnB,uCAAgB;0CAAC;AAZtB,IAAI;IADhB,gBAAM,EAAE;;GACI,IAAI,CAahB;AAbY,oBAAI"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequestContext } from '../../api/common/request-context';
|
|
2
|
+
import { Customer } from '../../entity/customer/customer.entity';
|
|
3
|
+
import { VendureEvent } from '../vendure-event';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* This event is fired when a users email address successfully gets verified after
|
|
7
|
+
* the `verifyCustomerAccount` mutation was executed.
|
|
8
|
+
*
|
|
9
|
+
* @docsCategory events
|
|
10
|
+
* @docsPage Event Types
|
|
11
|
+
*/
|
|
12
|
+
export declare class AccountVerifiedEvent extends VendureEvent {
|
|
13
|
+
ctx: RequestContext;
|
|
14
|
+
customer: Customer;
|
|
15
|
+
constructor(ctx: RequestContext, customer: Customer);
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountVerifiedEvent = void 0;
|
|
4
|
+
const vendure_event_1 = require("../vendure-event");
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* This event is fired when a users email address successfully gets verified after
|
|
8
|
+
* the `verifyCustomerAccount` mutation was executed.
|
|
9
|
+
*
|
|
10
|
+
* @docsCategory events
|
|
11
|
+
* @docsPage Event Types
|
|
12
|
+
*/
|
|
13
|
+
class AccountVerifiedEvent extends vendure_event_1.VendureEvent {
|
|
14
|
+
constructor(ctx, customer) {
|
|
15
|
+
super();
|
|
16
|
+
this.ctx = ctx;
|
|
17
|
+
this.customer = customer;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.AccountVerifiedEvent = AccountVerifiedEvent;
|
|
21
|
+
//# sourceMappingURL=account-verified-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-verified-event.js","sourceRoot":"","sources":["../../../src/event-bus/events/account-verified-event.ts"],"names":[],"mappings":";;;AAEA,oDAAgD;AAEhD;;;;;;;GAOG;AACH,MAAa,oBAAqB,SAAQ,4BAAY;IAClD,YAAmB,GAAmB,EAAS,QAAkB;QAC7D,KAAK,EAAE,CAAC;QADO,QAAG,GAAH,GAAG,CAAgB;QAAS,aAAQ,GAAR,QAAQ,CAAU;IAEjE,CAAC;CACJ;AAJD,oDAIC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateAdministratorInput, UpdateAdministratorInput } from '@vendure/common/lib/generated-types';
|
|
2
|
+
import { ID } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { RequestContext } from '../../api';
|
|
4
|
+
import { Administrator } from '../../entity';
|
|
5
|
+
import { VendureEntityEvent } from '../vendure-entity-event';
|
|
6
|
+
declare type AdministratorInputTypes = CreateAdministratorInput | UpdateAdministratorInput | ID;
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* This event is fired whenever a {@link Administrator} is added, updated or deleted.
|
|
10
|
+
*
|
|
11
|
+
* @docsCategory events
|
|
12
|
+
* @docsPage Event Types
|
|
13
|
+
* @since 1.4
|
|
14
|
+
*/
|
|
15
|
+
export declare class AdministratorEvent extends VendureEntityEvent<Administrator, AdministratorInputTypes> {
|
|
16
|
+
constructor(ctx: RequestContext, entity: Administrator, type: 'created' | 'updated' | 'deleted', input?: AdministratorInputTypes);
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdministratorEvent = void 0;
|
|
4
|
+
const vendure_entity_event_1 = require("../vendure-entity-event");
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* This event is fired whenever a {@link Administrator} is added, updated or deleted.
|
|
8
|
+
*
|
|
9
|
+
* @docsCategory events
|
|
10
|
+
* @docsPage Event Types
|
|
11
|
+
* @since 1.4
|
|
12
|
+
*/
|
|
13
|
+
class AdministratorEvent extends vendure_entity_event_1.VendureEntityEvent {
|
|
14
|
+
constructor(ctx, entity, type, input) {
|
|
15
|
+
super(entity, type, ctx, input);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AdministratorEvent = AdministratorEvent;
|
|
19
|
+
//# sourceMappingURL=administrator-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"administrator-event.js","sourceRoot":"","sources":["../../../src/event-bus/events/administrator-event.ts"],"names":[],"mappings":";;;AAKA,kEAA6D;AAI7D;;;;;;;GAOG;AACH,MAAa,kBAAmB,SAAQ,yCAA0D;IAC9F,YACI,GAAmB,EACnB,MAAqB,EACrB,IAAuC,EACvC,KAA+B;QAE/B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;CACJ;AATD,gDASC"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateAssetInput, DeleteAssetInput, UpdateAssetInput } from '@vendure/common/lib/generated-types';
|
|
2
|
+
import { ID } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { RequestContext } from '../../api';
|
|
2
4
|
import { Asset } from '../../entity';
|
|
3
|
-
import {
|
|
5
|
+
import { VendureEntityEvent } from '../vendure-entity-event';
|
|
6
|
+
declare type AssetInputTypes = CreateAssetInput | UpdateAssetInput | DeleteAssetInput | ID;
|
|
4
7
|
/**
|
|
5
8
|
* @description
|
|
6
|
-
* This event is fired whenever
|
|
7
|
-
* or deleted.
|
|
9
|
+
* This event is fired whenever a {@link Asset} is added, updated or deleted.
|
|
8
10
|
*
|
|
9
11
|
* @docsCategory events
|
|
10
12
|
* @docsPage Event Types
|
|
13
|
+
* @since 1.4
|
|
11
14
|
*/
|
|
12
|
-
export declare class AssetEvent extends
|
|
13
|
-
ctx: RequestContext;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
export declare class AssetEvent extends VendureEntityEvent<Asset, AssetInputTypes> {
|
|
16
|
+
constructor(ctx: RequestContext, entity: Asset, type: 'created' | 'updated' | 'deleted', input?: AssetInputTypes);
|
|
17
|
+
/**
|
|
18
|
+
* Return an asset field to become compatible with the
|
|
19
|
+
* deprecated old version of AssetEvent
|
|
20
|
+
* @deprecated Use `entity` instead
|
|
21
|
+
* @since 1.4
|
|
22
|
+
*/
|
|
23
|
+
get asset(): Asset;
|
|
17
24
|
}
|
|
25
|
+
export {};
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AssetEvent = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vendure_entity_event_1 = require("../vendure-entity-event");
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
|
-
* This event is fired whenever
|
|
8
|
-
* or deleted.
|
|
7
|
+
* This event is fired whenever a {@link Asset} is added, updated or deleted.
|
|
9
8
|
*
|
|
10
9
|
* @docsCategory events
|
|
11
10
|
* @docsPage Event Types
|
|
11
|
+
* @since 1.4
|
|
12
12
|
*/
|
|
13
|
-
class AssetEvent extends
|
|
14
|
-
constructor(ctx,
|
|
15
|
-
super();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
class AssetEvent extends vendure_entity_event_1.VendureEntityEvent {
|
|
14
|
+
constructor(ctx, entity, type, input) {
|
|
15
|
+
super(entity, type, ctx, input);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Return an asset field to become compatible with the
|
|
19
|
+
* deprecated old version of AssetEvent
|
|
20
|
+
* @deprecated Use `entity` instead
|
|
21
|
+
* @since 1.4
|
|
22
|
+
*/
|
|
23
|
+
get asset() {
|
|
24
|
+
return this.entity;
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
exports.AssetEvent = AssetEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-event.js","sourceRoot":"","sources":["../../../src/event-bus/events/asset-event.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"asset-event.js","sourceRoot":"","sources":["../../../src/event-bus/events/asset-event.ts"],"names":[],"mappings":";;;AAKA,kEAA6D;AAI7D;;;;;;;GAOG;AACH,MAAa,UAAW,SAAQ,yCAA0C;IACtE,YACI,GAAmB,EACnB,MAAa,EACb,IAAuC,EACvC,KAAuB;QAEvB,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAnBD,gCAmBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ID, Type } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { RequestContext } from '../../api';
|
|
3
|
+
import { ChannelAware } from '../../common';
|
|
4
|
+
import { VendureEntity } from '../../entity';
|
|
5
|
+
import { VendureEvent } from '../vendure-event';
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* This event is fired whenever an {@link ChannelAware} entity is assigned or removed
|
|
9
|
+
* from a channel. The entity property contains the value before updating the channels.
|
|
10
|
+
*
|
|
11
|
+
* @docsCategory events
|
|
12
|
+
* @docsPage Event Types
|
|
13
|
+
* @since 1.4
|
|
14
|
+
*/
|
|
15
|
+
export declare class ChangeChannelEvent<T extends ChannelAware & VendureEntity> extends VendureEvent {
|
|
16
|
+
ctx: RequestContext;
|
|
17
|
+
entity: T;
|
|
18
|
+
channelIds: ID[];
|
|
19
|
+
type: 'assigned' | 'removed';
|
|
20
|
+
entityType?: Type<T> | undefined;
|
|
21
|
+
constructor(ctx: RequestContext, entity: T, channelIds: ID[], type: 'assigned' | 'removed', entityType?: Type<T> | undefined);
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChangeChannelEvent = void 0;
|
|
4
|
+
const vendure_event_1 = require("../vendure-event");
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* This event is fired whenever an {@link ChannelAware} entity is assigned or removed
|
|
8
|
+
* from a channel. The entity property contains the value before updating the channels.
|
|
9
|
+
*
|
|
10
|
+
* @docsCategory events
|
|
11
|
+
* @docsPage Event Types
|
|
12
|
+
* @since 1.4
|
|
13
|
+
*/
|
|
14
|
+
class ChangeChannelEvent extends vendure_event_1.VendureEvent {
|
|
15
|
+
constructor(ctx, entity, channelIds, type, entityType) {
|
|
16
|
+
super();
|
|
17
|
+
this.ctx = ctx;
|
|
18
|
+
this.entity = entity;
|
|
19
|
+
this.channelIds = channelIds;
|
|
20
|
+
this.type = type;
|
|
21
|
+
this.entityType = entityType;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ChangeChannelEvent = ChangeChannelEvent;
|
|
25
|
+
//# sourceMappingURL=change-channel-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-channel-event.js","sourceRoot":"","sources":["../../../src/event-bus/events/change-channel-event.ts"],"names":[],"mappings":";;;AAKA,oDAAgD;AAEhD;;;;;;;;GAQG;AACH,MAAa,kBAA2D,SAAQ,4BAAY;IACxF,YACW,GAAmB,EACnB,MAAS,EACT,UAAgB,EAChB,IAA4B,EAC5B,UAAoB;QAE3B,KAAK,EAAE,CAAC;QAND,QAAG,GAAH,GAAG,CAAgB;QACnB,WAAM,GAAN,MAAM,CAAG;QACT,eAAU,GAAV,UAAU,CAAM;QAChB,SAAI,GAAJ,IAAI,CAAwB;QAC5B,eAAU,GAAV,UAAU,CAAU;IAG/B,CAAC;CACJ;AAVD,gDAUC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateChannelInput, UpdateChannelInput } from '@vendure/common/lib/generated-types';
|
|
2
|
+
import { ID } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { RequestContext } from '../../api';
|
|
4
|
+
import { Channel } from '../../entity';
|
|
5
|
+
import { VendureEntityEvent } from '../vendure-entity-event';
|
|
6
|
+
declare type ChannelInputTypes = CreateChannelInput | UpdateChannelInput | ID;
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* This event is fired whenever a {@link Channel} is added, updated or deleted.
|
|
10
|
+
*
|
|
11
|
+
* @docsCategory events
|
|
12
|
+
* @docsPage Event Types
|
|
13
|
+
* @since 1.4
|
|
14
|
+
*/
|
|
15
|
+
export declare class ChannelEvent extends VendureEntityEvent<Channel, ChannelInputTypes> {
|
|
16
|
+
constructor(ctx: RequestContext, entity: Channel, type: 'created' | 'updated' | 'deleted', input?: ChannelInputTypes);
|
|
17
|
+
}
|
|
18
|
+
export {};
|