@bunbase-ae/js 1.0.1-next.3.ee6c18d → 1.0.1-next.4.aa72459

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/admin.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunbase-ae/js",
3
- "version": "1.0.1-next.3.ee6c18d",
3
+ "version": "1.0.1-next.4.aa72459",
4
4
  "type": "module",
5
5
  "description": "TypeScript/JavaScript SDK for BunBase",
6
6
  "homepage": "https://docs-bunbase.palmcode.ae/sdk/javascript",
package/src/admin.ts CHANGED
@@ -520,7 +520,11 @@ class AdminCollectionsClient {
520
520
  if (opts.sort) params.sort = opts.sort;
521
521
  if (opts.includeDeleted) params.include_deleted = "true";
522
522
  if (opts.search) params.search = opts.search;
523
- if (opts.filter) Object.assign(params, opts.filter);
523
+ if (opts.filter) {
524
+ for (const [field, value] of Object.entries(opts.filter)) {
525
+ params[`filter[${field}]`] = value;
526
+ }
527
+ }
524
528
  return this.http.request<AdminListResult<AdminRecord>>(
525
529
  "GET",
526
530
  `/api/v1/admin/collections/${collection}/records`,