-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypes.d.ts
88 lines (74 loc) · 1.57 KB
/
types.d.ts
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Campsite API Types
*
* This file contains TypeScript type definitions for Campsite's public API.
* Use these types to build type-safe integrations with Campsite.
*/
export type OrganizationRole = 'admin' | 'member' | 'viewer' | 'guest'
export interface AvatarUrls {
xs: string
sm: string
base: string
lg: string
xl: string
xxl: string
}
export interface User {
id: string
dispay_name: string
email: string
avatar_urls: AvatarUrls
}
export interface OrganizationMember {
id: string
role: OrganizationRole
created_at: string
is_deactivated: boolean
user: User
}
export interface Comment {
id: string
content: string
created_at: string
parent_id: string | null
}
export interface Channel {
id: string
name: string
}
export interface Post {
id: string
title: string
created_at: string
url: string
content: string
channel: Channel
}
export interface Message {
id: string
content: string
created_at: string
updated_at: string
parent_id: string | null
}
export interface CreateCommentRequest {
content_markdown: string
parent_id?: string
}
export interface CreatePostRequest {
title?: string
content_markdown: string
channel_id: string
}
export interface CreateMessageRequest {
content_markdown: string
parent_id?: string
}
export interface PaginatedResponse<T> {
next_cursor?: string | null
prev_cursor?: string | null
data: T[]
total_count: number
}
export interface OrganizationMemberPage extends PaginatedResponse<OrganizationMember> {}
export interface PostPage extends PaginatedResponse<Post> {}