@labdigital/commercetools-mock 2.21.0 → 2.21.2

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/dist/index.cjs CHANGED
@@ -3075,6 +3075,9 @@ var CategoryRepository = class extends AbstractResourceRepository {
3075
3075
  key: draft.key,
3076
3076
  name: draft.name,
3077
3077
  slug: draft.slug,
3078
+ description: draft.description,
3079
+ metaDescription: draft.metaDescription,
3080
+ metaKeywords: draft.metaKeywords,
3078
3081
  orderHint: draft.orderHint || "",
3079
3082
  externalId: draft.externalId || "",
3080
3083
  parent: draft.parent ? { typeId: "category", id: draft.parent.id } : void 0,
@@ -7101,12 +7104,21 @@ var AbstractService = class {
7101
7104
  get(request, response) {
7102
7105
  const limit = this._parseParam(request.query.limit);
7103
7106
  const offset = this._parseParam(request.query.offset);
7104
- const result = this.repository.query(getRepositoryContext(request), {
7107
+ const params = {
7105
7108
  expand: this._parseParam(request.query.expand),
7106
7109
  where: this._parseParam(request.query.where),
7107
7110
  limit: limit !== void 0 ? Number(limit) : void 0,
7108
7111
  offset: offset !== void 0 ? Number(offset) : void 0
7109
- });
7112
+ };
7113
+ for (const key in request.query) {
7114
+ if (key.startsWith("var.")) {
7115
+ const items = this._parseParam(request.query[key]);
7116
+ if (items) {
7117
+ params[key] = items.length === 1 ? items[0] : items;
7118
+ }
7119
+ }
7120
+ }
7121
+ const result = this.repository.query(getRepositoryContext(request), params);
7110
7122
  return response.status(200).send(result);
7111
7123
  }
7112
7124
  getWithId(request, response) {