@kweaver-ai/kweaver-sdk 0.4.11 → 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.
@@ -0,0 +1,303 @@
1
+ import { createInterface } from "node:readline";
2
+ import { ensureValidToken, formatHttpError, with401RefreshRetry } from "../auth/oauth.js";
3
+ import { deleteDataView, findDataView, getDataView, listDataViews, queryDataView, } from "../api/dataviews.js";
4
+ import { formatCallOutput } from "./call.js";
5
+ import { resolveBusinessDomain } from "../config/store.js";
6
+ function confirmYes(prompt) {
7
+ return new Promise((resolve) => {
8
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
9
+ rl.question(`${prompt} [y/N] `, (answer) => {
10
+ rl.close();
11
+ const trimmed = answer.trim().toLowerCase();
12
+ resolve(trimmed === "y" || trimmed === "yes");
13
+ });
14
+ });
15
+ }
16
+ export async function runDataviewCommand(args) {
17
+ const [subcommand, ...rest] = args;
18
+ if (!subcommand || subcommand === "--help" || subcommand === "-h") {
19
+ console.log(`kweaver dataview
20
+
21
+ Subcommands:
22
+ list [--datasource-id <id>] [--type <atomic|custom>] [--limit <n>] [-bd value] [--pretty]
23
+ find --name <name> [--exact] [--datasource-id <id>] [--wait] [--no-wait] [--timeout <ms>] [-bd value] [--pretty]
24
+ get <id> [-bd value] [--pretty]
25
+ query <id> [--sql <sql>] [--limit <n>] [--offset <n>] [--need-total] [-bd value] [--pretty]
26
+ delete <id> [-y] [-bd value]
27
+
28
+ list — list all data views (no keyword search)
29
+ find — search by name; default fuzzy, --exact for strict match, --wait to poll
30
+ query — run SQL query against a data view (mdl-uniquery); omit --sql to use view default SQL`);
31
+ return 0;
32
+ }
33
+ const dispatch = () => {
34
+ if (subcommand === "list")
35
+ return runDataviewListCommand(rest);
36
+ if (subcommand === "find")
37
+ return runDataviewFindCommand(rest);
38
+ if (subcommand === "get")
39
+ return runDataviewGetCommand(rest);
40
+ if (subcommand === "query")
41
+ return runDataviewQueryCommand(rest);
42
+ if (subcommand === "delete")
43
+ return runDataviewDeleteCommand(rest);
44
+ return Promise.resolve(-1);
45
+ };
46
+ try {
47
+ return await with401RefreshRetry(async () => {
48
+ const code = await dispatch();
49
+ if (code === -1) {
50
+ console.error(`Unknown dataview subcommand: ${subcommand}`);
51
+ return 1;
52
+ }
53
+ return code;
54
+ });
55
+ }
56
+ catch (error) {
57
+ console.error(formatHttpError(error));
58
+ return 1;
59
+ }
60
+ }
61
+ function parseDataviewCommonArgs(args) {
62
+ let businessDomain = "";
63
+ let pretty = true;
64
+ for (let i = 0; i < args.length; i += 1) {
65
+ const arg = args[i];
66
+ if ((arg === "-bd" || arg === "--biz-domain") && args[i + 1]) {
67
+ businessDomain = args[++i];
68
+ continue;
69
+ }
70
+ if (arg === "--pretty") {
71
+ pretty = true;
72
+ continue;
73
+ }
74
+ }
75
+ if (!businessDomain)
76
+ businessDomain = resolveBusinessDomain();
77
+ return { businessDomain, pretty };
78
+ }
79
+ async function runDataviewListCommand(args) {
80
+ let datasourceId;
81
+ let type;
82
+ let limit;
83
+ const { businessDomain, pretty } = parseDataviewCommonArgs(args);
84
+ for (let i = 0; i < args.length; i += 1) {
85
+ const arg = args[i];
86
+ if (arg === "-bd" || arg === "--biz-domain") {
87
+ i += 1;
88
+ continue;
89
+ }
90
+ if (arg === "--pretty")
91
+ continue;
92
+ if (arg === "--datasource-id" && args[i + 1]) {
93
+ datasourceId = args[++i];
94
+ continue;
95
+ }
96
+ if (arg === "--type" && args[i + 1]) {
97
+ type = args[++i];
98
+ continue;
99
+ }
100
+ if (arg === "--limit" && args[i + 1]) {
101
+ const n = Number.parseInt(args[++i], 10);
102
+ if (!Number.isNaN(n))
103
+ limit = n;
104
+ continue;
105
+ }
106
+ }
107
+ const token = await ensureValidToken();
108
+ const views = await listDataViews({
109
+ baseUrl: token.baseUrl,
110
+ accessToken: token.accessToken,
111
+ businessDomain,
112
+ datasourceId,
113
+ type,
114
+ limit,
115
+ });
116
+ console.log(formatCallOutput(JSON.stringify(views), pretty));
117
+ return 0;
118
+ }
119
+ async function runDataviewFindCommand(args) {
120
+ let datasourceId;
121
+ let name;
122
+ let exact = false;
123
+ let wait = false;
124
+ let timeoutMs = 30_000;
125
+ const { businessDomain, pretty } = parseDataviewCommonArgs(args);
126
+ for (let i = 0; i < args.length; i += 1) {
127
+ const arg = args[i];
128
+ if (arg === "-bd" || arg === "--biz-domain") {
129
+ i += 1;
130
+ continue;
131
+ }
132
+ if (arg === "--pretty")
133
+ continue;
134
+ if (arg === "--datasource-id" && args[i + 1]) {
135
+ datasourceId = args[++i];
136
+ continue;
137
+ }
138
+ if (arg === "--name" && args[i + 1]) {
139
+ name = args[++i];
140
+ continue;
141
+ }
142
+ if (arg === "--exact") {
143
+ exact = true;
144
+ continue;
145
+ }
146
+ if (arg === "--wait") {
147
+ wait = true;
148
+ continue;
149
+ }
150
+ if (arg === "--no-wait") {
151
+ wait = false;
152
+ continue;
153
+ }
154
+ if (arg === "--timeout" && args[i + 1]) {
155
+ timeoutMs = Number(args[++i]);
156
+ if (Number.isNaN(timeoutMs) || timeoutMs < 0) {
157
+ console.error("Invalid --timeout value");
158
+ return 1;
159
+ }
160
+ continue;
161
+ }
162
+ }
163
+ if (!name) {
164
+ console.error("Usage: kweaver dataview find --name <name> [--exact] [--datasource-id <id>] [--wait] [--timeout <ms>] [-bd value] [--pretty]");
165
+ return 1;
166
+ }
167
+ const token = await ensureValidToken();
168
+ const views = await findDataView({
169
+ baseUrl: token.baseUrl,
170
+ accessToken: token.accessToken,
171
+ businessDomain,
172
+ name,
173
+ datasourceId,
174
+ exact,
175
+ wait,
176
+ timeoutMs,
177
+ });
178
+ console.log(formatCallOutput(JSON.stringify(views), pretty));
179
+ return 0;
180
+ }
181
+ async function runDataviewGetCommand(args) {
182
+ const { businessDomain, pretty } = parseDataviewCommonArgs(args);
183
+ let id = "";
184
+ for (let i = 0; i < args.length; i += 1) {
185
+ const arg = args[i];
186
+ if (arg === "-bd" || arg === "--biz-domain") {
187
+ i += 1;
188
+ continue;
189
+ }
190
+ if (arg === "--pretty")
191
+ continue;
192
+ if (!arg.startsWith("-")) {
193
+ id = arg;
194
+ break;
195
+ }
196
+ }
197
+ if (!id) {
198
+ console.error("Usage: kweaver dataview get <id> [-bd value] [--pretty]");
199
+ return 1;
200
+ }
201
+ const token = await ensureValidToken();
202
+ const view = await getDataView({
203
+ baseUrl: token.baseUrl,
204
+ accessToken: token.accessToken,
205
+ businessDomain,
206
+ id,
207
+ });
208
+ console.log(formatCallOutput(JSON.stringify(view), pretty));
209
+ return 0;
210
+ }
211
+ async function runDataviewQueryCommand(args) {
212
+ const { businessDomain, pretty } = parseDataviewCommonArgs(args);
213
+ let sql;
214
+ let limit = 50;
215
+ let offset = 0;
216
+ let needTotal = false;
217
+ if (args.length === 0 || args[0].startsWith("-")) {
218
+ console.error("Usage: kweaver dataview query <id> [--sql <sql>] [--limit <n>] [--offset <n>] [--need-total] [-bd value] [--pretty]");
219
+ return 1;
220
+ }
221
+ const id = args[0];
222
+ const tail = args.slice(1);
223
+ for (let i = 0; i < tail.length; i += 1) {
224
+ const arg = tail[i];
225
+ if (arg === "-bd" || arg === "--biz-domain") {
226
+ i += 1;
227
+ continue;
228
+ }
229
+ if (arg === "--pretty")
230
+ continue;
231
+ if ((arg === "--sql" || arg === "-s") && tail[i + 1]) {
232
+ sql = tail[++i];
233
+ continue;
234
+ }
235
+ if (arg === "--limit" && tail[i + 1]) {
236
+ const n = Number.parseInt(tail[++i], 10);
237
+ if (!Number.isNaN(n))
238
+ limit = n;
239
+ continue;
240
+ }
241
+ if (arg === "--offset" && tail[i + 1]) {
242
+ const n = Number.parseInt(tail[++i], 10);
243
+ if (!Number.isNaN(n))
244
+ offset = n;
245
+ continue;
246
+ }
247
+ if (arg === "--need-total") {
248
+ needTotal = true;
249
+ continue;
250
+ }
251
+ }
252
+ const token = await ensureValidToken();
253
+ const result = await queryDataView({
254
+ baseUrl: token.baseUrl,
255
+ accessToken: token.accessToken,
256
+ businessDomain,
257
+ id,
258
+ sql,
259
+ offset,
260
+ limit,
261
+ needTotal,
262
+ });
263
+ console.log(formatCallOutput(JSON.stringify(result), pretty));
264
+ return 0;
265
+ }
266
+ async function runDataviewDeleteCommand(args) {
267
+ let id = "";
268
+ let yes = false;
269
+ let businessDomain = "";
270
+ for (let i = 0; i < args.length; i += 1) {
271
+ const arg = args[i];
272
+ if (arg === "--yes" || arg === "-y")
273
+ yes = true;
274
+ else if ((arg === "-bd" || arg === "--biz-domain") && args[i + 1]) {
275
+ businessDomain = args[++i];
276
+ continue;
277
+ }
278
+ else if (!arg.startsWith("-"))
279
+ id = arg;
280
+ }
281
+ if (!businessDomain)
282
+ businessDomain = resolveBusinessDomain();
283
+ if (!id) {
284
+ console.error("Usage: kweaver dataview delete <id> [-y] [-bd value]");
285
+ return 1;
286
+ }
287
+ if (!yes) {
288
+ const confirmed = await confirmYes("Are you sure you want to delete this data view?");
289
+ if (!confirmed) {
290
+ console.error("Aborted.");
291
+ return 1;
292
+ }
293
+ }
294
+ const token = await ensureValidToken();
295
+ await deleteDataView({
296
+ baseUrl: token.baseUrl,
297
+ accessToken: token.accessToken,
298
+ businessDomain,
299
+ id,
300
+ });
301
+ console.error(`Deleted ${id}`);
302
+ return 0;
303
+ }
@@ -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,6 +49,9 @@ 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, QueryDataViewOptions, DataViewQueryResult, } from "./api/dataviews.js";
53
+ export { parseDataView, createDataView, getDataView, listDataViews, deleteDataView, findDataView, queryDataView, } from "./api/dataviews.js";
54
+ export { DataViewsResource } from "./resources/dataviews.js";
52
55
  export { HttpError, NetworkRequestError, fetchTextOrThrow } from "./utils/http.js";
53
56
  export type { TokenConfig, ContextLoaderEntry, ContextLoaderConfig, } from "./config/store.js";
54
57
  export { getConfigDir, getCurrentPlatform } from "./config/store.js";
package/dist/index.js CHANGED
@@ -39,6 +39,8 @@ 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, queryDataView, } from "./api/dataviews.js";
43
+ export { DataViewsResource } from "./resources/dataviews.js";
42
44
  // ── HTTP utilities ────────────────────────────────────────────────────────────
43
45
  export { HttpError, NetworkRequestError, fetchTextOrThrow } from "./utils/http.js";
44
46
  export { getConfigDir, getCurrentPlatform } from "./config/store.js";
@@ -0,0 +1,17 @@
1
+ import { type DataflowCreateBody, type DataflowResult } from "../api/dataflow.js";
2
+ import type { ClientContext } from "../client.js";
3
+ export declare class DataflowsResource {
4
+ private readonly ctx;
5
+ constructor(ctx: ClientContext);
6
+ create(body: DataflowCreateBody): Promise<string>;
7
+ run(dagId: string): Promise<void>;
8
+ poll(dagId: string, opts?: {
9
+ interval?: number;
10
+ timeout?: number;
11
+ }): Promise<DataflowResult>;
12
+ delete(dagId: string): Promise<void>;
13
+ execute(body: DataflowCreateBody, opts?: {
14
+ interval?: number;
15
+ timeout?: number;
16
+ }): Promise<DataflowResult>;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { createDataflow, runDataflow, pollDataflowResults, deleteDataflow, executeDataflow, } from "../api/dataflow.js";
2
+ export class DataflowsResource {
3
+ ctx;
4
+ constructor(ctx) {
5
+ this.ctx = ctx;
6
+ }
7
+ async create(body) {
8
+ return createDataflow({ ...this.ctx.base(), body });
9
+ }
10
+ async run(dagId) {
11
+ return runDataflow({ ...this.ctx.base(), dagId });
12
+ }
13
+ async poll(dagId, opts = {}) {
14
+ return pollDataflowResults({ ...this.ctx.base(), dagId, ...opts });
15
+ }
16
+ async delete(dagId) {
17
+ return deleteDataflow({ ...this.ctx.base(), dagId });
18
+ }
19
+ async execute(body, opts = {}) {
20
+ return executeDataflow({ ...this.ctx.base(), body, ...opts });
21
+ }
22
+ }
@@ -0,0 +1,52 @@
1
+ import type { ClientContext } from "../client.js";
2
+ export declare class DataSourcesResource {
3
+ private readonly ctx;
4
+ constructor(ctx: ClientContext);
5
+ test(opts: {
6
+ type: string;
7
+ host: string;
8
+ port: number;
9
+ database: string;
10
+ account: string;
11
+ password: string;
12
+ schema?: string;
13
+ }): Promise<void>;
14
+ create(opts: {
15
+ name: string;
16
+ type: string;
17
+ host: string;
18
+ port: number;
19
+ database: string;
20
+ account: string;
21
+ password: string;
22
+ schema?: string;
23
+ comment?: string;
24
+ }): Promise<unknown>;
25
+ list(opts?: {
26
+ keyword?: string;
27
+ type?: string;
28
+ }): Promise<unknown[]>;
29
+ get(id: string): Promise<unknown>;
30
+ delete(id: string): Promise<void>;
31
+ listTables(id: string, opts?: {
32
+ keyword?: string;
33
+ limit?: number;
34
+ offset?: number;
35
+ }): Promise<unknown[]>;
36
+ listTablesWithColumns(id: string, opts?: {
37
+ keyword?: string;
38
+ limit?: number;
39
+ offset?: number;
40
+ autoScan?: boolean;
41
+ }): Promise<Array<{
42
+ name: string;
43
+ columns: Array<{
44
+ name: string;
45
+ type: string;
46
+ comment?: string;
47
+ }>;
48
+ }>>;
49
+ scanMetadata(id: string, opts?: {
50
+ dsType?: string;
51
+ }): Promise<string>;
52
+ }
@@ -0,0 +1,54 @@
1
+ import { testDatasource, createDatasource, listDatasources, getDatasource, deleteDatasource, listTables, listTablesWithColumns, scanMetadata, } from "../api/datasources.js";
2
+ export class DataSourcesResource {
3
+ ctx;
4
+ constructor(ctx) {
5
+ this.ctx = ctx;
6
+ }
7
+ async test(opts) {
8
+ await testDatasource({ ...this.ctx.base(), ...opts });
9
+ }
10
+ async create(opts) {
11
+ const raw = await createDatasource({ ...this.ctx.base(), ...opts });
12
+ return JSON.parse(raw);
13
+ }
14
+ async list(opts = {}) {
15
+ const raw = await listDatasources({ ...this.ctx.base(), ...opts });
16
+ const parsed = JSON.parse(raw);
17
+ if (Array.isArray(parsed))
18
+ return parsed;
19
+ if (parsed && typeof parsed === "object") {
20
+ const obj = parsed;
21
+ const items = obj.entries ?? obj.data ?? obj.records;
22
+ if (Array.isArray(items))
23
+ return items;
24
+ }
25
+ return [];
26
+ }
27
+ async get(id) {
28
+ const raw = await getDatasource({ ...this.ctx.base(), id });
29
+ return JSON.parse(raw);
30
+ }
31
+ async delete(id) {
32
+ await deleteDatasource({ ...this.ctx.base(), id });
33
+ }
34
+ async listTables(id, opts = {}) {
35
+ const raw = await listTables({ ...this.ctx.base(), id, ...opts });
36
+ const parsed = JSON.parse(raw);
37
+ if (Array.isArray(parsed))
38
+ return parsed;
39
+ if (parsed && typeof parsed === "object") {
40
+ const obj = parsed;
41
+ const items = obj.entries ?? obj.data;
42
+ if (Array.isArray(items))
43
+ return items;
44
+ }
45
+ return [];
46
+ }
47
+ async listTablesWithColumns(id, opts = {}) {
48
+ const raw = await listTablesWithColumns({ ...this.ctx.base(), id, ...opts });
49
+ return JSON.parse(raw);
50
+ }
51
+ async scanMetadata(id, opts = {}) {
52
+ return scanMetadata({ ...this.ctx.base(), id, ...opts });
53
+ }
54
+ }
@@ -0,0 +1,37 @@
1
+ import type { DataView, DataViewQueryResult } from "../api/dataviews.js";
2
+ import type { ClientContext } from "../client.js";
3
+ export declare class DataViewsResource {
4
+ private readonly ctx;
5
+ constructor(ctx: ClientContext);
6
+ create(opts: {
7
+ name: string;
8
+ datasourceId: string;
9
+ table: string;
10
+ fields?: Array<{
11
+ name: string;
12
+ type: string;
13
+ }>;
14
+ }): Promise<string>;
15
+ get(id: string): Promise<DataView>;
16
+ list(opts?: {
17
+ datasourceId?: string;
18
+ type?: string;
19
+ limit?: number;
20
+ }): Promise<DataView[]>;
21
+ find(name: string, opts?: {
22
+ datasourceId?: string;
23
+ exact?: boolean;
24
+ wait?: boolean;
25
+ timeoutMs?: number;
26
+ }): Promise<DataView[]>;
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>;
37
+ }
@@ -0,0 +1,47 @@
1
+ import { createDataView, deleteDataView, findDataView, getDataView, listDataViews, queryDataView, } from "../api/dataviews.js";
2
+ export class DataViewsResource {
3
+ ctx;
4
+ constructor(ctx) {
5
+ this.ctx = ctx;
6
+ }
7
+ async create(opts) {
8
+ return createDataView({ ...this.ctx.base(), ...opts });
9
+ }
10
+ async get(id) {
11
+ return getDataView({ ...this.ctx.base(), id });
12
+ }
13
+ async list(opts = {}) {
14
+ return listDataViews({
15
+ ...this.ctx.base(),
16
+ datasourceId: opts.datasourceId,
17
+ type: opts.type,
18
+ limit: opts.limit,
19
+ });
20
+ }
21
+ async find(name, opts) {
22
+ return findDataView({
23
+ ...this.ctx.base(),
24
+ name,
25
+ datasourceId: opts?.datasourceId,
26
+ exact: opts?.exact,
27
+ wait: opts?.wait,
28
+ timeoutMs: opts?.timeoutMs,
29
+ });
30
+ }
31
+ async delete(id) {
32
+ await deleteDataView({ ...this.ctx.base(), id });
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
+ }
47
+ }
@@ -0,0 +1,41 @@
1
+ import type { ClientContext } from "../client.js";
2
+ export declare class VegaResource {
3
+ private readonly ctx;
4
+ constructor(ctx: ClientContext);
5
+ health(): Promise<unknown>;
6
+ listCatalogs(opts?: {
7
+ status?: string;
8
+ limit?: number;
9
+ offset?: number;
10
+ }): Promise<unknown[]>;
11
+ getCatalog(id: string): Promise<unknown>;
12
+ catalogHealthStatus(ids: string): Promise<unknown>;
13
+ testCatalogConnection(id: string): Promise<unknown>;
14
+ discoverCatalog(id: string, opts?: {
15
+ wait?: boolean;
16
+ }): Promise<unknown>;
17
+ listCatalogResources(id: string, opts?: {
18
+ category?: string;
19
+ limit?: number;
20
+ offset?: number;
21
+ }): Promise<unknown[]>;
22
+ listResources(opts?: {
23
+ catalogId?: string;
24
+ category?: string;
25
+ status?: string;
26
+ limit?: number;
27
+ offset?: number;
28
+ }): Promise<unknown[]>;
29
+ getResource(id: string): Promise<unknown>;
30
+ queryResourceData(id: string, body: string): Promise<unknown>;
31
+ previewResource(id: string, opts?: {
32
+ limit?: number;
33
+ }): Promise<unknown>;
34
+ listConnectorTypes(): Promise<unknown[]>;
35
+ getConnectorType(type: string): Promise<unknown>;
36
+ listDiscoverTasks(opts?: {
37
+ status?: string;
38
+ limit?: number;
39
+ offset?: number;
40
+ }): Promise<unknown[]>;
41
+ }