@kweaver-ai/kweaver-sdk 0.4.12 → 0.4.13

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.
@@ -219,14 +219,14 @@ async function runCatalogList(args) {
219
219
 
220
220
  Options:
221
221
  --status <s> Filter by status
222
- --limit <n> Max results
222
+ --limit <n> Max results (default: 30)
223
223
  --offset <n> Offset
224
224
  -bd, --biz-domain Business domain (default: bd_public)
225
225
  --pretty Pretty-print JSON (default)`);
226
226
  return 0;
227
227
  }
228
228
  let status;
229
- let limit;
229
+ let limit = 30;
230
230
  let offset;
231
231
  const { remaining, businessDomain, pretty } = parseCommonFlags(args);
232
232
  for (let i = 0; i < remaining.length; i += 1) {
@@ -383,11 +383,11 @@ async function runCatalogResources(args) {
383
383
 
384
384
  Options:
385
385
  --category <s> Filter by category
386
- --limit <n> Max results`);
386
+ --limit <n> Max results (default: 30)`);
387
387
  return 0;
388
388
  }
389
389
  let category;
390
- let limit;
390
+ let limit = 30;
391
391
  const { remaining, businessDomain, pretty } = parseCommonFlags(args);
392
392
  const positionals = [];
393
393
  for (let i = 0; i < remaining.length; i += 1) {
@@ -458,7 +458,7 @@ Options:
458
458
  --catalog-id <s> Filter by catalog
459
459
  --category <s> Filter by category
460
460
  --status <s> Filter by status
461
- --limit <n> Max results
461
+ --limit <n> Max results (default: 30)
462
462
  --offset <n> Offset
463
463
  -bd, --biz-domain Business domain (default: bd_public)
464
464
  --pretty Pretty-print JSON (default)`);
@@ -467,7 +467,7 @@ Options:
467
467
  let catalogId;
468
468
  let category;
469
469
  let status;
470
- let limit;
470
+ let limit = 30;
471
471
  let offset;
472
472
  const { remaining, businessDomain, pretty } = parseCommonFlags(args);
473
473
  for (let i = 0; i < remaining.length; i += 1) {
@@ -579,7 +579,7 @@ async function runResourcePreview(args) {
579
579
  console.log(`kweaver vega resource preview <id> [--limit N]
580
580
 
581
581
  Options:
582
- --limit <n> Number of rows to preview (default: 10)`);
582
+ --limit <n> Number of rows to preview (default: 50)`);
583
583
  return 0;
584
584
  }
585
585
  let limit;
package/dist/index.d.ts CHANGED
@@ -49,8 +49,8 @@ export type { AgentConfig, AgentInput, AgentInputField, AgentOutput, AgentLlmCon
49
49
  export { BknResource } from "./resources/bkn.js";
50
50
  export { ConversationsResource } from "./resources/conversations.js";
51
51
  export { ContextLoaderResource } from "./resources/context-loader.js";
52
- export type { ViewField, DataView, CreateDataViewOptions, GetDataViewOptions, ListDataViewsOptions, DeleteDataViewOptions, FindDataViewOptions, } from "./api/dataviews.js";
53
- export { parseDataView, createDataView, getDataView, listDataViews, deleteDataView, findDataView, } from "./api/dataviews.js";
52
+ export type { ViewField, DataView, CreateDataViewOptions, GetDataViewOptions, ListDataViewsOptions, DeleteDataViewOptions, FindDataViewOptions, QueryDataViewOptions, DataViewQueryResult, } from "./api/dataviews.js";
53
+ export { parseDataView, createDataView, getDataView, listDataViews, deleteDataView, findDataView, queryDataView, } from "./api/dataviews.js";
54
54
  export { DataViewsResource } from "./resources/dataviews.js";
55
55
  export { HttpError, NetworkRequestError, fetchTextOrThrow } from "./utils/http.js";
56
56
  export type { TokenConfig, ContextLoaderEntry, ContextLoaderConfig, } from "./config/store.js";
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ export { AgentsResource } from "./resources/agents.js";
39
39
  export { BknResource } from "./resources/bkn.js";
40
40
  export { ConversationsResource } from "./resources/conversations.js";
41
41
  export { ContextLoaderResource } from "./resources/context-loader.js";
42
- export { parseDataView, createDataView, getDataView, listDataViews, deleteDataView, findDataView, } from "./api/dataviews.js";
42
+ export { parseDataView, createDataView, getDataView, listDataViews, deleteDataView, findDataView, queryDataView, } from "./api/dataviews.js";
43
43
  export { DataViewsResource } from "./resources/dataviews.js";
44
44
  // ── HTTP utilities ────────────────────────────────────────────────────────────
45
45
  export { HttpError, NetworkRequestError, fetchTextOrThrow } from "./utils/http.js";
@@ -1,4 +1,4 @@
1
- import type { DataView } from "../api/dataviews.js";
1
+ import type { DataView, DataViewQueryResult } from "../api/dataviews.js";
2
2
  import type { ClientContext } from "../client.js";
3
3
  export declare class DataViewsResource {
4
4
  private readonly ctx;
@@ -25,4 +25,13 @@ export declare class DataViewsResource {
25
25
  timeoutMs?: number;
26
26
  }): Promise<DataView[]>;
27
27
  delete(id: string): Promise<void>;
28
+ query(id: string, opts?: {
29
+ sql?: string;
30
+ offset?: number;
31
+ limit?: number;
32
+ needTotal?: boolean;
33
+ outputFields?: string[];
34
+ filters?: Record<string, unknown>;
35
+ sort?: Array<Record<string, unknown>>;
36
+ }): Promise<DataViewQueryResult>;
28
37
  }
@@ -1,4 +1,4 @@
1
- import { createDataView, deleteDataView, findDataView, getDataView, listDataViews, } from "../api/dataviews.js";
1
+ import { createDataView, deleteDataView, findDataView, getDataView, listDataViews, queryDataView, } from "../api/dataviews.js";
2
2
  export class DataViewsResource {
3
3
  ctx;
4
4
  constructor(ctx) {
@@ -31,4 +31,17 @@ export class DataViewsResource {
31
31
  async delete(id) {
32
32
  await deleteDataView({ ...this.ctx.base(), id });
33
33
  }
34
+ async query(id, opts) {
35
+ return queryDataView({
36
+ ...this.ctx.base(),
37
+ id,
38
+ sql: opts?.sql,
39
+ offset: opts?.offset,
40
+ limit: opts?.limit,
41
+ needTotal: opts?.needTotal,
42
+ outputFields: opts?.outputFields,
43
+ filters: opts?.filters,
44
+ sort: opts?.sort,
45
+ });
46
+ }
34
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kweaver-ai/kweaver-sdk",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "KWeaver TypeScript SDK — CLI tool and programmatic API for knowledge networks and Decision Agents.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",