@robosystems/client 0.2.29 → 0.2.31

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/sdk/sdk.gen.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { Client, Options as Options2, TDataShape } from './client';
4
4
  import { client } from './client.gen';
5
- import type { AutoSelectAgentData, AutoSelectAgentErrors, AutoSelectAgentResponses, BatchProcessQueriesData, BatchProcessQueriesErrors, BatchProcessQueriesResponses, CallMcpToolData, CallMcpToolErrors, CallMcpToolResponses, CancelOperationData, CancelOperationErrors, CancelOperationResponses, CancelOrgSubscriptionData, CancelOrgSubscriptionErrors, CancelOrgSubscriptionResponses, CheckCreditBalanceData, CheckCreditBalanceErrors, CheckCreditBalanceResponses, CheckPasswordStrengthData, CheckPasswordStrengthErrors, CheckPasswordStrengthResponses, CheckStorageLimitsData, CheckStorageLimitsErrors, CheckStorageLimitsResponses, CompleteSsoAuthData, CompleteSsoAuthErrors, CompleteSsoAuthResponses, CreateBackupData, CreateBackupErrors, CreateBackupResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateConnectionData, CreateConnectionErrors, CreateConnectionResponses, CreateFileUploadData, CreateFileUploadErrors, CreateFileUploadResponses, CreateGraphData, CreateGraphErrors, CreateGraphResponses, CreateLinkTokenData, CreateLinkTokenErrors, CreateLinkTokenResponses, CreateOrgData, CreateOrgErrors, CreateOrgResponses, CreatePortalSessionData, CreatePortalSessionErrors, CreatePortalSessionResponses, CreateRepositorySubscriptionData, CreateRepositorySubscriptionErrors, CreateRepositorySubscriptionResponses, CreateSubgraphData, CreateSubgraphErrors, CreateSubgraphResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewData, CreateViewErrors, CreateViewResponses, DeleteConnectionData, DeleteConnectionErrors, DeleteConnectionResponses, DeleteFileData, DeleteFileErrors, DeleteFileResponses, DeleteSubgraphData, DeleteSubgraphErrors, DeleteSubgraphResponses, ExchangeLinkTokenData, ExchangeLinkTokenErrors, ExchangeLinkTokenResponses, ExecuteCypherQueryData, ExecuteCypherQueryErrors, ExecuteCypherQueryResponses, ExecuteSpecificAgentData, ExecuteSpecificAgentErrors, ExecuteSpecificAgentResponses, ExportGraphSchemaData, ExportGraphSchemaErrors, ExportGraphSchemaResponses, ForgotPasswordData, ForgotPasswordErrors, ForgotPasswordResponses, GenerateSsoTokenData, GenerateSsoTokenErrors, GenerateSsoTokenResponses, GetAgentMetadataData, GetAgentMetadataErrors, GetAgentMetadataResponses, GetAvailableExtensionsData, GetAvailableExtensionsErrors, GetAvailableExtensionsResponses, GetAvailableGraphTiersData, GetAvailableGraphTiersErrors, GetAvailableGraphTiersResponses, GetBackupDownloadUrlData, GetBackupDownloadUrlErrors, GetBackupDownloadUrlResponses, GetBackupStatsData, GetBackupStatsErrors, GetBackupStatsResponses, GetCaptchaConfigData, GetCaptchaConfigResponses, GetCheckoutStatusData, GetCheckoutStatusErrors, GetCheckoutStatusResponses, GetConnectionData, GetConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsErrors, GetConnectionOptionsResponses, GetConnectionResponses, GetCreditSummaryData, GetCreditSummaryErrors, GetCreditSummaryResponses, GetCurrentAuthUserData, GetCurrentAuthUserErrors, GetCurrentAuthUserResponses, GetCurrentUserData, GetCurrentUserResponses, GetDatabaseHealthData, GetDatabaseHealthErrors, GetDatabaseHealthResponses, GetDatabaseInfoData, GetDatabaseInfoErrors, GetDatabaseInfoResponses, GetFileData, GetFileErrors, GetFileResponses, GetGraphLimitsData, GetGraphLimitsErrors, GetGraphLimitsResponses, GetGraphMetricsData, GetGraphMetricsErrors, GetGraphMetricsResponses, GetGraphSchemaData, GetGraphSchemaErrors, GetGraphSchemaResponses, GetGraphsData, GetGraphsErrors, GetGraphsResponses, GetGraphSubscriptionData, GetGraphSubscriptionErrors, GetGraphSubscriptionResponses, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsErrors, GetGraphUsageAnalyticsResponses, GetMaterializationStatusData, GetMaterializationStatusErrors, GetMaterializationStatusResponses, GetOperationStatusData, GetOperationStatusErrors, GetOperationStatusResponses, GetOrgBillingCustomerData, GetOrgBillingCustomerErrors, GetOrgBillingCustomerResponses, GetOrgData, GetOrgErrors, GetOrgLimitsData, GetOrgLimitsErrors, GetOrgLimitsResponses, GetOrgResponses, GetOrgSubscriptionData, GetOrgSubscriptionErrors, GetOrgSubscriptionResponses, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceErrors, GetOrgUpcomingInvoiceResponses, GetOrgUsageData, GetOrgUsageErrors, GetOrgUsageResponses, GetPasswordPolicyData, GetPasswordPolicyResponses, GetServiceOfferingsData, GetServiceOfferingsErrors, GetServiceOfferingsResponses, GetServiceStatusData, GetServiceStatusResponses, GetStorageUsageData, GetStorageUsageErrors, GetStorageUsageResponses, GetSubgraphInfoData, GetSubgraphInfoErrors, GetSubgraphInfoResponses, GetSubgraphQuotaData, GetSubgraphQuotaErrors, GetSubgraphQuotaResponses, InitOAuthData, InitOAuthErrors, InitOAuthResponses, InviteOrgMemberData, InviteOrgMemberErrors, InviteOrgMemberResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBackupsData, ListBackupsErrors, ListBackupsResponses, ListConnectionsData, ListConnectionsErrors, ListConnectionsResponses, ListCreditTransactionsData, ListCreditTransactionsErrors, ListCreditTransactionsResponses, ListFilesData, ListFilesErrors, ListFilesResponses, ListMcpToolsData, ListMcpToolsErrors, ListMcpToolsResponses, ListOrgGraphsData, ListOrgGraphsErrors, ListOrgGraphsResponses, ListOrgInvoicesData, ListOrgInvoicesErrors, ListOrgInvoicesResponses, ListOrgMembersData, ListOrgMembersErrors, ListOrgMembersResponses, ListOrgSubscriptionsData, ListOrgSubscriptionsErrors, ListOrgSubscriptionsResponses, ListSubgraphsData, ListSubgraphsErrors, ListSubgraphsResponses, ListTablesData, ListTablesErrors, ListTablesResponses, ListUserApiKeysData, ListUserApiKeysResponses, ListUserOrgsData, ListUserOrgsResponses, LoginUserData, LoginUserErrors, LoginUserResponses, LogoutUserData, LogoutUserResponses, MaterializeGraphData, MaterializeGraphErrors, MaterializeGraphResponses, OauthCallbackData, OauthCallbackErrors, OauthCallbackResponses, QueryTablesData, QueryTablesErrors, QueryTablesResponses, RecommendAgentData, RecommendAgentErrors, RecommendAgentResponses, RefreshAuthSessionData, RefreshAuthSessionErrors, RefreshAuthSessionResponses, RegisterUserData, RegisterUserErrors, RegisterUserResponses, RemoveOrgMemberData, RemoveOrgMemberErrors, RemoveOrgMemberResponses, ResendVerificationEmailData, ResendVerificationEmailErrors, ResendVerificationEmailResponses, ResetPasswordData, ResetPasswordErrors, ResetPasswordResponses, RestoreBackupData, RestoreBackupErrors, RestoreBackupResponses, RevokeUserApiKeyData, RevokeUserApiKeyErrors, RevokeUserApiKeyResponses, SaveViewData, SaveViewErrors, SaveViewResponses, SelectGraphData, SelectGraphErrors, SelectGraphResponses, SsoTokenExchangeData, SsoTokenExchangeErrors, SsoTokenExchangeResponses, StreamOperationEventsData, StreamOperationEventsErrors, StreamOperationEventsResponses, SyncConnectionData, SyncConnectionErrors, SyncConnectionResponses, UpdateFileData, UpdateFileErrors, UpdateFileResponses, UpdateOrgData, UpdateOrgErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleErrors, UpdateOrgMemberRoleResponses, UpdateOrgResponses, UpdateUserApiKeyData, UpdateUserApiKeyErrors, UpdateUserApiKeyResponses, UpdateUserData, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordErrors, UpdateUserPasswordResponses, UpdateUserResponses, UpgradeSubscriptionData, UpgradeSubscriptionErrors, UpgradeSubscriptionResponses, ValidateResetTokenData, ValidateResetTokenErrors, ValidateResetTokenResponses, ValidateSchemaData, ValidateSchemaErrors, ValidateSchemaResponses, VerifyEmailData, VerifyEmailErrors, VerifyEmailResponses } from './types.gen';
5
+ import type { AutoSelectAgentData, AutoSelectAgentErrors, AutoSelectAgentResponses, BatchProcessQueriesData, BatchProcessQueriesErrors, BatchProcessQueriesResponses, CallMcpToolData, CallMcpToolErrors, CallMcpToolResponses, CancelOperationData, CancelOperationErrors, CancelOperationResponses, CancelOrgSubscriptionData, CancelOrgSubscriptionErrors, CancelOrgSubscriptionResponses, CheckCreditBalanceData, CheckCreditBalanceErrors, CheckCreditBalanceResponses, CheckPasswordStrengthData, CheckPasswordStrengthErrors, CheckPasswordStrengthResponses, CheckStorageLimitsData, CheckStorageLimitsErrors, CheckStorageLimitsResponses, CompleteSsoAuthData, CompleteSsoAuthErrors, CompleteSsoAuthResponses, CreateBackupData, CreateBackupErrors, CreateBackupResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateFileUploadData, CreateFileUploadErrors, CreateFileUploadResponses, CreateGraphData, CreateGraphErrors, CreateGraphResponses, CreateOrgData, CreateOrgErrors, CreateOrgResponses, CreatePortalSessionData, CreatePortalSessionErrors, CreatePortalSessionResponses, CreateRepositorySubscriptionData, CreateRepositorySubscriptionErrors, CreateRepositorySubscriptionResponses, CreateSubgraphData, CreateSubgraphErrors, CreateSubgraphResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, DeleteFileData, DeleteFileErrors, DeleteFileResponses, DeleteSubgraphData, DeleteSubgraphErrors, DeleteSubgraphResponses, ExecuteCypherQueryData, ExecuteCypherQueryErrors, ExecuteCypherQueryResponses, ExecuteSpecificAgentData, ExecuteSpecificAgentErrors, ExecuteSpecificAgentResponses, ExportGraphSchemaData, ExportGraphSchemaErrors, ExportGraphSchemaResponses, ForgotPasswordData, ForgotPasswordErrors, ForgotPasswordResponses, GenerateSsoTokenData, GenerateSsoTokenErrors, GenerateSsoTokenResponses, GetAgentMetadataData, GetAgentMetadataErrors, GetAgentMetadataResponses, GetAvailableExtensionsData, GetAvailableExtensionsErrors, GetAvailableExtensionsResponses, GetAvailableGraphTiersData, GetAvailableGraphTiersErrors, GetAvailableGraphTiersResponses, GetBackupDownloadUrlData, GetBackupDownloadUrlErrors, GetBackupDownloadUrlResponses, GetBackupStatsData, GetBackupStatsErrors, GetBackupStatsResponses, GetCaptchaConfigData, GetCaptchaConfigResponses, GetCheckoutStatusData, GetCheckoutStatusErrors, GetCheckoutStatusResponses, GetCreditSummaryData, GetCreditSummaryErrors, GetCreditSummaryResponses, GetCurrentAuthUserData, GetCurrentAuthUserErrors, GetCurrentAuthUserResponses, GetCurrentUserData, GetCurrentUserResponses, GetDatabaseHealthData, GetDatabaseHealthErrors, GetDatabaseHealthResponses, GetDatabaseInfoData, GetDatabaseInfoErrors, GetDatabaseInfoResponses, GetFileData, GetFileErrors, GetFileResponses, GetGraphCapacityData, GetGraphCapacityErrors, GetGraphCapacityResponses, GetGraphLimitsData, GetGraphLimitsErrors, GetGraphLimitsResponses, GetGraphMetricsData, GetGraphMetricsErrors, GetGraphMetricsResponses, GetGraphSchemaData, GetGraphSchemaErrors, GetGraphSchemaResponses, GetGraphsData, GetGraphsErrors, GetGraphsResponses, GetGraphSubscriptionData, GetGraphSubscriptionErrors, GetGraphSubscriptionResponses, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsErrors, GetGraphUsageAnalyticsResponses, GetMaterializationStatusData, GetMaterializationStatusErrors, GetMaterializationStatusResponses, GetOperationStatusData, GetOperationStatusErrors, GetOperationStatusResponses, GetOrgBillingCustomerData, GetOrgBillingCustomerErrors, GetOrgBillingCustomerResponses, GetOrgData, GetOrgErrors, GetOrgLimitsData, GetOrgLimitsErrors, GetOrgLimitsResponses, GetOrgResponses, GetOrgSubscriptionData, GetOrgSubscriptionErrors, GetOrgSubscriptionResponses, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceErrors, GetOrgUpcomingInvoiceResponses, GetOrgUsageData, GetOrgUsageErrors, GetOrgUsageResponses, GetPasswordPolicyData, GetPasswordPolicyResponses, GetServiceOfferingsData, GetServiceOfferingsErrors, GetServiceOfferingsResponses, GetServiceStatusData, GetServiceStatusResponses, GetStorageUsageData, GetStorageUsageErrors, GetStorageUsageResponses, GetSubgraphInfoData, GetSubgraphInfoErrors, GetSubgraphInfoResponses, GetSubgraphQuotaData, GetSubgraphQuotaErrors, GetSubgraphQuotaResponses, InviteOrgMemberData, InviteOrgMemberErrors, InviteOrgMemberResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBackupsData, ListBackupsErrors, ListBackupsResponses, ListCreditTransactionsData, ListCreditTransactionsErrors, ListCreditTransactionsResponses, ListFilesData, ListFilesErrors, ListFilesResponses, ListMcpToolsData, ListMcpToolsErrors, ListMcpToolsResponses, ListOrgGraphsData, ListOrgGraphsErrors, ListOrgGraphsResponses, ListOrgInvoicesData, ListOrgInvoicesErrors, ListOrgInvoicesResponses, ListOrgMembersData, ListOrgMembersErrors, ListOrgMembersResponses, ListOrgSubscriptionsData, ListOrgSubscriptionsErrors, ListOrgSubscriptionsResponses, ListSubgraphsData, ListSubgraphsErrors, ListSubgraphsResponses, ListTablesData, ListTablesErrors, ListTablesResponses, ListUserApiKeysData, ListUserApiKeysResponses, ListUserOrgsData, ListUserOrgsResponses, LoginUserData, LoginUserErrors, LoginUserResponses, LogoutUserData, LogoutUserResponses, MaterializeGraphData, MaterializeGraphErrors, MaterializeGraphResponses, QueryTablesData, QueryTablesErrors, QueryTablesResponses, RecommendAgentData, RecommendAgentErrors, RecommendAgentResponses, RefreshAuthSessionData, RefreshAuthSessionErrors, RefreshAuthSessionResponses, RegisterUserData, RegisterUserErrors, RegisterUserResponses, RemoveOrgMemberData, RemoveOrgMemberErrors, RemoveOrgMemberResponses, ResendVerificationEmailData, ResendVerificationEmailErrors, ResendVerificationEmailResponses, ResetPasswordData, ResetPasswordErrors, ResetPasswordResponses, RestoreBackupData, RestoreBackupErrors, RestoreBackupResponses, RevokeUserApiKeyData, RevokeUserApiKeyErrors, RevokeUserApiKeyResponses, SelectGraphData, SelectGraphErrors, SelectGraphResponses, SsoTokenExchangeData, SsoTokenExchangeErrors, SsoTokenExchangeResponses, StreamOperationEventsData, StreamOperationEventsErrors, StreamOperationEventsResponses, UpdateFileData, UpdateFileErrors, UpdateFileResponses, UpdateOrgData, UpdateOrgErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleErrors, UpdateOrgMemberRoleResponses, UpdateOrgResponses, UpdateUserApiKeyData, UpdateUserApiKeyErrors, UpdateUserApiKeyResponses, UpdateUserData, UpdateUserErrors, UpdateUserPasswordData, UpdateUserPasswordErrors, UpdateUserPasswordResponses, UpdateUserResponses, UpgradeSubscriptionData, UpgradeSubscriptionErrors, UpgradeSubscriptionResponses, ValidateResetTokenData, ValidateResetTokenErrors, ValidateResetTokenResponses, ValidateSchemaData, ValidateSchemaErrors, ValidateSchemaResponses, VerifyEmailData, VerifyEmailErrors, VerifyEmailResponses } from './types.gen';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
8
8
  /**
@@ -430,287 +430,6 @@ export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Optio
430
430
  ...options
431
431
  });
432
432
 
433
- /**
434
- * List Connections
435
- *
436
- * List all data connections in the graph.
437
- *
438
- * Returns active and inactive connections with their current status.
439
- * Connections can be filtered by:
440
- * - **Entity**: Show connections for a specific entity
441
- * - **Provider**: Filter by connection type (sec, quickbooks, plaid)
442
- *
443
- * Each connection shows:
444
- * - Current sync status and health
445
- * - Last successful sync timestamp
446
- * - Configuration metadata
447
- * - Error messages if any
448
- *
449
- * No credits are consumed for listing connections.
450
- */
451
- export const listConnections = <ThrowOnError extends boolean = false>(options: Options<ListConnectionsData, ThrowOnError>) => (options.client ?? client).get<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>({
452
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
453
- url: '/v1/graphs/{graph_id}/connections',
454
- ...options
455
- });
456
-
457
- /**
458
- * Create Connection
459
- *
460
- * Create a new data connection for external system integration.
461
- *
462
- * This endpoint initiates connections to external data sources:
463
- *
464
- * **SEC Connections**:
465
- * - Provide entity CIK for automatic filing retrieval
466
- * - No authentication needed
467
- * - Begins immediate data sync
468
- *
469
- * **QuickBooks Connections**:
470
- * - Returns OAuth URL for authorization
471
- * - Requires admin permissions in QuickBooks
472
- * - Complete with OAuth callback
473
- *
474
- * **Plaid Connections**:
475
- * - Returns Plaid Link token
476
- * - User completes bank authentication
477
- * - Exchange public token for access
478
- *
479
- * Note:
480
- * This operation is included - no credit consumption required.
481
- */
482
- export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
483
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
484
- url: '/v1/graphs/{graph_id}/connections',
485
- ...options,
486
- headers: {
487
- 'Content-Type': 'application/json',
488
- ...options.headers
489
- }
490
- });
491
-
492
- /**
493
- * List Connection Options
494
- *
495
- * Get metadata about all available data connection providers.
496
- *
497
- * This endpoint returns comprehensive information about each supported provider:
498
- *
499
- * **SEC EDGAR**: Public entity financial filings
500
- * - No authentication required (public data)
501
- * - 10-K, 10-Q, 8-K reports with XBRL data
502
- * - Historical and real-time filing access
503
- *
504
- * **QuickBooks Online**: Full accounting system integration
505
- * - OAuth 2.0 authentication
506
- * - Chart of accounts, transactions, trial balance
507
- * - Real-time sync capabilities
508
- *
509
- * **Plaid**: Bank account connections
510
- * - Secure bank authentication via Plaid Link
511
- * - Transaction history and balances
512
- * - Multi-account support
513
- *
514
- * No credits are consumed for viewing connection options.
515
- */
516
- export const getConnectionOptions = <ThrowOnError extends boolean = false>(options: Options<GetConnectionOptionsData, ThrowOnError>) => (options.client ?? client).get<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError>({
517
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
518
- url: '/v1/graphs/{graph_id}/connections/options',
519
- ...options
520
- });
521
-
522
- /**
523
- * Exchange Link Token
524
- *
525
- * Exchange a public token for permanent access credentials.
526
- *
527
- * This completes the embedded authentication flow after user authorization.
528
- *
529
- * The exchange process:
530
- * 1. Validates the temporary public token
531
- * 2. Exchanges it for permanent access credentials
532
- * 3. Updates the connection with account information
533
- * 4. Optionally triggers initial data sync
534
- *
535
- * Supported providers:
536
- * - **Plaid**: Exchanges Plaid Link public token for access token
537
- *
538
- * Security:
539
- * - Public tokens expire after 30 minutes
540
- * - Each token can only be exchanged once
541
- * - Full audit trail is maintained
542
- *
543
- * No credits are consumed for token exchange.
544
- */
545
- export const exchangeLinkToken = <ThrowOnError extends boolean = false>(options: Options<ExchangeLinkTokenData, ThrowOnError>) => (options.client ?? client).post<ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, ThrowOnError>({
546
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
547
- url: '/v1/graphs/{graph_id}/connections/link/exchange',
548
- ...options,
549
- headers: {
550
- 'Content-Type': 'application/json',
551
- ...options.headers
552
- }
553
- });
554
-
555
- /**
556
- * Create Link Token
557
- *
558
- * Create a link token for embedded authentication providers.
559
- *
560
- * This endpoint generates a temporary token used to initialize embedded authentication UI.
561
- *
562
- * Currently supported providers:
563
- * - **Plaid**: Bank account connections with real-time transaction access
564
- *
565
- * The link token:
566
- * - Expires after 4 hours
567
- * - Is single-use only
568
- * - Must be used with the matching frontend SDK
569
- * - Includes user and entity context
570
- *
571
- * No credits are consumed for creating link tokens.
572
- */
573
- export const createLinkToken = <ThrowOnError extends boolean = false>(options: Options<CreateLinkTokenData, ThrowOnError>) => (options.client ?? client).post<CreateLinkTokenResponses, CreateLinkTokenErrors, ThrowOnError>({
574
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
575
- url: '/v1/graphs/{graph_id}/connections/link/token',
576
- ...options,
577
- headers: {
578
- 'Content-Type': 'application/json',
579
- ...options.headers
580
- }
581
- });
582
-
583
- /**
584
- * Init Oauth
585
- *
586
- * Initialize OAuth flow for a connection.
587
- *
588
- * This generates an authorization URL that the frontend should redirect the user to.
589
- * Currently supports: QuickBooks
590
- */
591
- export const initOAuth = <ThrowOnError extends boolean = false>(options: Options<InitOAuthData, ThrowOnError>) => (options.client ?? client).post<InitOAuthResponses, InitOAuthErrors, ThrowOnError>({
592
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
593
- url: '/v1/graphs/{graph_id}/connections/oauth/init',
594
- ...options,
595
- headers: {
596
- 'Content-Type': 'application/json',
597
- ...options.headers
598
- }
599
- });
600
-
601
- /**
602
- * OAuth Callback
603
- *
604
- * Handle OAuth callback from provider after user authorization.
605
- *
606
- * This endpoint completes the OAuth flow:
607
- * 1. Validates the OAuth state parameter
608
- * 2. Exchanges authorization code for access tokens
609
- * 3. Stores tokens securely
610
- * 4. Updates connection status
611
- * 5. Optionally triggers initial sync
612
- *
613
- * Supported providers:
614
- * - **QuickBooks**: Accounting data integration
615
- *
616
- * Security measures:
617
- * - State validation prevents session hijacking
618
- * - User context is verified
619
- * - Tokens are encrypted before storage
620
- * - Full audit trail is maintained
621
- *
622
- * No credits are consumed for OAuth callbacks.
623
- */
624
- export const oauthCallback = <ThrowOnError extends boolean = false>(options: Options<OauthCallbackData, ThrowOnError>) => (options.client ?? client).post<OauthCallbackResponses, OauthCallbackErrors, ThrowOnError>({
625
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
626
- url: '/v1/graphs/{graph_id}/connections/oauth/callback/{provider}',
627
- ...options,
628
- headers: {
629
- 'Content-Type': 'application/json',
630
- ...options.headers
631
- }
632
- });
633
-
634
- /**
635
- * Delete Connection
636
- *
637
- * Delete a data connection and clean up related resources.
638
- *
639
- * This operation:
640
- * - Removes the connection configuration
641
- * - Preserves any imported data in the graph
642
- * - Performs provider-specific cleanup
643
- * - Revokes stored credentials
644
- *
645
- * Note:
646
- * This operation is included - no credit consumption required.
647
- *
648
- * Only users with admin role can delete connections.
649
- */
650
- export const deleteConnection = <ThrowOnError extends boolean = false>(options: Options<DeleteConnectionData, ThrowOnError>) => (options.client ?? client).delete<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>({
651
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
652
- url: '/v1/graphs/{graph_id}/connections/{connection_id}',
653
- ...options
654
- });
655
-
656
- /**
657
- * Get Connection
658
- *
659
- * Get detailed information about a specific connection.
660
- *
661
- * Returns comprehensive connection details including:
662
- * - Current status and health indicators
663
- * - Authentication state
664
- * - Sync history and statistics
665
- * - Error details if any
666
- * - Provider-specific metadata
667
- *
668
- * No credits are consumed for viewing connection details.
669
- */
670
- export const getConnection = <ThrowOnError extends boolean = false>(options: Options<GetConnectionData, ThrowOnError>) => (options.client ?? client).get<GetConnectionResponses, GetConnectionErrors, ThrowOnError>({
671
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
672
- url: '/v1/graphs/{graph_id}/connections/{connection_id}',
673
- ...options
674
- });
675
-
676
- /**
677
- * Sync Connection
678
- *
679
- * Trigger a data synchronization for the connection.
680
- *
681
- * Initiates data sync based on provider type:
682
- *
683
- * **SEC Sync**:
684
- * - Downloads latest filings from EDGAR
685
- * - Parses XBRL data and updates graph
686
- * - Typically completes in 5-10 minutes
687
- *
688
- * **QuickBooks Sync**:
689
- * - Fetches latest transactions and balances
690
- * - Updates chart of accounts
691
- * - Generates fresh trial balance
692
- * - Duration depends on data volume
693
- *
694
- * **Plaid Sync**:
695
- * - Retrieves recent bank transactions
696
- * - Updates account balances
697
- * - Categorizes new transactions
698
- *
699
- * Note:
700
- * This operation is included - no credit consumption required.
701
- *
702
- * Returns a task ID for monitoring sync progress.
703
- */
704
- export const syncConnection = <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>) => (options.client ?? client).post<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError>({
705
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
706
- url: '/v1/graphs/{graph_id}/connections/{connection_id}/sync',
707
- ...options,
708
- headers: {
709
- 'Content-Type': 'application/json',
710
- ...options.headers
711
- }
712
- });
713
-
714
433
  /**
715
434
  * List available agents
716
435
  *
@@ -2012,79 +1731,6 @@ export const queryTables = <ThrowOnError extends boolean = false>(options: Optio
2012
1731
  }
2013
1732
  });
2014
1733
 
2015
- /**
2016
- * Create View
2017
- *
2018
- * Generate financial report view from data source (dual-mode support).
2019
- *
2020
- * **Mode 1: Transaction Aggregation (generate_from_transactions)**
2021
- * - Aggregates raw transaction data to trial balance
2022
- * - Creates facts on-demand
2023
- * - Shows real-time reporting from source of truth
2024
- *
2025
- * **Mode 2: Existing Facts (pivot_existing_facts)**
2026
- * - Queries existing Fact nodes
2027
- * - Supports multi-dimensional analysis
2028
- * - Works with SEC filings and pre-computed facts
2029
- *
2030
- * Both modes:
2031
- * - Build FactGrid from data
2032
- * - Generate pivot table presentation
2033
- * - Return consistent response format
2034
- */
2035
- export const createView = <ThrowOnError extends boolean = false>(options: Options<CreateViewData, ThrowOnError>) => (options.client ?? client).post<CreateViewResponses, CreateViewErrors, ThrowOnError>({
2036
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2037
- url: '/v1/graphs/{graph_id}/views',
2038
- ...options,
2039
- headers: {
2040
- 'Content-Type': 'application/json',
2041
- ...options.headers
2042
- }
2043
- });
2044
-
2045
- /**
2046
- * Save View
2047
- *
2048
- * Save or update view as materialized report in the graph.
2049
- *
2050
- * Converts computed view results into persistent Report, Fact, and Structure nodes.
2051
- * This establishes what data exists in the subgraph, which then defines what
2052
- * needs to be exported for publishing to the parent graph.
2053
- *
2054
- * **Create Mode** (no report_id provided):
2055
- * - Generates new report_id from entity + period + report type
2056
- * - Creates new Report, Facts, and Structures
2057
- *
2058
- * **Update Mode** (report_id provided):
2059
- * - Deletes all existing Facts and Structures for the report
2060
- * - Updates Report metadata
2061
- * - Creates fresh Facts and Structures from current view
2062
- * - Useful for refreshing reports with updated data or view configurations
2063
- *
2064
- * **This is NOT publishing** - it only creates nodes in the subgraph workspace.
2065
- * Publishing (export → parquet → parent ingest) happens separately.
2066
- *
2067
- * Creates/Updates:
2068
- * - Report node with metadata
2069
- * - Fact nodes with all aspects (period, entity, element, unit)
2070
- * - PresentationStructure nodes (how facts are displayed)
2071
- * - CalculationStructure nodes (how facts roll up)
2072
- *
2073
- * Returns:
2074
- * - report_id: Unique identifier used as parquet export prefix
2075
- * - parquet_export_prefix: Filename prefix for future exports
2076
- * - All created facts and structures
2077
- */
2078
- export const saveView = <ThrowOnError extends boolean = false>(options: Options<SaveViewData, ThrowOnError>) => (options.client ?? client).post<SaveViewResponses, SaveViewErrors, ThrowOnError>({
2079
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2080
- url: '/v1/graphs/{graph_id}/views/save',
2081
- ...options,
2082
- headers: {
2083
- 'Content-Type': 'application/json',
2084
- ...options.headers
2085
- }
2086
- });
2087
-
2088
1734
  /**
2089
1735
  * Get Materialization Status
2090
1736
  *
@@ -2604,6 +2250,36 @@ export const getAvailableGraphTiers = <ThrowOnError extends boolean = false>(opt
2604
2250
  ...options
2605
2251
  });
2606
2252
 
2253
+ /**
2254
+ * Get Graph Tier Capacity
2255
+ *
2256
+ * Check current infrastructure capacity for each graph database tier.
2257
+ *
2258
+ * Returns a status per tier indicating whether instances are immediately available,
2259
+ * can be provisioned on demand, or are at capacity.
2260
+ *
2261
+ * **Status Values:**
2262
+ * - `ready` — An instance slot is available; graph creation will succeed immediately
2263
+ * - `scalable` — No slots right now, but a new instance can be provisioned (3-5 min)
2264
+ * - `at_capacity` — Tier is full and cannot auto-scale; contact support
2265
+ *
2266
+ * **Use Cases:**
2267
+ * - Pre-flight check before entering the graph creation wizard
2268
+ * - Show availability badges on tier selection cards
2269
+ * - Gate tier selection and show contact form for at-capacity tiers
2270
+ *
2271
+ * **Caching:**
2272
+ * Results are cached for 60 seconds to avoid excessive infrastructure queries.
2273
+ *
2274
+ * **Note:**
2275
+ * No credit consumption required. Does not expose instance counts or IPs.
2276
+ */
2277
+ export const getGraphCapacity = <ThrowOnError extends boolean = false>(options?: Options<GetGraphCapacityData, ThrowOnError>) => (options?.client ?? client).get<GetGraphCapacityResponses, GetGraphCapacityErrors, ThrowOnError>({
2278
+ security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2279
+ url: '/v1/graphs/capacity',
2280
+ ...options
2281
+ });
2282
+
2607
2283
  /**
2608
2284
  * Select Graph
2609
2285
  *
@@ -2932,10 +2608,11 @@ export const createCheckoutSession = <ThrowOnError extends boolean = false>(opti
2932
2608
  * **Status Values:**
2933
2609
  * - `pending_payment`: Waiting for payment to complete
2934
2610
  * - `provisioning`: Payment confirmed, resource being created
2935
- * - `completed`: Resource is ready (resource_id will be set)
2611
+ * - `active`: Resource is ready (resource_id will be set)
2936
2612
  * - `failed`: Something went wrong (error field will be set)
2613
+ * - `canceled`: Payment was canceled
2937
2614
  *
2938
- * **When status is 'completed':**
2615
+ * **When status is 'active':**
2939
2616
  * - For graphs: `resource_id` will be the graph_id, and `operation_id` can be used to monitor SSE progress
2940
2617
  * - For repositories: `resource_id` will be the repository name and access is immediately available
2941
2618
  */