import { FFetchOptions } from '@fetchkit/ffetch';
import { FMTable } from '../../orm/table.js';
import { ExecuteOptions } from '../../types.js';
type MutationMode = "byId" | "byFilter";
export interface RowIdRecordLocator {
    ROWID: number;
}
export type RecordLocator = string | number | RowIdRecordLocator;
export interface FilterQueryBuilder {
    getQueryString(options?: {
        useEntityIds?: boolean;
    }): string;
}
export declare function buildRecordLocatorSegment(recordLocator: RecordLocator): string;
export declare function buildRecordPath(pathPrefix: string, recordLocator: RecordLocator): string;
export declare function mergeMutationExecuteOptions(options: (RequestInit & FFetchOptions & ExecuteOptions) | undefined, databaseUseEntityIds: boolean, databaseIncludeSpecialColumns: boolean): RequestInit & FFetchOptions & {
    useEntityIds?: boolean;
    includeSpecialColumns?: boolean;
};
export declare function mergePreferHeaderValues(...values: Array<string | undefined>): string | undefined;
export declare function resolveMutationTableId(table: FMTable<any, any> | undefined, useEntityIds: boolean, builderName: string): string;
export declare function buildMutationUrl(config: {
    databaseName: string;
    tableId: string;
    tableName: string;
    mode: MutationMode;
    recordLocator?: RecordLocator;
    queryBuilder?: FilterQueryBuilder;
    useEntityIds?: boolean;
    builderName: string;
}): string;
export declare function stripTablePathPrefix(queryString: string, tableId: string, tableName: string): string;
export declare function extractAffectedRows(response: unknown, headers?: Pick<Headers, "get">, fallback?: number, countKey?: "updatedCount" | "deletedCount"): number;
/**
 * Parse ROWID from Location header.
 * Expected formats:
 * - contacts(ROWID=4583)
 * - contacts('4583')
 */
export declare function parseRowIdFromLocationHeader(locationHeader: string | undefined): number;
export declare function getLocationHeader(headers: Pick<Headers, "get">): string | undefined;
export {};
