UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

Provides core APIs, types and utilities used by dynamic plugins at runtime.

29 lines (28 loc) 1.54 kB
import { Map as ImmutableMap } from 'immutable'; import { K8sModel, MatchExpression, Selector } from '../../api/common-types'; import { Options } from '../../api/internal-types'; import { K8sResourceKindReference } from '../../extensions/console-types'; import { WSFactory } from './ws-factory'; export declare const getK8sResourcePath: (model: K8sModel, options: Options) => string; export declare const resourceURL: (model: K8sModel, options: Options) => string; export declare const requirementToString: (requirement: MatchExpression) => string; export declare const createEquals: (key: string, value: string) => MatchExpression; export declare const toRequirements: (selector?: Selector) => MatchExpression[]; export declare const selectorToString: (selector: Selector) => string; export declare const k8sWatch: (kind: K8sModel, query?: { labelSelector?: Selector; resourceVersion?: string; ns?: string; fieldSelector?: string; }, wsOptions?: { [key: string]: any; }) => WSFactory; /** @deprecated - This function is now a noop and will be removed in future releases. */ export declare const setPluginStore: (store: any) => void; export declare const modelsToMap: (models: K8sModel[]) => ImmutableMap<K8sResourceKindReference, K8sModel>; /** * Provides a synchronous way to acquire all statically-defined Kubernetes models. * NOTE: This will not work for CRDs defined at runtime, use `connectToModels` instead. */ export declare const allModels: () => any; export declare const getNamespacedResources: () => any;