import { CommentResolverSaveEvent } from "../../utils/enums";
export interface ResolverEndpointConfig {
    url: string;
    /**
     * Request headers. Either a static object (captured once) OR an async function
     * resolved on EVERY request — use the function form to forward a short-lived
     * per-user token (re-evaluated per retry attempt, so each retry gets a fresh token).
     */
    headers?: Record<string, string> | (() => Promise<Record<string, string>>);
    /**
     * Forwarded to `fetch()` so cookie/session auth works for resolver endpoints.
     * When unset the `credentials` key is omitted from the request, so `fetch` keeps
     * its browser default of `'same-origin'` — byte-identical to the prior behavior
     * (same-origin cookies are still sent). Set `'include'` for cross-origin cookie/
     * session auth, or `'omit'` to explicitly suppress credentials.
     */
    credentials?: 'include' | 'same-origin' | 'omit';
}
export interface ResolverConfig {
    resolveTimeout?: number;
    saveRetryConfig?: RetryConfig;
    deleteRetryConfig?: RetryConfig;
    getRetryConfig?: RetryConfig;
    resolveUsersConfig?: ResolveUsersConfig;
    fieldsToRemove?: string[];
    additionalFields?: string[];
    /**
     * Opt-in list of additional (non-core) annotation-level save events the customer
     * wants delivered to the existing save endpoint, beyond the 4 core PII events
     * (add/update/delete). Each entry's `event` is a `CommentResolverSaveEvent`.
     * Array-of-objects for forward-extensibility. Absent/empty ⇒ iteration-1 behavior
     * (no extra events) — see specs/comment-resolver iteration-2.
     */
    additionalSaveEvents?: AdditionalSaveEventConfig[];
    getConfig?: ResolverEndpointConfig;
    saveConfig?: ResolverEndpointConfig;
    deleteConfig?: ResolverEndpointConfig;
}
export interface AdditionalSaveEventConfig {
    event: CommentResolverSaveEvent;
}
export interface ResolveUsersConfig {
    organization?: boolean;
    folder?: boolean;
    document?: boolean;
}
export interface ResolverResponse<T> {
    data?: T;
    success: boolean;
    message?: string;
    timestamp?: number;
    statusCode: number;
}
export interface RetryConfig {
    retryCount?: number;
    retryDelay?: number;
    revertOnFailure?: boolean;
}
export interface ResolverResponseConfig {
    revertOnFailure?: boolean;
    isSuccess?: boolean;
}
