-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Expand file tree
/
Copy pathGroupsHistoryProps.ts
More file actions
49 lines (48 loc) · 998 Bytes
/
GroupsHistoryProps.ts
File metadata and controls
49 lines (48 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { ajv } from '../Ajv';
import type { GroupsBaseProps } from './BaseProps';
import { withGroupBaseProperties } from './BaseProps';
import type { PaginatedRequest } from '../../helpers/PaginatedRequest';
export type GroupsHistoryProps = PaginatedRequest<
GroupsBaseProps & {
latest?: string;
oldest?: string;
inclusive?: 'true' | 'false';
unreads?: 'true' | 'false';
showThreadMessages?: string;
}
>;
const groupsHistoryPropsSchema = withGroupBaseProperties({
latest: {
type: 'string',
nullable: true,
},
oldest: {
type: 'string',
nullable: true,
},
inclusive: {
type: 'string',
nullable: true,
},
unreads: {
type: 'string',
nullable: true,
},
showThreadMessages: {
type: 'string',
nullable: true,
},
count: {
type: 'number',
nullable: true,
},
offset: {
type: 'number',
nullable: true,
},
sort: {
type: 'string',
nullable: true,
},
});
export const isGroupsHistoryProps = ajv.compile<GroupsHistoryProps>(groupsHistoryPropsSchema);