@@ -17,7 +17,6 @@ import {
17
17
collapse ,
18
18
type RecursivePartial ,
19
19
} from '@mathesar-component-library' ;
20
- import type { DBObjectEntry } from '@mathesar/AppTypes' ;
21
20
import type { JoinableTablesResult } from '@mathesar/api/rest/types/tables/joinable_tables' ;
22
21
import type {
23
22
SplitTableRequest ,
@@ -435,22 +434,20 @@ export function getJoinableTablesResult(tableId: number, maxDepth = 1) {
435
434
) ;
436
435
}
437
436
438
- type TableSettings = Table [ 'settings' ] ;
439
-
440
437
async function saveTableSettings (
441
438
connection : Pick < Connection , 'id' > ,
442
439
table : Pick < Table , 'oid' | 'settings' | 'schema' > ,
443
- settings : RecursivePartial < TableSettings > ,
440
+ settings : RecursivePartial < Table [ 'settings' ] > ,
444
441
) : Promise < void > {
445
442
const url = `/api/db/v0/tables/${ table . oid } /settings/${ table . settings . id } /` ;
446
- await patchAPI < TableSettings > ( url , settings ) ;
443
+ await patchAPI < Table [ 'settings' ] > ( url , settings ) ;
447
444
await refetchTablesForSchema ( connection , { oid : table . schema } ) ;
448
445
}
449
446
450
447
export function saveRecordSummaryTemplate (
451
448
connection : Pick < Connection , 'id' > ,
452
449
table : Pick < Table , 'oid' | 'settings' | 'schema' > ,
453
- previewSettings : TableSettings [ 'preview_settings' ] ,
450
+ previewSettings : Table [ 'settings' ] [ 'preview_settings' ] ,
454
451
) : Promise < void > {
455
452
const { customized } = previewSettings ;
456
453
return saveTableSettings ( connection , table , {
@@ -461,7 +458,7 @@ export function saveRecordSummaryTemplate(
461
458
export function saveColumnOrder (
462
459
connection : Pick < Connection , 'id' > ,
463
460
table : Pick < Table , 'oid' | 'settings' | 'schema' > ,
464
- columnOrder : TableSettings [ 'column_order' ] ,
461
+ columnOrder : Table [ 'settings' ] [ 'column_order' ] ,
465
462
) : Promise < void > {
466
463
return saveTableSettings ( connection , table , {
467
464
// Using the Set constructor to remove potential duplicates
0 commit comments