import type { Db } from "@zmeel/db";
import { type FeedbackTargetType, type FeedbackTraceBundle, type FeedbackTrace, type FeedbackTraceStatus, type FeedbackVoteValue } from "@zmeel/shared";
type FeedbackTraceShareClient = {
    uploadTraceBundle(bundle: FeedbackTraceBundle): Promise<{
        objectKey: string;
    }>;
};
type FeedbackServiceOptions = {
    shareClient?: FeedbackTraceShareClient;
};
export declare function feedbackService(db: Db, options?: FeedbackServiceOptions): {
    listIssueVotesForUser: (issueId: string, authorUserId: string) => Promise<{
        id: string;
        createdAt: Date;
        updatedAt: Date;
        companyId: string;
        reason: string | null;
        issueId: string;
        authorUserId: string;
        targetType: string;
        targetId: string;
        vote: string;
        sharedWithLabs: boolean;
        sharedAt: Date | null;
        consentVersion: string | null;
        redactionSummary: unknown;
    }[]>;
    listFeedbackTraces: (input: {
        companyId: string;
        issueId?: string;
        projectId?: string;
        targetType?: FeedbackTargetType;
        vote?: FeedbackVoteValue;
        status?: FeedbackTraceStatus;
        from?: Date;
        to?: Date;
        sharedOnly?: boolean;
        includePayload?: boolean;
    }) => Promise<FeedbackTrace[]>;
    getFeedbackTraceById: (traceId: string, includePayload?: boolean) => Promise<FeedbackTrace | null>;
    getFeedbackTraceBundle: (traceId: string) => Promise<FeedbackTraceBundle | null>;
    flushPendingFeedbackTraces: (input?: {
        companyId?: string;
        limit?: number;
        now?: Date;
    }) => Promise<{
        attempted: number;
        sent: number;
        failed: number;
    }>;
    saveIssueVote: (input: {
        issueId: string;
        targetType: FeedbackTargetType;
        targetId: string;
        vote: FeedbackVoteValue;
        authorUserId: string;
        reason?: string | null;
        allowSharing?: boolean;
    }) => Promise<{
        vote: {
            redactionSummary: {
                strategy: string;
                redactedFields: string[];
                truncatedFields: string[];
                omittedFields: string[];
                notes: string[];
                counts: {
                    [k: string]: number;
                };
            };
            id: string;
            createdAt: Date;
            updatedAt: Date;
            companyId: string;
            reason: string | null;
            issueId: string;
            authorUserId: string;
            targetType: string;
            targetId: string;
            vote: string;
            sharedWithLabs: boolean;
            sharedAt: Date | null;
            consentVersion: string | null;
        };
        consentEnabledNow: boolean;
        persistedSharingPreference: "allowed" | "not_allowed" | null;
        sharingEnabled: boolean;
    }>;
};
export {};
//# sourceMappingURL=feedback.d.ts.map