import type { Overwrite } from '@takeshape/util';
import { SERVICE_OBJECT_PATTERN_NAME } from '../constants.ts';
import type { ProjectSchemaJSON, ServiceConfig, ServiceConfigJSON, ServiceMapJSON, ShapeJSON } from '../project-schema/index.ts';
import type { PatternGenerator, ServiceConfigUpdate, ServiceInfo, ServiceMap } from '../types/types.ts';
import type { DecryptFn, EncryptFn } from './types.ts';
/**
 * Given a `StoredServiceConfig` returns a usable `ServiceConfig` with the
 * authentication object decrypted.
 */
export declare function decryptServiceConfig(decryptFn: DecryptFn, storedServiceConfig: ServiceConfigJSON): ServiceConfig;
/**
 * Given a `ServiceMapJSON` returns a usable `ServiceMap` with all the
 * authentication objects decrypted.
 */
export declare function decryptServiceMap(decryptFn: DecryptFn, ServiceMapJSON: ServiceMapJSON): Promise<ServiceMap>;
/**
 * Validates a `ServiceConfig` validator based on the JSON-schema.
 */
export declare function validateServiceConfig(maybeServiceConfig: unknown): ServiceConfigJSON;
/**
 * Prepare a `ServiceConfig` object update, validating the overall structure
 * and encrypting the `ServiceAuthentication` object.
 */
export declare function prepareServiceUpdate(encryptFn: EncryptFn, decryptFn: DecryptFn, projectSchema: ProjectSchemaJSON, serviceConfigUpdate: ServiceConfigUpdate, serviceKey: string): ServiceConfigJSON;
export type ServiceInfoWithServiceObject = Overwrite<ServiceInfo, {
    generators: {
        [SERVICE_OBJECT_PATTERN_NAME]: PatternGenerator;
    };
}>;
export declare function getServiceObjectFields(projectSchema: ProjectSchemaJSON, shape: ShapeJSON, provider: string): ServiceInfoWithServiceObject[];
export declare function getServiceInfo(projectSchema: ProjectSchemaJSON, shape: ShapeJSON): Record<string, ServiceInfo[]>;
