@daocloud-proto/leopard 0.2.0-rc7 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/leopard",
3
- "version":"0.2.0-rc7",
3
+ "version":"0.3.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -19,6 +19,7 @@ export enum UnitType {
19
19
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
20
20
  GB_DAY = "GB_DAY",
21
21
  INSTANCE_NUMBER = "INSTANCE_NUMBER",
22
+ PICTURE = "PICTURE",
22
23
  }
23
24
 
24
25
  export type ListBillsRequest = {
@@ -32,6 +32,7 @@ export enum UnitType {
32
32
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
33
33
  GB_DAY = "GB_DAY",
34
34
  INSTANCE_NUMBER = "INSTANCE_NUMBER",
35
+ PICTURE = "PICTURE",
35
36
  }
36
37
 
37
38
  export enum CreateOrderStatus {
@@ -84,6 +84,9 @@ export type ListRegionsRequest = {
84
84
  export type Region = {
85
85
  regionId?: string
86
86
  regionName?: string
87
+ cluster?: string
88
+ schemes?: string
89
+ host?: string
87
90
  }
88
91
 
89
92
  export type ListRegionsResponse = {
@@ -122,6 +125,18 @@ export type ListProductSpecFieldResponse = {
122
125
  specFields?: SpecField[]
123
126
  }
124
127
 
128
+ export type CreateRegionRequest = {
129
+ regionId?: string
130
+ enUsName?: string
131
+ zhCnName?: string
132
+ cluster?: string
133
+ schemes?: string
134
+ host?: string
135
+ }
136
+
137
+ export type CreateRegionResponse = {
138
+ }
139
+
125
140
  export class Product {
126
141
  static ListProductSKUs(req: ListProductSKUsRequest, initReq?: fm.InitReq): Promise<ListProductSKUsResponse> {
127
142
  return fm.fetchReq<ListProductSKUsRequest, ListProductSKUsResponse>(`/apis/leopard.io/v1alpha1/products/skus`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -135,6 +150,9 @@ export class Product {
135
150
  static ListRegions(req: ListRegionsRequest, initReq?: fm.InitReq): Promise<ListRegionsResponse> {
136
151
  return fm.fetchReq<ListRegionsRequest, ListRegionsResponse>(`/apis/leopard.io/v1alpha1/products/regions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
137
152
  }
153
+ static CreateRegion(req: CreateRegionRequest, initReq?: fm.InitReq): Promise<CreateRegionResponse> {
154
+ return fm.fetchReq<CreateRegionRequest, CreateRegionResponse>(`/apis/leopard.io/v1alpha1/products/regions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
155
+ }
138
156
  static ListProductSpecFieldValues(req: ListProductSpecFieldRequest, initReq?: fm.InitReq): Promise<ListProductSpecFieldResponse> {
139
157
  return fm.fetchReq<ListProductSpecFieldRequest, ListProductSpecFieldResponse>(`/apis/leopard.io/v1alpha1/products/specs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
140
158
  }