1 | import { Client } from '../client';
|
2 | import { Column, ColumnArray } from './column';
|
3 | import { View } from './view';
|
4 | import { Row, RowArray } from './row';
|
5 | import { ColumnConfig, EventCallback, FilterFn, SortFn } from '../types';
|
6 | import { Cell, CellArray } from './cell';
|
7 | import { UpdateCellInput, ViewInput } from './input.interface';
|
8 | import { Subscription } from 'rxjs';
|
9 | export declare class Table {
|
10 | private _client;
|
11 | workspaceId: string;
|
12 | coreId: string;
|
13 | id: string;
|
14 | name: string;
|
15 | views: Map<string, View>;
|
16 | constructor(client: Client, workspaceId: string, coreId: string, id: string, name: string, views?: Map<string, View>);
|
17 | onViewAdded(cb: EventCallback): Subscription;
|
18 | onColumnAdded(cb: EventCallback): Subscription;
|
19 | onRowAdded(cb: EventCallback): Subscription;
|
20 | onCellUpdated(cb: EventCallback): Subscription;
|
21 | on(cb: EventCallback): Subscription;
|
22 | getCells(): CellArray;
|
23 | addView(input: ViewInput): Promise<View>;
|
24 | addRow(): Promise<Row>;
|
25 | addColumn(columnConfig: ColumnConfig): Promise<Column>;
|
26 | view(id: string): View;
|
27 | updateCell(input: UpdateCellInput): Promise<Cell>;
|
28 | addRows(number: number): Promise<RowArray>;
|
29 | addColumns(input: ColumnConfig[]): Promise<ColumnArray>;
|
30 | updateCells(input: UpdateCellInput[]): Promise<CellArray>;
|
31 | }
|
32 | export declare class TableArray {
|
33 | private _client;
|
34 | tables: Table[];
|
35 | constructor(client: Client, tables: Table[]);
|
36 | select(maxSize?: number | FilterFn, filter?: FilterFn): TableArray;
|
37 | sort(sortFn: SortFn): TableArray;
|
38 | onViewAdded(cb: EventCallback): Subscription[];
|
39 | onColumnAdded(cb: EventCallback): Subscription[];
|
40 | onRowAdded(cb: EventCallback): Subscription[];
|
41 | onCellUpdated(cb: EventCallback): Subscription[];
|
42 | on(cb: EventCallback): Subscription[];
|
43 | }
|