• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8476911189

29 Mar 2024 03:45AM UTC coverage: 21.636% (-0.2%) from 21.83%
8476911189

Pull #484

github

web-flow
Merge 67969e538 into 039ad8b0a
Pull Request #484: feat: support increment import

1395 of 2503 branches covered (55.73%)

24 of 733 new or added lines in 23 files covered. (3.27%)

2 existing lines in 1 file now uncovered.

14552 of 67258 relevant lines covered (21.64%)

2.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/openapi/src/import/import-table.ts
1
import type { RouteConfig } from '@asteasolutions/zod-to-openapi';
×
2
import { axios } from '../axios';
×
3
import type { ITableFullVo } from '../table';
×
4
import { tableVoSchema } from '../table';
×
5
import { registerRoute, urlBuilder } from '../utils';
×
6
import { z } from '../zod';
×
NEW
7
import type { IImportOptionRo } from './types';
×
NEW
8
import { importOptionRoSchema } from './types';
×
9

×
10
export const IMPORT_TABLE = '/import/{baseId}';
×
11

×
12
export const ImportTableFromFileRoute: RouteConfig = registerRoute({
×
13
  method: 'post',
×
14
  path: IMPORT_TABLE,
×
15
  description: 'create table from file',
×
16
  request: {
×
17
    params: z.object({
×
18
      baseId: z.string(),
×
19
    }),
×
20
    body: {
×
21
      content: {
×
22
        'application/json': {
×
23
          schema: importOptionRoSchema,
×
24
        },
×
25
      },
×
26
    },
×
27
  },
×
28
  responses: {
×
29
    200: {
×
30
      description: 'Returns data about a table without records',
×
31
      content: {
×
32
        'application/json': {
×
33
          schema: tableVoSchema,
×
34
        },
×
35
      },
×
36
    },
×
37
  },
×
38
  tags: ['import'],
×
39
});
×
40

×
41
export const importTableFromFile = async (baseId: string, importRo: IImportOptionRo) => {
×
42
  return axios.post<ITableFullVo[]>(urlBuilder(IMPORT_TABLE, { baseId }), importRo);
×
43
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc