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 18 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`.
20 changes: 20 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mode": "exit",
"tag": "rc",
"initialVersions": {
"@vue-storefront/magento-api": "2.4.3",
"@vue-storefront/magento-types": "1.0.2",
"@vue-storefront/magento-load-tests": "1.1.0",
"method-bootstrapper": "1.1.0",
"@vue-storefront/magento-sdk": "2.1.0"
},
"changesets": [
"chatty-beds-grin",
"chilly-lizards-fix",
"dull-llamas-wink",
"ninety-steaks-joke",
"seven-crews-check",
"shaggy-houses-buy",
"tidy-kangaroos-deliver"
]
}
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;
}
}
```
162 changes: 162 additions & 0 deletions packages/api-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,167 @@
# @vue-storefront/magento-api

## 2.5.0-rc.6

### Patch Changes

- f0d4ad7a: **[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`

- Updated dependencies [f0d4ad7a]
- @vue-storefront/[email protected]

## 2.5.0-rc.5

### Patch Changes

- Updated dependencies [523488c0]
- @vue-storefront/[email protected]

## 2.5.0-rc.4

### Patch Changes

- e8d07f3b: **[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`

- Updated dependencies [e8d07f3b]
- @vue-storefront/[email protected]

## 2.5.0-rc.3

### Patch Changes

- 64bcbe02: **[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`

- Updated dependencies [64bcbe02]
- @vue-storefront/[email protected]

## 2.5.0-rc.2

### Patch Changes

- 624be6ac: **[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)

- Updated dependencies [624be6ac]
- @vue-storefront/[email protected]

## 2.5.0-rc.1

### Patch Changes

- 60af3cb0: **[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`

- Updated dependencies [60af3cb0]
- @vue-storefront/[email protected]

## 2.5.0-rc.0

### Minor Changes

- a4fd7ddf: **[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;
}
}
```

### Patch Changes

- Updated dependencies [a4fd7ddf]
- @vue-storefront/[email protected]

## 2.4.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/api-client/__tests__/mockData/api/storeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const STORE_CONFIG_MOCK_RESP = {
configurable_thumbnail_source: "parent",
copyright: "Copyright Β© 2013-present Magento, Inc. All rights reserved.",
default_description: null,
default_display_currency_code: "USD",
default_display_currency_code: "EUR",
default_keywords: null,
default_title: "Magento Commerce",
grid_per_page: 12,
Expand All @@ -24,7 +24,7 @@ const STORE_CONFIG_MOCK_RESP = {
list_mode: "grid-list",
list_per_page: 10,
list_per_page_values: "5,10,15,20,25",
locale: "en_US",
locale: "en_EN",
logo_alt: null,
logo_height: null,
logo_width: null,
Expand Down
4 changes: 2 additions & 2 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/magento-api",
"version": "2.4.3",
"version": "2.5.0-rc.6",
"sideEffects": false,
"homepage": "https://github.com/vuestorefront/magento2",
"bugs": {
Expand All @@ -25,7 +25,7 @@
"@apollo/client": "3.8.7",
"@nuxtjs/composition-api": "0.31.0",
"@vue-storefront/middleware": "^3.5.0",
"@vue-storefront/magento-types": "1.0.2",
"@vue-storefront/magento-types": "1.1.0-rc.6",
"agentkeepalive": "^4.2.1",
"consola": "^3.1.0",
"dotenv": "^16.0.1",
Expand Down
Loading
Loading