(path: string, query: Record<string, string | string[]> | undefined)
| 2224 | } |
| 2225 | |
| 2226 | private makeNormalizedUrl(path: string, query: Record<string, string | string[]> | undefined) { |
| 2227 | const url = new URL(this.makeLinkUrl(path)); |
| 2228 | for (const [key, value] of Object.entries(query ?? {})) { |
| 2229 | if ( |
| 2230 | key.startsWith('filter[') || |
| 2231 | key.startsWith('sort[') || |
| 2232 | key === 'include' || |
| 2233 | key.startsWith('include[') || |
| 2234 | key.startsWith('fields[') |
| 2235 | ) { |
| 2236 | for (const v of enumerate(value)) { |
| 2237 | url.searchParams.append(key, v); |
| 2238 | } |
| 2239 | } |
| 2240 | } |
| 2241 | return url.toString(); |
| 2242 | } |
| 2243 | |
| 2244 | private getPagination(query: Record<string, string | string[]> | undefined) { |
| 2245 | if (!query) { |
no test coverage detected