@daocloud-proto/baize 0.101.0 → 0.101.2

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.
@@ -14,6 +14,12 @@ export type Pagination = {
14
14
  search?: string
15
15
  }
16
16
 
17
+ export type SearchIndex = {
18
+ searchKey?: string
19
+ objectPath?: string
20
+ customPath?: string
21
+ }
22
+
17
23
  export type Auth = {
18
24
  group?: string
19
25
  namespaced?: boolean
@@ -57,6 +57,36 @@ export type ListPVCsResponse = {
57
57
  page?: BaizeCommonCommon.Pagination
58
58
  }
59
59
 
60
+ export type GPUSetting = {
61
+ type?: string
62
+ alias?: string
63
+ resource?: GPUResourceSetting[]
64
+ }
65
+
66
+ export type GPUResourceSetting = {
67
+ key?: string
68
+ alias?: string
69
+ isAllocatable?: boolean
70
+ description?: string
71
+ aliasZh?: string
72
+ range?: ResourceRange
73
+ }
74
+
75
+ export type ResourceRange = {
76
+ min?: number
77
+ minDesc?: string
78
+ max?: number
79
+ maxDesc?: string
80
+ }
81
+
82
+ export type GPUSettingsResponse = {
83
+ items?: GPUSetting[]
84
+ }
85
+
86
+ export type ClusterSettingsRequest = {
87
+ cluster?: string
88
+ }
89
+
60
90
  export class ClusterService {
61
91
  static ListClusters(req: ListAIClustersRequest, initReq?: fm.InitReq): Promise<ListAIClustersResponse> {
62
92
  return fm.fetchReq<ListAIClustersRequest, ListAIClustersResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
@@ -65,6 +95,9 @@ export class ClusterService {
65
95
  return fm.fetchReq<ListClusterNamespaceRequest, ListClusterNamespaceResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
66
96
  }
67
97
  static ListPVCs(req: ListPVCsRequest, initReq?: fm.InitReq): Promise<ListPVCsResponse> {
68
- return fm.fetchReq<ListPVCsRequest, ListPVCsResponse>(`/apis/baize.io/v1alpha1/workspace/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pvcs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
98
+ return fm.fetchReq<ListPVCsRequest, ListPVCsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pvcs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
99
+ }
100
+ static GetClusterGPUSettings(req: ClusterSettingsRequest, initReq?: fm.InitReq): Promise<GPUSettingsResponse> {
101
+ return fm.fetchReq<ClusterSettingsRequest, GPUSettingsResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/settings/gpu-resources?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
69
102
  }
70
103
  }
@@ -0,0 +1,33 @@
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 BaizeCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ export type ListDevicesGPUsRequest = {
10
+ page?: BaizeCommonCommon.Pagination
11
+ }
12
+
13
+ export type DeviceGPU = {
14
+ deviceUUID?: string
15
+ nodeIP?: string
16
+ cluster?: string
17
+ serialNumber?: string
18
+ modelName?: string
19
+ vendor?: string
20
+ totalFrameBufferMemory?: string
21
+ usedFrameBufferMemory?: string
22
+ }
23
+
24
+ export type ListDevicesGPUsResponse = {
25
+ items?: DeviceGPU[]
26
+ page?: BaizeCommonCommon.Pagination
27
+ }
28
+
29
+ export class DeviceService {
30
+ static ListDevicesGPUs(req: ListDevicesGPUsRequest, initReq?: fm.InitReq): Promise<ListDevicesGPUsResponse> {
31
+ return fm.fetchReq<ListDevicesGPUsRequest, ListDevicesGPUsResponse>(`/apis/baize.io/v1alpha1/devices/gpus?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
32
+ }
33
+ }
@@ -0,0 +1,17 @@
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 BaizeCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ export type UserPermission = {
10
+ isBaizeOwner?: boolean
11
+ }
12
+
13
+ export class PermissionService {
14
+ static GetCurrentUserPermission(req: BaizeCommonCommon.NoParamsQuery, initReq?: fm.InitReq): Promise<UserPermission> {
15
+ return fm.fetchReq<BaizeCommonCommon.NoParamsQuery, UserPermission>(`/apis/baize.io/v1alpha1/current-user/permission?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
16
+ }
17
+ }
@@ -0,0 +1,76 @@
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 BaizeCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+
10
+ export enum QueueType {
11
+ QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
12
+ KUEUE = "KUEUE",
13
+ }
14
+
15
+ export enum QueuePhase {
16
+ QUEUE_PHASE_UNSPECIFIED = "QUEUE_PHASE_UNSPECIFIED",
17
+ READY = "READY",
18
+ }
19
+
20
+ export type QueueResource = {
21
+ name?: string
22
+ value?: string
23
+ borrowingLimit?: string
24
+ }
25
+
26
+ export type QueueStatus = {
27
+ phase?: QueuePhase
28
+ }
29
+
30
+ export type Queue = {
31
+ type?: QueueType
32
+ cluster?: string
33
+ name?: string
34
+ workspace?: number
35
+ description?: string
36
+ resources?: QueueResource[]
37
+ status?: QueueStatus
38
+ }
39
+
40
+ export type ListQueueRequest = {
41
+ cluster?: string
42
+ type?: QueueType
43
+ page?: BaizeCommonCommon.Pagination
44
+ }
45
+
46
+ export type ListQueueResponse = {
47
+ items?: Queue[]
48
+ page?: BaizeCommonCommon.Pagination
49
+ }
50
+
51
+ export type CreateQueueRequest = {
52
+ type?: QueueType
53
+ cluster?: string
54
+ name?: string
55
+ workspace?: number
56
+ description?: string
57
+ resources?: QueueResource[]
58
+ }
59
+
60
+ export type DeleteQueueRequest = {
61
+ type?: QueueType
62
+ cluster?: string
63
+ name?: string
64
+ }
65
+
66
+ export class QueueManagement {
67
+ static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
68
+ return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
69
+ }
70
+ static CreateQueue(req: CreateQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
71
+ return fm.fetchReq<CreateQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
72
+ }
73
+ static DeleteQueue(req: DeleteQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
74
+ return fm.fetchReq<DeleteQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
75
+ }
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.101.0",
3
+ "version": "v0.101.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"