Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(UST-1217): UDM enhancements release #1499

Merged
merged 23 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/chatty-beds-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@vue-storefront/magento-api": patch
"@vue-storefront/magento-types": patch
---

**[FIXED]** [`CategoryListQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategoryListQuery) returns `url_key` property on each children level

**[CHANGED]** Enhanced default GQL queries

- [`CategoryListQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategoryListQuery)
- fetch up to 5th level nested categories `children`
9 changes: 9 additions & 0 deletions .changeset/chilly-lizards-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@vue-storefront/magento-api": patch
"@vue-storefront/magento-types": patch
---

**[CHANGED]** Enhanced default GQL queries

- [`ProductDetailsQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ProductDetailsQuery)
- enhanced [`ConfigurableProduct`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ConfigurableProduct) response with [`ConfigurableVariants`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ConfigurableVariants)
25 changes: 25 additions & 0 deletions .changeset/dull-llamas-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@vue-storefront/magento-api": patch
"@vue-storefront/magento-types": patch
---

**[CHANGED]** Enhanced default GQL queries with new fields

- [`CartQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CartQuery)
- [`CustomerCartQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CustomerCartQuery)
- [`ApplyCouponToCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ApplyCouponToCartMutation)
- [`RemoveCouponFromCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/RemoveCouponFromCartMutation)
- [`AddProductsToCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/AddProductsToCartMutation)
- [`RemoveItemFromCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/RemoveItemFromCartMutation)
- [`SetShippingMethodsOnCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/SetShippingMethodsOnCartMutation)
- [`MergeCartsMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/MergeCartsMutation)

with new fields:

- `prices`
- `subtotal_with_discount_excluding_tax`
- `configured_variant`
- `sku`
- `name`
- `only_x_left_in_stock`
- `price_range`
5 changes: 5 additions & 0 deletions .changeset/ninety-steaks-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/magento-types": patch
---

**[FIXED]** [`getAvailableShippingMethods`](https://docs.vuestorefront.io/integrations/magento/api/magento-api/getAvailableShippingMethods) method declaration argument type. Using `cart_id` instead of `cartId`.
14 changes: 14 additions & 0 deletions .changeset/seven-crews-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@vue-storefront/magento-api": patch
"@vue-storefront/magento-types": patch
---

**[FIXED]** [`updateCustomerAddress`](https://docs.vuestorefront.io/integrations/magento/api/magento-api/updateCustomerAddress) method declaration argument type. Use `id` instead of `addressId`.

**[CHANGED]** Enhanced default GQL queries

- [`CreateCustomerAddress`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CreateCustomerAddress) response with fields
- `firstname`
- `lastname`
- `prefix`
- `suffix`
21 changes: 21 additions & 0 deletions .changeset/shaggy-houses-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@vue-storefront/magento-api": patch
"@vue-storefront/magento-types": patch
---

**[CHANGED]** Enhanced default GQL queries with new fields

- [`SetGuestEmailOnCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/SetBillingAddressOnCartMutation)
- [`SetBillingAddressOnCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/SetBillingAddressOnCartMutation)
- [`SetPaymentMethodOnCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/SetPaymentMethodOnCartMutation)
- [`SetShippingAddressesOnCartMutation`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/SetShippingAddressesOnCartMutation)

with new fields:

- `prices`
- `subtotal_with_discount_excluding_tax`
- `configured_variant`
- `sku`
- `name`
- `only_x_left_in_stock`
- `price_range`
55 changes: 55 additions & 0 deletions .changeset/tidy-kangaroos-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
"@vue-storefront/magento-api": minor
"@vue-storefront/magento-types": minor
---

**[CHANGED]** Enhanced default GQL queries

- [`CategorySearchQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategorySearchQuery) new fields:
- `url_key` - The url key assigned to the category.
- `children` - Child categories tree.
- `include_in_menu`
- `is_anchor`
- `level`
- `name`
- `position`
- `product_count`
- `uid`
- `url_key`
- `url_path`
- `url_suffix`

```js
// get category `children` categories

const category = sdk.commerce.categorySearch();
const children = category.children;
```

- [`CategoryListQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategoryListQuery) new fields:
- `children.url_key` - The url key assigned to the category.

```js
// get `url_key` of category children

const categoryList = sdk.commerce.categoryList();

for (let categoryChildren of categoryList.children) {
const url_key = categoryChildren.url_key;
}
```

- [`ProductListsQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ProductListsQuery) new fields:
- `variants` - An array of variants of [`ConfigurableProduct`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ConfigurableProduct)

```js
// get ConfigurableProduct `variants` products

const products = sdk.commerce.products();

for (let product of products) {
if (product.__typename === "ConfigurableProduct") {
const variants = products.variants;
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,35 @@ export default `
code
}
prices {
subtotal_with_discount_excluding_tax {
value
currency
}
subtotal_excluding_tax {
value
currency
}
subtotal_including_tax {
value
currency
}
applied_taxes {
amount {
value
currency
}
label
}
discounts {
amount {
value
currency
}
label
}
grand_total {
value
currency
}
}
items {
Expand Down Expand Up @@ -78,6 +87,8 @@ export default `
name
url_suffix
url_path
url_key
include_in_menu
breadcrumbs {
category_name
category_url_path
Expand All @@ -97,12 +108,15 @@ export default `
prices {
row_total {
value
currency
}
row_total_including_tax {
value
currency
}
total_item_discount {
value
currency
}
}
quantity
Expand All @@ -115,6 +129,20 @@ export default `
}
configured_variant {
sku
name
only_x_left_in_stock
price_range {
minimum_price {
final_price {
currency
value
}
regular_price {
currency
value
}
}
}
thumbnail {
url
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,35 @@ export default `
code
}
prices {
subtotal_with_discount_excluding_tax {
value
currency
}
subtotal_excluding_tax {
value
currency
}
subtotal_including_tax {
value
currency
}
applied_taxes {
amount {
value
currency
}
label
}
discounts {
amount {
value
currency
}
label
}
grand_total {
value
currency
}
}
items {
Expand Down Expand Up @@ -79,6 +88,8 @@ export default `
name
url_suffix
url_path
url_key
include_in_menu
breadcrumbs {
category_name
category_url_path
Expand All @@ -98,12 +109,15 @@ export default `
prices {
row_total {
value
currency
}
row_total_including_tax {
value
currency
}
total_item_discount {
value
currency
}
}
quantity
Expand All @@ -116,6 +130,20 @@ export default `
}
configured_variant {
sku
name
only_x_left_in_stock
price_range {
minimum_price {
final_price {
currency
value
}
regular_price {
currency
value
}
}
}
thumbnail {
url
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,35 @@ export default gql`
code
}
prices {
subtotal_with_discount_excluding_tax {
value
currency
}
subtotal_excluding_tax {
value
currency
}
subtotal_including_tax {
value
currency
}
applied_taxes {
amount {
value
currency
}
label
}
discounts {
amount {
value
currency
}
label
}
grand_total {
value
currency
}
}
items {
Expand Down Expand Up @@ -81,6 +90,8 @@ export default gql`
name
url_suffix
url_path
url_key
include_in_menu
breadcrumbs {
category_name
category_url_path
Expand All @@ -100,12 +111,15 @@ export default gql`
prices {
row_total {
value
currency
}
row_total_including_tax {
value
currency
}
total_item_discount {
value
currency
}
}
quantity
Expand All @@ -118,6 +132,20 @@ export default gql`
}
configured_variant {
sku
name
only_x_left_in_stock
price_range {
minimum_price {
final_price {
currency
value
}
regular_price {
currency
value
}
}
}
thumbnail {
url
}
Expand Down
Loading
Loading