@querypanel/node-sdk 1.2.4 → 1.2.5

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/README.md +31 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -366,6 +366,37 @@ dashboard.data.forEach(item => {
366
366
  });
367
367
  ```
368
368
 
369
+ ### All active charts (no pagination)
370
+
371
+ `listActiveCharts()` is **paginated** (default page size is small). To load every pinned chart for a tenant in one round trip, use `listAllActiveCharts()`, which calls **`GET /active-charts/all`** and returns `{ data }` from the API as a plain array.
372
+
373
+ ```ts
374
+ const all = await qp.listAllActiveCharts({
375
+ tenantId: "tenant_123",
376
+ withData: true, // optional: same as listActiveCharts — runs SQL per chart via your attached DB
377
+ });
378
+ ```
379
+
380
+ ### Bulk fetch by active-chart IDs
381
+
382
+ To load only specific dashboard tiles by their **active chart row IDs** (UUIDs from `createActiveChart` / `listActiveCharts`), use `getActiveChartsByIds()`. It calls **`GET /active-charts/bulk`** with query params `ids` (repeat or comma-separated). The API returns **`{ data, missingIds }`**: rows you are allowed to see, plus any requested IDs that were not found or not in scope.
383
+
384
+ ```ts
385
+ const { data, missingIds } = await qp.getActiveChartsByIds(
386
+ ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
387
+ {
388
+ tenantId: "tenant_123",
389
+ withData: true, // optional
390
+ },
391
+ );
392
+
393
+ if (missingIds.length) {
394
+ console.warn("Unknown or inaccessible active charts:", missingIds);
395
+ }
396
+ ```
397
+
398
+ The API accepts up to **100** UUIDs per request. Examples: `?ids=a&ids=b` or `?ids=a,b`.
399
+
369
400
  ## Deno Support
370
401
 
371
402
  The SDK is fully compatible with Deno (including Supabase Edge Functions) thanks to its use of Web Crypto API for JWT signing. No additional configuration needed:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@querypanel/node-sdk",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "TypeScript/Node.js SDK for the QueryPanel API",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",