import type { CreateFeedbackTicketInput, FeedbackAttachment, FeedbackAttachmentKind, FeedbackComment, FeedbackListQuery, FeedbackListResult, FeedbackTicketDetail, } from "@zcode/shared"; import { ServiceChannels } from "@zcode/shared"; import type { Event } from "@zcode/rpc"; import { createServiceDescriptor } from "../descriptors.js"; export interface FeedbackUploadProgress { id: string; phase: "preparing" | "uploading" | "complete" | "canceled"; uploadedBytes: number; totalBytes: number; } export interface FeedbackCreateOptions { operationId?: string; } export interface IFeedbackService { create( input: CreateFeedbackTicketInput, options?: FeedbackCreateOptions, ): Promise; cancelCreate(operationId: string): Promise; list(query?: FeedbackListQuery): Promise; get(id: string): Promise; comment(id: string, body: string): Promise; uploadAttachment( id: string, kind: FeedbackAttachmentKind, file: { path: string; filename?: string; contentType?: string; messageId?: string }, ): Promise; uploadAttachmentWithProgress( id: string, kind: FeedbackAttachmentKind, file: { path: string; filename?: string; contentType?: string; messageId?: string }, progressId: string, ): Promise; cancelUpload(progressId: string): Promise; onDynamicUploadProgress(id: string): Event; uploadAttachmentData( id: string, kind: FeedbackAttachmentKind, file: { dataBase64: string; filename: string; contentType: string; messageId?: string; }, ): Promise; attachLogsFromExport(id: string, options?: { full?: boolean }): Promise; getDeviceSnapshot(): Promise; prepareCompactLogArchive(options?: { full?: boolean; progressId?: string }): Promise<{ path: string; size: number; }>; cleanupPreparedLogArchive(path: string): Promise; revealLogArchive(path: string): Promise; } export const IFeedbackService = createServiceDescriptor(ServiceChannels.Feedback);