@daocloud-proto/leopard 0.1.0-dev14 → 0.1.0-dev15
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/product.pb.ts +11 -2
package/package.json
CHANGED
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -71,7 +71,13 @@ export type SpecField = {
|
|
|
71
71
|
export type ListRegionsRequest = {
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
export type Region = {
|
|
75
|
+
regionId?: string
|
|
76
|
+
regionName?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
export type ListRegionsResponse = {
|
|
80
|
+
items?: Region[]
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
export type GetSKUResponse = {
|
|
@@ -96,6 +102,9 @@ export type GetSKUPriceResponse = {
|
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
export type ListProductSpecFieldRequest = {
|
|
105
|
+
regionId?: string
|
|
106
|
+
specKey?: string
|
|
107
|
+
product?: string
|
|
99
108
|
}
|
|
100
109
|
|
|
101
110
|
export type ListProductSpecFieldResponse = {
|
|
@@ -113,9 +122,9 @@ export class Product {
|
|
|
113
122
|
return fm.fetchReq<GetSKUPriceRequest, GetSKUPriceResponse>(`/apis/leopard.io/v1alpha1/products/skus/${req["id"]}/price?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
114
123
|
}
|
|
115
124
|
static ListRegions(req: ListRegionsRequest, initReq?: fm.InitReq): Promise<ListRegionsResponse> {
|
|
116
|
-
return fm.fetchReq<ListRegionsRequest, ListRegionsResponse>(`/apis/leopard.io/v1alpha1/regions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
125
|
+
return fm.fetchReq<ListRegionsRequest, ListRegionsResponse>(`/apis/leopard.io/v1alpha1/products/regions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
117
126
|
}
|
|
118
|
-
static
|
|
127
|
+
static ListProductSpecFieldValues(req: ListProductSpecFieldRequest, initReq?: fm.InitReq): Promise<ListProductSpecFieldResponse> {
|
|
119
128
|
return fm.fetchReq<ListProductSpecFieldRequest, ListProductSpecFieldResponse>(`/apis/leopard.io/v1alpha1/products/specs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
120
129
|
}
|
|
121
130
|
}
|