@medusajs/medusa 1.2.2-dev.56 → 1.3.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/CHANGELOG.md +48 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/middlewares/error-handler.js +1 -1
- package/dist/api/routes/admin/auth/create-session.js +5 -5
- package/dist/api/routes/admin/auth/create-session.js.map +1 -1
- package/dist/api/routes/admin/customer-groups/list-customer-groups.js +2 -2
- package/dist/api/routes/admin/customer-groups/list-customer-groups.js.map +1 -1
- package/dist/api/routes/admin/discounts/create-discount.d.ts +11 -2
- package/dist/api/routes/admin/discounts/create-discount.js +66 -12
- package/dist/api/routes/admin/discounts/create-discount.js.map +1 -1
- package/dist/api/routes/admin/discounts/create-dynamic-code.d.ts +1 -0
- package/dist/api/routes/admin/discounts/create-dynamic-code.js +4 -1
- package/dist/api/routes/admin/discounts/create-dynamic-code.js.map +1 -1
- package/dist/api/routes/admin/discounts/delete-dynamic-code.js +3 -1
- package/dist/api/routes/admin/discounts/delete-dynamic-code.js.map +1 -1
- package/dist/api/routes/admin/discounts/get-discount.d.ts +7 -0
- package/dist/api/routes/admin/discounts/get-discount.js +43 -9
- package/dist/api/routes/admin/discounts/get-discount.js.map +1 -1
- package/dist/api/routes/admin/discounts/index.d.ts +1 -3
- package/dist/api/routes/admin/discounts/index.js +1 -6
- package/dist/api/routes/admin/discounts/index.js.map +1 -1
- package/dist/api/routes/admin/discounts/list-discounts.d.ts +2 -6
- package/dist/api/routes/admin/discounts/list-discounts.js +15 -28
- package/dist/api/routes/admin/discounts/list-discounts.js.map +1 -1
- package/dist/api/routes/admin/discounts/update-discount.d.ts +12 -2
- package/dist/api/routes/admin/discounts/update-discount.js +70 -15
- package/dist/api/routes/admin/discounts/update-discount.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/create-draft-order.d.ts +3 -3
- package/dist/api/routes/admin/draft-orders/create-draft-order.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/create-line-item.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/create-line-item.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/index.js +7 -1
- package/dist/api/routes/admin/draft-orders/index.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/register-payment.js +0 -1
- package/dist/api/routes/admin/draft-orders/register-payment.js.map +1 -1
- package/dist/api/routes/admin/draft-orders/update-line-item.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/update-line-item.js.map +1 -1
- package/dist/api/routes/admin/notifications/index.js.map +1 -1
- package/dist/api/routes/admin/notifications/list-notifications.js.map +1 -1
- package/dist/api/routes/admin/notifications/resend-notification.js.map +1 -1
- package/dist/api/routes/admin/orders/add-shipping-method.d.ts +1 -1
- package/dist/api/routes/admin/orders/add-shipping-method.js.map +1 -1
- package/dist/api/routes/admin/orders/create-order.js.map +1 -1
- package/dist/api/routes/admin/orders/create-swap.js +7 -3
- package/dist/api/routes/admin/orders/create-swap.js.map +1 -1
- package/dist/api/routes/admin/orders/index.d.ts +1 -1
- package/dist/api/routes/admin/orders/index.js +1 -3
- package/dist/api/routes/admin/orders/index.js.map +1 -1
- package/dist/api/routes/admin/orders/list-orders.js.map +1 -1
- package/dist/api/routes/admin/orders/update-order.js.map +1 -1
- package/dist/api/routes/admin/price-lists/index.d.ts +7 -0
- package/dist/api/routes/admin/price-lists/index.js +3 -0
- package/dist/api/routes/admin/price-lists/index.js.map +1 -1
- package/dist/api/routes/admin/price-lists/list-price-list-products.d.ts +74 -0
- package/dist/api/routes/admin/price-lists/list-price-list-products.js +246 -0
- package/dist/api/routes/admin/price-lists/list-price-list-products.js.map +1 -0
- package/dist/api/routes/admin/price-lists/update-price-list.d.ts +2 -2
- package/dist/api/routes/admin/price-lists/update-price-list.js.map +1 -1
- package/dist/api/routes/admin/products/list-products.d.ts +2 -1
- package/dist/api/routes/admin/products/list-products.js +31 -65
- package/dist/api/routes/admin/products/list-products.js.map +1 -1
- package/dist/api/routes/admin/products/update-variant.js +11 -7
- package/dist/api/routes/admin/products/update-variant.js.map +1 -1
- package/dist/api/routes/admin/regions/index.d.ts +1 -1
- package/dist/api/routes/admin/store/get-store.js.map +1 -1
- package/dist/api/routes/admin/swaps/index.js +3 -0
- package/dist/api/routes/admin/swaps/index.js.map +1 -1
- package/dist/api/routes/admin/tax-rates/list-tax-rates.js.map +1 -1
- package/dist/api/routes/admin/tax-rates/utils/get-query-config.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/utils/get-query-config.js +4 -2
- package/dist/api/routes/admin/tax-rates/utils/get-query-config.js.map +1 -1
- package/dist/api/routes/admin/uploads/index.d.ts +1 -1
- package/dist/api/routes/store/auth/create-session.js +4 -5
- package/dist/api/routes/store/auth/create-session.js.map +1 -1
- package/dist/api/routes/store/carts/create-cart.js +8 -5
- package/dist/api/routes/store/carts/create-cart.js.map +1 -1
- package/dist/api/routes/store/carts/create-line-item.d.ts +1 -1
- package/dist/api/routes/store/carts/create-line-item.js +9 -6
- package/dist/api/routes/store/carts/create-line-item.js.map +1 -1
- package/dist/api/routes/store/carts/index.d.ts +0 -1
- package/dist/api/routes/store/carts/index.js +1 -3
- package/dist/api/routes/store/carts/index.js.map +1 -1
- package/dist/api/routes/store/carts/update-cart.js +7 -7
- package/dist/api/routes/store/carts/update-cart.js.map +1 -1
- package/dist/api/routes/store/customers/create-customer.js +3 -4
- package/dist/api/routes/store/customers/create-customer.js.map +1 -1
- package/dist/api/routes/store/orders/index.js +0 -2
- package/dist/api/routes/store/orders/index.js.map +1 -1
- package/dist/api/routes/store/products/get-product.js +17 -5
- package/dist/api/routes/store/products/get-product.js.map +1 -1
- package/dist/api/routes/store/products/index.d.ts +2 -2
- package/dist/api/routes/store/products/list-products.d.ts +2 -1
- package/dist/api/routes/store/products/list-products.js +21 -8
- package/dist/api/routes/store/products/list-products.js.map +1 -1
- package/dist/api/routes/store/products/search.d.ts +1 -1
- package/dist/api/routes/store/products/search.js.map +1 -1
- package/dist/api/routes/store/shipping-options/list-options.js.map +1 -1
- package/dist/api/routes/store/swaps/create-swap.js +7 -3
- package/dist/api/routes/store/swaps/create-swap.js.map +1 -1
- package/dist/api/routes/store/variants/get-variant.js +17 -5
- package/dist/api/routes/store/variants/get-variant.js.map +1 -1
- package/dist/api/routes/store/variants/list-variants.d.ts +2 -1
- package/dist/api/routes/store/variants/list-variants.js +38 -9
- package/dist/api/routes/store/variants/list-variants.js.map +1 -1
- package/dist/commands/develop.js +1 -1
- package/dist/commands/develop.js.map +1 -1
- package/dist/controllers/customers/index.d.ts +1 -1
- package/dist/controllers/customers/list-customers.d.ts +1 -1
- package/dist/controllers/customers/list-customers.js +34 -37
- package/dist/controllers/customers/list-customers.js.map +1 -1
- package/dist/controllers/products/admin-list-products.d.ts +16 -0
- package/dist/controllers/products/admin-list-products.js +103 -0
- package/dist/controllers/products/admin-list-products.js.map +1 -0
- package/dist/helpers/test-request.js +15 -7
- package/dist/helpers/test-request.js.map +1 -1
- package/dist/index.d.ts +3 -59
- package/dist/index.js +3 -62
- package/dist/index.js.map +1 -1
- package/dist/interfaces/base-service.d.ts +66 -0
- package/dist/interfaces/base-service.js +378 -0
- package/dist/interfaces/base-service.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/price-selection-strategy.d.ts +50 -0
- package/dist/interfaces/price-selection-strategy.js +34 -0
- package/dist/interfaces/price-selection-strategy.js.map +1 -0
- package/dist/interfaces/tax-service.d.ts +6 -0
- package/dist/interfaces/tax-service.js +31 -0
- package/dist/interfaces/tax-service.js.map +1 -1
- package/dist/loaders/api.d.ts +9 -5
- package/dist/loaders/api.js +2 -6
- package/dist/loaders/api.js.map +1 -1
- package/dist/loaders/config.d.ts +3 -0
- package/dist/loaders/config.js +47 -0
- package/dist/loaders/config.js.map +1 -0
- package/dist/loaders/database.d.ts +8 -4
- package/dist/loaders/database.js.map +1 -1
- package/dist/loaders/defaults.d.ts +4 -3
- package/dist/loaders/defaults.js +39 -31
- package/dist/loaders/defaults.js.map +1 -1
- package/dist/loaders/express.d.ts +7 -4
- package/dist/loaders/express.js +7 -5
- package/dist/loaders/express.js.map +1 -1
- package/dist/loaders/index.d.ts +13 -8
- package/dist/loaders/index.js +29 -54
- package/dist/loaders/index.js.map +1 -1
- package/dist/loaders/logger.d.ts +1 -0
- package/dist/loaders/logger.js.map +1 -1
- package/dist/loaders/models.d.ts +8 -3
- package/dist/loaders/models.js +19 -17
- package/dist/loaders/models.js.map +1 -1
- package/dist/loaders/passport.d.ts +7 -4
- package/dist/loaders/passport.js +23 -21
- package/dist/loaders/passport.js.map +1 -1
- package/dist/loaders/plugins.d.ts +18 -10
- package/dist/loaders/plugins.js +27 -24
- package/dist/loaders/plugins.js.map +1 -1
- package/dist/loaders/redis.d.ts +8 -5
- package/dist/loaders/redis.js +3 -3
- package/dist/loaders/redis.js.map +1 -1
- package/dist/loaders/repositories.d.ts +7 -3
- package/dist/loaders/repositories.js +1 -1
- package/dist/loaders/repositories.js.map +1 -1
- package/dist/loaders/search-index.d.ts +4 -3
- package/dist/loaders/search-index.js.map +1 -1
- package/dist/loaders/services.d.ts +10 -5
- package/dist/loaders/services.js.map +1 -1
- package/dist/loaders/strategies.d.ts +1 -1
- package/dist/loaders/subscribers.d.ts +7 -3
- package/dist/loaders/subscribers.js.map +1 -1
- package/dist/migrations/1646324713514-discount_conditions.d.ts +6 -0
- package/dist/migrations/1646324713514-discount_conditions.js +335 -0
- package/dist/migrations/1646324713514-discount_conditions.js.map +1 -0
- package/dist/migrations/1648600574750-add_line_item_adjustments.d.ts +6 -0
- package/dist/migrations/1648600574750-add_line_item_adjustments.js +101 -0
- package/dist/migrations/1648600574750-add_line_item_adjustments.js.map +1 -0
- package/dist/migrations/1648641130007-tax_line_constraints.d.ts +6 -0
- package/dist/{api/routes/admin/discounts/remove-valid-product.js → migrations/1648641130007-tax_line_constraints.js} +39 -44
- package/dist/migrations/1648641130007-tax_line_constraints.js.map +1 -0
- package/dist/migrations/1649775522087-add_batch_job_model.d.ts +6 -0
- package/dist/{api/routes/admin/discounts/add-valid-product.js → migrations/1649775522087-add_batch_job_model.js} +39 -44
- package/dist/migrations/1649775522087-add_batch_job_model.js.map +1 -0
- package/dist/models/batch-job.d.ts +58 -0
- package/dist/models/batch-job.js +119 -0
- package/dist/models/batch-job.js.map +1 -0
- package/dist/models/country.d.ts +1 -1
- package/dist/models/country.js +1 -1
- package/dist/models/country.js.map +1 -1
- package/dist/models/customer-group.js +3 -1
- package/dist/models/customer-group.js.map +1 -1
- package/dist/models/discount-condition-customer-group.d.ts +39 -0
- package/dist/models/discount-condition-customer-group.js +84 -0
- package/dist/models/discount-condition-customer-group.js.map +1 -0
- package/dist/models/discount-condition-product-collection.d.ts +39 -0
- package/dist/models/discount-condition-product-collection.js +84 -0
- package/dist/models/discount-condition-product-collection.js.map +1 -0
- package/dist/models/discount-condition-product-tag.d.ts +39 -0
- package/dist/models/discount-condition-product-tag.js +84 -0
- package/dist/models/discount-condition-product-tag.js.map +1 -0
- package/dist/models/discount-condition-product-type.d.ts +39 -0
- package/dist/models/discount-condition-product-type.js +84 -0
- package/dist/models/discount-condition-product-type.js.map +1 -0
- package/dist/models/discount-condition-product.d.ts +39 -0
- package/dist/models/discount-condition-product.js +84 -0
- package/dist/models/discount-condition-product.js.map +1 -0
- package/dist/models/discount-condition.d.ts +68 -0
- package/dist/models/discount-condition.js +208 -0
- package/dist/models/discount-condition.js.map +1 -0
- package/dist/models/discount-rule.d.ts +5 -5
- package/dist/models/discount-rule.js +6 -17
- package/dist/models/discount-rule.js.map +1 -1
- package/dist/models/discount.js.map +1 -1
- package/dist/models/index.d.ts +66 -0
- package/dist/models/index.js +79 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/line-item-adjustment.d.ts +13 -0
- package/dist/models/line-item-adjustment.js +79 -0
- package/dist/models/line-item-adjustment.js.map +1 -0
- package/dist/models/line-item-tax-line.js +2 -1
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +2 -0
- package/dist/models/line-item.js +5 -0
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/money-amount.js +4 -1
- package/dist/models/money-amount.js.map +1 -1
- package/dist/models/price-list.js +6 -2
- package/dist/models/price-list.js.map +1 -1
- package/dist/models/product-variant.js +9 -3
- package/dist/models/product-variant.js.map +1 -1
- package/dist/models/shipping-method-tax-line.js +2 -1
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/swap.d.ts +4 -4
- package/dist/models/swap.js +23 -23
- package/dist/models/swap.js.map +1 -1
- package/dist/repositories/cart.d.ts +2 -2
- package/dist/repositories/cart.js.map +1 -1
- package/dist/repositories/customer.d.ts +1 -1
- package/dist/repositories/customer.js +7 -9
- package/dist/repositories/customer.js.map +1 -1
- package/dist/repositories/discount-condition.d.ts +34 -0
- package/dist/repositories/discount-condition.js +384 -0
- package/dist/repositories/discount-condition.js.map +1 -0
- package/dist/repositories/line-item-adjustment.d.ts +4 -0
- package/dist/repositories/line-item-adjustment.js +38 -0
- package/dist/repositories/line-item-adjustment.js.map +1 -0
- package/dist/repositories/line-item-tax-line.d.ts +2 -0
- package/dist/repositories/line-item-tax-line.js +80 -0
- package/dist/repositories/line-item-tax-line.js.map +1 -1
- package/dist/repositories/line-item.js +1 -0
- package/dist/repositories/line-item.js.map +1 -1
- package/dist/repositories/money-amount.d.ts +1 -0
- package/dist/repositories/money-amount.js +49 -2
- package/dist/repositories/money-amount.js.map +1 -1
- package/dist/repositories/product.d.ts +2 -0
- package/dist/repositories/product.js +35 -17
- package/dist/repositories/product.js.map +1 -1
- package/dist/repositories/shipping-method-tax-line.d.ts +2 -0
- package/dist/repositories/shipping-method-tax-line.js +80 -0
- package/dist/repositories/shipping-method-tax-line.js.map +1 -1
- package/dist/scripts/discount-rule-migration.d.ts +4 -0
- package/dist/scripts/discount-rule-migration.js +177 -0
- package/dist/scripts/discount-rule-migration.js.map +1 -0
- package/dist/scripts/line-item-adjustment-migration.d.ts +4 -0
- package/dist/scripts/line-item-adjustment-migration.js +173 -0
- package/dist/scripts/line-item-adjustment-migration.js.map +1 -0
- package/dist/services/cart.d.ts +58 -47
- package/dist/services/cart.js +1306 -1391
- package/dist/services/cart.js.map +1 -1
- package/dist/services/customer.js +4 -2
- package/dist/services/customer.js.map +1 -1
- package/dist/services/discount.d.ts +50 -58
- package/dist/services/discount.js +363 -152
- package/dist/services/discount.js.map +1 -1
- package/dist/services/draft-order.js +1 -0
- package/dist/services/draft-order.js.map +1 -1
- package/dist/services/fulfillment-provider.js +23 -17
- package/dist/services/fulfillment-provider.js.map +1 -1
- package/dist/services/invite.d.ts +4 -2
- package/dist/services/invite.js +11 -9
- package/dist/services/invite.js.map +1 -1
- package/dist/services/line-item-adjustment.d.ts +87 -0
- package/dist/services/line-item-adjustment.js +436 -0
- package/dist/services/line-item-adjustment.js.map +1 -0
- package/dist/services/line-item.d.ts +48 -40
- package/dist/services/line-item.js +226 -193
- package/dist/services/line-item.js.map +1 -1
- package/dist/services/order.js +4 -4
- package/dist/services/order.js.map +1 -1
- package/dist/services/payment-provider.js +23 -17
- package/dist/services/payment-provider.js.map +1 -1
- package/dist/services/product-variant.d.ts +26 -9
- package/dist/services/product-variant.js +222 -76
- package/dist/services/product-variant.js.map +1 -1
- package/dist/services/product.d.ts +22 -4
- package/dist/services/product.js +236 -48
- package/dist/services/product.js.map +1 -1
- package/dist/services/region.js +8 -4
- package/dist/services/region.js.map +1 -1
- package/dist/services/return.js +0 -1
- package/dist/services/return.js.map +1 -1
- package/dist/services/shipping-option.d.ts +2 -2
- package/dist/services/shipping-option.js +7 -4
- package/dist/services/shipping-option.js.map +1 -1
- package/dist/services/swap.d.ts +4 -1
- package/dist/services/swap.js +29 -16
- package/dist/services/swap.js.map +1 -1
- package/dist/services/system-tax.d.ts +2 -3
- package/dist/services/system-tax.js +2 -2
- package/dist/services/system-tax.js.map +1 -1
- package/dist/services/tax-provider.d.ts +2 -0
- package/dist/services/tax-provider.js +96 -7
- package/dist/services/tax-provider.js.map +1 -1
- package/dist/services/tax-rate.d.ts +3 -3
- package/dist/services/tax-rate.js +1 -1
- package/dist/services/tax-rate.js.map +1 -1
- package/dist/services/totals.d.ts +9 -8
- package/dist/services/totals.js +41 -88
- package/dist/services/totals.js.map +1 -1
- package/dist/strategies/price-selection.d.ts +13 -0
- package/dist/strategies/price-selection.js +185 -0
- package/dist/strategies/price-selection.js.map +1 -0
- package/dist/subscribers/order.js +1 -7
- package/dist/subscribers/order.js.map +1 -1
- package/dist/types/batch-job.d.ts +6 -0
- package/dist/types/batch-job.js +11 -0
- package/dist/types/batch-job.js.map +1 -0
- package/dist/types/common.d.ts +1 -3
- package/dist/types/discount.d.ts +69 -1
- package/dist/types/discount.js +129 -5
- package/dist/types/discount.js.map +1 -1
- package/dist/types/global.d.ts +34 -0
- package/dist/types/global.js +3 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/line-item-adjustment.d.ts +9 -0
- package/dist/types/line-item-adjustment.js +50 -0
- package/dist/types/line-item-adjustment.js.map +1 -0
- package/dist/types/price-selection.d.ts +5 -0
- package/dist/types/price-selection.js +35 -0
- package/dist/types/price-selection.js.map +1 -0
- package/dist/types/product-variant.d.ts +6 -0
- package/dist/types/product-variant.js.map +1 -1
- package/dist/types/product.d.ts +16 -0
- package/dist/types/product.js +86 -1
- package/dist/types/product.js.map +1 -1
- package/dist/types/validators/exactly-one.d.ts +6 -0
- package/dist/types/validators/exactly-one.js +37 -0
- package/dist/types/validators/exactly-one.js.map +1 -0
- package/dist/utils/date-helpers.d.ts +2 -0
- package/dist/utils/date-helpers.js +15 -0
- package/dist/utils/date-helpers.js.map +1 -0
- package/dist/utils/get-query-config.d.ts +11 -0
- package/dist/utils/get-query-config.js +88 -0
- package/dist/utils/get-query-config.js.map +1 -0
- package/package.json +7 -8
- package/dist/api/routes/admin/discounts/add-valid-product.d.ts +0 -23
- package/dist/api/routes/admin/discounts/add-valid-product.js.map +0 -1
- package/dist/api/routes/admin/discounts/remove-valid-product.d.ts +0 -23
- package/dist/api/routes/admin/discounts/remove-valid-product.js.map +0 -1
- package/dist/api/routes/store/carts/update-payment-method.d.ts +0 -38
- package/dist/api/routes/store/carts/update-payment-method.js +0 -122
- package/dist/api/routes/store/carts/update-payment-method.js.map +0 -1
- package/dist/config/index.d.ts +0 -14
- package/dist/config/index.js +0 -40
- package/dist/config/index.js.map +0 -1
- package/yarn-error.log +0 -6769
|
@@ -0,0 +1,84 @@
|
|
|
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.DiscountConditionProductTag = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
15
|
+
var discount_condition_1 = require("./discount-condition");
|
|
16
|
+
var product_tag_1 = require("./product-tag");
|
|
17
|
+
var DiscountConditionProductTag = /** @class */ (function () {
|
|
18
|
+
function DiscountConditionProductTag() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DiscountConditionProductTag.prototype, "product_tag_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], DiscountConditionProductTag.prototype, "condition_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return product_tag_1.ProductTag; }, { onDelete: "CASCADE" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "product_tag_id" }),
|
|
31
|
+
__metadata("design:type", product_tag_1.ProductTag)
|
|
32
|
+
], DiscountConditionProductTag.prototype, "product_tag", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return discount_condition_1.DiscountCondition; }, { onDelete: "CASCADE" }),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "condition_id" }),
|
|
36
|
+
__metadata("design:type", discount_condition_1.DiscountCondition)
|
|
37
|
+
], DiscountConditionProductTag.prototype, "discount_condition", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.CreateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], DiscountConditionProductTag.prototype, "created_at", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], DiscountConditionProductTag.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], DiscountConditionProductTag.prototype, "metadata", void 0);
|
|
50
|
+
DiscountConditionProductTag = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], DiscountConditionProductTag);
|
|
53
|
+
return DiscountConditionProductTag;
|
|
54
|
+
}());
|
|
55
|
+
exports.DiscountConditionProductTag = DiscountConditionProductTag;
|
|
56
|
+
/**
|
|
57
|
+
* @schema discount_condition_product_tag
|
|
58
|
+
* title: "Product Tag Discount Condition"
|
|
59
|
+
* description: "Associates a discount condition with a product tag"
|
|
60
|
+
* x-resourceId: discount_condition_product_tag
|
|
61
|
+
* properties:
|
|
62
|
+
* product_tag_id:
|
|
63
|
+
* description: "The id of the Product Tag"
|
|
64
|
+
* type: string
|
|
65
|
+
* condition_id:
|
|
66
|
+
* description: "The id of the Discount Condition"
|
|
67
|
+
* type: string
|
|
68
|
+
* created_at:
|
|
69
|
+
* description: "The date with timezone at which the resource was created."
|
|
70
|
+
* type: string
|
|
71
|
+
* format: date-time
|
|
72
|
+
* updated_at:
|
|
73
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
74
|
+
* type: string
|
|
75
|
+
* format: date-time
|
|
76
|
+
* deleted_at:
|
|
77
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
78
|
+
* type: string
|
|
79
|
+
* format: date-time
|
|
80
|
+
* metadata:
|
|
81
|
+
* description: "An optional key-value map with additional information."
|
|
82
|
+
* type: object
|
|
83
|
+
*/
|
|
84
|
+
//# sourceMappingURL=discount-condition-product-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition-product-tag.js","sourceRoot":"","sources":["../../src/models/discount-condition-product-tag.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,4DAAuE;AACvE,2DAAwD;AACxD,6CAA0C;AAG1C;IAAA;IAuBA,CAAC;IArBC;QADC,IAAA,uBAAa,GAAE;;uEACM;IAGtB;QADC,IAAA,uBAAa,GAAE;;qEACI;IAIpB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,wBAAU,EAAV,CAAU,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACpD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;kCACzB,wBAAU;oEAAA;IAIxB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,sCAAiB,EAAjB,CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QAC3D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;kCAChB,sCAAiB;2EAAA;IAGtC;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;mEAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;mEAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACpC;IAtBF,2BAA2B;QADvC,IAAA,gBAAM,GAAE;OACI,2BAA2B,CAuBvC;IAAD,kCAAC;CAAA,AAvBD,IAuBC;AAvBY,kEAA2B;AAyBxC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DiscountCondition } from "./discount-condition";
|
|
2
|
+
import { ProductType } from "./product-type";
|
|
3
|
+
export declare class DiscountConditionProductType {
|
|
4
|
+
product_type_id: string;
|
|
5
|
+
condition_id: string;
|
|
6
|
+
product_type?: ProductType;
|
|
7
|
+
discount_condition?: DiscountCondition;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
metadata: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @schema discount_condition_product_type
|
|
14
|
+
* title: "Product Type Discount Condition"
|
|
15
|
+
* description: "Associates a discount condition with a product type"
|
|
16
|
+
* x-resourceId: discount_condition_product
|
|
17
|
+
* properties:
|
|
18
|
+
* product_type_id:
|
|
19
|
+
* description: "The id of the Product Type"
|
|
20
|
+
* type: string
|
|
21
|
+
* condition_id:
|
|
22
|
+
* description: "The id of the Discount Condition"
|
|
23
|
+
* type: string
|
|
24
|
+
* created_at:
|
|
25
|
+
* description: "The date with timezone at which the resource was created."
|
|
26
|
+
* type: string
|
|
27
|
+
* format: date-time
|
|
28
|
+
* updated_at:
|
|
29
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
30
|
+
* type: string
|
|
31
|
+
* format: date-time
|
|
32
|
+
* deleted_at:
|
|
33
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
34
|
+
* type: string
|
|
35
|
+
* format: date-time
|
|
36
|
+
* metadata:
|
|
37
|
+
* description: "An optional key-value map with additional information."
|
|
38
|
+
* type: object
|
|
39
|
+
*/
|
|
@@ -0,0 +1,84 @@
|
|
|
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.DiscountConditionProductType = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
15
|
+
var discount_condition_1 = require("./discount-condition");
|
|
16
|
+
var product_type_1 = require("./product-type");
|
|
17
|
+
var DiscountConditionProductType = /** @class */ (function () {
|
|
18
|
+
function DiscountConditionProductType() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DiscountConditionProductType.prototype, "product_type_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], DiscountConditionProductType.prototype, "condition_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return product_type_1.ProductType; }, { onDelete: "CASCADE" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "product_type_id" }),
|
|
31
|
+
__metadata("design:type", product_type_1.ProductType)
|
|
32
|
+
], DiscountConditionProductType.prototype, "product_type", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return discount_condition_1.DiscountCondition; }, { onDelete: "CASCADE" }),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "condition_id" }),
|
|
36
|
+
__metadata("design:type", discount_condition_1.DiscountCondition)
|
|
37
|
+
], DiscountConditionProductType.prototype, "discount_condition", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.CreateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], DiscountConditionProductType.prototype, "created_at", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], DiscountConditionProductType.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], DiscountConditionProductType.prototype, "metadata", void 0);
|
|
50
|
+
DiscountConditionProductType = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], DiscountConditionProductType);
|
|
53
|
+
return DiscountConditionProductType;
|
|
54
|
+
}());
|
|
55
|
+
exports.DiscountConditionProductType = DiscountConditionProductType;
|
|
56
|
+
/**
|
|
57
|
+
* @schema discount_condition_product_type
|
|
58
|
+
* title: "Product Type Discount Condition"
|
|
59
|
+
* description: "Associates a discount condition with a product type"
|
|
60
|
+
* x-resourceId: discount_condition_product
|
|
61
|
+
* properties:
|
|
62
|
+
* product_type_id:
|
|
63
|
+
* description: "The id of the Product Type"
|
|
64
|
+
* type: string
|
|
65
|
+
* condition_id:
|
|
66
|
+
* description: "The id of the Discount Condition"
|
|
67
|
+
* type: string
|
|
68
|
+
* created_at:
|
|
69
|
+
* description: "The date with timezone at which the resource was created."
|
|
70
|
+
* type: string
|
|
71
|
+
* format: date-time
|
|
72
|
+
* updated_at:
|
|
73
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
74
|
+
* type: string
|
|
75
|
+
* format: date-time
|
|
76
|
+
* deleted_at:
|
|
77
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
78
|
+
* type: string
|
|
79
|
+
* format: date-time
|
|
80
|
+
* metadata:
|
|
81
|
+
* description: "An optional key-value map with additional information."
|
|
82
|
+
* type: object
|
|
83
|
+
*/
|
|
84
|
+
//# sourceMappingURL=discount-condition-product-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition-product-type.js","sourceRoot":"","sources":["../../src/models/discount-condition-product-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,4DAAuE;AACvE,2DAAwD;AACxD,+CAA4C;AAG5C;IAAA;IAuBA,CAAC;IArBC;QADC,IAAA,uBAAa,GAAE;;yEACO;IAGvB;QADC,IAAA,uBAAa,GAAE;;sEACI;IAIpB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,0BAAW,EAAX,CAAW,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACrD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;kCACzB,0BAAW;sEAAA;IAI1B;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,sCAAiB,EAAjB,CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QAC3D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;kCAChB,sCAAiB;4EAAA;IAGtC;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;oEAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;oEAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACpC;IAtBF,4BAA4B;QADxC,IAAA,gBAAM,GAAE;OACI,4BAA4B,CAuBxC;IAAD,mCAAC;CAAA,AAvBD,IAuBC;AAvBY,oEAA4B;AAyBzC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DiscountCondition } from "./discount-condition";
|
|
2
|
+
import { Product } from "./product";
|
|
3
|
+
export declare class DiscountConditionProduct {
|
|
4
|
+
product_id: string;
|
|
5
|
+
condition_id: string;
|
|
6
|
+
product?: Product;
|
|
7
|
+
discount_condition?: DiscountCondition;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
metadata: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @schema discount_condition_product
|
|
14
|
+
* title: "Product Discount Condition"
|
|
15
|
+
* description: "Associates a discount condition with a product"
|
|
16
|
+
* x-resourceId: discount_condition_product
|
|
17
|
+
* properties:
|
|
18
|
+
* product_id:
|
|
19
|
+
* description: "The id of the Product"
|
|
20
|
+
* type: string
|
|
21
|
+
* condition_id:
|
|
22
|
+
* description: "The id of the Discount Condition"
|
|
23
|
+
* type: string
|
|
24
|
+
* created_at:
|
|
25
|
+
* description: "The date with timezone at which the resource was created."
|
|
26
|
+
* type: string
|
|
27
|
+
* format: date-time
|
|
28
|
+
* updated_at:
|
|
29
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
30
|
+
* type: string
|
|
31
|
+
* format: date-time
|
|
32
|
+
* deleted_at:
|
|
33
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
34
|
+
* type: string
|
|
35
|
+
* format: date-time
|
|
36
|
+
* metadata:
|
|
37
|
+
* description: "An optional key-value map with additional information."
|
|
38
|
+
* type: object
|
|
39
|
+
*/
|
|
@@ -0,0 +1,84 @@
|
|
|
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.DiscountConditionProduct = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
15
|
+
var discount_condition_1 = require("./discount-condition");
|
|
16
|
+
var product_1 = require("./product");
|
|
17
|
+
var DiscountConditionProduct = /** @class */ (function () {
|
|
18
|
+
function DiscountConditionProduct() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DiscountConditionProduct.prototype, "product_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], DiscountConditionProduct.prototype, "condition_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return product_1.Product; }, { onDelete: "CASCADE" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id" }),
|
|
31
|
+
__metadata("design:type", product_1.Product)
|
|
32
|
+
], DiscountConditionProduct.prototype, "product", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return discount_condition_1.DiscountCondition; }, { onDelete: "CASCADE" }),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "condition_id" }),
|
|
36
|
+
__metadata("design:type", discount_condition_1.DiscountCondition)
|
|
37
|
+
], DiscountConditionProduct.prototype, "discount_condition", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.CreateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], DiscountConditionProduct.prototype, "created_at", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], DiscountConditionProduct.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], DiscountConditionProduct.prototype, "metadata", void 0);
|
|
50
|
+
DiscountConditionProduct = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], DiscountConditionProduct);
|
|
53
|
+
return DiscountConditionProduct;
|
|
54
|
+
}());
|
|
55
|
+
exports.DiscountConditionProduct = DiscountConditionProduct;
|
|
56
|
+
/**
|
|
57
|
+
* @schema discount_condition_product
|
|
58
|
+
* title: "Product Discount Condition"
|
|
59
|
+
* description: "Associates a discount condition with a product"
|
|
60
|
+
* x-resourceId: discount_condition_product
|
|
61
|
+
* properties:
|
|
62
|
+
* product_id:
|
|
63
|
+
* description: "The id of the Product"
|
|
64
|
+
* type: string
|
|
65
|
+
* condition_id:
|
|
66
|
+
* description: "The id of the Discount Condition"
|
|
67
|
+
* type: string
|
|
68
|
+
* created_at:
|
|
69
|
+
* description: "The date with timezone at which the resource was created."
|
|
70
|
+
* type: string
|
|
71
|
+
* format: date-time
|
|
72
|
+
* updated_at:
|
|
73
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
74
|
+
* type: string
|
|
75
|
+
* format: date-time
|
|
76
|
+
* deleted_at:
|
|
77
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
78
|
+
* type: string
|
|
79
|
+
* format: date-time
|
|
80
|
+
* metadata:
|
|
81
|
+
* description: "An optional key-value map with additional information."
|
|
82
|
+
* type: object
|
|
83
|
+
*/
|
|
84
|
+
//# sourceMappingURL=discount-condition-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition-product.js","sourceRoot":"","sources":["../../src/models/discount-condition-product.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,4DAAuE;AACvE,2DAAwD;AACxD,qCAAmC;AAGnC;IAAA;IAuBA,CAAC;IArBC;QADC,IAAA,uBAAa,GAAE;;gEACE;IAGlB;QADC,IAAA,uBAAa,GAAE;;kEACI;IAIpB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,iBAAO,EAAP,CAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACjD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;kCACzB,iBAAO;6DAAA;IAIjB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,sCAAiB,EAAjB,CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QAC3D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;kCAChB,sCAAiB;wEAAA;IAGtC;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;gEAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;gEAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACpC;IAtBF,wBAAwB;QADpC,IAAA,gBAAM,GAAE;OACI,wBAAwB,CAuBpC;IAAD,+BAAC;CAAA,AAvBD,IAuBC;AAvBY,4DAAwB;AAyBrC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CustomerGroup } from "./customer-group";
|
|
2
|
+
import { DiscountRule } from "./discount-rule";
|
|
3
|
+
import { Product } from "./product";
|
|
4
|
+
import { ProductCollection } from "./product-collection";
|
|
5
|
+
import { ProductTag } from "./product-tag";
|
|
6
|
+
import { ProductType } from "./product-type";
|
|
7
|
+
export declare enum DiscountConditionType {
|
|
8
|
+
PRODUCTS = "products",
|
|
9
|
+
PRODUCT_TYPES = "product_types",
|
|
10
|
+
PRODUCT_COLLECTIONS = "product_collections",
|
|
11
|
+
PRODUCT_TAGS = "product_tags",
|
|
12
|
+
CUSTOMER_GROUPS = "customer_groups"
|
|
13
|
+
}
|
|
14
|
+
export declare enum DiscountConditionOperator {
|
|
15
|
+
IN = "in",
|
|
16
|
+
NOT_IN = "not_in"
|
|
17
|
+
}
|
|
18
|
+
export declare class DiscountCondition {
|
|
19
|
+
id: string;
|
|
20
|
+
type: DiscountConditionType;
|
|
21
|
+
operator: DiscountConditionOperator;
|
|
22
|
+
discount_rule_id: string;
|
|
23
|
+
discount_rule: DiscountRule;
|
|
24
|
+
products: Product[];
|
|
25
|
+
product_types: ProductType[];
|
|
26
|
+
product_tags: ProductTag[];
|
|
27
|
+
product_collections: ProductCollection[];
|
|
28
|
+
customer_groups: CustomerGroup[];
|
|
29
|
+
created_at: Date;
|
|
30
|
+
updated_at: Date;
|
|
31
|
+
deleted_at: Date;
|
|
32
|
+
metadata: any;
|
|
33
|
+
private beforeInsert;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @schema discount_condition
|
|
37
|
+
* title: "Discount Condition"
|
|
38
|
+
* description: "Holds rule conditions for when a discount is applicable"
|
|
39
|
+
* x-resourceId: discount_condition
|
|
40
|
+
* properties:
|
|
41
|
+
* id:
|
|
42
|
+
* description: "The id of the Discount Condition. Will be prefixed by `discon_`."
|
|
43
|
+
* type: string
|
|
44
|
+
* type:
|
|
45
|
+
* description: "The type of the Condition"
|
|
46
|
+
* type: string
|
|
47
|
+
* enum:
|
|
48
|
+
* - products
|
|
49
|
+
* - product_types
|
|
50
|
+
* - product_collections
|
|
51
|
+
* - product_tags
|
|
52
|
+
* - customer_groups
|
|
53
|
+
* created_at:
|
|
54
|
+
* description: "The date with timezone at which the resource was created."
|
|
55
|
+
* type: string
|
|
56
|
+
* format: date-time
|
|
57
|
+
* update_at:
|
|
58
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
59
|
+
* type: string
|
|
60
|
+
* format: date-time
|
|
61
|
+
* deleted_at:
|
|
62
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
63
|
+
* type: string
|
|
64
|
+
* format: date-time
|
|
65
|
+
* metadata:
|
|
66
|
+
* description: "An optional key-value map with additional information."
|
|
67
|
+
* type: object
|
|
68
|
+
*/
|
|
@@ -0,0 +1,208 @@
|
|
|
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.DiscountCondition = exports.DiscountConditionOperator = exports.DiscountConditionType = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var ulid_1 = require("ulid");
|
|
15
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
16
|
+
var customer_group_1 = require("./customer-group");
|
|
17
|
+
var discount_rule_1 = require("./discount-rule");
|
|
18
|
+
var product_1 = require("./product");
|
|
19
|
+
var product_collection_1 = require("./product-collection");
|
|
20
|
+
var product_tag_1 = require("./product-tag");
|
|
21
|
+
var product_type_1 = require("./product-type");
|
|
22
|
+
var DiscountConditionType;
|
|
23
|
+
(function (DiscountConditionType) {
|
|
24
|
+
DiscountConditionType["PRODUCTS"] = "products";
|
|
25
|
+
DiscountConditionType["PRODUCT_TYPES"] = "product_types";
|
|
26
|
+
DiscountConditionType["PRODUCT_COLLECTIONS"] = "product_collections";
|
|
27
|
+
DiscountConditionType["PRODUCT_TAGS"] = "product_tags";
|
|
28
|
+
DiscountConditionType["CUSTOMER_GROUPS"] = "customer_groups";
|
|
29
|
+
})(DiscountConditionType = exports.DiscountConditionType || (exports.DiscountConditionType = {}));
|
|
30
|
+
var DiscountConditionOperator;
|
|
31
|
+
(function (DiscountConditionOperator) {
|
|
32
|
+
DiscountConditionOperator["IN"] = "in";
|
|
33
|
+
DiscountConditionOperator["NOT_IN"] = "not_in";
|
|
34
|
+
})(DiscountConditionOperator = exports.DiscountConditionOperator || (exports.DiscountConditionOperator = {}));
|
|
35
|
+
var DiscountCondition = /** @class */ (function () {
|
|
36
|
+
function DiscountCondition() {
|
|
37
|
+
}
|
|
38
|
+
DiscountCondition.prototype.beforeInsert = function () {
|
|
39
|
+
var id = (0, ulid_1.ulid)();
|
|
40
|
+
this.id = "discon_".concat(id);
|
|
41
|
+
};
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], DiscountCondition.prototype, "id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({
|
|
48
|
+
type: "enum",
|
|
49
|
+
enum: DiscountConditionType,
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DiscountCondition.prototype, "type", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, db_aware_column_1.DbAwareColumn)({
|
|
55
|
+
type: "enum",
|
|
56
|
+
enum: DiscountConditionOperator,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], DiscountCondition.prototype, "operator", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Index)(),
|
|
62
|
+
(0, typeorm_1.Column)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], DiscountCondition.prototype, "discount_rule_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.ManyToOne)(function () { return discount_rule_1.DiscountRule; }, function (dr) { return dr.conditions; }),
|
|
67
|
+
(0, typeorm_1.JoinColumn)({ name: "discount_rule_id" }),
|
|
68
|
+
__metadata("design:type", discount_rule_1.DiscountRule)
|
|
69
|
+
], DiscountCondition.prototype, "discount_rule", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToMany)(function () { return product_1.Product; }),
|
|
72
|
+
(0, typeorm_1.JoinTable)({
|
|
73
|
+
name: "discount_condition_product",
|
|
74
|
+
joinColumn: {
|
|
75
|
+
name: "condition_id",
|
|
76
|
+
referencedColumnName: "id",
|
|
77
|
+
},
|
|
78
|
+
inverseJoinColumn: {
|
|
79
|
+
name: "product_id",
|
|
80
|
+
referencedColumnName: "id",
|
|
81
|
+
},
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Array)
|
|
84
|
+
], DiscountCondition.prototype, "products", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.ManyToMany)(function () { return product_type_1.ProductType; }),
|
|
87
|
+
(0, typeorm_1.JoinTable)({
|
|
88
|
+
name: "discount_condition_product_type",
|
|
89
|
+
joinColumn: {
|
|
90
|
+
name: "condition_id",
|
|
91
|
+
referencedColumnName: "id",
|
|
92
|
+
},
|
|
93
|
+
inverseJoinColumn: {
|
|
94
|
+
name: "product_type_id",
|
|
95
|
+
referencedColumnName: "id",
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], DiscountCondition.prototype, "product_types", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.ManyToMany)(function () { return product_tag_1.ProductTag; }),
|
|
102
|
+
(0, typeorm_1.JoinTable)({
|
|
103
|
+
name: "discount_condition_product_tag",
|
|
104
|
+
joinColumn: {
|
|
105
|
+
name: "condition_id",
|
|
106
|
+
referencedColumnName: "id",
|
|
107
|
+
},
|
|
108
|
+
inverseJoinColumn: {
|
|
109
|
+
name: "product_tag_id",
|
|
110
|
+
referencedColumnName: "id",
|
|
111
|
+
},
|
|
112
|
+
}),
|
|
113
|
+
__metadata("design:type", Array)
|
|
114
|
+
], DiscountCondition.prototype, "product_tags", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.ManyToMany)(function () { return product_collection_1.ProductCollection; }),
|
|
117
|
+
(0, typeorm_1.JoinTable)({
|
|
118
|
+
name: "discount_condition_product_collection",
|
|
119
|
+
joinColumn: {
|
|
120
|
+
name: "condition_id",
|
|
121
|
+
referencedColumnName: "id",
|
|
122
|
+
},
|
|
123
|
+
inverseJoinColumn: {
|
|
124
|
+
name: "product_collection_id",
|
|
125
|
+
referencedColumnName: "id",
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
__metadata("design:type", Array)
|
|
129
|
+
], DiscountCondition.prototype, "product_collections", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typeorm_1.ManyToMany)(function () { return customer_group_1.CustomerGroup; }),
|
|
132
|
+
(0, typeorm_1.JoinTable)({
|
|
133
|
+
name: "discount_condition_customer_group",
|
|
134
|
+
joinColumn: {
|
|
135
|
+
name: "condition_id",
|
|
136
|
+
referencedColumnName: "id",
|
|
137
|
+
},
|
|
138
|
+
inverseJoinColumn: {
|
|
139
|
+
name: "customer_group_id",
|
|
140
|
+
referencedColumnName: "id",
|
|
141
|
+
},
|
|
142
|
+
}),
|
|
143
|
+
__metadata("design:type", Array)
|
|
144
|
+
], DiscountCondition.prototype, "customer_groups", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, typeorm_1.CreateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
147
|
+
__metadata("design:type", Date)
|
|
148
|
+
], DiscountCondition.prototype, "created_at", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, typeorm_1.UpdateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
151
|
+
__metadata("design:type", Date)
|
|
152
|
+
], DiscountCondition.prototype, "updated_at", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, typeorm_1.DeleteDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
155
|
+
__metadata("design:type", Date)
|
|
156
|
+
], DiscountCondition.prototype, "deleted_at", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
159
|
+
__metadata("design:type", Object)
|
|
160
|
+
], DiscountCondition.prototype, "metadata", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
163
|
+
__metadata("design:type", Function),
|
|
164
|
+
__metadata("design:paramtypes", []),
|
|
165
|
+
__metadata("design:returntype", void 0)
|
|
166
|
+
], DiscountCondition.prototype, "beforeInsert", null);
|
|
167
|
+
DiscountCondition = __decorate([
|
|
168
|
+
(0, typeorm_1.Entity)(),
|
|
169
|
+
(0, typeorm_1.Unique)("dctypeuniq", ["type", "operator", "discount_rule_id"])
|
|
170
|
+
], DiscountCondition);
|
|
171
|
+
return DiscountCondition;
|
|
172
|
+
}());
|
|
173
|
+
exports.DiscountCondition = DiscountCondition;
|
|
174
|
+
/**
|
|
175
|
+
* @schema discount_condition
|
|
176
|
+
* title: "Discount Condition"
|
|
177
|
+
* description: "Holds rule conditions for when a discount is applicable"
|
|
178
|
+
* x-resourceId: discount_condition
|
|
179
|
+
* properties:
|
|
180
|
+
* id:
|
|
181
|
+
* description: "The id of the Discount Condition. Will be prefixed by `discon_`."
|
|
182
|
+
* type: string
|
|
183
|
+
* type:
|
|
184
|
+
* description: "The type of the Condition"
|
|
185
|
+
* type: string
|
|
186
|
+
* enum:
|
|
187
|
+
* - products
|
|
188
|
+
* - product_types
|
|
189
|
+
* - product_collections
|
|
190
|
+
* - product_tags
|
|
191
|
+
* - customer_groups
|
|
192
|
+
* created_at:
|
|
193
|
+
* description: "The date with timezone at which the resource was created."
|
|
194
|
+
* type: string
|
|
195
|
+
* format: date-time
|
|
196
|
+
* update_at:
|
|
197
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
198
|
+
* type: string
|
|
199
|
+
* format: date-time
|
|
200
|
+
* deleted_at:
|
|
201
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
202
|
+
* type: string
|
|
203
|
+
* format: date-time
|
|
204
|
+
* metadata:
|
|
205
|
+
* description: "An optional key-value map with additional information."
|
|
206
|
+
* type: object
|
|
207
|
+
*/
|
|
208
|
+
//# sourceMappingURL=discount-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition.js","sourceRoot":"","sources":["../../src/models/discount-condition.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiscountCondition } from "./discount-condition";
|
|
2
2
|
export declare enum DiscountRuleType {
|
|
3
3
|
FIXED = "fixed",
|
|
4
4
|
PERCENTAGE = "percentage",
|
|
@@ -14,7 +14,7 @@ export declare class DiscountRule {
|
|
|
14
14
|
type: DiscountRuleType;
|
|
15
15
|
value: number;
|
|
16
16
|
allocation: AllocationType;
|
|
17
|
-
|
|
17
|
+
conditions: DiscountCondition[];
|
|
18
18
|
created_at: Date;
|
|
19
19
|
updated_at: Date;
|
|
20
20
|
deleted_at: Date;
|
|
@@ -49,11 +49,11 @@ export declare class DiscountRule {
|
|
|
49
49
|
* enum:
|
|
50
50
|
* - total
|
|
51
51
|
* - item
|
|
52
|
-
*
|
|
53
|
-
* description: "A set of
|
|
52
|
+
* conditions:
|
|
53
|
+
* description: "A set of conditions that can be used to limit when the discount can be used"
|
|
54
54
|
* type: array
|
|
55
55
|
* items:
|
|
56
|
-
* $ref: "#/components/schemas/
|
|
56
|
+
* $ref: "#/components/schemas/discount_condition"
|
|
57
57
|
* created_at:
|
|
58
58
|
* description: "The date with timezone at which the resource was created."
|
|
59
59
|
* type: string
|