• 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-group-points.ts
1
import type { RouteConfig } from '@asteasolutions/zod-to-openapi';
×
NEW
2
import type { IGroupPointsVo } from '../aggregation';
×
NEW
3
import { groupPointsRoSchema, groupPointsVoSchema } from '../aggregation';
×
4
import { axios } from '../axios';
×
5
import { registerRoute, urlBuilder } from '../utils';
×
6
import { z } from '../zod';
×
7

×
8
export const SHARE_VIEW_GROUP_POINTS = '/share/{shareId}/view/group-points';
×
9

×
10
export const shareViewGroupPointsRoSchema = groupPointsRoSchema.omit({
×
11
  viewId: true,
×
12
});
×
13

×
14
export type IShareViewGroupPointsRo = z.infer<typeof shareViewGroupPointsRoSchema>;
×
15

×
16
export const ShareViewGroupPointsRoute: RouteConfig = registerRoute({
×
17
  method: 'get',
×
18
  path: SHARE_VIEW_GROUP_POINTS,
×
19
  description: 'Get group points for the share view',
×
20
  request: {
×
21
    params: z.object({
×
22
      shareId: z.string(),
×
23
    }),
×
24
    query: shareViewGroupPointsRoSchema,
×
25
  },
×
26
  responses: {
×
27
    200: {
×
28
      description: 'Group points for the share view',
×
29
      content: {
×
30
        'application/json': {
×
31
          schema: groupPointsVoSchema,
×
32
        },
×
33
      },
×
34
    },
×
35
  },
×
36
  tags: ['share'],
×
37
});
×
38

×
39
export const getShareViewGroupPoints = async (shareId: string, query?: IShareViewGroupPointsRo) => {
×
40
  return axios.get<IGroupPointsVo>(urlBuilder(SHARE_VIEW_GROUP_POINTS, { shareId }), {
×
41
    params: {
×
42
      filter: JSON.stringify(query?.filter),
×
43
      groupBy: JSON.stringify(query?.groupBy),
×
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