@stolostron/multicluster-sdk
Version:
Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.
14 lines • 786 B
TypeScript
import { Fleet } from '../../types';
/**
* Converts a flattened search result item into a properly structured Kubernetes resource.
*
* This function reverses the flattening performed by the search-collector, reconstructing
* the original resource structure from the flattened search data.
*
* @param item - The flattened search result item from the ACM search API
* @returns A structured Kubernetes resource object with the appropriate nested fields
*
* @see https://github.com/stolostron/search-collector/blob/main/pkg/transforms/genericResourceConfig.go
*/
export declare function convertSearchItemToResource<R extends K8sResourceCommon | K8sResourceCommon[]>(item: any): R extends (infer T)[] ? Fleet<T> : Fleet<R>;
//# sourceMappingURL=convertSearchItemToResource.d.ts.map