diff options
| author | Bobby <[email protected]> | 2026-03-13 18:25:44 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-13 18:25:44 +0530 |
| commit | 344d02a7feddefb5c08f88dbe5f3a3f7e7da385f (patch) | |
| tree | 94deed23d82d7f868721cc00b5550f5c27e8b8f7 /garden/src/types/letter.ts | |
| parent | 9f808807a557fc10a38a44cb52be6bfcdfda68b2 (diff) | |
| download | pagoda-main.tar.xz pagoda-main.zip | |
- Introduced new routes for letters and their details.
- Created pages for displaying letter details and listing letters.
- Added new types for letters, including participants, messages, and attachments.
- Implemented API calls for fetching letters and managing messages (reply, edit, delete).
- Enhanced stats to include unread letters and pending districts for staff users.
- Updated styles for letters and their components.
- Added privacy settings for letters (public and friends).
- Modified user model to include letter privacy settings.
- Improved error handling and user feedback in the UI.
Diffstat (limited to 'garden/src/types/letter.ts')
| -rw-r--r-- | garden/src/types/letter.ts | 46 |
1 files changed, 46 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 |
