@gen3/core 0.12.34 → 0.12.36

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/cjs/index.js CHANGED
@@ -6574,9 +6574,31 @@ const { usePValueQuery } = pValueSlice;
6574
6574
  const indexdApi = gen3Api.injectEndpoints({
6575
6575
  endpoints: (builder)=>({
6576
6576
  getIndexdMetdata: builder.query({
6577
- query: ({ filters, limit = 1000 })=>{
6577
+ query: ({ filters, params })=>{
6578
6578
  const query = filters.reduce((acc, filter)=>`${acc}&${filter.key}=${filter.value}`, '');
6579
- return `${GEN3_INDEXD_API}/index?${query}&limit=${limit}`;
6579
+ const formattedParams = [];
6580
+ Object.entries(params || {}).forEach(([k, v])=>{
6581
+ if (v) {
6582
+ if (typeof v === "number") {
6583
+ formattedParams.push([
6584
+ k,
6585
+ v.toString()
6586
+ ]);
6587
+ } else if (Array.isArray(v)) {
6588
+ v.forEach((v)=>formattedParams.push([
6589
+ k,
6590
+ v
6591
+ ]));
6592
+ } else {
6593
+ formattedParams.push([
6594
+ k,
6595
+ v
6596
+ ]);
6597
+ }
6598
+ }
6599
+ });
6600
+ const queryString = new URLSearchParams(formattedParams).toString();
6601
+ return `${GEN3_INDEXD_API}/index?${query}&${queryString}`;
6580
6602
  }
6581
6603
  }),
6582
6604
  getIndexObject: builder.query({