@labdigital/commercetools-mock 0.6.4 → 0.6.5
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/commercetools-mock.cjs.development.js +3 -1
- package/dist/commercetools-mock.cjs.development.js.map +1 -1
- package/dist/commercetools-mock.cjs.production.min.js +1 -1
- package/dist/commercetools-mock.cjs.production.min.js.map +1 -1
- package/dist/commercetools-mock.esm.js +3 -1
- package/dist/commercetools-mock.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/repositories/product-projection.ts +4 -0
package/package.json
CHANGED
|
@@ -50,6 +50,9 @@ export class ProductProjectionRepository extends AbstractResourceRepository {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
search(context: RepositoryContext, query: ParsedQs) {
|
|
53
|
+
const expand = query.expand
|
|
54
|
+
? (query.expand as string | string[])
|
|
55
|
+
: undefined
|
|
53
56
|
const filter = (query['filter.query'] ?? query.filter) as any
|
|
54
57
|
const wherePredicate = filter ? parseFilterExpression(filter) : undefined
|
|
55
58
|
|
|
@@ -57,6 +60,7 @@ export class ProductProjectionRepository extends AbstractResourceRepository {
|
|
|
57
60
|
where: wherePredicate,
|
|
58
61
|
offset: query.offset ? Number(query.offset) : undefined,
|
|
59
62
|
limit: query.limit ? Number(query.limit) : undefined,
|
|
63
|
+
expand,
|
|
60
64
|
}) //TODO: this is a partial implementation, but I don't really have the time to implement an actual search API right now
|
|
61
65
|
|
|
62
66
|
return results
|