import { IKubernetesClientConfig } from "./config"; import { Selector } from "./label"; import { MetadataObject } from "./types/meta"; import { DeleteOptions, WatchEvent } from "./types/meta/v1"; export declare type RequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; export declare type SelectorOptions = { labelSelector?: Selector; fieldSelector?: Selector; }; export declare type MandatorySelectorOptions = { labelSelector: Selector; } | { fieldSelector: Selector; }; export declare type WatchOptions = SelectorOptions & { resourceVersion?: number; abortAfterErrorCount?: number; resyncAfterIterations?: number; onError?: (err: any) => void; }; export declare type ListOptions = SelectorOptions; export interface WatchResult { resourceVersion: number; resyncRequired?: boolean; } export declare const patchKindStrategicMergePatch = "application/stategic-merge-patch+json"; export declare const patchKindMergePatch = "application/merge-patch+json"; export declare const patchKindJSONPatch = "application/json-patch+json"; export declare type PatchKind = typeof patchKindStrategicMergePatch | typeof patchKindMergePatch | typeof patchKindJSONPatch; export interface IKubernetesRESTClient { post(url: string, body: any): Promise; put(url: string, body: any): Promise; patch(url: string, body: any, patchKind: PatchKind): Promise; delete(url: string, opts?: DeleteOptions, queryParams?: { [k: string]: string; }, body?: any): Promise; get(url: string, opts?: ListOptions): Promise; watch(url: string, onUpdate: (o: WatchEvent) => any, onError: (err: any) => any, opts?: WatchOptions): Promise; } export declare class KubernetesRESTClient implements IKubernetesRESTClient { private config; constructor(config: IKubernetesClientConfig); private request; post(url: string, body: any): Promise; put(url: string, body: any): Promise; patch(url: string, body: any, patchKind: PatchKind): Promise; delete(url: string, deleteOptions?: ListOptions, queryParams?: { [k: string]: string; }, body?: any): Promise; watch(url: string, onUpdate: (o: WatchEvent) => any, onError: (err: any) => any, watchOpts?: WatchOptions): Promise; get(url: string, listOptions?: ListOptions): Promise; }