| 116 | } |
| 117 | |
| 118 | function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition { |
| 119 | return { |
| 120 | id: 'tbl_1', |
| 121 | name: 'People', |
| 122 | description: null, |
| 123 | schema: { |
| 124 | columns: [ |
| 125 | { name: 'name', type: 'string', required: true }, |
| 126 | { name: 'age', type: 'number' }, |
| 127 | ], |
| 128 | }, |
| 129 | metadata: null, |
| 130 | rowCount: 0, |
| 131 | maxRows: 100, |
| 132 | workspaceId: 'workspace-1', |
| 133 | createdBy: 'user-1', |
| 134 | archivedAt: null, |
| 135 | createdAt: new Date('2024-01-01'), |
| 136 | updatedAt: new Date('2024-01-01'), |
| 137 | ...overrides, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | /** Additions array the route passed to importAppendRows (2nd positional arg). */ |
| 142 | function appendAdditions(): { name: string; type: string }[] { |