@daocloud-proto/ghippo 0.8.0 → 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.0",
3
+ "version":"0.8.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -19,10 +19,10 @@ export enum TimeType {
19
19
  }
20
20
 
21
21
  export type ListAuditRequest = {
22
- source?: string
23
- type?: string
22
+ sourceType?: string
23
+ sourceName?: string
24
24
  status?: StatusType
25
- search?: string
25
+ searchUser?: string
26
26
  start?: string
27
27
  end?: string
28
28
  page?: number
@@ -37,7 +37,6 @@ export type ListAuditResponse = {
37
37
  export type AuditInfo = {
38
38
  id?: number
39
39
  auditName?: string
40
- source?: string
41
40
  resourceType?: string
42
41
  resourceName?: string
43
42
  status?: StatusType
@@ -5,6 +5,15 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+
9
+ export enum QuotaType {
10
+ RequestsCPU = "RequestsCPU",
11
+ LimitsCPU = "LimitsCPU",
12
+ RequestsMemory = "RequestsMemory",
13
+ LimitsMemory = "LimitsMemory",
14
+ PersistentVolumeClaims = "PersistentVolumeClaims",
15
+ }
16
+
8
17
  export type Pagination = {
9
18
  total?: number
10
19
  page?: number
@@ -270,13 +279,11 @@ export type Resource = {
270
279
  }
271
280
 
272
281
  export type QuotaHard = {
273
- limits?: QuotaResource
274
- requests?: QuotaResource
275
- }
276
-
277
- export type QuotaResource = {
278
- cpu?: string
279
- memory?: string
282
+ requestsCpu?: string
283
+ limitsCpu?: string
284
+ requestsMemory?: string
285
+ limitsMemory?: string
286
+ persistentvolumeclaims?: string
280
287
  }
281
288
 
282
289
  export type BindResourceAndSetQuotaHardToWorkspaceRequest = {
@@ -324,6 +331,20 @@ export type GetWorkspaceResourceQuotaAllocatableResponse = {
324
331
  allocatable?: {[key: string]: string}
325
332
  }
326
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
+
327
348
  export class Workspace {
328
349
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
329
350
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -403,4 +424,7 @@ export class Workspace {
403
424
  static GetWorkspaceResourceQuotaAllocatable(req: GetWorkspaceResourceQuotaAllocatableRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaAllocatableResponse> {
404
425
  return fm.fetchReq<GetWorkspaceResourceQuotaAllocatableRequest, GetWorkspaceResourceQuotaAllocatableResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-allocatable?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
405
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
+ }
406
430
  }