import { type AmServiceSkeleton, type FullService } from '../api/ServiceApi';
import { State } from '../shared/State';
import { type ExportMetaData } from './OpsTypes';
export type Service = {
    createServiceExportTemplate(): ServiceExportInterface;
    /**
     * Get list of services
     * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.
     */
    getListOfServices(globalConfig?: boolean): Promise<import('../api/ServiceApi').AmServiceSkeleton[]>;
    /**
     * Get all services including their descendents.
     * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
     * @returns Promise resolving to an array of services with their descendants
     */
    getFullServices(globalConfig?: boolean): Promise<FullService[]>;
    /**
     * Deletes the specified service
     * @param {string} serviceId The service to delete
     * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
     */
    deleteFullService(serviceId: string, globalConfig?: boolean): Promise<AmServiceSkeleton>;
    /**
     * Deletes all services
     * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
     */
    deleteFullServices(globalConfig?: boolean): Promise<AmServiceSkeleton[]>;
    /**
     * Export service. The response can be saved to file as is.
     * @param serviceId service id/name
     * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
     * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.
     */
    exportService(serviceId: string, globalConfig?: boolean): Promise<ServiceExportInterface>;
    /**
     * Export all services
     * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
     */
    exportServices(globalConfig?: boolean): Promise<ServiceExportInterface>;
    /**
     * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first
     * @param {string} serviceId The service id/name to add
     * @param {ServiceExportInterface} importData The service configuration export data to import
     * @param {ServiceImportOptions} options Import options
     * @returns {Promise<AmServiceSkeleton>} A promise resolving to a service object
     */
    importService(serviceId: string, importData: ServiceExportInterface, options: ServiceImportOptions): Promise<AmServiceSkeleton>;
    /**
     * Imports multiple services from the same file. Optionally clean (remove) existing services first
     * @param {ServiceExportInterface} importData The service configuration export data to import
     * @param {ServiceImportOptions} options Import options
     * @returns {Promise<AmServiceSkeleton[]>} A promise resolving to an array of service objects
     */
    importServices(importData: ServiceExportInterface, options: ServiceImportOptions): Promise<AmServiceSkeleton[]>;
};
declare const _default: (state: State) => Service;
export default _default;
export interface ServiceExportInterface {
    meta?: ExportMetaData;
    service: Record<string, AmServiceSkeleton>;
}
/**
 * Service import options
 */
export interface ServiceImportOptions {
    /**
     * Indicates whether to remove previously existing services of the same id before importing
     */
    clean: boolean;
    /**
     * Indicates whether to import service(s) as global services
     */
    global: boolean;
    /**
     * Indicates whether to import service(s) to the current realm
     */
    realm: boolean;
}
/**
 * Create an empty service export template
 * @returns {SingleTreeExportInterface} an empty service export template
 */
export declare function createServiceExportTemplate({ state, }: {
    state: State;
}): ServiceExportInterface;
/**
 * Get list of services
 * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.
 */
export declare function getListOfServices({ globalConfig, state, }: {
    globalConfig: boolean;
    state: State;
}): Promise<AmServiceSkeleton[]>;
/**
 * Get all services including their descendents.
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 * @returns Promise resolving to an array of services with their descendants
 */
export declare function getFullServices({ globalConfig, state, }: {
    globalConfig: boolean;
    state: State;
}): Promise<FullService[]>;
/**
 * Saves a service including descendents
 * @param {string} serviceId the service id / name
 * @param {FullService} fullServiceData service object including descendants
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 * @returns promise resolving to a service object
 */
export declare function putFullService({ serviceId, fullServiceData, clean, globalConfig, state, }: {
    serviceId: string;
    fullServiceData: FullService;
    clean: boolean;
    globalConfig: boolean;
    state: State;
}): Promise<AmServiceSkeleton>;
/**
 * Saves multiple services using the serviceEntries which contain both id and data with descendants
 * @param {[string, FullService][]} serviceEntries The services to add
 * @param {boolean} clean Indicates whether to remove possible existing services first
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 * @param {boolean} realmConfig true if the current realm service is the target of the operation, false otherwise. Default: false.
 * @returns {Promise<AmService[]>} promise resolving to an array of service objects
 */
export declare function putFullServices({ serviceEntries, clean, globalConfig, realmConfig, state, }: {
    serviceEntries: [string, FullService][];
    clean: boolean;
    globalConfig: boolean;
    realmConfig: boolean;
    state: State;
}): Promise<AmServiceSkeleton[]>;
/**
 * Deletes the specified service
 * @param {string} serviceId The service to delete
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 */
export declare function deleteFullService({ serviceId, globalConfig, state, }: {
    serviceId: string;
    globalConfig: boolean;
    state: State;
}): Promise<AmServiceSkeleton>;
/**
 * Deletes all services
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 * @return {Promise<AmServiceSkeleton[]>} a promise resolving to an array of deleted service objects
 */
export declare function deleteFullServices({ globalConfig, state, }: {
    globalConfig: boolean;
    state: State;
}): Promise<AmServiceSkeleton[]>;
/**
 * Export service. The response can be saved to file as is.
 * @param serviceId service id/name
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.
 */
export declare function exportService({ serviceId, globalConfig, state, }: {
    serviceId: string;
    globalConfig: boolean;
    state: State;
}): Promise<ServiceExportInterface>;
/**
 * Export all services
 * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.
 */
export declare function exportServices({ globalConfig, state, }: {
    globalConfig: boolean;
    state: State;
}): Promise<ServiceExportInterface>;
/**
 * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first
 * @param {string} serviceId The service id/name to add
 * @param {ServiceExportInterface} importData The service configuration export data to import
 * @param {ServiceImportOptions} options Import options
 * @returns {Promise<AmServiceSkeleton>} A promise resolving to a service object
 */
export declare function importService({ serviceId, importData, options, state, }: {
    serviceId: string;
    importData: ServiceExportInterface;
    options: ServiceImportOptions;
    state: State;
}): Promise<AmServiceSkeleton>;
/**
 * Imports multiple services from the same file. Optionally clean (remove) existing services first
 * @param {ServiceExportInterface} importData The service configuration export data to import
 * @param {ServiceImportOptions} options Import options
 * @returns {Promise<AmServiceSkeleton[]>} A promise resolving to an array of service objects
 */
export declare function importServices({ importData, options, state, }: {
    importData: ServiceExportInterface;
    options: ServiceImportOptions;
    state: State;
}): Promise<AmServiceSkeleton[]>;
//# sourceMappingURL=ServiceOps.d.ts.map