@daocloud-proto/skoala 0.22.2-10 → 0.22.2-14

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.
@@ -59,6 +59,12 @@ export enum LoadBalancePolicyStrategy {
59
59
  RequestHash = "RequestHash",
60
60
  }
61
61
 
62
+ export enum APIBatchOperationReqOperation {
63
+ up = "up",
64
+ down = "down",
65
+ delete = "delete",
66
+ }
67
+
62
68
  export type CreateAPIReq = {
63
69
  workspaceId?: string
64
70
  gatewayName?: string
@@ -247,7 +253,7 @@ type BaseGetAPIRes = {
247
253
  matchRule?: MatchRule
248
254
  advancedPolicy?: AdvancedAPIConfig
249
255
  apiStatus?: SkoalaApiHostedV1alpha1Http.APIStatus
250
- status?: string
256
+ status?: SkoalaApiHostedV1alpha1Http.APIStatusEnum
251
257
  statusDescription?: string
252
258
  }
253
259
 
@@ -316,4 +322,24 @@ export type APIListReq = {
316
322
  export type APIListRes = {
317
323
  items?: SkoalaApiHostedV1alpha1Http.APIInfo[]
318
324
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
325
+ }
326
+
327
+ export type APIBatchOperationReq = {
328
+ workspaceId?: string
329
+ gatewayName?: string
330
+ clusterName?: string
331
+ namespaceName?: string
332
+ operation?: APIBatchOperationReqOperation
333
+ apiNames?: string[]
334
+ }
335
+
336
+ export type APIBatchOperationRes = {
337
+ result?: boolean
338
+ successApi?: string[]
339
+ failApi?: OperationFailReason[]
340
+ }
341
+
342
+ export type OperationFailReason = {
343
+ apiName?: string
344
+ reason?: string
319
345
  }
@@ -37,6 +37,13 @@ export enum RouteType {
37
37
  UNKNOW = "UNKNOW",
38
38
  }
39
39
 
40
+ export enum APIStatusEnum {
41
+ valid = "valid",
42
+ invalid = "invalid",
43
+ orphaned = "orphaned",
44
+ unknown = "unknown",
45
+ }
46
+
40
47
  export enum StatusCode {
41
48
  Empty = "Empty",
42
49
  Continue = "Continue",
@@ -111,7 +118,7 @@ export type HeaderRule = BaseHeaderRule
111
118
  & OneOf<{ contains: string; exact: string; notContains: string; notExact: string; present: boolean; notPresent: boolean }>
112
119
 
113
120
  export type APIStatus = {
114
- currentStatus?: string
121
+ currentStatus?: APIStatusEnum
115
122
  description?: string
116
123
  conditions?: Conditions[]
117
124
  }
@@ -865,4 +865,25 @@ export type GetNacosGrafanaReq = {
865
865
  export type GetNacosGrafanaRes = {
866
866
  url?: string
867
867
  zhUrl?: string
868
+ }
869
+
870
+ export type GetResourceInfoReq = {
871
+ workspaceId?: string
872
+ clusterName?: string
873
+ nacosName?: string
874
+ namespaceName?: string
875
+ }
876
+
877
+ export type GetResourceInfoResResourceInfo = {
878
+ name?: string
879
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
880
+ createAt?: string
881
+ consoleAddress?: string
882
+ }
883
+
884
+ export type GetResourceInfoRes = {
885
+ clusterName?: string
886
+ namespaceName?: string
887
+ nacos?: GetResourceInfoResResourceInfo
888
+ sentinel?: GetResourceInfoResResourceInfo
868
889
  }
@@ -281,6 +281,9 @@ export class Nacos {
281
281
  static UpdateUserPassword(req: SkoalaApiHostedV1alpha1Nacos.UpdateUserPasswordReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
282
282
  return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.UpdateUserPasswordReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/users`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
283
283
  }
284
+ static GetResourceInfo(req: SkoalaApiHostedV1alpha1Nacos.GetResourceInfoReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetResourceInfoRes> {
285
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetResourceInfoReq, SkoalaApiHostedV1alpha1Nacos.GetResourceInfoRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/info?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName"])}`, {...initReq, method: "GET"})
286
+ }
284
287
  }
285
288
  export class Sentinel {
286
289
  static GetInsGovern(req: SkoalaApiHostedV1alpha1Sentinel.GetInsGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.GetInsGovernRes> {
@@ -630,6 +633,9 @@ export class GatewayAPI {
630
633
  static ListAPIGroup(req: SkoalaApiHostedV1alpha1Api.ListAPIGroupReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.ListAPIGroupRes> {
631
634
  return fm.fetchReq<SkoalaApiHostedV1alpha1Api.ListAPIGroupReq, SkoalaApiHostedV1alpha1Api.ListAPIGroupRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/groups?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
632
635
  }
636
+ static BatchOperationAPI(req: SkoalaApiHostedV1alpha1Api.APIBatchOperationReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.APIBatchOperationRes> {
637
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.APIBatchOperationReq, SkoalaApiHostedV1alpha1Api.APIBatchOperationRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/batch`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
638
+ }
633
639
  }
634
640
  export class GatewayService {
635
641
  static CreateService(req: SkoalaApiHostedV1alpha1Gateway_service.CreateExternalServiceReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.22.2-10",
3
+ "version": "0.22.2-14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {