@daocloud-proto/leopard 0.2.0-rc6 → 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 +1 -1
- package/v1alpha1/bill.pb.ts +1 -0
- package/v1alpha1/order.pb.ts +1 -0
- package/v1alpha1/product.pb.ts +18 -0
package/package.json
CHANGED
package/v1alpha1/bill.pb.ts
CHANGED
package/v1alpha1/order.pb.ts
CHANGED
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -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
|
}
|