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

teableio / teable / 8389034572

22 Mar 2024 10:38AM CUT 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/share/view-row-count.ts
1
import type { RouteConfig } from '@asteasolutions/zod-to-openapi';
×
NEW
2
import type { IRowCountVo } from '../aggregation';
×
NEW
3
import { rowCountVoSchema } from '../aggregation';
×
4
import { axios } from '../axios';
×
NEW
5
import { queryBaseSchema } from '../record';
×
6
import { registerRoute, urlBuilder } from '../utils';
×
7
import { z } from '../zod';
×
8

×
9
export const SHARE_VIEW_ROW_COUNT = '/share/{shareId}/view/row-count';
×
10

×
11
export const shareViewRowCountRoSchema = queryBaseSchema.omit({
×
12
  viewId: true,
×
13
});
×
14

×
15
export type IShareViewRowCountRo = z.infer<typeof shareViewRowCountRoSchema>;
×
16

×
17
export const ShareViewRowCountRoute: RouteConfig = registerRoute({
×
18
  method: 'get',
×
19
  path: SHARE_VIEW_ROW_COUNT,
×
20
  description: 'Get row count for the share view',
×
21
  request: {
×
22
    params: z.object({
×
23
      shareId: z.string(),
×
24
    }),
×
25
    query: shareViewRowCountRoSchema,
×
26
  },
×
27
  responses: {
×
28
    200: {
×
29
      description: 'Row count for the share view',
×
30
      content: {
×
31
        'application/json': {
×
32
          schema: rowCountVoSchema,
×
33
        },
×
34
      },
×
35
    },
×
36
  },
×
37
  tags: ['share'],
×
38
});
×
39

×
40
export const getShareViewRowCount = async (shareId: string, query: IShareViewRowCountRo) => {
×
41
  return axios.get<IRowCountVo>(urlBuilder(SHARE_VIEW_ROW_COUNT, { shareId }), {
×
42
    params: {
×
43
      ...query,
×
44
      filter: JSON.stringify(query.filter),
×
45
    },
×
46
  });
×
47
};
×
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