@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
|
@@ -36,47 +36,42 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return [2 /*return*/];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}); });
|
|
82
|
-
//# sourceMappingURL=add-valid-product.js.map
|
|
39
|
+
exports.addBatchJobModel1649775522087 = void 0;
|
|
40
|
+
var addBatchJobModel1649775522087 = /** @class */ (function () {
|
|
41
|
+
function addBatchJobModel1649775522087() {
|
|
42
|
+
this.name = "addBatchJobModel1649775522087";
|
|
43
|
+
}
|
|
44
|
+
addBatchJobModel1649775522087.prototype.up = function (queryRunner) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
46
|
+
return __generator(this, function (_a) {
|
|
47
|
+
switch (_a.label) {
|
|
48
|
+
case 0: return [4 /*yield*/, queryRunner.query("CREATE TYPE \"batch_job_status_enum\" AS ENUM('created', 'processing', 'awaiting_confirmation', 'completed')")];
|
|
49
|
+
case 1:
|
|
50
|
+
_a.sent();
|
|
51
|
+
return [4 /*yield*/, queryRunner.query("CREATE TABLE \"batch_job\" (\"id\" character varying NOT NULL, \"type\" text NOT NULL, \"status\" \"public\".\"batch_job_status_enum\" NOT NULL, \"created_by\" text, \"context\" jsonb, \"result\" jsonb, \"created_at\" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), \"updated_at\" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), \"deleted_at\" TIMESTAMP WITH TIME ZONE, CONSTRAINT \"PK_e57f84d485145d5be96bc6d871e\" PRIMARY KEY (\"id\"))")];
|
|
52
|
+
case 2:
|
|
53
|
+
_a.sent();
|
|
54
|
+
return [2 /*return*/];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
addBatchJobModel1649775522087.prototype.down = function (queryRunner) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
return __generator(this, function (_a) {
|
|
62
|
+
switch (_a.label) {
|
|
63
|
+
case 0: return [4 /*yield*/, queryRunner.query("DROP TABLE \"batch_job\"")];
|
|
64
|
+
case 1:
|
|
65
|
+
_a.sent();
|
|
66
|
+
return [4 /*yield*/, queryRunner.query("DROP TYPE \"batch_job_status_enum\"")];
|
|
67
|
+
case 2:
|
|
68
|
+
_a.sent();
|
|
69
|
+
return [2 /*return*/];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
return addBatchJobModel1649775522087;
|
|
75
|
+
}());
|
|
76
|
+
exports.addBatchJobModel1649775522087 = addBatchJobModel1649775522087;
|
|
77
|
+
//# sourceMappingURL=1649775522087-add_batch_job_model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1649775522087-add_batch_job_model.js","sourceRoot":"","sources":["../../src/migrations/1649775522087-add_batch_job_model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IAAA;QACE,SAAI,GAAG,+BAA+B,CAAA;IAexC,CAAC;IAbc,0CAAE,GAAf,UAAgB,WAAwB;;;;4BACtC,qBAAM,WAAW,CAAC,KAAK,CACrB,8GAA4G,CAC7G,EAAA;;wBAFD,SAEC,CAAA;wBACD,qBAAM,WAAW,CAAC,KAAK,CACrB,ybAA6Z,CAC9Z,EAAA;;wBAFD,SAEC,CAAA;;;;;KACF;IAEY,4CAAI,GAAjB,UAAkB,WAAwB;;;;4BACxC,qBAAM,WAAW,CAAC,KAAK,CAAC,0BAAwB,CAAC,EAAA;;wBAAjD,SAAiD,CAAA;wBACjD,qBAAM,WAAW,CAAC,KAAK,CAAC,qCAAmC,CAAC,EAAA;;wBAA5D,SAA4D,CAAA;;;;;KAC7D;IACH,oCAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,sEAA6B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BatchJobStatus } from "../types/batch-job";
|
|
2
|
+
export declare class BatchJob {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
status: BatchJobStatus;
|
|
6
|
+
created_by: string | null;
|
|
7
|
+
context: Record<string, unknown>;
|
|
8
|
+
result: Record<string, unknown>;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
11
|
+
deleted_at: Date | null;
|
|
12
|
+
private beforeInsert;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @schema batch_job
|
|
16
|
+
* title: "Batch Job"
|
|
17
|
+
* description: "A Batch Job."
|
|
18
|
+
* x-resourceId: batch_job
|
|
19
|
+
* properties:
|
|
20
|
+
* id:
|
|
21
|
+
* description: "The unique identifier for the batch job."
|
|
22
|
+
* type: string
|
|
23
|
+
* type:
|
|
24
|
+
* description: "The type of batch job."
|
|
25
|
+
* type: string
|
|
26
|
+
* enum:
|
|
27
|
+
* - product_import
|
|
28
|
+
* - product_export
|
|
29
|
+
* status:
|
|
30
|
+
* description: "The status of the batch job."
|
|
31
|
+
* type: string
|
|
32
|
+
* enum:
|
|
33
|
+
* - created
|
|
34
|
+
* - processing
|
|
35
|
+
* - awaiting_confirmation
|
|
36
|
+
* - completed
|
|
37
|
+
* created_by:
|
|
38
|
+
* description: "The unique identifier of the user that created the batch job."
|
|
39
|
+
* type: string
|
|
40
|
+
* context:
|
|
41
|
+
* description: "The context of the batch job, the type of the batch job determines what the context should contain."
|
|
42
|
+
* type: object
|
|
43
|
+
* result:
|
|
44
|
+
* description: "The result of the batch job."
|
|
45
|
+
* type: object
|
|
46
|
+
* created_at:
|
|
47
|
+
* description: "The date with timezone at which the resource was created."
|
|
48
|
+
* type: string
|
|
49
|
+
* format: date-time
|
|
50
|
+
* updated_at:
|
|
51
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
52
|
+
* type: string
|
|
53
|
+
* format: date-time
|
|
54
|
+
* deleted_at:
|
|
55
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
56
|
+
* type: string
|
|
57
|
+
* format: date-time
|
|
58
|
+
*/
|
|
@@ -0,0 +1,119 @@
|
|
|
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.BatchJob = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var ulid_1 = require("ulid");
|
|
15
|
+
var batch_job_1 = require("../types/batch-job");
|
|
16
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
17
|
+
var BatchJob = /** @class */ (function () {
|
|
18
|
+
function BatchJob() {
|
|
19
|
+
}
|
|
20
|
+
BatchJob.prototype.beforeInsert = function () {
|
|
21
|
+
if (this.id)
|
|
22
|
+
return;
|
|
23
|
+
var id = (0, ulid_1.ulid)();
|
|
24
|
+
this.id = "batch_".concat(id);
|
|
25
|
+
};
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BatchJob.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "text" }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], BatchJob.prototype, "type", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "enum", enum: batch_job_1.BatchJobStatus }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], BatchJob.prototype, "status", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], BatchJob.prototype, "created_by", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], BatchJob.prototype, "context", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], BatchJob.prototype, "result", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.CreateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
52
|
+
__metadata("design:type", Date)
|
|
53
|
+
], BatchJob.prototype, "created_at", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.UpdateDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], BatchJob.prototype, "updated_at", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.DeleteDateColumn)({ type: (0, db_aware_column_1.resolveDbType)("timestamptz") }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], BatchJob.prototype, "deleted_at", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
64
|
+
__metadata("design:type", Function),
|
|
65
|
+
__metadata("design:paramtypes", []),
|
|
66
|
+
__metadata("design:returntype", void 0)
|
|
67
|
+
], BatchJob.prototype, "beforeInsert", null);
|
|
68
|
+
BatchJob = __decorate([
|
|
69
|
+
(0, typeorm_1.Entity)()
|
|
70
|
+
], BatchJob);
|
|
71
|
+
return BatchJob;
|
|
72
|
+
}());
|
|
73
|
+
exports.BatchJob = BatchJob;
|
|
74
|
+
/**
|
|
75
|
+
* @schema batch_job
|
|
76
|
+
* title: "Batch Job"
|
|
77
|
+
* description: "A Batch Job."
|
|
78
|
+
* x-resourceId: batch_job
|
|
79
|
+
* properties:
|
|
80
|
+
* id:
|
|
81
|
+
* description: "The unique identifier for the batch job."
|
|
82
|
+
* type: string
|
|
83
|
+
* type:
|
|
84
|
+
* description: "The type of batch job."
|
|
85
|
+
* type: string
|
|
86
|
+
* enum:
|
|
87
|
+
* - product_import
|
|
88
|
+
* - product_export
|
|
89
|
+
* status:
|
|
90
|
+
* description: "The status of the batch job."
|
|
91
|
+
* type: string
|
|
92
|
+
* enum:
|
|
93
|
+
* - created
|
|
94
|
+
* - processing
|
|
95
|
+
* - awaiting_confirmation
|
|
96
|
+
* - completed
|
|
97
|
+
* created_by:
|
|
98
|
+
* description: "The unique identifier of the user that created the batch job."
|
|
99
|
+
* type: string
|
|
100
|
+
* context:
|
|
101
|
+
* description: "The context of the batch job, the type of the batch job determines what the context should contain."
|
|
102
|
+
* type: object
|
|
103
|
+
* result:
|
|
104
|
+
* description: "The result of the batch job."
|
|
105
|
+
* type: object
|
|
106
|
+
* created_at:
|
|
107
|
+
* description: "The date with timezone at which the resource was created."
|
|
108
|
+
* type: string
|
|
109
|
+
* format: date-time
|
|
110
|
+
* updated_at:
|
|
111
|
+
* description: "The date with timezone at which the resource was last updated."
|
|
112
|
+
* type: string
|
|
113
|
+
* format: date-time
|
|
114
|
+
* deleted_at:
|
|
115
|
+
* description: "The date with timezone at which the resource was deleted."
|
|
116
|
+
* type: string
|
|
117
|
+
* format: date-time
|
|
118
|
+
*/
|
|
119
|
+
//# sourceMappingURL=batch-job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-job.js","sourceRoot":"","sources":["../../src/models/batch-job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAQgB;AAChB,6BAA2B;AAC3B,gDAAmD;AACnD,4DAAuE;AAGvE;IAAA;IAkCA,CAAC;IALS,+BAAY,GAApB;QACE,IAAI,IAAI,CAAC,EAAE;YAAE,OAAM;QACnB,IAAM,EAAE,GAAG,IAAA,WAAI,GAAE,CAAA;QACjB,IAAI,CAAC,EAAE,GAAG,gBAAS,EAAE,CAAE,CAAA;IACzB,CAAC;IA/BD;QADC,IAAA,uBAAa,GAAE;;wCACN;IAGV;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACpB;IAGZ;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAAc,EAAE,CAAC;;4CAChC;IAGtB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAChB;IAGzB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACjB;IAGhC;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAClB;IAG/B;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;gDAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;gDAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;;gDAClC;IAGvB;QADC,IAAA,sBAAY,GAAE;;;;gDAKd;IAjCU,QAAQ;QADpB,IAAA,gBAAM,GAAE;OACI,QAAQ,CAkCpB;IAAD,eAAC;CAAA,AAlCD,IAkCC;AAlCY,4BAAQ;AAoCrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG"}
|
package/dist/models/country.d.ts
CHANGED
package/dist/models/country.js
CHANGED
|
@@ -43,7 +43,7 @@ var Country = /** @class */ (function () {
|
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, typeorm_1.Index)(),
|
|
45
45
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
46
|
-
__metadata("design:type",
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
47
|
], Country.prototype, "region_id", void 0);
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, typeorm_1.ManyToOne)(function () { return region_1.Region; }, function (r) { return r.countries; }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country.js","sourceRoot":"","sources":["../../src/models/country.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;
|
|
1
|
+
{"version":3,"file":"country.js","sourceRoot":"","sources":["../../src/models/country.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,mCAAiC;AAGjC;IAAA;IA2BA,CAAC;IAzBC;QADC,IAAA,gCAAsB,GAAE;;uCACf;IAIV;QAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACvB,IAAA,gBAAM,GAAE;;0CACI;IAGb;QADC,IAAA,gBAAM,GAAE;;0CACI;IAGb;QADC,IAAA,gBAAM,GAAE;;6CACO;IAGhB;QADC,IAAA,gBAAM,GAAE;;yCACG;IAGZ;QADC,IAAA,gBAAM,GAAE;;iDACW;IAIpB;QAFC,IAAA,eAAK,GAAE;QACP,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACH;IAIxB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,eAAM,EAAN,CAAM,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,SAAS,EAAX,CAAW,CAAC;QAC3C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;kCAC1B,eAAM;2CAAA;IA1BH,OAAO;QADnB,IAAA,gBAAM,GAAE;OACI,OAAO,CA2BnB;IAAD,cAAC;CAAA,AA3BD,IA2BC;AA3BY,0BAAO;AA6BpB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
|
|
@@ -41,7 +41,9 @@ var CustomerGroup = /** @class */ (function () {
|
|
|
41
41
|
__metadata("design:type", Array)
|
|
42
42
|
], CustomerGroup.prototype, "customers", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
(0, typeorm_1.ManyToMany)(function () { return price_list_1.PriceList; }, function (priceList) { return priceList.customer_groups; }, {
|
|
44
|
+
(0, typeorm_1.ManyToMany)(function () { return price_list_1.PriceList; }, function (priceList) { return priceList.customer_groups; }, {
|
|
45
|
+
onDelete: "CASCADE",
|
|
46
|
+
}),
|
|
45
47
|
__metadata("design:type", Array)
|
|
46
48
|
], CustomerGroup.prototype, "price_lists", void 0);
|
|
47
49
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-group.js","sourceRoot":"","sources":["../../src/models/customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAUgB;AAChB,6BAA2B;AAC3B,4DAAuE;AACvE,uCAAqC;AACrC,2CAAwC;AAGxC;IAAA;
|
|
1
|
+
{"version":3,"file":"customer-group.js","sourceRoot":"","sources":["../../src/models/customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAUgB;AAChB,6BAA2B;AAC3B,4DAAuE;AACvE,uCAAqC;AACrC,2CAAwC;AAGxC;IAAA;IAsCA,CAAC;IAPS,oCAAY,GAApB;QACE,IAAI,IAAI,CAAC,EAAE,EAAE;YACX,OAAM;SACP;QACD,IAAM,EAAE,GAAG,IAAA,WAAI,GAAE,CAAA;QACjB,IAAI,CAAC,EAAE,GAAG,eAAQ,EAAE,CAAE,CAAA;IACxB,CAAC;IAnCD;QADC,IAAA,uBAAa,GAAE;;6CACN;IAIV;QAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;QACpD,IAAA,gBAAM,GAAE;;+CACG;IAKZ;QAHC,IAAA,oBAAU,EAAC,cAAM,OAAA,mBAAQ,EAAR,CAAQ,EAAE,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,MAAM,EAAf,CAAe,EAAE;YACzD,QAAQ,EAAE,SAAS;SACpB,CAAC;;oDACmB;IAKrB;QAHC,IAAA,oBAAU,EAAC,cAAM,OAAA,sBAAS,EAAT,CAAS,EAAE,UAAC,SAAS,IAAK,OAAA,SAAS,CAAC,eAAe,EAAzB,CAAyB,EAAE;YACrE,QAAQ,EAAE,SAAS;SACpB,CAAC;;sDACsB;IAGxB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;qDAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;qDAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;qDAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACpC;IAGb;QADC,IAAA,sBAAY,GAAE;;;;qDAOd;IArCU,aAAa;QADzB,IAAA,gBAAM,GAAE;OACI,aAAa,CAsCzB;IAAD,oBAAC;CAAA,AAtCD,IAsCC;AAtCY,sCAAa"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CustomerGroup } from "./customer-group";
|
|
2
|
+
import { DiscountCondition } from "./discount-condition";
|
|
3
|
+
export declare class DiscountConditionCustomerGroup {
|
|
4
|
+
customer_group_id: string;
|
|
5
|
+
condition_id: string;
|
|
6
|
+
customer_group?: CustomerGroup;
|
|
7
|
+
discount_condition?: DiscountCondition;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
metadata: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @schema discount_condition_customer_group
|
|
14
|
+
* title: "Product Tag Discount Condition"
|
|
15
|
+
* description: "Associates a discount condition with a customer group"
|
|
16
|
+
* x-resourceId: discount_condition_customer_group
|
|
17
|
+
* properties:
|
|
18
|
+
* customer_group_id:
|
|
19
|
+
* description: "The id of the Product Tag"
|
|
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.DiscountConditionCustomerGroup = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var db_aware_column_1 = require("../utils/db-aware-column");
|
|
15
|
+
var customer_group_1 = require("./customer-group");
|
|
16
|
+
var discount_condition_1 = require("./discount-condition");
|
|
17
|
+
var DiscountConditionCustomerGroup = /** @class */ (function () {
|
|
18
|
+
function DiscountConditionCustomerGroup() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DiscountConditionCustomerGroup.prototype, "customer_group_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], DiscountConditionCustomerGroup.prototype, "condition_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return customer_group_1.CustomerGroup; }, { onDelete: "CASCADE" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "customer_group_id" }),
|
|
31
|
+
__metadata("design:type", customer_group_1.CustomerGroup)
|
|
32
|
+
], DiscountConditionCustomerGroup.prototype, "customer_group", 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
|
+
], DiscountConditionCustomerGroup.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
|
+
], DiscountConditionCustomerGroup.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
|
+
], DiscountConditionCustomerGroup.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], DiscountConditionCustomerGroup.prototype, "metadata", void 0);
|
|
50
|
+
DiscountConditionCustomerGroup = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], DiscountConditionCustomerGroup);
|
|
53
|
+
return DiscountConditionCustomerGroup;
|
|
54
|
+
}());
|
|
55
|
+
exports.DiscountConditionCustomerGroup = DiscountConditionCustomerGroup;
|
|
56
|
+
/**
|
|
57
|
+
* @schema discount_condition_customer_group
|
|
58
|
+
* title: "Product Tag Discount Condition"
|
|
59
|
+
* description: "Associates a discount condition with a customer group"
|
|
60
|
+
* x-resourceId: discount_condition_customer_group
|
|
61
|
+
* properties:
|
|
62
|
+
* customer_group_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-customer-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition-customer-group.js","sourceRoot":"","sources":["../../src/models/discount-condition-customer-group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,4DAAuE;AACvE,mDAAgD;AAChD,2DAAwD;AAGxD;IAAA;IAuBA,CAAC;IArBC;QADC,IAAA,uBAAa,GAAE;;6EACS;IAGzB;QADC,IAAA,uBAAa,GAAE;;wEACI;IAIpB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,8BAAa,EAAb,CAAa,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACvD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;kCACzB,8BAAa;0EAAA;IAI9B;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;8EAAA;IAGtC;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;sEAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;sEAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oEACpC;IAtBF,8BAA8B;QAD1C,IAAA,gBAAM,GAAE;OACI,8BAA8B,CAuB1C;IAAD,qCAAC;CAAA,AAvBD,IAuBC;AAvBY,wEAA8B;AAyB3C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DiscountCondition } from "./discount-condition";
|
|
2
|
+
import { ProductCollection } from "./product-collection";
|
|
3
|
+
export declare class DiscountConditionProductCollection {
|
|
4
|
+
product_collection_id: string;
|
|
5
|
+
condition_id: string;
|
|
6
|
+
product_collection?: ProductCollection;
|
|
7
|
+
discount_condition?: DiscountCondition;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
metadata: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @schema discount_condition_product_collection
|
|
14
|
+
* title: "Product Collection Discount Condition"
|
|
15
|
+
* description: "Associates a discount condition with a product collection"
|
|
16
|
+
* x-resourceId: discount_condition_product_collection
|
|
17
|
+
* properties:
|
|
18
|
+
* product_collection_id:
|
|
19
|
+
* description: "The id of the Product Collection"
|
|
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.DiscountConditionProductCollection = 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_collection_1 = require("./product-collection");
|
|
17
|
+
var DiscountConditionProductCollection = /** @class */ (function () {
|
|
18
|
+
function DiscountConditionProductCollection() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DiscountConditionProductCollection.prototype, "product_collection_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], DiscountConditionProductCollection.prototype, "condition_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return product_collection_1.ProductCollection; }, { onDelete: "CASCADE" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "product_collection_id" }),
|
|
31
|
+
__metadata("design:type", product_collection_1.ProductCollection)
|
|
32
|
+
], DiscountConditionProductCollection.prototype, "product_collection", 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
|
+
], DiscountConditionProductCollection.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
|
+
], DiscountConditionProductCollection.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
|
+
], DiscountConditionProductCollection.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, db_aware_column_1.DbAwareColumn)({ type: "jsonb", nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], DiscountConditionProductCollection.prototype, "metadata", void 0);
|
|
50
|
+
DiscountConditionProductCollection = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], DiscountConditionProductCollection);
|
|
53
|
+
return DiscountConditionProductCollection;
|
|
54
|
+
}());
|
|
55
|
+
exports.DiscountConditionProductCollection = DiscountConditionProductCollection;
|
|
56
|
+
/**
|
|
57
|
+
* @schema discount_condition_product_collection
|
|
58
|
+
* title: "Product Collection Discount Condition"
|
|
59
|
+
* description: "Associates a discount condition with a product collection"
|
|
60
|
+
* x-resourceId: discount_condition_product_collection
|
|
61
|
+
* properties:
|
|
62
|
+
* product_collection_id:
|
|
63
|
+
* description: "The id of the Product Collection"
|
|
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-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-condition-product-collection.js","sourceRoot":"","sources":["../../src/models/discount-condition-product-collection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAOgB;AAChB,4DAAuE;AACvE,2DAAwD;AACxD,2DAAwD;AAGxD;IAAA;IAuBA,CAAC;IArBC;QADC,IAAA,uBAAa,GAAE;;qFACa;IAG7B;QADC,IAAA,uBAAa,GAAE;;4EACI;IAIpB;QAFC,IAAA,mBAAS,EAAC,cAAM,OAAA,sCAAiB,EAAjB,CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QAC3D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;kCACzB,sCAAiB;kFAAA;IAItC;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;kFAAA;IAGtC;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;0EAAA;IAGhB;QADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,IAAA,+BAAa,EAAC,aAAa,CAAC,EAAE,CAAC;kCAC7C,IAAI;0EAAA;IAGhB;QADC,IAAA,+BAAa,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wEACpC;IAtBF,kCAAkC;QAD9C,IAAA,gBAAM,GAAE;OACI,kCAAkC,CAuB9C;IAAD,yCAAC;CAAA,AAvBD,IAuBC;AAvBY,gFAAkC;AAyB/C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DiscountCondition } from "./discount-condition";
|
|
2
|
+
import { ProductTag } from "./product-tag";
|
|
3
|
+
export declare class DiscountConditionProductTag {
|
|
4
|
+
product_tag_id: string;
|
|
5
|
+
condition_id: string;
|
|
6
|
+
product_tag?: ProductTag;
|
|
7
|
+
discount_condition?: DiscountCondition;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
metadata: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @schema discount_condition_product_tag
|
|
14
|
+
* title: "Product Tag Discount Condition"
|
|
15
|
+
* description: "Associates a discount condition with a product tag"
|
|
16
|
+
* x-resourceId: discount_condition_product_tag
|
|
17
|
+
* properties:
|
|
18
|
+
* product_tag_id:
|
|
19
|
+
* description: "The id of the Product Tag"
|
|
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
|
+
*/
|