@daocloud-proto/skoala 0.5.1-70 → 0.5.1-76

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.
@@ -96,6 +96,21 @@ export type AdvancedAPIConfig = {
96
96
  timeoutPolicy?: TimeoutPolicy
97
97
  pathRewritePolicy?: PathRewritePolicy
98
98
  retryPolicy?: RetryPolicy
99
+ websocketPolicy?: WebsocketPolicy
100
+ healthCheckPolicy?: HealthCheckPolicy
101
+ }
102
+
103
+ export type HealthCheckPolicy = {
104
+ healthThresholdCount?: string
105
+ host?: string
106
+ intervalSeconds?: string
107
+ path?: string
108
+ timeoutSeconds?: string
109
+ unhealthThresholdCount?: string
110
+ }
111
+
112
+ export type WebsocketPolicy = {
113
+ enabled?: boolean
99
114
  }
100
115
 
101
116
  export type RetryPolicy = {
@@ -221,20 +236,12 @@ export type Certificate = {
221
236
 
222
237
  type BaseMatchRule = {
223
238
  httpMethod?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
224
- headers?: HeaderRule[]
239
+ headers?: SkoalaApiHostedV1alpha1Http.HeaderRule[]
225
240
  }
226
241
 
227
242
  export type MatchRule = BaseMatchRule
228
243
  & OneOf<{ path: string; prefix: string }>
229
244
 
230
-
231
- type BaseHeaderRule = {
232
- name?: string
233
- }
234
-
235
- export type HeaderRule = BaseHeaderRule
236
- & OneOf<{ contains: string; exact: string; notContains: string; notExact: string; present: boolean; notPresent: boolean }>
237
-
238
245
  export type RouteAction = {
239
246
  routeService?: RouteService[]
240
247
  }
@@ -110,12 +110,13 @@ export type ServiceInfo = {
110
110
 
111
111
  export type ServiceSourceInfo = {
112
112
  serviceSource?: ServiceSource
113
- clusterName?: string
113
+ k8SClusterName?: string
114
114
  k8SNamespaceName?: string
115
115
  registrationId?: string
116
+ registrationName?: string
116
117
  registrationType?: string
117
118
  nacosNamespaceId?: string
118
- groupName?: string
119
+ nacosGroupName?: string
119
120
  }
120
121
 
121
122
 
@@ -136,6 +137,7 @@ export type KubernetesService = {
136
137
 
137
138
  type BaseRegistryService = {
138
139
  registrationId?: string
140
+ registrationName?: string
139
141
  }
140
142
 
141
143
  export type RegistryService = BaseRegistryService
@@ -4,6 +4,15 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
8
+ type OneOf<T> =
9
+ | { [k in keyof T]?: undefined }
10
+ | (
11
+ keyof T extends infer K ?
12
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
13
+ : never)
14
+ : never);
15
+
7
16
  export enum HttpMethod {
8
17
  GET = "GET",
9
18
  POST = "POST",
@@ -19,6 +28,12 @@ export enum Protocol {
19
28
  HTTPS = "HTTPS",
20
29
  }
21
30
 
31
+ export enum TimeUnit {
32
+ SECOND = "SECOND",
33
+ MINUTE = "MINUTE",
34
+ HOUR = "HOUR",
35
+ }
36
+
22
37
  export enum RouteType {
23
38
  CLUSTRE_SERVER = "CLUSTRE_SERVER",
24
39
  DIRECT = "DIRECT",
@@ -33,6 +48,19 @@ export enum APIStatus {
33
48
  DOWN = "DOWN",
34
49
  }
35
50
 
51
+ export type Header = {
52
+ name?: string
53
+ value?: string
54
+ }
55
+
56
+
57
+ type BaseHeaderRule = {
58
+ name?: string
59
+ }
60
+
61
+ export type HeaderRule = BaseHeaderRule
62
+ & OneOf<{ contains: string; exact: string; notContains: string; notExact: string; present: boolean; notPresent: boolean }>
63
+
36
64
  export type APIInfo = {
37
65
  apiName?: string
38
66
  fqdn?: string
@@ -149,4 +149,16 @@ export type ListNacosServiceReq = {
149
149
  export type ListNacosServiceRes = {
150
150
  count?: number
151
151
  doms?: string[]
152
+ }
153
+
154
+ export type GetNacosServiceReq = {
155
+ workspaceId?: string
156
+ clusterName?: string
157
+ nacosName?: string
158
+ namespaceName?: string
159
+ namespaceId?: string
160
+ serviceName?: string
161
+ }
162
+
163
+ export type GetNacosServiceAPIRes = {
152
164
  }
@@ -6,13 +6,28 @@
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
8
8
  import * as SkoalaApiHostedV1alpha1Http from "./http.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
9
18
  export type CreateVirtualhostReq = {
10
19
  workspaceId?: string
11
20
  gatewayName?: string
12
21
  clusterName?: string
13
22
  namespaceName?: string
23
+ virtualhostConfig?: VirtualhostConfig
24
+ }
25
+
26
+ export type VirtualhostConfig = {
14
27
  fqdn?: string
15
28
  protocol?: SkoalaApiHostedV1alpha1Http.Protocol
29
+ rateLimitPolicy?: RateLimitPolicy
30
+ corsPolicy?: CorsPolicy
16
31
  }
17
32
 
18
33
  export type CreateVirtualhostRes = {
@@ -34,6 +49,7 @@ export type VirtualhostInfo = {
34
49
  protocol?: SkoalaApiHostedV1alpha1Http.Protocol
35
50
  secretName?: string
36
51
  namespaceName?: string
52
+ apiCount?: number
37
53
  updatedAt?: string
38
54
  }
39
55
 
@@ -53,6 +69,8 @@ export type GetVirtualhostReq = {
53
69
  export type GetVirtualhostRes = {
54
70
  fqdn?: string
55
71
  protocol?: SkoalaApiHostedV1alpha1Http.Protocol
72
+ rateLimitPolicy?: RateLimitPolicy
73
+ corsPolicy?: CorsPolicy
56
74
  }
57
75
 
58
76
  export type UpdateVirtualhostReq = {
@@ -60,8 +78,8 @@ export type UpdateVirtualhostReq = {
60
78
  gatewayName?: string
61
79
  clusterName?: string
62
80
  namespaceName?: string
81
+ virtualhostConfig?: VirtualhostConfig
63
82
  fqdn?: string
64
- protocol?: SkoalaApiHostedV1alpha1Http.Protocol
65
83
  }
66
84
 
67
85
  export type UpdateVirtualhostRes = {
@@ -81,9 +99,59 @@ export type DeleteVirtualhostRes = {
81
99
  }
82
100
 
83
101
  export type CorsPolicy = {
102
+ allowCredentials?: boolean
103
+ allowHeaders?: string[]
104
+ allowOrigin?: string[]
105
+ exposeHeaders?: string[]
106
+ maxAge?: string
107
+ allowMethod?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
84
108
  }
85
109
 
86
110
  export type RateLimitPolicy = {
111
+ global?: GlobalRateLimitPolicy
112
+ local?: LocalRateLimitPolicy
113
+ }
114
+
115
+ export type GlobalRateLimitPolicy = {
116
+ descriptors?: RateLimitDescriptor[]
117
+ }
118
+
119
+ export type RateLimitDescriptor = {
120
+ entries?: RateLimitDescriptorEntry[]
121
+ }
122
+
123
+
124
+ type BaseRateLimitDescriptorEntry = {
125
+ }
126
+
127
+ export type RateLimitDescriptorEntry = BaseRateLimitDescriptorEntry
128
+ & OneOf<{ genericKey: GenericKeyDescriptor; requestHeader: RequestHeaderDescriptor; requestHeaderValueMatch: RequestHeaderValueMatchDescriptor; remoteAddress: RemoteAddressDescriptor }>
129
+
130
+ export type GenericKeyDescriptor = {
131
+ key?: string
132
+ value?: string
133
+ }
134
+
135
+ export type RequestHeaderDescriptor = {
136
+ headerName?: string
137
+ descriptorKey?: string
138
+ }
139
+
140
+ export type RequestHeaderValueMatchDescriptor = {
141
+ headers?: SkoalaApiHostedV1alpha1Http.HeaderRule[]
142
+ expectMatch?: boolean
143
+ value?: string
144
+ }
145
+
146
+ export type RemoteAddressDescriptor = {
147
+ }
148
+
149
+ export type LocalRateLimitPolicy = {
150
+ burst?: number
151
+ request?: number
152
+ responseHeadersToAdd?: SkoalaApiHostedV1alpha1Http.Header[]
153
+ responseStatusCode?: number
154
+ unit?: SkoalaApiHostedV1alpha1Http.TimeUnit
87
155
  }
88
156
 
89
157
  export type Tls = {
@@ -44,6 +44,9 @@ export type GetServiceRes = {
44
44
  service?: Service
45
45
  }
46
46
 
47
+ export type GetServiceAPIRes = {
48
+ }
49
+
47
50
  export type NamespaceWithGroup = {
48
51
  id?: string
49
52
  name?: string
@@ -72,6 +72,9 @@ export class Registry {
72
72
  static GetService(req: SkoalaApiIntegratedV1alpha1Service.GetServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Service.GetServiceRes> {
73
73
  return fm.fetchReq<SkoalaApiIntegratedV1alpha1Service.GetServiceReq, SkoalaApiIntegratedV1alpha1Service.GetServiceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "registryId", "serviceName"])}`, {...initReq, method: "GET"})
74
74
  }
75
+ static GetServiceAPI(req: SkoalaApiIntegratedV1alpha1Service.GetServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Service.GetServiceAPIRes> {
76
+ return fm.fetchReq<SkoalaApiIntegratedV1alpha1Service.GetServiceReq, SkoalaApiIntegratedV1alpha1Service.GetServiceAPIRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}/services/${req["serviceName"]}/apis?${fm.renderURLSearchParams(req, ["workspaceId", "registryId", "serviceName"])}`, {...initReq, method: "GET"})
77
+ }
75
78
  static ListInstance(req: SkoalaApiIntegratedV1alpha1Instance.ListInstanceReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Instance.ListInstanceRes> {
76
79
  return fm.fetchReq<SkoalaApiIntegratedV1alpha1Instance.ListInstanceReq, SkoalaApiIntegratedV1alpha1Instance.ListInstanceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}/services/${req["serviceName"]}/instances?${fm.renderURLSearchParams(req, ["workspaceId", "registryId", "serviceName"])}`, {...initReq, method: "GET"})
77
80
  }
@@ -101,6 +104,12 @@ export class Nacos {
101
104
  static ListService(req: SkoalaApiHostedV1alpha1Nacos.ListNacosServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceRes> {
102
105
  return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceReq, SkoalaApiHostedV1alpha1Nacos.ListNacosServiceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["namespaceId"]}/services?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "namespaceId"])}`, {...initReq, method: "GET"})
103
106
  }
107
+ static GetService(req: SkoalaApiHostedV1alpha1Nacos.GetNacosServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes> {
108
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceReq, SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["namespaceId"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "namespaceId", "serviceName"])}`, {...initReq, method: "GET"})
109
+ }
110
+ static GetServiceAPI(req: SkoalaApiHostedV1alpha1Nacos.GetNacosServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes> {
111
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceReq, SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["namespaceId"]}/services/${req["serviceName"]}/apis?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "namespaceId", "serviceName"])}`, {...initReq, method: "GET"})
112
+ }
104
113
  static ListNamespace(req: SkoalaApiHostedV1alpha1Nacos.ListNacosServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceRes> {
105
114
  return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceReq, SkoalaApiHostedV1alpha1Nacos.ListNacosServiceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName"])}`, {...initReq, method: "GET"})
106
115
  }
@@ -0,0 +1 @@
1
+ export default {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.5.1-70",
3
+ "version": "0.5.1-76",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {