Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • to/cf-online-ui
  • vpfafrin/cf2021
2 results
Select Git revision
Show changes
declare namespace CF2021 {
export interface GlobalInfoStorePayload {
connectionState: "connected" | "offline" | "connecting";
onlineMembers: number;
onlineUsers: number;
websocketUrl: string;
groupSizeHalf?: number;
streamUrl?: string;
protocolUrl?: string;
protocol?: string;
}
interface ProgramScheduleEntry {
id: string;
id: number;
number: string;
title: string;
fullTitle: string;
proposer: string;
speakers: string;
discussionOpened: boolean;
description?: string;
htmlContent?: string;
expectedStartAt: Date;
expectedFinishAt: Date;
expectedFinishAt?: Date;
}
export interface ProgramStorePayload {
current: ProgramScheduleEntry & {
discussionOpened: boolean;
}
schedule: ProgramScheduleEntry[];
items: {
[key: number]: ProgramScheduleEntry;
};
currentId?: number;
scheduleIds: number[];
}
interface GroupMapping {
......@@ -21,16 +40,24 @@ declare namespace CF2021 {
export interface AnonymousAuthStorePayload {
isAuthenticated: false;
groupMappings: GroupMapping[];
}
export interface UserAuthStorePayload extends AnonymousAuthStorePayload {
isAuthenticated: true;
user: {
name: string;
groups: string[];
username: string;
role: "regp" | "member" | "chairman";
accessToken: string;
// These are optional as they're loaded separately.
id?: number;
isBanned?: boolean;
group?: string;
secret?: string;
};
showJitsiInvitePopup: boolean;
jitsiPopupDimissed: boolean;
}
export type AuthStorePayload =
......@@ -46,30 +73,38 @@ declare namespace CF2021 {
| "user-ban";
export interface Announcement {
id: string;
id: number;
datetime: Date;
type: AnnouncementType;
content: string;
contentHtml: string;
link?: string;
relatedPostId: string;
seen: boolean;
}
export interface AnnouncementStorePayload {
items: Announcement[];
items: {
[key: number]: Announcement;
};
itemIds: number[];
}
export type PostType = "post" | "procedure-proposal";
export interface AbstractPost {
id: string;
id: number;
datetime: Date;
author: {
id: number;
name: string;
username: string;
group: string;
isBanned: boolean;
};
type: PostType;
content: string;
contentHtml: string;
ranking: {
score: number;
likes: number;
......@@ -82,6 +117,7 @@ declare namespace CF2021 {
datetime: Date;
originator: "self" | "chairman";
}[];
modified: boolean;
archived: boolean;
hidden: boolean;
seen: boolean;
......@@ -91,32 +127,38 @@ declare namespace CF2021 {
type: "post";
}
export interface ProposalPost extends AbstractPost {
type: "procedure-proposal";
state:
export type ProposalPostState =
| "pending"
| "announced"
| "accepted"
| "rejected"
| "rejected-by-chairman";
originalContent?: string;
export interface ProposalPost extends AbstractPost {
type: "procedure-proposal";
state: ProposalPostState;
}
export type Post = ProposalPost | DiscussionPost;
export interface PostStoreItems {
[key: string]: Post;
}
export interface PostStoreFilters {
flags: "all" | "active" | "archived";
sort: "byDate" | "byScore";
type: "all" | "proposalsOnly" | "discussionOnly";
showPendingProposals: boolean;
}
export interface PostStorePayload {
items: Post[];
items: PostStoreItems;
itemCount: number;
window: {
items: Post[];
items: string[];
itemCount: number;
page: number;
perPage: number;
};
filters: {
flags: "all" | "active" | "archived";
sort: "byDate" | "byScore";
type: "all" | "proposalsOnly" | "discussionOnly";
};
filters: PostStoreFilters;
}
}