@daocloud-proto/leopard 0.4.0-dev1 → 0.4.0-dev2

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.4.0-dev1",
3
+ "version":"0.4.0-dev2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -87,6 +87,7 @@ export type Region = {
87
87
  cluster?: string
88
88
  schemes?: string
89
89
  host?: string
90
+ regionType?: string
90
91
  }
91
92
 
92
93
  export type ListRegionsResponse = {
@@ -132,11 +133,35 @@ export type CreateRegionRequest = {
132
133
  cluster?: string
133
134
  schemes?: string
134
135
  host?: string
136
+ regionType?: string
137
+ displayOrder?: number
135
138
  }
136
139
 
137
140
  export type CreateRegionResponse = {
138
141
  }
139
142
 
143
+ export type CreateRegionTypeRequest = {
144
+ regionType?: string
145
+ enUsName?: string
146
+ zhCnName?: string
147
+ }
148
+
149
+ export type CreateRegionTypeResponse = {
150
+ }
151
+
152
+ export type ListRegionTypesRequest = {
153
+ }
154
+
155
+ export type ListRegionTypesResponse = {
156
+ items?: RegionType[]
157
+ }
158
+
159
+ export type RegionType = {
160
+ regionType?: string
161
+ enUsName?: string
162
+ zhCnName?: string
163
+ }
164
+
140
165
  export class Product {
141
166
  static ListProductSKUs(req: ListProductSKUsRequest, initReq?: fm.InitReq): Promise<ListProductSKUsResponse> {
142
167
  return fm.fetchReq<ListProductSKUsRequest, ListProductSKUsResponse>(`/apis/leopard.io/v1alpha1/products/skus`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -153,6 +178,12 @@ export class Product {
153
178
  static CreateRegion(req: CreateRegionRequest, initReq?: fm.InitReq): Promise<CreateRegionResponse> {
154
179
  return fm.fetchReq<CreateRegionRequest, CreateRegionResponse>(`/apis/leopard.io/v1alpha1/products/regions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
155
180
  }
181
+ static CreateRegionType(req: CreateRegionTypeRequest, initReq?: fm.InitReq): Promise<CreateRegionTypeResponse> {
182
+ return fm.fetchReq<CreateRegionTypeRequest, CreateRegionTypeResponse>(`/apis/leopard.io/v1alpha1/products/regions/types`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
183
+ }
184
+ static ListRegionTypes(req: ListRegionTypesRequest, initReq?: fm.InitReq): Promise<ListRegionTypesResponse> {
185
+ return fm.fetchReq<ListRegionTypesRequest, ListRegionTypesResponse>(`/apis/leopard.io/v1alpha1/products/regions/types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
186
+ }
156
187
  static ListProductSpecFieldValues(req: ListProductSpecFieldRequest, initReq?: fm.InitReq): Promise<ListProductSpecFieldResponse> {
157
188
  return fm.fetchReq<ListProductSpecFieldRequest, ListProductSpecFieldResponse>(`/apis/leopard.io/v1alpha1/products/specs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
158
189
  }
@@ -41,6 +41,14 @@ export type UserStateRequest = {
41
41
 
42
42
  export type UserStateResponse = {
43
43
  amount?: string
44
+ isVerified?: boolean
45
+ }
46
+
47
+ export type GetUserStateRequest = {
48
+ }
49
+
50
+ export type GetUserStateResponse = {
51
+ isVerified?: boolean
44
52
  }
45
53
 
46
54
  export class Wallet {
@@ -50,6 +58,9 @@ export class Wallet {
50
58
  static Recharge(req: RechargeRequest, initReq?: fm.InitReq): Promise<RechargeResponse> {
51
59
  return fm.fetchReq<RechargeRequest, RechargeResponse>(`/apis/leopard.io/v1alpha1/wallet/recharge`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
52
60
  }
61
+ static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
62
+ return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
63
+ }
53
64
  static UserState(req: UserStateRequest, initReq?: fm.InitReq): Promise<UserStateResponse> {
54
65
  return fm.fetchReq<UserStateRequest, UserStateResponse>(`/v1alpha1.wallet.Wallet/UserState`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
55
66
  }