@daocloud-proto/kpanda 0.8.15-2 → 0.8.15-28
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.
|
@@ -13,6 +13,14 @@ export enum CustomResourceDefinitionSpecResourceScope {
|
|
|
13
13
|
CLUSTER = "CLUSTER",
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export enum PatchCustomResourceRequestPatchType {
|
|
17
|
+
PATCH_TYPE_UNSPECIFIED = "PATCH_TYPE_UNSPECIFIED",
|
|
18
|
+
PATCH_TYPE_JSON = "PATCH_TYPE_JSON",
|
|
19
|
+
PATCH_TYPE_MERGE = "PATCH_TYPE_MERGE",
|
|
20
|
+
PATCH_TYPE_STRATEGIC_MERGE = "PATCH_TYPE_STRATEGIC_MERGE",
|
|
21
|
+
PATCH_TYPE_APPLY = "PATCH_TYPE_APPLY",
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
export type CustomResourceDefinition = {
|
|
17
25
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
18
26
|
spec?: CustomResourceDefinitionSpec
|
|
@@ -253,6 +261,22 @@ export type UpdateCustomResourceResponse = {
|
|
|
253
261
|
data?: string
|
|
254
262
|
}
|
|
255
263
|
|
|
264
|
+
export type PatchCustomResourceRequest = {
|
|
265
|
+
cluster?: string
|
|
266
|
+
group?: string
|
|
267
|
+
version?: string
|
|
268
|
+
namespace?: string
|
|
269
|
+
resource?: string
|
|
270
|
+
name?: string
|
|
271
|
+
patchType?: PatchCustomResourceRequestPatchType
|
|
272
|
+
data?: string
|
|
273
|
+
subResources?: string[]
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export type PatchCustomResourceResponse = {
|
|
277
|
+
data?: string
|
|
278
|
+
}
|
|
279
|
+
|
|
256
280
|
export type DeleteCustomResourceRequest = {
|
|
257
281
|
cluster?: string
|
|
258
282
|
group?: string
|
|
@@ -96,6 +96,9 @@ export class Apiextensions {
|
|
|
96
96
|
static UpdateCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceResponse> {
|
|
97
97
|
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
98
98
|
}
|
|
99
|
+
static PatchCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceResponse> {
|
|
100
|
+
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
|
|
101
|
+
}
|
|
99
102
|
static DeleteCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.DeleteCustomResourceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
100
103
|
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.DeleteCustomResourceRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
101
104
|
}
|