mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Export JsonPatch type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
2a8bc8d0bf
commit
877027ae72
@ -83,6 +83,8 @@ export type KubeApiDataFrom<K extends KubeObject, A> = A extends KubeApi<K, infe
|
|||||||
: never
|
: never
|
||||||
: never;
|
: never;
|
||||||
|
|
||||||
|
export type JsonPatch = Patch;
|
||||||
|
|
||||||
export abstract class KubeObjectStore<
|
export abstract class KubeObjectStore<
|
||||||
K extends KubeObject = KubeObject,
|
K extends KubeObject = KubeObject,
|
||||||
A extends KubeApi<K, D> = KubeApi<K, KubeJsonApiDataFor<K>>,
|
A extends KubeApi<K, D> = KubeApi<K, KubeJsonApiDataFor<K>>,
|
||||||
@ -385,7 +387,7 @@ export abstract class KubeObjectStore<
|
|||||||
return newItem;
|
return newItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
async patch(item: K, patch: Patch): Promise<K> {
|
async patch(item: K, patch: JsonPatch): Promise<K> {
|
||||||
const rawItem = await this.api.patch(
|
const rawItem = await this.api.patch(
|
||||||
{
|
{
|
||||||
name: item.getName(), namespace: item.getNs(),
|
name: item.getName(), namespace: item.getNs(),
|
||||||
|
|||||||
@ -26,6 +26,8 @@ export {
|
|||||||
KubeObject,
|
KubeObject,
|
||||||
KubeStatus,
|
KubeStatus,
|
||||||
type KubeObjectMetadata,
|
type KubeObjectMetadata,
|
||||||
|
type NamespaceScopedMetadata,
|
||||||
|
type ClusterScopedMetadata,
|
||||||
type BaseKubeJsonApiObjectMetadata,
|
type BaseKubeJsonApiObjectMetadata,
|
||||||
type KubeJsonApiObjectMetadata,
|
type KubeJsonApiObjectMetadata,
|
||||||
type KubeStatusData,
|
type KubeStatusData,
|
||||||
@ -33,6 +35,7 @@ export {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
KubeObjectStore,
|
KubeObjectStore,
|
||||||
|
type JsonPatch,
|
||||||
type KubeObjectStoreLoadAllParams,
|
type KubeObjectStoreLoadAllParams,
|
||||||
type KubeObjectStoreLoadingParams,
|
type KubeObjectStoreLoadingParams,
|
||||||
type KubeObjectStoreSubscribeParams,
|
type KubeObjectStoreSubscribeParams,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user