synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
14 lines • 1.05 kB
TypeScript
import { ColumnModel, TableUpdateTransactionRequest } from '@sage-bionetworks/synapse-types';
import { SetOptional } from 'type-fest';
/**
* Creates the column models for a change request and returns the change request to be passed to the Synapse backend.
*
* Note that to update a column model and preserve table data, the ID of the column in the oldSchema should be the same as the column ID in the proposedSchema.
* @param accessToken the Synapse access token
* @param tableId the ID of the table to change
* @param oldSchema the current schema of the table
* @param proposedSchema the proposed schema of the table. For TableEntities, the IDs should be preserved for columns
* that should maintain their data, even if the column model has changed
*/
export declare function createTableUpdateTransactionRequest(accessToken: string, tableId: string, oldSchema: ColumnModel[], proposedSchema: SetOptional<ColumnModel, 'id'>[]): Promise<TableUpdateTransactionRequest>;
//# sourceMappingURL=TableColumnSchemaUtils.d.ts.map