@daocloud-proto/hydra 0.15.0-dev-5 → 0.15.0-dev-7
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,99 @@
|
|
|
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 HydraCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
export type Period = {
|
|
11
|
+
startTime?: GoogleProtobufTimestamp.Timestamp
|
|
12
|
+
endTime?: GoogleProtobufTimestamp.Timestamp
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type WSDashboardSummaryRequest = {
|
|
16
|
+
startTime?: GoogleProtobufTimestamp.Timestamp
|
|
17
|
+
endTime?: GoogleProtobufTimestamp.Timestamp
|
|
18
|
+
compareStartTime?: GoogleProtobufTimestamp.Timestamp
|
|
19
|
+
compareEndTime?: GoogleProtobufTimestamp.Timestamp
|
|
20
|
+
timezone?: string
|
|
21
|
+
workspace?: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type DashboardSummaryResponse = {
|
|
25
|
+
activeUserCount?: string
|
|
26
|
+
totalUserCount?: string
|
|
27
|
+
activeUserChange?: string
|
|
28
|
+
activeUserChangeRate?: number
|
|
29
|
+
totalTokens?: string
|
|
30
|
+
todayTokens?: string
|
|
31
|
+
requestCount?: string
|
|
32
|
+
apiKeyCount?: string
|
|
33
|
+
apiKeyChange?: string
|
|
34
|
+
period?: Period
|
|
35
|
+
comparePeriod?: Period
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type ListWSUserTokenUsageRequest = {
|
|
39
|
+
startTime?: GoogleProtobufTimestamp.Timestamp
|
|
40
|
+
endTime?: GoogleProtobufTimestamp.Timestamp
|
|
41
|
+
page?: HydraCommonCommon.Pagination
|
|
42
|
+
sortBy?: string
|
|
43
|
+
sortOrder?: string
|
|
44
|
+
workspace?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type UserTokenUsage = {
|
|
48
|
+
userId?: string
|
|
49
|
+
username?: string
|
|
50
|
+
inputTokens?: string
|
|
51
|
+
outputTokens?: string
|
|
52
|
+
cachedTokens?: string
|
|
53
|
+
totalTokens?: string
|
|
54
|
+
requestCount?: string
|
|
55
|
+
lastUsedTime?: GoogleProtobufTimestamp.Timestamp
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type ListUserTokenUsageResponse = {
|
|
59
|
+
items?: UserTokenUsage[]
|
|
60
|
+
page?: HydraCommonCommon.Pagination
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ListWSInstanceTokenUsageRequest = {
|
|
64
|
+
startTime?: GoogleProtobufTimestamp.Timestamp
|
|
65
|
+
endTime?: GoogleProtobufTimestamp.Timestamp
|
|
66
|
+
page?: HydraCommonCommon.Pagination
|
|
67
|
+
sortBy?: string
|
|
68
|
+
sortOrder?: string
|
|
69
|
+
workspace?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type InstanceTokenUsage = {
|
|
73
|
+
instanceId?: string
|
|
74
|
+
instanceName?: string
|
|
75
|
+
modelName?: string
|
|
76
|
+
inputTokens?: string
|
|
77
|
+
outputTokens?: string
|
|
78
|
+
cachedTokens?: string
|
|
79
|
+
totalTokens?: string
|
|
80
|
+
requestCount?: string
|
|
81
|
+
lastUsedTime?: GoogleProtobufTimestamp.Timestamp
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type ListInstanceTokenUsageResponse = {
|
|
85
|
+
items?: InstanceTokenUsage[]
|
|
86
|
+
page?: HydraCommonCommon.Pagination
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export class WSDashboardManagement {
|
|
90
|
+
static GetWSDashboardSummary(req: WSDashboardSummaryRequest, initReq?: fm.InitReq): Promise<DashboardSummaryResponse> {
|
|
91
|
+
return fm.fetchReq<WSDashboardSummaryRequest, DashboardSummaryResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/summary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
92
|
+
}
|
|
93
|
+
static ListWSUserTokenUsage(req: ListWSUserTokenUsageRequest, initReq?: fm.InitReq): Promise<ListUserTokenUsageResponse> {
|
|
94
|
+
return fm.fetchReq<ListWSUserTokenUsageRequest, ListUserTokenUsageResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/users/token-usage?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
95
|
+
}
|
|
96
|
+
static ListWSInstanceTokenUsage(req: ListWSInstanceTokenUsageRequest, initReq?: fm.InitReq): Promise<ListInstanceTokenUsageResponse> {
|
|
97
|
+
return fm.fetchReq<ListWSInstanceTokenUsageRequest, ListInstanceTokenUsageResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/dashboard/instances/token-usage?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -263,24 +263,6 @@ export type ListWSModelServingResponse = {
|
|
|
263
263
|
page?: HydraCommonCommon.Pagination
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
export type ListWSModelServingConfigMapsRequest = {
|
|
267
|
-
workspace?: number
|
|
268
|
-
cluster?: string
|
|
269
|
-
namespace?: string
|
|
270
|
-
page?: HydraCommonCommon.Pagination
|
|
271
|
-
name?: string
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export type WSModelServingConfigMap = {
|
|
275
|
-
name?: string
|
|
276
|
-
namespace?: string
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export type ListWSModelServingConfigMapsResponse = {
|
|
280
|
-
items?: WSModelServingConfigMap[]
|
|
281
|
-
page?: HydraCommonCommon.Pagination
|
|
282
|
-
}
|
|
283
|
-
|
|
284
266
|
export type GetWSModelServingRequest = {
|
|
285
267
|
workspace?: number
|
|
286
268
|
id?: string
|
|
@@ -384,9 +366,6 @@ export class WSModelServingManagement {
|
|
|
384
366
|
static ListWSModelServing(req: ListWSModelServingRequest, initReq?: fm.InitReq): Promise<ListWSModelServingResponse> {
|
|
385
367
|
return fm.fetchReq<ListWSModelServingRequest, ListWSModelServingResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
386
368
|
}
|
|
387
|
-
static ListWSModelServingConfigMaps(req: ListWSModelServingConfigMapsRequest, initReq?: fm.InitReq): Promise<ListWSModelServingConfigMapsResponse> {
|
|
388
|
-
return fm.fetchReq<ListWSModelServingConfigMapsRequest, ListWSModelServingConfigMapsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/configmaps?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
389
|
-
}
|
|
390
369
|
static GetWSModelServing(req: GetWSModelServingRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
391
370
|
return fm.fetchReq<GetWSModelServingRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}?${fm.renderURLSearchParams(req, ["workspace", "id"])}`, {...initReq, method: "GET"})
|
|
392
371
|
}
|
|
@@ -69,6 +69,24 @@ export type ListClusterNamespaceResponse = {
|
|
|
69
69
|
page?: HydraCommonCommon.Pagination
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
export type ListConfigMapsRequest = {
|
|
73
|
+
workspace?: number
|
|
74
|
+
cluster?: string
|
|
75
|
+
namespace?: string
|
|
76
|
+
page?: HydraCommonCommon.Pagination
|
|
77
|
+
name?: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type ConfigMap = {
|
|
81
|
+
name?: string
|
|
82
|
+
namespace?: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type ListConfigMapsResponse = {
|
|
86
|
+
items?: ConfigMap[]
|
|
87
|
+
page?: HydraCommonCommon.Pagination
|
|
88
|
+
}
|
|
89
|
+
|
|
72
90
|
export class WorkspaceService {
|
|
73
91
|
static ListWorkspaces(req: ListWorkspaceRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
|
|
74
92
|
return fm.fetchReq<ListWorkspaceRequest, ListWorkspacesResponse>(`/apis/hydra.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -79,4 +97,7 @@ export class WorkspaceService {
|
|
|
79
97
|
static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespaceResponse> {
|
|
80
98
|
return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespaceResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/cluster-namespaces?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
81
99
|
}
|
|
100
|
+
static ListConfigMaps(req: ListConfigMapsRequest, initReq?: fm.InitReq): Promise<ListConfigMapsResponse> {
|
|
101
|
+
return fm.fetchReq<ListConfigMapsRequest, ListConfigMapsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/configmaps?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
102
|
+
}
|
|
82
103
|
}
|