all repos — stealth-developers @ 039ea63e339048b4103f508452368b3563a04188

src/types/forums.ts (view raw)

 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
export type ForumComment = {
	id: string;
	parentId: string;
	content: {
		plainText: string;
	};
	createdBy: number;
	creatorDisplayName: string | null;
	createdtAt: string;
	updatedAt: string | null;
	deletedAt: string | null;
	threadId: string | null;
	reactions: [];
	threadCommentCount: null | number;
	threadComments: null | ForumComment[];
};

export type ForumCommentCreator = {
	displayName: string;
	groupRoleName: string | null;
	hasVerifiedBadge: boolean;
};

export type Post = {
	categoryId: string;
	isLocked: boolean;
	isPinned: boolean;
	isUnread: boolean;
	commentCount: number;
	notificationPreference: null;
	id: string;
	/** title of the post */
	name: string;
	groupId: number;
	description: string | null;
	channelType: string | null;
	parentChannelId: string | null;
	createdBy: number;
	createdAt: string;
	updatedAt: string;
	deletedAt: string | null;
	archivedAt: string | null;
	archivedBy: number | null;
	/** represents the post's body */
	firstComment: ForumComment;
};

export type GetPosts = {
	previousPageCursor: string | null;
	nextPageCursor: string | null;
	data: Post[];
};