@robosystems/client 0.2.1 → 0.2.2

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.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, LogoutUserErrors, 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, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, 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, 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, ListTablesV1GraphsGraphIdTablesGetData, ListTablesV1GraphsGraphIdTablesGetResponses, ListTablesV1GraphsGraphIdTablesGetErrors, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetData, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponses, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetErrors, GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostData, GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostResponses, GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostErrors, DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteData, DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteResponses, DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteErrors, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetData, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponses, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetErrors, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchData, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponses, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchErrors, IngestTablesV1GraphsGraphIdTablesIngestPostData, IngestTablesV1GraphsGraphIdTablesIngestPostResponses, IngestTablesV1GraphsGraphIdTablesIngestPostErrors, QueryTablesV1GraphsGraphIdTablesQueryPostData, QueryTablesV1GraphsGraphIdTablesQueryPostResponses, QueryTablesV1GraphsGraphIdTablesQueryPostErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors } from './types.gen';
2
+ import type { RegisterUserData, RegisterUserResponses, RegisterUserErrors, LoginUserData, LoginUserResponses, LoginUserErrors, LogoutUserData, LogoutUserResponses, LogoutUserErrors, 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, GetCurrentUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, 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, 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, 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
@@ -1116,44 +1116,546 @@ export declare const getSubgraphInfo: <ThrowOnError extends boolean = false>(opt
1116
1116
  export declare const getSubgraphQuota: <ThrowOnError extends boolean = false>(options: Options<GetSubgraphQuotaData, ThrowOnError>) => import("./client").RequestResult<GetSubgraphQuotaResponses, GetSubgraphQuotaErrors, ThrowOnError, "fields">;
1117
1117
  /**
1118
1118
  * List Staging Tables
1119
- * List all DuckDB staging tables for a graph
1120
- */
1121
- export declare const listTablesV1GraphsGraphIdTablesGet: <ThrowOnError extends boolean = false>(options: Options<ListTablesV1GraphsGraphIdTablesGetData, ThrowOnError>) => import("./client").RequestResult<ListTablesV1GraphsGraphIdTablesGetResponses, ListTablesV1GraphsGraphIdTablesGetErrors, ThrowOnError, "fields">;
1122
- /**
1123
- * List Files in Table
1124
- * List all files uploaded to a staging table
1125
- */
1126
- export declare const listTableFilesV1GraphsGraphIdTablesTableNameFilesGet: <ThrowOnError extends boolean = false>(options: Options<ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetData, ThrowOnError>) => import("./client").RequestResult<ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetResponses, ListTableFilesV1GraphsGraphIdTablesTableNameFilesGetErrors, ThrowOnError, "fields">;
1127
- /**
1128
- * Create File Upload
1129
- * Create a new file upload for a table and get a presigned S3 URL
1119
+ * List all DuckDB staging tables with comprehensive metrics and status.
1120
+ *
1121
+ * **Purpose:**
1122
+ * Get a complete inventory of all staging tables for a graph, including
1123
+ * file counts, storage sizes, and row estimates. Essential for monitoring
1124
+ * the data pipeline and determining which tables are ready for ingestion.
1125
+ *
1126
+ * **What You Get:**
1127
+ * - Table name and type (node/relationship)
1128
+ * - File count per table
1129
+ * - Total storage size in bytes
1130
+ * - Estimated row count
1131
+ * - S3 location pattern
1132
+ * - Ready-for-ingestion status
1133
+ *
1134
+ * **Use Cases:**
1135
+ * - Monitor data upload progress
1136
+ * - Check which tables have files ready
1137
+ * - Track storage consumption
1138
+ * - Validate pipeline before ingestion
1139
+ * - Capacity planning
1140
+ *
1141
+ * **Workflow:**
1142
+ * 1. List tables to see current state
1143
+ * 2. Upload files to empty tables
1144
+ * 3. Re-list to verify uploads
1145
+ * 4. Check file counts and sizes
1146
+ * 5. Ingest when ready
1147
+ *
1148
+ * **Example Response:**
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:**
1178
+ * - Tables with `file_count > 0` have data ready
1179
+ * - Check `total_size_bytes` for storage monitoring
1180
+ * - Use `s3_location` to verify upload paths
1181
+ * - Empty tables (file_count=0) are skipped during ingestion
1182
+ *
1183
+ * **Note:**
1184
+ * Table queries are included - no credit consumption.
1130
1185
  */
1131
- export declare const getUploadUrlV1GraphsGraphIdTablesTableNameFilesPost: <ThrowOnError extends boolean = false>(options: Options<GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostData, ThrowOnError>) => import("./client").RequestResult<GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostResponses, GetUploadUrlV1GraphsGraphIdTablesTableNameFilesPostErrors, ThrowOnError, "fields">;
1186
+ export declare const listTables: <ThrowOnError extends boolean = false>(options: Options<ListTablesData, ThrowOnError>) => import("./client").RequestResult<ListTablesResponses, ListTablesErrors, ThrowOnError, "fields">;
1132
1187
  /**
1133
- * Delete File
1134
- * Delete a specific file from S3 and database tracking. DuckDB will automatically exclude it from queries.
1188
+ * List Files in Staging Table
1189
+ * List all files uploaded to a staging table with comprehensive metadata.
1190
+ *
1191
+ * **Purpose:**
1192
+ * Get a complete inventory of all files in a staging table, including upload status,
1193
+ * file sizes, row counts, and S3 locations. Essential for monitoring upload progress
1194
+ * and validating data before ingestion.
1195
+ *
1196
+ * **Use Cases:**
1197
+ * - Monitor file upload progress
1198
+ * - Verify files are ready for ingestion
1199
+ * - Check file formats and sizes
1200
+ * - Track storage usage per table
1201
+ * - Identify failed or incomplete uploads
1202
+ * - Pre-ingestion validation
1203
+ *
1204
+ * **What You Get:**
1205
+ * - File ID and name
1206
+ * - File format (parquet, csv, etc.)
1207
+ * - Size in bytes
1208
+ * - Row count (if available)
1209
+ * - Upload status and method
1210
+ * - Creation and upload timestamps
1211
+ * - S3 key for reference
1212
+ *
1213
+ * **Upload Status Values:**
1214
+ * - `created`: File record created, not yet uploaded
1215
+ * - `uploading`: Upload in progress
1216
+ * - `uploaded`: Successfully uploaded, ready for ingestion
1217
+ * - `failed`: Upload failed
1218
+ *
1219
+ * **Example Response:**
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:**
1250
+ * - Only `uploaded` files are ingested
1251
+ * - Check `row_count` to estimate data volume
1252
+ * - Use `total_size_bytes` for storage monitoring
1253
+ * - Files with `failed` status should be deleted and re-uploaded
1254
+ *
1255
+ * **Note:**
1256
+ * File listing is included - no credit consumption.
1257
+ */
1258
+ export declare const listTableFiles: <ThrowOnError extends boolean = false>(options: Options<ListTableFilesData, ThrowOnError>) => import("./client").RequestResult<ListTableFilesResponses, ListTableFilesErrors, ThrowOnError, "fields">;
1259
+ /**
1260
+ * Get File Upload URL
1261
+ * Generate a presigned S3 URL for secure file upload.
1262
+ *
1263
+ * **Purpose:**
1264
+ * Initiate file upload to a staging table by generating a secure, time-limited
1265
+ * presigned S3 URL. Files are uploaded directly to S3, bypassing the API for
1266
+ * optimal performance.
1267
+ *
1268
+ * **Upload Workflow:**
1269
+ * 1. Call this endpoint to get presigned URL
1270
+ * 2. PUT file directly to S3 URL (using curl, axios, etc.)
1271
+ * 3. Call PATCH /tables/files/{file_id} with status='uploaded'
1272
+ * 4. Backend validates file and calculates metrics
1273
+ * 5. File ready for ingestion
1274
+ *
1275
+ * **Supported Formats:**
1276
+ * - Parquet (`application/x-parquet` with `.parquet` extension)
1277
+ * - CSV (`text/csv` with `.csv` extension)
1278
+ * - JSON (`application/json` with `.json` extension)
1279
+ *
1280
+ * **Validation:**
1281
+ * - File extension must match content type
1282
+ * - File name 1-255 characters
1283
+ * - No path traversal characters (.. / \)
1284
+ * - Auto-creates table if it doesn't exist
1285
+ *
1286
+ * **Auto-Table Creation:**
1287
+ * If the table doesn't exist, it's automatically created with:
1288
+ * - Type inferred from name (e.g., "Transaction" → relationship)
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
+ * ```
1324
+ *
1325
+ * **Tips:**
1326
+ * - Presigned URLs expire (default: 1 hour)
1327
+ * - Use appropriate Content-Type header when uploading to S3
1328
+ * - File extension must match content type
1329
+ * - Large files benefit from direct S3 upload
1330
+ *
1331
+ * **Note:**
1332
+ * Upload URL generation is included - no credit consumption.
1135
1333
  */
1136
- export declare const deleteFileV1GraphsGraphIdTablesFilesFileIdDelete: <ThrowOnError extends boolean = false>(options: Options<DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteData, ThrowOnError>) => import("./client").RequestResult<DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteResponses, DeleteFileV1GraphsGraphIdTablesFilesFileIdDeleteErrors, ThrowOnError, "fields">;
1334
+ export declare const getUploadUrl: <ThrowOnError extends boolean = false>(options: Options<GetUploadUrlData, ThrowOnError>) => import("./client").RequestResult<GetUploadUrlResponses, GetUploadUrlErrors, ThrowOnError, "fields">;
1137
1335
  /**
1138
- * Get File Info
1139
- * Get detailed information about a specific file
1336
+ * Delete File from Staging
1337
+ * Delete a file from S3 storage and database tracking.
1338
+ *
1339
+ * **Purpose:**
1340
+ * Remove unwanted, duplicate, or incorrect files from staging tables before ingestion.
1341
+ * The file is deleted from both S3 and database tracking, and table statistics
1342
+ * are automatically recalculated.
1343
+ *
1344
+ * **Use Cases:**
1345
+ * - Remove duplicate uploads
1346
+ * - Delete files with incorrect data
1347
+ * - Clean up failed uploads
1348
+ * - Fix data quality issues before ingestion
1349
+ * - Manage storage usage
1350
+ *
1351
+ * **What Happens:**
1352
+ * 1. File deleted from S3 storage
1353
+ * 2. Database tracking record removed
1354
+ * 3. Table statistics recalculated (file count, size, row count)
1355
+ * 4. DuckDB automatically excludes file from future queries
1356
+ *
1357
+ * **Security:**
1358
+ * - Write access required (verified via auth)
1359
+ * - Shared repositories block file deletions
1360
+ * - Full audit trail of deletion operations
1361
+ * - Cannot delete after ingestion to graph
1362
+ *
1363
+ * **Example Response:**
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:**
1380
+ * - Delete files before ingestion for best results
1381
+ * - Table statistics update automatically
1382
+ * - No need to refresh DuckDB - exclusion is automatic
1383
+ * - Consider re-uploading corrected version after deletion
1384
+ *
1385
+ * **Note:**
1386
+ * File deletion is included - no credit consumption.
1140
1387
  */
1141
- export declare const getFileInfoV1GraphsGraphIdTablesFilesFileIdGet: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetData, ThrowOnError>) => import("./client").RequestResult<GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetResponses, GetFileInfoV1GraphsGraphIdTablesFilesFileIdGetErrors, ThrowOnError, "fields">;
1388
+ export declare const deleteFile: <ThrowOnError extends boolean = false>(options: Options<DeleteFileData, ThrowOnError>) => import("./client").RequestResult<DeleteFileResponses, DeleteFileErrors, ThrowOnError, "fields">;
1142
1389
  /**
1143
- * Update File
1144
- * Update file metadata after upload (size, row count). Marks file as completed.
1390
+ * Get File Information
1391
+ * Get detailed information about a specific file.
1392
+ *
1393
+ * **Purpose:**
1394
+ * Retrieve comprehensive metadata for a single file, including upload status,
1395
+ * size, row count, and timestamps. Useful for validating individual files
1396
+ * before ingestion.
1397
+ *
1398
+ * **Use Cases:**
1399
+ * - Validate file upload completion
1400
+ * - Check file metadata before ingestion
1401
+ * - Debug upload issues
1402
+ * - Verify file format and size
1403
+ * - Track file lifecycle
1404
+ *
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
+ * **Note:**
1431
+ * File info retrieval is included - no credit consumption.
1432
+ */
1433
+ export declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => import("./client").RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
1434
+ /**
1435
+ * Update File Upload Status
1436
+ * Update file status after upload completes.
1437
+ *
1438
+ * **Purpose:**
1439
+ * Mark files as uploaded after successful S3 upload. The backend validates
1440
+ * the file, calculates size and row count, enforces storage limits, and
1441
+ * registers the DuckDB table for queries.
1442
+ *
1443
+ * **Status Values:**
1444
+ * - `uploaded`: File successfully uploaded to S3 (triggers validation)
1445
+ * - `disabled`: Exclude file from ingestion
1446
+ * - `archived`: Soft delete file
1447
+ *
1448
+ * **What Happens on 'uploaded' Status:**
1449
+ * 1. Verify file exists in S3
1450
+ * 2. Calculate actual file size
1451
+ * 3. Enforce tier storage limits
1452
+ * 4. Calculate or estimate row count
1453
+ * 5. Update table statistics
1454
+ * 6. Register DuckDB external table
1455
+ * 7. File ready for ingestion
1456
+ *
1457
+ * **Row Count Calculation:**
1458
+ * - **Parquet**: Exact count from file metadata
1459
+ * - **CSV**: Count rows (minus header)
1460
+ * - **JSON**: Count array elements
1461
+ * - **Fallback**: Estimate from file size if reading fails
1462
+ *
1463
+ * **Storage Limits:**
1464
+ * Enforced per subscription tier:
1465
+ * - Prevents uploads exceeding tier limit
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
+ * ```
1489
+ *
1490
+ * **Tips:**
1491
+ * - Always call this after S3 upload completes
1492
+ * - Check response for actual row count
1493
+ * - Storage limit errors (413) mean tier upgrade needed
1494
+ * - DuckDB registration failures are non-fatal (retried later)
1495
+ *
1496
+ * **Note:**
1497
+ * Status updates are included - no credit consumption.
1145
1498
  */
1146
- export declare const updateFileV1GraphsGraphIdTablesFilesFileIdPatch: <ThrowOnError extends boolean = false>(options: Options<UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchData, ThrowOnError>) => import("./client").RequestResult<UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchResponses, UpdateFileV1GraphsGraphIdTablesFilesFileIdPatchErrors, ThrowOnError, "fields">;
1499
+ export declare const updateFileStatus: <ThrowOnError extends boolean = false>(options: Options<UpdateFileStatusData, ThrowOnError>) => import("./client").RequestResult<UpdateFileStatusResponses, UpdateFileStatusErrors, ThrowOnError, "fields">;
1147
1500
  /**
1148
1501
  * Ingest Tables to Graph
1149
- * Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database. Use rebuild=true to regenerate the entire graph from scratch (safe operation - S3 is source of truth).
1502
+ * Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
1503
+ *
1504
+ * **Purpose:**
1505
+ * Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
1506
+ * Processes all tables in a single bulk operation with comprehensive error handling and metrics.
1507
+ *
1508
+ * **Use Cases:**
1509
+ * - Initial graph population from uploaded data
1510
+ * - Incremental data updates with new files
1511
+ * - Complete database rebuild from source files
1512
+ * - Recovery from failed ingestion attempts
1513
+ *
1514
+ * **Workflow:**
1515
+ * 1. Upload data files via `POST /tables/{table_name}/files`
1516
+ * 2. Files are validated and marked as 'uploaded'
1517
+ * 3. Trigger ingestion: `POST /tables/ingest`
1518
+ * 4. DuckDB staging tables created from S3 patterns
1519
+ * 5. Data copied row-by-row from DuckDB to Kuzu
1520
+ * 6. Per-table results and metrics returned
1521
+ *
1522
+ * **Rebuild Feature:**
1523
+ * Setting `rebuild=true` regenerates the entire graph database from scratch:
1524
+ * - Deletes existing Kuzu database
1525
+ * - Recreates with fresh schema from active GraphSchema
1526
+ * - Ingests all data files
1527
+ * - Safe operation - S3 is source of truth
1528
+ * - Useful for schema changes or data corrections
1529
+ * - Graph marked as 'rebuilding' during process
1530
+ *
1531
+ * **Error Handling:**
1532
+ * - Per-table error isolation with `ignore_errors` flag
1533
+ * - Partial success support (some tables succeed, some fail)
1534
+ * - Detailed error reporting per table
1535
+ * - Graph status tracking throughout process
1536
+ * - Automatic failure recovery and cleanup
1537
+ *
1538
+ * **Performance:**
1539
+ * - Processes all tables in sequence
1540
+ * - Each table timed independently
1541
+ * - Total execution metrics provided
1542
+ * - Scales to thousands of files
1543
+ * - Optimized for large datasets
1544
+ *
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
+ * **Concurrency Control:**
1580
+ * Only one ingestion can run per graph at a time. If another ingestion is in progress,
1581
+ * you'll receive a 409 Conflict error. The distributed lock automatically expires after
1582
+ * the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
1583
+ *
1584
+ * **Tips:**
1585
+ * - Only files with 'uploaded' status are processed
1586
+ * - Tables with no uploaded files are skipped
1587
+ * - Use `ignore_errors=false` for strict validation
1588
+ * - Monitor progress via per-table results
1589
+ * - Check graph metadata for rebuild status
1590
+ * - Wait for current ingestion to complete before starting another
1591
+ *
1592
+ * **Note:**
1593
+ * Table ingestion is included - no credit consumption.
1150
1594
  */
1151
- export declare const ingestTablesV1GraphsGraphIdTablesIngestPost: <ThrowOnError extends boolean = false>(options: Options<IngestTablesV1GraphsGraphIdTablesIngestPostData, ThrowOnError>) => import("./client").RequestResult<IngestTablesV1GraphsGraphIdTablesIngestPostResponses, IngestTablesV1GraphsGraphIdTablesIngestPostErrors, ThrowOnError, "fields">;
1595
+ export declare const ingestTables: <ThrowOnError extends boolean = false>(options: Options<IngestTablesData, ThrowOnError>) => import("./client").RequestResult<IngestTablesResponses, IngestTablesErrors, ThrowOnError, "fields">;
1152
1596
  /**
1153
1597
  * Query Staging Tables with SQL
1154
- * Execute SQL queries on DuckDB staging tables
1598
+ * Execute SQL queries on DuckDB staging tables for data inspection and validation.
1599
+ *
1600
+ * **Purpose:**
1601
+ * Query raw staging data directly with SQL before ingestion into the graph database.
1602
+ * Useful for data quality checks, validation, and exploratory analysis.
1603
+ *
1604
+ * **Use Cases:**
1605
+ * - Validate data quality before graph ingestion
1606
+ * - Inspect row-level data for debugging
1607
+ * - Run analytics on staging tables
1608
+ * - Check for duplicates, nulls, or data issues
1609
+ * - Preview data transformations
1610
+ *
1611
+ * **Workflow:**
1612
+ * 1. Upload data files via `POST /tables/{table_name}/files`
1613
+ * 2. Query staging tables to validate: `POST /tables/query`
1614
+ * 3. Fix any data issues by re-uploading
1615
+ * 4. Ingest validated data: `POST /tables/ingest`
1616
+ *
1617
+ * **Supported SQL:**
1618
+ * - Full DuckDB SQL syntax
1619
+ * - SELECT, JOIN, WHERE, GROUP BY, ORDER BY
1620
+ * - Aggregations, window functions, CTEs
1621
+ * - Multiple table joins across staging area
1622
+ *
1623
+ * **Example Queries:**
1624
+ * ```sql
1625
+ * -- Count rows in staging table
1626
+ * SELECT COUNT(*) FROM Entity;
1627
+ *
1628
+ * -- Check for nulls
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
+ * ```
1644
+ *
1645
+ * **Limits:**
1646
+ * - Query timeout: 30 seconds
1647
+ * - Result limit: 10,000 rows (use LIMIT clause)
1648
+ * - Read-only: No INSERT, UPDATE, DELETE
1649
+ * - User's tables only: Cannot query other users' data
1650
+ *
1651
+ * **Shared Repositories:**
1652
+ * Shared repositories (SEC, etc.) do not allow direct SQL queries.
1653
+ * Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
1654
+ *
1655
+ * **Note:**
1656
+ * Staging table queries are included - no credit consumption.
1155
1657
  */
1156
- export declare const queryTablesV1GraphsGraphIdTablesQueryPost: <ThrowOnError extends boolean = false>(options: Options<QueryTablesV1GraphsGraphIdTablesQueryPostData, ThrowOnError>) => import("./client").RequestResult<QueryTablesV1GraphsGraphIdTablesQueryPostResponses, QueryTablesV1GraphsGraphIdTablesQueryPostErrors, ThrowOnError, "fields">;
1658
+ export declare const queryTables: <ThrowOnError extends boolean = false>(options: Options<QueryTablesData, ThrowOnError>) => import("./client").RequestResult<QueryTablesResponses, QueryTablesErrors, ThrowOnError, "fields">;
1157
1659
  /**
1158
1660
  * Get User Graphs
1159
1661
  * Get all graph databases accessible to the current user.