@robosystems/client 0.2.2 → 0.2.4
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/QueryClient.js +0 -1
- package/extensions/QueryClient.ts +0 -1
- package/extensions/TableIngestClient.js +0 -4
- package/extensions/TableIngestClient.ts +0 -4
- package/package.json +1 -1
- package/sdk/sdk.gen.d.ts +231 -285
- package/sdk/sdk.gen.js +223 -277
- package/sdk/sdk.gen.ts +231 -285
- package/sdk/types.gen.d.ts +141 -1165
- package/sdk/types.gen.ts +149 -1186
- package/sdk-extensions/QueryClient.js +0 -1
- package/sdk-extensions/QueryClient.ts +0 -1
- package/sdk-extensions/TableIngestClient.js +0 -4
- package/sdk-extensions/TableIngestClient.ts +0 -4
- package/sdk.gen.d.ts +231 -285
- package/sdk.gen.js +223 -277
- package/sdk.gen.ts +231 -285
- package/types.gen.d.ts +141 -1165
- package/types.gen.ts +149 -1186
package/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from './client';
|
|
2
|
-
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses,
|
|
2
|
+
import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, GetCurrentAuthUserData, GetCurrentAuthUserResponses, GetCurrentAuthUserErrors, RefreshAuthSessionData, RefreshAuthSessionResponses, RefreshAuthSessionErrors, ResendVerificationEmailData, ResendVerificationEmailResponses, ResendVerificationEmailErrors, VerifyEmailData, VerifyEmailResponses, VerifyEmailErrors, GetPasswordPolicyData, GetPasswordPolicyResponses, CheckPasswordStrengthData, CheckPasswordStrengthResponses, CheckPasswordStrengthErrors, ForgotPasswordData, ForgotPasswordResponses, ForgotPasswordErrors, ValidateResetTokenData, ValidateResetTokenResponses, ValidateResetTokenErrors, ResetPasswordData, ResetPasswordResponses, ResetPasswordErrors, GenerateSsoTokenData, GenerateSsoTokenResponses, GenerateSsoTokenErrors, SsoTokenExchangeData, SsoTokenExchangeResponses, SsoTokenExchangeErrors, CompleteSsoAuthData, CompleteSsoAuthResponses, CompleteSsoAuthErrors, GetCaptchaConfigData, GetCaptchaConfigResponses, GetServiceStatusData, GetServiceStatusResponses, GetCurrentUserData, GetCurrentUserResponses, UpdateUserData, UpdateUserResponses, UpdateUserErrors, GetAllCreditSummariesData, GetAllCreditSummariesResponses, GetAllCreditSummariesErrors, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, GetUserLimitsData, GetUserLimitsResponses, GetUserLimitsErrors, GetUserUsageData, GetUserUsageResponses, GetAllSharedRepositoryLimitsData, GetAllSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsData, GetSharedRepositoryLimitsResponses, GetSharedRepositoryLimitsErrors, GetUserUsageOverviewData, GetUserUsageOverviewResponses, 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, GetConnectionOptionsData, GetConnectionOptionsResponses, GetConnectionOptionsErrors, ExchangeLinkTokenData, ExchangeLinkTokenResponses, ExchangeLinkTokenErrors, CreateLinkTokenData, CreateLinkTokenResponses, CreateLinkTokenErrors, InitOAuthData, InitOAuthResponses, InitOAuthErrors, OauthCallbackData, OauthCallbackResponses, OauthCallbackErrors, DeleteConnectionData, DeleteConnectionResponses, DeleteConnectionErrors, GetConnectionData, GetConnectionResponses, GetConnectionErrors, SyncConnectionData, SyncConnectionResponses, SyncConnectionErrors, 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, GetBackupDownloadUrlData, GetBackupDownloadUrlResponses, GetBackupDownloadUrlErrors, RestoreBackupData, RestoreBackupResponses, RestoreBackupErrors, GetBackupStatsData, GetBackupStatsResponses, GetBackupStatsErrors, GetGraphMetricsData, GetGraphMetricsResponses, GetGraphMetricsErrors, GetGraphUsageStatsData, GetGraphUsageStatsResponses, GetGraphUsageStatsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, 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, ListTablesData, ListTablesResponses, ListTablesErrors, ListTableFilesData, ListTableFilesResponses, ListTableFilesErrors, GetUploadUrlData, GetUploadUrlResponses, GetUploadUrlErrors, DeleteFileData, DeleteFileResponses, DeleteFileErrors, GetFileInfoData, GetFileInfoResponses, GetFileInfoErrors, UpdateFileStatusData, UpdateFileStatusResponses, UpdateFileStatusErrors, IngestTablesData, IngestTablesResponses, IngestTablesErrors, QueryTablesData, QueryTablesResponses, QueryTablesErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -27,7 +27,7 @@ export declare const loginUser: <ThrowOnError extends boolean = false>(options:
|
|
|
27
27
|
* User Logout
|
|
28
28
|
* Logout user and invalidate session.
|
|
29
29
|
*/
|
|
30
|
-
export declare const logoutUser: <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => import("./client").RequestResult<LogoutUserResponses,
|
|
30
|
+
export declare const logoutUser: <ThrowOnError extends boolean = false>(options?: Options<LogoutUserData, ThrowOnError>) => import("./client").RequestResult<LogoutUserResponses, unknown, ThrowOnError, "fields">;
|
|
31
31
|
/**
|
|
32
32
|
* Get Current User
|
|
33
33
|
* Get the currently authenticated user.
|
|
@@ -102,7 +102,7 @@ export declare const getServiceStatus: <ThrowOnError extends boolean = false>(op
|
|
|
102
102
|
* Get Current User
|
|
103
103
|
* Returns information about the currently authenticated user.
|
|
104
104
|
*/
|
|
105
|
-
export declare const getCurrentUser: <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserData, ThrowOnError>) => import("./client").RequestResult<GetCurrentUserResponses,
|
|
105
|
+
export declare const getCurrentUser: <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserData, ThrowOnError>) => import("./client").RequestResult<GetCurrentUserResponses, unknown, ThrowOnError, "fields">;
|
|
106
106
|
/**
|
|
107
107
|
* Update User Profile
|
|
108
108
|
* Update the current user's profile information.
|
|
@@ -128,7 +128,7 @@ export declare const updateUserPassword: <ThrowOnError extends boolean = false>(
|
|
|
128
128
|
* List API Keys
|
|
129
129
|
* Get all API keys for the current user.
|
|
130
130
|
*/
|
|
131
|
-
export declare const listUserApiKeys: <ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>) => import("./client").RequestResult<ListUserApiKeysResponses,
|
|
131
|
+
export declare const listUserApiKeys: <ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>) => import("./client").RequestResult<ListUserApiKeysResponses, unknown, ThrowOnError, "fields">;
|
|
132
132
|
/**
|
|
133
133
|
* Create API Key
|
|
134
134
|
* Create a new API key for the current user.
|
|
@@ -153,12 +153,12 @@ export declare const getUserLimits: <ThrowOnError extends boolean = false>(optio
|
|
|
153
153
|
* Get user usage statistics
|
|
154
154
|
* Retrieve current usage statistics and remaining limits for the authenticated user
|
|
155
155
|
*/
|
|
156
|
-
export declare const getUserUsage: <ThrowOnError extends boolean = false>(options?: Options<GetUserUsageData, ThrowOnError>) => import("./client").RequestResult<GetUserUsageResponses,
|
|
156
|
+
export declare const getUserUsage: <ThrowOnError extends boolean = false>(options?: Options<GetUserUsageData, ThrowOnError>) => import("./client").RequestResult<GetUserUsageResponses, unknown, ThrowOnError, "fields">;
|
|
157
157
|
/**
|
|
158
158
|
* Get all shared repository limits
|
|
159
159
|
* Get rate limit status for all shared repositories the user has access to.
|
|
160
160
|
*/
|
|
161
|
-
export declare const getAllSharedRepositoryLimits: <ThrowOnError extends boolean = false>(options?: Options<GetAllSharedRepositoryLimitsData, ThrowOnError>) => import("./client").RequestResult<GetAllSharedRepositoryLimitsResponses,
|
|
161
|
+
export declare const getAllSharedRepositoryLimits: <ThrowOnError extends boolean = false>(options?: Options<GetAllSharedRepositoryLimitsData, ThrowOnError>) => import("./client").RequestResult<GetAllSharedRepositoryLimitsResponses, unknown, ThrowOnError, "fields">;
|
|
162
162
|
/**
|
|
163
163
|
* Get shared repository rate limit status
|
|
164
164
|
* Get current rate limit status and usage for a shared repository.
|
|
@@ -176,7 +176,7 @@ export declare const getSharedRepositoryLimits: <ThrowOnError extends boolean =
|
|
|
176
176
|
* Get User Usage Overview
|
|
177
177
|
* Get a high-level overview of usage statistics for the current user.
|
|
178
178
|
*/
|
|
179
|
-
export declare const getUserUsageOverview: <ThrowOnError extends boolean = false>(options?: Options<GetUserUsageOverviewData, ThrowOnError>) => import("./client").RequestResult<GetUserUsageOverviewResponses,
|
|
179
|
+
export declare const getUserUsageOverview: <ThrowOnError extends boolean = false>(options?: Options<GetUserUsageOverviewData, ThrowOnError>) => import("./client").RequestResult<GetUserUsageOverviewResponses, unknown, ThrowOnError, "fields">;
|
|
180
180
|
/**
|
|
181
181
|
* Get Detailed User Analytics
|
|
182
182
|
* Get comprehensive analytics for the current user including API usage and recent activity.
|
|
@@ -512,9 +512,8 @@ export declare const recommendAgent: <ThrowOnError extends boolean = false>(opti
|
|
|
512
512
|
* - User permissions and subscription tier
|
|
513
513
|
* - Backend capabilities (Kuzu, Neo4j, etc.)
|
|
514
514
|
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
* - Tool execution costs vary by operation complexity
|
|
515
|
+
* **Note:**
|
|
516
|
+
* MCP tool listing is included - no credit consumption required.
|
|
518
517
|
*/
|
|
519
518
|
export declare const listMcpTools: <ThrowOnError extends boolean = false>(options: Options<ListMcpToolsData, ThrowOnError>) => import("./client").RequestResult<ListMcpToolsResponses, ListMcpToolsErrors, ThrowOnError, "fields">;
|
|
520
519
|
/**
|
|
@@ -551,8 +550,11 @@ export declare const listMcpTools: <ThrowOnError extends boolean = false>(option
|
|
|
551
550
|
* - `408 Request Timeout`: Tool execution exceeded timeout
|
|
552
551
|
* - Clients should implement exponential backoff on errors
|
|
553
552
|
*
|
|
554
|
-
* **
|
|
555
|
-
* MCP tool
|
|
553
|
+
* **Credit Model:**
|
|
554
|
+
* MCP tool execution is included - no credit consumption required. Database
|
|
555
|
+
* operations (queries, schema inspection, analytics) are completely free.
|
|
556
|
+
* Only AI operations that invoke Claude or other LLM APIs consume credits,
|
|
557
|
+
* which happens at the AI agent layer, not the MCP tool layer.
|
|
556
558
|
*/
|
|
557
559
|
export declare const callMcpTool: <ThrowOnError extends boolean = false>(options: Options<CallMcpToolData, ThrowOnError>) => import("./client").RequestResult<CallMcpToolResponses, CallMcpToolErrors, ThrowOnError, "fields">;
|
|
558
560
|
/**
|
|
@@ -719,6 +721,13 @@ export declare const getGraphUsageStats: <ThrowOnError extends boolean = false>(
|
|
|
719
721
|
* 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files`
|
|
720
722
|
* 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest`
|
|
721
723
|
*
|
|
724
|
+
* **Security Best Practice - Use Parameterized Queries:**
|
|
725
|
+
* ALWAYS use query parameters instead of string interpolation to prevent injection attacks:
|
|
726
|
+
* - ✅ SAFE: `MATCH (n:Entity {type: $entity_type}) RETURN n` with `parameters: {"entity_type": "Company"}`
|
|
727
|
+
* - ❌ UNSAFE: `MATCH (n:Entity {type: "Company"}) RETURN n` with user input concatenated into query string
|
|
728
|
+
*
|
|
729
|
+
* Query parameters provide automatic escaping and type safety. All examples in this API use parameterized queries.
|
|
730
|
+
*
|
|
722
731
|
* This endpoint automatically selects the best execution strategy based on:
|
|
723
732
|
* - Query characteristics (size, complexity)
|
|
724
733
|
* - Client capabilities (SSE, NDJSON, JSON)
|
|
@@ -770,20 +779,91 @@ export declare const executeCypherQuery: <ThrowOnError extends boolean = false>(
|
|
|
770
779
|
* Get Runtime Graph Schema
|
|
771
780
|
* Get runtime schema information for the specified graph database.
|
|
772
781
|
*
|
|
773
|
-
*
|
|
782
|
+
* ## What This Returns
|
|
783
|
+
*
|
|
784
|
+
* This endpoint inspects the **actual current state** of the graph database and returns:
|
|
774
785
|
* - **Node Labels**: All node types currently in the database
|
|
775
786
|
* - **Relationship Types**: All relationship types currently in the database
|
|
776
|
-
* - **Node Properties**: Properties
|
|
787
|
+
* - **Node Properties**: Properties discovered from actual data (up to 10 properties per node type)
|
|
788
|
+
*
|
|
789
|
+
* ## Runtime vs Declared Schema
|
|
777
790
|
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
791
|
+
* **Use this endpoint** (`/schema`) when you need to know:
|
|
792
|
+
* - What data is ACTUALLY in the database right now
|
|
793
|
+
* - What properties exist on real nodes
|
|
794
|
+
* - What relationships have been created
|
|
795
|
+
* - Current database structure for querying
|
|
796
|
+
*
|
|
797
|
+
* **Use `/schema/export` instead** when you need:
|
|
798
|
+
* - The original schema definition used to create the graph
|
|
799
|
+
* - Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
800
|
+
* - Schema for documentation or version control
|
|
801
|
+
* - Schema to replicate in another graph
|
|
802
|
+
*
|
|
803
|
+
* ## Example Use Cases
|
|
804
|
+
*
|
|
805
|
+
* - **Building queries**: See what node labels and properties exist to write accurate Cypher
|
|
806
|
+
* - **Data exploration**: Discover what's in an unfamiliar graph
|
|
807
|
+
* - **Schema drift detection**: Compare runtime vs declared schema
|
|
808
|
+
* - **API integration**: Dynamically adapt to current graph structure
|
|
809
|
+
*
|
|
810
|
+
* ## Performance Note
|
|
811
|
+
*
|
|
812
|
+
* Property discovery is limited to 10 properties per node type for performance.
|
|
813
|
+
* For complete schema definitions, use `/schema/export`.
|
|
780
814
|
*
|
|
781
815
|
* This operation is included - no credit consumption required.
|
|
782
816
|
*/
|
|
783
817
|
export declare const getGraphSchema: <ThrowOnError extends boolean = false>(options: Options<GetGraphSchemaData, ThrowOnError>) => import("./client").RequestResult<GetGraphSchemaResponses, GetGraphSchemaErrors, ThrowOnError, "fields">;
|
|
784
818
|
/**
|
|
785
|
-
* Export Graph Schema
|
|
786
|
-
* Export the schema of an existing graph
|
|
819
|
+
* Export Declared Graph Schema
|
|
820
|
+
* Export the declared schema definition of an existing graph.
|
|
821
|
+
*
|
|
822
|
+
* ## What This Returns
|
|
823
|
+
*
|
|
824
|
+
* This endpoint returns the **original schema definition** that was used to create the graph:
|
|
825
|
+
* - The schema as it was **declared** during graph creation
|
|
826
|
+
* - Complete node and relationship definitions
|
|
827
|
+
* - Property types and constraints
|
|
828
|
+
* - Schema metadata (name, version, type)
|
|
829
|
+
*
|
|
830
|
+
* ## Runtime vs Declared Schema
|
|
831
|
+
*
|
|
832
|
+
* **Use this endpoint** (`/schema/export`) when you need:
|
|
833
|
+
* - The original schema definition used to create the graph
|
|
834
|
+
* - Schema in a specific format (JSON, YAML, Cypher DDL)
|
|
835
|
+
* - Schema for documentation or version control
|
|
836
|
+
* - Schema to replicate in another graph
|
|
837
|
+
*
|
|
838
|
+
* **Use `/schema` instead** when you need:
|
|
839
|
+
* - What data is ACTUALLY in the database right now
|
|
840
|
+
* - What properties exist on real nodes (discovered from data)
|
|
841
|
+
* - Current runtime database structure for querying
|
|
842
|
+
*
|
|
843
|
+
* ## Export Formats
|
|
844
|
+
*
|
|
845
|
+
* ### JSON Format (`format=json`)
|
|
846
|
+
* Returns structured JSON with nodes, relationships, and properties.
|
|
847
|
+
* Best for programmatic access and API integration.
|
|
848
|
+
*
|
|
849
|
+
* ### YAML Format (`format=yaml`)
|
|
850
|
+
* Returns human-readable YAML with comments.
|
|
851
|
+
* Best for documentation and configuration management.
|
|
852
|
+
*
|
|
853
|
+
* ### Cypher DDL Format (`format=cypher`)
|
|
854
|
+
* Returns Cypher CREATE statements for recreating the schema.
|
|
855
|
+
* Best for database migration and replication.
|
|
856
|
+
*
|
|
857
|
+
* ## Data Statistics
|
|
858
|
+
*
|
|
859
|
+
* Set `include_data_stats=true` to include:
|
|
860
|
+
* - Node counts by label
|
|
861
|
+
* - Relationship counts by type
|
|
862
|
+
* - Total nodes and relationships
|
|
863
|
+
*
|
|
864
|
+
* This combines declared schema with runtime statistics.
|
|
865
|
+
*
|
|
866
|
+
* This operation is included - no credit consumption required.
|
|
787
867
|
*/
|
|
788
868
|
export declare const exportGraphSchema: <ThrowOnError extends boolean = false>(options: Options<ExportGraphSchemaData, ThrowOnError>) => import("./client").RequestResult<ExportGraphSchemaResponses, ExportGraphSchemaErrors, ThrowOnError, "fields">;
|
|
789
869
|
/**
|
|
@@ -1118,12 +1198,11 @@ export declare const getSubgraphQuota: <ThrowOnError extends boolean = false>(op
|
|
|
1118
1198
|
* List Staging Tables
|
|
1119
1199
|
* List all DuckDB staging tables with comprehensive metrics and status.
|
|
1120
1200
|
*
|
|
1121
|
-
* **Purpose:**
|
|
1122
1201
|
* Get a complete inventory of all staging tables for a graph, including
|
|
1123
1202
|
* file counts, storage sizes, and row estimates. Essential for monitoring
|
|
1124
1203
|
* the data pipeline and determining which tables are ready for ingestion.
|
|
1125
1204
|
*
|
|
1126
|
-
* **
|
|
1205
|
+
* **Returned Metrics:**
|
|
1127
1206
|
* - Table name and type (node/relationship)
|
|
1128
1207
|
* - File count per table
|
|
1129
1208
|
* - Total storage size in bytes
|
|
@@ -1145,50 +1224,18 @@ export declare const getSubgraphQuota: <ThrowOnError extends boolean = false>(op
|
|
|
1145
1224
|
* 4. Check file counts and sizes
|
|
1146
1225
|
* 5. Ingest when ready
|
|
1147
1226
|
*
|
|
1148
|
-
* **
|
|
1149
|
-
* ```json
|
|
1150
|
-
* {
|
|
1151
|
-
* "tables": [
|
|
1152
|
-
* {
|
|
1153
|
-
* "table_name": "Entity",
|
|
1154
|
-
* "row_count": 5000,
|
|
1155
|
-
* "file_count": 3,
|
|
1156
|
-
* "total_size_bytes": 2457600,
|
|
1157
|
-
* "s3_location": "s3://bucket/user-staging/user123/graph456/Entity***.parquet"
|
|
1158
|
-
* },
|
|
1159
|
-
* {
|
|
1160
|
-
* "table_name": "Transaction",
|
|
1161
|
-
* "row_count": 15000,
|
|
1162
|
-
* "file_count": 5,
|
|
1163
|
-
* "total_size_bytes": 8192000,
|
|
1164
|
-
* "s3_location": "s3://bucket/user-staging/user123/graph456/Transaction***.parquet"
|
|
1165
|
-
* }
|
|
1166
|
-
* ],
|
|
1167
|
-
* "total_count": 2
|
|
1168
|
-
* }
|
|
1169
|
-
* ```
|
|
1170
|
-
*
|
|
1171
|
-
* **Example Usage:**
|
|
1172
|
-
* ```bash
|
|
1173
|
-
* curl -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1174
|
-
* https://api.robosystems.ai/v1/graphs/kg123/tables
|
|
1175
|
-
* ```
|
|
1176
|
-
*
|
|
1177
|
-
* **Tips:**
|
|
1227
|
+
* **Important Notes:**
|
|
1178
1228
|
* - Tables with `file_count > 0` have data ready
|
|
1179
1229
|
* - Check `total_size_bytes` for storage monitoring
|
|
1180
1230
|
* - Use `s3_location` to verify upload paths
|
|
1181
1231
|
* - Empty tables (file_count=0) are skipped during ingestion
|
|
1182
|
-
*
|
|
1183
|
-
* **Note:**
|
|
1184
|
-
* Table queries are included - no credit consumption.
|
|
1232
|
+
* - Table queries are included - no credit consumption
|
|
1185
1233
|
*/
|
|
1186
1234
|
export declare const listTables: <ThrowOnError extends boolean = false>(options: Options<ListTablesData, ThrowOnError>) => import("./client").RequestResult<ListTablesResponses, ListTablesErrors, ThrowOnError, "fields">;
|
|
1187
1235
|
/**
|
|
1188
1236
|
* List Files in Staging Table
|
|
1189
1237
|
* List all files uploaded to a staging table with comprehensive metadata.
|
|
1190
1238
|
*
|
|
1191
|
-
* **Purpose:**
|
|
1192
1239
|
* Get a complete inventory of all files in a staging table, including upload status,
|
|
1193
1240
|
* file sizes, row counts, and S3 locations. Essential for monitoring upload progress
|
|
1194
1241
|
* and validating data before ingestion.
|
|
@@ -1201,73 +1248,39 @@ export declare const listTables: <ThrowOnError extends boolean = false>(options:
|
|
|
1201
1248
|
* - Identify failed or incomplete uploads
|
|
1202
1249
|
* - Pre-ingestion validation
|
|
1203
1250
|
*
|
|
1204
|
-
* **
|
|
1205
|
-
* - File ID and
|
|
1206
|
-
* -
|
|
1207
|
-
* - Size in bytes
|
|
1208
|
-
* - Row count (if available)
|
|
1251
|
+
* **Returned Metadata:**
|
|
1252
|
+
* - File ID, name, and format (parquet, csv, json)
|
|
1253
|
+
* - Size in bytes and row count (if available)
|
|
1209
1254
|
* - Upload status and method
|
|
1210
1255
|
* - Creation and upload timestamps
|
|
1211
1256
|
* - S3 key for reference
|
|
1212
1257
|
*
|
|
1213
1258
|
* **Upload Status Values:**
|
|
1214
|
-
* - `
|
|
1215
|
-
* - `uploading`: Upload in progress
|
|
1259
|
+
* - `pending`: Upload URL generated, awaiting upload
|
|
1216
1260
|
* - `uploaded`: Successfully uploaded, ready for ingestion
|
|
1261
|
+
* - `disabled`: Excluded from ingestion
|
|
1262
|
+
* - `archived`: Soft deleted
|
|
1217
1263
|
* - `failed`: Upload failed
|
|
1218
1264
|
*
|
|
1219
|
-
* **
|
|
1220
|
-
* ```json
|
|
1221
|
-
* {
|
|
1222
|
-
* "graph_id": "kg123",
|
|
1223
|
-
* "table_name": "Entity",
|
|
1224
|
-
* "files": [
|
|
1225
|
-
* {
|
|
1226
|
-
* "file_id": "f123",
|
|
1227
|
-
* "file_name": "entities_batch1.parquet",
|
|
1228
|
-
* "file_format": "parquet",
|
|
1229
|
-
* "size_bytes": 1048576,
|
|
1230
|
-
* "row_count": 5000,
|
|
1231
|
-
* "upload_status": "uploaded",
|
|
1232
|
-
* "upload_method": "presigned_url",
|
|
1233
|
-
* "created_at": "2025-10-28T10:00:00Z",
|
|
1234
|
-
* "uploaded_at": "2025-10-28T10:01:30Z",
|
|
1235
|
-
* "s3_key": "user-staging/user123/kg123/Entity/entities_batch1.parquet"
|
|
1236
|
-
* }
|
|
1237
|
-
* ],
|
|
1238
|
-
* "total_files": 1,
|
|
1239
|
-
* "total_size_bytes": 1048576
|
|
1240
|
-
* }
|
|
1241
|
-
* ```
|
|
1242
|
-
*
|
|
1243
|
-
* **Example Usage:**
|
|
1244
|
-
* ```bash
|
|
1245
|
-
* curl -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1246
|
-
* https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files
|
|
1247
|
-
* ```
|
|
1248
|
-
*
|
|
1249
|
-
* **Tips:**
|
|
1265
|
+
* **Important Notes:**
|
|
1250
1266
|
* - Only `uploaded` files are ingested
|
|
1251
1267
|
* - Check `row_count` to estimate data volume
|
|
1252
1268
|
* - Use `total_size_bytes` for storage monitoring
|
|
1253
1269
|
* - Files with `failed` status should be deleted and re-uploaded
|
|
1254
|
-
*
|
|
1255
|
-
* **Note:**
|
|
1256
|
-
* File listing is included - no credit consumption.
|
|
1270
|
+
* - File listing is included - no credit consumption
|
|
1257
1271
|
*/
|
|
1258
1272
|
export declare const listTableFiles: <ThrowOnError extends boolean = false>(options: Options<ListTableFilesData, ThrowOnError>) => import("./client").RequestResult<ListTableFilesResponses, ListTableFilesErrors, ThrowOnError, "fields">;
|
|
1259
1273
|
/**
|
|
1260
1274
|
* Get File Upload URL
|
|
1261
1275
|
* Generate a presigned S3 URL for secure file upload.
|
|
1262
1276
|
*
|
|
1263
|
-
*
|
|
1264
|
-
* Initiate file upload to a staging table by generating a secure, time-limited
|
|
1277
|
+
* Initiates file upload to a staging table by generating a secure, time-limited
|
|
1265
1278
|
* presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
|
|
1266
1279
|
* optimal performance.
|
|
1267
1280
|
*
|
|
1268
1281
|
* **Upload Workflow:**
|
|
1269
1282
|
* 1. Call this endpoint to get presigned URL
|
|
1270
|
-
* 2. PUT file directly to S3 URL
|
|
1283
|
+
* 2. PUT file directly to S3 URL
|
|
1271
1284
|
* 3. Call PATCH /tables/files/{file_id} with status='uploaded'
|
|
1272
1285
|
* 4. Backend validates file and calculates metrics
|
|
1273
1286
|
* 5. File ready for ingestion
|
|
@@ -1284,59 +1297,20 @@ export declare const listTableFiles: <ThrowOnError extends boolean = false>(opti
|
|
|
1284
1297
|
* - Auto-creates table if it doesn't exist
|
|
1285
1298
|
*
|
|
1286
1299
|
* **Auto-Table Creation:**
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
* - Empty schema (populated on ingestion)
|
|
1290
|
-
* - Ready for file uploads
|
|
1291
|
-
*
|
|
1292
|
-
* **Example Response:**
|
|
1293
|
-
* ```json
|
|
1294
|
-
* {
|
|
1295
|
-
* "upload_url": "https://bucket.s3.amazonaws.com/path?X-Amz-Algorithm=...",
|
|
1296
|
-
* "expires_in": 3600,
|
|
1297
|
-
* "file_id": "f123-456-789",
|
|
1298
|
-
* "s3_key": "user-staging/user123/kg456/Entity/f123.../data.parquet"
|
|
1299
|
-
* }
|
|
1300
|
-
* ```
|
|
1301
|
-
*
|
|
1302
|
-
* **Example Usage:**
|
|
1303
|
-
* ```bash
|
|
1304
|
-
* # Step 1: Get upload URL
|
|
1305
|
-
* curl -X POST "https://api.robosystems.ai/v1/graphs/kg123/tables/Entity/files" \
|
|
1306
|
-
* -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1307
|
-
* -H "Content-Type: application/json" \
|
|
1308
|
-
* -d '{
|
|
1309
|
-
* "file_name": "entities.parquet",
|
|
1310
|
-
* "content_type": "application/x-parquet"
|
|
1311
|
-
* }'
|
|
1312
|
-
*
|
|
1313
|
-
* # Step 2: Upload file directly to S3
|
|
1314
|
-
* curl -X PUT "$UPLOAD_URL" \
|
|
1315
|
-
* -H "Content-Type: application/x-parquet" \
|
|
1316
|
-
* --data-binary "@entities.parquet"
|
|
1317
|
-
*
|
|
1318
|
-
* # Step 3: Mark as uploaded
|
|
1319
|
-
* curl -X PATCH "https://api.robosystems.ai/v1/graphs/kg123/tables/files/$FILE_ID" \
|
|
1320
|
-
* -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1321
|
-
* -H "Content-Type: application/json" \
|
|
1322
|
-
* -d '{"status": "uploaded"}'
|
|
1323
|
-
* ```
|
|
1300
|
+
* Tables are automatically created on first file upload with type inferred from name
|
|
1301
|
+
* (e.g., "Transaction" → relationship) and empty schema populated during ingestion.
|
|
1324
1302
|
*
|
|
1325
|
-
* **
|
|
1303
|
+
* **Important Notes:**
|
|
1326
1304
|
* - Presigned URLs expire (default: 1 hour)
|
|
1327
1305
|
* - Use appropriate Content-Type header when uploading to S3
|
|
1328
1306
|
* - File extension must match content type
|
|
1329
|
-
* -
|
|
1330
|
-
*
|
|
1331
|
-
* **Note:**
|
|
1332
|
-
* Upload URL generation is included - no credit consumption.
|
|
1307
|
+
* - Upload URL generation is included - no credit consumption
|
|
1333
1308
|
*/
|
|
1334
1309
|
export declare const getUploadUrl: <ThrowOnError extends boolean = false>(options: Options<GetUploadUrlData, ThrowOnError>) => import("./client").RequestResult<GetUploadUrlResponses, GetUploadUrlErrors, ThrowOnError, "fields">;
|
|
1335
1310
|
/**
|
|
1336
1311
|
* Delete File from Staging
|
|
1337
1312
|
* Delete a file from S3 storage and database tracking.
|
|
1338
1313
|
*
|
|
1339
|
-
* **Purpose:**
|
|
1340
1314
|
* Remove unwanted, duplicate, or incorrect files from staging tables before ingestion.
|
|
1341
1315
|
* The file is deleted from both S3 and database tracking, and table statistics
|
|
1342
1316
|
* are automatically recalculated.
|
|
@@ -1360,37 +1334,18 @@ export declare const getUploadUrl: <ThrowOnError extends boolean = false>(option
|
|
|
1360
1334
|
* - Full audit trail of deletion operations
|
|
1361
1335
|
* - Cannot delete after ingestion to graph
|
|
1362
1336
|
*
|
|
1363
|
-
* **
|
|
1364
|
-
* ```json
|
|
1365
|
-
* {
|
|
1366
|
-
* "status": "deleted",
|
|
1367
|
-
* "file_id": "f123",
|
|
1368
|
-
* "file_name": "entities_batch1.parquet",
|
|
1369
|
-
* "message": "File deleted successfully. DuckDB will automatically exclude it from queries."
|
|
1370
|
-
* }
|
|
1371
|
-
* ```
|
|
1372
|
-
*
|
|
1373
|
-
* **Example Usage:**
|
|
1374
|
-
* ```bash
|
|
1375
|
-
* curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1376
|
-
* https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
1377
|
-
* ```
|
|
1378
|
-
*
|
|
1379
|
-
* **Tips:**
|
|
1337
|
+
* **Important Notes:**
|
|
1380
1338
|
* - Delete files before ingestion for best results
|
|
1381
1339
|
* - Table statistics update automatically
|
|
1382
1340
|
* - No need to refresh DuckDB - exclusion is automatic
|
|
1383
1341
|
* - Consider re-uploading corrected version after deletion
|
|
1384
|
-
*
|
|
1385
|
-
* **Note:**
|
|
1386
|
-
* File deletion is included - no credit consumption.
|
|
1342
|
+
* - File deletion is included - no credit consumption
|
|
1387
1343
|
*/
|
|
1388
1344
|
export declare const deleteFile: <ThrowOnError extends boolean = false>(options: Options<DeleteFileData, ThrowOnError>) => import("./client").RequestResult<DeleteFileResponses, DeleteFileErrors, ThrowOnError, "fields">;
|
|
1389
1345
|
/**
|
|
1390
1346
|
* Get File Information
|
|
1391
1347
|
* Get detailed information about a specific file.
|
|
1392
1348
|
*
|
|
1393
|
-
* **Purpose:**
|
|
1394
1349
|
* Retrieve comprehensive metadata for a single file, including upload status,
|
|
1395
1350
|
* size, row count, and timestamps. Useful for validating individual files
|
|
1396
1351
|
* before ingestion.
|
|
@@ -1402,41 +1357,15 @@ export declare const deleteFile: <ThrowOnError extends boolean = false>(options:
|
|
|
1402
1357
|
* - Verify file format and size
|
|
1403
1358
|
* - Track file lifecycle
|
|
1404
1359
|
*
|
|
1405
|
-
* **Example Response:**
|
|
1406
|
-
* ```json
|
|
1407
|
-
* {
|
|
1408
|
-
* "file_id": "f123",
|
|
1409
|
-
* "graph_id": "kg123",
|
|
1410
|
-
* "table_id": "t456",
|
|
1411
|
-
* "table_name": "Entity",
|
|
1412
|
-
* "file_name": "entities_batch1.parquet",
|
|
1413
|
-
* "file_format": "parquet",
|
|
1414
|
-
* "size_bytes": 1048576,
|
|
1415
|
-
* "row_count": 5000,
|
|
1416
|
-
* "upload_status": "uploaded",
|
|
1417
|
-
* "upload_method": "presigned_url",
|
|
1418
|
-
* "created_at": "2025-10-28T10:00:00Z",
|
|
1419
|
-
* "uploaded_at": "2025-10-28T10:01:30Z",
|
|
1420
|
-
* "s3_key": "user-staging/user123/kg123/Entity/entities_batch1.parquet"
|
|
1421
|
-
* }
|
|
1422
|
-
* ```
|
|
1423
|
-
*
|
|
1424
|
-
* **Example Usage:**
|
|
1425
|
-
* ```bash
|
|
1426
|
-
* curl -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1427
|
-
* https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123
|
|
1428
|
-
* ```
|
|
1429
|
-
*
|
|
1430
1360
|
* **Note:**
|
|
1431
|
-
* File info retrieval is included - no credit consumption
|
|
1361
|
+
* File info retrieval is included - no credit consumption
|
|
1432
1362
|
*/
|
|
1433
1363
|
export declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => import("./client").RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
|
|
1434
1364
|
/**
|
|
1435
1365
|
* Update File Upload Status
|
|
1436
1366
|
* Update file status after upload completes.
|
|
1437
1367
|
*
|
|
1438
|
-
*
|
|
1439
|
-
* Mark files as uploaded after successful S3 upload. The backend validates
|
|
1368
|
+
* Marks files as uploaded after successful S3 upload. The backend validates
|
|
1440
1369
|
* the file, calculates size and row count, enforces storage limits, and
|
|
1441
1370
|
* registers the DuckDB table for queries.
|
|
1442
1371
|
*
|
|
@@ -1461,47 +1390,21 @@ export declare const getFileInfo: <ThrowOnError extends boolean = false>(options
|
|
|
1461
1390
|
* - **Fallback**: Estimate from file size if reading fails
|
|
1462
1391
|
*
|
|
1463
1392
|
* **Storage Limits:**
|
|
1464
|
-
* Enforced per subscription tier
|
|
1465
|
-
*
|
|
1466
|
-
* - Returns HTTP 413 if limit exceeded
|
|
1467
|
-
* - Check current usage before large uploads
|
|
1468
|
-
*
|
|
1469
|
-
* **Example Response:**
|
|
1470
|
-
* ```json
|
|
1471
|
-
* {
|
|
1472
|
-
* "status": "success",
|
|
1473
|
-
* "file_id": "f123",
|
|
1474
|
-
* "upload_status": "uploaded",
|
|
1475
|
-
* "file_size_bytes": 1048576,
|
|
1476
|
-
* "row_count": 5000,
|
|
1477
|
-
* "message": "File validated and ready for ingestion"
|
|
1478
|
-
* }
|
|
1479
|
-
* ```
|
|
1480
|
-
*
|
|
1481
|
-
* **Example Usage:**
|
|
1482
|
-
* ```bash
|
|
1483
|
-
* # After uploading file to S3 presigned URL
|
|
1484
|
-
* curl -X PATCH "https://api.robosystems.ai/v1/graphs/kg123/tables/files/f123" \
|
|
1485
|
-
* -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1486
|
-
* -H "Content-Type: application/json" \
|
|
1487
|
-
* -d '{"status": "uploaded"}'
|
|
1488
|
-
* ```
|
|
1393
|
+
* Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
1394
|
+
* Check current usage before large uploads.
|
|
1489
1395
|
*
|
|
1490
|
-
* **
|
|
1396
|
+
* **Important Notes:**
|
|
1491
1397
|
* - Always call this after S3 upload completes
|
|
1492
1398
|
* - Check response for actual row count
|
|
1493
1399
|
* - Storage limit errors (413) mean tier upgrade needed
|
|
1494
1400
|
* - DuckDB registration failures are non-fatal (retried later)
|
|
1495
|
-
*
|
|
1496
|
-
* **Note:**
|
|
1497
|
-
* Status updates are included - no credit consumption.
|
|
1401
|
+
* - Status updates are included - no credit consumption
|
|
1498
1402
|
*/
|
|
1499
1403
|
export declare const updateFileStatus: <ThrowOnError extends boolean = false>(options: Options<UpdateFileStatusData, ThrowOnError>) => import("./client").RequestResult<UpdateFileStatusResponses, UpdateFileStatusErrors, ThrowOnError, "fields">;
|
|
1500
1404
|
/**
|
|
1501
1405
|
* Ingest Tables to Graph
|
|
1502
1406
|
* Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
|
|
1503
1407
|
*
|
|
1504
|
-
* **Purpose:**
|
|
1505
1408
|
* Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
|
|
1506
1409
|
* Processes all tables in a single bulk operation with comprehensive error handling and metrics.
|
|
1507
1410
|
*
|
|
@@ -1542,65 +1445,35 @@ export declare const updateFileStatus: <ThrowOnError extends boolean = false>(op
|
|
|
1542
1445
|
* - Scales to thousands of files
|
|
1543
1446
|
* - Optimized for large datasets
|
|
1544
1447
|
*
|
|
1545
|
-
* **Example Request:**
|
|
1546
|
-
* ```bash
|
|
1547
|
-
* curl -X POST "https://api.robosystems.ai/v1/graphs/kg123/tables/ingest" \
|
|
1548
|
-
* -H "Authorization: Bearer YOUR_TOKEN" \
|
|
1549
|
-
* -H "Content-Type: application/json" \
|
|
1550
|
-
* -d '{
|
|
1551
|
-
* "ignore_errors": true,
|
|
1552
|
-
* "rebuild": false
|
|
1553
|
-
* }'
|
|
1554
|
-
* ```
|
|
1555
|
-
*
|
|
1556
|
-
* **Example Response:**
|
|
1557
|
-
* ```json
|
|
1558
|
-
* {
|
|
1559
|
-
* "status": "success",
|
|
1560
|
-
* "graph_id": "kg123",
|
|
1561
|
-
* "total_tables": 5,
|
|
1562
|
-
* "successful_tables": 5,
|
|
1563
|
-
* "failed_tables": 0,
|
|
1564
|
-
* "skipped_tables": 0,
|
|
1565
|
-
* "total_rows_ingested": 25000,
|
|
1566
|
-
* "total_execution_time_ms": 15420.5,
|
|
1567
|
-
* "results": [
|
|
1568
|
-
* {
|
|
1569
|
-
* "table_name": "Entity",
|
|
1570
|
-
* "status": "success",
|
|
1571
|
-
* "rows_ingested": 5000,
|
|
1572
|
-
* "execution_time_ms": 3200.1,
|
|
1573
|
-
* "error": null
|
|
1574
|
-
* }
|
|
1575
|
-
* ]
|
|
1576
|
-
* }
|
|
1577
|
-
* ```
|
|
1578
|
-
*
|
|
1579
1448
|
* **Concurrency Control:**
|
|
1580
1449
|
* Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
1581
1450
|
* you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
1582
1451
|
* the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
1583
1452
|
*
|
|
1584
|
-
* **
|
|
1453
|
+
* **Important Notes:**
|
|
1585
1454
|
* - Only files with 'uploaded' status are processed
|
|
1586
1455
|
* - Tables with no uploaded files are skipped
|
|
1587
1456
|
* - Use `ignore_errors=false` for strict validation
|
|
1588
1457
|
* - Monitor progress via per-table results
|
|
1589
1458
|
* - Check graph metadata for rebuild status
|
|
1590
1459
|
* - Wait for current ingestion to complete before starting another
|
|
1591
|
-
*
|
|
1592
|
-
* **Note:**
|
|
1593
|
-
* Table ingestion is included - no credit consumption.
|
|
1460
|
+
* - Table ingestion is included - no credit consumption
|
|
1594
1461
|
*/
|
|
1595
1462
|
export declare const ingestTables: <ThrowOnError extends boolean = false>(options: Options<IngestTablesData, ThrowOnError>) => import("./client").RequestResult<IngestTablesResponses, IngestTablesErrors, ThrowOnError, "fields">;
|
|
1596
1463
|
/**
|
|
1597
1464
|
* Query Staging Tables with SQL
|
|
1598
1465
|
* Execute SQL queries on DuckDB staging tables for data inspection and validation.
|
|
1599
1466
|
*
|
|
1600
|
-
* **Purpose:**
|
|
1601
1467
|
* Query raw staging data directly with SQL before ingestion into the graph database.
|
|
1602
1468
|
* Useful for data quality checks, validation, and exploratory analysis.
|
|
1603
1469
|
*
|
|
1470
|
+
* **Security Best Practice - Use Parameterized Queries:**
|
|
1471
|
+
* ALWAYS use query parameters instead of string concatenation to prevent SQL injection:
|
|
1472
|
+
* - ✅ SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1473
|
+
* - ❌ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated into SQL string
|
|
1474
|
+
*
|
|
1475
|
+
* Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters array.
|
|
1476
|
+
*
|
|
1604
1477
|
* **Use Cases:**
|
|
1605
1478
|
* - Validate data quality before graph ingestion
|
|
1606
1479
|
* - Inspect row-level data for debugging
|
|
@@ -1620,27 +1493,12 @@ export declare const ingestTables: <ThrowOnError extends boolean = false>(option
|
|
|
1620
1493
|
* - Aggregations, window functions, CTEs
|
|
1621
1494
|
* - Multiple table joins across staging area
|
|
1622
1495
|
*
|
|
1623
|
-
* **
|
|
1624
|
-
*
|
|
1625
|
-
*
|
|
1626
|
-
* SELECT
|
|
1627
|
-
*
|
|
1628
|
-
*
|
|
1629
|
-
* SELECT * FROM Entity WHERE name IS NULL LIMIT 10;
|
|
1630
|
-
*
|
|
1631
|
-
* -- Find duplicates
|
|
1632
|
-
* SELECT identifier, COUNT(*) as cnt
|
|
1633
|
-
* FROM Entity
|
|
1634
|
-
* GROUP BY identifier
|
|
1635
|
-
* HAVING COUNT(*) > 1;
|
|
1636
|
-
*
|
|
1637
|
-
* -- Join across tables
|
|
1638
|
-
* SELECT e.name, COUNT(t.id) as transaction_count
|
|
1639
|
-
* FROM Entity e
|
|
1640
|
-
* LEFT JOIN Transaction t ON e.identifier = t.entity_id
|
|
1641
|
-
* GROUP BY e.name
|
|
1642
|
-
* ORDER BY transaction_count DESC;
|
|
1643
|
-
* ```
|
|
1496
|
+
* **Common Operations:**
|
|
1497
|
+
* - Count rows: `SELECT COUNT(*) FROM Entity`
|
|
1498
|
+
* - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1499
|
+
* - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10`
|
|
1500
|
+
* - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING COUNT(*) > 1`
|
|
1501
|
+
* - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: [1000, "2024-01-01"]`
|
|
1644
1502
|
*
|
|
1645
1503
|
* **Limits:**
|
|
1646
1504
|
* - Query timeout: 30 seconds
|
|
@@ -1653,12 +1511,45 @@ export declare const ingestTables: <ThrowOnError extends boolean = false>(option
|
|
|
1653
1511
|
* Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
|
|
1654
1512
|
*
|
|
1655
1513
|
* **Note:**
|
|
1656
|
-
* Staging table queries are included - no credit consumption
|
|
1514
|
+
* Staging table queries are included - no credit consumption
|
|
1657
1515
|
*/
|
|
1658
1516
|
export declare const queryTables: <ThrowOnError extends boolean = false>(options: Options<QueryTablesData, ThrowOnError>) => import("./client").RequestResult<QueryTablesResponses, QueryTablesErrors, ThrowOnError, "fields">;
|
|
1659
1517
|
/**
|
|
1660
1518
|
* Get User Graphs
|
|
1661
|
-
*
|
|
1519
|
+
* List all graph databases accessible to the current user with roles and selection status.
|
|
1520
|
+
*
|
|
1521
|
+
* Returns a comprehensive list of all graphs the user can access, including their
|
|
1522
|
+
* role in each graph (admin or member) and which graph is currently selected as
|
|
1523
|
+
* the active workspace.
|
|
1524
|
+
*
|
|
1525
|
+
* **Returned Information:**
|
|
1526
|
+
* - Graph ID and display name for each accessible graph
|
|
1527
|
+
* - User's role (admin/member) indicating permission level
|
|
1528
|
+
* - Selection status (one graph can be marked as "selected")
|
|
1529
|
+
* - Creation timestamp for each graph
|
|
1530
|
+
*
|
|
1531
|
+
* **Graph Roles:**
|
|
1532
|
+
* - `admin`: Full access - can manage graph settings, invite users, delete graph
|
|
1533
|
+
* - `member`: Read/write access - can query and modify data, cannot manage settings
|
|
1534
|
+
*
|
|
1535
|
+
* **Selected Graph Concept:**
|
|
1536
|
+
* The "selected" graph is the user's currently active workspace. Many API operations
|
|
1537
|
+
* default to the selected graph if no graph_id is provided. Users can change their
|
|
1538
|
+
* selected graph via the `POST /v1/graphs/{graph_id}/select` endpoint.
|
|
1539
|
+
*
|
|
1540
|
+
* **Use Cases:**
|
|
1541
|
+
* - Display graph selector in UI
|
|
1542
|
+
* - Show user's accessible workspaces
|
|
1543
|
+
* - Identify which graph is currently active
|
|
1544
|
+
* - Filter graphs by role for permission-based features
|
|
1545
|
+
*
|
|
1546
|
+
* **Empty Response:**
|
|
1547
|
+
* New users or users without graph access will receive an empty list with
|
|
1548
|
+
* `selectedGraphId: null`. Users should create a new graph or request access
|
|
1549
|
+
* to an existing graph.
|
|
1550
|
+
*
|
|
1551
|
+
* **Note:**
|
|
1552
|
+
* Graph listing is included - no credit consumption required.
|
|
1662
1553
|
*/
|
|
1663
1554
|
export declare const getGraphs: <ThrowOnError extends boolean = false>(options?: Options<GetGraphsData, ThrowOnError>) => import("./client").RequestResult<GetGraphsResponses, GetGraphsErrors, ThrowOnError, "fields">;
|
|
1664
1555
|
/**
|
|
@@ -1707,12 +1598,67 @@ export declare const getGraphs: <ThrowOnError extends boolean = false>(options?:
|
|
|
1707
1598
|
export declare const createGraph: <ThrowOnError extends boolean = false>(options: Options<CreateGraphData, ThrowOnError>) => import("./client").RequestResult<CreateGraphResponses, CreateGraphErrors, ThrowOnError, "fields">;
|
|
1708
1599
|
/**
|
|
1709
1600
|
* Get Available Schema Extensions
|
|
1710
|
-
* List all available schema extensions for graph creation
|
|
1601
|
+
* List all available schema extensions for graph creation.
|
|
1602
|
+
*
|
|
1603
|
+
* Schema extensions provide pre-built industry-specific data models that extend
|
|
1604
|
+
* the base graph schema with specialized nodes, relationships, and properties.
|
|
1605
|
+
*
|
|
1606
|
+
* **Available Extensions:**
|
|
1607
|
+
* - **RoboLedger**: Complete accounting system with XBRL reporting, general ledger, and financial statements
|
|
1608
|
+
* - **RoboInvestor**: Investment portfolio management and tracking
|
|
1609
|
+
* - **RoboSCM**: Supply chain management and logistics
|
|
1610
|
+
* - **RoboFO**: Front office operations and CRM
|
|
1611
|
+
* - **RoboHRM**: Human resources management
|
|
1612
|
+
* - **RoboEPM**: Enterprise performance management
|
|
1613
|
+
* - **RoboReport**: Business intelligence and reporting
|
|
1614
|
+
*
|
|
1615
|
+
* **Extension Information:**
|
|
1616
|
+
* Each extension includes:
|
|
1617
|
+
* - Display name and description
|
|
1618
|
+
* - Node and relationship counts
|
|
1619
|
+
* - Context-aware capabilities (e.g., SEC repositories get different features than entity graphs)
|
|
1620
|
+
*
|
|
1621
|
+
* **Use Cases:**
|
|
1622
|
+
* - Browse available extensions before creating a graph
|
|
1623
|
+
* - Understand extension capabilities and data models
|
|
1624
|
+
* - Plan graph schema based on business requirements
|
|
1625
|
+
* - Combine multiple extensions for comprehensive data modeling
|
|
1626
|
+
*
|
|
1627
|
+
* **Note:**
|
|
1628
|
+
* Extension listing is included - no credit consumption required.
|
|
1711
1629
|
*/
|
|
1712
|
-
export declare const getAvailableExtensions: <ThrowOnError extends boolean = false>(options?: Options<GetAvailableExtensionsData, ThrowOnError>) => import("./client").RequestResult<GetAvailableExtensionsResponses,
|
|
1630
|
+
export declare const getAvailableExtensions: <ThrowOnError extends boolean = false>(options?: Options<GetAvailableExtensionsData, ThrowOnError>) => import("./client").RequestResult<GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, ThrowOnError, "fields">;
|
|
1713
1631
|
/**
|
|
1714
1632
|
* Select Graph
|
|
1715
|
-
* Select a specific graph as the active
|
|
1633
|
+
* Select a specific graph as the active workspace for the user.
|
|
1634
|
+
*
|
|
1635
|
+
* The selected graph becomes the default context for operations in client applications
|
|
1636
|
+
* and can be used to maintain user workspace preferences across sessions.
|
|
1637
|
+
*
|
|
1638
|
+
* **Functionality:**
|
|
1639
|
+
* - Sets the specified graph as the user's currently selected graph
|
|
1640
|
+
* - Deselects any previously selected graph (only one can be selected at a time)
|
|
1641
|
+
* - Persists selection across sessions until changed
|
|
1642
|
+
* - Returns confirmation with the selected graph ID
|
|
1643
|
+
*
|
|
1644
|
+
* **Requirements:**
|
|
1645
|
+
* - User must have access to the graph (as admin or member)
|
|
1646
|
+
* - Graph must exist and not be deleted
|
|
1647
|
+
* - User can only select graphs they have permission to access
|
|
1648
|
+
*
|
|
1649
|
+
* **Use Cases:**
|
|
1650
|
+
* - Switch between multiple graphs in a multi-graph environment
|
|
1651
|
+
* - Set default workspace after creating a new graph
|
|
1652
|
+
* - Restore user's preferred workspace on login
|
|
1653
|
+
* - Support graph context switching in client applications
|
|
1654
|
+
*
|
|
1655
|
+
* **Client Integration:**
|
|
1656
|
+
* Many client operations can default to the selected graph, simplifying API calls
|
|
1657
|
+
* by eliminating the need to specify graph_id repeatedly. Check the selected
|
|
1658
|
+
* graph with `GET /v1/graphs` which returns `selectedGraphId`.
|
|
1659
|
+
*
|
|
1660
|
+
* **Note:**
|
|
1661
|
+
* Graph selection is included - no credit consumption required.
|
|
1716
1662
|
*/
|
|
1717
1663
|
export declare const selectGraph: <ThrowOnError extends boolean = false>(options: Options<SelectGraphData, ThrowOnError>) => import("./client").RequestResult<SelectGraphResponses, SelectGraphErrors, ThrowOnError, "fields">;
|
|
1718
1664
|
/**
|