@medusajs/medusa 1.3.8 → 1.3.9
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/api/routes/admin/apps/authorize-app.d.ts +1 -1
- package/dist/api/routes/admin/apps/authorize-app.js +1 -1
- package/dist/api/routes/admin/apps/list.d.ts +1 -1
- package/dist/api/routes/admin/apps/list.js +1 -1
- package/dist/api/routes/admin/auth/create-session.d.ts +1 -1
- package/dist/api/routes/admin/auth/create-session.js +1 -1
- package/dist/api/routes/admin/auth/delete-session.d.ts +1 -1
- package/dist/api/routes/admin/auth/delete-session.js +1 -1
- package/dist/api/routes/admin/auth/get-session.d.ts +1 -1
- package/dist/api/routes/admin/auth/get-session.js +1 -1
- package/dist/api/routes/admin/batch/cancel-batch-job.d.ts +1 -1
- package/dist/api/routes/admin/batch/cancel-batch-job.js +1 -1
- package/dist/api/routes/admin/batch/confirm-batch-job.d.ts +1 -1
- package/dist/api/routes/admin/batch/confirm-batch-job.js +1 -1
- package/dist/api/routes/admin/batch/get-batch-job.d.ts +1 -1
- package/dist/api/routes/admin/batch/get-batch-job.js +1 -1
- package/dist/api/routes/admin/collections/add-products.d.ts +1 -1
- package/dist/api/routes/admin/collections/add-products.js +1 -1
- package/dist/api/routes/admin/collections/create-collection.d.ts +1 -1
- package/dist/api/routes/admin/collections/create-collection.js +1 -1
- package/dist/api/routes/admin/collections/delete-collection.d.ts +1 -1
- package/dist/api/routes/admin/collections/delete-collection.js +1 -1
- package/dist/api/routes/admin/collections/get-collection.d.ts +1 -1
- package/dist/api/routes/admin/collections/get-collection.js +1 -1
- package/dist/api/routes/admin/collections/list-collections.d.ts +1 -1
- package/dist/api/routes/admin/collections/list-collections.js +1 -1
- package/dist/api/routes/admin/collections/remove-products.d.ts +1 -1
- package/dist/api/routes/admin/collections/remove-products.js +1 -1
- package/dist/api/routes/admin/collections/update-collection.d.ts +1 -1
- package/dist/api/routes/admin/collections/update-collection.js +1 -1
- package/dist/api/routes/admin/currencies/index.d.ts +12 -0
- package/dist/api/routes/admin/currencies/index.js +49 -0
- package/dist/api/routes/admin/currencies/index.js.map +1 -0
- package/dist/api/routes/admin/currencies/list-currencies.d.ts +45 -0
- package/dist/api/routes/admin/currencies/list-currencies.js +164 -0
- package/dist/api/routes/admin/currencies/list-currencies.js.map +1 -0
- package/dist/api/routes/admin/currencies/update-currency.d.ts +35 -0
- package/dist/api/routes/admin/currencies/update-currency.js +112 -0
- package/dist/api/routes/admin/currencies/update-currency.js.map +1 -0
- package/dist/api/routes/admin/currency/index.d.ts +4 -0
- package/dist/api/routes/admin/currency/index.js +49 -0
- package/dist/api/routes/admin/currency/index.js.map +1 -0
- package/dist/api/routes/admin/currency/list-currencies.d.ts +45 -0
- package/dist/api/routes/admin/currency/list-currencies.js +164 -0
- package/dist/api/routes/admin/currency/list-currencies.js.map +1 -0
- package/dist/api/routes/admin/currency/update-currency.d.ts +35 -0
- package/dist/api/routes/admin/currency/update-currency.js +112 -0
- package/dist/api/routes/admin/currency/update-currency.js.map +1 -0
- package/dist/api/routes/admin/customer-groups/add-customers-batch.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/add-customers-batch.js +1 -1
- package/dist/api/routes/admin/customer-groups/create-customer-group.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/create-customer-group.js +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customer-group.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customer-group.js +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/delete-customers-batch.js +1 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/get-customer-group.js +1 -1
- package/dist/api/routes/admin/customer-groups/list-customer-groups.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/list-customer-groups.js +1 -1
- package/dist/api/routes/admin/customer-groups/update-customer-group.d.ts +1 -1
- package/dist/api/routes/admin/customer-groups/update-customer-group.js +1 -1
- package/dist/api/routes/admin/customers/get-customer.d.ts +1 -1
- package/dist/api/routes/admin/customers/get-customer.js +1 -1
- package/dist/api/routes/admin/discounts/add-region.d.ts +1 -1
- package/dist/api/routes/admin/discounts/add-region.js +1 -1
- package/dist/api/routes/admin/discounts/create-condition.d.ts +1 -1
- package/dist/api/routes/admin/discounts/create-condition.js +1 -1
- package/dist/api/routes/admin/discounts/create-dynamic-code.d.ts +2 -2
- package/dist/api/routes/admin/discounts/create-dynamic-code.js +2 -2
- package/dist/api/routes/admin/discounts/delete-condition.d.ts +1 -1
- package/dist/api/routes/admin/discounts/delete-condition.js +1 -1
- package/dist/api/routes/admin/discounts/delete-dynamic-code.d.ts +1 -1
- package/dist/api/routes/admin/discounts/delete-dynamic-code.js +1 -1
- package/dist/api/routes/admin/discounts/get-condition.d.ts +1 -1
- package/dist/api/routes/admin/discounts/get-condition.js +1 -1
- package/dist/api/routes/admin/discounts/get-discount-by-code.d.ts +1 -1
- package/dist/api/routes/admin/discounts/get-discount-by-code.js +1 -1
- package/dist/api/routes/admin/discounts/get-discount.d.ts +1 -1
- package/dist/api/routes/admin/discounts/get-discount.js +1 -1
- package/dist/api/routes/admin/discounts/remove-region.d.ts +1 -1
- package/dist/api/routes/admin/discounts/remove-region.js +1 -1
- package/dist/api/routes/admin/discounts/update-condition.d.ts +1 -1
- package/dist/api/routes/admin/discounts/update-condition.js +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 +1 -1
- package/dist/api/routes/admin/draft-orders/get-draft-order.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/get-draft-order.js +1 -1
- package/dist/api/routes/admin/draft-orders/register-payment.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/register-payment.js +1 -1
- package/dist/api/routes/admin/draft-orders/update-draft-order.d.ts +1 -1
- package/dist/api/routes/admin/draft-orders/update-draft-order.js +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 +1 -1
- package/dist/api/routes/admin/gift-cards/get-gift-card.d.ts +1 -1
- package/dist/api/routes/admin/gift-cards/get-gift-card.js +1 -1
- package/dist/api/routes/admin/invites/list-invites.d.ts +1 -1
- package/dist/api/routes/admin/invites/list-invites.js +1 -1
- package/dist/api/routes/admin/notes/delete-note.d.ts +1 -1
- package/dist/api/routes/admin/notes/delete-note.js +1 -1
- package/dist/api/routes/admin/notes/get-note.d.ts +1 -1
- package/dist/api/routes/admin/notes/get-note.js +1 -1
- package/dist/api/routes/admin/notes/update-note.d.ts +1 -1
- package/dist/api/routes/admin/notes/update-note.js +1 -1
- package/dist/api/routes/admin/orders/archive-order.d.ts +1 -1
- package/dist/api/routes/admin/orders/archive-order.js +1 -1
- package/dist/api/routes/admin/orders/cancel-claim.d.ts +1 -1
- package/dist/api/routes/admin/orders/cancel-claim.js +1 -1
- package/dist/api/routes/admin/orders/cancel-fulfillment-claim.d.ts +2 -2
- package/dist/api/routes/admin/orders/cancel-fulfillment-claim.js +2 -2
- package/dist/api/routes/admin/orders/cancel-fulfillment-swap.d.ts +2 -2
- package/dist/api/routes/admin/orders/cancel-fulfillment-swap.js +2 -2
- package/dist/api/routes/admin/orders/cancel-fulfillment.d.ts +1 -1
- package/dist/api/routes/admin/orders/cancel-fulfillment.js +1 -1
- package/dist/api/routes/admin/orders/capture-payment.d.ts +1 -1
- package/dist/api/routes/admin/orders/capture-payment.js +1 -1
- package/dist/api/routes/admin/orders/fulfill-claim.d.ts +1 -1
- package/dist/api/routes/admin/orders/fulfill-claim.js +1 -1
- package/dist/api/routes/admin/orders/fulfill-swap.d.ts +1 -1
- package/dist/api/routes/admin/orders/fulfill-swap.js +1 -1
- package/dist/api/routes/admin/orders/get-order.d.ts +1 -1
- package/dist/api/routes/admin/orders/get-order.js +1 -1
- package/dist/api/routes/admin/orders/process-swap-payment.d.ts +1 -1
- package/dist/api/routes/admin/orders/process-swap-payment.js +1 -1
- package/dist/api/routes/admin/orders/update-order.d.ts +1 -1
- package/dist/api/routes/admin/orders/update-order.js +1 -1
- package/dist/api/routes/admin/price-lists/add-prices-batch.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/add-prices-batch.js +1 -1
- package/dist/api/routes/admin/price-lists/create-price-list.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/create-price-list.js +1 -1
- package/dist/api/routes/admin/price-lists/delete-prices-batch.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/delete-prices-batch.js +1 -1
- package/dist/api/routes/admin/price-lists/delete-product-prices.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/delete-product-prices.js +1 -1
- package/dist/api/routes/admin/price-lists/delete-variant-prices.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/delete-variant-prices.js +1 -1
- package/dist/api/routes/admin/price-lists/get-price-list.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/get-price-list.js +1 -1
- package/dist/api/routes/admin/price-lists/list-price-list-products.d.ts +1 -1
- package/dist/api/routes/admin/price-lists/list-price-list-products.js +1 -1
- package/dist/api/routes/admin/products/get-product.d.ts +1 -1
- package/dist/api/routes/admin/products/get-product.js +1 -1
- package/dist/api/routes/admin/products/list-products.d.ts +1 -1
- package/dist/api/routes/admin/products/list-products.js +1 -1
- package/dist/api/routes/admin/products/list-tag-usage-count.d.ts +1 -1
- package/dist/api/routes/admin/products/list-tag-usage-count.js +1 -1
- package/dist/api/routes/admin/products/list-variants.d.ts +1 -1
- package/dist/api/routes/admin/products/list-variants.js +1 -1
- package/dist/api/routes/admin/products/set-metadata.d.ts +1 -1
- package/dist/api/routes/admin/products/set-metadata.js +1 -1
- package/dist/api/routes/admin/products/update-option.d.ts +1 -1
- package/dist/api/routes/admin/products/update-option.js +1 -1
- package/dist/api/routes/admin/regions/get-fulfillment-options.d.ts +1 -1
- package/dist/api/routes/admin/regions/get-fulfillment-options.js +1 -1
- package/dist/api/routes/admin/regions/get-region.d.ts +1 -1
- package/dist/api/routes/admin/regions/get-region.js +1 -1
- package/dist/api/routes/admin/regions/remove-country.d.ts +1 -1
- package/dist/api/routes/admin/regions/remove-country.js +1 -1
- package/dist/api/routes/admin/regions/remove-fulfillment-provider.d.ts +1 -1
- package/dist/api/routes/admin/regions/remove-fulfillment-provider.js +1 -1
- package/dist/api/routes/admin/regions/remove-payment-provider.d.ts +1 -1
- package/dist/api/routes/admin/regions/remove-payment-provider.js +1 -1
- package/dist/api/routes/admin/return-reasons/delete-reason.d.ts +1 -1
- package/dist/api/routes/admin/return-reasons/delete-reason.js +1 -1
- package/dist/api/routes/admin/return-reasons/get-reason.d.ts +1 -1
- package/dist/api/routes/admin/return-reasons/get-reason.js +1 -1
- package/dist/api/routes/admin/sales-channels/add-product-batch.d.ts +1 -1
- package/dist/api/routes/admin/sales-channels/add-product-batch.js +1 -1
- package/dist/api/routes/admin/sales-channels/delete-products-batch.d.ts +1 -1
- package/dist/api/routes/admin/sales-channels/delete-products-batch.js +1 -1
- package/dist/api/routes/admin/sales-channels/delete-sales-channel.d.ts +1 -1
- package/dist/api/routes/admin/sales-channels/delete-sales-channel.js +1 -1
- package/dist/api/routes/admin/sales-channels/get-sales-channel.d.ts +1 -1
- package/dist/api/routes/admin/sales-channels/get-sales-channel.js +1 -1
- package/dist/api/routes/admin/sales-channels/list-sales-channels.d.ts +1 -1
- package/dist/api/routes/admin/sales-channels/list-sales-channels.js +1 -1
- package/dist/api/routes/admin/shipping-options/get-shipping-option.d.ts +1 -1
- package/dist/api/routes/admin/shipping-options/get-shipping-option.js +1 -1
- package/dist/api/routes/admin/shipping-profiles/get-shipping-profile.d.ts +1 -1
- package/dist/api/routes/admin/shipping-profiles/get-shipping-profile.js +1 -1
- package/dist/api/routes/admin/shipping-profiles/update-shipping-profile.d.ts +1 -1
- package/dist/api/routes/admin/shipping-profiles/update-shipping-profile.js +1 -1
- package/dist/api/routes/admin/store/get-store.d.ts +1 -1
- package/dist/api/routes/admin/store/get-store.js +1 -1
- package/dist/api/routes/admin/store/list-payment-providers.d.ts +1 -1
- package/dist/api/routes/admin/store/list-payment-providers.js +1 -1
- package/dist/api/routes/admin/store/list-tax-providers.d.ts +1 -1
- package/dist/api/routes/admin/store/list-tax-providers.js +1 -1
- package/dist/api/routes/admin/store/remove-currency.d.ts +1 -1
- package/dist/api/routes/admin/store/remove-currency.js +1 -1
- package/dist/api/routes/admin/store/update-store.d.ts +1 -1
- package/dist/api/routes/admin/store/update-store.js +1 -1
- package/dist/api/routes/admin/swaps/get-swap.d.ts +1 -1
- package/dist/api/routes/admin/swaps/get-swap.js +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-product-types.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-product-types.js +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-products.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-products.js +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-shipping-options.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/add-to-shipping-options.js +1 -1
- package/dist/api/routes/admin/tax-rates/get-tax-rate.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/get-tax-rate.js +1 -1
- package/dist/api/routes/admin/tax-rates/remove-from-product-types.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/remove-from-product-types.js +1 -1
- package/dist/api/routes/admin/tax-rates/remove-from-products.d.ts +1 -1
- package/dist/api/routes/admin/tax-rates/remove-from-products.js +1 -1
- package/dist/api/routes/admin/tax-rates/remove-from-shipping-options.d.ts +2 -2
- package/dist/api/routes/admin/tax-rates/remove-from-shipping-options.js +2 -2
- package/dist/api/routes/admin/uploads/create-upload.d.ts +1 -1
- package/dist/api/routes/admin/uploads/create-upload.js +1 -1
- package/dist/api/routes/admin/uploads/delete-upload.d.ts +1 -1
- package/dist/api/routes/admin/uploads/delete-upload.js +1 -1
- package/dist/api/routes/admin/uploads/get-download-url.d.ts +1 -1
- package/dist/api/routes/admin/uploads/get-download-url.js +1 -1
- package/dist/api/routes/admin/users/get-user.d.ts +1 -1
- package/dist/api/routes/admin/users/get-user.js +1 -1
- package/dist/api/routes/admin/users/list-users.d.ts +1 -1
- package/dist/api/routes/admin/users/list-users.js +1 -1
- package/dist/api/routes/admin/users/reset-password-token.d.ts +1 -1
- package/dist/api/routes/admin/users/reset-password-token.js +1 -1
- package/dist/api/routes/admin/users/reset-password.d.ts +1 -1
- package/dist/api/routes/admin/users/reset-password.js +1 -1
- package/dist/api/routes/admin/variants/list-variants.d.ts +1 -1
- package/dist/api/routes/admin/variants/list-variants.js +1 -1
- package/dist/api/routes/store/auth/create-session.d.ts +1 -1
- package/dist/api/routes/store/auth/create-session.js +1 -1
- package/dist/api/routes/store/auth/delete-session.d.ts +1 -1
- package/dist/api/routes/store/auth/delete-session.js +1 -1
- package/dist/api/routes/store/auth/exists.d.ts +1 -1
- package/dist/api/routes/store/auth/exists.js +1 -1
- package/dist/api/routes/store/auth/get-session.d.ts +1 -1
- package/dist/api/routes/store/auth/get-session.js +1 -1
- package/dist/api/routes/store/carts/create-cart.js +60 -40
- package/dist/api/routes/store/carts/create-cart.js.map +1 -1
- package/dist/api/routes/store/carts/create-payment-sessions.d.ts +1 -1
- package/dist/api/routes/store/carts/create-payment-sessions.js +1 -1
- package/dist/api/routes/store/carts/delete-discount.d.ts +1 -1
- package/dist/api/routes/store/carts/delete-discount.js +1 -1
- package/dist/api/routes/store/carts/get-cart.d.ts +1 -1
- package/dist/api/routes/store/carts/get-cart.js +1 -1
- package/dist/api/routes/store/collections/get-collection.d.ts +1 -1
- package/dist/api/routes/store/collections/get-collection.js +1 -1
- package/dist/api/routes/store/collections/list-collections.d.ts +1 -1
- package/dist/api/routes/store/collections/list-collections.js +1 -1
- package/dist/api/routes/store/customers/get-customer.d.ts +1 -1
- package/dist/api/routes/store/customers/get-customer.js +1 -1
- package/dist/api/routes/store/customers/get-payment-methods.d.ts +1 -1
- package/dist/api/routes/store/customers/get-payment-methods.js +1 -1
- package/dist/api/routes/store/customers/list-orders.d.ts +1 -1
- package/dist/api/routes/store/customers/list-orders.js +1 -1
- package/dist/api/routes/store/customers/reset-password-token.d.ts +1 -1
- package/dist/api/routes/store/customers/reset-password-token.js +1 -1
- package/dist/api/routes/store/customers/reset-password.d.ts +1 -1
- package/dist/api/routes/store/customers/reset-password.js +1 -1
- package/dist/api/routes/store/customers/update-customer.d.ts +1 -1
- package/dist/api/routes/store/customers/update-customer.js +1 -1
- package/dist/api/routes/store/gift-cards/get-gift-card.d.ts +1 -1
- package/dist/api/routes/store/gift-cards/get-gift-card.js +1 -1
- package/dist/api/routes/store/orders/get-order-by-cart.d.ts +1 -1
- package/dist/api/routes/store/orders/get-order-by-cart.js +1 -1
- package/dist/api/routes/store/orders/get-order.d.ts +1 -1
- package/dist/api/routes/store/orders/get-order.js +1 -1
- package/dist/api/routes/store/products/get-product.d.ts +1 -1
- package/dist/api/routes/store/products/get-product.js +1 -1
- package/dist/api/routes/store/regions/get-region.d.ts +1 -1
- package/dist/api/routes/store/regions/get-region.js +1 -1
- package/dist/api/routes/store/return-reasons/get-reason.d.ts +1 -1
- package/dist/api/routes/store/return-reasons/get-reason.js +1 -1
- package/dist/api/routes/store/shipping-options/list-options.d.ts +1 -1
- package/dist/api/routes/store/shipping-options/list-options.js +1 -1
- package/dist/api/routes/store/shipping-options/list-shipping-options.d.ts +1 -1
- package/dist/api/routes/store/shipping-options/list-shipping-options.js +1 -1
- package/dist/api/routes/store/swaps/get-swap-by-cart.d.ts +1 -1
- package/dist/api/routes/store/swaps/get-swap-by-cart.js +1 -1
- package/dist/api/routes/store/variants/get-variant.d.ts +1 -1
- package/dist/api/routes/store/variants/get-variant.js +1 -1
- package/dist/api/routes/store/variants/list-variants.d.ts +1 -1
- package/dist/api/routes/store/variants/list-variants.js +1 -1
- package/dist/loaders/feature-flags/tax-inclusive-pricing.d.ts +3 -0
- package/dist/loaders/feature-flags/tax-inclusive-pricing.js +10 -0
- package/dist/loaders/feature-flags/tax-inclusive-pricing.js.map +1 -0
- package/dist/migrations/1659501357661-tax_inclusive_pricing.d.ts +7 -0
- package/dist/migrations/1659501357661-tax_inclusive_pricing.js +106 -0
- package/dist/migrations/1659501357661-tax_inclusive_pricing.js.map +1 -0
- package/dist/services/currency.d.ts +51 -0
- package/dist/services/currency.js +174 -0
- package/dist/services/currency.js.map +1 -0
- package/dist/types/currency.d.ts +3 -0
- package/dist/types/currency.js +3 -0
- package/dist/types/currency.js.map +1 -0
- package/dist/utils/calculate-price-tax-amount.d.ts +13 -0
- package/dist/utils/calculate-price-tax-amount.js +20 -0
- package/dist/utils/calculate-price-tax-amount.js.map +1 -0
- package/dist/utils/csv-cell-content-formatter.d.ts +2 -0
- package/dist/utils/csv-cell-content-formatter.js +22 -0
- package/dist/utils/csv-cell-content-formatter.js.map +1 -0
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[
|
|
1
|
+
[34m@medusajs/medusa:build[0m: cache hit, replaying output [2maf8198558e4f97af[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.3.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2197](https://github.com/medusajs/medusa/pull/2197) [`eb3b02baf`](https://github.com/medusajs/medusa/commit/eb3b02baf422ec2038d5e229d7ac1e35ddc3c561) Thanks [@srindom](https://github.com/srindom)! - Create cart with country code in shipping address
|
|
8
|
+
|
|
3
9
|
## 1.3.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -51,7 +51,7 @@ var validator_1 = require("../../../../utils/validator");
|
|
|
51
51
|
/**
|
|
52
52
|
* @oas [post] /apps/authorizations
|
|
53
53
|
* operationId: "PostApps"
|
|
54
|
-
* summary: "
|
|
54
|
+
* summary: "Generate Token for App"
|
|
55
55
|
* description: "Generates a token for an application."
|
|
56
56
|
* x-authenticated: true
|
|
57
57
|
* requestBody:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [get] /apps
|
|
41
41
|
* operationId: "GetApps"
|
|
42
|
-
* summary: "List
|
|
42
|
+
* summary: "List Applications"
|
|
43
43
|
* description: "Retrieve a list of applications."
|
|
44
44
|
* x-authenticated: true
|
|
45
45
|
* x-codeSamples:
|
|
@@ -57,7 +57,7 @@ var validator_1 = require("../../../../utils/validator");
|
|
|
57
57
|
/**
|
|
58
58
|
* @oas [post] /auth
|
|
59
59
|
* operationId: "PostAuth"
|
|
60
|
-
* summary: "
|
|
60
|
+
* summary: "User Login"
|
|
61
61
|
* x-authenticated: false
|
|
62
62
|
* description: "Logs a User in and authorizes them to manage Store settings."
|
|
63
63
|
* parameters:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [delete] /auth
|
|
41
41
|
* operationId: "DeleteAuth"
|
|
42
|
-
* summary: "
|
|
42
|
+
* summary: "User Logout"
|
|
43
43
|
* x-authenticated: true
|
|
44
44
|
* description: "Deletes the current session for the logged in user."
|
|
45
45
|
* x-codeSamples:
|
|
@@ -43,7 +43,7 @@ var lodash_1 = __importDefault(require("lodash"));
|
|
|
43
43
|
/**
|
|
44
44
|
* @oas [get] /auth
|
|
45
45
|
* operationId: "GetAuth"
|
|
46
|
-
* summary: "Get
|
|
46
|
+
* summary: "Get Current User"
|
|
47
47
|
* x-authenticated: true
|
|
48
48
|
* description: "Gets the currently logged in User."
|
|
49
49
|
* x-codeSamples:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [post] /batch-jobs/{id}/cancel
|
|
41
41
|
* operationId: "PostBatchJobsBatchJobCancel"
|
|
42
|
-
* summary: "
|
|
42
|
+
* summary: "Cancel a Batch Job"
|
|
43
43
|
* description: "Marks a batch job as canceled"
|
|
44
44
|
* x-authenticated: true
|
|
45
45
|
* parameters:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @oas [post] /batch-jobs/{id}/confirm
|
|
3
3
|
* operationId: "PostBatchJobsBatchJobConfirmProcessing"
|
|
4
|
-
* summary: "Confirm a
|
|
4
|
+
* summary: "Confirm a Batch Job"
|
|
5
5
|
* description: "Confirms that a previously requested batch job should be executed."
|
|
6
6
|
* x-authenticated: true
|
|
7
7
|
* parameters:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [post] /batch-jobs/{id}/confirm
|
|
41
41
|
* operationId: "PostBatchJobsBatchJobConfirmProcessing"
|
|
42
|
-
* summary: "Confirm a
|
|
42
|
+
* summary: "Confirm a Batch Job"
|
|
43
43
|
* description: "Confirms that a previously requested batch job should be executed."
|
|
44
44
|
* x-authenticated: true
|
|
45
45
|
* parameters:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [get] /batch-jobs/{id}
|
|
41
41
|
* operationId: "GetBatchJobsBatchJob"
|
|
42
|
-
* summary: "
|
|
42
|
+
* summary: "Get a Batch Job"
|
|
43
43
|
* description: "Retrieves a Batch Job."
|
|
44
44
|
* x-authenticated: true
|
|
45
45
|
* parameters:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [post] /collections/{id}/products/batch
|
|
4
4
|
* operationId: "PostProductsToCollection"
|
|
5
|
-
* summary: "
|
|
5
|
+
* summary: "Update Products"
|
|
6
6
|
* description: "Updates products associated with a Product Collection"
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
@@ -50,7 +50,7 @@ var class_validator_1 = require("class-validator");
|
|
|
50
50
|
/**
|
|
51
51
|
* @oas [post] /collections/{id}/products/batch
|
|
52
52
|
* operationId: "PostProductsToCollection"
|
|
53
|
-
* summary: "
|
|
53
|
+
* summary: "Update Products"
|
|
54
54
|
* description: "Updates products associated with a Product Collection"
|
|
55
55
|
* x-authenticated: true
|
|
56
56
|
* parameters:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [post] /collections
|
|
4
4
|
* operationId: "PostCollections"
|
|
5
|
-
* summary: "Create a
|
|
5
|
+
* summary: "Create a Collection"
|
|
6
6
|
* description: "Creates a Product Collection."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* requestBody:
|
|
@@ -50,7 +50,7 @@ var class_validator_1 = require("class-validator");
|
|
|
50
50
|
/**
|
|
51
51
|
* @oas [post] /collections
|
|
52
52
|
* operationId: "PostCollections"
|
|
53
|
-
* summary: "Create a
|
|
53
|
+
* summary: "Create a Collection"
|
|
54
54
|
* description: "Creates a Product Collection."
|
|
55
55
|
* x-authenticated: true
|
|
56
56
|
* requestBody:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [delete] /collections/{id}
|
|
4
4
|
* operationId: "DeleteCollectionsCollection"
|
|
5
|
-
* summary: "Delete a
|
|
5
|
+
* summary: "Delete a Collection"
|
|
6
6
|
* description: "Deletes a Product Collection."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
/**
|
|
40
40
|
* @oas [delete] /collections/{id}
|
|
41
41
|
* operationId: "DeleteCollectionsCollection"
|
|
42
|
-
* summary: "Delete a
|
|
42
|
+
* summary: "Delete a Collection"
|
|
43
43
|
* description: "Deletes a Product Collection."
|
|
44
44
|
* x-authenticated: true
|
|
45
45
|
* parameters:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [get] /collections/{id}
|
|
4
4
|
* operationId: "GetCollectionsCollection"
|
|
5
|
-
* summary: "
|
|
5
|
+
* summary: "Get a Collection"
|
|
6
6
|
* description: "Retrieves a Product Collection."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
@@ -40,7 +40,7 @@ var _1 = require(".");
|
|
|
40
40
|
/**
|
|
41
41
|
* @oas [get] /collections/{id}
|
|
42
42
|
* operationId: "GetCollectionsCollection"
|
|
43
|
-
* summary: "
|
|
43
|
+
* summary: "Get a Collection"
|
|
44
44
|
* description: "Retrieves a Product Collection."
|
|
45
45
|
* x-authenticated: true
|
|
46
46
|
* parameters:
|
|
@@ -3,7 +3,7 @@ import { DateComparisonOperator } from "../../../../types/common";
|
|
|
3
3
|
/**
|
|
4
4
|
* @oas [get] /collections
|
|
5
5
|
* operationId: "GetCollections"
|
|
6
|
-
* summary: "List
|
|
6
|
+
* summary: "List Collections"
|
|
7
7
|
* description: "Retrieve a list of Product Collection."
|
|
8
8
|
* x-authenticated: true
|
|
9
9
|
* parameters:
|
|
@@ -107,7 +107,7 @@ var class_transformer_1 = require("class-transformer");
|
|
|
107
107
|
/**
|
|
108
108
|
* @oas [get] /collections
|
|
109
109
|
* operationId: "GetCollections"
|
|
110
|
-
* summary: "List
|
|
110
|
+
* summary: "List Collections"
|
|
111
111
|
* description: "Retrieve a list of Product Collection."
|
|
112
112
|
* x-authenticated: true
|
|
113
113
|
* parameters:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [delete] /collections/{id}/products/batch
|
|
4
4
|
* operationId: "DeleteProductsFromCollection"
|
|
5
|
-
* summary: "
|
|
5
|
+
* summary: "Remove Product"
|
|
6
6
|
* description: "Removes products associated with a Product Collection"
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
@@ -50,7 +50,7 @@ var class_validator_1 = require("class-validator");
|
|
|
50
50
|
/**
|
|
51
51
|
* @oas [delete] /collections/{id}/products/batch
|
|
52
52
|
* operationId: "DeleteProductsFromCollection"
|
|
53
|
-
* summary: "
|
|
53
|
+
* summary: "Remove Product"
|
|
54
54
|
* description: "Removes products associated with a Product Collection"
|
|
55
55
|
* x-authenticated: true
|
|
56
56
|
* parameters:
|
|
@@ -2,7 +2,7 @@ import { Request, Response } from "express";
|
|
|
2
2
|
/**
|
|
3
3
|
* @oas [post] /collections/{id}
|
|
4
4
|
* operationId: "PostCollectionsCollection"
|
|
5
|
-
* summary: "Update a
|
|
5
|
+
* summary: "Update a Collection"
|
|
6
6
|
* description: "Updates a Product Collection."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
@@ -50,7 +50,7 @@ var class_validator_1 = require("class-validator");
|
|
|
50
50
|
/**
|
|
51
51
|
* @oas [post] /collections/{id}
|
|
52
52
|
* operationId: "PostCollectionsCollection"
|
|
53
|
-
* summary: "Update a
|
|
53
|
+
* summary: "Update a Collection"
|
|
54
54
|
* description: "Updates a Product Collection."
|
|
55
55
|
* x-authenticated: true
|
|
56
56
|
* parameters:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Currency } from "../../../..";
|
|
2
|
+
import { PaginatedResponse } from "../../../../types/common";
|
|
3
|
+
declare const _default: (app: any) => any;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare type AdminCurrenciesListRes = PaginatedResponse & {
|
|
6
|
+
currencies: Currency[];
|
|
7
|
+
};
|
|
8
|
+
export declare type AdminCurrenciesRes = {
|
|
9
|
+
currency: Currency;
|
|
10
|
+
};
|
|
11
|
+
export * from "./list-currencies";
|
|
12
|
+
export * from "./update-currency";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var express_1 = require("express");
|
|
33
|
+
var tax_inclusive_pricing_1 = __importDefault(require("../../../../loaders/feature-flags/tax-inclusive-pricing"));
|
|
34
|
+
var middlewares_1 = __importStar(require("../../../middlewares"));
|
|
35
|
+
var feature_flag_enabled_1 = require("../../../middlewares/feature-flag-enabled");
|
|
36
|
+
var list_currencies_1 = require("./list-currencies");
|
|
37
|
+
var update_currency_1 = require("./update-currency");
|
|
38
|
+
exports.default = (function (app) {
|
|
39
|
+
var route = (0, express_1.Router)();
|
|
40
|
+
app.use("/currencies", (0, feature_flag_enabled_1.isFeatureFlagEnabled)(tax_inclusive_pricing_1.default.key), route);
|
|
41
|
+
route.get("/", (0, middlewares_1.transformQuery)(list_currencies_1.AdminGetCurrenciesParams, {
|
|
42
|
+
isList: true,
|
|
43
|
+
}), middlewares_1.default.wrap(require("./list-currencies").default));
|
|
44
|
+
route.post("/:code", (0, middlewares_1.transformBody)(update_currency_1.AdminPostCurrenciesCurrencyReq), middlewares_1.default.wrap(require("./update-currency").default));
|
|
45
|
+
return app;
|
|
46
|
+
});
|
|
47
|
+
__exportStar(require("./list-currencies"), exports);
|
|
48
|
+
__exportStar(require("./update-currency"), exports);
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/currencies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAEhC,kHAAoG;AAEpG,kEAG6B;AAC7B,kFAAgF;AAChF,qDAA4D;AAC5D,qDAAkE;AAElE,mBAAe,UAAC,GAAG;IACjB,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;IACtB,GAAG,CAAC,GAAG,CACL,aAAa,EACb,IAAA,2CAAoB,EAAC,+BAA8B,CAAC,GAAG,CAAC,EACxD,KAAK,CACN,CAAA;IAED,KAAK,CAAC,GAAG,CACP,GAAG,EACH,IAAA,4BAAc,EAAC,0CAAwB,EAAE;QACvC,MAAM,EAAE,IAAI;KACb,CAAC,EACF,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CACvD,CAAA;IAED,KAAK,CAAC,IAAI,CACR,QAAQ,EACR,IAAA,2BAAa,EAAC,gDAA8B,CAAC,EAC7C,qBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CACvD,CAAA;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,EAAA;AAUD,oDAAiC;AACjC,oDAAiC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Currency } from "../../../../models";
|
|
2
|
+
import { ExtendedRequest } from "../../../../types/global";
|
|
3
|
+
import { FindPaginationParams } from "../../../../types/common";
|
|
4
|
+
/**
|
|
5
|
+
* @oas [get] /currencies
|
|
6
|
+
* operationId: "GetCurrencies"
|
|
7
|
+
* summary: "List Currency"
|
|
8
|
+
* description: "Retrieves a list of Currency"
|
|
9
|
+
* x-authenticated: true
|
|
10
|
+
* parameters:
|
|
11
|
+
* - (query) code {string} Code of the currency to search for.
|
|
12
|
+
* - (query) includes_tax {boolean} Search for tax inclusive currencies.
|
|
13
|
+
* - (query) order {string} to retrieve products in.
|
|
14
|
+
* - (query) offset {string} How many products to skip in the result.
|
|
15
|
+
* - (query) limit {string} Limit the number of products returned.
|
|
16
|
+
* tags:
|
|
17
|
+
* - Currency
|
|
18
|
+
* responses:
|
|
19
|
+
* 200:
|
|
20
|
+
* description: OK
|
|
21
|
+
* content:
|
|
22
|
+
* application/json:
|
|
23
|
+
* schema:
|
|
24
|
+
* properties:
|
|
25
|
+
* count:
|
|
26
|
+
* description: The number of Currency.
|
|
27
|
+
* type: integer
|
|
28
|
+
* offset:
|
|
29
|
+
* description: The offset of the Currency query.
|
|
30
|
+
* type: integer
|
|
31
|
+
* limit:
|
|
32
|
+
* description: The limit of the currency query.
|
|
33
|
+
* type: integer
|
|
34
|
+
* currencies:
|
|
35
|
+
* type: array
|
|
36
|
+
* items:
|
|
37
|
+
* $ref: "#/components/schemas/currency"
|
|
38
|
+
*/
|
|
39
|
+
declare const _default: (req: ExtendedRequest<Currency>, res: any) => Promise<void>;
|
|
40
|
+
export default _default;
|
|
41
|
+
export declare class AdminGetCurrenciesParams extends FindPaginationParams {
|
|
42
|
+
code?: string;
|
|
43
|
+
includes_tax?: boolean;
|
|
44
|
+
order?: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
37
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
|
+
function step(op) {
|
|
40
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
+
while (_) try {
|
|
42
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
43
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
|
+
switch (op[0]) {
|
|
45
|
+
case 0: case 1: t = op; break;
|
|
46
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
47
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
48
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49
|
+
default:
|
|
50
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
51
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
52
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
53
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54
|
+
if (t[2]) _.ops.pop();
|
|
55
|
+
_.trys.pop(); continue;
|
|
56
|
+
}
|
|
57
|
+
op = body.call(thisArg, _);
|
|
58
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
63
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64
|
+
if (!m) return o;
|
|
65
|
+
var i = m.call(o), r, ar = [], e;
|
|
66
|
+
try {
|
|
67
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
68
|
+
}
|
|
69
|
+
catch (error) { e = { error: error }; }
|
|
70
|
+
finally {
|
|
71
|
+
try {
|
|
72
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
73
|
+
}
|
|
74
|
+
finally { if (e) throw e.error; }
|
|
75
|
+
}
|
|
76
|
+
return ar;
|
|
77
|
+
};
|
|
78
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
+
exports.AdminGetCurrenciesParams = void 0;
|
|
80
|
+
var class_validator_1 = require("class-validator");
|
|
81
|
+
var common_1 = require("../../../../types/common");
|
|
82
|
+
/**
|
|
83
|
+
* @oas [get] /currencies
|
|
84
|
+
* operationId: "GetCurrencies"
|
|
85
|
+
* summary: "List Currency"
|
|
86
|
+
* description: "Retrieves a list of Currency"
|
|
87
|
+
* x-authenticated: true
|
|
88
|
+
* parameters:
|
|
89
|
+
* - (query) code {string} Code of the currency to search for.
|
|
90
|
+
* - (query) includes_tax {boolean} Search for tax inclusive currencies.
|
|
91
|
+
* - (query) order {string} to retrieve products in.
|
|
92
|
+
* - (query) offset {string} How many products to skip in the result.
|
|
93
|
+
* - (query) limit {string} Limit the number of products returned.
|
|
94
|
+
* tags:
|
|
95
|
+
* - Currency
|
|
96
|
+
* responses:
|
|
97
|
+
* 200:
|
|
98
|
+
* description: OK
|
|
99
|
+
* content:
|
|
100
|
+
* application/json:
|
|
101
|
+
* schema:
|
|
102
|
+
* properties:
|
|
103
|
+
* count:
|
|
104
|
+
* description: The number of Currency.
|
|
105
|
+
* type: integer
|
|
106
|
+
* offset:
|
|
107
|
+
* description: The offset of the Currency query.
|
|
108
|
+
* type: integer
|
|
109
|
+
* limit:
|
|
110
|
+
* description: The limit of the currency query.
|
|
111
|
+
* type: integer
|
|
112
|
+
* currencies:
|
|
113
|
+
* type: array
|
|
114
|
+
* items:
|
|
115
|
+
* $ref: "#/components/schemas/currency"
|
|
116
|
+
*/
|
|
117
|
+
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
118
|
+
var currencyService, _a, skip, take, _b, currencies, count;
|
|
119
|
+
return __generator(this, function (_c) {
|
|
120
|
+
switch (_c.label) {
|
|
121
|
+
case 0:
|
|
122
|
+
currencyService = req.scope.resolve("currencyService");
|
|
123
|
+
_a = req.listConfig, skip = _a.skip, take = _a.take;
|
|
124
|
+
req.listConfig.select = undefined;
|
|
125
|
+
if (req.listConfig.order && req.listConfig.order["created_at"]) {
|
|
126
|
+
delete req.listConfig.order["created_at"];
|
|
127
|
+
}
|
|
128
|
+
return [4 /*yield*/, currencyService.listAndCount(req.filterableFields, req.listConfig)];
|
|
129
|
+
case 1:
|
|
130
|
+
_b = __read.apply(void 0, [_c.sent(), 2]), currencies = _b[0], count = _b[1];
|
|
131
|
+
res.json({
|
|
132
|
+
currencies: currencies,
|
|
133
|
+
count: count,
|
|
134
|
+
offset: skip,
|
|
135
|
+
limit: take,
|
|
136
|
+
});
|
|
137
|
+
return [2 /*return*/];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}); });
|
|
141
|
+
var AdminGetCurrenciesParams = /** @class */ (function (_super) {
|
|
142
|
+
__extends(AdminGetCurrenciesParams, _super);
|
|
143
|
+
function AdminGetCurrenciesParams() {
|
|
144
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
145
|
+
}
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, class_validator_1.IsString)(),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
__metadata("design:type", String)
|
|
150
|
+
], AdminGetCurrenciesParams.prototype, "code", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, class_validator_1.IsBoolean)(),
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
__metadata("design:type", Boolean)
|
|
155
|
+
], AdminGetCurrenciesParams.prototype, "includes_tax", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_validator_1.IsString)(),
|
|
158
|
+
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], AdminGetCurrenciesParams.prototype, "order", void 0);
|
|
161
|
+
return AdminGetCurrenciesParams;
|
|
162
|
+
}(common_1.FindPaginationParams));
|
|
163
|
+
exports.AdminGetCurrenciesParams = AdminGetCurrenciesParams;
|
|
164
|
+
//# sourceMappingURL=list-currencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-currencies.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/currencies/list-currencies.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAiE;AAIjE,mDAA2E;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,mBAAe,UAAO,GAA8B,EAAE,GAAG;;;;;gBACjD,eAAe,GAAoB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBAEvE,KAAiB,GAAG,CAAC,UAAU,EAA7B,IAAI,UAAA,EAAE,IAAI,UAAA,CAAmB;gBAErC,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,SAAS,CAAA;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;oBAC9D,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;iBAC1C;gBAC2B,qBAAM,eAAe,CAAC,YAAY,CAC5D,GAAG,CAAC,gBAAgB,EACpB,GAAG,CAAC,UAAU,CACf,EAAA;;gBAHK,KAAA,sBAAsB,SAG3B,KAAA,EAHM,UAAU,QAAA,EAAE,KAAK,QAAA;gBAKxB,GAAG,CAAC,IAAI,CAAC;oBACP,UAAU,YAAA;oBACV,KAAK,OAAA;oBACL,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC,CAAA;;;;KACH,EAAA;AAED;IAA8C,4CAAoB;IAAlE;;IAYA,CAAC;IATC;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;0DACA;IAIb;QAFC,IAAA,2BAAS,GAAE;QACX,IAAA,4BAAU,GAAE;;kEACS;IAItB;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;2DACC;IAChB,+BAAC;CAAA,AAZD,CAA8C,6BAAoB,GAYjE;AAZY,4DAAwB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Currency } from "../../../../models";
|
|
2
|
+
import { ExtendedRequest } from "../../../../types/global";
|
|
3
|
+
/**
|
|
4
|
+
* @oas [post] /currencies/:code
|
|
5
|
+
* operationId: "PostCurrenciesCurrency"
|
|
6
|
+
* summary: "Update a Currency"
|
|
7
|
+
* description: "Update a Currency"
|
|
8
|
+
* x-authenticated: true
|
|
9
|
+
* parameters:
|
|
10
|
+
* - (path) code=* {string} The code of the Currency.
|
|
11
|
+
* requestBody:
|
|
12
|
+
* content:
|
|
13
|
+
* application/json:
|
|
14
|
+
* schema:
|
|
15
|
+
* properties:
|
|
16
|
+
* includes_tax:
|
|
17
|
+
* type: boolean
|
|
18
|
+
* description: [EXPERIMENTAL] Tax included in prices of currency.
|
|
19
|
+
* tags:
|
|
20
|
+
* - Currency
|
|
21
|
+
* responses:
|
|
22
|
+
* 200:
|
|
23
|
+
* description: OK
|
|
24
|
+
* content:
|
|
25
|
+
* application/json:
|
|
26
|
+
* schema:
|
|
27
|
+
* properties:
|
|
28
|
+
* currency:
|
|
29
|
+
* $ref: "#/components/schemas/currency"
|
|
30
|
+
*/
|
|
31
|
+
declare const _default: (req: ExtendedRequest<Currency>, res: any) => Promise<void>;
|
|
32
|
+
export default _default;
|
|
33
|
+
export declare class AdminPostCurrenciesCurrencyReq {
|
|
34
|
+
includes_tax?: boolean;
|
|
35
|
+
}
|