@daocloud-proto/skoala 0.3.2 → 0.3.3-109
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.
- package/api/general/v1alpha1/skoala.pb.ts +19 -7
- package/api/hosted/v1alpha1/gateway.pb.ts +112 -59
- package/api/hosted/v1alpha1/nacos.pb.ts +92 -2
- package/api/integrated/v1alpha1/insight.pb.ts +19 -4
- package/api/integrated/v1alpha1/instance.pb.ts +29 -19
- package/api/integrated/v1alpha1/registry.pb.ts +6 -5
- package/api/integrated/v1alpha1/service.pb.ts +8 -11
- package/api/skoala/v1alpha1/book.pb.ts +2 -2
- package/api/skoala/v1alpha1/skoala.pb.ts +25 -13
- package/feature_gate/v1alpha1/feature_gate.pb.ts +27 -0
- package/fetch.pb.ts +109 -0
- package/github.com/mwitkow/go-proto-validators/validator.pb.ts +29 -0
- package/google/api/annotations.pb.ts +1 -0
- package/google/api/http.pb.ts +34 -0
- package/google/protobuf/any.pb.ts +9 -0
- package/google/protobuf/api.pb.ts +32 -0
- package/google/protobuf/descriptor.pb.ts +262 -0
- package/google/protobuf/duration.pb.ts +9 -0
- package/google/protobuf/empty.pb.ts +7 -0
- package/google/protobuf/field_mask.pb.ts +8 -0
- package/google/protobuf/struct.pb.ts +33 -0
- package/google/protobuf/timestamp.pb.ts +9 -0
- package/google/protobuf/type.pb.ts +83 -0
- package/google/protobuf/wrappers.pb.ts +40 -0
- package/google/rpc/status.pb.ts +12 -0
- package/insight/v1alpha1/alert.pb.ts +292 -0
- package/insight/v1alpha1/notify.pb.ts +84 -0
- package/log/v1alpha1/log.pb.ts +103 -0
- package/metric/v1alpha1/metric.pb.ts +98 -0
- package/package.json +1 -1
- package/resource/v1alpha1/cluster.pb.ts +102 -0
- package/resource/v1alpha1/job.pb.ts +93 -0
- package/resource/v1alpha1/node.pb.ts +62 -0
- package/resource/v1alpha1/pod.pb.ts +82 -0
- package/resource/v1alpha1/service.pb.ts +61 -0
- package/resource/v1alpha1/type.pb.ts +9 -0
- package/resource/v1alpha1/workload.pb.ts +69 -0
- package/span_metric/v1alpha1/openmetrics.pb.ts +130 -0
- package/span_metric/v1alpha1/otelspankind.pb.ts +14 -0
- package/span_metric/v1alpha1/span_metric.pb.ts +113 -0
- package/type/v1alpha1/page.pb.ts +11 -0
|
@@ -34,6 +34,9 @@ export class Skoala {
|
|
|
34
34
|
static ListWorkspace(req: SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceRes> {
|
|
35
35
|
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceReq, SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceRes>(`/apis/skoala.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
36
36
|
}
|
|
37
|
+
static GetWorkspace(req: SkoalaApiGeneralV1alpha1Skoala.GetWorkspaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.GetWorkspaceRes> {
|
|
38
|
+
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.GetWorkspaceReq, SkoalaApiGeneralV1alpha1Skoala.GetWorkspaceRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
39
|
+
}
|
|
37
40
|
}
|
|
38
41
|
export class Registry {
|
|
39
42
|
static List(req: SkoalaApiIntegratedV1alpha1Registry.ListRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.ListRegistryRes> {
|
|
@@ -43,16 +46,16 @@ export class Registry {
|
|
|
43
46
|
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.GetRegistryReq, SkoalaApiIntegratedV1alpha1Registry.GetRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}?${fm.renderURLSearchParams(req, ["workspaceId", "registryId"])}`, {...initReq, method: "GET"})
|
|
44
47
|
}
|
|
45
48
|
static Create(req: SkoalaApiIntegratedV1alpha1Registry.CreateRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.CreateRegistryRes> {
|
|
46
|
-
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.CreateRegistryReq, SkoalaApiIntegratedV1alpha1Registry.CreateRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
49
|
+
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.CreateRegistryReq, SkoalaApiIntegratedV1alpha1Registry.CreateRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
47
50
|
}
|
|
48
51
|
static Update(req: SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryRes> {
|
|
49
|
-
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryReq, SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
52
|
+
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryReq, SkoalaApiIntegratedV1alpha1Registry.UpdateRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
50
53
|
}
|
|
51
54
|
static Delete(req: SkoalaApiIntegratedV1alpha1Registry.DeleteRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.DeleteRegistryRes> {
|
|
52
55
|
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.DeleteRegistryReq, SkoalaApiIntegratedV1alpha1Registry.DeleteRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}`, {...initReq, method: "DELETE"})
|
|
53
56
|
}
|
|
54
57
|
static Ping(req: SkoalaApiIntegratedV1alpha1Registry.PingRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.PingRegistryRes> {
|
|
55
|
-
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.PingRegistryReq, SkoalaApiIntegratedV1alpha1Registry.PingRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/ping`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
58
|
+
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.PingRegistryReq, SkoalaApiIntegratedV1alpha1Registry.PingRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/ping`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
export class Service {
|
|
@@ -70,6 +73,9 @@ export class Instance {
|
|
|
70
73
|
static Get(req: SkoalaApiIntegratedV1alpha1Instance.GetInstanceReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Instance.GetInstanceRes> {
|
|
71
74
|
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Instance.GetInstanceReq, SkoalaApiIntegratedV1alpha1Instance.GetInstanceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}/services/${req["serviceName"]}/instances/${req["instanceId"]}?${fm.renderURLSearchParams(req, ["workspaceId", "registryId", "serviceName", "instanceId"])}`, {...initReq, method: "GET"})
|
|
72
75
|
}
|
|
76
|
+
static Update(req: SkoalaApiIntegratedV1alpha1Instance.UpdateInstanceReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Instance.UpdateInstanceRes> {
|
|
77
|
+
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Instance.UpdateInstanceReq, SkoalaApiIntegratedV1alpha1Instance.UpdateInstanceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries/${req["registryId"]}/services/${req["serviceName"]}/instances/${req["instanceId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
export class Nacos {
|
|
75
81
|
static List(req: SkoalaApiHostedV1alpha1Nacos.ListNacosReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.ListNacosRes> {
|
|
@@ -78,14 +84,14 @@ export class Nacos {
|
|
|
78
84
|
static Get(req: SkoalaApiHostedV1alpha1Nacos.GetNacosReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetNacosRes> {
|
|
79
85
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetNacosReq, SkoalaApiHostedV1alpha1Nacos.GetNacosRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/nacoses/${req["nacosName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "nacosName"])}`, {...initReq, method: "GET"})
|
|
80
86
|
}
|
|
81
|
-
static Create(req: SkoalaApiHostedV1alpha1Nacos.CreateNacosReq, initReq?: fm.InitReq): Promise<
|
|
82
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.CreateNacosReq,
|
|
87
|
+
static Create(req: SkoalaApiHostedV1alpha1Nacos.CreateNacosReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
88
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.CreateNacosReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/nacoses`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
83
89
|
}
|
|
84
|
-
static Update(req: SkoalaApiHostedV1alpha1Nacos.UpdateNacosReq, initReq?: fm.InitReq): Promise<
|
|
85
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.UpdateNacosReq,
|
|
90
|
+
static Update(req: SkoalaApiHostedV1alpha1Nacos.UpdateNacosReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
91
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.UpdateNacosReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/nacoses/${req["nacosName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
86
92
|
}
|
|
87
|
-
static Delete(req: SkoalaApiHostedV1alpha1Nacos.DeleteNacosReq, initReq?: fm.InitReq): Promise<
|
|
88
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.DeleteNacosReq,
|
|
93
|
+
static Delete(req: SkoalaApiHostedV1alpha1Nacos.DeleteNacosReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
94
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.DeleteNacosReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/nacoses/${req["nacosName"]}`, {...initReq, method: "DELETE"})
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
export class Sentinel {
|
|
@@ -96,10 +102,10 @@ export class Sentinel {
|
|
|
96
102
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.GetSentinelReq, SkoalaApiHostedV1alpha1Sentinel.GetSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels/${req["sentinelName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "sentinelName"])}`, {...initReq, method: "GET"})
|
|
97
103
|
}
|
|
98
104
|
static Create(req: SkoalaApiHostedV1alpha1Sentinel.CreateSentinelReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.CreateSentinelRes> {
|
|
99
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.CreateSentinelReq, SkoalaApiHostedV1alpha1Sentinel.CreateSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
105
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.CreateSentinelReq, SkoalaApiHostedV1alpha1Sentinel.CreateSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
100
106
|
}
|
|
101
107
|
static Update(req: SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelRes> {
|
|
102
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelReq, SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels/${req["sentinelName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
108
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelReq, SkoalaApiHostedV1alpha1Sentinel.UpdateSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels/${req["sentinelName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
103
109
|
}
|
|
104
110
|
static Delete(req: SkoalaApiHostedV1alpha1Sentinel.DeleteSentinelReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.DeleteSentinelRes> {
|
|
105
111
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.DeleteSentinelReq, SkoalaApiHostedV1alpha1Sentinel.DeleteSentinelRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/sentinels/${req["sentinelName"]}`, {...initReq, method: "DELETE"})
|
|
@@ -119,12 +125,18 @@ export class Gateway {
|
|
|
119
125
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
120
126
|
}
|
|
121
127
|
static Create(req: SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
122
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
128
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
123
129
|
}
|
|
124
130
|
static Update(req: SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
125
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
131
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
126
132
|
}
|
|
127
133
|
static Delete(req: SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
128
134
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "DELETE"})
|
|
129
135
|
}
|
|
136
|
+
static GetImages(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetImagesRes> {
|
|
137
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, SkoalaApiHostedV1alpha1Gateway.GetImagesRes>(`/apis/sesame.skoala.io/v1alpha1/images?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
138
|
+
}
|
|
139
|
+
static GetGatewayStatus(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusRes> {
|
|
140
|
+
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"})
|
|
141
|
+
}
|
|
130
142
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 FeatureGateIDEnum {
|
|
8
|
+
METRICS = "METRICS",
|
|
9
|
+
LOGGING = "LOGGING",
|
|
10
|
+
TRACING = "TRACING",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type FeatureGateID = {
|
|
14
|
+
id?: FeatureGateIDEnum
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type FeatureGate = {
|
|
18
|
+
id?: FeatureGateIDEnum
|
|
19
|
+
name?: string
|
|
20
|
+
description?: string
|
|
21
|
+
enabled?: boolean
|
|
22
|
+
status?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type FeatureGatesResp = {
|
|
26
|
+
items?: FeatureGate[]
|
|
27
|
+
}
|
package/fetch.pb.ts
CHANGED
|
@@ -4,10 +4,119 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* base64 encoder and decoder
|
|
9
|
+
* Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js
|
|
10
|
+
*/
|
|
11
|
+
// Base64 encoding table
|
|
12
|
+
const b64 = new Array(64);
|
|
13
|
+
|
|
14
|
+
// Base64 decoding table
|
|
15
|
+
const s64 = new Array(123);
|
|
16
|
+
|
|
17
|
+
// 65..90, 97..122, 48..57, 43, 47
|
|
18
|
+
for (let i = 0; i < 64;)
|
|
19
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
20
|
+
|
|
21
|
+
export function b64Encode(buffer: Uint8Array, start: number, end: number): string {
|
|
22
|
+
let parts: string[] = null;
|
|
23
|
+
const chunk = [];
|
|
24
|
+
let i = 0, // output index
|
|
25
|
+
j = 0, // goto index
|
|
26
|
+
t; // temporary
|
|
27
|
+
while (start < end) {
|
|
28
|
+
const b = buffer[start++];
|
|
29
|
+
switch (j) {
|
|
30
|
+
case 0:
|
|
31
|
+
chunk[i++] = b64[b >> 2];
|
|
32
|
+
t = (b & 3) << 4;
|
|
33
|
+
j = 1;
|
|
34
|
+
break;
|
|
35
|
+
case 1:
|
|
36
|
+
chunk[i++] = b64[t | b >> 4];
|
|
37
|
+
t = (b & 15) << 2;
|
|
38
|
+
j = 2;
|
|
39
|
+
break;
|
|
40
|
+
case 2:
|
|
41
|
+
chunk[i++] = b64[t | b >> 6];
|
|
42
|
+
chunk[i++] = b64[b & 63];
|
|
43
|
+
j = 0;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (i > 8191) {
|
|
47
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
48
|
+
i = 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (j) {
|
|
52
|
+
chunk[i++] = b64[t];
|
|
53
|
+
chunk[i++] = 61;
|
|
54
|
+
if (j === 1)
|
|
55
|
+
chunk[i++] = 61;
|
|
56
|
+
}
|
|
57
|
+
if (parts) {
|
|
58
|
+
if (i)
|
|
59
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
60
|
+
return parts.join("");
|
|
61
|
+
}
|
|
62
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const invalidEncoding = "invalid encoding";
|
|
66
|
+
|
|
67
|
+
export function b64Decode(s: string): Uint8Array {
|
|
68
|
+
const buffer = [];
|
|
69
|
+
let offset = 0;
|
|
70
|
+
let j = 0, // goto index
|
|
71
|
+
t; // temporary
|
|
72
|
+
for (let i = 0; i < s.length;) {
|
|
73
|
+
let c = s.charCodeAt(i++);
|
|
74
|
+
if (c === 61 && j > 1)
|
|
75
|
+
break;
|
|
76
|
+
if ((c = s64[c]) === undefined)
|
|
77
|
+
throw Error(invalidEncoding);
|
|
78
|
+
switch (j) {
|
|
79
|
+
case 0:
|
|
80
|
+
t = c;
|
|
81
|
+
j = 1;
|
|
82
|
+
break;
|
|
83
|
+
case 1:
|
|
84
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
85
|
+
t = c;
|
|
86
|
+
j = 2;
|
|
87
|
+
break;
|
|
88
|
+
case 2:
|
|
89
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
90
|
+
t = c;
|
|
91
|
+
j = 3;
|
|
92
|
+
break;
|
|
93
|
+
case 3:
|
|
94
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
95
|
+
j = 0;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (j === 1)
|
|
100
|
+
throw Error(invalidEncoding);
|
|
101
|
+
return new Uint8Array(buffer);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function b64Test(s: string): boolean {
|
|
105
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
|
|
106
|
+
}
|
|
107
|
+
|
|
7
108
|
export interface InitReq extends RequestInit {
|
|
8
109
|
pathPrefix?: string
|
|
9
110
|
}
|
|
10
111
|
|
|
112
|
+
export function replacer(key: any, value: any): any {
|
|
113
|
+
if(value && value.constructor === Uint8Array) {
|
|
114
|
+
return b64Encode(value, 0, value.length);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
|
|
11
120
|
export function fetchReq<I, O>(path: string, init?: InitReq): Promise<O> {
|
|
12
121
|
const {pathPrefix, ...req} = init || {}
|
|
13
122
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
export type FieldValidator = {
|
|
7
|
+
regex?: string
|
|
8
|
+
intGt?: string
|
|
9
|
+
intLt?: string
|
|
10
|
+
msgExists?: boolean
|
|
11
|
+
humanError?: string
|
|
12
|
+
floatGt?: number
|
|
13
|
+
floatLt?: number
|
|
14
|
+
floatEpsilon?: number
|
|
15
|
+
floatGte?: number
|
|
16
|
+
floatLte?: number
|
|
17
|
+
stringNotEmpty?: boolean
|
|
18
|
+
repeatedCountMin?: string
|
|
19
|
+
repeatedCountMax?: string
|
|
20
|
+
lengthGt?: string
|
|
21
|
+
lengthLt?: string
|
|
22
|
+
lengthEq?: string
|
|
23
|
+
isInEnum?: boolean
|
|
24
|
+
uuidVer?: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type OneofValidator = {
|
|
28
|
+
required?: boolean
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
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
|
+
export type Http = {
|
|
16
|
+
rules?: HttpRule[]
|
|
17
|
+
fullyDecodeReservedExpansion?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
type BaseHttpRule = {
|
|
22
|
+
selector?: string
|
|
23
|
+
body?: string
|
|
24
|
+
responseBody?: string
|
|
25
|
+
additionalBindings?: HttpRule[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HttpRule = BaseHttpRule
|
|
29
|
+
& OneOf<{ get: string; put: string; post: string; delete: string; patch: string; custom: CustomHttpPattern }>
|
|
30
|
+
|
|
31
|
+
export type CustomHttpPattern = {
|
|
32
|
+
kind?: string
|
|
33
|
+
path?: string
|
|
34
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 GoogleProtobufSource_context from "./source_context.pb"
|
|
8
|
+
import * as GoogleProtobufType from "./type.pb"
|
|
9
|
+
export type Api = {
|
|
10
|
+
name?: string
|
|
11
|
+
methods?: Method[]
|
|
12
|
+
options?: GoogleProtobufType.Option[]
|
|
13
|
+
version?: string
|
|
14
|
+
sourceContext?: GoogleProtobufSource_context.SourceContext
|
|
15
|
+
mixins?: Mixin[]
|
|
16
|
+
syntax?: GoogleProtobufType.Syntax
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type Method = {
|
|
20
|
+
name?: string
|
|
21
|
+
requestTypeUrl?: string
|
|
22
|
+
requestStreaming?: boolean
|
|
23
|
+
responseTypeUrl?: string
|
|
24
|
+
responseStreaming?: boolean
|
|
25
|
+
options?: GoogleProtobufType.Option[]
|
|
26
|
+
syntax?: GoogleProtobufType.Syntax
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Mixin = {
|
|
30
|
+
name?: string
|
|
31
|
+
root?: string
|
|
32
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
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 FieldDescriptorProtoType {
|
|
8
|
+
TYPE_DOUBLE = "TYPE_DOUBLE",
|
|
9
|
+
TYPE_FLOAT = "TYPE_FLOAT",
|
|
10
|
+
TYPE_INT64 = "TYPE_INT64",
|
|
11
|
+
TYPE_UINT64 = "TYPE_UINT64",
|
|
12
|
+
TYPE_INT32 = "TYPE_INT32",
|
|
13
|
+
TYPE_FIXED64 = "TYPE_FIXED64",
|
|
14
|
+
TYPE_FIXED32 = "TYPE_FIXED32",
|
|
15
|
+
TYPE_BOOL = "TYPE_BOOL",
|
|
16
|
+
TYPE_STRING = "TYPE_STRING",
|
|
17
|
+
TYPE_GROUP = "TYPE_GROUP",
|
|
18
|
+
TYPE_MESSAGE = "TYPE_MESSAGE",
|
|
19
|
+
TYPE_BYTES = "TYPE_BYTES",
|
|
20
|
+
TYPE_UINT32 = "TYPE_UINT32",
|
|
21
|
+
TYPE_ENUM = "TYPE_ENUM",
|
|
22
|
+
TYPE_SFIXED32 = "TYPE_SFIXED32",
|
|
23
|
+
TYPE_SFIXED64 = "TYPE_SFIXED64",
|
|
24
|
+
TYPE_SINT32 = "TYPE_SINT32",
|
|
25
|
+
TYPE_SINT64 = "TYPE_SINT64",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum FieldDescriptorProtoLabel {
|
|
29
|
+
LABEL_OPTIONAL = "LABEL_OPTIONAL",
|
|
30
|
+
LABEL_REQUIRED = "LABEL_REQUIRED",
|
|
31
|
+
LABEL_REPEATED = "LABEL_REPEATED",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export enum FileOptionsOptimizeMode {
|
|
35
|
+
SPEED = "SPEED",
|
|
36
|
+
CODE_SIZE = "CODE_SIZE",
|
|
37
|
+
LITE_RUNTIME = "LITE_RUNTIME",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum FieldOptionsCType {
|
|
41
|
+
STRING = "STRING",
|
|
42
|
+
CORD = "CORD",
|
|
43
|
+
STRING_PIECE = "STRING_PIECE",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum FieldOptionsJSType {
|
|
47
|
+
JS_NORMAL = "JS_NORMAL",
|
|
48
|
+
JS_STRING = "JS_STRING",
|
|
49
|
+
JS_NUMBER = "JS_NUMBER",
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum MethodOptionsIdempotencyLevel {
|
|
53
|
+
IDEMPOTENCY_UNKNOWN = "IDEMPOTENCY_UNKNOWN",
|
|
54
|
+
NO_SIDE_EFFECTS = "NO_SIDE_EFFECTS",
|
|
55
|
+
IDEMPOTENT = "IDEMPOTENT",
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type FileDescriptorSet = {
|
|
59
|
+
file?: FileDescriptorProto[]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type FileDescriptorProto = {
|
|
63
|
+
name?: string
|
|
64
|
+
package?: string
|
|
65
|
+
dependency?: string[]
|
|
66
|
+
publicDependency?: number[]
|
|
67
|
+
weakDependency?: number[]
|
|
68
|
+
messageType?: DescriptorProto[]
|
|
69
|
+
enumType?: EnumDescriptorProto[]
|
|
70
|
+
service?: ServiceDescriptorProto[]
|
|
71
|
+
extension?: FieldDescriptorProto[]
|
|
72
|
+
options?: FileOptions
|
|
73
|
+
sourceCodeInfo?: SourceCodeInfo
|
|
74
|
+
syntax?: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type DescriptorProtoExtensionRange = {
|
|
78
|
+
start?: number
|
|
79
|
+
end?: number
|
|
80
|
+
options?: ExtensionRangeOptions
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type DescriptorProtoReservedRange = {
|
|
84
|
+
start?: number
|
|
85
|
+
end?: number
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type DescriptorProto = {
|
|
89
|
+
name?: string
|
|
90
|
+
field?: FieldDescriptorProto[]
|
|
91
|
+
extension?: FieldDescriptorProto[]
|
|
92
|
+
nestedType?: DescriptorProto[]
|
|
93
|
+
enumType?: EnumDescriptorProto[]
|
|
94
|
+
extensionRange?: DescriptorProtoExtensionRange[]
|
|
95
|
+
oneofDecl?: OneofDescriptorProto[]
|
|
96
|
+
options?: MessageOptions
|
|
97
|
+
reservedRange?: DescriptorProtoReservedRange[]
|
|
98
|
+
reservedName?: string[]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type ExtensionRangeOptions = {
|
|
102
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type FieldDescriptorProto = {
|
|
106
|
+
name?: string
|
|
107
|
+
number?: number
|
|
108
|
+
label?: FieldDescriptorProtoLabel
|
|
109
|
+
type?: FieldDescriptorProtoType
|
|
110
|
+
typeName?: string
|
|
111
|
+
extendee?: string
|
|
112
|
+
defaultValue?: string
|
|
113
|
+
oneofIndex?: number
|
|
114
|
+
jsonName?: string
|
|
115
|
+
options?: FieldOptions
|
|
116
|
+
proto3Optional?: boolean
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type OneofDescriptorProto = {
|
|
120
|
+
name?: string
|
|
121
|
+
options?: OneofOptions
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type EnumDescriptorProtoEnumReservedRange = {
|
|
125
|
+
start?: number
|
|
126
|
+
end?: number
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type EnumDescriptorProto = {
|
|
130
|
+
name?: string
|
|
131
|
+
value?: EnumValueDescriptorProto[]
|
|
132
|
+
options?: EnumOptions
|
|
133
|
+
reservedRange?: EnumDescriptorProtoEnumReservedRange[]
|
|
134
|
+
reservedName?: string[]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type EnumValueDescriptorProto = {
|
|
138
|
+
name?: string
|
|
139
|
+
number?: number
|
|
140
|
+
options?: EnumValueOptions
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type ServiceDescriptorProto = {
|
|
144
|
+
name?: string
|
|
145
|
+
method?: MethodDescriptorProto[]
|
|
146
|
+
options?: ServiceOptions
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type MethodDescriptorProto = {
|
|
150
|
+
name?: string
|
|
151
|
+
inputType?: string
|
|
152
|
+
outputType?: string
|
|
153
|
+
options?: MethodOptions
|
|
154
|
+
clientStreaming?: boolean
|
|
155
|
+
serverStreaming?: boolean
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type FileOptions = {
|
|
159
|
+
javaPackage?: string
|
|
160
|
+
javaOuterClassname?: string
|
|
161
|
+
javaMultipleFiles?: boolean
|
|
162
|
+
javaGenerateEqualsAndHash?: boolean
|
|
163
|
+
javaStringCheckUtf8?: boolean
|
|
164
|
+
optimizeFor?: FileOptionsOptimizeMode
|
|
165
|
+
goPackage?: string
|
|
166
|
+
ccGenericServices?: boolean
|
|
167
|
+
javaGenericServices?: boolean
|
|
168
|
+
pyGenericServices?: boolean
|
|
169
|
+
phpGenericServices?: boolean
|
|
170
|
+
deprecated?: boolean
|
|
171
|
+
ccEnableArenas?: boolean
|
|
172
|
+
objcClassPrefix?: string
|
|
173
|
+
csharpNamespace?: string
|
|
174
|
+
swiftPrefix?: string
|
|
175
|
+
phpClassPrefix?: string
|
|
176
|
+
phpNamespace?: string
|
|
177
|
+
phpMetadataNamespace?: string
|
|
178
|
+
rubyPackage?: string
|
|
179
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type MessageOptions = {
|
|
183
|
+
messageSetWireFormat?: boolean
|
|
184
|
+
noStandardDescriptorAccessor?: boolean
|
|
185
|
+
deprecated?: boolean
|
|
186
|
+
mapEntry?: boolean
|
|
187
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type FieldOptions = {
|
|
191
|
+
ctype?: FieldOptionsCType
|
|
192
|
+
packed?: boolean
|
|
193
|
+
jstype?: FieldOptionsJSType
|
|
194
|
+
lazy?: boolean
|
|
195
|
+
deprecated?: boolean
|
|
196
|
+
weak?: boolean
|
|
197
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type OneofOptions = {
|
|
201
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export type EnumOptions = {
|
|
205
|
+
allowAlias?: boolean
|
|
206
|
+
deprecated?: boolean
|
|
207
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type EnumValueOptions = {
|
|
211
|
+
deprecated?: boolean
|
|
212
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export type ServiceOptions = {
|
|
216
|
+
deprecated?: boolean
|
|
217
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type MethodOptions = {
|
|
221
|
+
deprecated?: boolean
|
|
222
|
+
idempotencyLevel?: MethodOptionsIdempotencyLevel
|
|
223
|
+
uninterpretedOption?: UninterpretedOption[]
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export type UninterpretedOptionNamePart = {
|
|
227
|
+
namePart?: string
|
|
228
|
+
isExtension?: boolean
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type UninterpretedOption = {
|
|
232
|
+
name?: UninterpretedOptionNamePart[]
|
|
233
|
+
identifierValue?: string
|
|
234
|
+
positiveIntValue?: string
|
|
235
|
+
negativeIntValue?: string
|
|
236
|
+
doubleValue?: number
|
|
237
|
+
stringValue?: Uint8Array
|
|
238
|
+
aggregateValue?: string
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type SourceCodeInfoLocation = {
|
|
242
|
+
path?: number[]
|
|
243
|
+
span?: number[]
|
|
244
|
+
leadingComments?: string
|
|
245
|
+
trailingComments?: string
|
|
246
|
+
leadingDetachedComments?: string[]
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export type SourceCodeInfo = {
|
|
250
|
+
location?: SourceCodeInfoLocation[]
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type GeneratedCodeInfoAnnotation = {
|
|
254
|
+
path?: number[]
|
|
255
|
+
sourceFile?: string
|
|
256
|
+
begin?: number
|
|
257
|
+
end?: number
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type GeneratedCodeInfo = {
|
|
261
|
+
annotation?: GeneratedCodeInfoAnnotation[]
|
|
262
|
+
}
|