@daocloud-proto/skoala 0.3.3-129 → 0.3.3-135

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.
@@ -4,6 +4,21 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum OrderBy {
8
+ desc = "desc",
9
+ asc = "asc",
10
+ }
11
+
12
+ export enum SortBy {
13
+ SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
14
+ field_name = "field_name",
15
+ state = "state",
16
+ workspace = "workspace",
17
+ cluster = "cluster",
18
+ namespace = "namespace",
19
+ created_at = "created_at",
20
+ }
21
+
7
22
  export enum Status {
8
23
  STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
9
24
  RUNNING = "RUNNING",
@@ -0,0 +1,260 @@
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
+
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
+ export enum Protocol {
19
+ HTTP = "HTTP",
20
+ HTTPS = "HTTPS",
21
+ }
22
+
23
+ export enum ValueMatchType {
24
+ CONTAIN = "CONTAIN",
25
+ EXACT = "EXACT",
26
+ NOT_CONTAIN = "NOT_CONTAIN",
27
+ NOT_EXACT = "NOT_EXACT",
28
+ PRESENT = "PRESENT",
29
+ NOT_PRESENT = "NOT_PRESENT",
30
+ }
31
+
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
+ export enum RedirectResponseCode {
43
+ MOVED_PERMANENTLY = "MOVED_PERMANENTLY",
44
+ FOUND = "FOUND",
45
+ SEE_OTHER = "SEE_OTHER",
46
+ TEMPORARY_REDIRECT = "TEMPORARY_REDIRECT",
47
+ PERMANENT_REDIRECT = "PERMANENT_REDIRECT",
48
+ }
49
+
50
+ export enum RouteType {
51
+ CLUSTRE_SERVER = "CLUSTRE_SERVER",
52
+ DIRECT = "DIRECT",
53
+ REDIRECT = "REDIRECT",
54
+ EXTERNAL = "EXTERNAL",
55
+ REGISTRY = "REGISTRY",
56
+ UNKNOW = "UNKNOW",
57
+ }
58
+
59
+ export enum APIStatus {
60
+ UP = "UP",
61
+ DOWN = "DOWN",
62
+ }
63
+
64
+ export type CreateAPIReq = {
65
+ workspaceId?: string
66
+ gatewayName?: string
67
+ clusterName?: string
68
+ apiConfig?: APIConfig
69
+ }
70
+
71
+ export type UpdateAPIReq = {
72
+ apiName?: string
73
+ workspaceId?: string
74
+ gatewayName?: string
75
+ clusterName?: string
76
+ apiConfig?: APIConfig
77
+ }
78
+
79
+ export type CreateAPIRes = {
80
+ }
81
+
82
+ export type UpdateAPIRes = {
83
+ }
84
+
85
+ export type DeleteAPIRes = {
86
+ }
87
+
88
+ export type GetAPIReq = {
89
+ workspaceId?: string
90
+ clusterName?: string
91
+ gatewayName?: string
92
+ apiName?: string
93
+ }
94
+
95
+ export type DeleteAPIReq = {
96
+ workspaceId?: string
97
+ clusterName?: string
98
+ gatewayName?: string
99
+ apiName?: string
100
+ }
101
+
102
+ export type GetAPIRes = {
103
+ apiName?: string
104
+ apiStatus?: APIStatus
105
+ fqdn?: string
106
+ matchRule?: MatchRule
107
+ targetService?: TargetService
108
+ }
109
+
110
+ export type TargetService = {
111
+ serviceList?: ServiceDetail[]
112
+ }
113
+
114
+ export type ServiceDetail = {
115
+ clusterName?: string
116
+ k8SNamespaceName?: string
117
+ serviceName?: string
118
+ registrationId?: string
119
+ address?: string
120
+ protocol?: Protocol
121
+ port?: number
122
+ weight?: string
123
+ nacosNamespaceId?: string
124
+ groupName?: string
125
+ routeType?: RouteType
126
+ path?: string
127
+ statusCode?: number
128
+ }
129
+
130
+
131
+ type BaseAPIConfig = {
132
+ apiName?: string
133
+ virtualhost?: Virtualhost
134
+ matchRule?: MatchRule
135
+ enabled?: boolean
136
+ }
137
+
138
+ export type APIConfig = BaseAPIConfig
139
+ & OneOf<{ route: RouteAction; redirect: RedirectAction; directResponse: DirectResponse }>
140
+
141
+ export type Virtualhost = {
142
+ fqdn?: string
143
+ protocol?: Protocol
144
+ }
145
+
146
+ export type Certificate = {
147
+ namespace?: string
148
+ }
149
+
150
+
151
+ type BaseMatchRule = {
152
+ httpMethod?: HttpMethod[]
153
+ headers?: HeaderRule[]
154
+ }
155
+
156
+ export type MatchRule = BaseMatchRule
157
+ & OneOf<{ path: string; prefix: string }>
158
+
159
+
160
+ type BaseHeaderRule = {
161
+ name?: string
162
+ }
163
+
164
+ export type HeaderRule = BaseHeaderRule
165
+ & OneOf<{ contains: string; exact: string; notContains: string; notExact: string; present: boolean; notPresent: boolean }>
166
+
167
+ export type RouteAction = {
168
+ routeService?: RouteService[]
169
+ }
170
+
171
+
172
+ type BaseRouteService = {
173
+ protocol?: Protocol
174
+ port?: number
175
+ weight?: number
176
+ }
177
+
178
+ export type RouteService = BaseRouteService
179
+ & OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService }>
180
+
181
+ export type KubernetesService = {
182
+ clusterId?: string
183
+ clusterName?: string
184
+ namespaceName?: string
185
+ serviceName?: string
186
+ address?: string
187
+ }
188
+
189
+ export type ExternalService = {
190
+ serviceName?: string
191
+ address?: string
192
+ }
193
+
194
+
195
+ type BaseRegistryService = {
196
+ registrationId?: string
197
+ }
198
+
199
+ export type RegistryService = BaseRegistryService
200
+ & OneOf<{ eurekaService: EurekaService; nacosService: NacosService; zookeeperService: ZookeeperService; kubernetesService: KubernetesService }>
201
+
202
+ export type EurekaService = {
203
+ address?: string
204
+ serviceName?: string
205
+ }
206
+
207
+ export type NacosService = {
208
+ address?: string
209
+ serviceName?: string
210
+ namespaceId?: string
211
+ groupName?: string
212
+ }
213
+
214
+ export type ZookeeperService = {
215
+ address?: string
216
+ serviceName?: string
217
+ }
218
+
219
+ export type MeshService = {
220
+ instanceId?: string
221
+ }
222
+
223
+ export type ApplicationService = {
224
+ }
225
+
226
+ export type RedirectAction = {
227
+ hostname?: string
228
+ path?: string
229
+ port?: number
230
+ statusCode?: number
231
+ protocol?: Protocol
232
+ }
233
+
234
+ export type DirectResponse = {
235
+ statusCode?: number
236
+ body?: string
237
+ }
238
+
239
+ export type APIListReq = {
240
+ workspaceId?: string
241
+ clusterName?: string
242
+ gatewayName?: string
243
+ page?: number
244
+ pageSize?: number
245
+ }
246
+
247
+ export type APIListRes = {
248
+ api?: APIInfo[]
249
+ pagination?: SkoalaApiGeneralV1alpha1Skoala.Pagination
250
+ }
251
+
252
+ export type APIInfo = {
253
+ apiName?: string
254
+ fqdn?: string
255
+ method?: HttpMethod[]
256
+ requestPath?: string
257
+ routeType?: RouteType
258
+ apiStatus?: APIStatus
259
+ updatedAt?: string
260
+ }
@@ -8,6 +8,7 @@ import * as fm from "../../../fetch.pb"
8
8
  import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
9
9
  import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
10
10
  import * as SkoalaApiGeneralV1alpha1Version from "../../general/v1alpha1/version.pb"
11
+ import * as SkoalaApiHostedV1alpha1Api from "../../hosted/v1alpha1/api.pb"
11
12
  import * as SkoalaApiHostedV1alpha1Gateway from "../../hosted/v1alpha1/gateway.pb"
12
13
  import * as SkoalaApiHostedV1alpha1Nacos from "../../hosted/v1alpha1/nacos.pb"
13
14
  import * as SkoalaApiHostedV1alpha1Sentinel from "../../hosted/v1alpha1/sentinel.pb"
@@ -136,4 +137,19 @@ export class Gateway {
136
137
  static GetGatewayStatus(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusRes> {
137
138
  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"})
138
139
  }
140
+ 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)})
142
+ }
143
+ 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"})
145
+ }
146
+ 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"})
148
+ }
149
+ 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"})
151
+ }
152
+ 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)})
154
+ }
139
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.3.3-129",
3
+ "version": "0.3.3-135",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,266 @@
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 GoogleProtobufDuration from "../google/protobuf/duration.pb"
8
+ import * as GoogleProtobufTimestamp from "../google/protobuf/timestamp.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);
18
+
19
+ export enum KnownRegex {
20
+ UNKNOWN = "UNKNOWN",
21
+ HTTP_HEADER_NAME = "HTTP_HEADER_NAME",
22
+ HTTP_HEADER_VALUE = "HTTP_HEADER_VALUE",
23
+ }
24
+
25
+
26
+ type BaseFieldRules = {
27
+ message?: MessageRules
28
+ }
29
+
30
+ export type FieldRules = BaseFieldRules
31
+ & OneOf<{ float: FloatRules; double: DoubleRules; int32: Int32Rules; int64: Int64Rules; uint32: UInt32Rules; uint64: UInt64Rules; sint32: SInt32Rules; sint64: SInt64Rules; fixed32: Fixed32Rules; fixed64: Fixed64Rules; sfixed32: SFixed32Rules; sfixed64: SFixed64Rules; bool: BoolRules; string: StringRules; bytes: BytesRules; enum: EnumRules; repeated: RepeatedRules; map: MapRules; any: AnyRules; duration: DurationRules; timestamp: TimestampRules }>
32
+
33
+ export type FloatRules = {
34
+ const?: number
35
+ lt?: number
36
+ lte?: number
37
+ gt?: number
38
+ gte?: number
39
+ in?: number[]
40
+ notIn?: number[]
41
+ ignoreEmpty?: boolean
42
+ }
43
+
44
+ export type DoubleRules = {
45
+ const?: number
46
+ lt?: number
47
+ lte?: number
48
+ gt?: number
49
+ gte?: number
50
+ in?: number[]
51
+ notIn?: number[]
52
+ ignoreEmpty?: boolean
53
+ }
54
+
55
+ export type Int32Rules = {
56
+ const?: number
57
+ lt?: number
58
+ lte?: number
59
+ gt?: number
60
+ gte?: number
61
+ in?: number[]
62
+ notIn?: number[]
63
+ ignoreEmpty?: boolean
64
+ }
65
+
66
+ export type Int64Rules = {
67
+ const?: string
68
+ lt?: string
69
+ lte?: string
70
+ gt?: string
71
+ gte?: string
72
+ in?: string[]
73
+ notIn?: string[]
74
+ ignoreEmpty?: boolean
75
+ }
76
+
77
+ export type UInt32Rules = {
78
+ const?: number
79
+ lt?: number
80
+ lte?: number
81
+ gt?: number
82
+ gte?: number
83
+ in?: number[]
84
+ notIn?: number[]
85
+ ignoreEmpty?: boolean
86
+ }
87
+
88
+ export type UInt64Rules = {
89
+ const?: string
90
+ lt?: string
91
+ lte?: string
92
+ gt?: string
93
+ gte?: string
94
+ in?: string[]
95
+ notIn?: string[]
96
+ ignoreEmpty?: boolean
97
+ }
98
+
99
+ export type SInt32Rules = {
100
+ const?: number
101
+ lt?: number
102
+ lte?: number
103
+ gt?: number
104
+ gte?: number
105
+ in?: number[]
106
+ notIn?: number[]
107
+ ignoreEmpty?: boolean
108
+ }
109
+
110
+ export type SInt64Rules = {
111
+ const?: string
112
+ lt?: string
113
+ lte?: string
114
+ gt?: string
115
+ gte?: string
116
+ in?: string[]
117
+ notIn?: string[]
118
+ ignoreEmpty?: boolean
119
+ }
120
+
121
+ export type Fixed32Rules = {
122
+ const?: number
123
+ lt?: number
124
+ lte?: number
125
+ gt?: number
126
+ gte?: number
127
+ in?: number[]
128
+ notIn?: number[]
129
+ ignoreEmpty?: boolean
130
+ }
131
+
132
+ export type Fixed64Rules = {
133
+ const?: string
134
+ lt?: string
135
+ lte?: string
136
+ gt?: string
137
+ gte?: string
138
+ in?: string[]
139
+ notIn?: string[]
140
+ ignoreEmpty?: boolean
141
+ }
142
+
143
+ export type SFixed32Rules = {
144
+ const?: number
145
+ lt?: number
146
+ lte?: number
147
+ gt?: number
148
+ gte?: number
149
+ in?: number[]
150
+ notIn?: number[]
151
+ ignoreEmpty?: boolean
152
+ }
153
+
154
+ export type SFixed64Rules = {
155
+ const?: string
156
+ lt?: string
157
+ lte?: string
158
+ gt?: string
159
+ gte?: string
160
+ in?: string[]
161
+ notIn?: string[]
162
+ ignoreEmpty?: boolean
163
+ }
164
+
165
+ export type BoolRules = {
166
+ const?: boolean
167
+ }
168
+
169
+
170
+ type BaseStringRules = {
171
+ const?: string
172
+ len?: string
173
+ minLen?: string
174
+ maxLen?: string
175
+ lenBytes?: string
176
+ minBytes?: string
177
+ maxBytes?: string
178
+ pattern?: string
179
+ prefix?: string
180
+ suffix?: string
181
+ contains?: string
182
+ notContains?: string
183
+ in?: string[]
184
+ notIn?: string[]
185
+ strict?: boolean
186
+ ignoreEmpty?: boolean
187
+ }
188
+
189
+ export type StringRules = BaseStringRules
190
+ & OneOf<{ email: boolean; hostname: boolean; ip: boolean; ipv4: boolean; ipv6: boolean; uri: boolean; uriRef: boolean; address: boolean; uuid: boolean; wellKnownRegex: KnownRegex }>
191
+
192
+
193
+ type BaseBytesRules = {
194
+ const?: Uint8Array
195
+ len?: string
196
+ minLen?: string
197
+ maxLen?: string
198
+ pattern?: string
199
+ prefix?: Uint8Array
200
+ suffix?: Uint8Array
201
+ contains?: Uint8Array
202
+ in?: Uint8Array[]
203
+ notIn?: Uint8Array[]
204
+ ignoreEmpty?: boolean
205
+ }
206
+
207
+ export type BytesRules = BaseBytesRules
208
+ & OneOf<{ ip: boolean; ipv4: boolean; ipv6: boolean }>
209
+
210
+ export type EnumRules = {
211
+ const?: number
212
+ definedOnly?: boolean
213
+ in?: number[]
214
+ notIn?: number[]
215
+ }
216
+
217
+ export type MessageRules = {
218
+ skip?: boolean
219
+ required?: boolean
220
+ }
221
+
222
+ export type RepeatedRules = {
223
+ minItems?: string
224
+ maxItems?: string
225
+ unique?: boolean
226
+ items?: FieldRules
227
+ ignoreEmpty?: boolean
228
+ }
229
+
230
+ export type MapRules = {
231
+ minPairs?: string
232
+ maxPairs?: string
233
+ noSparse?: boolean
234
+ keys?: FieldRules
235
+ values?: FieldRules
236
+ ignoreEmpty?: boolean
237
+ }
238
+
239
+ export type AnyRules = {
240
+ required?: boolean
241
+ in?: string[]
242
+ notIn?: string[]
243
+ }
244
+
245
+ export type DurationRules = {
246
+ required?: boolean
247
+ const?: GoogleProtobufDuration.Duration
248
+ lt?: GoogleProtobufDuration.Duration
249
+ lte?: GoogleProtobufDuration.Duration
250
+ gt?: GoogleProtobufDuration.Duration
251
+ gte?: GoogleProtobufDuration.Duration
252
+ in?: GoogleProtobufDuration.Duration[]
253
+ notIn?: GoogleProtobufDuration.Duration[]
254
+ }
255
+
256
+ export type TimestampRules = {
257
+ required?: boolean
258
+ const?: GoogleProtobufTimestamp.Timestamp
259
+ lt?: GoogleProtobufTimestamp.Timestamp
260
+ lte?: GoogleProtobufTimestamp.Timestamp
261
+ gt?: GoogleProtobufTimestamp.Timestamp
262
+ gte?: GoogleProtobufTimestamp.Timestamp
263
+ ltNow?: boolean
264
+ gtNow?: boolean
265
+ within?: GoogleProtobufDuration.Duration
266
+ }