import { ResolverActions } from "../../utils/enums";
import { PartialAttachment } from "./attachment-resolver.data.model";
import { BaseMetadata } from "./base-metadata.data.model";
import { CommentAnnotation } from "./comment-annotation.data.model";
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
export interface CommentAnnotationDataProvider {
    get?: (request: GetCommentResolverRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
    save?: (request: SaveCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
    delete?: (request: DeleteCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
    config?: ResolverConfig;
}
export interface GetCommentResolverRequest {
    organizationId: string;
    commentAnnotationIds?: string[];
    documentIds?: string[];
    folderId?: string;
    allDocuments?: boolean;
}
export interface DeleteCommentResolverRequest {
    commentAnnotationId: string;
    metadata?: BaseMetadata;
    event?: ResolverActions;
}
export interface SaveCommentResolverRequest {
    commentAnnotation: {
        [key: string]: PartialCommentAnnotation;
    };
    event?: ResolverActions;
    metadata?: BaseMetadata;
    commentId?: string;
}
export interface PartialUser {
    userId: string;
}
export interface PartialTaggedUserContacts {
    userId: string;
    contact?: PartialUser;
    text?: string;
}
export interface PartialComment {
    commentId: string | number;
    commentHtml?: string;
    commentText?: string;
    attachments?: {
        [attachmentId: number]: PartialAttachment;
    };
    from?: PartialUser;
    to?: PartialUser[];
    taggedUserContacts?: PartialTaggedUserContacts[];
}
export interface PartialCommentAnnotationResult {
    strippedData: {
        [annotationId: string]: PartialCommentAnnotation;
    } | null;
    originalData: CommentAnnotation | null;
    eventType?: ResolverActions;
}
export interface PartialTargetTextRange {
    text: string;
}
export interface PartialCommentAnnotation {
    annotationId: string;
    metadata?: BaseMetadata;
    comments: {
        [commentId: string]: PartialComment;
    };
    from?: PartialUser;
    assignedTo?: PartialUser;
    targetTextRange?: PartialTargetTextRange;
    resolvedByUserId?: string | null;
    [key: string]: any;
}
