@daocloud-proto/baize 0.106.0 → 0.106.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.
@@ -85,6 +85,16 @@ export type Dataset = {
85
85
  annotations?: {[key: string]: string}
86
86
  }
87
87
 
88
+ export type DataSourceOptionsConda = {
89
+ pythonVersion?: string
90
+ packageManager?: DataSourceOptionsCondaPackageManager
91
+ condaEnvironmentYml?: string
92
+ pipRequirementsTxt?: string
93
+ pipIndexUrl?: string
94
+ pipExtraIndexUrl?: string
95
+ gpuType?: string
96
+ }
97
+
88
98
  export type DataSourceOptionsGit = {
89
99
  branch?: string
90
100
  commit?: string
@@ -101,16 +111,6 @@ export type DataSourceOptionsHttp = {
101
111
  headers?: {[key: string]: string}
102
112
  }
103
113
 
104
- export type DataSourceOptionsConda = {
105
- pythonVersion?: string
106
- packageManager?: DataSourceOptionsCondaPackageManager
107
- condaEnvironmentYml?: string
108
- pipRequirementsTxt?: string
109
- pipIndexUrl?: string
110
- pipExtraIndexUrl?: string
111
- gpuType?: string
112
- }
113
-
114
114
 
115
115
  /* baize modified */ export type BaseDataSourceOptions = {
116
116
  }
@@ -185,7 +185,8 @@ export type SingleDatasetRequest = {
185
185
  name?: string
186
186
  }
187
187
 
188
- export type UpdateDatasetRequest = {
188
+
189
+ /* baize modified */ export type BaseUpdateDatasetRequest = {
189
190
  workspace?: number
190
191
  cluster?: string
191
192
  namespace?: string
@@ -193,6 +194,9 @@ export type UpdateDatasetRequest = {
193
194
  secretOptions?: SecretOptions
194
195
  }
195
196
 
197
+ export type UpdateDatasetRequest = BaseUpdateDatasetRequest
198
+ & OneOf<{ conda: DataSourceOptionsConda }>
199
+
196
200
  export type DatasetActionRequest = {
197
201
  workspace?: number
198
202
  cluster?: string
@@ -201,6 +205,32 @@ export type DatasetActionRequest = {
201
205
  action?: DatasetActionRequestAction
202
206
  }
203
207
 
208
+ export type GetDatasetCondaOptionsRequest = {
209
+ }
210
+
211
+ export type GetDatasetCondaOptionsResponse = {
212
+ pythonVersions?: string[]
213
+ }
214
+
215
+ export type RelatedInstancesRequest = {
216
+ workspace?: number
217
+ cluster?: string
218
+ namespace?: string
219
+ name?: string
220
+ page?: BaizeCommonCommon.Pagination
221
+ }
222
+
223
+ export type RelatedInstancesResponseInstance = {
224
+ name?: string
225
+ namespace?: string
226
+ cluster?: string
227
+ }
228
+
229
+ export type RelatedInstancesResponse = {
230
+ items?: RelatedInstancesResponseInstance[]
231
+ page?: BaizeCommonCommon.Pagination
232
+ }
233
+
204
234
  export class DatasetManagement {
205
235
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
206
236
  return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
@@ -220,4 +250,10 @@ export class DatasetManagement {
220
250
  static DatasetDoAction(req: DatasetActionRequest, initReq?: fm.InitReq): Promise<Dataset> {
221
251
  return fm.fetchReq<DatasetActionRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
222
252
  }
253
+ static GetDatasetCondaOptions(req: GetDatasetCondaOptionsRequest, initReq?: fm.InitReq): Promise<GetDatasetCondaOptionsResponse> {
254
+ return fm.fetchReq<GetDatasetCondaOptionsRequest, GetDatasetCondaOptionsResponse>(`/apis/baize.io/v1alpha1/datasets/conda/options?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
255
+ }
256
+ static GetRelatedInstances(req: RelatedInstancesRequest, initReq?: fm.InitReq): Promise<RelatedInstancesResponse> {
257
+ return fm.fetchReq<RelatedInstancesRequest, RelatedInstancesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/related-instances?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
258
+ }
223
259
  }
@@ -22,6 +22,7 @@ type OneOf<T> =
22
22
  export enum NotebookType {
23
23
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
24
24
  JUPYTER = "JUPYTER",
25
+ CODE = "CODE",
25
26
  }
26
27
 
27
28
  export enum NotebookConfigServiceType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.106.0",
3
+ "version": "v0.106.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"