@daocloud-proto/baize 0.105.1 → 0.105.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.
@@ -4,16 +4,75 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as BaizeCommonCommon from "../../../common/common.pb"
7
8
  import * as BaizeCommonK8s from "../../../common/k8s.pb"
9
+ import * as fm from "../../../fetch.pb"
10
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
8
11
 
9
- export enum AnalysisConfigType {
12
+ export enum AnalysisType {
10
13
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
11
14
  TENSORBOARD = "TENSORBOARD",
12
15
  }
13
16
 
17
+ export enum AnalysisStatusPhase {
18
+ PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
19
+ PENDING = "PENDING",
20
+ RUNNING = "RUNNING",
21
+ STOPPED = "STOPPED",
22
+ FAILED = "FAILED",
23
+ }
24
+
14
25
  export type AnalysisConfig = {
15
26
  enabled?: boolean
16
- type?: AnalysisConfigType
27
+ type?: AnalysisType
28
+ kubeVolumes?: BaizeCommonK8s.KubeVolume[]
29
+ logPath?: string
30
+ }
31
+
32
+ export type AnalysisStatus = {
33
+ accessUrl?: string
34
+ message?: string
35
+ phase?: AnalysisStatusPhase
36
+ }
37
+
38
+ export type Analysis = {
39
+ workspace?: number
40
+ cluster?: string
41
+ namespace?: string
42
+ name?: string
43
+ queueName?: string
44
+ type?: AnalysisType
17
45
  kubeVolumes?: BaizeCommonK8s.KubeVolume[]
18
46
  logPath?: string
47
+ status?: AnalysisStatus
48
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
49
+ }
50
+
51
+ export type ListAnalysisRequest = {
52
+ workspace?: number
53
+ cluster?: string
54
+ namespace?: string
55
+ queueName?: string
56
+ page?: BaizeCommonCommon.Pagination
57
+ }
58
+
59
+ export type ListAnalysisResponse = {
60
+ items?: Analysis[]
61
+ page?: BaizeCommonCommon.Pagination
62
+ }
63
+
64
+ export type SingleAnalysisRequest = {
65
+ workspace?: number
66
+ cluster?: string
67
+ namespace?: string
68
+ name?: string
69
+ }
70
+
71
+ export class AnalysisManagement {
72
+ static ListAnalysis(req: ListAnalysisRequest, initReq?: fm.InitReq): Promise<ListAnalysisResponse> {
73
+ return fm.fetchReq<ListAnalysisRequest, ListAnalysisResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/analysis?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
74
+ }
75
+ static DeleteAnalysis(req: SingleAnalysisRequest, initReq?: fm.InitReq): Promise<Analysis> {
76
+ return fm.fetchReq<SingleAnalysisRequest, Analysis>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/analysis/${req["name"]}`, {...initReq, method: "DELETE"})
77
+ }
19
78
  }
@@ -36,7 +36,7 @@ export enum RestartPolicy {
36
36
 
37
37
  export enum JobActionRequestAction {
38
38
  JOB_ACTION_UNSPECIFIED = "JOB_ACTION_UNSPECIFIED",
39
- STOP = "STOP",
39
+ RESTART = "RESTART",
40
40
  }
41
41
 
42
42
  export enum JobSchedulersResponseSchedulerFeature {
@@ -77,7 +77,8 @@ export type ListJobsResponse = {
77
77
  page?: BaizeCommonCommon.Pagination
78
78
  }
79
79
 
80
- export type SingleJobRequest = {
80
+
81
+ /* baize modified */ export type BaseSingleJobRequest = {
81
82
  workspace?: number
82
83
  type?: JobType
83
84
  cluster?: string
@@ -85,6 +86,9 @@ export type SingleJobRequest = {
85
86
  name?: string
86
87
  }
87
88
 
89
+ export type SingleJobRequest = BaseSingleJobRequest
90
+ & OneOf<{ deleteAnalysis: boolean }>
91
+
88
92
  export type CreateJobRequest = {
89
93
  workspace?: number
90
94
  type?: JobType
@@ -10,6 +10,15 @@ import * as fm from "../../../fetch.pb"
10
10
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
11
  import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
12
12
 
13
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
14
+ type OneOf<T> =
15
+ | { [k in keyof T]?: undefined }
16
+ | (
17
+ keyof T extends infer K ?
18
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
19
+ : never)
20
+ : never);
21
+
13
22
  export enum NotebookType {
14
23
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
15
24
  JUPYTER = "JUPYTER",
@@ -87,13 +96,17 @@ export type ListNotebooksResponse = {
87
96
  page?: BaizeCommonCommon.Pagination
88
97
  }
89
98
 
90
- export type SingleNotebookRequest = {
99
+
100
+ /* baize modified */ export type BaseSingleNotebookRequest = {
91
101
  workspace?: number
92
102
  cluster?: string
93
103
  namespace?: string
94
104
  name?: string
95
105
  }
96
106
 
107
+ export type SingleNotebookRequest = BaseSingleNotebookRequest
108
+ & OneOf<{ deleteAnalysis: boolean }>
109
+
97
110
  export type CreateNotebookRequest = {
98
111
  workspace?: number
99
112
  cluster?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.105.1",
3
+ "version": "v0.105.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"