@k8slens/extensions 5.3.1-git.80eeffc229.0 → 5.3.1-git.851ad0e36b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,6 +81,9 @@ export declare type PropagationPolicy = undefined | "Orphan" | "Foreground" | "B
81
81
  */
82
82
  export interface IKubeApiCluster extends ILocalKubeApiConfig {
83
83
  }
84
+ export declare type PartialKubeObject<T extends KubeObject> = Partial<Omit<T, "metadata">> & {
85
+ metadata?: Partial<T["metadata"]>;
86
+ };
84
87
  export interface IRemoteKubeApiConfig {
85
88
  cluster: {
86
89
  server: string;
@@ -161,9 +164,9 @@ export declare class KubeApi<T extends KubeObject> {
161
164
  protected parseResponse(data: unknown, namespace?: string): T | T[] | null;
162
165
  list({ namespace, reqInit }?: KubeApiListOptions, query?: IKubeApiQueryParams): Promise<T[] | null>;
163
166
  get(desc: ResourceDescriptor, query?: IKubeApiQueryParams): Promise<T | null>;
164
- create({ name, namespace }: Partial<ResourceDescriptor>, data?: Partial<T>): Promise<T | null>;
165
- update({ name, namespace }: ResourceDescriptor, data: Partial<T>): Promise<T | null>;
166
- patch(desc: ResourceDescriptor, data?: Partial<T> | Patch, strategy?: KubeApiPatchType): Promise<T | null>;
167
+ create({ name, namespace }: Partial<ResourceDescriptor>, data?: PartialKubeObject<T>): Promise<T | null>;
168
+ update({ name, namespace }: ResourceDescriptor, data: PartialKubeObject<T>): Promise<T | null>;
169
+ patch(desc: ResourceDescriptor, data?: PartialKubeObject<T> | Patch, strategy?: KubeApiPatchType): Promise<T>;
167
170
  delete({ propagationPolicy, ...desc }: DeleteResourceDescriptor): Promise<KubeJsonApiData>;
168
171
  getWatchUrl(namespace?: string, query?: IKubeApiQueryParams): string;
169
172
  watch(opts?: KubeApiWatchOptions): () => void;