@daocloud-proto/hydra 0.15.0-dev-6 → 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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.15.0-dev-6",
3
+ "version": "v0.15.0-dev-7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"