@reactionary/commercetools 0.9.17 → 0.9.19

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.
@@ -41,7 +41,11 @@ class CommercetoolsCategoryCapability extends CategoryCapability {
41
41
  async getById(payload) {
42
42
  const client = await this.getClient();
43
43
  try {
44
- const response = await client.withKey({ key: payload.id.key }).get().execute();
44
+ const response = await client.withKey({ key: payload.id.key }).get({
45
+ queryArgs: {
46
+ expand: "parent"
47
+ }
48
+ }).execute();
45
49
  return success(this.factory.parseCategory(this.context, response.body));
46
50
  } catch (err) {
47
51
  return error({
@@ -55,6 +59,7 @@ class CommercetoolsCategoryCapability extends CategoryCapability {
55
59
  try {
56
60
  const response = await client.get({
57
61
  queryArgs: {
62
+ expand: "parent",
58
63
  where: `slug(${getLanguageCodeFromLocale(this.context.languageContext.locale)}=:slug)`,
59
64
  "var.slug": payload.slug,
60
65
  storeProjection: this.context.storeIdentifier.key,
@@ -108,6 +113,7 @@ class CommercetoolsCategoryCapability extends CategoryCapability {
108
113
  const parentCategory = await client.withKey({ key: payload.parentId.key }).get().execute();
109
114
  const response = await client.get({
110
115
  queryArgs: {
116
+ expand: "parent",
111
117
  where: "parent(id = :parentId)",
112
118
  "var.parentId": parentCategory.body.id,
113
119
  limit: payload.paginationOptions.pageSize,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@reactionary/commercetools",
3
- "version": "0.9.17",
3
+ "version": "0.9.19",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
- "@reactionary/core": "0.9.17",
8
+ "@reactionary/core": "0.9.19",
9
9
  "zod": "4.1.9",
10
10
  "@commercetools/ts-client": "^4.9.1",
11
11
  "@commercetools/platform-sdk": "^8.25.0",