@daocloud-proto/skoala 0.6.0-8 → 0.6.1-12
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.
|
@@ -36,15 +36,6 @@ export enum GrpcRetryOnEnum {
|
|
|
36
36
|
unavailable = "unavailable",
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export enum ValueMatchType {
|
|
40
|
-
CONTAIN = "CONTAIN",
|
|
41
|
-
EXACT = "EXACT",
|
|
42
|
-
NOT_CONTAIN = "NOT_CONTAIN",
|
|
43
|
-
NOT_EXACT = "NOT_EXACT",
|
|
44
|
-
PRESENT = "PRESENT",
|
|
45
|
-
NOT_PRESENT = "NOT_PRESENT",
|
|
46
|
-
}
|
|
47
|
-
|
|
48
39
|
export enum RedirectResponseCode {
|
|
49
40
|
MOVED_PERMANENTLY = "MOVED_PERMANENTLY",
|
|
50
41
|
FOUND = "FOUND",
|
|
@@ -100,6 +91,13 @@ export type AdvancedAPIConfig = {
|
|
|
100
91
|
websocketPolicy?: WebsocketPolicy
|
|
101
92
|
healthCheckPolicy?: HealthCheckPolicy
|
|
102
93
|
rateLimitPolicy?: SkoalaApiHostedV1alpha1Virtualhost.RateLimitPolicy
|
|
94
|
+
requestHeadersPolicy?: HeaderPolicy
|
|
95
|
+
responseHeadersPolicy?: HeaderPolicy
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type HeaderPolicy = {
|
|
99
|
+
remove?: string[]
|
|
100
|
+
set?: SkoalaApiHostedV1alpha1Http.Header[]
|
|
103
101
|
}
|
|
104
102
|
|
|
105
103
|
export type HealthCheckPolicy = {
|
|
@@ -215,26 +213,6 @@ type BaseGetAPIRes = {
|
|
|
215
213
|
export type GetAPIRes = BaseGetAPIRes
|
|
216
214
|
& OneOf<{ route: RouteAction; redirect: RedirectAction; directResponse: DirectResponse }>
|
|
217
215
|
|
|
218
|
-
export type TargetService = {
|
|
219
|
-
serviceList?: ServiceDetail[]
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export type ServiceDetail = {
|
|
223
|
-
clusterName?: string
|
|
224
|
-
k8SNamespaceName?: string
|
|
225
|
-
serviceName?: string
|
|
226
|
-
registryId?: string
|
|
227
|
-
address?: string
|
|
228
|
-
protocol?: SkoalaApiHostedV1alpha1Http.Protocol
|
|
229
|
-
port?: number
|
|
230
|
-
weight?: string
|
|
231
|
-
nacosNamespaceId?: string
|
|
232
|
-
groupName?: string
|
|
233
|
-
routeType?: SkoalaApiHostedV1alpha1Http.RouteType
|
|
234
|
-
path?: string
|
|
235
|
-
statusCode?: number
|
|
236
|
-
}
|
|
237
|
-
|
|
238
216
|
|
|
239
217
|
type BaseAPIConfig = {
|
|
240
218
|
apiName?: string
|
|
@@ -246,15 +224,6 @@ type BaseAPIConfig = {
|
|
|
246
224
|
export type APIConfig = BaseAPIConfig
|
|
247
225
|
& OneOf<{ route: RouteAction; redirect: RedirectAction; directResponse: DirectResponse }>
|
|
248
226
|
|
|
249
|
-
export type Virtualhost = {
|
|
250
|
-
fqdn?: string
|
|
251
|
-
protocol?: SkoalaApiHostedV1alpha1Http.Protocol
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export type Certificate = {
|
|
255
|
-
namespace?: string
|
|
256
|
-
}
|
|
257
|
-
|
|
258
227
|
|
|
259
228
|
type BaseMatchRule = {
|
|
260
229
|
httpMethod?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
|
|
@@ -271,8 +240,8 @@ export type RouteAction = {
|
|
|
271
240
|
export type RouteService = {
|
|
272
241
|
protocol?: SkoalaApiHostedV1alpha1Http.Protocol
|
|
273
242
|
enableGrpc?: boolean
|
|
274
|
-
|
|
275
|
-
|
|
243
|
+
showServiceName?: string
|
|
244
|
+
sesameId?: string
|
|
276
245
|
port?: number
|
|
277
246
|
weight?: number
|
|
278
247
|
}
|
|
@@ -111,7 +111,7 @@ export type ListGatewayServiceRes = {
|
|
|
111
111
|
|
|
112
112
|
export type ServiceInfo = {
|
|
113
113
|
serviceName?: string
|
|
114
|
-
address?: Address
|
|
114
|
+
address?: Address[]
|
|
115
115
|
apiCount?: number
|
|
116
116
|
sourceInfo?: ServiceSourceInfo
|
|
117
117
|
createdAt?: string
|
|
@@ -131,6 +131,7 @@ export type ServiceSourceInfo = {
|
|
|
131
131
|
meshId?: string
|
|
132
132
|
meshName?: string
|
|
133
133
|
meshNamespaceName?: string
|
|
134
|
+
serviceName?: string
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
|
+
import * as GoogleApiHttpbody from "../../../google/api/httpbody.pb"
|
|
8
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
9
10
|
import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
|
|
10
11
|
import * as SkoalaApiGeneralV1alpha1Version from "../../general/v1alpha1/version.pb"
|
|
@@ -302,6 +303,9 @@ export class Gateway {
|
|
|
302
303
|
static ListGatewayLog(req: SkoalaApiHostedV1alpha1Apilog.SearchLogReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Apilog.SearchLogRes> {
|
|
303
304
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Apilog.SearchLogReq, SkoalaApiHostedV1alpha1Apilog.SearchLogRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/requestlogs?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
304
305
|
}
|
|
306
|
+
static GatewayLogExport(req: SkoalaApiHostedV1alpha1Apilog.SearchLogReq, entityNotifier?: fm.NotifyStreamEntityArrival<GoogleApiHttpbody.HttpBody>, initReq?: fm.InitReq): Promise<void> {
|
|
307
|
+
return fm.fetchStreamingRequest<SkoalaApiHostedV1alpha1Apilog.SearchLogReq, GoogleApiHttpbody.HttpBody>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/requestlogs/export?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, entityNotifier, {...initReq, method: "GET"})
|
|
308
|
+
}
|
|
305
309
|
static CreateGatewayRLS(req: SkoalaApiHostedV1alpha1Extension.CreateGatewayRLSReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Extension.CreateGatewayRLSRes> {
|
|
306
310
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Extension.CreateGatewayRLSReq, SkoalaApiHostedV1alpha1Extension.CreateGatewayRLSRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/extensions/rls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
307
311
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 GoogleProtobufAny from "../protobuf/any.pb"
|
|
8
|
+
export type HttpBody = {
|
|
9
|
+
contentType?: string
|
|
10
|
+
data?: Uint8Array
|
|
11
|
+
extensions?: GoogleProtobufAny.Any[]
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {}
|
|
@@ -0,0 +1,193 @@
|
|
|
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 GoogleProtobufStruct from "../google/protobuf/struct.pb"
|
|
8
|
+
|
|
9
|
+
export enum Scheme {
|
|
10
|
+
UNKNOWN = "UNKNOWN",
|
|
11
|
+
HTTP = "HTTP",
|
|
12
|
+
HTTPS = "HTTPS",
|
|
13
|
+
WS = "WS",
|
|
14
|
+
WSS = "WSS",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum JSONSchemaJSONSchemaSimpleTypes {
|
|
18
|
+
UNKNOWN = "UNKNOWN",
|
|
19
|
+
ARRAY = "ARRAY",
|
|
20
|
+
BOOLEAN = "BOOLEAN",
|
|
21
|
+
INTEGER = "INTEGER",
|
|
22
|
+
NULL = "NULL",
|
|
23
|
+
NUMBER = "NUMBER",
|
|
24
|
+
OBJECT = "OBJECT",
|
|
25
|
+
STRING = "STRING",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum SecuritySchemeType {
|
|
29
|
+
TYPE_INVALID = "TYPE_INVALID",
|
|
30
|
+
TYPE_BASIC = "TYPE_BASIC",
|
|
31
|
+
TYPE_API_KEY = "TYPE_API_KEY",
|
|
32
|
+
TYPE_OAUTH2 = "TYPE_OAUTH2",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum SecuritySchemeIn {
|
|
36
|
+
IN_INVALID = "IN_INVALID",
|
|
37
|
+
IN_QUERY = "IN_QUERY",
|
|
38
|
+
IN_HEADER = "IN_HEADER",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum SecuritySchemeFlow {
|
|
42
|
+
FLOW_INVALID = "FLOW_INVALID",
|
|
43
|
+
FLOW_IMPLICIT = "FLOW_IMPLICIT",
|
|
44
|
+
FLOW_PASSWORD = "FLOW_PASSWORD",
|
|
45
|
+
FLOW_APPLICATION = "FLOW_APPLICATION",
|
|
46
|
+
FLOW_ACCESS_CODE = "FLOW_ACCESS_CODE",
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type Swagger = {
|
|
50
|
+
swagger?: string
|
|
51
|
+
info?: Info
|
|
52
|
+
host?: string
|
|
53
|
+
basePath?: string
|
|
54
|
+
schemes?: Scheme[]
|
|
55
|
+
consumes?: string[]
|
|
56
|
+
produces?: string[]
|
|
57
|
+
responses?: {[key: string]: Response}
|
|
58
|
+
securityDefinitions?: SecurityDefinitions
|
|
59
|
+
security?: SecurityRequirement[]
|
|
60
|
+
externalDocs?: ExternalDocumentation
|
|
61
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type Operation = {
|
|
65
|
+
tags?: string[]
|
|
66
|
+
summary?: string
|
|
67
|
+
description?: string
|
|
68
|
+
externalDocs?: ExternalDocumentation
|
|
69
|
+
operationId?: string
|
|
70
|
+
consumes?: string[]
|
|
71
|
+
produces?: string[]
|
|
72
|
+
responses?: {[key: string]: Response}
|
|
73
|
+
schemes?: Scheme[]
|
|
74
|
+
deprecated?: boolean
|
|
75
|
+
security?: SecurityRequirement[]
|
|
76
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type Header = {
|
|
80
|
+
description?: string
|
|
81
|
+
type?: string
|
|
82
|
+
format?: string
|
|
83
|
+
default?: string
|
|
84
|
+
pattern?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type Response = {
|
|
88
|
+
description?: string
|
|
89
|
+
schema?: Schema
|
|
90
|
+
headers?: {[key: string]: Header}
|
|
91
|
+
examples?: {[key: string]: string}
|
|
92
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type Info = {
|
|
96
|
+
title?: string
|
|
97
|
+
description?: string
|
|
98
|
+
termsOfService?: string
|
|
99
|
+
contact?: Contact
|
|
100
|
+
license?: License
|
|
101
|
+
version?: string
|
|
102
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type Contact = {
|
|
106
|
+
name?: string
|
|
107
|
+
url?: string
|
|
108
|
+
email?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type License = {
|
|
112
|
+
name?: string
|
|
113
|
+
url?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type ExternalDocumentation = {
|
|
117
|
+
description?: string
|
|
118
|
+
url?: string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type Schema = {
|
|
122
|
+
jsonSchema?: JSONSchema
|
|
123
|
+
discriminator?: string
|
|
124
|
+
readOnly?: boolean
|
|
125
|
+
externalDocs?: ExternalDocumentation
|
|
126
|
+
example?: string
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type JSONSchemaFieldConfiguration = {
|
|
130
|
+
pathParamName?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type JSONSchema = {
|
|
134
|
+
ref?: string
|
|
135
|
+
title?: string
|
|
136
|
+
description?: string
|
|
137
|
+
default?: string
|
|
138
|
+
readOnly?: boolean
|
|
139
|
+
example?: string
|
|
140
|
+
multipleOf?: number
|
|
141
|
+
maximum?: number
|
|
142
|
+
exclusiveMaximum?: boolean
|
|
143
|
+
minimum?: number
|
|
144
|
+
exclusiveMinimum?: boolean
|
|
145
|
+
maxLength?: string
|
|
146
|
+
minLength?: string
|
|
147
|
+
pattern?: string
|
|
148
|
+
maxItems?: string
|
|
149
|
+
minItems?: string
|
|
150
|
+
uniqueItems?: boolean
|
|
151
|
+
maxProperties?: string
|
|
152
|
+
minProperties?: string
|
|
153
|
+
required?: string[]
|
|
154
|
+
array?: string[]
|
|
155
|
+
type?: JSONSchemaJSONSchemaSimpleTypes[]
|
|
156
|
+
format?: string
|
|
157
|
+
enum?: string[]
|
|
158
|
+
fieldConfiguration?: JSONSchemaFieldConfiguration
|
|
159
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export type Tag = {
|
|
163
|
+
description?: string
|
|
164
|
+
externalDocs?: ExternalDocumentation
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type SecurityDefinitions = {
|
|
168
|
+
security?: {[key: string]: SecurityScheme}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type SecurityScheme = {
|
|
172
|
+
type?: SecuritySchemeType
|
|
173
|
+
description?: string
|
|
174
|
+
name?: string
|
|
175
|
+
in?: SecuritySchemeIn
|
|
176
|
+
flow?: SecuritySchemeFlow
|
|
177
|
+
authorizationUrl?: string
|
|
178
|
+
tokenUrl?: string
|
|
179
|
+
scopes?: Scopes
|
|
180
|
+
extensions?: {[key: string]: GoogleProtobufStruct.Value}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type SecurityRequirementSecurityRequirementValue = {
|
|
184
|
+
scope?: string[]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type SecurityRequirement = {
|
|
188
|
+
securityRequirement?: {[key: string]: SecurityRequirementSecurityRequirementValue}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type Scopes = {
|
|
192
|
+
scope?: {[key: string]: string}
|
|
193
|
+
}
|