import { IRepoOptions } from "@codiac.io/codiac-common";
import { classDef, stringDictionary, ISerializer, typeRef } from "@codiac.io/codiac-common";
import { IBetterLogger } from '@codiac.io/codiac-common/IBetterLogger';
export declare class TypeName {
    static endpointSpec<T>(entityType: classDef<T> | string): string;
    static arrayOf<T>(entityType: classDef<T> | string): string;
    static criteriaFor<T>(entityType: classDef<T> | string): string;
}
/** Returns the instantiated object or array.
 * Returns undefined for both an empty or missing source file.
 * Uses JSON.parse and does not perform any explicit casting.
 * Throws encountered exceptions.  Resolves tilde (~) path prefixes.
 * @param pathName Fully qualified path and filename of the json file.
 * @param allowComments (default: false) Flag to use a json comment parser to support comments in the json file.
 */
export declare function deserializeJsonFile<T>(pathName: string, allowComments?: boolean): T | undefined;
/** Uses JSON.stringify() to write the given object to a file.  Resolves tilde (~) path prefixes.
 * @param subject The object to serialize.
 * @param pathName Fully-qualified path and filename (eg "/users/JoeCool/.config/app-config.json").
 * @param allowComments (default: false) Flag to use a json comment parser to support comments in the json file.
 */
export declare function serializeJsonFile(subject: any, pathName: string, allowComments?: boolean): void;
/** Replaces the leading tilde (~) in the given file path
 * with the absolute path to the os.homedir (eg: "/Users/JoeCool").
 * NOTE:  Relative paths will slide through this function untouched:
 * this function does not necessarily return an absolute path! */
export declare function resolveHomeDir(pathName: string): string;
/**  */
export declare function smashMergeConfg<TSettings>(defaults: TSettings, configsInPriorityOrder?: Partial<TSettings>[]): TSettings;
export declare function headersFrom(options: IRepoOptions | undefined, existingHeaders?: {
    [key: string]: string;
} | undefined): {
    [key: string]: string;
} | undefined;
export declare function extractPrimitiveProperties(remaining: any): any;
export declare function omit(entity: any, paths: string[]): any;
export declare function buildUrl(route: string, request: any, applyRemainingToQuerystring?: boolean): string;
/** Injects any property values from the request into subject parameters by name.
 *
 * This method DOES NOT mutate the request object. */
export declare function hydrateSubjectParams(subject: string, request: any): string;
export declare function applyPropertySerializers(entity: any, serializerMap: stringDictionary): any;
/** Returns undefined when no serializer has been registered for the given valueType. */
export declare function getSerializerFor(valueType: typeRef | string): ISerializer | undefined;
/** For special serializers (eg: StringFilter, etc).
 * Maps the given serializer for use on the given type
 * when later converting input to an http request.
 * NOTE:  a default serializer will be used if reqd and none has been registered here.
 */
export declare function registerSerializerFor<T>(valueType: classDef<T> | string, serializer: ISerializer): void;
export declare function initialize(endpointsJson: any[], logger?: IBetterLogger): void;
/**  Produces the value for the "Authorization" http header in an RFC 2617 Basic Authentication scheme.
 * Consists of the string "Basic " followed by a colon-separated, base64 encoded string of the username and password.
 * eg:  for userid "Aladdin" and password "open sesame", this function will return "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==".
 * @see https://tools.ietf.org/html/rfc2617#page-4 RFC 2617 HTTP Authentication - Assembling the header value for a basic authentication request. */
export declare function buildBasicAuthenticationHeader(userName: string, passwordOrApiKey: string): string;
