@daocloud-proto/ghippo 0.8.2 → 0.8.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.8.2",
3
+ "version":"0.8.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -5,7 +5,15 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
- import * as GoogleProtobufWrappers from "../google/protobuf/wrappers.pb"
8
+
9
+ export enum QuotaType {
10
+ RequestsCPU = "RequestsCPU",
11
+ LimitsCPU = "LimitsCPU",
12
+ RequestsMemory = "RequestsMemory",
13
+ LimitsMemory = "LimitsMemory",
14
+ PersistentVolumeClaims = "PersistentVolumeClaims",
15
+ }
16
+
9
17
  export type Pagination = {
10
18
  total?: number
11
19
  page?: number
@@ -271,11 +279,11 @@ export type Resource = {
271
279
  }
272
280
 
273
281
  export type QuotaHard = {
274
- requestsCpu?: GoogleProtobufWrappers.StringValue
275
- limitsCpu?: GoogleProtobufWrappers.StringValue
276
- requestsMemory?: GoogleProtobufWrappers.StringValue
277
- limitsMemory?: GoogleProtobufWrappers.StringValue
278
- persistentvolumeclaims?: GoogleProtobufWrappers.StringValue
282
+ requestsCpu?: string
283
+ limitsCpu?: string
284
+ requestsMemory?: string
285
+ limitsMemory?: string
286
+ persistentvolumeclaims?: string
279
287
  }
280
288
 
281
289
  export type BindResourceAndSetQuotaHardToWorkspaceRequest = {
@@ -323,6 +331,20 @@ export type GetWorkspaceResourceQuotaAllocatableResponse = {
323
331
  allocatable?: {[key: string]: string}
324
332
  }
325
333
 
334
+ export type UpdateQuotaCheckRequest = {
335
+ resourceName?: string
336
+ resourceType?: string
337
+ gproduct?: string
338
+ resourceScope?: string
339
+ workspaceId?: number
340
+ quotaHard?: QuotaHard
341
+ }
342
+
343
+ export type UpdateQuotaCheckResponse = {
344
+ passed?: boolean
345
+ reason?: string
346
+ }
347
+
326
348
  export class Workspace {
327
349
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
328
350
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -402,4 +424,7 @@ export class Workspace {
402
424
  static GetWorkspaceResourceQuotaAllocatable(req: GetWorkspaceResourceQuotaAllocatableRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaAllocatableResponse> {
403
425
  return fm.fetchReq<GetWorkspaceResourceQuotaAllocatableRequest, GetWorkspaceResourceQuotaAllocatableResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-allocatable?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
404
426
  }
427
+ static UpdateQuotaCheck(req: UpdateQuotaCheckRequest, initReq?: fm.InitReq): Promise<UpdateQuotaCheckResponse> {
428
+ return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req)})
429
+ }
405
430
  }