@daocloud-proto/hydra 0.17.0-rc1-dev-24 → 0.18.0-dev-1
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.
|
@@ -44,6 +44,7 @@ export enum APIKeyUsageQueryStatus {
|
|
|
44
44
|
workspace?: number
|
|
45
45
|
quota?: string
|
|
46
46
|
unlimitedQuota?: boolean
|
|
47
|
+
allowModels?: string[]
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
|
|
@@ -53,6 +54,7 @@ export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
|
|
|
53
54
|
|
|
54
55
|
/* hydra modified */ export type BaseCreateAPIKeyRequest = {
|
|
55
56
|
name?: string
|
|
57
|
+
allowModels?: string[]
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
export type CreateAPIKeyRequest = BaseCreateAPIKeyRequest
|
|
@@ -151,6 +153,17 @@ export type UpdateAPIKeyStatusRequest = {
|
|
|
151
153
|
disabled?: boolean
|
|
152
154
|
}
|
|
153
155
|
|
|
156
|
+
export type UpdateAPIKeyRequest = {
|
|
157
|
+
id?: string
|
|
158
|
+
allowModels?: string[]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type UpdateWSAPIKeyRequest = {
|
|
162
|
+
id?: string
|
|
163
|
+
workspace?: number
|
|
164
|
+
allowModels?: string[]
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
export type RegenerateAPIKeyRequest = {
|
|
155
168
|
id?: string
|
|
156
169
|
}
|
|
@@ -251,6 +264,9 @@ export class APIKeyManagement {
|
|
|
251
264
|
static UpdateAPIKeyStatus(req: UpdateAPIKeyStatusRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
252
265
|
return fm.fetchReq<UpdateAPIKeyStatusRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/status`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
253
266
|
}
|
|
267
|
+
static UpdateAPIKey(req: UpdateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
268
|
+
return fm.fetchReq<UpdateAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
269
|
+
}
|
|
254
270
|
static RegenerateAPIKey(req: RegenerateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
255
271
|
return fm.fetchReq<RegenerateAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
256
272
|
}
|
|
@@ -289,6 +305,9 @@ export class WSAPIKeyManagement {
|
|
|
289
305
|
static UpdateWSAPIKeyQuota(req: UpdateWSAPIKeyQuotaRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
290
306
|
return fm.fetchReq<UpdateWSAPIKeyQuotaRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/quota`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
291
307
|
}
|
|
308
|
+
static UpdateWSAPIKey(req: UpdateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
309
|
+
return fm.fetchReq<UpdateWSAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
310
|
+
}
|
|
292
311
|
static RegenerateWSAPIKey(req: RegenerateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
293
312
|
return fm.fetchReq<RegenerateWSAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
294
313
|
}
|
|
@@ -76,6 +76,11 @@ export enum SkuDiscountScheduleType {
|
|
|
76
76
|
SKU_DISCOUNT_SCHEDULE_TYPE_DAILY = "SKU_DISCOUNT_SCHEDULE_TYPE_DAILY",
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
export enum SkuPaymentPolicy {
|
|
80
|
+
SKU_PAYMENT_POLICY_UNSPECIFIED = "SKU_PAYMENT_POLICY_UNSPECIFIED",
|
|
81
|
+
SKU_PAYMENT_POLICY_BALANCE_ONLY = "SKU_PAYMENT_POLICY_BALANCE_ONLY",
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
export enum PublicModelConfigRateLimitLimitedBy {
|
|
80
85
|
LIMITED_BY_UNSPECIFIED = "LIMITED_BY_UNSPECIFIED",
|
|
81
86
|
USER_ID = "USER_ID",
|
|
@@ -142,6 +147,7 @@ export type ModelPrice = {
|
|
|
142
147
|
perImageDiscountInfo?: ModelPriceDiscountInfo
|
|
143
148
|
cachedDiscountInfo?: ModelPriceDiscountInfo
|
|
144
149
|
featurePrices?: ModelPriceFeaturePrice[]
|
|
150
|
+
paymentPolicy?: SkuPaymentPolicy
|
|
145
151
|
}
|
|
146
152
|
|
|
147
153
|
export type Model = {
|