summaryrefslogtreecommitdiff
path: root/garden/src/types
diff options
context:
space:
mode:
Diffstat (limited to 'garden/src/types')
-rw-r--r--garden/src/types/letter.ts46
-rw-r--r--garden/src/types/stats.ts2
2 files changed, 48 insertions, 0 deletions
diff --git a/garden/src/types/letter.ts b/garden/src/types/letter.ts
new file mode 100644
index 0000000..f7bd9dc
--- /dev/null
+++ b/garden/src/types/letter.ts
@@ -0,0 +1,46 @@
+export interface LetterParticipant {
+ username: string;
+ display_name: string;
+ avatar_url: string;
+ role: string;
+}
+
+export interface LetterAttachment {
+ ref: string;
+ file_name: string;
+ url: string;
+ file_size: number;
+ content_type: string;
+ category: string;
+}
+
+export interface LetterMessage {
+ ref: string;
+ sender: LetterParticipant | null;
+ body: string;
+ attachments: LetterAttachment[];
+ edited_at: string | null;
+ created_at: string;
+ deleted: boolean;
+}
+
+export interface Letter {
+ ref: string;
+ title: string;
+ is_system: boolean;
+ system_ref?: string;
+ participants: LetterParticipant[];
+ last_message?: LetterMessage;
+ unread: boolean;
+ updated_at: string;
+}
+
+export interface LetterDetail {
+ ref: string;
+ title: string;
+ is_system: boolean;
+ system_ref?: string;
+ participants: LetterParticipant[];
+ messages: LetterMessage[];
+ created_at: string;
+} \ No newline at end of file
diff --git a/garden/src/types/stats.ts b/garden/src/types/stats.ts
index 1d9364e..254f0b2 100644
--- a/garden/src/types/stats.ts
+++ b/garden/src/types/stats.ts
@@ -7,6 +7,8 @@ export interface CitizenSummary {
export interface Stats {
citizens: number;
online: number;
+ unread_letters: number;
+ pending_districts: number;
newest_citizens: CitizenSummary[];
online_citizens: CitizenSummary[];
} \ No newline at end of file