feat(feedback): Phase 1.1 - add screenshot fields and deviceContext to FeedbackDoc
This commit is contained in:
parent
9fff880d26
commit
acfbd7c9d7
@ -21,6 +21,23 @@ export interface FeedbackDoc {
|
||||
platform: string | null; // web, ios, android
|
||||
status: FeedbackStatus;
|
||||
adminNotes: string | null;
|
||||
|
||||
// Screenshot attachment (Phase 1.1)
|
||||
screenshotBlobPath?: string; // "feedback/{productId}/{feedbackId}/{screenshotId}.png"
|
||||
screenshotUrl?: string; // Time-limited SAS URL for viewing
|
||||
screenshotUrlExpiresAt?: string; // When SAS URL expires
|
||||
screenshotContentType?: 'image/png' | 'image/jpeg' | 'image/webp';
|
||||
screenshotSizeBytes?: number;
|
||||
|
||||
// Device context for debugging (Phase 1.1)
|
||||
deviceContext?: {
|
||||
osVersion: string;
|
||||
appVersion: string;
|
||||
deviceModel: string;
|
||||
screenResolution: string;
|
||||
locale: string;
|
||||
};
|
||||
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@ -35,6 +52,25 @@ export const CreateFeedbackSchema = z.object({
|
||||
screen: z.string().max(100).nullable().default(null),
|
||||
appVersion: z.string().max(50).nullable().default(null),
|
||||
platform: z.string().max(20).nullable().default(null),
|
||||
// Screenshot fields (Phase 1.1)
|
||||
screenshotBlobPath: z.string().optional(),
|
||||
screenshotContentType: z.enum(['image/png', 'image/jpeg', 'image/webp']).optional(),
|
||||
screenshotSizeBytes: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(10 * 1024 * 1024)
|
||||
.optional(), // 10MB max
|
||||
// Device context (Phase 1.1)
|
||||
deviceContext: z
|
||||
.object({
|
||||
osVersion: z.string().max(50),
|
||||
appVersion: z.string().max(50),
|
||||
deviceModel: z.string().max(100),
|
||||
screenResolution: z.string().max(20),
|
||||
locale: z.string().max(10),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export const UpdateFeedbackSchema = z.object({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user