@robosystems/client 0.1.14 → 0.1.16
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/README.md +3 -5
- package/package.json +49 -7
- package/sdk/client/client.gen.d.ts +2 -0
- package/sdk/client/client.gen.js +153 -0
- package/sdk/client/client.gen.ts +200 -0
- package/sdk/client/index.d.ts +7 -0
- package/sdk/client/index.js +15 -0
- package/sdk/client/index.ts +25 -0
- package/sdk/client/types.gen.d.ts +122 -0
- package/sdk/client/types.gen.js +4 -0
- package/sdk/client/types.gen.ts +233 -0
- package/sdk/client/utils.gen.d.ts +45 -0
- package/sdk/client/utils.gen.js +296 -0
- package/sdk/client/utils.gen.ts +419 -0
- package/sdk/client.gen.d.ts +12 -0
- package/sdk/client.gen.js +8 -0
- package/sdk/client.gen.ts +18 -0
- package/sdk/core/auth.gen.d.ts +18 -0
- package/sdk/core/auth.gen.js +18 -0
- package/sdk/core/auth.gen.ts +42 -0
- package/sdk/core/bodySerializer.gen.d.ts +17 -0
- package/sdk/core/bodySerializer.gen.js +57 -0
- package/sdk/core/bodySerializer.gen.ts +90 -0
- package/sdk/core/params.gen.d.ts +33 -0
- package/sdk/core/params.gen.js +92 -0
- package/sdk/core/params.gen.ts +153 -0
- package/sdk/core/pathSerializer.gen.d.ts +33 -0
- package/sdk/core/pathSerializer.gen.js +123 -0
- package/sdk/core/pathSerializer.gen.ts +181 -0
- package/sdk/core/types.gen.d.ts +78 -0
- package/sdk/core/types.gen.js +4 -0
- package/sdk/core/types.gen.ts +121 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.js +19 -0
- package/sdk/index.ts +3 -0
- package/sdk/sdk.gen.d.ts +1269 -0
- package/sdk/sdk.gen.js +2664 -0
- package/sdk/sdk.gen.ts +2677 -0
- package/sdk/types.gen.d.ts +6265 -0
- package/sdk/types.gen.js +3 -0
- package/sdk/types.gen.ts +6784 -0
- package/sdk-extensions/OperationClient.d.ts +64 -0
- package/sdk-extensions/OperationClient.js +251 -0
- package/sdk-extensions/OperationClient.ts +322 -0
- package/sdk-extensions/QueryClient.d.ts +50 -0
- package/sdk-extensions/QueryClient.js +190 -0
- package/sdk-extensions/QueryClient.ts +283 -0
- package/sdk-extensions/README.md +672 -0
- package/sdk-extensions/SSEClient.d.ts +48 -0
- package/sdk-extensions/SSEClient.js +148 -0
- package/sdk-extensions/SSEClient.ts +189 -0
- package/sdk-extensions/config.d.ts +32 -0
- package/sdk-extensions/config.js +74 -0
- package/sdk-extensions/config.ts +91 -0
- package/sdk-extensions/hooks.d.ts +110 -0
- package/sdk-extensions/hooks.js +371 -0
- package/sdk-extensions/hooks.ts +438 -0
- package/sdk-extensions/index.d.ts +46 -0
- package/sdk-extensions/index.js +110 -0
- package/sdk-extensions/index.ts +123 -0
- package/sdk.gen.d.ts +172 -48
- package/sdk.gen.js +297 -69
- package/sdk.gen.ts +296 -68
- package/types.gen.d.ts +647 -94
- package/types.gen.ts +727 -134
- package/openapi-ts.config.js +0 -9
- package/prepare.js +0 -221
package/sdk.gen.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.getAvailableExtensions = exports.createGraph = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.getCreditBillingInfoV1GraphIdBillingCreditsGet = exports.getAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGet = exports.getGraphSubscriptionV1GraphIdBillingSubscriptionGet = exports.upgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePost = exports.getGraphPricingInfoV1GraphIdBillingPricingGet = exports.getGraphUsageDetails = exports.getGraphBillingHistory = exports.getGraphMonthlyBill = exports.getCurrentGraphBill = exports.listSchemaExtensions = exports.exportGraphSchema = exports.validateSchema = exports.getGraphSchemaInfo = exports.executeCypherQuery = exports.getGraphUsageStats = exports.getGraphMetrics = exports.getBackupDownloadUrl = exports.kuzuBackupHealth = exports.getBackupStats = exports.restoreBackup = void 0;
|
|
4
|
+
exports.listBackups = exports.createBackup = exports.callMcpTool = exports.listMcpTools = exports.queryFinancialAgent = exports.oauthCallback = exports.initOAuth = exports.exchangeLinkToken = exports.createLinkToken = exports.syncConnection = exports.getConnection = exports.deleteConnection = exports.createConnection = exports.listConnections = exports.getConnectionOptions = exports.getRepositoryCredits = exports.getSharedRepositoryCredits = exports.cancelSharedRepositorySubscription = exports.upgradeSharedRepositorySubscription = exports.subscribeToSharedRepository = exports.getUserSharedSubscriptions = exports.getDetailedUserAnalytics = exports.getUserUsageOverview = exports.getAllSharedRepositoryLimits = exports.getSharedRepositoryLimits = exports.getUserUsage = exports.getUserLimits = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.getAllCreditSummaries = exports.selectUserGraph = exports.getUserGraphs = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.getCaptchaConfig = exports.completeSsoAuth = exports.ssoTokenExchange = exports.ssoLogin = exports.generateSsoToken = exports.refreshSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
|
|
5
|
+
exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.getAvailableExtensions = exports.createGraph = exports.getSubgraphInfo = exports.getSubgraphQuota = exports.deleteSubgraph = exports.createSubgraph = exports.listSubgraphs = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.getCreditBillingInfoV1GraphIdBillingCreditsGet = exports.getAvailableSubscriptionPlansV1GraphIdBillingAvailablePlansGet = exports.getGraphSubscriptionV1GraphIdBillingSubscriptionGet = exports.upgradeGraphSubscriptionV1GraphIdBillingSubscriptionUpgradePost = exports.getGraphPricingInfoV1GraphIdBillingPricingGet = exports.getGraphUsageDetails = exports.getGraphBillingHistory = exports.getGraphMonthlyBill = exports.getCurrentGraphBill = exports.listSchemaExtensions = exports.exportGraphSchema = exports.validateSchema = exports.getGraphSchemaInfo = exports.executeCypherQuery = exports.getGraphUsageStats = exports.getGraphMetrics = exports.getBackupDownloadUrl = exports.kuzuBackupHealth = exports.getBackupStats = exports.restoreBackup = exports.exportBackup = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Register New User
|
|
@@ -171,27 +171,6 @@ const getServiceStatus = (options) => {
|
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
173
|
exports.getServiceStatus = getServiceStatus;
|
|
174
|
-
/**
|
|
175
|
-
* MCP System Health Check
|
|
176
|
-
* Basic health check for MCP system components
|
|
177
|
-
*/
|
|
178
|
-
const getMcpHealth = (options) => {
|
|
179
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
180
|
-
security: [
|
|
181
|
-
{
|
|
182
|
-
name: 'X-API-Key',
|
|
183
|
-
type: 'apiKey'
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
scheme: 'bearer',
|
|
187
|
-
type: 'http'
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
url: '/v1/mcp/health',
|
|
191
|
-
...options
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
exports.getMcpHealth = getMcpHealth;
|
|
195
174
|
/**
|
|
196
175
|
* Get Current User
|
|
197
176
|
* Returns information about the currently authenticated user.
|
|
@@ -275,7 +254,7 @@ const selectUserGraph = (options) => {
|
|
|
275
254
|
type: 'http'
|
|
276
255
|
}
|
|
277
256
|
],
|
|
278
|
-
url: '/v1/user/graphs/
|
|
257
|
+
url: '/v1/user/graphs/{graph_id}/select',
|
|
279
258
|
...options
|
|
280
259
|
});
|
|
281
260
|
};
|
|
@@ -466,6 +445,56 @@ const getUserUsage = (options) => {
|
|
|
466
445
|
});
|
|
467
446
|
};
|
|
468
447
|
exports.getUserUsage = getUserUsage;
|
|
448
|
+
/**
|
|
449
|
+
* Get shared repository rate limit status
|
|
450
|
+
* Get current rate limit status and usage for a shared repository.
|
|
451
|
+
*
|
|
452
|
+
* Returns:
|
|
453
|
+
* - Current usage across different time windows
|
|
454
|
+
* - Rate limits based on subscription tier
|
|
455
|
+
* - Remaining quota
|
|
456
|
+
* - Reset times
|
|
457
|
+
*
|
|
458
|
+
* Note: All queries are FREE - this only shows rate limit status.
|
|
459
|
+
*/
|
|
460
|
+
const getSharedRepositoryLimits = (options) => {
|
|
461
|
+
return (options.client ?? client_gen_1.client).get({
|
|
462
|
+
security: [
|
|
463
|
+
{
|
|
464
|
+
name: 'X-API-Key',
|
|
465
|
+
type: 'apiKey'
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
scheme: 'bearer',
|
|
469
|
+
type: 'http'
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
url: '/v1/user/limits/shared-repositories/{repository}',
|
|
473
|
+
...options
|
|
474
|
+
});
|
|
475
|
+
};
|
|
476
|
+
exports.getSharedRepositoryLimits = getSharedRepositoryLimits;
|
|
477
|
+
/**
|
|
478
|
+
* Get all shared repository limits
|
|
479
|
+
* Get rate limit status for all shared repositories the user has access to.
|
|
480
|
+
*/
|
|
481
|
+
const getAllSharedRepositoryLimits = (options) => {
|
|
482
|
+
return (options?.client ?? client_gen_1.client).get({
|
|
483
|
+
security: [
|
|
484
|
+
{
|
|
485
|
+
name: 'X-API-Key',
|
|
486
|
+
type: 'apiKey'
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
scheme: 'bearer',
|
|
490
|
+
type: 'http'
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
url: '/v1/user/limits/shared-repositories/summary',
|
|
494
|
+
...options
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
exports.getAllSharedRepositoryLimits = getAllSharedRepositoryLimits;
|
|
469
498
|
/**
|
|
470
499
|
* Get User Usage Overview
|
|
471
500
|
* Get a high-level overview of usage statistics for the current user.
|
|
@@ -623,7 +652,7 @@ const getSharedRepositoryCredits = (options) => {
|
|
|
623
652
|
exports.getSharedRepositoryCredits = getSharedRepositoryCredits;
|
|
624
653
|
/**
|
|
625
654
|
* Get Repository Credits
|
|
626
|
-
* Get credit balance for a specific shared repository
|
|
655
|
+
* Get credit balance for a specific shared repository
|
|
627
656
|
*/
|
|
628
657
|
const getRepositoryCredits = (options) => {
|
|
629
658
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -637,7 +666,7 @@ const getRepositoryCredits = (options) => {
|
|
|
637
666
|
type: 'http'
|
|
638
667
|
}
|
|
639
668
|
],
|
|
640
|
-
url: '/v1/user/subscriptions/shared-repositories/credits/{
|
|
669
|
+
url: '/v1/user/subscriptions/shared-repositories/credits/{repository}',
|
|
641
670
|
...options
|
|
642
671
|
});
|
|
643
672
|
};
|
|
@@ -737,10 +766,8 @@ exports.listConnections = listConnections;
|
|
|
737
766
|
* - User completes bank authentication
|
|
738
767
|
* - Exchange public token for access
|
|
739
768
|
*
|
|
740
|
-
*
|
|
741
|
-
* -
|
|
742
|
-
* - Multiplied by graph tier
|
|
743
|
-
* - Additional credits consumed during data sync
|
|
769
|
+
* Note:
|
|
770
|
+
* This operation is FREE - no credit consumption required.
|
|
744
771
|
*/
|
|
745
772
|
const createConnection = (options) => {
|
|
746
773
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -773,9 +800,8 @@ exports.createConnection = createConnection;
|
|
|
773
800
|
* - Performs provider-specific cleanup
|
|
774
801
|
* - Revokes stored credentials
|
|
775
802
|
*
|
|
776
|
-
*
|
|
777
|
-
* -
|
|
778
|
-
* - Multiplied by graph tier
|
|
803
|
+
* Note:
|
|
804
|
+
* This operation is FREE - no credit consumption required.
|
|
779
805
|
*
|
|
780
806
|
* Only users with admin role can delete connections.
|
|
781
807
|
*/
|
|
@@ -848,10 +874,8 @@ exports.getConnection = getConnection;
|
|
|
848
874
|
* - Updates account balances
|
|
849
875
|
* - Categorizes new transactions
|
|
850
876
|
*
|
|
851
|
-
*
|
|
852
|
-
* -
|
|
853
|
-
* - Multiplied by graph tier
|
|
854
|
-
* - Additional credits may be consumed during processing
|
|
877
|
+
* Note:
|
|
878
|
+
* This operation is FREE - no credit consumption required.
|
|
855
879
|
*
|
|
856
880
|
* Returns a task ID for monitoring sync progress.
|
|
857
881
|
*/
|
|
@@ -1071,10 +1095,10 @@ exports.oauthCallback = oauthCallback;
|
|
|
1071
1095
|
* - Fallback to status polling endpoint if SSE unavailable
|
|
1072
1096
|
*
|
|
1073
1097
|
* **Credit Consumption:**
|
|
1074
|
-
* -
|
|
1075
|
-
* -
|
|
1076
|
-
* -
|
|
1077
|
-
* -
|
|
1098
|
+
* - AI operations consume credits based on actual token usage
|
|
1099
|
+
* - Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
|
|
1100
|
+
* - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
|
|
1101
|
+
* - Credits are consumed after operation completes based on actual usage
|
|
1078
1102
|
*
|
|
1079
1103
|
* The agent automatically determines query complexity or you can force extended analysis.
|
|
1080
1104
|
*/
|
|
@@ -1168,11 +1192,8 @@ exports.listMcpTools = listMcpTools;
|
|
|
1168
1192
|
* - `408 Request Timeout`: Tool execution exceeded timeout
|
|
1169
1193
|
* - Clients should implement exponential backoff on errors
|
|
1170
1194
|
*
|
|
1171
|
-
* **
|
|
1172
|
-
*
|
|
1173
|
-
* - Schema tools: 5-10 credits
|
|
1174
|
-
* - Query tools: 10-50 credits (based on complexity)
|
|
1175
|
-
* - Multiplied by graph tier
|
|
1195
|
+
* **Note:**
|
|
1196
|
+
* MCP tool calls are currently FREE and do not consume credits.
|
|
1176
1197
|
*/
|
|
1177
1198
|
const callMcpTool = (options) => {
|
|
1178
1199
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -1431,7 +1452,7 @@ const getBackupDownloadUrl = (options) => {
|
|
|
1431
1452
|
type: 'http'
|
|
1432
1453
|
}
|
|
1433
1454
|
],
|
|
1434
|
-
url: '/v1/{graph_id}/backup/{backup_id}/download
|
|
1455
|
+
url: '/v1/{graph_id}/backup/{backup_id}/download',
|
|
1435
1456
|
...options
|
|
1436
1457
|
});
|
|
1437
1458
|
};
|
|
@@ -1453,9 +1474,8 @@ exports.getBackupDownloadUrl = getBackupDownloadUrl;
|
|
|
1453
1474
|
* - Capacity planning
|
|
1454
1475
|
* - Performance optimization
|
|
1455
1476
|
*
|
|
1456
|
-
*
|
|
1457
|
-
* -
|
|
1458
|
-
* - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
1477
|
+
* Note:
|
|
1478
|
+
* This operation is FREE - no credit consumption required.
|
|
1459
1479
|
*/
|
|
1460
1480
|
const getGraphMetrics = (options) => {
|
|
1461
1481
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -1497,9 +1517,8 @@ exports.getGraphMetrics = getGraphMetrics;
|
|
|
1497
1517
|
* - Usage trend analysis
|
|
1498
1518
|
* - Performance tuning
|
|
1499
1519
|
*
|
|
1500
|
-
*
|
|
1501
|
-
* -
|
|
1502
|
-
* - Multiplied by graph tier
|
|
1520
|
+
* Note:
|
|
1521
|
+
* This operation is FREE - no credit consumption required.
|
|
1503
1522
|
*/
|
|
1504
1523
|
const getGraphUsageStats = (options) => {
|
|
1505
1524
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -1531,7 +1550,7 @@ exports.getGraphUsageStats = getGraphUsageStats;
|
|
|
1531
1550
|
* **Response Modes:**
|
|
1532
1551
|
* - `auto` (default): Intelligent automatic selection
|
|
1533
1552
|
* - `sync`: Force synchronous JSON response (best for testing)
|
|
1534
|
-
* - `async`: Force queued response with polling
|
|
1553
|
+
* - `async`: Force queued response with SSE monitoring endpoints (no polling needed)
|
|
1535
1554
|
* - `stream`: Force streaming response (SSE or NDJSON)
|
|
1536
1555
|
*
|
|
1537
1556
|
* **Client Detection:**
|
|
@@ -1554,19 +1573,19 @@ exports.getGraphUsageStats = getGraphUsageStats;
|
|
|
1554
1573
|
*
|
|
1555
1574
|
* **Queue Management:**
|
|
1556
1575
|
* - Automatic queuing under high load
|
|
1557
|
-
* -
|
|
1576
|
+
* - Real-time monitoring via SSE events (no polling needed)
|
|
1558
1577
|
* - Priority based on subscription tier
|
|
1559
|
-
* - Queue position updates via SSE
|
|
1578
|
+
* - Queue position and progress updates pushed via SSE
|
|
1579
|
+
* - Connect to returned `/v1/operations/{id}/stream` endpoint for updates
|
|
1560
1580
|
*
|
|
1561
1581
|
* **Error Handling:**
|
|
1562
1582
|
* - `429 Too Many Requests`: Rate limit or connection limit exceeded
|
|
1563
1583
|
* - `503 Service Unavailable`: Circuit breaker open or SSE disabled
|
|
1564
1584
|
* - Clients should implement exponential backoff
|
|
1565
1585
|
*
|
|
1566
|
-
* **
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1569
|
-
* - Queue position based on subscription tier
|
|
1586
|
+
* **Note:**
|
|
1587
|
+
* Query operations are FREE - no credit consumption required.
|
|
1588
|
+
* Queue position is based on subscription tier for priority.
|
|
1570
1589
|
*/
|
|
1571
1590
|
const executeCypherQuery = (options) => {
|
|
1572
1591
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -1601,10 +1620,7 @@ exports.executeCypherQuery = executeCypherQuery;
|
|
|
1601
1620
|
* This is different from custom schema management - it shows what actually exists in the database,
|
|
1602
1621
|
* useful for understanding the current graph structure before writing queries.
|
|
1603
1622
|
*
|
|
1604
|
-
*
|
|
1605
|
-
* - Base cost: 2.0 credits
|
|
1606
|
-
* - Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
1607
|
-
* - Schema information is cached for performance
|
|
1623
|
+
* This operation is FREE - no credit consumption required.
|
|
1608
1624
|
*/
|
|
1609
1625
|
const getGraphSchemaInfo = (options) => {
|
|
1610
1626
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -1646,9 +1662,7 @@ exports.getGraphSchemaInfo = getGraphSchemaInfo;
|
|
|
1646
1662
|
* - Performance problems
|
|
1647
1663
|
* - Naming conflicts
|
|
1648
1664
|
*
|
|
1649
|
-
*
|
|
1650
|
-
* - Base cost: 5.0 credits
|
|
1651
|
-
* - Multiplied by graph tier
|
|
1665
|
+
* This operation is FREE - no credit consumption required.
|
|
1652
1666
|
*/
|
|
1653
1667
|
const validateSchema = (options) => {
|
|
1654
1668
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -2194,6 +2208,220 @@ const getDatabaseInfo = (options) => {
|
|
|
2194
2208
|
});
|
|
2195
2209
|
};
|
|
2196
2210
|
exports.getDatabaseInfo = getDatabaseInfo;
|
|
2211
|
+
/**
|
|
2212
|
+
* List Subgraphs
|
|
2213
|
+
* List all subgraphs for a parent graph.
|
|
2214
|
+
*
|
|
2215
|
+
* **Requirements:**
|
|
2216
|
+
* - User must have at least read access to parent graph
|
|
2217
|
+
*
|
|
2218
|
+
* **Response includes:**
|
|
2219
|
+
* - List of all subgraphs with metadata
|
|
2220
|
+
* - Current usage vs limits
|
|
2221
|
+
* - Size and statistics per subgraph
|
|
2222
|
+
* - Creation timestamps
|
|
2223
|
+
*
|
|
2224
|
+
* **Filtering:**
|
|
2225
|
+
* Currently returns all subgraphs. Future versions will support:
|
|
2226
|
+
* - Filtering by status
|
|
2227
|
+
* - Filtering by creation date
|
|
2228
|
+
* - Pagination for large lists
|
|
2229
|
+
*/
|
|
2230
|
+
const listSubgraphs = (options) => {
|
|
2231
|
+
return (options.client ?? client_gen_1.client).get({
|
|
2232
|
+
security: [
|
|
2233
|
+
{
|
|
2234
|
+
name: 'X-API-Key',
|
|
2235
|
+
type: 'apiKey'
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
scheme: 'bearer',
|
|
2239
|
+
type: 'http'
|
|
2240
|
+
}
|
|
2241
|
+
],
|
|
2242
|
+
url: '/v1/{graph_id}/subgraphs',
|
|
2243
|
+
...options
|
|
2244
|
+
});
|
|
2245
|
+
};
|
|
2246
|
+
exports.listSubgraphs = listSubgraphs;
|
|
2247
|
+
/**
|
|
2248
|
+
* Create New Subgraph
|
|
2249
|
+
* Create a new subgraph database under an Enterprise or Premium parent graph.
|
|
2250
|
+
*
|
|
2251
|
+
* **Requirements:**
|
|
2252
|
+
* - Parent graph must be Enterprise or Premium tier
|
|
2253
|
+
* - User must have admin access to parent graph
|
|
2254
|
+
* - Subgraph name must be unique within parent
|
|
2255
|
+
* - Subgraph name must be alphanumeric (1-20 chars)
|
|
2256
|
+
*
|
|
2257
|
+
* **Subgraph Benefits:**
|
|
2258
|
+
* - Shares parent's infrastructure (no additional cost)
|
|
2259
|
+
* - Inherits parent's credit pool
|
|
2260
|
+
* - Isolated database on same instance
|
|
2261
|
+
* - Full Kuzu database capabilities
|
|
2262
|
+
*
|
|
2263
|
+
* **Use Cases:**
|
|
2264
|
+
* - Separate environments (dev/staging/prod)
|
|
2265
|
+
* - Department-specific data isolation
|
|
2266
|
+
* - Multi-tenant applications
|
|
2267
|
+
* - Testing and experimentation
|
|
2268
|
+
*
|
|
2269
|
+
* **Schema Inheritance:**
|
|
2270
|
+
* - Subgraphs can use parent's schema or custom extensions
|
|
2271
|
+
* - Extensions are additive only
|
|
2272
|
+
* - Base schema always included
|
|
2273
|
+
*
|
|
2274
|
+
* **Limits:**
|
|
2275
|
+
* - Standard: Not supported (0 subgraphs)
|
|
2276
|
+
* - Enterprise: Configurable limit (default: 10 subgraphs)
|
|
2277
|
+
* - Premium: Unlimited subgraphs
|
|
2278
|
+
* - Limits are defined in deployment configuration
|
|
2279
|
+
*
|
|
2280
|
+
* **Response includes:**
|
|
2281
|
+
* - `graph_id`: Full subgraph identifier
|
|
2282
|
+
* - `parent_graph_id`: Parent graph ID
|
|
2283
|
+
* - `subgraph_name`: Short name within parent
|
|
2284
|
+
* - `status`: Creation status
|
|
2285
|
+
*/
|
|
2286
|
+
const createSubgraph = (options) => {
|
|
2287
|
+
return (options.client ?? client_gen_1.client).post({
|
|
2288
|
+
security: [
|
|
2289
|
+
{
|
|
2290
|
+
name: 'X-API-Key',
|
|
2291
|
+
type: 'apiKey'
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
scheme: 'bearer',
|
|
2295
|
+
type: 'http'
|
|
2296
|
+
}
|
|
2297
|
+
],
|
|
2298
|
+
url: '/v1/{graph_id}/subgraphs',
|
|
2299
|
+
...options,
|
|
2300
|
+
headers: {
|
|
2301
|
+
'Content-Type': 'application/json',
|
|
2302
|
+
...options.headers
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
};
|
|
2306
|
+
exports.createSubgraph = createSubgraph;
|
|
2307
|
+
/**
|
|
2308
|
+
* Delete Subgraph
|
|
2309
|
+
* Delete a subgraph database.
|
|
2310
|
+
*
|
|
2311
|
+
* **Requirements:**
|
|
2312
|
+
* - Must be a valid subgraph (not parent graph)
|
|
2313
|
+
* - User must have admin access to parent graph
|
|
2314
|
+
* - Optional backup before deletion
|
|
2315
|
+
*
|
|
2316
|
+
* **Deletion Options:**
|
|
2317
|
+
* - `force`: Delete even if contains data
|
|
2318
|
+
* - `backup_first`: Create backup before deletion
|
|
2319
|
+
*
|
|
2320
|
+
* **Warning:**
|
|
2321
|
+
* Deletion is permanent unless backup is created.
|
|
2322
|
+
* All data in the subgraph will be lost.
|
|
2323
|
+
*
|
|
2324
|
+
* **Backup Location:**
|
|
2325
|
+
* If backup requested, stored in S3 at:
|
|
2326
|
+
* `s3://robosystems-backups/{instance_id}/{database_name}_{timestamp}.backup`
|
|
2327
|
+
*/
|
|
2328
|
+
const deleteSubgraph = (options) => {
|
|
2329
|
+
return (options.client ?? client_gen_1.client).delete({
|
|
2330
|
+
security: [
|
|
2331
|
+
{
|
|
2332
|
+
name: 'X-API-Key',
|
|
2333
|
+
type: 'apiKey'
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
scheme: 'bearer',
|
|
2337
|
+
type: 'http'
|
|
2338
|
+
}
|
|
2339
|
+
],
|
|
2340
|
+
url: '/v1/{graph_id}/subgraphs/{subgraph_name}',
|
|
2341
|
+
...options,
|
|
2342
|
+
headers: {
|
|
2343
|
+
'Content-Type': 'application/json',
|
|
2344
|
+
...options.headers
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2347
|
+
};
|
|
2348
|
+
exports.deleteSubgraph = deleteSubgraph;
|
|
2349
|
+
/**
|
|
2350
|
+
* Get Subgraph Quota
|
|
2351
|
+
* Get subgraph quota and usage information for a parent graph.
|
|
2352
|
+
*
|
|
2353
|
+
* **Shows:**
|
|
2354
|
+
* - Current subgraph count
|
|
2355
|
+
* - Maximum allowed subgraphs per tier
|
|
2356
|
+
* - Remaining capacity
|
|
2357
|
+
* - Total size usage across all subgraphs
|
|
2358
|
+
*
|
|
2359
|
+
* **Tier Limits:**
|
|
2360
|
+
* - Standard: 0 subgraphs (not supported)
|
|
2361
|
+
* - Enterprise: Configurable limit (default: 10 subgraphs)
|
|
2362
|
+
* - Premium: Unlimited subgraphs
|
|
2363
|
+
* - Limits are defined in deployment configuration
|
|
2364
|
+
*
|
|
2365
|
+
* **Size Tracking:**
|
|
2366
|
+
* Provides aggregate size metrics when available.
|
|
2367
|
+
* Individual subgraph sizes shown in list endpoint.
|
|
2368
|
+
*/
|
|
2369
|
+
const getSubgraphQuota = (options) => {
|
|
2370
|
+
return (options.client ?? client_gen_1.client).get({
|
|
2371
|
+
security: [
|
|
2372
|
+
{
|
|
2373
|
+
name: 'X-API-Key',
|
|
2374
|
+
type: 'apiKey'
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
scheme: 'bearer',
|
|
2378
|
+
type: 'http'
|
|
2379
|
+
}
|
|
2380
|
+
],
|
|
2381
|
+
url: '/v1/{graph_id}/subgraphs/quota',
|
|
2382
|
+
...options
|
|
2383
|
+
});
|
|
2384
|
+
};
|
|
2385
|
+
exports.getSubgraphQuota = getSubgraphQuota;
|
|
2386
|
+
/**
|
|
2387
|
+
* Get Subgraph Details
|
|
2388
|
+
* Get detailed information about a specific subgraph.
|
|
2389
|
+
*
|
|
2390
|
+
* **Requirements:**
|
|
2391
|
+
* - User must have read access to parent graph
|
|
2392
|
+
*
|
|
2393
|
+
* **Response includes:**
|
|
2394
|
+
* - Full subgraph metadata
|
|
2395
|
+
* - Database statistics (nodes, edges)
|
|
2396
|
+
* - Size information
|
|
2397
|
+
* - Schema configuration
|
|
2398
|
+
* - Creation/modification timestamps
|
|
2399
|
+
* - Last access time (when available)
|
|
2400
|
+
*
|
|
2401
|
+
* **Statistics:**
|
|
2402
|
+
* Real-time statistics queried from Kuzu:
|
|
2403
|
+
* - Node count
|
|
2404
|
+
* - Edge count
|
|
2405
|
+
* - Database size on disk
|
|
2406
|
+
* - Schema information
|
|
2407
|
+
*/
|
|
2408
|
+
const getSubgraphInfo = (options) => {
|
|
2409
|
+
return (options.client ?? client_gen_1.client).get({
|
|
2410
|
+
security: [
|
|
2411
|
+
{
|
|
2412
|
+
name: 'X-API-Key',
|
|
2413
|
+
type: 'apiKey'
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
scheme: 'bearer',
|
|
2417
|
+
type: 'http'
|
|
2418
|
+
}
|
|
2419
|
+
],
|
|
2420
|
+
url: '/v1/{graph_id}/subgraphs/{subgraph_name}/info',
|
|
2421
|
+
...options
|
|
2422
|
+
});
|
|
2423
|
+
};
|
|
2424
|
+
exports.getSubgraphInfo = getSubgraphInfo;
|
|
2197
2425
|
/**
|
|
2198
2426
|
* Create New Graph Database
|
|
2199
2427
|
* Create a new graph database with specified schema and optionally an initial entity.
|
|
@@ -2274,7 +2502,7 @@ const getAvailableExtensions = (options) => {
|
|
|
2274
2502
|
type: 'http'
|
|
2275
2503
|
}
|
|
2276
2504
|
],
|
|
2277
|
-
url: '/v1/create/graph/
|
|
2505
|
+
url: '/v1/create/graph/extensions',
|
|
2278
2506
|
...options
|
|
2279
2507
|
});
|
|
2280
2508
|
};
|
|
@@ -2288,7 +2516,7 @@ exports.getAvailableExtensions = getAvailableExtensions;
|
|
|
2288
2516
|
* applications to display subscription options.
|
|
2289
2517
|
*
|
|
2290
2518
|
* Includes:
|
|
2291
|
-
* - Graph subscription tiers (
|
|
2519
|
+
* - Graph subscription tiers (standard, enterprise, premium)
|
|
2292
2520
|
* - Shared repository subscriptions (SEC, industry, economic data)
|
|
2293
2521
|
* - Operation costs and credit information
|
|
2294
2522
|
* - Features and capabilities for each tier
|