@daocloud-proto/skoala 0.5.1-48 → 0.5.1-58

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.
@@ -129,15 +129,18 @@ export type DeleteAPIReq = {
129
129
  namespaceName?: string
130
130
  }
131
131
 
132
- export type GetAPIRes = {
132
+
133
+ type BaseGetAPIRes = {
133
134
  apiName?: string
134
- apiStatus?: SkoalaApiHostedV1alpha1Http.APIStatus
135
+ enabled?: boolean
135
136
  fqdn?: string
136
137
  matchRule?: MatchRule
137
- targetService?: TargetService
138
138
  advancedPolicy?: AdvancedAPIConfig
139
139
  }
140
140
 
141
+ export type GetAPIRes = BaseGetAPIRes
142
+ & OneOf<{ route: RouteAction; redirect: RedirectAction; directResponse: DirectResponse }>
143
+
141
144
  export type TargetService = {
142
145
  serviceList?: ServiceDetail[]
143
146
  }
@@ -226,11 +229,12 @@ export type APIListReq = {
226
229
  clusterName?: string
227
230
  gatewayName?: string
228
231
  namespaceName?: string
232
+ apiName?: string
229
233
  page?: number
230
234
  pageSize?: number
231
235
  }
232
236
 
233
237
  export type APIListRes = {
234
- api?: SkoalaApiHostedV1alpha1Http.APIInfo[]
238
+ items?: SkoalaApiHostedV1alpha1Http.APIInfo[]
235
239
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
236
240
  }
@@ -5,7 +5,17 @@
5
5
  */
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
8
- export type SearchLogReq = {
8
+
9
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
+ type OneOf<T> =
11
+ | { [k in keyof T]?: undefined }
12
+ | (
13
+ keyof T extends infer K ?
14
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
+ : never)
16
+ : never);
17
+
18
+ type BaseSearchLogReq = {
9
19
  workspaceId?: string
10
20
  gatewayName?: string
11
21
  clusterName?: string
@@ -13,8 +23,6 @@ export type SearchLogReq = {
13
23
  requestId?: string
14
24
  fqdn?: string
15
25
  requestPath?: string
16
- statusCode?: string
17
- grpcNumber?: string
18
26
  requestMethod?: string[]
19
27
  startTime?: string
20
28
  endTime?: string
@@ -23,13 +31,16 @@ export type SearchLogReq = {
23
31
  pageSize?: number
24
32
  }
25
33
 
34
+ export type SearchLogReq = BaseSearchLogReq
35
+ & OneOf<{ httpCode: string; grpcCode: string }>
36
+
26
37
  export type SortOrder = {
27
38
  orderBy?: SkoalaApiGeneralV1alpha1Common.OrderBy
28
39
  sortBy?: string
29
40
  }
30
41
 
31
42
  export type SearchLogRes = {
32
- logResult?: LogResult[]
43
+ items?: LogResult[]
33
44
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
34
45
  }
35
46
 
@@ -93,7 +93,7 @@ export type ListGatewayServiceReq = {
93
93
  }
94
94
 
95
95
  export type ListGatewayServiceRes = {
96
- serviceInfo?: ServiceInfo[]
96
+ items?: ServiceInfo[]
97
97
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
98
98
  }
99
99
 
@@ -39,6 +39,7 @@ export type APIInfo = {
39
39
  method?: HttpMethod[]
40
40
  requestPath?: string
41
41
  routeType?: RouteType
42
+ enabled?: boolean
42
43
  apiStatus?: APIStatus
43
44
  updatedAt?: string
44
45
  }
@@ -43,11 +43,13 @@ export type Nacos = {
43
43
  namespaceName?: string
44
44
  type?: NacosConfigType
45
45
  serviceType?: SkoalaApiGeneralV1alpha1Service.ServiceType
46
- nodePort?: number
46
+ nodePort?: string
47
47
  status?: NacosStatus
48
48
  replicas?: number
49
49
  image?: string
50
50
  version?: string
51
+ nodeCount?: number
52
+ healthNodeCount?: number
51
53
  database?: NacosDatabase
52
54
  resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
53
55
  condition?: NacosCondition[]
@@ -38,7 +38,7 @@ export type VirtualhostInfo = {
38
38
  }
39
39
 
40
40
  export type ListVirtualhostRes = {
41
- virtualhost?: VirtualhostInfo[]
41
+ items?: VirtualhostInfo[]
42
42
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
43
43
  }
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.5.1-48",
3
+ "version": "0.5.1-58",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {