@robosystems/client 0.2.11 → 0.2.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.
- package/extensions/AgentClient.d.ts +82 -0
- package/extensions/AgentClient.js +218 -0
- package/extensions/AgentClient.ts +321 -0
- package/extensions/QueryClient.js +85 -37
- package/extensions/QueryClient.ts +82 -34
- package/extensions/index.d.ts +8 -1
- package/extensions/index.js +19 -1
- package/extensions/index.ts +22 -1
- package/package.json +1 -1
- package/sdk/sdk.gen.d.ts +63 -49
- package/sdk/sdk.gen.js +100 -106
- package/sdk/sdk.gen.ts +98 -104
- package/sdk/types.gen.d.ts +124 -163
- package/sdk/types.gen.ts +135 -181
- package/sdk-extensions/AgentClient.d.ts +82 -0
- package/sdk-extensions/AgentClient.js +218 -0
- package/sdk-extensions/AgentClient.ts +321 -0
- package/sdk-extensions/QueryClient.js +85 -37
- package/sdk-extensions/QueryClient.ts +82 -34
- package/sdk-extensions/index.d.ts +8 -1
- package/sdk-extensions/index.js +19 -1
- package/sdk-extensions/index.ts +22 -1
- package/sdk.gen.d.ts +63 -49
- package/sdk.gen.js +100 -106
- package/sdk.gen.ts +98 -104
- package/types.gen.d.ts +124 -163
- package/types.gen.ts +135 -181
|
@@ -75,19 +75,31 @@ export class QueryClient {
|
|
|
75
75
|
mode: options.mode,
|
|
76
76
|
test_mode: options.testMode,
|
|
77
77
|
},
|
|
78
|
+
// For streaming mode, don't parse response - get raw Response object
|
|
79
|
+
...(options.mode === 'stream' ? { parseAs: 'stream' as const } : {}),
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
// Execute the query
|
|
81
82
|
const response = await executeCypherQuery(data)
|
|
82
83
|
|
|
83
|
-
// Check if this is
|
|
84
|
-
|
|
85
|
-
if (response.response) {
|
|
84
|
+
// Check if this is a raw stream response (when parseAs: 'stream')
|
|
85
|
+
if (options.mode === 'stream' && response.response) {
|
|
86
86
|
const contentType = response.response.headers.get('content-type') || ''
|
|
87
|
-
const streamFormat = response.response.headers.get('x-stream-format')
|
|
88
87
|
|
|
89
|
-
if (contentType.includes('application/x-ndjson')
|
|
88
|
+
if (contentType.includes('application/x-ndjson')) {
|
|
90
89
|
return this.parseNDJSONResponse(response.response, graphId)
|
|
90
|
+
} else if (contentType.includes('application/json')) {
|
|
91
|
+
// Fallback: parse JSON manually
|
|
92
|
+
const data = await response.response.json()
|
|
93
|
+
if (data.data !== undefined && data.columns) {
|
|
94
|
+
return {
|
|
95
|
+
data: data.data,
|
|
96
|
+
columns: data.columns,
|
|
97
|
+
row_count: data.row_count || data.data.length,
|
|
98
|
+
execution_time_ms: data.execution_time_ms || 0,
|
|
99
|
+
graph_id: graphId,
|
|
100
|
+
timestamp: data.timestamp || new Date().toISOString(),
|
|
101
|
+
}
|
|
102
|
+
}
|
|
91
103
|
}
|
|
92
104
|
}
|
|
93
105
|
|
|
@@ -118,11 +130,7 @@ export class QueryClient {
|
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
// Use SSE to monitor the operation
|
|
121
|
-
|
|
122
|
-
return this.streamQueryResults(queuedResponse.operation_id, options)
|
|
123
|
-
} else {
|
|
124
|
-
return this.waitForQueryCompletion(queuedResponse.operation_id, options)
|
|
125
|
-
}
|
|
133
|
+
return this.waitForQueryCompletion(queuedResponse.operation_id, options)
|
|
126
134
|
}
|
|
127
135
|
|
|
128
136
|
// Unexpected response format
|
|
@@ -135,37 +143,77 @@ export class QueryClient {
|
|
|
135
143
|
let totalRows = 0
|
|
136
144
|
let executionTimeMs = 0
|
|
137
145
|
|
|
138
|
-
//
|
|
139
|
-
const
|
|
140
|
-
|
|
146
|
+
// Use streaming reader to avoid "body already read" error
|
|
147
|
+
const reader = response.body?.getReader()
|
|
148
|
+
if (!reader) {
|
|
149
|
+
throw new Error('Response body is not readable')
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const decoder = new TextDecoder()
|
|
153
|
+
let buffer = ''
|
|
141
154
|
|
|
142
|
-
|
|
143
|
-
|
|
155
|
+
try {
|
|
156
|
+
while (true) {
|
|
157
|
+
const { done, value } = await reader.read()
|
|
158
|
+
if (done) break
|
|
144
159
|
|
|
145
|
-
|
|
146
|
-
const
|
|
160
|
+
buffer += decoder.decode(value, { stream: true })
|
|
161
|
+
const lines = buffer.split('\n')
|
|
162
|
+
buffer = lines.pop() || ''
|
|
147
163
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
164
|
+
for (const line of lines) {
|
|
165
|
+
if (!line.trim()) continue
|
|
166
|
+
|
|
167
|
+
try {
|
|
168
|
+
const chunk = JSON.parse(line)
|
|
152
169
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
170
|
+
// Extract columns from first chunk
|
|
171
|
+
if (columns === null && chunk.columns) {
|
|
172
|
+
columns = chunk.columns
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Aggregate data rows (NDJSON uses "rows", regular JSON uses "data")
|
|
176
|
+
if (chunk.rows) {
|
|
177
|
+
allData.push(...chunk.rows)
|
|
178
|
+
totalRows += chunk.rows.length
|
|
179
|
+
} else if (chunk.data) {
|
|
180
|
+
allData.push(...chunk.data)
|
|
181
|
+
totalRows += chunk.data.length
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Track execution time (use max from all chunks)
|
|
185
|
+
if (chunk.execution_time_ms) {
|
|
186
|
+
executionTimeMs = Math.max(executionTimeMs, chunk.execution_time_ms)
|
|
187
|
+
}
|
|
188
|
+
} catch (error) {
|
|
189
|
+
console.error('Failed to parse NDJSON line:', error)
|
|
190
|
+
}
|
|
160
191
|
}
|
|
192
|
+
}
|
|
161
193
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
194
|
+
// Parse any remaining buffer
|
|
195
|
+
if (buffer.trim()) {
|
|
196
|
+
try {
|
|
197
|
+
const chunk = JSON.parse(buffer)
|
|
198
|
+
if (columns === null && chunk.columns) {
|
|
199
|
+
columns = chunk.columns
|
|
200
|
+
}
|
|
201
|
+
if (chunk.rows) {
|
|
202
|
+
allData.push(...chunk.rows)
|
|
203
|
+
totalRows += chunk.rows.length
|
|
204
|
+
} else if (chunk.data) {
|
|
205
|
+
allData.push(...chunk.data)
|
|
206
|
+
totalRows += chunk.data.length
|
|
207
|
+
}
|
|
208
|
+
if (chunk.execution_time_ms) {
|
|
209
|
+
executionTimeMs = Math.max(executionTimeMs, chunk.execution_time_ms)
|
|
210
|
+
}
|
|
211
|
+
} catch (error) {
|
|
212
|
+
console.error('Failed to parse final NDJSON line:', error)
|
|
165
213
|
}
|
|
166
|
-
} catch (error) {
|
|
167
|
-
throw new Error(`Failed to parse NDJSON line: ${error}`)
|
|
168
214
|
}
|
|
215
|
+
} catch (error) {
|
|
216
|
+
throw new Error(`NDJSON stream reading error: ${error}`)
|
|
169
217
|
}
|
|
170
218
|
|
|
171
219
|
// Return aggregated result
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { OperationClient } from './OperationClient';
|
|
6
6
|
import { QueryClient } from './QueryClient';
|
|
7
|
+
import { AgentClient } from './AgentClient';
|
|
7
8
|
import { SSEClient } from './SSEClient';
|
|
8
9
|
import { TableIngestClient } from './TableIngestClient';
|
|
9
10
|
import { GraphClient } from './GraphClient';
|
|
@@ -17,6 +18,7 @@ export interface RoboSystemsExtensionConfig {
|
|
|
17
18
|
}
|
|
18
19
|
export declare class RoboSystemsExtensions {
|
|
19
20
|
readonly query: QueryClient;
|
|
21
|
+
readonly agent: AgentClient;
|
|
20
22
|
readonly operations: OperationClient;
|
|
21
23
|
readonly tables: TableIngestClient;
|
|
22
24
|
readonly graphs: GraphClient;
|
|
@@ -37,13 +39,16 @@ export declare class RoboSystemsExtensions {
|
|
|
37
39
|
}
|
|
38
40
|
export * from './OperationClient';
|
|
39
41
|
export * from './QueryClient';
|
|
42
|
+
export * from './AgentClient';
|
|
40
43
|
export * from './SSEClient';
|
|
41
44
|
export * from './TableIngestClient';
|
|
42
45
|
export * from './GraphClient';
|
|
43
|
-
export
|
|
46
|
+
export * from './config';
|
|
47
|
+
export { OperationClient, QueryClient, AgentClient, SSEClient, TableIngestClient, GraphClient };
|
|
44
48
|
export { useMultipleOperations, useOperation, useQuery, useSDKClients, useStreamingQuery, useTableUpload, } from './hooks';
|
|
45
49
|
export declare const extensions: {
|
|
46
50
|
readonly query: QueryClient;
|
|
51
|
+
readonly agent: AgentClient;
|
|
47
52
|
readonly operations: OperationClient;
|
|
48
53
|
readonly graphs: GraphClient;
|
|
49
54
|
monitorOperation: (operationId: string, onProgress?: (progress: any) => void) => Promise<any>;
|
|
@@ -53,3 +58,5 @@ export declare const extensions: {
|
|
|
53
58
|
export declare const monitorOperation: (operationId: string, onProgress?: (progress: any) => void) => Promise<any>;
|
|
54
59
|
export declare const executeQuery: (graphId: string, query: string, parameters?: Record<string, any>) => Promise<import("./QueryClient").QueryResult>;
|
|
55
60
|
export declare const streamQuery: (graphId: string, query: string, parameters?: Record<string, any>, chunkSize?: number) => AsyncIterableIterator<any>;
|
|
61
|
+
export declare const agentQuery: (graphId: string, message: string, context?: Record<string, any>) => Promise<import("./AgentClient").AgentResult>;
|
|
62
|
+
export declare const analyzeFinancials: (graphId: string, message: string) => Promise<import("./AgentClient").AgentResult>;
|
package/sdk-extensions/index.js
CHANGED
|
@@ -18,13 +18,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.streamQuery = exports.executeQuery = exports.monitorOperation = exports.extensions = exports.useTableUpload = exports.useStreamingQuery = exports.useSDKClients = exports.useQuery = exports.useOperation = exports.useMultipleOperations = exports.GraphClient = exports.TableIngestClient = exports.SSEClient = exports.QueryClient = exports.OperationClient = exports.RoboSystemsExtensions = void 0;
|
|
21
|
+
exports.analyzeFinancials = exports.agentQuery = exports.streamQuery = exports.executeQuery = exports.monitorOperation = exports.extensions = exports.useTableUpload = exports.useStreamingQuery = exports.useSDKClients = exports.useQuery = exports.useOperation = exports.useMultipleOperations = exports.GraphClient = exports.TableIngestClient = exports.SSEClient = exports.AgentClient = exports.QueryClient = exports.OperationClient = exports.RoboSystemsExtensions = void 0;
|
|
22
22
|
const client_gen_1 = require("../sdk/client.gen");
|
|
23
23
|
const config_1 = require("./config");
|
|
24
24
|
const OperationClient_1 = require("./OperationClient");
|
|
25
25
|
Object.defineProperty(exports, "OperationClient", { enumerable: true, get: function () { return OperationClient_1.OperationClient; } });
|
|
26
26
|
const QueryClient_1 = require("./QueryClient");
|
|
27
27
|
Object.defineProperty(exports, "QueryClient", { enumerable: true, get: function () { return QueryClient_1.QueryClient; } });
|
|
28
|
+
const AgentClient_1 = require("./AgentClient");
|
|
29
|
+
Object.defineProperty(exports, "AgentClient", { enumerable: true, get: function () { return AgentClient_1.AgentClient; } });
|
|
28
30
|
const SSEClient_1 = require("./SSEClient");
|
|
29
31
|
Object.defineProperty(exports, "SSEClient", { enumerable: true, get: function () { return SSEClient_1.SSEClient; } });
|
|
30
32
|
const TableIngestClient_1 = require("./TableIngestClient");
|
|
@@ -51,6 +53,12 @@ class RoboSystemsExtensions {
|
|
|
51
53
|
token: this.config.token,
|
|
52
54
|
headers: this.config.headers,
|
|
53
55
|
});
|
|
56
|
+
this.agent = new AgentClient_1.AgentClient({
|
|
57
|
+
baseUrl: this.config.baseUrl,
|
|
58
|
+
credentials: this.config.credentials,
|
|
59
|
+
token: this.config.token,
|
|
60
|
+
headers: this.config.headers,
|
|
61
|
+
});
|
|
54
62
|
this.operations = new OperationClient_1.OperationClient({
|
|
55
63
|
baseUrl: this.config.baseUrl,
|
|
56
64
|
credentials: this.config.credentials,
|
|
@@ -95,6 +103,7 @@ class RoboSystemsExtensions {
|
|
|
95
103
|
*/
|
|
96
104
|
close() {
|
|
97
105
|
this.query.close();
|
|
106
|
+
this.agent.close();
|
|
98
107
|
this.operations.closeAll();
|
|
99
108
|
this.graphs.close();
|
|
100
109
|
}
|
|
@@ -103,9 +112,11 @@ exports.RoboSystemsExtensions = RoboSystemsExtensions;
|
|
|
103
112
|
// Export all types and classes
|
|
104
113
|
__exportStar(require("./OperationClient"), exports);
|
|
105
114
|
__exportStar(require("./QueryClient"), exports);
|
|
115
|
+
__exportStar(require("./AgentClient"), exports);
|
|
106
116
|
__exportStar(require("./SSEClient"), exports);
|
|
107
117
|
__exportStar(require("./TableIngestClient"), exports);
|
|
108
118
|
__exportStar(require("./GraphClient"), exports);
|
|
119
|
+
__exportStar(require("./config"), exports);
|
|
109
120
|
// Export React hooks
|
|
110
121
|
var hooks_1 = require("./hooks");
|
|
111
122
|
Object.defineProperty(exports, "useMultipleOperations", { enumerable: true, get: function () { return hooks_1.useMultipleOperations; } });
|
|
@@ -126,6 +137,9 @@ exports.extensions = {
|
|
|
126
137
|
get query() {
|
|
127
138
|
return getExtensions().query;
|
|
128
139
|
},
|
|
140
|
+
get agent() {
|
|
141
|
+
return getExtensions().agent;
|
|
142
|
+
},
|
|
129
143
|
get operations() {
|
|
130
144
|
return getExtensions().operations;
|
|
131
145
|
},
|
|
@@ -143,3 +157,7 @@ const executeQuery = (graphId, query, parameters) => getExtensions().query.query
|
|
|
143
157
|
exports.executeQuery = executeQuery;
|
|
144
158
|
const streamQuery = (graphId, query, parameters, chunkSize) => getExtensions().query.streamQuery(graphId, query, parameters, chunkSize);
|
|
145
159
|
exports.streamQuery = streamQuery;
|
|
160
|
+
const agentQuery = (graphId, message, context) => getExtensions().agent.query(graphId, message, context);
|
|
161
|
+
exports.agentQuery = agentQuery;
|
|
162
|
+
const analyzeFinancials = (graphId, message) => getExtensions().agent.analyzeFinancials(graphId, message);
|
|
163
|
+
exports.analyzeFinancials = analyzeFinancials;
|
package/sdk-extensions/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { client } from '../sdk/client.gen'
|
|
|
7
7
|
import { extractTokenFromSDKClient } from './config'
|
|
8
8
|
import { OperationClient } from './OperationClient'
|
|
9
9
|
import { QueryClient } from './QueryClient'
|
|
10
|
+
import { AgentClient } from './AgentClient'
|
|
10
11
|
import { SSEClient } from './SSEClient'
|
|
11
12
|
import { TableIngestClient } from './TableIngestClient'
|
|
12
13
|
import { GraphClient } from './GraphClient'
|
|
@@ -32,6 +33,7 @@ interface ResolvedConfig {
|
|
|
32
33
|
|
|
33
34
|
export class RoboSystemsExtensions {
|
|
34
35
|
public readonly query: QueryClient
|
|
36
|
+
public readonly agent: AgentClient
|
|
35
37
|
public readonly operations: OperationClient
|
|
36
38
|
public readonly tables: TableIngestClient
|
|
37
39
|
public readonly graphs: GraphClient
|
|
@@ -60,6 +62,13 @@ export class RoboSystemsExtensions {
|
|
|
60
62
|
headers: this.config.headers,
|
|
61
63
|
})
|
|
62
64
|
|
|
65
|
+
this.agent = new AgentClient({
|
|
66
|
+
baseUrl: this.config.baseUrl,
|
|
67
|
+
credentials: this.config.credentials,
|
|
68
|
+
token: this.config.token,
|
|
69
|
+
headers: this.config.headers,
|
|
70
|
+
})
|
|
71
|
+
|
|
63
72
|
this.operations = new OperationClient({
|
|
64
73
|
baseUrl: this.config.baseUrl,
|
|
65
74
|
credentials: this.config.credentials,
|
|
@@ -109,6 +118,7 @@ export class RoboSystemsExtensions {
|
|
|
109
118
|
*/
|
|
110
119
|
close(): void {
|
|
111
120
|
this.query.close()
|
|
121
|
+
this.agent.close()
|
|
112
122
|
this.operations.closeAll()
|
|
113
123
|
this.graphs.close()
|
|
114
124
|
}
|
|
@@ -117,10 +127,12 @@ export class RoboSystemsExtensions {
|
|
|
117
127
|
// Export all types and classes
|
|
118
128
|
export * from './OperationClient'
|
|
119
129
|
export * from './QueryClient'
|
|
130
|
+
export * from './AgentClient'
|
|
120
131
|
export * from './SSEClient'
|
|
121
132
|
export * from './TableIngestClient'
|
|
122
133
|
export * from './GraphClient'
|
|
123
|
-
export
|
|
134
|
+
export * from './config'
|
|
135
|
+
export { OperationClient, QueryClient, AgentClient, SSEClient, TableIngestClient, GraphClient }
|
|
124
136
|
|
|
125
137
|
// Export React hooks
|
|
126
138
|
export {
|
|
@@ -146,6 +158,9 @@ export const extensions = {
|
|
|
146
158
|
get query() {
|
|
147
159
|
return getExtensions().query
|
|
148
160
|
},
|
|
161
|
+
get agent() {
|
|
162
|
+
return getExtensions().agent
|
|
163
|
+
},
|
|
149
164
|
get operations() {
|
|
150
165
|
return getExtensions().operations
|
|
151
166
|
},
|
|
@@ -171,3 +186,9 @@ export const streamQuery = (
|
|
|
171
186
|
parameters?: Record<string, any>,
|
|
172
187
|
chunkSize?: number
|
|
173
188
|
) => getExtensions().query.streamQuery(graphId, query, parameters, chunkSize)
|
|
189
|
+
|
|
190
|
+
export const agentQuery = (graphId: string, message: string, context?: Record<string, any>) =>
|
|
191
|
+
getExtensions().agent.query(graphId, message, context)
|
|
192
|
+
|
|
193
|
+
export const analyzeFinancials = (graphId: string, message: string) =>
|
|
194
|
+
getExtensions().agent.analyzeFinancials(graphId, message)
|
package/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from './client';
|
|
2
|
-
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, UpdateUserData, UpdateUserResponses, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ListUserOrgsData, ListUserOrgsResponses, CreateOrgData, CreateOrgResponses, CreateOrgErrors, GetOrgData, GetOrgResponses, GetOrgErrors, UpdateOrgData, UpdateOrgResponses, UpdateOrgErrors, ListOrgGraphsData, ListOrgGraphsResponses, ListOrgGraphsErrors, ListOrgMembersData, ListOrgMembersResponses, ListOrgMembersErrors, InviteOrgMemberData, InviteOrgMemberResponses, InviteOrgMemberErrors, RemoveOrgMemberData, RemoveOrgMemberResponses, RemoveOrgMemberErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, GetOrgLimitsData, GetOrgLimitsResponses, GetOrgLimitsErrors, GetOrgUsageData, GetOrgUsageResponses, GetOrgUsageErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors,
|
|
2
|
+
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, UpdateUserData, UpdateUserResponses, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ListUserOrgsData, ListUserOrgsResponses, CreateOrgData, CreateOrgResponses, CreateOrgErrors, GetOrgData, GetOrgResponses, GetOrgErrors, UpdateOrgData, UpdateOrgResponses, UpdateOrgErrors, ListOrgGraphsData, ListOrgGraphsResponses, ListOrgGraphsErrors, ListOrgMembersData, ListOrgMembersResponses, ListOrgMembersErrors, InviteOrgMemberData, InviteOrgMemberResponses, InviteOrgMemberErrors, RemoveOrgMemberData, RemoveOrgMemberResponses, RemoveOrgMemberErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, GetOrgLimitsData, GetOrgLimitsResponses, GetOrgLimitsErrors, GetOrgUsageData, GetOrgUsageResponses, GetOrgUsageErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, GetGraphSubscriptionData, GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, CreateRepositorySubscriptionData, CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, UpgradeSubscriptionData, UpgradeSubscriptionResponses, UpgradeSubscriptionErrors, ListTablesData, ListTablesResponses, ListTablesErrors, ListTableFilesData, ListTableFilesResponses, ListTableFilesErrors, GetUploadUrlData, GetUploadUrlResponses, GetUploadUrlErrors, DeleteFileData, DeleteFileResponses, DeleteFileErrors, GetFileInfoData, GetFileInfoResponses, GetFileInfoErrors, UpdateFileStatusData, UpdateFileStatusResponses, UpdateFileStatusErrors, IngestTablesData, IngestTablesResponses, IngestTablesErrors, QueryTablesData, QueryTablesResponses, QueryTablesErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, GetAvailableGraphTiersData, GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors, GetOrgBillingCustomerData, GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, CreatePortalSessionData, CreatePortalSessionResponses, CreatePortalSessionErrors, ListOrgSubscriptionsData, ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, GetOrgSubscriptionData, GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, CancelOrgSubscriptionData, CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ListOrgInvoicesData, ListOrgInvoicesResponses, ListOrgInvoicesErrors, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, CreateCheckoutSessionData, CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, GetCheckoutStatusData, GetCheckoutStatusResponses, GetCheckoutStatusErrors } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -392,9 +392,22 @@ export declare const getConnection: <ThrowOnError extends boolean = false>(optio
|
|
|
392
392
|
* Returns a task ID for monitoring sync progress.
|
|
393
393
|
*/
|
|
394
394
|
export declare const syncConnection: <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>) => import("./client").RequestResult<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError, "fields">;
|
|
395
|
+
/**
|
|
396
|
+
* List available agents
|
|
397
|
+
* Get a comprehensive list of all available agents with their metadata.
|
|
398
|
+
*
|
|
399
|
+
* **Returns:**
|
|
400
|
+
* - Agent types and names
|
|
401
|
+
* - Capabilities and supported modes
|
|
402
|
+
* - Version information
|
|
403
|
+
* - Credit requirements
|
|
404
|
+
*
|
|
405
|
+
* Use the optional `capability` filter to find agents with specific capabilities.
|
|
406
|
+
*/
|
|
407
|
+
export declare const listAgents: <ThrowOnError extends boolean = false>(options: Options<ListAgentsData, ThrowOnError>) => import("./client").RequestResult<ListAgentsResponses, ListAgentsErrors, ThrowOnError, "fields">;
|
|
395
408
|
/**
|
|
396
409
|
* Auto-select agent for query
|
|
397
|
-
* Automatically select the best agent for your query.
|
|
410
|
+
* Automatically select the best agent for your query with intelligent execution strategy.
|
|
398
411
|
*
|
|
399
412
|
* **Agent Selection Process:**
|
|
400
413
|
*
|
|
@@ -403,7 +416,8 @@ export declare const syncConnection: <ThrowOnError extends boolean = false>(opti
|
|
|
403
416
|
* 2. Enriching context with RAG if enabled
|
|
404
417
|
* 3. Evaluating all available agents against selection criteria
|
|
405
418
|
* 4. Selecting the best match based on confidence scores
|
|
406
|
-
* 5.
|
|
419
|
+
* 5. Choosing execution strategy (sync/SSE/async) based on expected time
|
|
420
|
+
* 6. Executing the query with the selected agent
|
|
407
421
|
*
|
|
408
422
|
* **Available Agent Types:**
|
|
409
423
|
* - `financial`: Financial analysis, SEC filings, company metrics
|
|
@@ -416,6 +430,14 @@ export declare const syncConnection: <ThrowOnError extends boolean = false>(opti
|
|
|
416
430
|
* - `extended`: Comprehensive analysis (~15-60s), deep research
|
|
417
431
|
* - `streaming`: Real-time response streaming
|
|
418
432
|
*
|
|
433
|
+
* **Execution Strategies (automatic):**
|
|
434
|
+
* - Fast operations (<5s): Immediate synchronous response
|
|
435
|
+
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
436
|
+
* - Long operations (>30s): Async Celery worker with operation tracking
|
|
437
|
+
*
|
|
438
|
+
* **Response Mode Override:**
|
|
439
|
+
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
440
|
+
*
|
|
419
441
|
* **Confidence Score Interpretation:**
|
|
420
442
|
* - `0.9-1.0`: High confidence, agent is ideal match
|
|
421
443
|
* - `0.7-0.9`: Good confidence, agent is suitable
|
|
@@ -438,15 +460,38 @@ export declare const syncConnection: <ThrowOnError extends boolean = false>(opti
|
|
|
438
460
|
* See request/response examples in the "Examples" dropdown below.
|
|
439
461
|
*/
|
|
440
462
|
export declare const autoSelectAgent: <ThrowOnError extends boolean = false>(options: Options<AutoSelectAgentData, ThrowOnError>) => import("./client").RequestResult<AutoSelectAgentResponses, AutoSelectAgentErrors, ThrowOnError, "fields">;
|
|
463
|
+
/**
|
|
464
|
+
* Get agent metadata
|
|
465
|
+
* Get comprehensive metadata for a specific agent type.
|
|
466
|
+
*
|
|
467
|
+
* **Returns:**
|
|
468
|
+
* - Agent name and description
|
|
469
|
+
* - Version information
|
|
470
|
+
* - Supported capabilities and modes
|
|
471
|
+
* - Credit requirements
|
|
472
|
+
* - Author and tags
|
|
473
|
+
* - Configuration options
|
|
474
|
+
*
|
|
475
|
+
* Use this to understand agent capabilities before execution.
|
|
476
|
+
*/
|
|
477
|
+
export declare const getAgentMetadata: <ThrowOnError extends boolean = false>(options: Options<GetAgentMetadataData, ThrowOnError>) => import("./client").RequestResult<GetAgentMetadataResponses, GetAgentMetadataErrors, ThrowOnError, "fields">;
|
|
441
478
|
/**
|
|
442
479
|
* Execute specific agent
|
|
443
|
-
* Execute a specific agent type directly.
|
|
480
|
+
* Execute a specific agent type directly with intelligent execution strategy.
|
|
444
481
|
*
|
|
445
482
|
* Available agents:
|
|
446
483
|
* - **financial**: Financial analysis, SEC filings, accounting data
|
|
447
484
|
* - **research**: Deep research and comprehensive analysis
|
|
448
485
|
* - **rag**: Fast retrieval without AI (no credits required)
|
|
449
486
|
*
|
|
487
|
+
* **Execution Strategies (automatic):**
|
|
488
|
+
* - Fast operations (<5s): Immediate synchronous response
|
|
489
|
+
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
490
|
+
* - Long operations (>30s): Async Celery worker with operation tracking
|
|
491
|
+
*
|
|
492
|
+
* **Response Mode Override:**
|
|
493
|
+
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
494
|
+
*
|
|
450
495
|
* Use this endpoint when you know which agent you want to use.
|
|
451
496
|
*/
|
|
452
497
|
export declare const executeSpecificAgent: <ThrowOnError extends boolean = false>(options: Options<ExecuteSpecificAgentData, ThrowOnError>) => import("./client").RequestResult<ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, ThrowOnError, "fields">;
|
|
@@ -468,34 +513,6 @@ export declare const executeSpecificAgent: <ThrowOnError extends boolean = false
|
|
|
468
513
|
* Returns individual results for each query with execution metrics.
|
|
469
514
|
*/
|
|
470
515
|
export declare const batchProcessQueries: <ThrowOnError extends boolean = false>(options: Options<BatchProcessQueriesData, ThrowOnError>) => import("./client").RequestResult<BatchProcessQueriesResponses, BatchProcessQueriesErrors, ThrowOnError, "fields">;
|
|
471
|
-
/**
|
|
472
|
-
* List available agents
|
|
473
|
-
* Get a comprehensive list of all available agents with their metadata.
|
|
474
|
-
*
|
|
475
|
-
* **Returns:**
|
|
476
|
-
* - Agent types and names
|
|
477
|
-
* - Capabilities and supported modes
|
|
478
|
-
* - Version information
|
|
479
|
-
* - Credit requirements
|
|
480
|
-
*
|
|
481
|
-
* Use the optional `capability` filter to find agents with specific capabilities.
|
|
482
|
-
*/
|
|
483
|
-
export declare const listAgents: <ThrowOnError extends boolean = false>(options: Options<ListAgentsData, ThrowOnError>) => import("./client").RequestResult<ListAgentsResponses, ListAgentsErrors, ThrowOnError, "fields">;
|
|
484
|
-
/**
|
|
485
|
-
* Get agent metadata
|
|
486
|
-
* Get comprehensive metadata for a specific agent type.
|
|
487
|
-
*
|
|
488
|
-
* **Returns:**
|
|
489
|
-
* - Agent name and description
|
|
490
|
-
* - Version information
|
|
491
|
-
* - Supported capabilities and modes
|
|
492
|
-
* - Credit requirements
|
|
493
|
-
* - Author and tags
|
|
494
|
-
* - Configuration options
|
|
495
|
-
*
|
|
496
|
-
* Use this to understand agent capabilities before execution.
|
|
497
|
-
*/
|
|
498
|
-
export declare const getAgentMetadata: <ThrowOnError extends boolean = false>(options: Options<GetAgentMetadataData, ThrowOnError>) => import("./client").RequestResult<GetAgentMetadataResponses, GetAgentMetadataErrors, ThrowOnError, "fields">;
|
|
499
516
|
/**
|
|
500
517
|
* Get agent recommendations
|
|
501
518
|
* Get intelligent agent recommendations for a specific query.
|
|
@@ -1112,7 +1129,7 @@ export declare const listSubgraphs: <ThrowOnError extends boolean = false>(optio
|
|
|
1112
1129
|
* - Valid authentication
|
|
1113
1130
|
* - Parent graph must exist and be accessible to the user
|
|
1114
1131
|
* - User must have 'admin' permission on the parent graph
|
|
1115
|
-
* - Parent graph tier must support subgraphs (
|
|
1132
|
+
* - Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
1116
1133
|
* - Must be within subgraph quota limits
|
|
1117
1134
|
* - Subgraph name must be unique within the parent graph
|
|
1118
1135
|
*
|
|
@@ -1138,8 +1155,8 @@ export declare const createSubgraph: <ThrowOnError extends boolean = false>(opti
|
|
|
1138
1155
|
* All data in the subgraph will be lost.
|
|
1139
1156
|
*
|
|
1140
1157
|
* **Backup Location:**
|
|
1141
|
-
* If backup requested, stored in S3 at:
|
|
1142
|
-
* `s3://
|
|
1158
|
+
* If backup requested, stored in S3 Kuzu database bucket at:
|
|
1159
|
+
* `s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
1143
1160
|
*/
|
|
1144
1161
|
export declare const deleteSubgraph: <ThrowOnError extends boolean = false>(options: Options<DeleteSubgraphData, ThrowOnError>) => import("./client").RequestResult<DeleteSubgraphResponses, DeleteSubgraphErrors, ThrowOnError, "fields">;
|
|
1145
1162
|
/**
|
|
@@ -1186,16 +1203,6 @@ export declare const getSubgraphInfo: <ThrowOnError extends boolean = false>(opt
|
|
|
1186
1203
|
* Individual subgraph sizes shown in list endpoint.
|
|
1187
1204
|
*/
|
|
1188
1205
|
export declare const getSubgraphQuota: <ThrowOnError extends boolean = false>(options: Options<GetSubgraphQuotaData, ThrowOnError>) => import("./client").RequestResult<GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, ThrowOnError, "fields">;
|
|
1189
|
-
/**
|
|
1190
|
-
* Cancel Subscription
|
|
1191
|
-
* Cancel a subscription.
|
|
1192
|
-
*
|
|
1193
|
-
* For shared repositories: Cancels the user's personal subscription
|
|
1194
|
-
* For user graphs: Not allowed - delete the graph instead
|
|
1195
|
-
*
|
|
1196
|
-
* The subscription will be marked as canceled and will end at the current period end date.
|
|
1197
|
-
*/
|
|
1198
|
-
export declare const cancelSubscription: <ThrowOnError extends boolean = false>(options: Options<CancelSubscriptionData, ThrowOnError>) => import("./client").RequestResult<CancelSubscriptionResponses, CancelSubscriptionErrors, ThrowOnError, "fields">;
|
|
1199
1206
|
/**
|
|
1200
1207
|
* Get Subscription
|
|
1201
1208
|
* Get subscription details for a graph or shared repository.
|
|
@@ -1874,15 +1881,22 @@ export declare const cancelOperation: <ThrowOnError extends boolean = false>(opt
|
|
|
1874
1881
|
*/
|
|
1875
1882
|
export declare const getOrgBillingCustomer: <ThrowOnError extends boolean = false>(options: Options<GetOrgBillingCustomerData, ThrowOnError>) => import("./client").RequestResult<GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, ThrowOnError, "fields">;
|
|
1876
1883
|
/**
|
|
1877
|
-
*
|
|
1878
|
-
*
|
|
1884
|
+
* Create Customer Portal Session
|
|
1885
|
+
* Create a Stripe Customer Portal session for managing payment methods.
|
|
1886
|
+
*
|
|
1887
|
+
* The portal allows users to:
|
|
1888
|
+
* - Add new payment methods
|
|
1889
|
+
* - Remove existing payment methods
|
|
1890
|
+
* - Update default payment method
|
|
1891
|
+
* - View billing history
|
|
1879
1892
|
*
|
|
1880
|
-
*
|
|
1893
|
+
* The user will be redirected to Stripe's hosted portal page and returned to the billing page when done.
|
|
1881
1894
|
*
|
|
1882
1895
|
* **Requirements:**
|
|
1883
1896
|
* - User must be an OWNER of the organization
|
|
1897
|
+
* - Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
1884
1898
|
*/
|
|
1885
|
-
export declare const
|
|
1899
|
+
export declare const createPortalSession: <ThrowOnError extends boolean = false>(options: Options<CreatePortalSessionData, ThrowOnError>) => import("./client").RequestResult<CreatePortalSessionResponses, CreatePortalSessionErrors, ThrowOnError, "fields">;
|
|
1886
1900
|
/**
|
|
1887
1901
|
* List Organization Subscriptions
|
|
1888
1902
|
* List all active and past subscriptions for an organization.
|