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

teableio / teable / 8389034572

22 Mar 2024 10:38AM UTC coverage: 26.087% (-2.1%) from 28.208%
8389034572

Pull #487

github

web-flow
Merge 3045b1f94 into a06c6afb1
Pull Request #487: refactor: move zod schema to openapi

2100 of 3363 branches covered (62.44%)

282 of 757 new or added lines in 74 files covered. (37.25%)

224 existing lines in 8 files now uncovered.

25574 of 98035 relevant lines covered (26.09%)

5.17 hits per line

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

0.0
/packages/openapi/src/table/get.ts
1
import type { RouteConfig } from '@asteasolutions/zod-to-openapi';
×
2
import { axios } from '../axios';
×
3
import { registerRoute, urlBuilder } from '../utils';
×
4
import { z } from '../zod';
×
NEW
5
import type { ITableVo } from './create';
×
NEW
6
import { tableVoSchema } from './create';
×
NEW
7
import type { IGetTableQuery } from './get-list';
×
NEW
8
import { getTableQuerySchema } from './get-list';
×
9

×
10
export const GET_TABLE = '/base/{baseId}/table/{tableId}';
×
11

×
12
export const GetTableRoute: RouteConfig = registerRoute({
×
13
  method: 'get',
×
14
  path: GET_TABLE,
×
15
  description: 'Get a table',
×
16
  request: {
×
17
    params: z.object({
×
18
      baseId: z.string(),
×
19
      tableId: z.string(),
×
20
    }),
×
21
    query: getTableQuerySchema,
×
22
  },
×
23
  responses: {
×
24
    200: {
×
25
      description: 'Returns data about a table.',
×
26
      content: {
×
27
        'application/json': {
×
28
          schema: tableVoSchema,
×
29
        },
×
30
      },
×
31
    },
×
32
  },
×
33
  tags: ['table'],
×
34
});
×
35

×
36
export const getTableById = async (baseId: string, tableId: string, query: IGetTableQuery) => {
×
37
  return axios.get<ITableVo>(
×
38
    urlBuilder(GET_TABLE, {
×
39
      baseId,
×
40
      tableId,
×
41
    }),
×
42
    {
×
43
      params: query,
×
44
    }
×
45
  );
×
46
};
×
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