import type { Table, ListTablesResponse, TableCreate, PatchedTableUpdate, OrderTablesPayload, TableImportPayload, FileImportJobResponse, DuplicateTableJobResponse, ExportOptions, ExportJob, DataSync, DataSyncCreatePayload, DataSyncUpdatePayload, ListDataSyncPropertiesResponse, ListDataSyncPropertiesRequest, SyncDataSyncTableJobResponse } from "../types/database"; import type { BaserowClient } from "./baserow-client"; export declare class DatabaseTableOperations { private client; constructor(client: BaserowClient); /** * Lists all tables in a database. * @param databaseId - The ID of the database to list tables from. * @returns A list of tables. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/list_database_tables */ list(databaseId: number): Promise; /** * Creates a new table synchronously within a database. Optionally initializes with data. * @param databaseId - The ID of the database to create the table in. * @param payload - The table creation details, including name and optional initial data. * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @returns The newly created table. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/create_database_table */ create(databaseId: number, payload: TableCreate, options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise; /** * Creates a job to asynchronously create a new table within a database. Optionally initializes with data. * @param databaseId - The ID of the database to create the table in. * @param payload - The table creation details, including name and optional initial data. * @param options - Optional request parameters like ClientSessionId. * @returns The job details for tracking the asynchronous creation. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/create_database_table_async */ createAsync(databaseId: number, payload: TableCreate, options?: { clientSessionId?: string; }): Promise; /** * Fetches a specific table by its ID. * @param tableId - The ID of the table to fetch. * @returns The requested table. * @throws {BaserowApiError} If the request fails or the table doesn't exist. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/get_database_table */ get(tableId: number): Promise
; /** * Updates an existing table. Currently, only the name can be updated. * @param tableId - The ID of the table to update. * @param payload - The updated table details (e.g., { name: 'New Name' }). * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @returns The updated table. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/update_database_table */ update(tableId: number, payload: PatchedTableUpdate, options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise
; /** * Deletes a table. * @param tableId - The ID of the table to delete. * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/delete_database_table */ delete(tableId: number, options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise; /** * Starts a job to duplicate a table asynchronously. * @param tableId - The ID of the table to duplicate. * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @returns The job details for tracking the duplication process. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/duplicate_database_table_async */ duplicateAsync(tableId: number, options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise; /** * Changes the order of tables within a database. * @param databaseId - The ID of the database containing the tables. * @param payload - An object containing the `table_ids` array in the desired order. * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/order_database_tables */ order(databaseId: number, payload: OrderTablesPayload, options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise; /** * Starts a job to import data into an existing table asynchronously. * @param tableId - The ID of the table to import data into. * @param payload - The data and optional configuration for the import. * @returns The job details for tracking the import process. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/import_data_database_table_async */ importDataAsync(tableId: number, payload: TableImportPayload): Promise; /** * Retrieves a specific data sync configuration. * @param dataSyncId - The ID of the data sync configuration. * @returns The data sync configuration details. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/get_table_data_sync */ getDataSync(dataSyncId: number): Promise; /** * Updates a data sync configuration. * @param dataSyncId - The ID of the data sync configuration to update. * @param payload - The partial data sync configuration with updated values. * @returns The updated data sync configuration. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/update_table_data_sync */ updateDataSync(dataSyncId: number, payload: DataSyncUpdatePayload): Promise; /** * Lists the available properties (potential fields) for a specific data sync configuration. * @param dataSyncId - The ID of the data sync configuration. * @param options - Optional request parameters like ClientSessionId. * @returns A list of available properties. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/get_table_data_sync_properties */ listDataSyncProperties(dataSyncId: number, options?: { clientSessionId?: string; }): Promise; /** * Starts an asynchronous job to sync data for a specific data sync configuration. * @param dataSyncId - The ID of the data sync configuration to sync. * @returns The job details for tracking the sync process. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/sync_data_sync_table_async */ syncDataSyncAsync(dataSyncId: number): Promise; /** * Creates a new table that is synchronized with an external data source. * @param databaseId - The ID of the database to create the data sync table in. * @param payload - The configuration for the data sync source. * @param options - Optional request parameters like ClientSessionId or ClientUndoRedoActionGroupId. * @returns The newly created table. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/create_database_data_sync_table */ createDataSyncTable(databaseId: number, payload: DataSyncCreatePayload, // Using the discriminated union type options?: { clientSessionId?: string; clientUndoRedoActionGroupId?: string; }): Promise
; /** * Fetches the potential properties (fields) for a given data sync type configuration *before* creating the data sync table. * @param payload - The configuration details of the potential data sync source. * @returns A list of available properties. * @throws {BaserowApiError} If the request fails or the configuration is invalid. * @see https://api.baserow.io/api/redoc/#tag/Database-tables/operation/get_table_data_sync_type_properties */ getDataSyncTypeProperties(payload: ListDataSyncPropertiesRequest): Promise; /** * Retrieves the status and details of a specific export job. * @param jobId - The ID of the export job. * @returns The export job details. * @throws {BaserowApiError} If the request fails or the job doesn't exist. * @see https://api.baserow.io/api/redoc/#tag/Database-table-export/operation/get_export_job */ getExportJob(jobId: number): Promise; /** * Creates and starts a new export job for a specific table. * @param tableId - The ID of the table to export. * @param payload - The export options, including type and format-specific settings. * @returns The details of the newly created export job. * @throws {BaserowApiError} If the request fails. * @see https://api.baserow.io/api/redoc/#tag/Database-table-export/operation/export_table */ exportTable(tableId: number, payload: ExportOptions): Promise; }