@robosystems/client 0.1.20 → 0.1.21
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/LICENSE +1 -1
- package/README.md +10 -423
- package/bin/create-feature +7 -17
- package/package.json +2 -2
- package/sdk/sdk.gen.d.ts +40 -15
- package/sdk/sdk.gen.js +100 -33
- package/sdk/sdk.gen.ts +99 -32
- package/sdk/types.gen.d.ts +252 -38
- package/sdk/types.gen.ts +289 -46
- package/sdk.gen.d.ts +40 -15
- package/sdk.gen.js +100 -33
- package/sdk.gen.ts +99 -32
- package/types.gen.d.ts +252 -38
- package/types.gen.ts +289 -46
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -3,451 +3,38 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@robosystems/client)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
Official TypeScript Client for the RoboSystems Financial Knowledge Graph API. Access comprehensive financial data including accounting
|
|
6
|
+
Official TypeScript Client for the RoboSystems Financial Knowledge Graph API. Access comprehensive financial data including accounting transactions, financial reports, and advanced graph analytics through a type-safe, modern TypeScript interface.
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
10
|
- **Type-safe API client** with full TypeScript types
|
|
11
|
-
- **Auto-generated from OpenAPI** for always up-to-date types
|
|
12
11
|
- **Browser & Node.js support** with different auth strategies
|
|
13
12
|
- **React hooks** for seamless UI integration
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **Financial AI Agent** integration
|
|
13
|
+
- **Streaming support** for memory-efficient processing of large result sets
|
|
14
|
+
- **Financial AI Agent** integration for natural language queries
|
|
17
15
|
- **Comprehensive error handling** with typed errors
|
|
18
16
|
|
|
19
17
|
## Installation
|
|
20
18
|
|
|
21
19
|
```bash
|
|
22
20
|
npm install @robosystems/client
|
|
23
|
-
# or
|
|
24
|
-
yarn add @robosystems/client
|
|
25
|
-
# or
|
|
26
|
-
pnpm add @robosystems/client
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Quick Start
|
|
30
|
-
|
|
31
|
-
### Browser Usage (with cookies)
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
import { client, getUserMe, listCompanies, executeCypherQuery } from '@robosystems/client'
|
|
35
|
-
|
|
36
|
-
// Configure the client
|
|
37
|
-
client.setConfig({
|
|
38
|
-
baseUrl: 'https://api.robosystems.ai',
|
|
39
|
-
credentials: 'include',
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// Use with cookie-based authentication (browser)
|
|
43
|
-
const { data: user, error } = await getCurrentUser()
|
|
44
|
-
if (user) {
|
|
45
|
-
console.log('Logged in as:', user.email)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// List companies in a graph
|
|
49
|
-
const { data: companies } = await listCompanies({
|
|
50
|
-
path: { graph_id: 'your-graph-id' },
|
|
51
|
-
query: { limit: 10 },
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
// Execute a Cypher query
|
|
55
|
-
const { data: result } = await executeCypherQuery({
|
|
56
|
-
path: { graph_id: 'your-graph-id' },
|
|
57
|
-
body: {
|
|
58
|
-
query: 'MATCH (c:Company)-[:HAS_FILING]->(f:Filing) RETURN c.name, f.form_type LIMIT 5',
|
|
59
|
-
},
|
|
60
|
-
})
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Server Usage (with API key)
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
import { client, getUserGraphs, listCompanies } from '@robosystems/client'
|
|
67
|
-
|
|
68
|
-
// Configure with API key for server-side usage
|
|
69
|
-
client.setConfig({
|
|
70
|
-
baseUrl: 'https://api.robosystems.ai',
|
|
71
|
-
headers: {
|
|
72
|
-
'X-API-Key': process.env.ROBOSYSTEMS_API_KEY!,
|
|
73
|
-
},
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
// Fetch user's graphs
|
|
77
|
-
const { data: graphs, error } = await getUserGraphs()
|
|
78
|
-
|
|
79
|
-
// Work with financial data
|
|
80
|
-
if (graphs?.graphs.length) {
|
|
81
|
-
const graphId = graphs.graphs[0].graph_id
|
|
82
|
-
const { data: companies } = await listCompanies({
|
|
83
|
-
path: { graph_id: graphId },
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Key API Endpoints
|
|
89
|
-
|
|
90
|
-
### Authentication & User Management
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
import {
|
|
94
|
-
registerUser,
|
|
95
|
-
loginUser,
|
|
96
|
-
logoutUser,
|
|
97
|
-
getCurrentUser,
|
|
98
|
-
createUserApiKey,
|
|
99
|
-
} from '@robosystems/client'
|
|
100
|
-
|
|
101
|
-
// Register a new user
|
|
102
|
-
const { data, error } = await registerUser({
|
|
103
|
-
body: {
|
|
104
|
-
email: 'user@example.com',
|
|
105
|
-
password: 'secure-password',
|
|
106
|
-
name: 'John Doe',
|
|
107
|
-
},
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
// Sign in
|
|
111
|
-
const { data: session } = await loginUser({
|
|
112
|
-
body: {
|
|
113
|
-
username: 'user@example.com',
|
|
114
|
-
password: 'secure-password',
|
|
115
|
-
},
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
// Get current user
|
|
119
|
-
const { data: user } = await getCurrentUser()
|
|
120
|
-
|
|
121
|
-
// Create API key for programmatic access
|
|
122
|
-
const { data: apiKey } = await createUserApiKey({
|
|
123
|
-
body: {
|
|
124
|
-
key_name: 'Production Server',
|
|
125
|
-
key_type: 'user',
|
|
126
|
-
},
|
|
127
|
-
})
|
|
128
|
-
console.log('Save this key securely:', apiKey.key)
|
|
129
|
-
|
|
130
|
-
// Sign out
|
|
131
|
-
await logoutUser()
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Company & Financial Data
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
import {
|
|
138
|
-
listCompanies,
|
|
139
|
-
getCompany,
|
|
140
|
-
createCompany,
|
|
141
|
-
createConnection,
|
|
142
|
-
syncConnection,
|
|
143
|
-
} from '@robosystems/client'
|
|
144
|
-
|
|
145
|
-
// List companies with pagination
|
|
146
|
-
const { data: companies } = await listCompanies({
|
|
147
|
-
path: { graph_id: 'your-graph-id' },
|
|
148
|
-
query: { limit: 20, offset: 0 },
|
|
149
|
-
})
|
|
150
|
-
console.log(`Found ${companies.total} companies`)
|
|
151
|
-
|
|
152
|
-
// Get specific company details
|
|
153
|
-
const { data: company } = await getCompany({
|
|
154
|
-
path: {
|
|
155
|
-
graph_id: 'your-graph-id',
|
|
156
|
-
company_id: 'AAPL',
|
|
157
|
-
},
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
// Create new company
|
|
161
|
-
const { data: newCompany } = await createCompany({
|
|
162
|
-
path: { graph_id: 'your-graph-id' },
|
|
163
|
-
body: {
|
|
164
|
-
identifier: 'MSFT',
|
|
165
|
-
name: 'Microsoft Corporation',
|
|
166
|
-
metadata: { industry: 'Technology' },
|
|
167
|
-
},
|
|
168
|
-
})
|
|
169
|
-
|
|
170
|
-
// Create data connection (QuickBooks, etc.)
|
|
171
|
-
const { data: connection } = await createConnection({
|
|
172
|
-
path: { graph_id: 'your-graph-id' },
|
|
173
|
-
body: {
|
|
174
|
-
name: 'QuickBooks Integration',
|
|
175
|
-
connection_type: 'quickbooks',
|
|
176
|
-
config: { company_id: '123456' },
|
|
177
|
-
},
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
// Sync data from connection
|
|
181
|
-
const { data: syncResult } = await syncConnection({
|
|
182
|
-
path: {
|
|
183
|
-
graph_id: 'your-graph-id',
|
|
184
|
-
connection_id: connection.id,
|
|
185
|
-
},
|
|
186
|
-
})
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Graph Queries & Analytics
|
|
190
|
-
|
|
191
|
-
```typescript
|
|
192
|
-
import {
|
|
193
|
-
executeCypherQuery,
|
|
194
|
-
executeReadOnlyCypherQuery,
|
|
195
|
-
getGraphMetrics,
|
|
196
|
-
} from '@robosystems/client'
|
|
197
|
-
|
|
198
|
-
// Execute parameterized Cypher queries
|
|
199
|
-
const { data: results } = await executeCypherQuery({
|
|
200
|
-
path: { graph_id: 'your-graph-id' },
|
|
201
|
-
body: {
|
|
202
|
-
query: `
|
|
203
|
-
MATCH (c:Company {ticker: $ticker})-[:HAS_METRIC]->(m:Metric)
|
|
204
|
-
WHERE m.fiscal_year >= $start_year
|
|
205
|
-
RETURN m.name, m.value, m.fiscal_year
|
|
206
|
-
ORDER BY m.fiscal_year DESC
|
|
207
|
-
`,
|
|
208
|
-
parameters: { ticker: 'AAPL', start_year: 2020 },
|
|
209
|
-
},
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
// Read-only queries for better performance
|
|
213
|
-
const { data: readOnlyResult } = await executeReadOnlyCypherQuery({
|
|
214
|
-
path: { graph_id: 'your-graph-id' },
|
|
215
|
-
body: { query: 'MATCH (n) RETURN count(n) as total' },
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
// Get graph analytics
|
|
219
|
-
const { data: metrics } = await getGraphMetrics({
|
|
220
|
-
path: { graph_id: 'your-graph-id' },
|
|
221
|
-
})
|
|
222
|
-
console.log(`Total nodes: ${metrics.total_nodes}`)
|
|
223
|
-
console.log(`Total relationships: ${metrics.total_relationships}`)
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### Financial AI Agent
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
import { queryFinancialAgent } from '@robosystems/client'
|
|
230
|
-
|
|
231
|
-
// Natural language financial queries
|
|
232
|
-
const { data: agentResponse } = await queryFinancialAgent({
|
|
233
|
-
path: { graph_id: 'your-graph-id' },
|
|
234
|
-
body: {
|
|
235
|
-
query: "What was Apple's revenue growth over the last 3 years?",
|
|
236
|
-
include_reasoning: true,
|
|
237
|
-
max_tokens: 1000,
|
|
238
|
-
},
|
|
239
|
-
})
|
|
240
|
-
|
|
241
|
-
console.log('Answer:', agentResponse.answer)
|
|
242
|
-
if (agentResponse.reasoning) {
|
|
243
|
-
console.log('Reasoning:', agentResponse.reasoning)
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
## Advanced Features
|
|
248
|
-
|
|
249
|
-
### Billing & Credit Management
|
|
250
|
-
|
|
251
|
-
```typescript
|
|
252
|
-
import { getCreditSummary, checkCreditBalance, getCurrentGraphBill } from '@robosystems/client'
|
|
253
|
-
|
|
254
|
-
// Monitor credits and usage for a specific graph
|
|
255
|
-
const { data: creditSummary } = await getCreditSummary({
|
|
256
|
-
path: { graph_id: 'your-graph-id' },
|
|
257
|
-
})
|
|
258
|
-
console.log(`Available credits: ${creditSummary.available_credits.toLocaleString()}`)
|
|
259
|
-
console.log(
|
|
260
|
-
`Monthly usage: ${creditSummary.used_credits.toLocaleString()}/${creditSummary.total_credits.toLocaleString()}`
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
// Check credit requirements before operations
|
|
264
|
-
const { data: creditCheck } = await checkCreditBalance({
|
|
265
|
-
path: { graph_id: 'your-graph-id' },
|
|
266
|
-
body: {
|
|
267
|
-
operation_type: 'query',
|
|
268
|
-
estimated_credits: 100,
|
|
269
|
-
},
|
|
270
|
-
})
|
|
271
|
-
|
|
272
|
-
if (creditCheck.has_sufficient_credits) {
|
|
273
|
-
// Proceed with operation
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// Get billing information
|
|
277
|
-
const { data: currentBill } = await getCurrentGraphBill({
|
|
278
|
-
path: { graph_id: 'your-graph-id' },
|
|
279
|
-
})
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
### MCP Tools Integration
|
|
283
|
-
|
|
284
|
-
```typescript
|
|
285
|
-
import { listMcpTools, callMcpTool } from '@robosystems/client'
|
|
286
|
-
|
|
287
|
-
// List available MCP tools
|
|
288
|
-
const { data: tools } = await listMcpTools({
|
|
289
|
-
path: { graph_id: 'your-graph-id' },
|
|
290
|
-
})
|
|
291
|
-
tools.tools.forEach((tool) => {
|
|
292
|
-
console.log(`${tool.name}: ${tool.description}`)
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
// Call an MCP tool
|
|
296
|
-
const { data: toolResult } = await callMcpTool({
|
|
297
|
-
path: { graph_id: 'your-graph-id' },
|
|
298
|
-
body: {
|
|
299
|
-
name: 'analyze_financial_statement',
|
|
300
|
-
arguments: {
|
|
301
|
-
company_id: 'AAPL',
|
|
302
|
-
statement_type: 'income',
|
|
303
|
-
fiscal_year: 2023,
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
})
|
|
307
|
-
console.log('Analysis result:', toolResult.content)
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Advanced Features
|
|
311
|
-
|
|
312
|
-
### Error Handling
|
|
313
|
-
|
|
314
|
-
```typescript
|
|
315
|
-
import { listCompanies } from '@robosystems/client'
|
|
316
|
-
import type { ErrorResponse } from '@robosystems/client'
|
|
317
|
-
|
|
318
|
-
try {
|
|
319
|
-
const { data, error } = await listCompanies({
|
|
320
|
-
path: { graph_id: 'your-graph-id' },
|
|
321
|
-
})
|
|
322
|
-
|
|
323
|
-
if (error) {
|
|
324
|
-
const apiError = error as ErrorResponse
|
|
325
|
-
|
|
326
|
-
switch (apiError.status) {
|
|
327
|
-
case 400:
|
|
328
|
-
console.error('Validation error:', apiError.detail)
|
|
329
|
-
break
|
|
330
|
-
case 401:
|
|
331
|
-
console.error('Authentication failed - check your API key')
|
|
332
|
-
break
|
|
333
|
-
case 403:
|
|
334
|
-
console.error('Permission denied - check graph access')
|
|
335
|
-
break
|
|
336
|
-
case 429:
|
|
337
|
-
console.error('Rate limit exceeded - retry later')
|
|
338
|
-
break
|
|
339
|
-
case 503:
|
|
340
|
-
console.error('Service temporarily unavailable')
|
|
341
|
-
break
|
|
342
|
-
default:
|
|
343
|
-
console.error('API Error:', apiError.detail || apiError.message)
|
|
344
|
-
}
|
|
345
|
-
} else if (data) {
|
|
346
|
-
console.log(`Found ${data.total} companies`)
|
|
347
|
-
}
|
|
348
|
-
} catch (err) {
|
|
349
|
-
// Network errors
|
|
350
|
-
console.error('Network Error:', err)
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
### TypeScript Types
|
|
355
|
-
|
|
356
|
-
All API responses and requests are fully typed:
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
import type {
|
|
360
|
-
User,
|
|
361
|
-
Graph,
|
|
362
|
-
Company,
|
|
363
|
-
CompanyCreate,
|
|
364
|
-
CypherQueryRequest,
|
|
365
|
-
CypherQueryResponse,
|
|
366
|
-
AgentQueryRequest,
|
|
367
|
-
AgentQueryResponse,
|
|
368
|
-
ErrorResponse,
|
|
369
|
-
PaginatedResponse,
|
|
370
|
-
} from '@robosystems/client'
|
|
371
|
-
|
|
372
|
-
// Type-safe function example
|
|
373
|
-
function processCompany(company: Company): void {
|
|
374
|
-
console.log(`Company: ${company.name} (${company.identifier})`)
|
|
375
|
-
if (company.metadata) {
|
|
376
|
-
console.log('Industry:', company.metadata.industry)
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// Type-safe query builder
|
|
381
|
-
function buildMetricQuery(ticker: string, startYear: number): CypherQueryRequest {
|
|
382
|
-
return {
|
|
383
|
-
query: `
|
|
384
|
-
MATCH (c:Company {ticker: $ticker})-[:HAS_METRIC]->(m:Metric)
|
|
385
|
-
WHERE m.fiscal_year >= $start_year
|
|
386
|
-
RETURN m
|
|
387
|
-
`,
|
|
388
|
-
parameters: { ticker, start_year: startYear },
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
## Environment Configuration
|
|
394
|
-
|
|
395
|
-
### Next.js App Router
|
|
396
|
-
|
|
397
|
-
```typescript
|
|
398
|
-
// app/api/robosystems/route.ts
|
|
399
|
-
import { client } from '@robosystems/client'
|
|
400
|
-
|
|
401
|
-
// Configure for server-side API routes
|
|
402
|
-
client.setConfig({
|
|
403
|
-
baseUrl: process.env.ROBOSYSTEMS_API_URL || 'https://api.robosystems.ai',
|
|
404
|
-
headers: {
|
|
405
|
-
'X-API-Key': process.env.ROBOSYSTEMS_API_KEY!,
|
|
406
|
-
},
|
|
407
|
-
})
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### React SPA
|
|
411
|
-
|
|
412
|
-
```typescript
|
|
413
|
-
// src/lib/robosystems.ts
|
|
414
|
-
import { client } from '@robosystems/client'
|
|
415
|
-
|
|
416
|
-
// Configure for browser with cookies
|
|
417
|
-
client.setConfig({
|
|
418
|
-
baseUrl: import.meta.env.VITE_ROBOSYSTEMS_API_URL || 'https://api.robosystems.ai',
|
|
419
|
-
credentials: 'include',
|
|
420
|
-
})
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
### Node.js Script
|
|
424
|
-
|
|
425
|
-
```typescript
|
|
426
|
-
// scripts/analyze.ts
|
|
427
|
-
import { client } from '@robosystems/client'
|
|
428
|
-
import dotenv from 'dotenv'
|
|
429
|
-
|
|
430
|
-
dotenv.config()
|
|
431
|
-
|
|
432
|
-
client.setConfig({
|
|
433
|
-
baseUrl: process.env.ROBOSYSTEMS_API_URL || 'https://api.robosystems.ai',
|
|
434
|
-
headers: {
|
|
435
|
-
'X-API-Key': process.env.ROBOSYSTEMS_API_KEY!,
|
|
436
|
-
},
|
|
437
|
-
})
|
|
438
21
|
```
|
|
439
22
|
|
|
440
23
|
## API Reference
|
|
441
24
|
|
|
442
|
-
-
|
|
25
|
+
- API reference: [https://api.robosystems.ai](https://api.robosystems.ai)
|
|
26
|
+
- API documentation: [https://api.robosystems.ai/docs](https://api.robosystems.ai/docs)
|
|
443
27
|
- OpenAPI specification: [https://api.robosystems.ai/openapi.json](https://api.robosystems.ai/openapi.json)
|
|
444
28
|
|
|
445
29
|
## Support
|
|
446
30
|
|
|
447
|
-
- Issues: [
|
|
31
|
+
- Issues: [Issues](https://github.com/RoboFinSystems/robosystems-typescript-client/issues)
|
|
32
|
+
- Discussions: [Discussions](https://github.com/RoboFinSystems/robosystems-typescript-client/discussions)
|
|
33
|
+
- Projects: [Projects](https://github.com/RoboFinSystems/robosystems-typescript-client/projects)
|
|
34
|
+
- Wiki: [Wiki](https://github.com/RoboFinSystems/robosystems-typescript-client/wiki)
|
|
448
35
|
|
|
449
36
|
## License
|
|
450
37
|
|
|
451
38
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
452
39
|
|
|
453
|
-
MIT © 2025
|
|
40
|
+
MIT © 2025 RFS LLC
|
package/bin/create-feature
CHANGED
|
@@ -39,16 +39,9 @@ echo ""
|
|
|
39
39
|
|
|
40
40
|
# Check for uncommitted changes
|
|
41
41
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
|
42
|
-
echo "⚠️ You have uncommitted changes."
|
|
43
|
-
|
|
44
|
-
echo
|
|
45
|
-
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
46
|
-
git stash push -m "Auto-stash before creating branch $FULL_BRANCH"
|
|
47
|
-
echo "✅ Changes stashed"
|
|
48
|
-
else
|
|
49
|
-
echo "❌ Please commit or stash your changes first"
|
|
50
|
-
exit 1
|
|
51
|
-
fi
|
|
42
|
+
echo "⚠️ You have uncommitted changes. Auto-stashing..."
|
|
43
|
+
git stash push -m "Auto-stash before creating branch $FULL_BRANCH"
|
|
44
|
+
echo "✅ Changes stashed"
|
|
52
45
|
fi
|
|
53
46
|
|
|
54
47
|
# Fetch latest changes from remote
|
|
@@ -92,13 +85,10 @@ echo " 2. Push your changes: git push"
|
|
|
92
85
|
echo " 3. Create a PR: gh pr create --base $BASE_BRANCH --title \"Your PR title\" --body \"Your PR description\""
|
|
93
86
|
echo " or use: npm run pr:create"
|
|
94
87
|
|
|
95
|
-
# Check if we had stashed changes
|
|
88
|
+
# Check if we had stashed changes and auto-apply them
|
|
96
89
|
if git stash list | grep -q "Auto-stash before creating branch $FULL_BRANCH"; then
|
|
97
90
|
echo ""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
git stash pop
|
|
102
|
-
echo "✅ Stashed changes applied"
|
|
103
|
-
fi
|
|
91
|
+
echo "Auto-applying stashed changes..."
|
|
92
|
+
git stash pop
|
|
93
|
+
echo "✅ Stashed changes applied"
|
|
104
94
|
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robosystems/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "TypeScript client library for RoboSystems Financial Knowledge Graph API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"typescript",
|
|
91
91
|
"knowledge-graph"
|
|
92
92
|
],
|
|
93
|
-
"author": "
|
|
93
|
+
"author": "RFS LLC",
|
|
94
94
|
"license": "MIT",
|
|
95
95
|
"repository": {
|
|
96
96
|
"type": "git",
|
package/sdk/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, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors,
|
|
2
|
+
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, 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, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, 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, CopyDataToGraphData, CopyDataToGraphResponses, CopyDataToGraphErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } 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
|
|
@@ -30,14 +30,49 @@ export declare const loginUser: <ThrowOnError extends boolean = false>(options:
|
|
|
30
30
|
export declare const logoutUser: <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => import("./client").RequestResult<LogoutUserResponses, LogoutUserErrors, ThrowOnError, "fields">;
|
|
31
31
|
/**
|
|
32
32
|
* Get Current User
|
|
33
|
-
* Get
|
|
33
|
+
* Get the currently authenticated user.
|
|
34
34
|
*/
|
|
35
35
|
export declare const getCurrentAuthUser: <ThrowOnError extends boolean = false>(options?: Options<GetCurrentAuthUserData, ThrowOnError>) => import("./client").RequestResult<GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, ThrowOnError, "fields">;
|
|
36
36
|
/**
|
|
37
37
|
* Refresh Session
|
|
38
|
-
* Refresh
|
|
38
|
+
* Refresh authentication session with a new JWT token.
|
|
39
39
|
*/
|
|
40
|
-
export declare const
|
|
40
|
+
export declare const refreshAuthSession: <ThrowOnError extends boolean = false>(options?: Options<RefreshAuthSessionData, ThrowOnError>) => import("./client").RequestResult<RefreshAuthSessionResponses, RefreshAuthSessionErrors, ThrowOnError, "fields">;
|
|
41
|
+
/**
|
|
42
|
+
* Resend Email Verification
|
|
43
|
+
* Resend verification email to the authenticated user. Rate limited to 3 per hour.
|
|
44
|
+
*/
|
|
45
|
+
export declare const resendVerificationEmail: <ThrowOnError extends boolean = false>(options?: Options<ResendVerificationEmailData, ThrowOnError>) => import("./client").RequestResult<ResendVerificationEmailResponses, ResendVerificationEmailErrors, ThrowOnError, "fields">;
|
|
46
|
+
/**
|
|
47
|
+
* Verify Email
|
|
48
|
+
* Verify email address with token from email link. Returns JWT for auto-login.
|
|
49
|
+
*/
|
|
50
|
+
export declare const verifyEmail: <ThrowOnError extends boolean = false>(options: Options<VerifyEmailData, ThrowOnError>) => import("./client").RequestResult<VerifyEmailResponses, VerifyEmailErrors, ThrowOnError, "fields">;
|
|
51
|
+
/**
|
|
52
|
+
* Get Password Policy
|
|
53
|
+
* Get current password policy requirements for frontend validation
|
|
54
|
+
*/
|
|
55
|
+
export declare const getPasswordPolicy: <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => import("./client").RequestResult<GetPasswordPolicyResponses, unknown, ThrowOnError, "fields">;
|
|
56
|
+
/**
|
|
57
|
+
* Check Password Strength
|
|
58
|
+
* Check password strength and get validation feedback
|
|
59
|
+
*/
|
|
60
|
+
export declare const checkPasswordStrength: <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => import("./client").RequestResult<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError, "fields">;
|
|
61
|
+
/**
|
|
62
|
+
* Forgot Password
|
|
63
|
+
* Request password reset email. Always returns success to prevent email enumeration.
|
|
64
|
+
*/
|
|
65
|
+
export declare const forgotPassword: <ThrowOnError extends boolean = false>(options: Options<ForgotPasswordData, ThrowOnError>) => import("./client").RequestResult<ForgotPasswordResponses, ForgotPasswordErrors, ThrowOnError, "fields">;
|
|
66
|
+
/**
|
|
67
|
+
* Validate Reset Token
|
|
68
|
+
* Check if a password reset token is valid without consuming it.
|
|
69
|
+
*/
|
|
70
|
+
export declare const validateResetToken: <ThrowOnError extends boolean = false>(options: Options<ValidateResetTokenData, ThrowOnError>) => import("./client").RequestResult<ValidateResetTokenResponses, ValidateResetTokenErrors, ThrowOnError, "fields">;
|
|
71
|
+
/**
|
|
72
|
+
* Reset Password
|
|
73
|
+
* Reset password with token from email. Returns JWT for auto-login.
|
|
74
|
+
*/
|
|
75
|
+
export declare const resetPassword: <ThrowOnError extends boolean = false>(options: Options<ResetPasswordData, ThrowOnError>) => import("./client").RequestResult<ResetPasswordResponses, ResetPasswordErrors, ThrowOnError, "fields">;
|
|
41
76
|
/**
|
|
42
77
|
* Generate SSO Token
|
|
43
78
|
* Generate a temporary SSO token for cross-app authentication.
|
|
@@ -58,16 +93,6 @@ export declare const ssoTokenExchange: <ThrowOnError extends boolean = false>(op
|
|
|
58
93
|
* Complete SSO authentication using session ID from secure handoff.
|
|
59
94
|
*/
|
|
60
95
|
export declare const completeSsoAuth: <ThrowOnError extends boolean = false>(options: Options<CompleteSsoAuthData, ThrowOnError>) => import("./client").RequestResult<CompleteSsoAuthResponses, CompleteSsoAuthErrors, ThrowOnError, "fields">;
|
|
61
|
-
/**
|
|
62
|
-
* Get Password Policy
|
|
63
|
-
* Get current password policy requirements for frontend validation
|
|
64
|
-
*/
|
|
65
|
-
export declare const getPasswordPolicy: <ThrowOnError extends boolean = false>(options?: Options<GetPasswordPolicyData, ThrowOnError>) => import("./client").RequestResult<GetPasswordPolicyResponses, unknown, ThrowOnError, "fields">;
|
|
66
|
-
/**
|
|
67
|
-
* Check Password Strength
|
|
68
|
-
* Check password strength and get validation feedback
|
|
69
|
-
*/
|
|
70
|
-
export declare const checkPasswordStrength: <ThrowOnError extends boolean = false>(options: Options<CheckPasswordStrengthData, ThrowOnError>) => import("./client").RequestResult<CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ThrowOnError, "fields">;
|
|
71
96
|
/**
|
|
72
97
|
* Get CAPTCHA Configuration
|
|
73
98
|
* Get CAPTCHA configuration including site key and whether CAPTCHA is required.
|
|
@@ -318,7 +343,7 @@ export declare const initOAuth: <ThrowOnError extends boolean = false>(options:
|
|
|
318
343
|
* - **QuickBooks**: Accounting data integration
|
|
319
344
|
*
|
|
320
345
|
* Security measures:
|
|
321
|
-
* - State validation prevents
|
|
346
|
+
* - State validation prevents session hijacking
|
|
322
347
|
* - User context is verified
|
|
323
348
|
* - Tokens are encrypted before storage
|
|
324
349
|
* - Full audit trail is maintained
|