(filters = {}, mapping = {})
| 518 | }, |
| 519 | |
| 520 | toQuery(filters = {}, mapping = {}) { |
| 521 | const normalized = this.normalize(filters); |
| 522 | const params = new URLSearchParams(); |
| 523 | Object.entries(normalized).forEach(([key, value]) => { |
| 524 | const targetKey = String(mapping[key] || key); |
| 525 | if (!targetKey) return; |
| 526 | if (Array.isArray(value)) { |
| 527 | value.forEach((item) => params.append(targetKey, String(item))); |
| 528 | return; |
| 529 | } |
| 530 | params.set(targetKey, String(value)); |
| 531 | }); |
| 532 | return params; |
| 533 | }, |
| 534 | |
| 535 | toPayload(filters = {}, mapping = {}) { |
| 536 | const normalized = this.normalize(filters); |
nothing calls this directly
no outgoing calls
no test coverage detected