@robosystems/client 0.1.18 → 0.1.20

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.gen.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  import type { Options as ClientOptions, TDataShape, Client } from './client';
4
- import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshSessionData, RefreshSessionResponses, RefreshSessionErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, QueryFinancialAgentData, QueryFinancialAgentResponses, QueryFinancialAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CopyDataToGraphData, CopyDataToGraphResponses, CopyDataToGraphErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
4
+ import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshSessionData, RefreshSessionResponses, RefreshSessionErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoLoginData, SsoLoginResponses, SsoLoginErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetUserGraphsData, GetUserGraphsResponses, GetUserGraphsErrors, SelectUserGraphData, SelectUserGraphResponses, SelectUserGraphErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, ListUserApiKeysErrors, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetUserUsageErrors, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetAllSharedRepositoryLimitsErrors, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, GetUserUsageOverviewErrors, GetDetailedUserAnalyticsData, GetDetailedUserAnalyticsResponses, GetDetailedUserAnalyticsErrors, GetUserSharedSubscriptionsData, GetUserSharedSubscriptionsResponses, GetUserSharedSubscriptionsErrors, SubscribeToSharedRepositoryData, SubscribeToSharedRepositoryResponses, SubscribeToSharedRepositoryErrors, UpgradeSharedRepositorySubscriptionData, UpgradeSharedRepositorySubscriptionResponses, UpgradeSharedRepositorySubscriptionErrors, CancelSharedRepositorySubscriptionData, CancelSharedRepositorySubscriptionResponses, CancelSharedRepositorySubscriptionErrors, GetSharedRepositoryCreditsData, GetSharedRepositoryCreditsResponses, GetSharedRepositoryCreditsErrors, GetRepositoryCreditsData, GetRepositoryCreditsResponses, GetRepositoryCreditsErrors, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, ListConnectionsData, ListConnectionsResponses, ListConnectionsErrors, CreateConnectionData, CreateConnectionResponses, CreateConnectionErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, ListAgentsData, ListAgentsResponses, ListAgentsErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, RecommendAgentData, RecommendAgentResponses, RecommendAgentErrors, ListMcpToolsData, ListMcpToolsResponses, ListMcpToolsErrors, CallMcpToolData, CallMcpToolResponses, CallMcpToolErrors, ListBackupsData, ListBackupsResponses, ListBackupsErrors, CreateBackupData, CreateBackupResponses, CreateBackupErrors, ExportBackupData, ExportBackupResponses, ExportBackupErrors, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaInfoData, GetGraphSchemaInfoResponses, GetGraphSchemaInfoErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ListSchemaExtensionsData, ListSchemaExtensionsResponses, ListSchemaExtensionsErrors, GetCurrentGraphBillData, GetCurrentGraphBillResponses, GetCurrentGraphBillErrors, GetGraphUsageDetailsData, GetGraphUsageDetailsResponses, GetGraphUsageDetailsErrors, GetGraphBillingHistoryData, GetGraphBillingHistoryResponses, GetGraphBillingHistoryErrors, GetGraphMonthlyBillData, GetGraphMonthlyBillResponses, GetGraphMonthlyBillErrors, GetCreditSummaryData, GetCreditSummaryResponses, GetCreditSummaryErrors, ListCreditTransactionsData, ListCreditTransactionsResponses, ListCreditTransactionsErrors, CheckCreditBalanceData, CheckCreditBalanceResponses, CheckCreditBalanceErrors, GetStorageUsageData, GetStorageUsageResponses, GetStorageUsageErrors, CheckStorageLimitsData, CheckStorageLimitsResponses, CheckStorageLimitsErrors, GetDatabaseHealthData, GetDatabaseHealthResponses, GetDatabaseHealthErrors, GetDatabaseInfoData, GetDatabaseInfoResponses, GetDatabaseInfoErrors, GetGraphLimitsData, GetGraphLimitsResponses, GetGraphLimitsErrors, ListSubgraphsData, ListSubgraphsResponses, ListSubgraphsErrors, CreateSubgraphData, CreateSubgraphResponses, CreateSubgraphErrors, DeleteSubgraphData, DeleteSubgraphResponses, DeleteSubgraphErrors, GetSubgraphInfoData, GetSubgraphInfoResponses, GetSubgraphInfoErrors, GetSubgraphQuotaData, GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, CopyDataToGraphData, CopyDataToGraphResponses, CopyDataToGraphErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
5
5
  import { client as _heyApiClient } from './client.gen';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
@@ -685,147 +685,6 @@ export const getRepositoryCredits = <ThrowOnError extends boolean = false>(optio
685
685
  });
686
686
  };
687
687
 
688
- /**
689
- * List Connections
690
- * List all data connections in the graph.
691
- *
692
- * Returns active and inactive connections with their current status.
693
- * Connections can be filtered by:
694
- * - **Entity**: Show connections for a specific entity
695
- * - **Provider**: Filter by connection type (sec, quickbooks, plaid)
696
- *
697
- * Each connection shows:
698
- * - Current sync status and health
699
- * - Last successful sync timestamp
700
- * - Configuration metadata
701
- * - Error messages if any
702
- *
703
- * No credits are consumed for listing connections.
704
- */
705
- export const listConnections = <ThrowOnError extends boolean = false>(options: Options<ListConnectionsData, ThrowOnError>) => {
706
- return (options.client ?? _heyApiClient).get<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>({
707
- security: [
708
- {
709
- name: 'X-API-Key',
710
- type: 'apiKey'
711
- },
712
- {
713
- scheme: 'bearer',
714
- type: 'http'
715
- }
716
- ],
717
- url: '/v1/{graph_id}/connections',
718
- ...options
719
- });
720
- };
721
-
722
- /**
723
- * Create Connection
724
- * Create a new data connection for external system integration.
725
- *
726
- * This endpoint initiates connections to external data sources:
727
- *
728
- * **SEC Connections**:
729
- * - Provide entity CIK for automatic filing retrieval
730
- * - No authentication needed
731
- * - Begins immediate data sync
732
- *
733
- * **QuickBooks Connections**:
734
- * - Returns OAuth URL for authorization
735
- * - Requires admin permissions in QuickBooks
736
- * - Complete with OAuth callback
737
- *
738
- * **Plaid Connections**:
739
- * - Returns Plaid Link token
740
- * - User completes bank authentication
741
- * - Exchange public token for access
742
- *
743
- * Note:
744
- * This operation is FREE - no credit consumption required.
745
- */
746
- export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => {
747
- return (options.client ?? _heyApiClient).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
748
- security: [
749
- {
750
- name: 'X-API-Key',
751
- type: 'apiKey'
752
- },
753
- {
754
- scheme: 'bearer',
755
- type: 'http'
756
- }
757
- ],
758
- url: '/v1/{graph_id}/connections',
759
- ...options,
760
- headers: {
761
- 'Content-Type': 'application/json',
762
- ...options.headers
763
- }
764
- });
765
- };
766
-
767
- /**
768
- * Delete Connection
769
- * Delete a data connection and clean up related resources.
770
- *
771
- * This operation:
772
- * - Removes the connection configuration
773
- * - Preserves any imported data in the graph
774
- * - Performs provider-specific cleanup
775
- * - Revokes stored credentials
776
- *
777
- * Note:
778
- * This operation is FREE - no credit consumption required.
779
- *
780
- * Only users with admin role can delete connections.
781
- */
782
- export const deleteConnection = <ThrowOnError extends boolean = false>(options: Options<DeleteConnectionData, ThrowOnError>) => {
783
- return (options.client ?? _heyApiClient).delete<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>({
784
- security: [
785
- {
786
- name: 'X-API-Key',
787
- type: 'apiKey'
788
- },
789
- {
790
- scheme: 'bearer',
791
- type: 'http'
792
- }
793
- ],
794
- url: '/v1/{graph_id}/connections/{connection_id}',
795
- ...options
796
- });
797
- };
798
-
799
- /**
800
- * Get Connection
801
- * Get detailed information about a specific connection.
802
- *
803
- * Returns comprehensive connection details including:
804
- * - Current status and health indicators
805
- * - Authentication state
806
- * - Sync history and statistics
807
- * - Error details if any
808
- * - Provider-specific metadata
809
- *
810
- * No credits are consumed for viewing connection details.
811
- */
812
- export const getConnection = <ThrowOnError extends boolean = false>(options: Options<GetConnectionData, ThrowOnError>) => {
813
- return (options.client ?? _heyApiClient).get<GetConnectionResponses, GetConnectionErrors, ThrowOnError>({
814
- security: [
815
- {
816
- name: 'X-API-Key',
817
- type: 'apiKey'
818
- },
819
- {
820
- scheme: 'bearer',
821
- type: 'http'
822
- }
823
- ],
824
- url: '/v1/{graph_id}/connections/{connection_id}',
825
- ...options
826
- });
827
- };
828
-
829
688
  /**
830
689
  * List Connection Options
831
690
  * Get metadata about all available data connection providers.
@@ -1067,57 +926,160 @@ export const oauthCallback = <ThrowOnError extends boolean = false>(options: Opt
1067
926
  };
1068
927
 
1069
928
  /**
1070
- * Query Financial Agent
1071
- * AI-powered financial analysis with direct access to graph data.
929
+ * List Connections
930
+ * List all data connections in the graph.
1072
931
  *
1073
- * This endpoint provides intelligent financial analysis using an AI agent that can:
1074
- * - Analyze entity financial statements and SEC filings
1075
- * - Review QuickBooks transactions and accounting data
1076
- * - Perform multi-period trend analysis
1077
- * - Generate insights from balance sheets and income statements
1078
- * - Answer complex financial queries with contextual understanding
932
+ * Returns active and inactive connections with their current status.
933
+ * Connections can be filtered by:
934
+ * - **Entity**: Show connections for a specific entity
935
+ * - **Provider**: Filter by connection type (sec, quickbooks, plaid)
1079
936
  *
1080
- * **Execution Modes:**
1081
- * - **Quick Analysis** (default): Synchronous responses for simple queries (1-2 tool calls)
1082
- * - **Extended Analysis**: Asynchronous processing for complex research (returns operation_id for SSE monitoring)
937
+ * Each connection shows:
938
+ * - Current sync status and health
939
+ * - Last successful sync timestamp
940
+ * - Configuration metadata
941
+ * - Error messages if any
1083
942
  *
1084
- * **Extended Analysis Monitoring:**
1085
- * For complex queries, connect to the SSE stream for real-time progress:
1086
- * ```javascript
1087
- * const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
1088
- * eventSource.onmessage = (event) => {
1089
- * const data = JSON.parse(event.data);
1090
- * console.log('Analysis:', data.message);
1091
- * };
1092
- * ```
943
+ * No credits are consumed for listing connections.
944
+ */
945
+ export const listConnections = <ThrowOnError extends boolean = false>(options: Options<ListConnectionsData, ThrowOnError>) => {
946
+ return (options.client ?? _heyApiClient).get<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>({
947
+ security: [
948
+ {
949
+ name: 'X-API-Key',
950
+ type: 'apiKey'
951
+ },
952
+ {
953
+ scheme: 'bearer',
954
+ type: 'http'
955
+ }
956
+ ],
957
+ url: '/v1/{graph_id}/connections',
958
+ ...options
959
+ });
960
+ };
961
+
962
+ /**
963
+ * Create Connection
964
+ * Create a new data connection for external system integration.
1093
965
  *
1094
- * **SSE Connection Limits:**
1095
- * - Maximum 5 concurrent SSE connections per user
1096
- * - Rate limited to 10 new connections per minute
1097
- * - Automatic circuit breaker for Redis failures
1098
- * - Graceful degradation with fallback to polling if SSE unavailable
966
+ * This endpoint initiates connections to external data sources:
1099
967
  *
1100
- * **Events Emitted:**
1101
- * - `operation_started`: Analysis begins
1102
- * - `operation_progress`: Tool calls, analysis steps
1103
- * - `operation_completed`: Final comprehensive analysis
1104
- * - `operation_error`: Analysis failed
968
+ * **SEC Connections**:
969
+ * - Provide entity CIK for automatic filing retrieval
970
+ * - No authentication needed
971
+ * - Begins immediate data sync
1105
972
  *
1106
- * **Error Handling:**
1107
- * - `429 Too Many Requests`: SSE connection limit exceeded
1108
- * - `503 Service Unavailable`: SSE system temporarily disabled
1109
- * - Fallback to status polling endpoint if SSE unavailable
973
+ * **QuickBooks Connections**:
974
+ * - Returns OAuth URL for authorization
975
+ * - Requires admin permissions in QuickBooks
976
+ * - Complete with OAuth callback
1110
977
  *
1111
- * **Credit Consumption:**
1112
- * - AI operations consume credits based on actual token usage
1113
- * - Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
1114
- * - Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
1115
- * - Credits are consumed after operation completes based on actual usage
978
+ * **Plaid Connections**:
979
+ * - Returns Plaid Link token
980
+ * - User completes bank authentication
981
+ * - Exchange public token for access
982
+ *
983
+ * Note:
984
+ * This operation is FREE - no credit consumption required.
985
+ */
986
+ export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => {
987
+ return (options.client ?? _heyApiClient).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
988
+ security: [
989
+ {
990
+ name: 'X-API-Key',
991
+ type: 'apiKey'
992
+ },
993
+ {
994
+ scheme: 'bearer',
995
+ type: 'http'
996
+ }
997
+ ],
998
+ url: '/v1/{graph_id}/connections',
999
+ ...options,
1000
+ headers: {
1001
+ 'Content-Type': 'application/json',
1002
+ ...options.headers
1003
+ }
1004
+ });
1005
+ };
1006
+
1007
+ /**
1008
+ * Delete Connection
1009
+ * Delete a data connection and clean up related resources.
1010
+ *
1011
+ * This operation:
1012
+ * - Removes the connection configuration
1013
+ * - Preserves any imported data in the graph
1014
+ * - Performs provider-specific cleanup
1015
+ * - Revokes stored credentials
1016
+ *
1017
+ * Note:
1018
+ * This operation is FREE - no credit consumption required.
1019
+ *
1020
+ * Only users with admin role can delete connections.
1021
+ */
1022
+ export const deleteConnection = <ThrowOnError extends boolean = false>(options: Options<DeleteConnectionData, ThrowOnError>) => {
1023
+ return (options.client ?? _heyApiClient).delete<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>({
1024
+ security: [
1025
+ {
1026
+ name: 'X-API-Key',
1027
+ type: 'apiKey'
1028
+ },
1029
+ {
1030
+ scheme: 'bearer',
1031
+ type: 'http'
1032
+ }
1033
+ ],
1034
+ url: '/v1/{graph_id}/connections/{connection_id}',
1035
+ ...options
1036
+ });
1037
+ };
1038
+
1039
+ /**
1040
+ * Get Connection
1041
+ * Get detailed information about a specific connection.
1042
+ *
1043
+ * Returns comprehensive connection details including:
1044
+ * - Current status and health indicators
1045
+ * - Authentication state
1046
+ * - Sync history and statistics
1047
+ * - Error details if any
1048
+ * - Provider-specific metadata
1049
+ *
1050
+ * No credits are consumed for viewing connection details.
1051
+ */
1052
+ export const getConnection = <ThrowOnError extends boolean = false>(options: Options<GetConnectionData, ThrowOnError>) => {
1053
+ return (options.client ?? _heyApiClient).get<GetConnectionResponses, GetConnectionErrors, ThrowOnError>({
1054
+ security: [
1055
+ {
1056
+ name: 'X-API-Key',
1057
+ type: 'apiKey'
1058
+ },
1059
+ {
1060
+ scheme: 'bearer',
1061
+ type: 'http'
1062
+ }
1063
+ ],
1064
+ url: '/v1/{graph_id}/connections/{connection_id}',
1065
+ ...options
1066
+ });
1067
+ };
1068
+
1069
+ /**
1070
+ * Auto-select agent for query
1071
+ * Automatically select the best agent for your query.
1116
1072
  *
1117
- * The agent automatically determines query complexity or you can force extended analysis.
1073
+ * The orchestrator will:
1074
+ * 1. Enrich context with RAG if enabled
1075
+ * 2. Evaluate all available agents
1076
+ * 3. Select the best match based on confidence scores
1077
+ * 4. Execute the query with the selected agent
1078
+ *
1079
+ * Use this endpoint when you want the system to intelligently route your query.
1118
1080
  */
1119
- export const queryFinancialAgent = <ThrowOnError extends boolean = false>(options: Options<QueryFinancialAgentData, ThrowOnError>) => {
1120
- return (options.client ?? _heyApiClient).post<QueryFinancialAgentResponses, QueryFinancialAgentErrors, ThrowOnError>({
1081
+ export const autoSelectAgent = <ThrowOnError extends boolean = false>(options: Options<AutoSelectAgentData, ThrowOnError>) => {
1082
+ return (options.client ?? _heyApiClient).post<AutoSelectAgentResponses, AutoSelectAgentErrors, ThrowOnError>({
1121
1083
  security: [
1122
1084
  {
1123
1085
  name: 'X-API-Key',
@@ -1137,6 +1099,174 @@ export const queryFinancialAgent = <ThrowOnError extends boolean = false>(option
1137
1099
  });
1138
1100
  };
1139
1101
 
1102
+ /**
1103
+ * Execute specific agent
1104
+ * Execute a specific agent type directly.
1105
+ *
1106
+ * Available agents:
1107
+ * - **financial**: Financial analysis, SEC filings, accounting data
1108
+ * - **research**: Deep research and comprehensive analysis
1109
+ * - **rag**: Fast retrieval without AI (no credits required)
1110
+ *
1111
+ * Use this endpoint when you know which agent you want to use.
1112
+ */
1113
+ export const executeSpecificAgent = <ThrowOnError extends boolean = false>(options: Options<ExecuteSpecificAgentData, ThrowOnError>) => {
1114
+ return (options.client ?? _heyApiClient).post<ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, ThrowOnError>({
1115
+ security: [
1116
+ {
1117
+ name: 'X-API-Key',
1118
+ type: 'apiKey'
1119
+ },
1120
+ {
1121
+ scheme: 'bearer',
1122
+ type: 'http'
1123
+ }
1124
+ ],
1125
+ url: '/v1/{graph_id}/agent/{agent_type}',
1126
+ ...options,
1127
+ headers: {
1128
+ 'Content-Type': 'application/json',
1129
+ ...options.headers
1130
+ }
1131
+ });
1132
+ };
1133
+
1134
+ /**
1135
+ * Batch process multiple queries
1136
+ * Process multiple queries either sequentially or in parallel.
1137
+ *
1138
+ * **Features:**
1139
+ * - Process up to 10 queries in a single request
1140
+ * - Sequential or parallel execution modes
1141
+ * - Automatic error handling per query
1142
+ * - Credit checking before execution
1143
+ *
1144
+ * **Use Cases:**
1145
+ * - Bulk analysis of multiple entities
1146
+ * - Comparative analysis across queries
1147
+ * - Automated report generation
1148
+ *
1149
+ * Returns individual results for each query with execution metrics.
1150
+ */
1151
+ export const batchProcessQueries = <ThrowOnError extends boolean = false>(options: Options<BatchProcessQueriesData, ThrowOnError>) => {
1152
+ return (options.client ?? _heyApiClient).post<BatchProcessQueriesResponses, BatchProcessQueriesErrors, ThrowOnError>({
1153
+ security: [
1154
+ {
1155
+ name: 'X-API-Key',
1156
+ type: 'apiKey'
1157
+ },
1158
+ {
1159
+ scheme: 'bearer',
1160
+ type: 'http'
1161
+ }
1162
+ ],
1163
+ url: '/v1/{graph_id}/agent/batch',
1164
+ ...options,
1165
+ headers: {
1166
+ 'Content-Type': 'application/json',
1167
+ ...options.headers
1168
+ }
1169
+ });
1170
+ };
1171
+
1172
+ /**
1173
+ * List available agents
1174
+ * Get a comprehensive list of all available agents with their metadata.
1175
+ *
1176
+ * **Returns:**
1177
+ * - Agent types and names
1178
+ * - Capabilities and supported modes
1179
+ * - Version information
1180
+ * - Credit requirements
1181
+ *
1182
+ * Use the optional `capability` filter to find agents with specific capabilities.
1183
+ */
1184
+ export const listAgents = <ThrowOnError extends boolean = false>(options: Options<ListAgentsData, ThrowOnError>) => {
1185
+ return (options.client ?? _heyApiClient).get<ListAgentsResponses, ListAgentsErrors, ThrowOnError>({
1186
+ security: [
1187
+ {
1188
+ name: 'X-API-Key',
1189
+ type: 'apiKey'
1190
+ },
1191
+ {
1192
+ scheme: 'bearer',
1193
+ type: 'http'
1194
+ }
1195
+ ],
1196
+ url: '/v1/{graph_id}/agent/list',
1197
+ ...options
1198
+ });
1199
+ };
1200
+
1201
+ /**
1202
+ * Get agent metadata
1203
+ * Get comprehensive metadata for a specific agent type.
1204
+ *
1205
+ * **Returns:**
1206
+ * - Agent name and description
1207
+ * - Version information
1208
+ * - Supported capabilities and modes
1209
+ * - Credit requirements
1210
+ * - Author and tags
1211
+ * - Configuration options
1212
+ *
1213
+ * Use this to understand agent capabilities before execution.
1214
+ */
1215
+ export const getAgentMetadata = <ThrowOnError extends boolean = false>(options: Options<GetAgentMetadataData, ThrowOnError>) => {
1216
+ return (options.client ?? _heyApiClient).get<GetAgentMetadataResponses, GetAgentMetadataErrors, ThrowOnError>({
1217
+ security: [
1218
+ {
1219
+ name: 'X-API-Key',
1220
+ type: 'apiKey'
1221
+ },
1222
+ {
1223
+ scheme: 'bearer',
1224
+ type: 'http'
1225
+ }
1226
+ ],
1227
+ url: '/v1/{graph_id}/agent/{agent_type}/metadata',
1228
+ ...options
1229
+ });
1230
+ };
1231
+
1232
+ /**
1233
+ * Get agent recommendations
1234
+ * Get intelligent agent recommendations for a specific query.
1235
+ *
1236
+ * **How it works:**
1237
+ * 1. Analyzes query content and structure
1238
+ * 2. Evaluates agent capabilities
1239
+ * 3. Calculates confidence scores
1240
+ * 4. Returns ranked recommendations
1241
+ *
1242
+ * **Use this when:**
1243
+ * - Unsure which agent to use
1244
+ * - Need to understand agent suitability
1245
+ * - Want confidence scores for decision making
1246
+ *
1247
+ * Returns top agents ranked by confidence with explanations.
1248
+ */
1249
+ export const recommendAgent = <ThrowOnError extends boolean = false>(options: Options<RecommendAgentData, ThrowOnError>) => {
1250
+ return (options.client ?? _heyApiClient).post<RecommendAgentResponses, RecommendAgentErrors, ThrowOnError>({
1251
+ security: [
1252
+ {
1253
+ name: 'X-API-Key',
1254
+ type: 'apiKey'
1255
+ },
1256
+ {
1257
+ scheme: 'bearer',
1258
+ type: 'http'
1259
+ }
1260
+ ],
1261
+ url: '/v1/{graph_id}/agent/recommend',
1262
+ ...options,
1263
+ headers: {
1264
+ 'Content-Type': 'application/json',
1265
+ ...options.headers
1266
+ }
1267
+ });
1268
+ };
1269
+
1140
1270
  /**
1141
1271
  * List MCP Tools
1142
1272
  * Get available Model Context Protocol tools for graph analysis.