@daocloud-proto/skoala 0.30.0-32 → 0.30.0-38
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.
|
@@ -99,4 +99,27 @@ type BaseRouteRule = {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export type RouteRule = BaseRouteRule
|
|
102
|
-
& OneOf<{ routeAction: SkoalaApiHostedV1alpha1Api.RouteAction; redirect: SkoalaApiHostedV1alpha1Api.RedirectAction; directResponse: SkoalaApiHostedV1alpha1Api.DirectResponse }>
|
|
102
|
+
& OneOf<{ routeAction: SkoalaApiHostedV1alpha1Api.RouteAction; redirect: SkoalaApiHostedV1alpha1Api.RedirectAction; directResponse: SkoalaApiHostedV1alpha1Api.DirectResponse }>
|
|
103
|
+
|
|
104
|
+
export type APIDebugReq = {
|
|
105
|
+
workspaceId?: string
|
|
106
|
+
gatewayName?: string
|
|
107
|
+
clusterName?: string
|
|
108
|
+
namespaceName?: string
|
|
109
|
+
apiName?: string
|
|
110
|
+
method?: string
|
|
111
|
+
path?: string
|
|
112
|
+
body?: string
|
|
113
|
+
query?: {[key: string]: string}
|
|
114
|
+
header?: {[key: string]: string}
|
|
115
|
+
scheme?: string
|
|
116
|
+
insecureSkipVerify?: boolean
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type APIDebugRes = {
|
|
120
|
+
status?: string
|
|
121
|
+
latency?: string
|
|
122
|
+
log?: string
|
|
123
|
+
request?: string
|
|
124
|
+
response?: string
|
|
125
|
+
}
|
|
@@ -10,6 +10,9 @@ import * as SkoalaApiGeneralV1alpha2Skoala from "../../general/v1alpha2/skoala.p
|
|
|
10
10
|
import * as SkoalaApiHostedV1alpha2Gateway_api from "../../hosted/v1alpha2/gateway_api.pb"
|
|
11
11
|
import * as SkoalaApiHostedV1alpha2Gateway_service from "../../hosted/v1alpha2/gateway_service.pb"
|
|
12
12
|
export class GatewayAPI {
|
|
13
|
+
static DebugGatewayAPI(req: SkoalaApiHostedV1alpha2Gateway_api.APIDebugReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha2Gateway_api.APIDebugRes> {
|
|
14
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha2Gateway_api.APIDebugReq, SkoalaApiHostedV1alpha2Gateway_api.APIDebugRes>(`/apis/sesame.skoala.io/v1alpha2/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}/debug`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
15
|
+
}
|
|
13
16
|
static CreateGatewayAPI(req: SkoalaApiHostedV1alpha2Gateway_api.CreateAPIReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
14
17
|
return fm.fetchReq<SkoalaApiHostedV1alpha2Gateway_api.CreateAPIReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha2/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
15
18
|
}
|