feat(modules-sdk): remote query context filter (#7153)

What:

- Remote query now handles `context` keywork in the arguments to forward it as a filter to the method `list`
- Pricing module `list` method returning `calculated_price` if requested as a field
This commit is contained in:
Carlos R. L. Rodrigues
2024-04-26 07:20:42 -03:00
committed by GitHub
parent aef222278b
commit 4b57c5d286
10 changed files with 202 additions and 21 deletions

View File

@@ -191,7 +191,9 @@ export class RemoteQuery {
for (const arg of expand.args || []) {
if (arg.name === "filters" && arg.value) {
filters = { ...arg.value }
filters = { ...filters, ...arg.value }
} else if (arg.name === "context" && arg.value) {
filters["context"] = arg.value
} else if (availableOptions.includes(arg.name)) {
const argName = availableOptionsAlias.has(arg.name)
? availableOptionsAlias.get(arg.name)!