@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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/repositories/category/index.ts +3 -0
- package/src/services/abstract.ts +17 -4
package/dist/index.js
CHANGED
|
@@ -3038,6 +3038,9 @@ var CategoryRepository = class extends AbstractResourceRepository {
|
|
|
3038
3038
|
key: draft.key,
|
|
3039
3039
|
name: draft.name,
|
|
3040
3040
|
slug: draft.slug,
|
|
3041
|
+
description: draft.description,
|
|
3042
|
+
metaDescription: draft.metaDescription,
|
|
3043
|
+
metaKeywords: draft.metaKeywords,
|
|
3041
3044
|
orderHint: draft.orderHint || "",
|
|
3042
3045
|
externalId: draft.externalId || "",
|
|
3043
3046
|
parent: draft.parent ? { typeId: "category", id: draft.parent.id } : void 0,
|
|
@@ -7064,12 +7067,21 @@ var AbstractService = class {
|
|
|
7064
7067
|
get(request, response) {
|
|
7065
7068
|
const limit = this._parseParam(request.query.limit);
|
|
7066
7069
|
const offset = this._parseParam(request.query.offset);
|
|
7067
|
-
const
|
|
7070
|
+
const params = {
|
|
7068
7071
|
expand: this._parseParam(request.query.expand),
|
|
7069
7072
|
where: this._parseParam(request.query.where),
|
|
7070
7073
|
limit: limit !== void 0 ? Number(limit) : void 0,
|
|
7071
7074
|
offset: offset !== void 0 ? Number(offset) : void 0
|
|
7072
|
-
}
|
|
7075
|
+
};
|
|
7076
|
+
for (const key in request.query) {
|
|
7077
|
+
if (key.startsWith("var.")) {
|
|
7078
|
+
const items = this._parseParam(request.query[key]);
|
|
7079
|
+
if (items) {
|
|
7080
|
+
params[key] = items.length === 1 ? items[0] : items;
|
|
7081
|
+
}
|
|
7082
|
+
}
|
|
7083
|
+
}
|
|
7084
|
+
const result = this.repository.query(getRepositoryContext(request), params);
|
|
7073
7085
|
return response.status(200).send(result);
|
|
7074
7086
|
}
|
|
7075
7087
|
getWithId(request, response) {
|