@robosystems/client 0.2.14 → 0.2.15
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/TableIngestClient.js +5 -4
- package/extensions/TableIngestClient.ts +8 -7
- package/package.json +1 -1
- package/sdk/sdk.gen.d.ts +324 -244
- package/sdk/sdk.gen.js +410 -274
- package/sdk/sdk.gen.ts +404 -268
- package/sdk/types.gen.d.ts +697 -239
- package/sdk/types.gen.ts +736 -253
- package/sdk-extensions/TableIngestClient.js +5 -4
- package/sdk-extensions/TableIngestClient.ts +8 -7
- package/sdk.gen.d.ts +324 -244
- package/sdk.gen.js +410 -274
- package/sdk.gen.ts +404 -268
- package/types.gen.d.ts +697 -239
- package/types.gen.ts +736 -253
package/sdk/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, 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, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ListUserOrgsData, ListUserOrgsResponses, CreateOrgData, CreateOrgResponses, CreateOrgErrors, GetOrgData, GetOrgResponses, GetOrgErrors, UpdateOrgData, UpdateOrgResponses, UpdateOrgErrors, ListOrgGraphsData, ListOrgGraphsResponses, ListOrgGraphsErrors, ListOrgMembersData, ListOrgMembersResponses, ListOrgMembersErrors, InviteOrgMemberData, InviteOrgMemberResponses, InviteOrgMemberErrors, RemoveOrgMemberData, RemoveOrgMemberResponses, RemoveOrgMemberErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, GetOrgLimitsData, GetOrgLimitsResponses, GetOrgLimitsErrors, GetOrgUsageData, GetOrgUsageResponses, GetOrgUsageErrors, 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, ListAgentsData, ListAgentsResponses, ListAgentsErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, 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, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, 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, GetGraphSubscriptionData, GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, CreateRepositorySubscriptionData, CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, UpgradeSubscriptionData, UpgradeSubscriptionResponses, UpgradeSubscriptionErrors, ListTablesData, ListTablesResponses, ListTablesErrors,
|
|
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, UpdateUserPasswordData, UpdateUserPasswordResponses, UpdateUserPasswordErrors, ListUserApiKeysData, ListUserApiKeysResponses, CreateUserApiKeyData, CreateUserApiKeyResponses, CreateUserApiKeyErrors, RevokeUserApiKeyData, RevokeUserApiKeyResponses, RevokeUserApiKeyErrors, UpdateUserApiKeyData, UpdateUserApiKeyResponses, UpdateUserApiKeyErrors, ListUserOrgsData, ListUserOrgsResponses, CreateOrgData, CreateOrgResponses, CreateOrgErrors, GetOrgData, GetOrgResponses, GetOrgErrors, UpdateOrgData, UpdateOrgResponses, UpdateOrgErrors, ListOrgGraphsData, ListOrgGraphsResponses, ListOrgGraphsErrors, ListOrgMembersData, ListOrgMembersResponses, ListOrgMembersErrors, InviteOrgMemberData, InviteOrgMemberResponses, InviteOrgMemberErrors, RemoveOrgMemberData, RemoveOrgMemberResponses, RemoveOrgMemberErrors, UpdateOrgMemberRoleData, UpdateOrgMemberRoleResponses, UpdateOrgMemberRoleErrors, GetOrgLimitsData, GetOrgLimitsResponses, GetOrgLimitsErrors, GetOrgUsageData, GetOrgUsageResponses, GetOrgUsageErrors, 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, ListAgentsData, ListAgentsResponses, ListAgentsErrors, AutoSelectAgentData, AutoSelectAgentResponses, AutoSelectAgentErrors, GetAgentMetadataData, GetAgentMetadataResponses, GetAgentMetadataErrors, ExecuteSpecificAgentData, ExecuteSpecificAgentResponses, ExecuteSpecificAgentErrors, BatchProcessQueriesData, BatchProcessQueriesResponses, BatchProcessQueriesErrors, 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, GetGraphUsageAnalyticsData, GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ExecuteCypherQueryData, ExecuteCypherQueryResponses, ExecuteCypherQueryErrors, GetGraphSchemaData, GetGraphSchemaResponses, GetGraphSchemaErrors, ExportGraphSchemaData, ExportGraphSchemaResponses, ExportGraphSchemaErrors, ValidateSchemaData, ValidateSchemaResponses, ValidateSchemaErrors, 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, GetGraphSubscriptionData, GetGraphSubscriptionResponses, GetGraphSubscriptionErrors, CreateRepositorySubscriptionData, CreateRepositorySubscriptionResponses, CreateRepositorySubscriptionErrors, UpgradeSubscriptionData, UpgradeSubscriptionResponses, UpgradeSubscriptionErrors, ListTablesData, ListTablesResponses, ListTablesErrors, QueryTablesData, QueryTablesResponses, QueryTablesErrors, CreateViewData, CreateViewResponses, CreateViewErrors, SaveViewData, SaveViewResponses, SaveViewErrors, GetMaterializationStatusData, GetMaterializationStatusResponses, GetMaterializationStatusErrors, MaterializeGraphData, MaterializeGraphResponses, MaterializeGraphErrors, ListFilesData, ListFilesResponses, ListFilesErrors, CreateFileUploadData, CreateFileUploadResponses, CreateFileUploadErrors, DeleteFileData, DeleteFileResponses, DeleteFileErrors, GetFileData, GetFileResponses, GetFileErrors, UpdateFileData, UpdateFileResponses, UpdateFileErrors, GetGraphsData, GetGraphsResponses, GetGraphsErrors, CreateGraphData, CreateGraphResponses, CreateGraphErrors, GetAvailableExtensionsData, GetAvailableExtensionsResponses, GetAvailableExtensionsErrors, GetAvailableGraphTiersData, GetAvailableGraphTiersResponses, GetAvailableGraphTiersErrors, SelectGraphData, SelectGraphResponses, SelectGraphErrors, GetServiceOfferingsData, GetServiceOfferingsResponses, GetServiceOfferingsErrors, StreamOperationEventsData, StreamOperationEventsResponses, StreamOperationEventsErrors, GetOperationStatusData, GetOperationStatusResponses, GetOperationStatusErrors, CancelOperationData, CancelOperationResponses, CancelOperationErrors, GetOrgBillingCustomerData, GetOrgBillingCustomerResponses, GetOrgBillingCustomerErrors, CreatePortalSessionData, CreatePortalSessionResponses, CreatePortalSessionErrors, ListOrgSubscriptionsData, ListOrgSubscriptionsResponses, ListOrgSubscriptionsErrors, GetOrgSubscriptionData, GetOrgSubscriptionResponses, GetOrgSubscriptionErrors, CancelOrgSubscriptionData, CancelOrgSubscriptionResponses, CancelOrgSubscriptionErrors, ListOrgInvoicesData, ListOrgInvoicesResponses, ListOrgInvoicesErrors, GetOrgUpcomingInvoiceData, GetOrgUpcomingInvoiceResponses, GetOrgUpcomingInvoiceErrors, CreateCheckoutSessionData, CreateCheckoutSessionResponses, CreateCheckoutSessionErrors, GetCheckoutStatusData, GetCheckoutStatusResponses, GetCheckoutStatusErrors } 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
|
|
@@ -814,11 +814,14 @@ export declare const getGraphMetrics: <ThrowOnError extends boolean = false>(opt
|
|
|
814
814
|
*/
|
|
815
815
|
export declare const getGraphUsageAnalytics: <ThrowOnError extends boolean = false>(options: Options<GetGraphUsageAnalyticsData, ThrowOnError>) => import("./client").RequestResult<GetGraphUsageAnalyticsResponses, GetGraphUsageAnalyticsErrors, ThrowOnError, "fields">;
|
|
816
816
|
/**
|
|
817
|
-
* Execute Cypher Query
|
|
818
|
-
* Execute a
|
|
817
|
+
* Execute Cypher Query
|
|
818
|
+
* Execute a Cypher query with intelligent response optimization.
|
|
819
819
|
*
|
|
820
|
-
* **IMPORTANT:
|
|
821
|
-
*
|
|
820
|
+
* **IMPORTANT: Write operations depend on graph type:**
|
|
821
|
+
* - **Main Graphs**: READ-ONLY. Write operations (CREATE, MERGE, SET, DELETE) are not allowed.
|
|
822
|
+
* - **Subgraphs**: WRITE-ENABLED. Full Cypher write operations are supported for development and report creation.
|
|
823
|
+
*
|
|
824
|
+
* To load data into main graphs, use the staging pipeline:
|
|
822
825
|
* 1. Create file upload: `POST /v1/graphs/{graph_id}/tables/{table_name}/files`
|
|
823
826
|
* 2. Ingest to graph: `POST /v1/graphs/{graph_id}/tables/ingest`
|
|
824
827
|
*
|
|
@@ -1179,7 +1182,7 @@ export declare const getGraphLimits: <ThrowOnError extends boolean = false>(opti
|
|
|
1179
1182
|
export declare const listSubgraphs: <ThrowOnError extends boolean = false>(options: Options<ListSubgraphsData, ThrowOnError>) => import("./client").RequestResult<ListSubgraphsResponses, ListSubgraphsErrors, ThrowOnError, "fields">;
|
|
1180
1183
|
/**
|
|
1181
1184
|
* Create Subgraph
|
|
1182
|
-
* Create a new subgraph within a parent graph.
|
|
1185
|
+
* Create a new subgraph within a parent graph, with optional data forking.
|
|
1183
1186
|
*
|
|
1184
1187
|
* **Requirements:**
|
|
1185
1188
|
* - Valid authentication
|
|
@@ -1189,9 +1192,18 @@ export declare const listSubgraphs: <ThrowOnError extends boolean = false>(optio
|
|
|
1189
1192
|
* - Must be within subgraph quota limits
|
|
1190
1193
|
* - Subgraph name must be unique within the parent graph
|
|
1191
1194
|
*
|
|
1195
|
+
* **Fork Mode:**
|
|
1196
|
+
* When `fork_parent=true`, the operation:
|
|
1197
|
+
* - Returns immediately with an operation_id for SSE monitoring
|
|
1198
|
+
* - Copies data from parent graph to the new subgraph
|
|
1199
|
+
* - Supports selective forking via metadata.fork_options
|
|
1200
|
+
* - Tracks progress in real-time via SSE
|
|
1201
|
+
*
|
|
1192
1202
|
* **Returns:**
|
|
1193
|
-
* -
|
|
1194
|
-
* -
|
|
1203
|
+
* - Without fork: Immediate SubgraphResponse with created subgraph details
|
|
1204
|
+
* - With fork: Operation response with SSE monitoring endpoint
|
|
1205
|
+
*
|
|
1206
|
+
* **Subgraph ID format:** `{parent_id}_{subgraph_name}` (e.g., kg1234567890abcdef_dev)
|
|
1195
1207
|
*
|
|
1196
1208
|
* **Usage:**
|
|
1197
1209
|
* - Subgraphs share parent's credit pool
|
|
@@ -1343,307 +1355,375 @@ export declare const upgradeSubscription: <ThrowOnError extends boolean = false>
|
|
|
1343
1355
|
*/
|
|
1344
1356
|
export declare const listTables: <ThrowOnError extends boolean = false>(options: Options<ListTablesData, ThrowOnError>) => import("./client").RequestResult<ListTablesResponses, ListTablesErrors, ThrowOnError, "fields">;
|
|
1345
1357
|
/**
|
|
1346
|
-
*
|
|
1347
|
-
*
|
|
1348
|
-
*
|
|
1349
|
-
* Get a complete inventory of all files in a staging table, including upload status,
|
|
1350
|
-
* file sizes, row counts, and S3 locations. Essential for monitoring upload progress
|
|
1351
|
-
* and validating data before ingestion.
|
|
1352
|
-
*
|
|
1353
|
-
* **Use Cases:**
|
|
1354
|
-
* - Monitor file upload progress
|
|
1355
|
-
* - Verify files are ready for ingestion
|
|
1356
|
-
* - Check file formats and sizes
|
|
1357
|
-
* - Track storage usage per table
|
|
1358
|
-
* - Identify failed or incomplete uploads
|
|
1359
|
-
* - Pre-ingestion validation
|
|
1358
|
+
* Query Staging Tables with SQL
|
|
1359
|
+
* Execute SQL queries on DuckDB staging tables for data inspection and validation.
|
|
1360
1360
|
*
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1363
|
-
* - Size in bytes and row count (if available)
|
|
1364
|
-
* - Upload status and method
|
|
1365
|
-
* - Creation and upload timestamps
|
|
1366
|
-
* - S3 key for reference
|
|
1361
|
+
* Query raw staging data directly with SQL before ingestion into the graph database.
|
|
1362
|
+
* Useful for data quality checks, validation, and exploratory analysis.
|
|
1367
1363
|
*
|
|
1368
|
-
* **
|
|
1369
|
-
*
|
|
1370
|
-
* - `
|
|
1371
|
-
* - `
|
|
1372
|
-
* - `archived`: Soft deleted
|
|
1373
|
-
* - `failed`: Upload failed
|
|
1364
|
+
* **Security Best Practice - Use Parameterized Queries:**
|
|
1365
|
+
* ALWAYS use query parameters instead of string concatenation to prevent SQL injection:
|
|
1366
|
+
* - ✅ SAFE: `SELECT * FROM Entity WHERE type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1367
|
+
* - ❌ UNSAFE: `SELECT * FROM Entity WHERE type = 'Company' LIMIT 100` with user input concatenated into SQL string
|
|
1374
1368
|
*
|
|
1375
|
-
*
|
|
1376
|
-
* - Only `uploaded` files are ingested
|
|
1377
|
-
* - Check `row_count` to estimate data volume
|
|
1378
|
-
* - Use `total_size_bytes` for storage monitoring
|
|
1379
|
-
* - Files with `failed` status should be deleted and re-uploaded
|
|
1380
|
-
* - File listing is included - no credit consumption
|
|
1381
|
-
*/
|
|
1382
|
-
export declare const listTableFiles: <ThrowOnError extends boolean = false>(options: Options<ListTableFilesData, ThrowOnError>) => import("./client").RequestResult<ListTableFilesResponses, ListTableFilesErrors, ThrowOnError, "fields">;
|
|
1383
|
-
/**
|
|
1384
|
-
* Get File Upload URL
|
|
1385
|
-
* Generate a presigned S3 URL for secure file upload.
|
|
1369
|
+
* Query parameters provide automatic escaping and type safety. Use `?` placeholders with parameters array.
|
|
1386
1370
|
*
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1371
|
+
* **Use Cases:**
|
|
1372
|
+
* - Validate data quality before graph ingestion
|
|
1373
|
+
* - Inspect row-level data for debugging
|
|
1374
|
+
* - Run analytics on staging tables
|
|
1375
|
+
* - Check for duplicates, nulls, or data issues
|
|
1376
|
+
* - Preview data transformations
|
|
1390
1377
|
*
|
|
1391
|
-
* **
|
|
1392
|
-
* 1.
|
|
1393
|
-
* 2.
|
|
1394
|
-
* 3.
|
|
1395
|
-
* 4.
|
|
1396
|
-
* 5. File ready for ingestion
|
|
1378
|
+
* **Workflow:**
|
|
1379
|
+
* 1. Upload data files via `POST /tables/{table_name}/files`
|
|
1380
|
+
* 2. Query staging tables to validate: `POST /tables/query`
|
|
1381
|
+
* 3. Fix any data issues by re-uploading
|
|
1382
|
+
* 4. Ingest validated data: `POST /tables/ingest`
|
|
1397
1383
|
*
|
|
1398
|
-
* **Supported
|
|
1399
|
-
* -
|
|
1400
|
-
* -
|
|
1401
|
-
* -
|
|
1384
|
+
* **Supported SQL:**
|
|
1385
|
+
* - Full DuckDB SQL syntax
|
|
1386
|
+
* - SELECT, JOIN, WHERE, GROUP BY, ORDER BY
|
|
1387
|
+
* - Aggregations, window functions, CTEs
|
|
1388
|
+
* - Multiple table joins across staging area
|
|
1402
1389
|
*
|
|
1403
|
-
* **
|
|
1404
|
-
* -
|
|
1405
|
-
* -
|
|
1406
|
-
* -
|
|
1407
|
-
* -
|
|
1390
|
+
* **Common Operations:**
|
|
1391
|
+
* - Count rows: `SELECT COUNT(*) FROM Entity`
|
|
1392
|
+
* - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1393
|
+
* - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10`
|
|
1394
|
+
* - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING COUNT(*) > 1`
|
|
1395
|
+
* - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: [1000, "2024-01-01"]`
|
|
1408
1396
|
*
|
|
1409
|
-
* **
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1397
|
+
* **Limits:**
|
|
1398
|
+
* - Query timeout: 30 seconds
|
|
1399
|
+
* - Result limit: 10,000 rows (use LIMIT clause)
|
|
1400
|
+
* - Read-only: No INSERT, UPDATE, DELETE
|
|
1401
|
+
* - User's tables only: Cannot query other users' data
|
|
1412
1402
|
*
|
|
1413
1403
|
* **Subgraph Support:**
|
|
1414
1404
|
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1415
1405
|
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1416
1406
|
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1417
|
-
* Each subgraph has
|
|
1418
|
-
* to one subgraph do not appear in other subgraphs.
|
|
1407
|
+
* Each subgraph has its own independent staging tables.
|
|
1419
1408
|
*
|
|
1420
|
-
* **
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1409
|
+
* **Shared Repositories:**
|
|
1410
|
+
* Shared repositories (SEC, etc.) do not allow direct SQL queries.
|
|
1411
|
+
* Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
|
|
1412
|
+
*
|
|
1413
|
+
* **Note:**
|
|
1414
|
+
* Staging table queries are included - no credit consumption
|
|
1425
1415
|
*/
|
|
1426
|
-
export declare const
|
|
1416
|
+
export declare const queryTables: <ThrowOnError extends boolean = false>(options: Options<QueryTablesData, ThrowOnError>) => import("./client").RequestResult<QueryTablesResponses, QueryTablesErrors, ThrowOnError, "fields">;
|
|
1427
1417
|
/**
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
1431
|
-
* Remove unwanted, duplicate, or incorrect files from staging tables before ingestion.
|
|
1432
|
-
* The file is deleted from both S3 and database tracking, and table statistics
|
|
1433
|
-
* are automatically recalculated.
|
|
1434
|
-
*
|
|
1435
|
-
* **Use Cases:**
|
|
1436
|
-
* - Remove duplicate uploads
|
|
1437
|
-
* - Delete files with incorrect data
|
|
1438
|
-
* - Clean up failed uploads
|
|
1439
|
-
* - Fix data quality issues before ingestion
|
|
1440
|
-
* - Manage storage usage
|
|
1418
|
+
* Create View
|
|
1419
|
+
* Generate financial report view from data source (dual-mode support).
|
|
1441
1420
|
*
|
|
1442
|
-
* **
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1446
|
-
* 4. DuckDB automatically excludes file from future queries
|
|
1421
|
+
* **Mode 1: Transaction Aggregation (generate_from_transactions)**
|
|
1422
|
+
* - Aggregates raw transaction data to trial balance
|
|
1423
|
+
* - Creates facts on-demand
|
|
1424
|
+
* - Shows real-time reporting from source of truth
|
|
1447
1425
|
*
|
|
1448
|
-
* **
|
|
1449
|
-
* -
|
|
1450
|
-
* -
|
|
1451
|
-
* -
|
|
1452
|
-
* - Cannot delete after ingestion to graph
|
|
1426
|
+
* **Mode 2: Existing Facts (pivot_existing_facts)**
|
|
1427
|
+
* - Queries existing Fact nodes
|
|
1428
|
+
* - Supports multi-dimensional analysis
|
|
1429
|
+
* - Works with SEC filings and pre-computed facts
|
|
1453
1430
|
*
|
|
1454
|
-
*
|
|
1455
|
-
* -
|
|
1456
|
-
* -
|
|
1457
|
-
* -
|
|
1458
|
-
* - Consider re-uploading corrected version after deletion
|
|
1459
|
-
* - File deletion is included - no credit consumption
|
|
1431
|
+
* Both modes:
|
|
1432
|
+
* - Build FactGrid from data
|
|
1433
|
+
* - Generate pivot table presentation
|
|
1434
|
+
* - Return consistent response format
|
|
1460
1435
|
*/
|
|
1461
|
-
export declare const
|
|
1436
|
+
export declare const createView: <ThrowOnError extends boolean = false>(options: Options<CreateViewData, ThrowOnError>) => import("./client").RequestResult<CreateViewResponses, CreateViewErrors, ThrowOnError, "fields">;
|
|
1462
1437
|
/**
|
|
1463
|
-
*
|
|
1464
|
-
*
|
|
1438
|
+
* Save View
|
|
1439
|
+
* Save or update view as materialized report in the graph.
|
|
1465
1440
|
*
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1468
|
-
*
|
|
1441
|
+
* Converts computed view results into persistent Report, Fact, and Structure nodes.
|
|
1442
|
+
* This establishes what data exists in the subgraph, which then defines what
|
|
1443
|
+
* needs to be exported for publishing to the parent graph.
|
|
1469
1444
|
*
|
|
1470
|
-
* **
|
|
1471
|
-
* -
|
|
1472
|
-
* -
|
|
1473
|
-
* - Debug upload issues
|
|
1474
|
-
* - Verify file format and size
|
|
1475
|
-
* - Track file lifecycle
|
|
1445
|
+
* **Create Mode** (no report_id provided):
|
|
1446
|
+
* - Generates new report_id from entity + period + report type
|
|
1447
|
+
* - Creates new Report, Facts, and Structures
|
|
1476
1448
|
*
|
|
1477
|
-
* **
|
|
1478
|
-
*
|
|
1449
|
+
* **Update Mode** (report_id provided):
|
|
1450
|
+
* - Deletes all existing Facts and Structures for the report
|
|
1451
|
+
* - Updates Report metadata
|
|
1452
|
+
* - Creates fresh Facts and Structures from current view
|
|
1453
|
+
* - Useful for refreshing reports with updated data or view configurations
|
|
1454
|
+
*
|
|
1455
|
+
* **This is NOT publishing** - it only creates nodes in the subgraph workspace.
|
|
1456
|
+
* Publishing (export → parquet → parent ingest) happens separately.
|
|
1457
|
+
*
|
|
1458
|
+
* Creates/Updates:
|
|
1459
|
+
* - Report node with metadata
|
|
1460
|
+
* - Fact nodes with all aspects (period, entity, element, unit)
|
|
1461
|
+
* - PresentationStructure nodes (how facts are displayed)
|
|
1462
|
+
* - CalculationStructure nodes (how facts roll up)
|
|
1463
|
+
*
|
|
1464
|
+
* Returns:
|
|
1465
|
+
* - report_id: Unique identifier used as parquet export prefix
|
|
1466
|
+
* - parquet_export_prefix: Filename prefix for future exports
|
|
1467
|
+
* - All created facts and structures
|
|
1479
1468
|
*/
|
|
1480
|
-
export declare const
|
|
1469
|
+
export declare const saveView: <ThrowOnError extends boolean = false>(options: Options<SaveViewData, ThrowOnError>) => import("./client").RequestResult<SaveViewResponses, SaveViewErrors, ThrowOnError, "fields">;
|
|
1481
1470
|
/**
|
|
1482
|
-
*
|
|
1483
|
-
*
|
|
1471
|
+
* Get Materialization Status
|
|
1472
|
+
* Get current materialization status for the graph.
|
|
1484
1473
|
*
|
|
1485
|
-
*
|
|
1486
|
-
*
|
|
1487
|
-
* registers the DuckDB table for queries.
|
|
1474
|
+
* Shows whether the graph is stale (DuckDB has changes not yet in graph database),
|
|
1475
|
+
* when it was last materialized, and how long since last materialization.
|
|
1488
1476
|
*
|
|
1489
|
-
* **Status
|
|
1490
|
-
* -
|
|
1491
|
-
* -
|
|
1492
|
-
* -
|
|
1493
|
-
*
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
* **Row Count Calculation:**
|
|
1504
|
-
* - **Parquet**: Exact count from file metadata
|
|
1505
|
-
* - **CSV**: Count rows (minus header)
|
|
1506
|
-
* - **JSON**: Count array elements
|
|
1507
|
-
* - **Fallback**: Estimate from file size if reading fails
|
|
1508
|
-
*
|
|
1509
|
-
* **Storage Limits:**
|
|
1510
|
-
* Enforced per subscription tier. Returns HTTP 413 if limit exceeded.
|
|
1511
|
-
* Check current usage before large uploads.
|
|
1477
|
+
* **Status Information:**
|
|
1478
|
+
* - Whether graph is currently stale
|
|
1479
|
+
* - Reason for staleness if applicable
|
|
1480
|
+
* - When graph became stale
|
|
1481
|
+
* - When graph was last materialized
|
|
1482
|
+
* - Total materialization count
|
|
1483
|
+
* - Hours since last materialization
|
|
1484
|
+
*
|
|
1485
|
+
* **Use Cases:**
|
|
1486
|
+
* - Decide if materialization is needed
|
|
1487
|
+
* - Monitor graph freshness
|
|
1488
|
+
* - Track materialization history
|
|
1489
|
+
* - Understand data pipeline state
|
|
1512
1490
|
*
|
|
1513
1491
|
* **Important Notes:**
|
|
1514
|
-
* -
|
|
1515
|
-
* -
|
|
1516
|
-
* -
|
|
1517
|
-
* -
|
|
1518
|
-
* - Status updates are included - no credit consumption
|
|
1492
|
+
* - Stale graph means DuckDB has changes not in graph
|
|
1493
|
+
* - Graph becomes stale after file deletions
|
|
1494
|
+
* - Materialization clears staleness
|
|
1495
|
+
* - Status retrieval is included - no credit consumption
|
|
1519
1496
|
*/
|
|
1520
|
-
export declare const
|
|
1497
|
+
export declare const getMaterializationStatus: <ThrowOnError extends boolean = false>(options: Options<GetMaterializationStatusData, ThrowOnError>) => import("./client").RequestResult<GetMaterializationStatusResponses, GetMaterializationStatusErrors, ThrowOnError, "fields">;
|
|
1521
1498
|
/**
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1499
|
+
* Materialize Graph from DuckDB
|
|
1500
|
+
* Rebuild entire graph from DuckDB staging tables (materialized view pattern).
|
|
1524
1501
|
*
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1502
|
+
* This endpoint rebuilds the complete graph database from the current state of DuckDB
|
|
1503
|
+
* staging tables. It automatically discovers all tables, ingests them in the correct
|
|
1504
|
+
* order (nodes before relationships), and clears the staleness flag.
|
|
1527
1505
|
*
|
|
1528
|
-
* **Use
|
|
1529
|
-
* -
|
|
1530
|
-
* -
|
|
1531
|
-
* -
|
|
1532
|
-
* -
|
|
1506
|
+
* **When to Use:**
|
|
1507
|
+
* - After batch uploads (files uploaded with ingest_to_graph=false)
|
|
1508
|
+
* - After cascade file deletions (graph marked stale)
|
|
1509
|
+
* - To ensure graph consistency with DuckDB state
|
|
1510
|
+
* - Periodic full refresh
|
|
1533
1511
|
*
|
|
1534
|
-
* **
|
|
1535
|
-
* 1.
|
|
1536
|
-
* 2.
|
|
1537
|
-
* 3.
|
|
1538
|
-
* 4.
|
|
1539
|
-
* 5.
|
|
1540
|
-
*
|
|
1512
|
+
* **What Happens:**
|
|
1513
|
+
* 1. Discovers all tables for the graph from PostgreSQL registry
|
|
1514
|
+
* 2. Sorts tables (nodes before relationships)
|
|
1515
|
+
* 3. Ingests all tables from DuckDB to graph in order
|
|
1516
|
+
* 4. Clears staleness flag on success
|
|
1517
|
+
* 5. Returns detailed materialization report
|
|
1518
|
+
*
|
|
1519
|
+
* **Staleness Check:**
|
|
1520
|
+
* By default, only materializes if graph is stale (after deletions or missed ingestions).
|
|
1521
|
+
* Use `force=true` to rebuild regardless of staleness.
|
|
1541
1522
|
*
|
|
1542
1523
|
* **Rebuild Feature:**
|
|
1543
1524
|
* Setting `rebuild=true` regenerates the entire graph database from scratch:
|
|
1544
|
-
* - Deletes existing
|
|
1525
|
+
* - Deletes existing graph database
|
|
1545
1526
|
* - Recreates with fresh schema from active GraphSchema
|
|
1546
1527
|
* - Ingests all data files
|
|
1547
|
-
* - Safe operation -
|
|
1528
|
+
* - Safe operation - DuckDB is source of truth
|
|
1548
1529
|
* - Useful for schema changes or data corrections
|
|
1549
1530
|
* - Graph marked as 'rebuilding' during process
|
|
1550
1531
|
*
|
|
1551
|
-
* **
|
|
1552
|
-
*
|
|
1553
|
-
*
|
|
1554
|
-
* - Detailed error reporting per table
|
|
1555
|
-
* - Graph status tracking throughout process
|
|
1556
|
-
* - Automatic failure recovery and cleanup
|
|
1532
|
+
* **Table Ordering:**
|
|
1533
|
+
* Node tables (PascalCase) are ingested before relationship tables (UPPERCASE) to
|
|
1534
|
+
* ensure referential integrity.
|
|
1557
1535
|
*
|
|
1558
|
-
* **
|
|
1559
|
-
*
|
|
1560
|
-
*
|
|
1561
|
-
* - Total execution metrics provided
|
|
1562
|
-
* - Scales to thousands of files
|
|
1563
|
-
* - Optimized for large datasets
|
|
1536
|
+
* **Error Handling:**
|
|
1537
|
+
* With `ignore_errors=true` (default), continues materializing even if individual
|
|
1538
|
+
* rows fail. Failed rows are logged but don't stop the process.
|
|
1564
1539
|
*
|
|
1565
1540
|
* **Concurrency Control:**
|
|
1566
|
-
* Only one
|
|
1541
|
+
* Only one materialization can run per graph at a time. If another materialization is in progress,
|
|
1567
1542
|
* you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
1568
|
-
* the configured TTL (default: 1 hour) to prevent deadlocks from failed
|
|
1543
|
+
* the configured TTL (default: 1 hour) to prevent deadlocks from failed materializations.
|
|
1569
1544
|
*
|
|
1570
|
-
* **
|
|
1571
|
-
*
|
|
1572
|
-
* -
|
|
1573
|
-
*
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1545
|
+
* **Performance:**
|
|
1546
|
+
* Full graph materialization can take minutes for large datasets. Consider running
|
|
1547
|
+
* during off-peak hours for production systems.
|
|
1548
|
+
*
|
|
1549
|
+
* **Credits:**
|
|
1550
|
+
* Materialization is included - no credit consumption
|
|
1551
|
+
*/
|
|
1552
|
+
export declare const materializeGraph: <ThrowOnError extends boolean = false>(options: Options<MaterializeGraphData, ThrowOnError>) => import("./client").RequestResult<MaterializeGraphResponses, MaterializeGraphErrors, ThrowOnError, "fields">;
|
|
1553
|
+
/**
|
|
1554
|
+
* List Files in Graph
|
|
1555
|
+
* List all files in the graph with optional filtering.
|
|
1556
|
+
*
|
|
1557
|
+
* Get a complete inventory of files across all tables or filtered by table name,
|
|
1558
|
+
* status, or other criteria. Files are first-class resources with independent lifecycle.
|
|
1559
|
+
*
|
|
1560
|
+
* **Query Parameters:**
|
|
1561
|
+
* - `table_name` (optional): Filter by table name
|
|
1562
|
+
* - `status` (optional): Filter by upload status (uploaded, pending, failed, etc.)
|
|
1563
|
+
*
|
|
1564
|
+
* **Use Cases:**
|
|
1565
|
+
* - Monitor file upload progress across all tables
|
|
1566
|
+
* - Verify files are ready for ingestion
|
|
1567
|
+
* - Check file metadata and sizes
|
|
1568
|
+
* - Track storage usage per graph
|
|
1569
|
+
* - Identify failed or incomplete uploads
|
|
1570
|
+
* - Audit file provenance
|
|
1571
|
+
*
|
|
1572
|
+
* **Returned Metadata:**
|
|
1573
|
+
* - File ID, name, and format (parquet, csv, json)
|
|
1574
|
+
* - Size in bytes and row count (if available)
|
|
1575
|
+
* - Upload status and timestamps
|
|
1576
|
+
* - DuckDB and graph ingestion status
|
|
1577
|
+
* - Table association
|
|
1578
|
+
*
|
|
1579
|
+
* **File Lifecycle Tracking:**
|
|
1580
|
+
* Multi-layer status across S3 → DuckDB → Graph pipeline
|
|
1576
1581
|
*
|
|
1577
1582
|
* **Important Notes:**
|
|
1578
|
-
* -
|
|
1579
|
-
* -
|
|
1580
|
-
* -
|
|
1581
|
-
* - Monitor progress via per-table results
|
|
1582
|
-
* - Check graph metadata for rebuild status
|
|
1583
|
-
* - Wait for current ingestion to complete before starting another
|
|
1584
|
-
* - Table ingestion is included - no credit consumption
|
|
1583
|
+
* - Files are graph-scoped, not table-scoped
|
|
1584
|
+
* - Use table_name parameter to filter by table
|
|
1585
|
+
* - File listing is included - no credit consumption
|
|
1585
1586
|
*/
|
|
1586
|
-
export declare const
|
|
1587
|
+
export declare const listFiles: <ThrowOnError extends boolean = false>(options: Options<ListFilesData, ThrowOnError>) => import("./client").RequestResult<ListFilesResponses, ListFilesErrors, ThrowOnError, "fields">;
|
|
1587
1588
|
/**
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1589
|
+
* Create File Upload
|
|
1590
|
+
* Generate presigned S3 URL for file upload.
|
|
1590
1591
|
*
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1592
|
+
* Initiate file upload by generating a secure, time-limited presigned S3 URL.
|
|
1593
|
+
* Files are first-class resources uploaded directly to S3.
|
|
1593
1594
|
*
|
|
1594
|
-
* **
|
|
1595
|
-
*
|
|
1596
|
-
* -
|
|
1597
|
-
* -
|
|
1595
|
+
* **Request Body:**
|
|
1596
|
+
* - `file_name`: Name of the file (1-255 characters)
|
|
1597
|
+
* - `file_format`: Format (parquet, csv, json)
|
|
1598
|
+
* - `table_name`: Table to associate file with
|
|
1598
1599
|
*
|
|
1599
|
-
*
|
|
1600
|
+
* **Upload Workflow:**
|
|
1601
|
+
* 1. Call this endpoint to get presigned URL
|
|
1602
|
+
* 2. PUT file directly to S3 URL
|
|
1603
|
+
* 3. Call PATCH /files/{file_id} with status='uploaded'
|
|
1604
|
+
* 4. Backend validates and stages in DuckDB immediately
|
|
1605
|
+
* 5. Background task ingests to graph
|
|
1600
1606
|
*
|
|
1601
|
-
* **
|
|
1602
|
-
* -
|
|
1603
|
-
* - Inspect row-level data for debugging
|
|
1604
|
-
* - Run analytics on staging tables
|
|
1605
|
-
* - Check for duplicates, nulls, or data issues
|
|
1606
|
-
* - Preview data transformations
|
|
1607
|
+
* **Supported Formats:**
|
|
1608
|
+
* - Parquet, CSV, JSON
|
|
1607
1609
|
*
|
|
1608
|
-
* **
|
|
1609
|
-
*
|
|
1610
|
-
* 2. Query staging tables to validate: `POST /tables/query`
|
|
1611
|
-
* 3. Fix any data issues by re-uploading
|
|
1612
|
-
* 4. Ingest validated data: `POST /tables/ingest`
|
|
1610
|
+
* **Auto-Table Creation:**
|
|
1611
|
+
* Tables are automatically created if they don't exist.
|
|
1613
1612
|
*
|
|
1614
|
-
* **
|
|
1615
|
-
* -
|
|
1616
|
-
* -
|
|
1617
|
-
* -
|
|
1618
|
-
|
|
1613
|
+
* **Important Notes:**
|
|
1614
|
+
* - Presigned URLs expire (default: 1 hour)
|
|
1615
|
+
* - Files are graph-scoped, independent resources
|
|
1616
|
+
* - Upload URL generation is included - no credit consumption
|
|
1617
|
+
*/
|
|
1618
|
+
export declare const createFileUpload: <ThrowOnError extends boolean = false>(options: Options<CreateFileUploadData, ThrowOnError>) => import("./client").RequestResult<CreateFileUploadResponses, CreateFileUploadErrors, ThrowOnError, "fields">;
|
|
1619
|
+
/**
|
|
1620
|
+
* Delete File
|
|
1621
|
+
* Delete file from all layers.
|
|
1619
1622
|
*
|
|
1620
|
-
*
|
|
1621
|
-
*
|
|
1622
|
-
* - Filter by type: `SELECT * FROM Entity WHERE entity_type = ? LIMIT ?` with `parameters: ["Company", 100]`
|
|
1623
|
-
* - Check for nulls: `SELECT * FROM Entity WHERE name IS NULL LIMIT 10`
|
|
1624
|
-
* - Find duplicates: `SELECT identifier, COUNT(*) as cnt FROM Entity GROUP BY identifier HAVING COUNT(*) > 1`
|
|
1625
|
-
* - Filter amounts: `SELECT * FROM Transaction WHERE amount > ? AND date >= ?` with `parameters: [1000, "2024-01-01"]`
|
|
1623
|
+
* Remove file from S3, database tracking, and optionally from DuckDB and graph.
|
|
1624
|
+
* Files are deleted by file_id, independent of table context.
|
|
1626
1625
|
*
|
|
1627
|
-
* **
|
|
1628
|
-
* -
|
|
1629
|
-
* - Result limit: 10,000 rows (use LIMIT clause)
|
|
1630
|
-
* - Read-only: No INSERT, UPDATE, DELETE
|
|
1631
|
-
* - User's tables only: Cannot query other users' data
|
|
1626
|
+
* **Query Parameters:**
|
|
1627
|
+
* - `cascade` (optional, default=false): Delete from all layers including DuckDB
|
|
1632
1628
|
*
|
|
1633
|
-
* **
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
* Each subgraph has its own independent staging tables.
|
|
1629
|
+
* **What Happens (cascade=false):**
|
|
1630
|
+
* 1. File deleted from S3
|
|
1631
|
+
* 2. Database record removed
|
|
1632
|
+
* 3. Table statistics updated
|
|
1638
1633
|
*
|
|
1639
|
-
* **
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1634
|
+
* **What Happens (cascade=true):**
|
|
1635
|
+
* 1. File data deleted from all DuckDB tables (by file_id)
|
|
1636
|
+
* 2. Graph marked as stale
|
|
1637
|
+
* 3. File deleted from S3
|
|
1638
|
+
* 4. Database record removed
|
|
1639
|
+
* 5. Table statistics updated
|
|
1640
|
+
*
|
|
1641
|
+
* **Use Cases:**
|
|
1642
|
+
* - Remove incorrect or duplicate files
|
|
1643
|
+
* - Clean up failed uploads
|
|
1644
|
+
* - Delete files before graph ingestion
|
|
1645
|
+
* - Surgical data removal with cascade
|
|
1646
|
+
*
|
|
1647
|
+
* **Security:**
|
|
1648
|
+
* - Write access required
|
|
1649
|
+
* - Shared repositories block deletions
|
|
1650
|
+
* - Full audit trail
|
|
1651
|
+
*
|
|
1652
|
+
* **Important:**
|
|
1653
|
+
* - Use cascade=true for immediate DuckDB cleanup
|
|
1654
|
+
* - Graph rebuild recommended after cascade deletion
|
|
1655
|
+
* - File deletion is included - no credit consumption
|
|
1656
|
+
*/
|
|
1657
|
+
export declare const deleteFile: <ThrowOnError extends boolean = false>(options: Options<DeleteFileData, ThrowOnError>) => import("./client").RequestResult<DeleteFileResponses, DeleteFileErrors, ThrowOnError, "fields">;
|
|
1658
|
+
/**
|
|
1659
|
+
* Get File Information
|
|
1660
|
+
* Get detailed information about a specific file.
|
|
1661
|
+
*
|
|
1662
|
+
* Retrieve comprehensive metadata for a single file by file_id, independent of
|
|
1663
|
+
* table context. Files are first-class resources with complete lifecycle tracking.
|
|
1664
|
+
*
|
|
1665
|
+
* **Returned Information:**
|
|
1666
|
+
* - File ID, name, format, size
|
|
1667
|
+
* - Upload status and timestamps
|
|
1668
|
+
* - **Enhanced Multi-Layer Status** (new in this version):
|
|
1669
|
+
* - S3 layer: upload_status, uploaded_at, size_bytes, row_count
|
|
1670
|
+
* - DuckDB layer: duckdb_status, duckdb_staged_at, duckdb_row_count
|
|
1671
|
+
* - Graph layer: graph_status, graph_ingested_at
|
|
1672
|
+
* - Table association
|
|
1673
|
+
* - S3 location
|
|
1674
|
+
*
|
|
1675
|
+
* **Multi-Layer Pipeline Visibility:**
|
|
1676
|
+
* The `layers` object provides independent status tracking across the three-tier
|
|
1677
|
+
* data pipeline:
|
|
1678
|
+
* - **S3 (Immutable Source)**: File upload and validation
|
|
1679
|
+
* - **DuckDB (Mutable Staging)**: Immediate queryability with file provenance
|
|
1680
|
+
* - **Graph (Immutable View)**: Optional graph database materialization
|
|
1681
|
+
*
|
|
1682
|
+
* Each layer shows its own status, timestamp, and row count (where applicable),
|
|
1683
|
+
* enabling precise debugging and monitoring of the data ingestion flow.
|
|
1684
|
+
*
|
|
1685
|
+
* **Use Cases:**
|
|
1686
|
+
* - Validate file upload completion
|
|
1687
|
+
* - Monitor multi-layer ingestion progress in real-time
|
|
1688
|
+
* - Debug upload or staging issues at specific layers
|
|
1689
|
+
* - Verify file metadata and row counts
|
|
1690
|
+
* - Track file provenance through the pipeline
|
|
1691
|
+
* - Identify bottlenecks in the ingestion process
|
|
1642
1692
|
*
|
|
1643
1693
|
* **Note:**
|
|
1644
|
-
*
|
|
1694
|
+
* File info retrieval is included - no credit consumption
|
|
1645
1695
|
*/
|
|
1646
|
-
export declare const
|
|
1696
|
+
export declare const getFile: <ThrowOnError extends boolean = false>(options: Options<GetFileData, ThrowOnError>) => import("./client").RequestResult<GetFileResponses, GetFileErrors, ThrowOnError, "fields">;
|
|
1697
|
+
/**
|
|
1698
|
+
* Update File Status
|
|
1699
|
+
* Update file status and trigger processing.
|
|
1700
|
+
*
|
|
1701
|
+
* Update file status after upload completion. Setting status='uploaded' triggers
|
|
1702
|
+
* immediate DuckDB staging and optional graph ingestion.
|
|
1703
|
+
*
|
|
1704
|
+
* **Request Body:**
|
|
1705
|
+
* - `status`: New status (uploaded, disabled, failed)
|
|
1706
|
+
* - `ingest_to_graph` (optional): If true, auto-ingest to graph after DuckDB staging
|
|
1707
|
+
*
|
|
1708
|
+
* **What Happens (status='uploaded'):**
|
|
1709
|
+
* 1. File validated in S3
|
|
1710
|
+
* 2. Row count calculated
|
|
1711
|
+
* 3. DuckDB staging triggered immediately (Celery task)
|
|
1712
|
+
* 4. If ingest_to_graph=true, graph ingestion queued
|
|
1713
|
+
* 5. File queryable in DuckDB within seconds
|
|
1714
|
+
*
|
|
1715
|
+
* **Use Cases:**
|
|
1716
|
+
* - Signal upload completion
|
|
1717
|
+
* - Trigger immediate DuckDB staging
|
|
1718
|
+
* - Enable/disable files
|
|
1719
|
+
* - Mark failed uploads
|
|
1720
|
+
*
|
|
1721
|
+
* **Important:**
|
|
1722
|
+
* - Files must exist in S3 before marking uploaded
|
|
1723
|
+
* - DuckDB staging happens asynchronously
|
|
1724
|
+
* - Graph ingestion is optional (ingest_to_graph flag)
|
|
1725
|
+
*/
|
|
1726
|
+
export declare const updateFile: <ThrowOnError extends boolean = false>(options: Options<UpdateFileData, ThrowOnError>) => import("./client").RequestResult<UpdateFileResponses, UpdateFileErrors, ThrowOnError, "fields">;
|
|
1647
1727
|
/**
|
|
1648
1728
|
* Get User Graphs and Repositories
|
|
1649
1729
|
* List all graph databases and shared repositories accessible to the current user.
|