@daocloud-proto/hydra 0.0.0-dev-87f727ca → 0.0.0-dev-88ed8f0b
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.
|
@@ -8,6 +8,22 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
10
|
|
|
11
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
|
+
type OneOf<T> =
|
|
13
|
+
| { [k in keyof T]?: undefined }
|
|
14
|
+
| (
|
|
15
|
+
keyof T extends infer K ?
|
|
16
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
17
|
+
: never)
|
|
18
|
+
: never);
|
|
19
|
+
|
|
20
|
+
export enum APIKeyStatus {
|
|
21
|
+
API_KEY_STATUS_UNSPECIFIED = "API_KEY_STATUS_UNSPECIFIED",
|
|
22
|
+
API_KEY_STATUS_ACTIVE = "API_KEY_STATUS_ACTIVE",
|
|
23
|
+
API_KEY_STATUS_DISABLED = "API_KEY_STATUS_DISABLED",
|
|
24
|
+
API_KEY_STATUS_EXPIRED = "API_KEY_STATUS_EXPIRED",
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
export enum TimePeriod {
|
|
12
28
|
TIME_PERIOD_UNSPECIFIED = "TIME_PERIOD_UNSPECIFIED",
|
|
13
29
|
TIME_PERIOD_HOUR = "TIME_PERIOD_HOUR",
|
|
@@ -16,15 +32,25 @@ export enum TimePeriod {
|
|
|
16
32
|
TIME_PERIOD_MONTH = "TIME_PERIOD_MONTH",
|
|
17
33
|
}
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
|
|
36
|
+
/* hydra modified */ export type BaseCreateWSAPIKeyRequest = {
|
|
20
37
|
name?: string
|
|
21
38
|
workspace?: number
|
|
39
|
+
quota?: string
|
|
40
|
+
unlimitedQuota?: boolean
|
|
22
41
|
}
|
|
23
42
|
|
|
24
|
-
export type
|
|
43
|
+
export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
|
|
44
|
+
& OneOf<{ expireTime: GoogleProtobufTimestamp.Timestamp }>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* hydra modified */ export type BaseCreateAPIKeyRequest = {
|
|
25
48
|
name?: string
|
|
26
49
|
}
|
|
27
50
|
|
|
51
|
+
export type CreateAPIKeyRequest = BaseCreateAPIKeyRequest
|
|
52
|
+
& OneOf<{ expireTime: GoogleProtobufTimestamp.Timestamp }>
|
|
53
|
+
|
|
28
54
|
export type APIKey = {
|
|
29
55
|
id?: string
|
|
30
56
|
key?: string
|
|
@@ -35,6 +61,13 @@ export type APIKey = {
|
|
|
35
61
|
denyModels?: string[]
|
|
36
62
|
workspace?: number
|
|
37
63
|
createBy?: string
|
|
64
|
+
quota?: string
|
|
65
|
+
expireTime?: GoogleProtobufTimestamp.Timestamp
|
|
66
|
+
remainingQuota?: string
|
|
67
|
+
remainingQuotaSyncedAt?: GoogleProtobufTimestamp.Timestamp
|
|
68
|
+
status?: APIKeyStatus
|
|
69
|
+
unlimitedQuota?: boolean
|
|
70
|
+
usedQuota?: string
|
|
38
71
|
}
|
|
39
72
|
|
|
40
73
|
export type ListWSAPIKeyRequest = {
|