@daocloud-proto/hydra 0.11.0-dev-4 → 0.11.0-dev-6

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.
@@ -0,0 +1,94 @@
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 HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum StorageSourceType {
12
+ STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
13
+ FILES_STORAGE = "FILES_STORAGE",
14
+ PVC_STORAGE = "PVC_STORAGE",
15
+ }
16
+
17
+ export type ModelWeightsVolume = {
18
+ id?: string
19
+ modelId?: string
20
+ modelTag?: string
21
+ clusterName?: string
22
+ storageSource?: StorageSourceType
23
+ storageRef?: string
24
+ subPath?: string
25
+ mountPath?: string
26
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
27
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
28
+ }
29
+
30
+ export type CreateModelWeightsVolumeRequest = {
31
+ id?: string
32
+ modelId?: string
33
+ clusterName?: string
34
+ modelTag?: string
35
+ storageSource?: StorageSourceType
36
+ storageRef?: string
37
+ subPath?: string
38
+ mountPath?: string
39
+ }
40
+
41
+ export type UpdateModelWeightsVolumeRequest = {
42
+ id?: string
43
+ modelId?: string
44
+ clusterName?: string
45
+ modelTag?: string
46
+ storageSource?: StorageSourceType
47
+ storageRef?: string
48
+ subPath?: string
49
+ mountPath?: string
50
+ }
51
+
52
+ export type SingleModelWeightsVolumeRequest = {
53
+ id?: string
54
+ modelId?: string
55
+ }
56
+
57
+ export type ListModelWeightsVolumesRequest = {
58
+ modelId?: string
59
+ page?: HydraCommonCommon.Pagination
60
+ }
61
+
62
+ export type ListModelWeightsVolumesResponse = {
63
+ items?: ModelWeightsVolume[]
64
+ page?: HydraCommonCommon.Pagination
65
+ }
66
+
67
+ export type GetStorageSourceRequest = {
68
+ modelId?: string
69
+ }
70
+
71
+ export type GetStorageSourceResponse = {
72
+ sources?: {[key: string]: number}
73
+ }
74
+
75
+ export class AdminModelWeightsVolumeManagement {
76
+ static CreateModelWeightsVolume(req: CreateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
77
+ return fm.fetchReq<CreateModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
78
+ }
79
+ static UpdateModelWeightsVolume(req: UpdateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
80
+ return fm.fetchReq<UpdateModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
81
+ }
82
+ static DeleteModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
83
+ return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
84
+ }
85
+ static GetModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
86
+ return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "id"])}`, {...initReq, method: "GET"})
87
+ }
88
+ static ListModelWeightsVolumes(req: ListModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListModelWeightsVolumesResponse> {
89
+ return fm.fetchReq<ListModelWeightsVolumesRequest, ListModelWeightsVolumesResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
90
+ }
91
+ static GetStorageSource(req: GetStorageSourceRequest, initReq?: fm.InitReq): Promise<GetStorageSourceResponse> {
92
+ return fm.fetchReq<GetStorageSourceRequest, GetStorageSourceResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
93
+ }
94
+ }
@@ -0,0 +1,99 @@
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 HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum StorageSourceType {
12
+ STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
13
+ FILES_STORAGE = "FILES_STORAGE",
14
+ PVC_STORAGE = "PVC_STORAGE",
15
+ }
16
+
17
+ export type WSModelWeightsVolume = {
18
+ id?: string
19
+ modelId?: string
20
+ modelTag?: string
21
+ clusterName?: string
22
+ storageSource?: StorageSourceType
23
+ storageRef?: string
24
+ subPath?: string
25
+ mountPath?: string
26
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
27
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
28
+ }
29
+
30
+ export type CreateWSModelWeightsVolumeRequest = {
31
+ workspace?: number
32
+ id?: string
33
+ modelId?: string
34
+ clusterName?: string
35
+ modelTag?: string
36
+ storageSource?: StorageSourceType
37
+ storageRef?: string
38
+ subPath?: string
39
+ mountPath?: string
40
+ }
41
+
42
+ export type UpdateWSModelWeightsVolumeRequest = {
43
+ workspace?: number
44
+ id?: string
45
+ modelId?: string
46
+ clusterName?: string
47
+ modelTag?: string
48
+ storageSource?: StorageSourceType
49
+ storageRef?: string
50
+ subPath?: string
51
+ mountPath?: string
52
+ }
53
+
54
+ export type SingleWSModelWeightsVolumeRequest = {
55
+ workspace?: number
56
+ id?: string
57
+ modelId?: string
58
+ }
59
+
60
+ export type ListWSModelWeightsVolumesRequest = {
61
+ workspace?: number
62
+ modelId?: string
63
+ page?: HydraCommonCommon.Pagination
64
+ }
65
+
66
+ export type ListWSModelWeightsVolumesResponse = {
67
+ items?: WSModelWeightsVolume[]
68
+ page?: HydraCommonCommon.Pagination
69
+ }
70
+
71
+ export type GetWSStorageSourceRequest = {
72
+ workspace?: number
73
+ modelId?: string
74
+ }
75
+
76
+ export type GetWSStorageSourceResponse = {
77
+ sources?: {[key: string]: number}
78
+ }
79
+
80
+ export class WSModelWeightsVolumeManagement {
81
+ static CreateWSModelWeightsVolume(req: CreateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
82
+ return fm.fetchReq<CreateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
83
+ }
84
+ static UpdateWSModelWeightsVolume(req: UpdateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
85
+ return fm.fetchReq<UpdateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
86
+ }
87
+ static DeleteWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
88
+ return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
89
+ }
90
+ static GetWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
91
+ return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "workspace", "id"])}`, {...initReq, method: "GET"})
92
+ }
93
+ static ListWSModelWeightsVolumes(req: ListWSModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListWSModelWeightsVolumesResponse> {
94
+ return fm.fetchReq<ListWSModelWeightsVolumesRequest, ListWSModelWeightsVolumesResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
95
+ }
96
+ static GetWSStorageSource(req: GetWSStorageSourceRequest, initReq?: fm.InitReq): Promise<GetWSStorageSourceResponse> {
97
+ return fm.fetchReq<GetWSStorageSourceRequest, GetWSStorageSourceResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
98
+ }
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.11.0-dev-4",
3
+ "version": "v0.11.0-dev-6",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"