@kweaver-ai/kweaver-sdk 0.4.14 → 0.5.0
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/api/conversations.d.ts +6 -0
- package/dist/api/conversations.js +21 -0
- package/dist/api/vega.d.ts +76 -3
- package/dist/api/vega.js +145 -10
- package/dist/cli.js +1 -1
- package/dist/commands/agent.d.ts +5 -0
- package/dist/commands/agent.js +74 -2
- package/dist/commands/vega.js +640 -21
- package/dist/resources/vega.d.ts +17 -3
- package/dist/resources/vega.js +44 -4
- package/package.json +1 -1
package/dist/resources/vega.d.ts
CHANGED
|
@@ -9,6 +9,15 @@ export declare class VegaResource {
|
|
|
9
9
|
offset?: number;
|
|
10
10
|
}): Promise<unknown[]>;
|
|
11
11
|
getCatalog(id: string): Promise<unknown>;
|
|
12
|
+
createCatalog(data: {
|
|
13
|
+
name: string;
|
|
14
|
+
connector_type: string;
|
|
15
|
+
connector_config: Record<string, unknown>;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
description?: string;
|
|
18
|
+
}): Promise<unknown>;
|
|
19
|
+
updateCatalog(id: string, body: string): Promise<unknown>;
|
|
20
|
+
deleteCatalogs(ids: string): Promise<unknown>;
|
|
12
21
|
catalogHealthStatus(ids: string): Promise<unknown>;
|
|
13
22
|
testCatalogConnection(id: string): Promise<unknown>;
|
|
14
23
|
discoverCatalog(id: string, opts?: {
|
|
@@ -28,14 +37,19 @@ export declare class VegaResource {
|
|
|
28
37
|
}): Promise<unknown[]>;
|
|
29
38
|
getResource(id: string): Promise<unknown>;
|
|
30
39
|
queryResourceData(id: string, body: string): Promise<unknown>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
createResource(body: string): Promise<unknown>;
|
|
41
|
+
updateResource(id: string, body: string): Promise<unknown>;
|
|
42
|
+
deleteResources(ids: string): Promise<unknown>;
|
|
34
43
|
listConnectorTypes(): Promise<unknown[]>;
|
|
35
44
|
getConnectorType(type: string): Promise<unknown>;
|
|
45
|
+
registerConnectorType(body: string): Promise<unknown>;
|
|
46
|
+
updateConnectorType(type: string, body: string): Promise<unknown>;
|
|
47
|
+
deleteConnectorType(type: string): Promise<unknown>;
|
|
48
|
+
setConnectorTypeEnabled(type: string, enabled: boolean): Promise<unknown>;
|
|
36
49
|
listDiscoverTasks(opts?: {
|
|
37
50
|
status?: string;
|
|
38
51
|
limit?: number;
|
|
39
52
|
offset?: number;
|
|
40
53
|
}): Promise<unknown[]>;
|
|
54
|
+
getDiscoverTask(id: string): Promise<unknown>;
|
|
41
55
|
}
|
package/dist/resources/vega.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vegaHealth, listVegaCatalogs, getVegaCatalog, vegaCatalogHealthStatus, testVegaCatalogConnection, discoverVegaCatalog, listVegaCatalogResources, listVegaResources, getVegaResource, queryVegaResourceData,
|
|
1
|
+
import { vegaHealth, listVegaCatalogs, getVegaCatalog, createVegaCatalog, updateVegaCatalog, deleteVegaCatalogs, vegaCatalogHealthStatus, testVegaCatalogConnection, discoverVegaCatalog, listVegaCatalogResources, listVegaResources, getVegaResource, queryVegaResourceData, createVegaResource, updateVegaResource, deleteVegaResources, listVegaConnectorTypes, getVegaConnectorType, registerVegaConnectorType, updateVegaConnectorType, deleteVegaConnectorType, setVegaConnectorTypeEnabled, listVegaDiscoverTasks, getVegaDiscoverTask, } from "../api/vega.js";
|
|
2
2
|
function unwrapArray(raw) {
|
|
3
3
|
const parsed = JSON.parse(raw);
|
|
4
4
|
if (Array.isArray(parsed))
|
|
@@ -30,6 +30,18 @@ export class VegaResource {
|
|
|
30
30
|
const raw = await getVegaCatalog({ ...this.ctx.base(), id });
|
|
31
31
|
return JSON.parse(raw);
|
|
32
32
|
}
|
|
33
|
+
async createCatalog(data) {
|
|
34
|
+
const raw = await createVegaCatalog({ ...this.ctx.base(), body: JSON.stringify(data) });
|
|
35
|
+
return raw ? JSON.parse(raw) : {};
|
|
36
|
+
}
|
|
37
|
+
async updateCatalog(id, body) {
|
|
38
|
+
const raw = await updateVegaCatalog({ ...this.ctx.base(), id, body });
|
|
39
|
+
return raw ? JSON.parse(raw) : {};
|
|
40
|
+
}
|
|
41
|
+
async deleteCatalogs(ids) {
|
|
42
|
+
const raw = await deleteVegaCatalogs({ ...this.ctx.base(), ids });
|
|
43
|
+
return raw ? JSON.parse(raw) : {};
|
|
44
|
+
}
|
|
33
45
|
async catalogHealthStatus(ids) {
|
|
34
46
|
const raw = await vegaCatalogHealthStatus({ ...this.ctx.base(), ids });
|
|
35
47
|
return JSON.parse(raw);
|
|
@@ -59,9 +71,17 @@ export class VegaResource {
|
|
|
59
71
|
const raw = await queryVegaResourceData({ ...this.ctx.base(), id, body });
|
|
60
72
|
return JSON.parse(raw);
|
|
61
73
|
}
|
|
62
|
-
async
|
|
63
|
-
const raw = await
|
|
64
|
-
return JSON.parse(raw);
|
|
74
|
+
async createResource(body) {
|
|
75
|
+
const raw = await createVegaResource({ ...this.ctx.base(), body });
|
|
76
|
+
return raw ? JSON.parse(raw) : {};
|
|
77
|
+
}
|
|
78
|
+
async updateResource(id, body) {
|
|
79
|
+
const raw = await updateVegaResource({ ...this.ctx.base(), id, body });
|
|
80
|
+
return raw ? JSON.parse(raw) : {};
|
|
81
|
+
}
|
|
82
|
+
async deleteResources(ids) {
|
|
83
|
+
const raw = await deleteVegaResources({ ...this.ctx.base(), ids });
|
|
84
|
+
return raw ? JSON.parse(raw) : {};
|
|
65
85
|
}
|
|
66
86
|
// ── Connector Types ─────────────────────────────────────────────────────────
|
|
67
87
|
async listConnectorTypes() {
|
|
@@ -72,9 +92,29 @@ export class VegaResource {
|
|
|
72
92
|
const raw = await getVegaConnectorType({ ...this.ctx.base(), type });
|
|
73
93
|
return JSON.parse(raw);
|
|
74
94
|
}
|
|
95
|
+
async registerConnectorType(body) {
|
|
96
|
+
const raw = await registerVegaConnectorType({ ...this.ctx.base(), body });
|
|
97
|
+
return JSON.parse(raw);
|
|
98
|
+
}
|
|
99
|
+
async updateConnectorType(type, body) {
|
|
100
|
+
const raw = await updateVegaConnectorType({ ...this.ctx.base(), type, body });
|
|
101
|
+
return raw ? JSON.parse(raw) : {};
|
|
102
|
+
}
|
|
103
|
+
async deleteConnectorType(type) {
|
|
104
|
+
const raw = await deleteVegaConnectorType({ ...this.ctx.base(), type });
|
|
105
|
+
return raw ? JSON.parse(raw) : {};
|
|
106
|
+
}
|
|
107
|
+
async setConnectorTypeEnabled(type, enabled) {
|
|
108
|
+
const raw = await setVegaConnectorTypeEnabled({ ...this.ctx.base(), type, enabled });
|
|
109
|
+
return raw ? JSON.parse(raw) : {};
|
|
110
|
+
}
|
|
75
111
|
// ── Discover Tasks ──────────────────────────────────────────────────────────
|
|
76
112
|
async listDiscoverTasks(opts = {}) {
|
|
77
113
|
const raw = await listVegaDiscoverTasks({ ...this.ctx.base(), ...opts });
|
|
78
114
|
return unwrapArray(raw);
|
|
79
115
|
}
|
|
116
|
+
async getDiscoverTask(id) {
|
|
117
|
+
const raw = await getVegaDiscoverTask({ ...this.ctx.base(), id });
|
|
118
|
+
return JSON.parse(raw);
|
|
119
|
+
}
|
|
80
120
|
}
|
package/package.json
CHANGED