@robosystems/client 0.2.7 → 0.2.9
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/package.json +1 -1
- package/sdk/sdk.gen.d.ts +92 -186
- package/sdk/sdk.gen.js +165 -451
- package/sdk/sdk.gen.ts +165 -451
- package/sdk/types.gen.d.ts +397 -968
- package/sdk/types.gen.ts +595 -1227
- package/sdk.gen.d.ts +92 -186
- package/sdk.gen.js +165 -451
- package/sdk.gen.ts +165 -451
- package/types.gen.d.ts +397 -968
- package/types.gen.ts +595 -1227
package/sdk/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.selectGraph = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.queryTables = exports.ingestTables = exports.updateFileStatus = exports.getFileInfo = exports.deleteFile = exports.getUploadUrl = exports.listTableFiles = exports.listTables = exports.
|
|
4
|
+
exports.getGraphUsageAnalytics = exports.getGraphMetrics = exports.getBackupStats = exports.restoreBackup = exports.getBackupDownloadUrl = exports.createBackup = exports.listBackups = exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = exports.getAgentMetadata = exports.listAgents = exports.batchProcessQueries = exports.executeSpecificAgent = exports.autoSelectAgent = exports.syncConnection = exports.getConnection = exports.deleteConnection = exports.oauthCallback = exports.initOAuth = exports.createLinkToken = exports.exchangeLinkToken = exports.getConnectionOptions = exports.createConnection = exports.listConnections = exports.getUserLimits = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.getCaptchaConfig = exports.completeSsoAuth = exports.ssoTokenExchange = exports.generateSsoToken = exports.resetPassword = exports.validateResetToken = exports.forgotPassword = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.verifyEmail = exports.resendVerificationEmail = exports.refreshAuthSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
|
|
5
|
+
exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.selectGraph = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.queryTables = exports.ingestTables = exports.updateFileStatus = exports.getFileInfo = exports.deleteFile = exports.getUploadUrl = exports.listTableFiles = exports.listTables = exports.upgradeSubscription = exports.createRepositorySubscription = exports.getGraphSubscription = exports.cancelSubscription = exports.getSubgraphQuota = exports.getSubgraphInfo = exports.deleteSubgraph = exports.createSubgraph = exports.listSubgraphs = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.validateSchema = exports.exportGraphSchema = exports.getGraphSchema = exports.executeCypherQuery = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Register New User
|
|
@@ -269,33 +269,6 @@ const updateUser = (options) => {
|
|
|
269
269
|
});
|
|
270
270
|
};
|
|
271
271
|
exports.updateUser = updateUser;
|
|
272
|
-
/**
|
|
273
|
-
* Get All Credit Summaries
|
|
274
|
-
* Get credit summaries for all graphs owned by the user.
|
|
275
|
-
*
|
|
276
|
-
* This endpoint provides a consolidated view of credit usage across
|
|
277
|
-
* all graphs where the user has access, helping to monitor overall
|
|
278
|
-
* credit consumption and plan usage.
|
|
279
|
-
*
|
|
280
|
-
* No credits are consumed for viewing summaries.
|
|
281
|
-
*/
|
|
282
|
-
const getAllCreditSummaries = (options) => {
|
|
283
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
284
|
-
security: [
|
|
285
|
-
{
|
|
286
|
-
name: 'X-API-Key',
|
|
287
|
-
type: 'apiKey'
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
scheme: 'bearer',
|
|
291
|
-
type: 'http'
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
url: '/v1/user/credits',
|
|
295
|
-
...options
|
|
296
|
-
});
|
|
297
|
-
};
|
|
298
|
-
exports.getAllCreditSummaries = getAllCreditSummaries;
|
|
299
272
|
/**
|
|
300
273
|
* Update Password
|
|
301
274
|
* Update the current user's password.
|
|
@@ -414,8 +387,8 @@ const updateUserApiKey = (options) => {
|
|
|
414
387
|
};
|
|
415
388
|
exports.updateUserApiKey = updateUserApiKey;
|
|
416
389
|
/**
|
|
417
|
-
* Get user limits
|
|
418
|
-
* Retrieve current limits and
|
|
390
|
+
* Get user limits and usage
|
|
391
|
+
* Retrieve current limits and usage statistics for the authenticated user (simple safety valve for graph creation)
|
|
419
392
|
*/
|
|
420
393
|
const getUserLimits = (options) => {
|
|
421
394
|
return (options?.client ?? client_gen_1.client).get({
|
|
@@ -434,253 +407,6 @@ const getUserLimits = (options) => {
|
|
|
434
407
|
});
|
|
435
408
|
};
|
|
436
409
|
exports.getUserLimits = getUserLimits;
|
|
437
|
-
/**
|
|
438
|
-
* Get user usage statistics
|
|
439
|
-
* Retrieve current usage statistics and remaining limits for the authenticated user
|
|
440
|
-
*/
|
|
441
|
-
const getUserUsage = (options) => {
|
|
442
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
443
|
-
security: [
|
|
444
|
-
{
|
|
445
|
-
name: 'X-API-Key',
|
|
446
|
-
type: 'apiKey'
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
scheme: 'bearer',
|
|
450
|
-
type: 'http'
|
|
451
|
-
}
|
|
452
|
-
],
|
|
453
|
-
url: '/v1/user/limits/usage',
|
|
454
|
-
...options
|
|
455
|
-
});
|
|
456
|
-
};
|
|
457
|
-
exports.getUserUsage = getUserUsage;
|
|
458
|
-
/**
|
|
459
|
-
* Get all shared repository limits
|
|
460
|
-
* Get rate limit status for all shared repositories the user has access to.
|
|
461
|
-
*/
|
|
462
|
-
const getAllSharedRepositoryLimits = (options) => {
|
|
463
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
464
|
-
security: [
|
|
465
|
-
{
|
|
466
|
-
name: 'X-API-Key',
|
|
467
|
-
type: 'apiKey'
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
scheme: 'bearer',
|
|
471
|
-
type: 'http'
|
|
472
|
-
}
|
|
473
|
-
],
|
|
474
|
-
url: '/v1/user/limits/shared-repositories/summary',
|
|
475
|
-
...options
|
|
476
|
-
});
|
|
477
|
-
};
|
|
478
|
-
exports.getAllSharedRepositoryLimits = getAllSharedRepositoryLimits;
|
|
479
|
-
/**
|
|
480
|
-
* Get shared repository rate limit status
|
|
481
|
-
* Get current rate limit status and usage for a shared repository.
|
|
482
|
-
*
|
|
483
|
-
* Returns:
|
|
484
|
-
* - Current usage across different time windows
|
|
485
|
-
* - Rate limits based on subscription tier
|
|
486
|
-
* - Remaining quota
|
|
487
|
-
* - Reset times
|
|
488
|
-
*
|
|
489
|
-
* Note: All queries are included - this only shows rate limit status.
|
|
490
|
-
*/
|
|
491
|
-
const getSharedRepositoryLimits = (options) => {
|
|
492
|
-
return (options.client ?? client_gen_1.client).get({
|
|
493
|
-
security: [
|
|
494
|
-
{
|
|
495
|
-
name: 'X-API-Key',
|
|
496
|
-
type: 'apiKey'
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
scheme: 'bearer',
|
|
500
|
-
type: 'http'
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
url: '/v1/user/limits/shared-repositories/{repository}',
|
|
504
|
-
...options
|
|
505
|
-
});
|
|
506
|
-
};
|
|
507
|
-
exports.getSharedRepositoryLimits = getSharedRepositoryLimits;
|
|
508
|
-
/**
|
|
509
|
-
* Get User Usage Overview
|
|
510
|
-
* Get a high-level overview of usage statistics for the current user.
|
|
511
|
-
*/
|
|
512
|
-
const getUserUsageOverview = (options) => {
|
|
513
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
514
|
-
security: [
|
|
515
|
-
{
|
|
516
|
-
name: 'X-API-Key',
|
|
517
|
-
type: 'apiKey'
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
scheme: 'bearer',
|
|
521
|
-
type: 'http'
|
|
522
|
-
}
|
|
523
|
-
],
|
|
524
|
-
url: '/v1/user/analytics/overview',
|
|
525
|
-
...options
|
|
526
|
-
});
|
|
527
|
-
};
|
|
528
|
-
exports.getUserUsageOverview = getUserUsageOverview;
|
|
529
|
-
/**
|
|
530
|
-
* Get Detailed User Analytics
|
|
531
|
-
* Get comprehensive analytics for the current user including API usage and recent activity.
|
|
532
|
-
*/
|
|
533
|
-
const getDetailedUserAnalytics = (options) => {
|
|
534
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
535
|
-
security: [
|
|
536
|
-
{
|
|
537
|
-
name: 'X-API-Key',
|
|
538
|
-
type: 'apiKey'
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
scheme: 'bearer',
|
|
542
|
-
type: 'http'
|
|
543
|
-
}
|
|
544
|
-
],
|
|
545
|
-
url: '/v1/user/analytics/detailed',
|
|
546
|
-
...options
|
|
547
|
-
});
|
|
548
|
-
};
|
|
549
|
-
exports.getDetailedUserAnalytics = getDetailedUserAnalytics;
|
|
550
|
-
/**
|
|
551
|
-
* Get User Subscriptions
|
|
552
|
-
* Retrieve user's current shared repository subscriptions with detailed information
|
|
553
|
-
*/
|
|
554
|
-
const getUserSharedSubscriptions = (options) => {
|
|
555
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
556
|
-
security: [
|
|
557
|
-
{
|
|
558
|
-
name: 'X-API-Key',
|
|
559
|
-
type: 'apiKey'
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
scheme: 'bearer',
|
|
563
|
-
type: 'http'
|
|
564
|
-
}
|
|
565
|
-
],
|
|
566
|
-
url: '/v1/user/subscriptions/shared-repositories',
|
|
567
|
-
...options
|
|
568
|
-
});
|
|
569
|
-
};
|
|
570
|
-
exports.getUserSharedSubscriptions = getUserSharedSubscriptions;
|
|
571
|
-
/**
|
|
572
|
-
* Subscribe to Shared Repository
|
|
573
|
-
* Create a new subscription to a shared repository add-on with specified tier
|
|
574
|
-
*/
|
|
575
|
-
const subscribeToSharedRepository = (options) => {
|
|
576
|
-
return (options.client ?? client_gen_1.client).post({
|
|
577
|
-
security: [
|
|
578
|
-
{
|
|
579
|
-
name: 'X-API-Key',
|
|
580
|
-
type: 'apiKey'
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
scheme: 'bearer',
|
|
584
|
-
type: 'http'
|
|
585
|
-
}
|
|
586
|
-
],
|
|
587
|
-
url: '/v1/user/subscriptions/shared-repositories/subscribe',
|
|
588
|
-
...options,
|
|
589
|
-
headers: {
|
|
590
|
-
'Content-Type': 'application/json',
|
|
591
|
-
...options.headers
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
};
|
|
595
|
-
exports.subscribeToSharedRepository = subscribeToSharedRepository;
|
|
596
|
-
/**
|
|
597
|
-
* Upgrade Subscription Tier
|
|
598
|
-
* Upgrade a subscription to a higher tier with immediate credit adjustment
|
|
599
|
-
*/
|
|
600
|
-
const upgradeSharedRepositorySubscription = (options) => {
|
|
601
|
-
return (options.client ?? client_gen_1.client).put({
|
|
602
|
-
security: [
|
|
603
|
-
{
|
|
604
|
-
name: 'X-API-Key',
|
|
605
|
-
type: 'apiKey'
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
scheme: 'bearer',
|
|
609
|
-
type: 'http'
|
|
610
|
-
}
|
|
611
|
-
],
|
|
612
|
-
url: '/v1/user/subscriptions/shared-repositories/{subscription_id}/upgrade',
|
|
613
|
-
...options,
|
|
614
|
-
headers: {
|
|
615
|
-
'Content-Type': 'application/json',
|
|
616
|
-
...options.headers
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
exports.upgradeSharedRepositorySubscription = upgradeSharedRepositorySubscription;
|
|
621
|
-
/**
|
|
622
|
-
* Cancel Subscription
|
|
623
|
-
* Cancel a shared repository subscription and disable associated credit pool
|
|
624
|
-
*/
|
|
625
|
-
const cancelSharedRepositorySubscription = (options) => {
|
|
626
|
-
return (options.client ?? client_gen_1.client).delete({
|
|
627
|
-
security: [
|
|
628
|
-
{
|
|
629
|
-
name: 'X-API-Key',
|
|
630
|
-
type: 'apiKey'
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
scheme: 'bearer',
|
|
634
|
-
type: 'http'
|
|
635
|
-
}
|
|
636
|
-
],
|
|
637
|
-
url: '/v1/user/subscriptions/shared-repositories/{subscription_id}',
|
|
638
|
-
...options
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
exports.cancelSharedRepositorySubscription = cancelSharedRepositorySubscription;
|
|
642
|
-
/**
|
|
643
|
-
* Get Credit Balances
|
|
644
|
-
* Retrieve credit balances for all shared repository subscriptions
|
|
645
|
-
*/
|
|
646
|
-
const getSharedRepositoryCredits = (options) => {
|
|
647
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
648
|
-
security: [
|
|
649
|
-
{
|
|
650
|
-
name: 'X-API-Key',
|
|
651
|
-
type: 'apiKey'
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
scheme: 'bearer',
|
|
655
|
-
type: 'http'
|
|
656
|
-
}
|
|
657
|
-
],
|
|
658
|
-
url: '/v1/user/subscriptions/shared-repositories/credits',
|
|
659
|
-
...options
|
|
660
|
-
});
|
|
661
|
-
};
|
|
662
|
-
exports.getSharedRepositoryCredits = getSharedRepositoryCredits;
|
|
663
|
-
/**
|
|
664
|
-
* Get Repository Credits
|
|
665
|
-
* Get credit balance for a specific shared repository
|
|
666
|
-
*/
|
|
667
|
-
const getRepositoryCredits = (options) => {
|
|
668
|
-
return (options.client ?? client_gen_1.client).get({
|
|
669
|
-
security: [
|
|
670
|
-
{
|
|
671
|
-
name: 'X-API-Key',
|
|
672
|
-
type: 'apiKey'
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
scheme: 'bearer',
|
|
676
|
-
type: 'http'
|
|
677
|
-
}
|
|
678
|
-
],
|
|
679
|
-
url: '/v1/user/subscriptions/shared-repositories/credits/{repository}',
|
|
680
|
-
...options
|
|
681
|
-
});
|
|
682
|
-
};
|
|
683
|
-
exports.getRepositoryCredits = getRepositoryCredits;
|
|
684
410
|
/**
|
|
685
411
|
* List Connections
|
|
686
412
|
* List all data connections in the graph.
|
|
@@ -1665,32 +1391,38 @@ const getGraphMetrics = (options) => {
|
|
|
1665
1391
|
};
|
|
1666
1392
|
exports.getGraphMetrics = getGraphMetrics;
|
|
1667
1393
|
/**
|
|
1668
|
-
* Get Usage
|
|
1669
|
-
* Get
|
|
1394
|
+
* Get Graph Usage Analytics
|
|
1395
|
+
* Get comprehensive usage analytics tracked by the GraphUsageTracking model.
|
|
1670
1396
|
*
|
|
1671
1397
|
* Provides temporal usage patterns including:
|
|
1672
|
-
* - **
|
|
1673
|
-
* - **Credit
|
|
1674
|
-
* - **
|
|
1675
|
-
* - **
|
|
1676
|
-
* - **Peak Usage Times**: Identify high-activity periods
|
|
1398
|
+
* - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
|
|
1399
|
+
* - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
|
|
1400
|
+
* - **Performance Insights**: Operation stats, slow queries, performance scoring
|
|
1401
|
+
* - **Recent Events**: Latest usage events with full details
|
|
1677
1402
|
*
|
|
1678
1403
|
* Time ranges available:
|
|
1679
|
-
* - Last 24 hours (hourly breakdown)
|
|
1680
|
-
* - Last 7 days (daily breakdown)
|
|
1681
|
-
* - Last 30 days (daily breakdown)
|
|
1682
|
-
* -
|
|
1404
|
+
* - `24h` - Last 24 hours (hourly breakdown)
|
|
1405
|
+
* - `7d` - Last 7 days (daily breakdown)
|
|
1406
|
+
* - `30d` - Last 30 days (daily breakdown)
|
|
1407
|
+
* - `current_month` - Current billing month
|
|
1408
|
+
* - `last_month` - Previous billing month
|
|
1409
|
+
*
|
|
1410
|
+
* Include options:
|
|
1411
|
+
* - `storage` - Storage usage summary (GB-hours, averages, peaks)
|
|
1412
|
+
* - `credits` - Credit consumption analytics
|
|
1413
|
+
* - `performance` - Performance insights and optimization opportunities
|
|
1414
|
+
* - `events` - Recent usage events (last 50)
|
|
1683
1415
|
*
|
|
1684
1416
|
* Useful for:
|
|
1417
|
+
* - Billing and cost analysis
|
|
1685
1418
|
* - Capacity planning
|
|
1686
|
-
* -
|
|
1419
|
+
* - Performance optimization
|
|
1687
1420
|
* - Usage trend analysis
|
|
1688
|
-
* - Performance tuning
|
|
1689
1421
|
*
|
|
1690
1422
|
* Note:
|
|
1691
1423
|
* This operation is included - no credit consumption required.
|
|
1692
1424
|
*/
|
|
1693
|
-
const
|
|
1425
|
+
const getGraphUsageAnalytics = (options) => {
|
|
1694
1426
|
return (options.client ?? client_gen_1.client).get({
|
|
1695
1427
|
security: [
|
|
1696
1428
|
{
|
|
@@ -1706,7 +1438,7 @@ const getGraphUsageStats = (options) => {
|
|
|
1706
1438
|
...options
|
|
1707
1439
|
});
|
|
1708
1440
|
};
|
|
1709
|
-
exports.
|
|
1441
|
+
exports.getGraphUsageAnalytics = getGraphUsageAnalytics;
|
|
1710
1442
|
/**
|
|
1711
1443
|
* Execute Cypher Query (Read-Only)
|
|
1712
1444
|
* Execute a read-only Cypher query with intelligent response optimization.
|
|
@@ -1959,141 +1691,6 @@ const validateSchema = (options) => {
|
|
|
1959
1691
|
});
|
|
1960
1692
|
};
|
|
1961
1693
|
exports.validateSchema = validateSchema;
|
|
1962
|
-
/**
|
|
1963
|
-
* Get Current Bill
|
|
1964
|
-
* Get current month's billing details for the graph.
|
|
1965
|
-
*
|
|
1966
|
-
* Returns comprehensive billing information including:
|
|
1967
|
-
* - **Credit Usage**: Consumed vs. allocated credits
|
|
1968
|
-
* - **Storage Charges**: Current storage usage and costs
|
|
1969
|
-
* - **Subscription Tier**: Current plan and features
|
|
1970
|
-
* - **Pro-rated Charges**: If plan changed mid-month
|
|
1971
|
-
* - **Estimated Total**: Current charges to date
|
|
1972
|
-
*
|
|
1973
|
-
* Billing calculations are updated hourly. Storage is measured in GB-months.
|
|
1974
|
-
*
|
|
1975
|
-
* ℹ️ No credits are consumed for viewing billing information.
|
|
1976
|
-
*/
|
|
1977
|
-
const getCurrentGraphBill = (options) => {
|
|
1978
|
-
return (options.client ?? client_gen_1.client).get({
|
|
1979
|
-
security: [
|
|
1980
|
-
{
|
|
1981
|
-
name: 'X-API-Key',
|
|
1982
|
-
type: 'apiKey'
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
scheme: 'bearer',
|
|
1986
|
-
type: 'http'
|
|
1987
|
-
}
|
|
1988
|
-
],
|
|
1989
|
-
url: '/v1/graphs/{graph_id}/billing/current',
|
|
1990
|
-
...options
|
|
1991
|
-
});
|
|
1992
|
-
};
|
|
1993
|
-
exports.getCurrentGraphBill = getCurrentGraphBill;
|
|
1994
|
-
/**
|
|
1995
|
-
* Get Usage Details
|
|
1996
|
-
* Get detailed usage metrics for the graph.
|
|
1997
|
-
*
|
|
1998
|
-
* Provides granular usage information including:
|
|
1999
|
-
* - **Daily Credit Consumption**: Track credit usage patterns
|
|
2000
|
-
* - **Storage Growth**: Monitor database size over time
|
|
2001
|
-
* - **Operation Breakdown**: Credits by operation type
|
|
2002
|
-
* - **Peak Usage Times**: Identify high-activity periods
|
|
2003
|
-
* - **API Call Volumes**: Request counts and patterns
|
|
2004
|
-
*
|
|
2005
|
-
* Useful for:
|
|
2006
|
-
* - Optimizing credit consumption
|
|
2007
|
-
* - Capacity planning
|
|
2008
|
-
* - Usage trend analysis
|
|
2009
|
-
* - Cost optimization
|
|
2010
|
-
*
|
|
2011
|
-
* ℹ️ No credits are consumed for viewing usage details.
|
|
2012
|
-
*/
|
|
2013
|
-
const getGraphUsageDetails = (options) => {
|
|
2014
|
-
return (options.client ?? client_gen_1.client).get({
|
|
2015
|
-
security: [
|
|
2016
|
-
{
|
|
2017
|
-
name: 'X-API-Key',
|
|
2018
|
-
type: 'apiKey'
|
|
2019
|
-
},
|
|
2020
|
-
{
|
|
2021
|
-
scheme: 'bearer',
|
|
2022
|
-
type: 'http'
|
|
2023
|
-
}
|
|
2024
|
-
],
|
|
2025
|
-
url: '/v1/graphs/{graph_id}/billing/usage',
|
|
2026
|
-
...options
|
|
2027
|
-
});
|
|
2028
|
-
};
|
|
2029
|
-
exports.getGraphUsageDetails = getGraphUsageDetails;
|
|
2030
|
-
/**
|
|
2031
|
-
* Get Billing History
|
|
2032
|
-
* Get billing history for the graph.
|
|
2033
|
-
*
|
|
2034
|
-
* Returns a chronological list of monthly bills, perfect for:
|
|
2035
|
-
* - Tracking spending trends over time
|
|
2036
|
-
* - Identifying usage patterns
|
|
2037
|
-
* - Budget forecasting
|
|
2038
|
-
* - Financial reporting
|
|
2039
|
-
*
|
|
2040
|
-
* Each month includes:
|
|
2041
|
-
* - Credit usage and overages
|
|
2042
|
-
* - Storage charges
|
|
2043
|
-
* - Total charges
|
|
2044
|
-
* - Usage metrics
|
|
2045
|
-
*
|
|
2046
|
-
* ℹ️ No credits are consumed for viewing billing history.
|
|
2047
|
-
*/
|
|
2048
|
-
const getGraphBillingHistory = (options) => {
|
|
2049
|
-
return (options.client ?? client_gen_1.client).get({
|
|
2050
|
-
security: [
|
|
2051
|
-
{
|
|
2052
|
-
name: 'X-API-Key',
|
|
2053
|
-
type: 'apiKey'
|
|
2054
|
-
},
|
|
2055
|
-
{
|
|
2056
|
-
scheme: 'bearer',
|
|
2057
|
-
type: 'http'
|
|
2058
|
-
}
|
|
2059
|
-
],
|
|
2060
|
-
url: '/v1/graphs/{graph_id}/billing/history',
|
|
2061
|
-
...options
|
|
2062
|
-
});
|
|
2063
|
-
};
|
|
2064
|
-
exports.getGraphBillingHistory = getGraphBillingHistory;
|
|
2065
|
-
/**
|
|
2066
|
-
* Get Monthly Bill
|
|
2067
|
-
* Get billing details for a specific month.
|
|
2068
|
-
*
|
|
2069
|
-
* Retrieve historical billing information for any previous month.
|
|
2070
|
-
* Useful for:
|
|
2071
|
-
* - Reconciling past charges
|
|
2072
|
-
* - Tracking usage trends
|
|
2073
|
-
* - Expense reporting
|
|
2074
|
-
* - Budget analysis
|
|
2075
|
-
*
|
|
2076
|
-
* Returns the same detailed breakdown as the current bill endpoint.
|
|
2077
|
-
*
|
|
2078
|
-
* ℹ️ No credits are consumed for viewing billing history.
|
|
2079
|
-
*/
|
|
2080
|
-
const getGraphMonthlyBill = (options) => {
|
|
2081
|
-
return (options.client ?? client_gen_1.client).get({
|
|
2082
|
-
security: [
|
|
2083
|
-
{
|
|
2084
|
-
name: 'X-API-Key',
|
|
2085
|
-
type: 'apiKey'
|
|
2086
|
-
},
|
|
2087
|
-
{
|
|
2088
|
-
scheme: 'bearer',
|
|
2089
|
-
type: 'http'
|
|
2090
|
-
}
|
|
2091
|
-
],
|
|
2092
|
-
url: '/v1/graphs/{graph_id}/billing/history/{year}/{month}',
|
|
2093
|
-
...options
|
|
2094
|
-
});
|
|
2095
|
-
};
|
|
2096
|
-
exports.getGraphMonthlyBill = getGraphMonthlyBill;
|
|
2097
1694
|
/**
|
|
2098
1695
|
* Get Credit Summary
|
|
2099
1696
|
* Retrieve comprehensive credit usage summary for the specified graph.
|
|
@@ -2541,6 +2138,116 @@ const getSubgraphQuota = (options) => {
|
|
|
2541
2138
|
});
|
|
2542
2139
|
};
|
|
2543
2140
|
exports.getSubgraphQuota = getSubgraphQuota;
|
|
2141
|
+
/**
|
|
2142
|
+
* Cancel Subscription
|
|
2143
|
+
* Cancel a subscription.
|
|
2144
|
+
*
|
|
2145
|
+
* For shared repositories: Cancels the user's personal subscription
|
|
2146
|
+
* For user graphs: Not allowed - delete the graph instead
|
|
2147
|
+
*
|
|
2148
|
+
* The subscription will be marked as canceled and will end at the current period end date.
|
|
2149
|
+
*/
|
|
2150
|
+
const cancelSubscription = (options) => {
|
|
2151
|
+
return (options.client ?? client_gen_1.client).delete({
|
|
2152
|
+
security: [
|
|
2153
|
+
{
|
|
2154
|
+
name: 'X-API-Key',
|
|
2155
|
+
type: 'apiKey'
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
scheme: 'bearer',
|
|
2159
|
+
type: 'http'
|
|
2160
|
+
}
|
|
2161
|
+
],
|
|
2162
|
+
url: '/v1/graphs/{graph_id}/subscriptions',
|
|
2163
|
+
...options
|
|
2164
|
+
});
|
|
2165
|
+
};
|
|
2166
|
+
exports.cancelSubscription = cancelSubscription;
|
|
2167
|
+
/**
|
|
2168
|
+
* Get Subscription
|
|
2169
|
+
* Get subscription details for a graph or shared repository.
|
|
2170
|
+
*
|
|
2171
|
+
* For user graphs (kg*): Returns the graph's subscription (owned by graph creator)
|
|
2172
|
+
* For shared repositories (sec, industry, etc.): Returns user's personal subscription to that repository
|
|
2173
|
+
*
|
|
2174
|
+
* This unified endpoint automatically detects the resource type and returns the appropriate subscription.
|
|
2175
|
+
*/
|
|
2176
|
+
const getGraphSubscription = (options) => {
|
|
2177
|
+
return (options.client ?? client_gen_1.client).get({
|
|
2178
|
+
security: [
|
|
2179
|
+
{
|
|
2180
|
+
name: 'X-API-Key',
|
|
2181
|
+
type: 'apiKey'
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
scheme: 'bearer',
|
|
2185
|
+
type: 'http'
|
|
2186
|
+
}
|
|
2187
|
+
],
|
|
2188
|
+
url: '/v1/graphs/{graph_id}/subscriptions',
|
|
2189
|
+
...options
|
|
2190
|
+
});
|
|
2191
|
+
};
|
|
2192
|
+
exports.getGraphSubscription = getGraphSubscription;
|
|
2193
|
+
/**
|
|
2194
|
+
* Create Repository Subscription
|
|
2195
|
+
* Create a new subscription to a shared repository.
|
|
2196
|
+
*
|
|
2197
|
+
* This endpoint is ONLY for shared repositories (sec, industry, economic).
|
|
2198
|
+
* User graph subscriptions are created automatically when the graph is provisioned.
|
|
2199
|
+
*
|
|
2200
|
+
* The subscription will be created in ACTIVE status immediately and credits will be allocated.
|
|
2201
|
+
*/
|
|
2202
|
+
const createRepositorySubscription = (options) => {
|
|
2203
|
+
return (options.client ?? client_gen_1.client).post({
|
|
2204
|
+
security: [
|
|
2205
|
+
{
|
|
2206
|
+
name: 'X-API-Key',
|
|
2207
|
+
type: 'apiKey'
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
scheme: 'bearer',
|
|
2211
|
+
type: 'http'
|
|
2212
|
+
}
|
|
2213
|
+
],
|
|
2214
|
+
url: '/v1/graphs/{graph_id}/subscriptions',
|
|
2215
|
+
...options,
|
|
2216
|
+
headers: {
|
|
2217
|
+
'Content-Type': 'application/json',
|
|
2218
|
+
...options.headers
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
};
|
|
2222
|
+
exports.createRepositorySubscription = createRepositorySubscription;
|
|
2223
|
+
/**
|
|
2224
|
+
* Upgrade Subscription
|
|
2225
|
+
* Upgrade a subscription to a different plan.
|
|
2226
|
+
*
|
|
2227
|
+
* Works for both user graphs and shared repositories.
|
|
2228
|
+
* The subscription will be immediately updated to the new plan and pricing.
|
|
2229
|
+
*/
|
|
2230
|
+
const upgradeSubscription = (options) => {
|
|
2231
|
+
return (options.client ?? client_gen_1.client).put({
|
|
2232
|
+
security: [
|
|
2233
|
+
{
|
|
2234
|
+
name: 'X-API-Key',
|
|
2235
|
+
type: 'apiKey'
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
scheme: 'bearer',
|
|
2239
|
+
type: 'http'
|
|
2240
|
+
}
|
|
2241
|
+
],
|
|
2242
|
+
url: '/v1/graphs/{graph_id}/subscriptions/upgrade',
|
|
2243
|
+
...options,
|
|
2244
|
+
headers: {
|
|
2245
|
+
'Content-Type': 'application/json',
|
|
2246
|
+
...options.headers
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
2249
|
+
};
|
|
2250
|
+
exports.upgradeSubscription = upgradeSubscription;
|
|
2544
2251
|
/**
|
|
2545
2252
|
* List Staging Tables
|
|
2546
2253
|
* List all DuckDB staging tables with comprehensive metrics and status.
|
|
@@ -3006,38 +2713,45 @@ const queryTables = (options) => {
|
|
|
3006
2713
|
};
|
|
3007
2714
|
exports.queryTables = queryTables;
|
|
3008
2715
|
/**
|
|
3009
|
-
* Get User Graphs
|
|
3010
|
-
* List all graph databases accessible to the current user
|
|
2716
|
+
* Get User Graphs and Repositories
|
|
2717
|
+
* List all graph databases and shared repositories accessible to the current user.
|
|
3011
2718
|
*
|
|
3012
|
-
* Returns a
|
|
3013
|
-
*
|
|
3014
|
-
* the active workspace.
|
|
2719
|
+
* Returns a unified list of both user-created graphs and shared repositories (like SEC data)
|
|
2720
|
+
* that the user has access to, including their role/access level and selection status.
|
|
3015
2721
|
*
|
|
3016
2722
|
* **Returned Information:**
|
|
3017
|
-
* - Graph ID and display name
|
|
3018
|
-
* - User's role (admin/member
|
|
3019
|
-
* - Selection status (
|
|
3020
|
-
* - Creation timestamp
|
|
3021
|
-
*
|
|
3022
|
-
*
|
|
3023
|
-
*
|
|
3024
|
-
* -
|
|
2723
|
+
* - Graph/Repository ID and display name
|
|
2724
|
+
* - User's role/access level (admin/member for graphs, read/write/admin for repositories)
|
|
2725
|
+
* - Selection status (only user graphs can be selected)
|
|
2726
|
+
* - Creation timestamp
|
|
2727
|
+
* - Repository type indicator (isRepository: true for shared repositories)
|
|
2728
|
+
*
|
|
2729
|
+
* **User Graphs (isRepository: false):**
|
|
2730
|
+
* - Collaborative workspaces that can be shared with other users
|
|
2731
|
+
* - Roles: `admin` (full access, can invite users) or `member` (read/write access)
|
|
2732
|
+
* - Can be selected as active workspace
|
|
2733
|
+
* - Graphs you create or have been invited to
|
|
2734
|
+
*
|
|
2735
|
+
* **Shared Repositories (isRepository: true):**
|
|
2736
|
+
* - Read-only data repositories like SEC filings, industry benchmarks
|
|
2737
|
+
* - Access levels: `read`, `write` (for data contributions), `admin`
|
|
2738
|
+
* - Cannot be selected (each has separate subscription)
|
|
2739
|
+
* - Require separate subscriptions (personal, cannot be shared)
|
|
3025
2740
|
*
|
|
3026
2741
|
* **Selected Graph Concept:**
|
|
3027
|
-
* The "selected" graph is the user's currently active workspace
|
|
3028
|
-
* default to the selected graph if no graph_id is provided.
|
|
3029
|
-
* selected graph via
|
|
2742
|
+
* The "selected" graph is the user's currently active workspace (user graphs only).
|
|
2743
|
+
* Many API operations default to the selected graph if no graph_id is provided.
|
|
2744
|
+
* Users can change their selected graph via `POST /v1/graphs/{graph_id}/select`.
|
|
3030
2745
|
*
|
|
3031
2746
|
* **Use Cases:**
|
|
3032
|
-
* - Display graph selector in UI
|
|
3033
|
-
* - Show
|
|
3034
|
-
* - Identify
|
|
3035
|
-
* - Filter
|
|
2747
|
+
* - Display unified graph/repository selector in UI
|
|
2748
|
+
* - Show all accessible data sources (both owned graphs and subscribed repositories)
|
|
2749
|
+
* - Identify currently active workspace
|
|
2750
|
+
* - Filter by type (user graphs vs repositories)
|
|
3036
2751
|
*
|
|
3037
2752
|
* **Empty Response:**
|
|
3038
|
-
* New users
|
|
3039
|
-
*
|
|
3040
|
-
* to an existing graph.
|
|
2753
|
+
* New users receive an empty list with `selectedGraphId: null`. Users should create
|
|
2754
|
+
* a graph or subscribe to a repository.
|
|
3041
2755
|
*
|
|
3042
2756
|
* **Note:**
|
|
3043
2757
|
* Graph listing is included - no credit consumption required.
|