@daocloud-proto/skoala 0.4.1-21 → 0.4.1-31

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.
@@ -0,0 +1,20 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ export enum HttpMethod {
8
+ GET = "GET",
9
+ POST = "POST",
10
+ DELETE = "DELETE",
11
+ PUT = "PUT",
12
+ PATCH = "PATCH",
13
+ OPTION = "OPTION",
14
+ ALL = "ALL",
15
+ }
16
+
17
+ export enum Protocol {
18
+ HTTP = "HTTP",
19
+ HTTPS = "HTTPS",
20
+ }
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
8
+ import * as SkoalaApiHostedV1alpha1Api-basic from "./api-basic.pb"
8
9
 
9
10
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
11
  type OneOf<T> =
@@ -15,11 +16,6 @@ type OneOf<T> =
15
16
  : never)
16
17
  : never);
17
18
 
18
- export enum Protocol {
19
- HTTP = "HTTP",
20
- HTTPS = "HTTPS",
21
- }
22
-
23
19
  export enum ValueMatchType {
24
20
  CONTAIN = "CONTAIN",
25
21
  EXACT = "EXACT",
@@ -29,16 +25,6 @@ export enum ValueMatchType {
29
25
  NOT_PRESENT = "NOT_PRESENT",
30
26
  }
31
27
 
32
- export enum HttpMethod {
33
- GET = "GET",
34
- POST = "POST",
35
- DELETE = "DELETE",
36
- PUT = "PUT",
37
- PATCH = "PATCH",
38
- OPTION = "OPTION",
39
- ALL = "ALL",
40
- }
41
-
42
28
  export enum RedirectResponseCode {
43
29
  MOVED_PERMANENTLY = "MOVED_PERMANENTLY",
44
30
  FOUND = "FOUND",
@@ -65,6 +51,7 @@ export type CreateAPIReq = {
65
51
  workspaceId?: string
66
52
  gatewayName?: string
67
53
  clusterName?: string
54
+ namespaceName?: string
68
55
  apiConfig?: APIConfig
69
56
  }
70
57
 
@@ -73,6 +60,7 @@ export type UpdateAPIReq = {
73
60
  workspaceId?: string
74
61
  gatewayName?: string
75
62
  clusterName?: string
63
+ namespaceName?: string
76
64
  apiConfig?: APIConfig
77
65
  }
78
66
 
@@ -90,6 +78,7 @@ export type GetAPIReq = {
90
78
  clusterName?: string
91
79
  gatewayName?: string
92
80
  apiName?: string
81
+ namespaceName?: string
93
82
  }
94
83
 
95
84
  export type DeleteAPIReq = {
@@ -97,6 +86,7 @@ export type DeleteAPIReq = {
97
86
  clusterName?: string
98
87
  gatewayName?: string
99
88
  apiName?: string
89
+ namespaceName?: string
100
90
  }
101
91
 
102
92
  export type GetAPIRes = {
@@ -117,7 +107,7 @@ export type ServiceDetail = {
117
107
  serviceName?: string
118
108
  registrationId?: string
119
109
  address?: string
120
- protocol?: Protocol
110
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
121
111
  port?: number
122
112
  weight?: string
123
113
  nacosNamespaceId?: string
@@ -140,7 +130,7 @@ export type APIConfig = BaseAPIConfig
140
130
 
141
131
  export type Virtualhost = {
142
132
  fqdn?: string
143
- protocol?: Protocol
133
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
144
134
  }
145
135
 
146
136
  export type Certificate = {
@@ -149,7 +139,7 @@ export type Certificate = {
149
139
 
150
140
 
151
141
  type BaseMatchRule = {
152
- httpMethod?: HttpMethod[]
142
+ httpMethod?: SkoalaApiHostedV1alpha1Api-basic.HttpMethod[]
153
143
  headers?: HeaderRule[]
154
144
  }
155
145
 
@@ -170,7 +160,7 @@ export type RouteAction = {
170
160
 
171
161
 
172
162
  type BaseRouteService = {
173
- protocol?: Protocol
163
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
174
164
  port?: number
175
165
  weight?: number
176
166
  }
@@ -228,7 +218,7 @@ export type RedirectAction = {
228
218
  path?: string
229
219
  port?: number
230
220
  statusCode?: number
231
- protocol?: Protocol
221
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
232
222
  }
233
223
 
234
224
  export type DirectResponse = {
@@ -240,6 +230,7 @@ export type APIListReq = {
240
230
  workspaceId?: string
241
231
  clusterName?: string
242
232
  gatewayName?: string
233
+ namespaceName?: string
243
234
  page?: number
244
235
  pageSize?: number
245
236
  }
@@ -252,7 +243,7 @@ export type APIListRes = {
252
243
  export type APIInfo = {
253
244
  apiName?: string
254
245
  fqdn?: string
255
- method?: HttpMethod[]
246
+ method?: SkoalaApiHostedV1alpha1Api-basic.HttpMethod[]
256
247
  requestPath?: string
257
248
  routeType?: RouteType
258
249
  apiStatus?: APIStatus
@@ -0,0 +1,96 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
8
+ import * as SkoalaApiHostedV1alpha1Api-basic from "./api-basic.pb"
9
+ export type CreateVirtualhostReq = {
10
+ workspaceId?: string
11
+ gatewayName?: string
12
+ clusterName?: string
13
+ namespaceName?: string
14
+ fqdn?: string
15
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
16
+ }
17
+
18
+ export type CreateVirtualhostRes = {
19
+ fqdn?: string
20
+ }
21
+
22
+ export type ListVirtualhostReq = {
23
+ workspaceId?: string
24
+ clusterName?: string
25
+ gatewayName?: string
26
+ namespaceName?: string
27
+ fqdn?: string
28
+ page?: number
29
+ pageSize?: number
30
+ }
31
+
32
+ export type VirtualhostInfo = {
33
+ fqdn?: string
34
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
35
+ secretName?: string
36
+ namespaceName?: string
37
+ updatedAt?: string
38
+ }
39
+
40
+ export type ListVirtualhostRes = {
41
+ virtualhost?: VirtualhostInfo[]
42
+ pagination?: SkoalaApiGeneralV1alpha1Skoala.Pagination
43
+ }
44
+
45
+ export type GetVirtualhostReq = {
46
+ workspaceId?: string
47
+ clusterName?: string
48
+ gatewayName?: string
49
+ namespaceName?: string
50
+ fqdn?: string
51
+ }
52
+
53
+ export type GetVirtualhostRes = {
54
+ fqdn?: string
55
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
56
+ }
57
+
58
+ export type UpdateVirtualhostReq = {
59
+ workspaceId?: string
60
+ gatewayName?: string
61
+ clusterName?: string
62
+ namespaceName?: string
63
+ fqdn?: string
64
+ protocol?: SkoalaApiHostedV1alpha1Api-basic.Protocol
65
+ }
66
+
67
+ export type UpdateVirtualhostRes = {
68
+ fqdn?: string
69
+ }
70
+
71
+ export type DeleteVirtualhostReq = {
72
+ workspaceId?: string
73
+ gatewayName?: string
74
+ clusterName?: string
75
+ namespaceName?: string
76
+ fqdn?: string
77
+ }
78
+
79
+ export type DeleteVirtualhostRes = {
80
+ fqdn?: string
81
+ }
82
+
83
+ export type CorsPolicy = {
84
+ }
85
+
86
+ export type RateLimitPolicy = {
87
+ }
88
+
89
+ export type Tls = {
90
+ }
91
+
92
+ export type Authorization = {
93
+ }
94
+
95
+ export type AuthPolicy = {
96
+ }
@@ -12,6 +12,7 @@ import * as SkoalaApiHostedV1alpha1Api from "../../hosted/v1alpha1/api.pb"
12
12
  import * as SkoalaApiHostedV1alpha1Gateway from "../../hosted/v1alpha1/gateway.pb"
13
13
  import * as SkoalaApiHostedV1alpha1Nacos from "../../hosted/v1alpha1/nacos.pb"
14
14
  import * as SkoalaApiHostedV1alpha1Sentinel from "../../hosted/v1alpha1/sentinel.pb"
15
+ import * as SkoalaApiHostedV1alpha1Virtualhost from "../../hosted/v1alpha1/virtualhost.pb"
15
16
  import * as SkoalaApiIntegratedV1alpha1Instance from "../../integrated/v1alpha1/instance.pb"
16
17
  import * as SkoalaApiIntegratedV1alpha1Registry from "../../integrated/v1alpha1/registry.pb"
17
18
  import * as SkoalaApiIntegratedV1alpha1Service from "../../integrated/v1alpha1/service.pb"
@@ -137,19 +138,34 @@ export class Gateway {
137
138
  static GetGatewayStatus(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusRes> {
138
139
  return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/status?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
139
140
  }
141
+ static CreateVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostRes> {
142
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
143
+ }
144
+ static ListVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.ListVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.ListVirtualhostRes> {
145
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.ListVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.ListVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
146
+ }
147
+ static GetVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.GetVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.GetVirtualhostRes> {
148
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.GetVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.GetVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts/${req["fqdn"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName", "fqdn"])}`, {...initReq, method: "GET"})
149
+ }
150
+ static DeleteVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.DeleteVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.DeleteVirtualhostRes> {
151
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.DeleteVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.DeleteVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts/${req["fqdn"]}`, {...initReq, method: "DELETE"})
152
+ }
153
+ static UpdateVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.UpdateVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.UpdateVirtualhostRes> {
154
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.UpdateVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.UpdateVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts/${req["fqdn"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
155
+ }
140
156
  static CreateAPI(req: SkoalaApiHostedV1alpha1Api.CreateAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.CreateAPIRes> {
141
- return fm.fetchReq<SkoalaApiHostedV1alpha1Api.CreateAPIReq, SkoalaApiHostedV1alpha1Api.CreateAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways/${req["gatewayName"]}/apis`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
157
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.CreateAPIReq, SkoalaApiHostedV1alpha1Api.CreateAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
142
158
  }
143
159
  static ListAPI(req: SkoalaApiHostedV1alpha1Api.APIListReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.APIListRes> {
144
- return fm.fetchReq<SkoalaApiHostedV1alpha1Api.APIListReq, SkoalaApiHostedV1alpha1Api.APIListRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways/${req["gatewayName"]}/apis?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "gatewayName"])}`, {...initReq, method: "GET"})
160
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.APIListReq, SkoalaApiHostedV1alpha1Api.APIListRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
145
161
  }
146
162
  static GetAPI(req: SkoalaApiHostedV1alpha1Api.GetAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.GetAPIRes> {
147
- return fm.fetchReq<SkoalaApiHostedV1alpha1Api.GetAPIReq, SkoalaApiHostedV1alpha1Api.GetAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "gatewayName", "apiName"])}`, {...initReq, method: "GET"})
163
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.GetAPIReq, SkoalaApiHostedV1alpha1Api.GetAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName", "apiName"])}`, {...initReq, method: "GET"})
148
164
  }
149
165
  static DeleteAPI(req: SkoalaApiHostedV1alpha1Api.DeleteAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.DeleteAPIRes> {
150
- return fm.fetchReq<SkoalaApiHostedV1alpha1Api.DeleteAPIReq, SkoalaApiHostedV1alpha1Api.DeleteAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}`, {...initReq, method: "DELETE"})
166
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.DeleteAPIReq, SkoalaApiHostedV1alpha1Api.DeleteAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}`, {...initReq, method: "DELETE"})
151
167
  }
152
168
  static UpdateAPI(req: SkoalaApiHostedV1alpha1Api.UpdateAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.UpdateAPIRes> {
153
- return fm.fetchReq<SkoalaApiHostedV1alpha1Api.UpdateAPIReq, SkoalaApiHostedV1alpha1Api.UpdateAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
169
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Api.UpdateAPIReq, SkoalaApiHostedV1alpha1Api.UpdateAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
154
170
  }
155
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.4.1-21",
3
+ "version": "0.4.1-31",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {