@robosystems/client 0.2.10 → 0.2.12
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 +7 -1
- package/extensions/index.js +18 -1
- package/extensions/index.ts +21 -1
- package/package.json +1 -1
- package/sdk/sdk.gen.d.ts +197 -91
- package/sdk/sdk.gen.js +452 -169
- package/sdk/sdk.gen.ts +441 -159
- package/sdk/types.gen.d.ts +854 -246
- package/sdk/types.gen.ts +955 -279
- 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 +7 -1
- package/sdk-extensions/index.js +18 -1
- package/sdk-extensions/index.ts +21 -1
- package/sdk.gen.d.ts +197 -91
- package/sdk.gen.js +452 -169
- package/sdk.gen.ts +441 -159
- package/types.gen.d.ts +854 -246
- package/types.gen.ts +955 -279
package/sdk.gen.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
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.
|
|
4
|
+
exports.batchProcessQueries = exports.executeSpecificAgent = exports.getAgentMetadata = exports.autoSelectAgent = exports.listAgents = exports.syncConnection = exports.getConnection = exports.deleteConnection = exports.oauthCallback = exports.initOAuth = exports.createLinkToken = exports.exchangeLinkToken = exports.getConnectionOptions = exports.createConnection = exports.listConnections = exports.getOrgUsage = exports.getOrgLimits = exports.updateOrgMemberRole = exports.removeOrgMember = exports.inviteOrgMember = exports.listOrgMembers = exports.listOrgGraphs = exports.updateOrg = exports.getOrg = exports.createOrg = exports.listUserOrgs = 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.updateOrgPaymentMethod = exports.getOrgBillingCustomer = 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 = exports.getGraphUsageAnalytics = exports.getGraphMetrics = exports.getBackupStats = exports.restoreBackup = exports.getBackupDownloadUrl = exports.createBackup = exports.listBackups = exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = void 0;
|
|
6
|
+
exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription = exports.listOrgSubscriptions = void 0;
|
|
6
7
|
const client_gen_1 = require("./client.gen");
|
|
7
8
|
/**
|
|
8
9
|
* Register New User
|
|
9
|
-
* Register a new user account with email and password.
|
|
10
|
+
* Register a new user account with email and password.
|
|
11
|
+
*
|
|
12
|
+
* **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal organization is automatically created for you. All resources (graphs, subscriptions, billing) belong to organizations, not individual users. You can later upgrade your personal org to a team or enterprise organization.
|
|
13
|
+
*
|
|
14
|
+
* **Security Controls**: CAPTCHA and email verification are disabled in development for API testing, but required in production.
|
|
10
15
|
*/
|
|
11
16
|
const registerUser = (options) => {
|
|
12
17
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -387,10 +392,10 @@ const updateUserApiKey = (options) => {
|
|
|
387
392
|
};
|
|
388
393
|
exports.updateUserApiKey = updateUserApiKey;
|
|
389
394
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
395
|
+
* List User's Organizations
|
|
396
|
+
* Get all organizations the current user belongs to, with their role in each.
|
|
392
397
|
*/
|
|
393
|
-
const
|
|
398
|
+
const listUserOrgs = (options) => {
|
|
394
399
|
return (options?.client ?? client_gen_1.client).get({
|
|
395
400
|
security: [
|
|
396
401
|
{
|
|
@@ -402,11 +407,240 @@ const getUserLimits = (options) => {
|
|
|
402
407
|
type: 'http'
|
|
403
408
|
}
|
|
404
409
|
],
|
|
405
|
-
url: '/v1/
|
|
410
|
+
url: '/v1/orgs',
|
|
411
|
+
...options
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
exports.listUserOrgs = listUserOrgs;
|
|
415
|
+
/**
|
|
416
|
+
* Create Organization
|
|
417
|
+
* Create a new organization. The creating user becomes the owner.
|
|
418
|
+
*/
|
|
419
|
+
const createOrg = (options) => {
|
|
420
|
+
return (options.client ?? client_gen_1.client).post({
|
|
421
|
+
security: [
|
|
422
|
+
{
|
|
423
|
+
name: 'X-API-Key',
|
|
424
|
+
type: 'apiKey'
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
scheme: 'bearer',
|
|
428
|
+
type: 'http'
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
url: '/v1/orgs',
|
|
432
|
+
...options,
|
|
433
|
+
headers: {
|
|
434
|
+
'Content-Type': 'application/json',
|
|
435
|
+
...options.headers
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
exports.createOrg = createOrg;
|
|
440
|
+
/**
|
|
441
|
+
* Get Organization
|
|
442
|
+
* Get detailed information about an organization.
|
|
443
|
+
*/
|
|
444
|
+
const getOrg = (options) => {
|
|
445
|
+
return (options.client ?? client_gen_1.client).get({
|
|
446
|
+
security: [
|
|
447
|
+
{
|
|
448
|
+
name: 'X-API-Key',
|
|
449
|
+
type: 'apiKey'
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
scheme: 'bearer',
|
|
453
|
+
type: 'http'
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
url: '/v1/orgs/{org_id}',
|
|
457
|
+
...options
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
exports.getOrg = getOrg;
|
|
461
|
+
/**
|
|
462
|
+
* Update Organization
|
|
463
|
+
* Update organization information. Requires admin or owner role.
|
|
464
|
+
*/
|
|
465
|
+
const updateOrg = (options) => {
|
|
466
|
+
return (options.client ?? client_gen_1.client).put({
|
|
467
|
+
security: [
|
|
468
|
+
{
|
|
469
|
+
name: 'X-API-Key',
|
|
470
|
+
type: 'apiKey'
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
scheme: 'bearer',
|
|
474
|
+
type: 'http'
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
url: '/v1/orgs/{org_id}',
|
|
478
|
+
...options,
|
|
479
|
+
headers: {
|
|
480
|
+
'Content-Type': 'application/json',
|
|
481
|
+
...options.headers
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
exports.updateOrg = updateOrg;
|
|
486
|
+
/**
|
|
487
|
+
* List Organization Graphs
|
|
488
|
+
* Get all graphs belonging to an organization.
|
|
489
|
+
*/
|
|
490
|
+
const listOrgGraphs = (options) => {
|
|
491
|
+
return (options.client ?? client_gen_1.client).get({
|
|
492
|
+
security: [
|
|
493
|
+
{
|
|
494
|
+
name: 'X-API-Key',
|
|
495
|
+
type: 'apiKey'
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
scheme: 'bearer',
|
|
499
|
+
type: 'http'
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
url: '/v1/orgs/{org_id}/graphs',
|
|
503
|
+
...options
|
|
504
|
+
});
|
|
505
|
+
};
|
|
506
|
+
exports.listOrgGraphs = listOrgGraphs;
|
|
507
|
+
/**
|
|
508
|
+
* List Organization Members
|
|
509
|
+
* Get all members of an organization with their roles.
|
|
510
|
+
*/
|
|
511
|
+
const listOrgMembers = (options) => {
|
|
512
|
+
return (options.client ?? client_gen_1.client).get({
|
|
513
|
+
security: [
|
|
514
|
+
{
|
|
515
|
+
name: 'X-API-Key',
|
|
516
|
+
type: 'apiKey'
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
scheme: 'bearer',
|
|
520
|
+
type: 'http'
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
url: '/v1/orgs/{org_id}/members',
|
|
524
|
+
...options
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
exports.listOrgMembers = listOrgMembers;
|
|
528
|
+
/**
|
|
529
|
+
* Invite Member
|
|
530
|
+
* Invite a user to join the organization. Requires admin or owner role.
|
|
531
|
+
*
|
|
532
|
+
* **⚠️ FEATURE NOT READY**: This endpoint is disabled by default (ORG_MEMBER_INVITATIONS_ENABLED=false).
|
|
533
|
+
* Returns 501 NOT IMPLEMENTED when disabled. See endpoint implementation for TODO list before enabling.
|
|
534
|
+
*/
|
|
535
|
+
const inviteOrgMember = (options) => {
|
|
536
|
+
return (options.client ?? client_gen_1.client).post({
|
|
537
|
+
security: [
|
|
538
|
+
{
|
|
539
|
+
name: 'X-API-Key',
|
|
540
|
+
type: 'apiKey'
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
scheme: 'bearer',
|
|
544
|
+
type: 'http'
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
url: '/v1/orgs/{org_id}/members',
|
|
548
|
+
...options,
|
|
549
|
+
headers: {
|
|
550
|
+
'Content-Type': 'application/json',
|
|
551
|
+
...options.headers
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
exports.inviteOrgMember = inviteOrgMember;
|
|
556
|
+
/**
|
|
557
|
+
* Remove Member
|
|
558
|
+
* Remove a member from the organization. Requires admin or owner role.
|
|
559
|
+
*/
|
|
560
|
+
const removeOrgMember = (options) => {
|
|
561
|
+
return (options.client ?? client_gen_1.client).delete({
|
|
562
|
+
security: [
|
|
563
|
+
{
|
|
564
|
+
name: 'X-API-Key',
|
|
565
|
+
type: 'apiKey'
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
scheme: 'bearer',
|
|
569
|
+
type: 'http'
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
url: '/v1/orgs/{org_id}/members/{user_id}',
|
|
573
|
+
...options
|
|
574
|
+
});
|
|
575
|
+
};
|
|
576
|
+
exports.removeOrgMember = removeOrgMember;
|
|
577
|
+
/**
|
|
578
|
+
* Update Member Role
|
|
579
|
+
* Update a member's role in the organization. Requires admin or owner role.
|
|
580
|
+
*/
|
|
581
|
+
const updateOrgMemberRole = (options) => {
|
|
582
|
+
return (options.client ?? client_gen_1.client).put({
|
|
583
|
+
security: [
|
|
584
|
+
{
|
|
585
|
+
name: 'X-API-Key',
|
|
586
|
+
type: 'apiKey'
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
scheme: 'bearer',
|
|
590
|
+
type: 'http'
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
url: '/v1/orgs/{org_id}/members/{user_id}',
|
|
594
|
+
...options,
|
|
595
|
+
headers: {
|
|
596
|
+
'Content-Type': 'application/json',
|
|
597
|
+
...options.headers
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
};
|
|
601
|
+
exports.updateOrgMemberRole = updateOrgMemberRole;
|
|
602
|
+
/**
|
|
603
|
+
* Get Organization Limits
|
|
604
|
+
* Get the current limits and quotas for an organization.
|
|
605
|
+
*/
|
|
606
|
+
const getOrgLimits = (options) => {
|
|
607
|
+
return (options.client ?? client_gen_1.client).get({
|
|
608
|
+
security: [
|
|
609
|
+
{
|
|
610
|
+
name: 'X-API-Key',
|
|
611
|
+
type: 'apiKey'
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
scheme: 'bearer',
|
|
615
|
+
type: 'http'
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
url: '/v1/orgs/{org_id}/limits',
|
|
406
619
|
...options
|
|
407
620
|
});
|
|
408
621
|
};
|
|
409
|
-
exports.
|
|
622
|
+
exports.getOrgLimits = getOrgLimits;
|
|
623
|
+
/**
|
|
624
|
+
* Get Organization Usage
|
|
625
|
+
* Get detailed usage statistics for an organization aggregated across all graphs.
|
|
626
|
+
*/
|
|
627
|
+
const getOrgUsage = (options) => {
|
|
628
|
+
return (options.client ?? client_gen_1.client).get({
|
|
629
|
+
security: [
|
|
630
|
+
{
|
|
631
|
+
name: 'X-API-Key',
|
|
632
|
+
type: 'apiKey'
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
scheme: 'bearer',
|
|
636
|
+
type: 'http'
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
url: '/v1/orgs/{org_id}/usage',
|
|
640
|
+
...options
|
|
641
|
+
});
|
|
642
|
+
};
|
|
643
|
+
exports.getOrgUsage = getOrgUsage;
|
|
410
644
|
/**
|
|
411
645
|
* List Connections
|
|
412
646
|
* List all data connections in the graph.
|
|
@@ -788,9 +1022,38 @@ const syncConnection = (options) => {
|
|
|
788
1022
|
});
|
|
789
1023
|
};
|
|
790
1024
|
exports.syncConnection = syncConnection;
|
|
1025
|
+
/**
|
|
1026
|
+
* List available agents
|
|
1027
|
+
* Get a comprehensive list of all available agents with their metadata.
|
|
1028
|
+
*
|
|
1029
|
+
* **Returns:**
|
|
1030
|
+
* - Agent types and names
|
|
1031
|
+
* - Capabilities and supported modes
|
|
1032
|
+
* - Version information
|
|
1033
|
+
* - Credit requirements
|
|
1034
|
+
*
|
|
1035
|
+
* Use the optional `capability` filter to find agents with specific capabilities.
|
|
1036
|
+
*/
|
|
1037
|
+
const listAgents = (options) => {
|
|
1038
|
+
return (options.client ?? client_gen_1.client).get({
|
|
1039
|
+
security: [
|
|
1040
|
+
{
|
|
1041
|
+
name: 'X-API-Key',
|
|
1042
|
+
type: 'apiKey'
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
scheme: 'bearer',
|
|
1046
|
+
type: 'http'
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
url: '/v1/graphs/{graph_id}/agent',
|
|
1050
|
+
...options
|
|
1051
|
+
});
|
|
1052
|
+
};
|
|
1053
|
+
exports.listAgents = listAgents;
|
|
791
1054
|
/**
|
|
792
1055
|
* Auto-select agent for query
|
|
793
|
-
* Automatically select the best agent for your query.
|
|
1056
|
+
* Automatically select the best agent for your query with intelligent execution strategy.
|
|
794
1057
|
*
|
|
795
1058
|
* **Agent Selection Process:**
|
|
796
1059
|
*
|
|
@@ -799,7 +1062,8 @@ exports.syncConnection = syncConnection;
|
|
|
799
1062
|
* 2. Enriching context with RAG if enabled
|
|
800
1063
|
* 3. Evaluating all available agents against selection criteria
|
|
801
1064
|
* 4. Selecting the best match based on confidence scores
|
|
802
|
-
* 5.
|
|
1065
|
+
* 5. Choosing execution strategy (sync/SSE/async) based on expected time
|
|
1066
|
+
* 6. Executing the query with the selected agent
|
|
803
1067
|
*
|
|
804
1068
|
* **Available Agent Types:**
|
|
805
1069
|
* - `financial`: Financial analysis, SEC filings, company metrics
|
|
@@ -812,6 +1076,14 @@ exports.syncConnection = syncConnection;
|
|
|
812
1076
|
* - `extended`: Comprehensive analysis (~15-60s), deep research
|
|
813
1077
|
* - `streaming`: Real-time response streaming
|
|
814
1078
|
*
|
|
1079
|
+
* **Execution Strategies (automatic):**
|
|
1080
|
+
* - Fast operations (<5s): Immediate synchronous response
|
|
1081
|
+
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
1082
|
+
* - Long operations (>30s): Async Celery worker with operation tracking
|
|
1083
|
+
*
|
|
1084
|
+
* **Response Mode Override:**
|
|
1085
|
+
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
1086
|
+
*
|
|
815
1087
|
* **Confidence Score Interpretation:**
|
|
816
1088
|
* - `0.9-1.0`: High confidence, agent is ideal match
|
|
817
1089
|
* - `0.7-0.9`: Good confidence, agent is suitable
|
|
@@ -854,15 +1126,54 @@ const autoSelectAgent = (options) => {
|
|
|
854
1126
|
});
|
|
855
1127
|
};
|
|
856
1128
|
exports.autoSelectAgent = autoSelectAgent;
|
|
1129
|
+
/**
|
|
1130
|
+
* Get agent metadata
|
|
1131
|
+
* Get comprehensive metadata for a specific agent type.
|
|
1132
|
+
*
|
|
1133
|
+
* **Returns:**
|
|
1134
|
+
* - Agent name and description
|
|
1135
|
+
* - Version information
|
|
1136
|
+
* - Supported capabilities and modes
|
|
1137
|
+
* - Credit requirements
|
|
1138
|
+
* - Author and tags
|
|
1139
|
+
* - Configuration options
|
|
1140
|
+
*
|
|
1141
|
+
* Use this to understand agent capabilities before execution.
|
|
1142
|
+
*/
|
|
1143
|
+
const getAgentMetadata = (options) => {
|
|
1144
|
+
return (options.client ?? client_gen_1.client).get({
|
|
1145
|
+
security: [
|
|
1146
|
+
{
|
|
1147
|
+
name: 'X-API-Key',
|
|
1148
|
+
type: 'apiKey'
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
scheme: 'bearer',
|
|
1152
|
+
type: 'http'
|
|
1153
|
+
}
|
|
1154
|
+
],
|
|
1155
|
+
url: '/v1/graphs/{graph_id}/agent/{agent_type}',
|
|
1156
|
+
...options
|
|
1157
|
+
});
|
|
1158
|
+
};
|
|
1159
|
+
exports.getAgentMetadata = getAgentMetadata;
|
|
857
1160
|
/**
|
|
858
1161
|
* Execute specific agent
|
|
859
|
-
* Execute a specific agent type directly.
|
|
1162
|
+
* Execute a specific agent type directly with intelligent execution strategy.
|
|
860
1163
|
*
|
|
861
1164
|
* Available agents:
|
|
862
1165
|
* - **financial**: Financial analysis, SEC filings, accounting data
|
|
863
1166
|
* - **research**: Deep research and comprehensive analysis
|
|
864
1167
|
* - **rag**: Fast retrieval without AI (no credits required)
|
|
865
1168
|
*
|
|
1169
|
+
* **Execution Strategies (automatic):**
|
|
1170
|
+
* - Fast operations (<5s): Immediate synchronous response
|
|
1171
|
+
* - Medium operations (5-30s): SSE streaming with progress updates
|
|
1172
|
+
* - Long operations (>30s): Async Celery worker with operation tracking
|
|
1173
|
+
*
|
|
1174
|
+
* **Response Mode Override:**
|
|
1175
|
+
* Use query parameter `?mode=sync|async` to override automatic strategy selection.
|
|
1176
|
+
*
|
|
866
1177
|
* Use this endpoint when you know which agent you want to use.
|
|
867
1178
|
*/
|
|
868
1179
|
const executeSpecificAgent = (options) => {
|
|
@@ -924,66 +1235,6 @@ const batchProcessQueries = (options) => {
|
|
|
924
1235
|
});
|
|
925
1236
|
};
|
|
926
1237
|
exports.batchProcessQueries = batchProcessQueries;
|
|
927
|
-
/**
|
|
928
|
-
* List available agents
|
|
929
|
-
* Get a comprehensive list of all available agents with their metadata.
|
|
930
|
-
*
|
|
931
|
-
* **Returns:**
|
|
932
|
-
* - Agent types and names
|
|
933
|
-
* - Capabilities and supported modes
|
|
934
|
-
* - Version information
|
|
935
|
-
* - Credit requirements
|
|
936
|
-
*
|
|
937
|
-
* Use the optional `capability` filter to find agents with specific capabilities.
|
|
938
|
-
*/
|
|
939
|
-
const listAgents = (options) => {
|
|
940
|
-
return (options.client ?? client_gen_1.client).get({
|
|
941
|
-
security: [
|
|
942
|
-
{
|
|
943
|
-
name: 'X-API-Key',
|
|
944
|
-
type: 'apiKey'
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
scheme: 'bearer',
|
|
948
|
-
type: 'http'
|
|
949
|
-
}
|
|
950
|
-
],
|
|
951
|
-
url: '/v1/graphs/{graph_id}/agent/list',
|
|
952
|
-
...options
|
|
953
|
-
});
|
|
954
|
-
};
|
|
955
|
-
exports.listAgents = listAgents;
|
|
956
|
-
/**
|
|
957
|
-
* Get agent metadata
|
|
958
|
-
* Get comprehensive metadata for a specific agent type.
|
|
959
|
-
*
|
|
960
|
-
* **Returns:**
|
|
961
|
-
* - Agent name and description
|
|
962
|
-
* - Version information
|
|
963
|
-
* - Supported capabilities and modes
|
|
964
|
-
* - Credit requirements
|
|
965
|
-
* - Author and tags
|
|
966
|
-
* - Configuration options
|
|
967
|
-
*
|
|
968
|
-
* Use this to understand agent capabilities before execution.
|
|
969
|
-
*/
|
|
970
|
-
const getAgentMetadata = (options) => {
|
|
971
|
-
return (options.client ?? client_gen_1.client).get({
|
|
972
|
-
security: [
|
|
973
|
-
{
|
|
974
|
-
name: 'X-API-Key',
|
|
975
|
-
type: 'apiKey'
|
|
976
|
-
},
|
|
977
|
-
{
|
|
978
|
-
scheme: 'bearer',
|
|
979
|
-
type: 'http'
|
|
980
|
-
}
|
|
981
|
-
],
|
|
982
|
-
url: '/v1/graphs/{graph_id}/agent/{agent_type}/metadata',
|
|
983
|
-
...options
|
|
984
|
-
});
|
|
985
|
-
};
|
|
986
|
-
exports.getAgentMetadata = getAgentMetadata;
|
|
987
1238
|
/**
|
|
988
1239
|
* Get agent recommendations
|
|
989
1240
|
* Get intelligent agent recommendations for a specific query.
|
|
@@ -1392,7 +1643,7 @@ const getGraphMetrics = (options) => {
|
|
|
1392
1643
|
exports.getGraphMetrics = getGraphMetrics;
|
|
1393
1644
|
/**
|
|
1394
1645
|
* Get Graph Usage Analytics
|
|
1395
|
-
* Get comprehensive usage analytics tracked by the
|
|
1646
|
+
* Get comprehensive usage analytics tracked by the GraphUsage model.
|
|
1396
1647
|
*
|
|
1397
1648
|
* Provides temporal usage patterns including:
|
|
1398
1649
|
* - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
|
|
@@ -3015,9 +3266,15 @@ exports.selectGraph = selectGraph;
|
|
|
3015
3266
|
* and shared repository subscriptions. This is the primary endpoint for frontend
|
|
3016
3267
|
* applications to display subscription options.
|
|
3017
3268
|
*
|
|
3269
|
+
* **Pricing Model:**
|
|
3270
|
+
* - Graph subscriptions are **per-graph** with infrastructure-based pricing
|
|
3271
|
+
* - Each graph you create has its own monthly subscription
|
|
3272
|
+
* - Organizations can have multiple graphs with different infrastructure tiers
|
|
3273
|
+
* - Credits are allocated per-graph, not shared across organization
|
|
3274
|
+
*
|
|
3018
3275
|
* Includes:
|
|
3019
|
-
* - Graph
|
|
3020
|
-
* - Shared repository subscriptions (SEC, industry, economic data)
|
|
3276
|
+
* - Graph infrastructure tiers (kuzu-standard, kuzu-large, kuzu-xlarge) - per-graph pricing
|
|
3277
|
+
* - Shared repository subscriptions (SEC, industry, economic data) - org-level
|
|
3021
3278
|
* - Operation costs and credit information
|
|
3022
3279
|
* - Features and capabilities for each tier
|
|
3023
3280
|
* - Enabled/disabled status for repositories
|
|
@@ -3163,25 +3420,17 @@ const cancelOperation = (options) => {
|
|
|
3163
3420
|
};
|
|
3164
3421
|
exports.cancelOperation = cancelOperation;
|
|
3165
3422
|
/**
|
|
3166
|
-
*
|
|
3167
|
-
*
|
|
3423
|
+
* Get Organization Customer Info
|
|
3424
|
+
* Get billing customer information for an organization including payment methods on file.
|
|
3168
3425
|
*
|
|
3169
|
-
*
|
|
3170
|
-
* provisioning resources. It creates a pending subscription and redirects
|
|
3171
|
-
* the user to Stripe Checkout to collect payment details.
|
|
3172
|
-
*
|
|
3173
|
-
* **Flow:**
|
|
3174
|
-
* 1. User tries to create a graph but has no payment method
|
|
3175
|
-
* 2. Frontend calls this endpoint with graph configuration
|
|
3176
|
-
* 3. Backend creates a subscription in PENDING_PAYMENT status
|
|
3177
|
-
* 4. Returns Stripe Checkout URL
|
|
3178
|
-
* 5. User completes payment on Stripe
|
|
3179
|
-
* 6. Webhook activates subscription and provisions resource
|
|
3426
|
+
* Returns customer details, payment methods, and whether invoice billing is enabled.
|
|
3180
3427
|
*
|
|
3181
|
-
* **
|
|
3428
|
+
* **Requirements:**
|
|
3429
|
+
* - User must be a member of the organization
|
|
3430
|
+
* - Sensitive payment details are only visible to owners
|
|
3182
3431
|
*/
|
|
3183
|
-
const
|
|
3184
|
-
return (options.client ?? client_gen_1.client).
|
|
3432
|
+
const getOrgBillingCustomer = (options) => {
|
|
3433
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3185
3434
|
security: [
|
|
3186
3435
|
{
|
|
3187
3436
|
name: 'X-API-Key',
|
|
@@ -3192,34 +3441,22 @@ const createCheckoutSession = (options) => {
|
|
|
3192
3441
|
type: 'http'
|
|
3193
3442
|
}
|
|
3194
3443
|
],
|
|
3195
|
-
url: '/v1/billing/
|
|
3196
|
-
...options
|
|
3197
|
-
headers: {
|
|
3198
|
-
'Content-Type': 'application/json',
|
|
3199
|
-
...options.headers
|
|
3200
|
-
}
|
|
3444
|
+
url: '/v1/billing/customer/{org_id}',
|
|
3445
|
+
...options
|
|
3201
3446
|
});
|
|
3202
3447
|
};
|
|
3203
|
-
exports.
|
|
3448
|
+
exports.getOrgBillingCustomer = getOrgBillingCustomer;
|
|
3204
3449
|
/**
|
|
3205
|
-
*
|
|
3206
|
-
*
|
|
3450
|
+
* Update Organization Default Payment Method
|
|
3451
|
+
* Update the default payment method for the organization.
|
|
3207
3452
|
*
|
|
3208
|
-
*
|
|
3209
|
-
* to determine when the resource is ready.
|
|
3210
|
-
*
|
|
3211
|
-
* **Status Values:**
|
|
3212
|
-
* - `pending_payment`: Waiting for payment to complete
|
|
3213
|
-
* - `provisioning`: Payment confirmed, resource being created
|
|
3214
|
-
* - `completed`: Resource is ready (resource_id will be set)
|
|
3215
|
-
* - `failed`: Something went wrong (error field will be set)
|
|
3453
|
+
* This changes which payment method will be used for future subscription charges.
|
|
3216
3454
|
*
|
|
3217
|
-
* **
|
|
3218
|
-
* -
|
|
3219
|
-
* - For repositories: `resource_id` will be the repository name and access is immediately available
|
|
3455
|
+
* **Requirements:**
|
|
3456
|
+
* - User must be an OWNER of the organization
|
|
3220
3457
|
*/
|
|
3221
|
-
const
|
|
3222
|
-
return (options.client ?? client_gen_1.client).
|
|
3458
|
+
const updateOrgPaymentMethod = (options) => {
|
|
3459
|
+
return (options.client ?? client_gen_1.client).post({
|
|
3223
3460
|
security: [
|
|
3224
3461
|
{
|
|
3225
3462
|
name: 'X-API-Key',
|
|
@@ -3230,19 +3467,26 @@ const getCheckoutStatus = (options) => {
|
|
|
3230
3467
|
type: 'http'
|
|
3231
3468
|
}
|
|
3232
3469
|
],
|
|
3233
|
-
url: '/v1/billing/
|
|
3234
|
-
...options
|
|
3470
|
+
url: '/v1/billing/customer/{org_id}/payment-method',
|
|
3471
|
+
...options,
|
|
3472
|
+
headers: {
|
|
3473
|
+
'Content-Type': 'application/json',
|
|
3474
|
+
...options.headers
|
|
3475
|
+
}
|
|
3235
3476
|
});
|
|
3236
3477
|
};
|
|
3237
|
-
exports.
|
|
3478
|
+
exports.updateOrgPaymentMethod = updateOrgPaymentMethod;
|
|
3238
3479
|
/**
|
|
3239
|
-
*
|
|
3240
|
-
*
|
|
3480
|
+
* List Organization Subscriptions
|
|
3481
|
+
* List all active and past subscriptions for an organization.
|
|
3241
3482
|
*
|
|
3242
|
-
*
|
|
3483
|
+
* Includes both graph and repository subscriptions with their status, pricing, and billing information.
|
|
3484
|
+
*
|
|
3485
|
+
* **Requirements:**
|
|
3486
|
+
* - User must be a member of the organization
|
|
3243
3487
|
*/
|
|
3244
|
-
const
|
|
3245
|
-
return (options
|
|
3488
|
+
const listOrgSubscriptions = (options) => {
|
|
3489
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3246
3490
|
security: [
|
|
3247
3491
|
{
|
|
3248
3492
|
name: 'X-API-Key',
|
|
@@ -3253,19 +3497,20 @@ const getBillingCustomer = (options) => {
|
|
|
3253
3497
|
type: 'http'
|
|
3254
3498
|
}
|
|
3255
3499
|
],
|
|
3256
|
-
url: '/v1/billing/
|
|
3500
|
+
url: '/v1/billing/subscriptions/{org_id}',
|
|
3257
3501
|
...options
|
|
3258
3502
|
});
|
|
3259
3503
|
};
|
|
3260
|
-
exports.
|
|
3504
|
+
exports.listOrgSubscriptions = listOrgSubscriptions;
|
|
3261
3505
|
/**
|
|
3262
|
-
*
|
|
3263
|
-
*
|
|
3506
|
+
* Get Organization Subscription Details
|
|
3507
|
+
* Get detailed information about a specific subscription.
|
|
3264
3508
|
*
|
|
3265
|
-
*
|
|
3509
|
+
* **Requirements:**
|
|
3510
|
+
* - User must be a member of the organization
|
|
3266
3511
|
*/
|
|
3267
|
-
const
|
|
3268
|
-
return (options.client ?? client_gen_1.client).
|
|
3512
|
+
const getOrgSubscription = (options) => {
|
|
3513
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3269
3514
|
security: [
|
|
3270
3515
|
{
|
|
3271
3516
|
name: 'X-API-Key',
|
|
@@ -3276,23 +3521,22 @@ const updatePaymentMethod = (options) => {
|
|
|
3276
3521
|
type: 'http'
|
|
3277
3522
|
}
|
|
3278
3523
|
],
|
|
3279
|
-
url: '/v1/billing/
|
|
3280
|
-
...options
|
|
3281
|
-
headers: {
|
|
3282
|
-
'Content-Type': 'application/json',
|
|
3283
|
-
...options.headers
|
|
3284
|
-
}
|
|
3524
|
+
url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}',
|
|
3525
|
+
...options
|
|
3285
3526
|
});
|
|
3286
3527
|
};
|
|
3287
|
-
exports.
|
|
3528
|
+
exports.getOrgSubscription = getOrgSubscription;
|
|
3288
3529
|
/**
|
|
3289
|
-
*
|
|
3290
|
-
*
|
|
3530
|
+
* Cancel Organization Subscription
|
|
3531
|
+
* Cancel an organization subscription.
|
|
3291
3532
|
*
|
|
3292
|
-
*
|
|
3533
|
+
* The subscription will remain active until the end of the current billing period.
|
|
3534
|
+
*
|
|
3535
|
+
* **Requirements:**
|
|
3536
|
+
* - User must be an OWNER of the organization
|
|
3293
3537
|
*/
|
|
3294
|
-
const
|
|
3295
|
-
return (options
|
|
3538
|
+
const cancelOrgSubscription = (options) => {
|
|
3539
|
+
return (options.client ?? client_gen_1.client).post({
|
|
3296
3540
|
security: [
|
|
3297
3541
|
{
|
|
3298
3542
|
name: 'X-API-Key',
|
|
@@ -3303,19 +3547,23 @@ const listInvoices = (options) => {
|
|
|
3303
3547
|
type: 'http'
|
|
3304
3548
|
}
|
|
3305
3549
|
],
|
|
3306
|
-
url: '/v1/billing/
|
|
3550
|
+
url: '/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel',
|
|
3307
3551
|
...options
|
|
3308
3552
|
});
|
|
3309
3553
|
};
|
|
3310
|
-
exports.
|
|
3554
|
+
exports.cancelOrgSubscription = cancelOrgSubscription;
|
|
3311
3555
|
/**
|
|
3312
|
-
*
|
|
3313
|
-
*
|
|
3556
|
+
* List Organization Invoices
|
|
3557
|
+
* List payment history and invoices for an organization.
|
|
3314
3558
|
*
|
|
3315
|
-
* Returns
|
|
3559
|
+
* Returns past invoices with payment status, amounts, and line items.
|
|
3560
|
+
*
|
|
3561
|
+
* **Requirements:**
|
|
3562
|
+
* - User must be a member of the organization
|
|
3563
|
+
* - Full invoice details are only visible to owners and admins
|
|
3316
3564
|
*/
|
|
3317
|
-
const
|
|
3318
|
-
return (options
|
|
3565
|
+
const listOrgInvoices = (options) => {
|
|
3566
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3319
3567
|
security: [
|
|
3320
3568
|
{
|
|
3321
3569
|
name: 'X-API-Key',
|
|
@@ -3326,19 +3574,23 @@ const getUpcomingInvoice = (options) => {
|
|
|
3326
3574
|
type: 'http'
|
|
3327
3575
|
}
|
|
3328
3576
|
],
|
|
3329
|
-
url: '/v1/billing/invoices/
|
|
3577
|
+
url: '/v1/billing/invoices/{org_id}',
|
|
3330
3578
|
...options
|
|
3331
3579
|
});
|
|
3332
3580
|
};
|
|
3333
|
-
exports.
|
|
3581
|
+
exports.listOrgInvoices = listOrgInvoices;
|
|
3334
3582
|
/**
|
|
3335
|
-
*
|
|
3336
|
-
*
|
|
3583
|
+
* Get Organization Upcoming Invoice
|
|
3584
|
+
* Get preview of the next invoice for an organization.
|
|
3337
3585
|
*
|
|
3338
|
-
*
|
|
3586
|
+
* Returns estimated charges for the next billing period.
|
|
3587
|
+
*
|
|
3588
|
+
* **Requirements:**
|
|
3589
|
+
* - User must be a member of the organization
|
|
3590
|
+
* - Full invoice details are only visible to owners and admins
|
|
3339
3591
|
*/
|
|
3340
|
-
const
|
|
3341
|
-
return (options
|
|
3592
|
+
const getOrgUpcomingInvoice = (options) => {
|
|
3593
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3342
3594
|
security: [
|
|
3343
3595
|
{
|
|
3344
3596
|
name: 'X-API-Key',
|
|
@@ -3349,17 +3601,33 @@ const listSubscriptions = (options) => {
|
|
|
3349
3601
|
type: 'http'
|
|
3350
3602
|
}
|
|
3351
3603
|
],
|
|
3352
|
-
url: '/v1/billing/
|
|
3604
|
+
url: '/v1/billing/invoices/{org_id}/upcoming',
|
|
3353
3605
|
...options
|
|
3354
3606
|
});
|
|
3355
3607
|
};
|
|
3356
|
-
exports.
|
|
3608
|
+
exports.getOrgUpcomingInvoice = getOrgUpcomingInvoice;
|
|
3357
3609
|
/**
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3610
|
+
* Create Payment Checkout Session
|
|
3611
|
+
* Create a Stripe checkout session for collecting payment method.
|
|
3612
|
+
*
|
|
3613
|
+
* This endpoint is used when an organization owner needs to add a payment method before
|
|
3614
|
+
* provisioning resources. It creates a pending subscription and redirects
|
|
3615
|
+
* to Stripe Checkout to collect payment details.
|
|
3616
|
+
*
|
|
3617
|
+
* **Flow:**
|
|
3618
|
+
* 1. Owner tries to create a graph but org has no payment method
|
|
3619
|
+
* 2. Frontend calls this endpoint with graph configuration
|
|
3620
|
+
* 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
|
|
3621
|
+
* 4. Returns Stripe Checkout URL
|
|
3622
|
+
* 5. User completes payment on Stripe
|
|
3623
|
+
* 6. Webhook activates subscription and provisions resource
|
|
3624
|
+
*
|
|
3625
|
+
* **Requirements:**
|
|
3626
|
+
* - User must be an OWNER of their organization
|
|
3627
|
+
* - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
|
|
3360
3628
|
*/
|
|
3361
|
-
const
|
|
3362
|
-
return (options.client ?? client_gen_1.client).
|
|
3629
|
+
const createCheckoutSession = (options) => {
|
|
3630
|
+
return (options.client ?? client_gen_1.client).post({
|
|
3363
3631
|
security: [
|
|
3364
3632
|
{
|
|
3365
3633
|
name: 'X-API-Key',
|
|
@@ -3370,19 +3638,34 @@ const getSubscription = (options) => {
|
|
|
3370
3638
|
type: 'http'
|
|
3371
3639
|
}
|
|
3372
3640
|
],
|
|
3373
|
-
url: '/v1/billing/
|
|
3374
|
-
...options
|
|
3641
|
+
url: '/v1/billing/checkout',
|
|
3642
|
+
...options,
|
|
3643
|
+
headers: {
|
|
3644
|
+
'Content-Type': 'application/json',
|
|
3645
|
+
...options.headers
|
|
3646
|
+
}
|
|
3375
3647
|
});
|
|
3376
3648
|
};
|
|
3377
|
-
exports.
|
|
3649
|
+
exports.createCheckoutSession = createCheckoutSession;
|
|
3378
3650
|
/**
|
|
3379
|
-
*
|
|
3380
|
-
*
|
|
3651
|
+
* Get Checkout Session Status
|
|
3652
|
+
* Poll the status of a checkout session.
|
|
3381
3653
|
*
|
|
3382
|
-
*
|
|
3654
|
+
* Frontend should poll this endpoint after user returns from Stripe Checkout
|
|
3655
|
+
* to determine when the resource is ready.
|
|
3656
|
+
*
|
|
3657
|
+
* **Status Values:**
|
|
3658
|
+
* - `pending_payment`: Waiting for payment to complete
|
|
3659
|
+
* - `provisioning`: Payment confirmed, resource being created
|
|
3660
|
+
* - `completed`: Resource is ready (resource_id will be set)
|
|
3661
|
+
* - `failed`: Something went wrong (error field will be set)
|
|
3662
|
+
*
|
|
3663
|
+
* **When status is 'completed':**
|
|
3664
|
+
* - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
|
|
3665
|
+
* - For repositories: `resource_id` will be the repository name and access is immediately available
|
|
3383
3666
|
*/
|
|
3384
|
-
const
|
|
3385
|
-
return (options.client ?? client_gen_1.client).
|
|
3667
|
+
const getCheckoutStatus = (options) => {
|
|
3668
|
+
return (options.client ?? client_gen_1.client).get({
|
|
3386
3669
|
security: [
|
|
3387
3670
|
{
|
|
3388
3671
|
name: 'X-API-Key',
|
|
@@ -3393,8 +3676,8 @@ const cancelSubscription2 = (options) => {
|
|
|
3393
3676
|
type: 'http'
|
|
3394
3677
|
}
|
|
3395
3678
|
],
|
|
3396
|
-
url: '/v1/billing/
|
|
3679
|
+
url: '/v1/billing/checkout/{session_id}/status',
|
|
3397
3680
|
...options
|
|
3398
3681
|
});
|
|
3399
3682
|
};
|
|
3400
|
-
exports.
|
|
3683
|
+
exports.getCheckoutStatus = getCheckoutStatus;
|