@daocloud-proto/hydra 0.15.0-dev-7 → 0.16.0-rc1

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,62 @@
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 fm from "../../../fetch.pb"
8
+ export type CostMockConfig = {
9
+ gpuCosts?: GPUCost[]
10
+ maasUsageCosts?: MaasUsageCost[]
11
+ maasTimeBoundPackageCosts?: MaaSTimeBoundPackageCost[]
12
+ }
13
+
14
+ export type GPUCost = {
15
+ productName?: string
16
+ sn?: string
17
+ cluster?: string
18
+ hourlyPrice?: number
19
+ }
20
+
21
+ export type MaasUsageCost = {
22
+ upstreamModelName?: string
23
+ inputPrice?: number
24
+ cachedInputPrice?: number
25
+ outputPrice?: number
26
+ }
27
+
28
+ export type MaaSTimeBoundPackageCost = {
29
+ upstreamModelName?: string
30
+ hourlyInputPrice?: number
31
+ hourlyCachedInputPrice?: number
32
+ hourlyOutputPrice?: number
33
+ }
34
+
35
+ export type CreateCostMockConfigRequest = {
36
+ config?: CostMockConfig
37
+ }
38
+
39
+ export type GetCostMockConfigRequest = {
40
+ }
41
+
42
+ export type UpdateCostMockConfigRequest = {
43
+ config?: CostMockConfig
44
+ }
45
+
46
+ export type DeleteCostMockConfigRequest = {
47
+ }
48
+
49
+ export class CostMockConfigManagement {
50
+ static CreateCostMockConfig(req: CreateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
51
+ return fm.fetchReq<CreateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
52
+ }
53
+ static GetCostMockConfig(req: GetCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
54
+ return fm.fetchReq<GetCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
55
+ }
56
+ static UpdateCostMockConfig(req: UpdateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
57
+ return fm.fetchReq<UpdateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
58
+ }
59
+ static DeleteCostMockConfig(req: DeleteCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
60
+ return fm.fetchReq<DeleteCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "DELETE"})
61
+ }
62
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.15.0-dev-7",
3
+ "version": "v0.16.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"