import { IdObjectSkeletonInterface, NoIdObjectSkeletonInterface } from '../api/ApiTypes'; import { IdmConfigStub } from '../api/IdmConfigApi'; import { ConnectorServerStatusInterface } from '../api/IdmSystemApi'; import { State } from '../shared/State'; import { ExportMetaData } from './OpsTypes'; export type IdmConfig = { /** * Read available config entity types * @returns {string[]} promise resolving to an array of config entity types */ readConfigEntityTypes(): Promise; /** * Read all config entity stubs. For full entities use {@link IdmConfig.readConfigEntities | readConfigEntities}. * @returns {IdmConfigStub[]} promise resolving to an array of config entity stubs */ readConfigEntityStubs(): Promise; /** * Read all config entities * @returns {IdObjectSkeletonInterface[]} promise reolving to an array of config entities */ readConfigEntities(): Promise; /** * Read all config entities of a type * @param {string} type config entity type * @returns {IdObjectSkeletonInterface[]} promise resolving to an array of config entities of a type */ readConfigEntitiesByType(type: string): Promise; /** * Read config entity * @param {string} entityId config entity id/name * @returns {IdObjectSkeletonInterface} promise resolving to a config entity */ readConfigEntity(entityId: string): Promise; /** * Export a single IDM config entity * @param {string} entityId config entity id * @param {ConfigEntityExportOptions} options export options * @returns {ConfigEntityExportInterface} promise resolving to a ConfigEntityExportInterface object */ exportConfigEntity(entityId: string, options?: ConfigEntityExportOptions): Promise; /** * Export all IDM config entities * @param {ConfigEntityExportOptions} options export options * @returns {ConfigEntityExportInterface} promise resolving to a ConfigEntityExportInterface object */ exportConfigEntities(options?: ConfigEntityExportOptions): Promise; /** * Create config entity * @param {string} entityId config entity id/name * @param {IdObjectSkeletonInterface} entityData config entity data * @param {boolean} wait delay the response until an OSGi service event confirms the change has been consumed by the corresponding service or the request times out. * @returns {IdObjectSkeletonInterface} promise resolving to a config entity */ createConfigEntity(entityId: string, entityData: IdObjectSkeletonInterface, wait?: boolean): Promise; /** * Update or create config entity * @param {string} entityId config entity id/name * @param {IdObjectSkeletonInterface} entityData config entity data * @param {boolean} wait delay the response until an OSGi service event confirms the change has been consumed by the corresponding service or the request times out. * @returns {IdObjectSkeletonInterface} promise resolving to a config entity */ updateConfigEntity(entityId: string, entityData: IdObjectSkeletonInterface, wait?: boolean): Promise; /** * Import idm config entities. * @param {ConfigEntityExportInterface} importData idm config entity import data. * @param {string} entityId Optional entity id that, when provided, will only import the entity of that id from the importData * @param {ConfigEntityImportOptions} options import options * @returns {Promise} a promise resolving to an array of config entity objects */ importConfigEntities(importData: ConfigEntityExportInterface, entityId?: string, options?: ConfigEntityImportOptions): Promise; /** * Delete all config entities * @returns {IdObjectSkeletonInterface[]} promise reolving to an array of config entities */ deleteConfigEntities(): Promise; /** * Delete all config entities of a type * @param {string} type config entity type * @returns {IdObjectSkeletonInterface[]} promise resolving to an array of config entities of a type */ deleteConfigEntitiesByType(type: string): Promise; /** * Delete config entity * @param {string} entityId config entity id/name * @returns {IdObjectSkeletonInterface} promise resolving to a config entity */ deleteConfigEntity(entityId: string): Promise; /** * Get available config entity types * @returns {string[]} promise resolving to an array of config entity types * @deprecated since v2.0.0 use {@link IdmConfig.readConfigEntityTypes | readConfigEntityTypes} instead * ```javascript * readConfigEntityTypes(): Promise * ``` * @group Deprecated */ getConfigEntityTypes(): Promise; /** * Get all config entities * @returns {IdObjectSkeletonInterface[]} promise reolving to an array of config entities * @deprecated since v2.0.0 use {@link IdmConfig.readConfigEntities | readConfigEntities} instead * ```javascript * readConfigEntities(): Promise * ``` * @group Deprecated */ getAllConfigEntities(): Promise; /** * Get all config entities of a type * @param {string} type config entity type * @returns {IdObjectSkeletonInterface[]} promise resolving to an array of config entities of a type * @deprecated since v2.0.0 use {@link IdmConfig.readConfigEntitiesByType | readConfigEntitiesByType} instead * ```javascript * readConfigEntitiesByType(type: string): Promise * ``` * @group Deprecated */ getConfigEntitiesByType(type: string): Promise; /** * Get config entity * @param {string} entityId config entity id/name * @returns {IdObjectSkeletonInterface} promise resolving to a config entity * @deprecated since v2.0.0 use {@link IdmConfig.readConfigEntity | readConfigEntity} instead * ```javascript * readConfigEntity(entityId: string): Promise * ``` * @group Deprecated */ getConfigEntity(entityId: string): Promise; /** * Put config entity * @param {string} entityId config entity id/name * @param {IdObjectSkeletonInterface} entityData config entity data * @returns {IdObjectSkeletonInterface} promise resolving to a config entity * @deprecated since v2.0.0 use {@link IdmConfig.updateConfigEntity | updateConfigEntity} or {@link IdmConfig.createConfigEntity | createConfigEntity} instead * ```javascript * updateConfigEntity(entityId: string, entityData: IdObjectSkeletonInterface): Promise * createConfigEntity(entityId: string, entityData: IdObjectSkeletonInterface): Promise * ``` * @group Deprecated */ putConfigEntity(entityId: string, entityData: IdObjectSkeletonInterface): Promise; /** * Test connector servers * @deprecated since v2.0.0-42 use {@link IdmSystem.testConnectorServers | testConnectorServers} or {@link IdmSystem.testConnectorServers | testConnectorServers} instead * @returns {Promise} a promise that resolves to an array of ConnectorServerStatusInterface objects */ testConnectorServers(): Promise; }; declare const _default: (state: State) => IdmConfig; export default _default; /** * Idm export options */ export interface ConfigEntityExportOptions { /** * Gives a list of entities to export. If undefined or empty, it will export all entities. */ entitiesToExport?: string[]; /** * Gives the list of key-value pairs of env replacements. Replaces each occurrence of the value with '${key}', where key is the correspond key to the value. */ envReplaceParams?: string[][]; } /** * Config entity import options */ export interface ConfigEntityImportOptions { /** * Gives a list of entities to import. If undefined or empty, it will import all entities. */ entitiesToImport?: string[]; /** * Gives the list of key-value pairs of env replacements. Replaces each occurrence of '${key}' with its value. */ envReplaceParams?: string[][]; /** * validate script hooks */ validate: boolean; } export interface ConfigEntityExportInterface { meta?: ExportMetaData; idm: Record; } /** * Create an empty config entity export template * @returns {ConfigEntityExportInterface} an empty config entity export template */ export declare function createConfigEntityExportTemplate({ state, }: { state: State; }): ConfigEntityExportInterface; export declare function readConfigEntityStubs({ state, }: { state: State; }): Promise; export declare function readConfigEntityTypes({ state, }: { state: State; }): Promise; export declare function readConfigEntities({ state, }: { state: State; }): Promise; export declare function readConfigEntitiesByType({ type, state, }: { type: string; state: State; }): Promise; export declare function readConfigEntity({ entityId, state, }: { entityId: string; state: State; }): Promise; export declare const AIC_PROTECTED_ENTITIES: string[]; /** * Export a single IDM config entity * @param {string} entityId config entity id * @param {ConfigEntityExportOptions} options export options * @returns {ConfigEntityExportInterface} promise resolving to a ConfigEntityExportInterface object */ export declare function exportConfigEntity({ entityId, options, state, }: { entityId: string; options?: ConfigEntityExportOptions; state: State; }): Promise; /** * Export all IDM config entities * @param {ConfigEntityExportOptions} options export options * @returns {ConfigEntityExportInterface} promise resolving to a ConfigEntityExportInterface object */ export declare function exportConfigEntities({ options, state, }: { options?: ConfigEntityExportOptions; state: State; }): Promise; export declare function createConfigEntity({ entityId, entityData, wait, state, }: { entityId: string; entityData: IdObjectSkeletonInterface; wait?: boolean; state: State; }): Promise; export declare function updateConfigEntity({ entityId, entityData, wait, state, }: { entityId: string; entityData: IdObjectSkeletonInterface; wait?: boolean; state: State; }): Promise; export declare function importConfigEntities({ entityId, importData, options, state, }: { entityId?: string; importData: ConfigEntityExportInterface; options: ConfigEntityImportOptions; state: State; }): Promise; export declare function deleteConfigEntities({ state, }: { state: State; }): Promise; export declare function deleteConfigEntitiesByType({ type, state, }: { type: string; state: State; }): Promise; export declare function deleteConfigEntity({ entityId, state, }: { entityId: string; state: State; }): Promise; //# sourceMappingURL=IdmConfigOps.d.ts.map