Skip to content

feat(ticketing): add TypeScript types, Zod schemas, and file upload utilities for V2#110

Draft
TristanHourtoulle wants to merge 2 commits intodevfrom
feature/tri-87
Draft

feat(ticketing): add TypeScript types, Zod schemas, and file upload utilities for V2#110
TristanHourtoulle wants to merge 2 commits intodevfrom
feature/tri-87

Conversation

@TristanHourtoulle
Copy link
Member

Summary

Lay the frontend foundations for the ticketing V2 system with TypeScript types aligned to the backend MongoDB schemas, Zod validation schemas for forms, and file upload utilities.

Type of Change

  • Feature

Changes Overview

V2 Type System

  • Reworked lib/types/ticket.ts with types and interfaces matching backend MongoDB schemas (tickets, messages, attachments, status/priority/category enums)

Validation Schemas

  • lib/schemas/ticket.ts — Zod schemas for ticket creation and message creation forms

File Upload Utilities

  • lib/utils/file-upload.ts — File type/size validation, image compression (canvas-based), and Base64 conversion

Technical Details

Files Changed: 3 files
Main Areas:

  • lib/types/ticket.ts: Type definitions for V2
  • lib/schemas/ticket.ts: Zod validation schemas
  • lib/utils/file-upload.ts: File processing utilities

Testing

  • Tested locally
  • No regression in existing features

Breaking Changes

None

Deployment Notes

No special steps required. These are foundational types and utilities — no UI changes yet.

Remove all frontend ticketing code (types, services, hooks, components,
pages, tests, docs) and clean up references in navigation, toasts, and
role permissions. This clears the way for the TICKETING-V2 rebuild.

Closes TRI-85
…tilities for V2

Lay the frontend foundations for the ticketing V2 system:
- Types and interfaces aligned with backend MongoDB schemas
- Zod validation schemas for ticket and message creation forms
- File utilities for validation, image compression, and Base64 conversion
@TristanHourtoulle TristanHourtoulle added the feature New feature label Feb 28, 2026
@TristanHourtoulle TristanHourtoulle self-assigned this Feb 28, 2026
@github-actions
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.66% 400 / 515
🔵 Statements 78.14% 422 / 540
🔵 Functions 58.73% 74 / 126
🔵 Branches 72.9% 191 / 262
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
lib/toast.ts 22.22% 10.86% 2.38% 22.22% 81, 87, 96, 107-142, 270-323, 329-338, 342-348, 352-357, 362-365, 370-373, 377-384
Generated in workflow #9 for commit 2881a25 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant