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

teableio / teable / 8536869866

03 Apr 2024 10:05AM UTC coverage: 21.234% (-0.3%) from 21.535%
8536869866

Pull #514

github

web-flow
Merge 91a25d710 into 45ee7ebb3
Pull Request #514: refactor: user and link selector

1394 of 2532 branches covered (55.06%)

27 of 1620 new or added lines in 60 files covered. (1.67%)

4 existing lines in 2 files now uncovered.

14588 of 68702 relevant lines covered (21.23%)

2.02 hits per line

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

0.0
/packages/openapi/src/share/view-collaborators.ts
NEW
1
import { axios } from '../axios';
×
NEW
2
import { registerRoute, urlBuilder } from '../utils';
×
NEW
3
import { z } from '../zod';
×
NEW
4

×
NEW
5
export const SHARE_VIEW_COLLABORATORS = '/share/{shareId}/view/collaborators';
×
NEW
6

×
NEW
7
export const shareViewCollaboratorsRoSchema = z.object({
×
NEW
8
  fieldId: z.string().optional(),
×
NEW
9
});
×
NEW
10

×
NEW
11
export type IShareViewCollaboratorsRo = z.infer<typeof shareViewCollaboratorsRoSchema>;
×
NEW
12

×
NEW
13
export const shareViewCollaboratorsVoSchema = z.array(
×
NEW
14
  z.object({
×
NEW
15
    userId: z.string(),
×
NEW
16
    userName: z.string(),
×
NEW
17
    email: z.string(),
×
NEW
18
    avatar: z.string().nullable().optional(),
×
NEW
19
  })
×
NEW
20
);
×
NEW
21

×
NEW
22
export type IShareViewCollaboratorsVo = z.infer<typeof shareViewCollaboratorsVoSchema>;
×
NEW
23

×
NEW
24
export const ShareViewCollaboratorsRoute = registerRoute({
×
NEW
25
  method: 'get',
×
NEW
26
  path: SHARE_VIEW_COLLABORATORS,
×
NEW
27
  description: 'View collaborators in a view with a user field selector.',
×
NEW
28
  request: {
×
NEW
29
    params: z.object({
×
NEW
30
      shareId: z.string(),
×
NEW
31
    }),
×
NEW
32
    query: shareViewCollaboratorsRoSchema,
×
NEW
33
  },
×
NEW
34
  responses: {
×
NEW
35
    200: {
×
NEW
36
      description: ' view collaborators',
×
NEW
37
      content: {
×
NEW
38
        'application/json': {
×
NEW
39
          schema: shareViewCollaboratorsVoSchema,
×
NEW
40
        },
×
NEW
41
      },
×
NEW
42
    },
×
NEW
43
  },
×
NEW
44
  tags: ['share'],
×
NEW
45
});
×
NEW
46

×
NEW
47
export const getShareViewCollaborators = async (
×
NEW
48
  shareId: string,
×
NEW
49
  query: IShareViewCollaboratorsRo
×
NEW
50
) => {
×
NEW
51
  return axios.get<IShareViewCollaboratorsVo>(urlBuilder(SHARE_VIEW_COLLABORATORS, { shareId }), {
×
NEW
52
    params: query,
×
NEW
53
  });
×
NEW
54
};
×
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