@daocloud-proto/leopard 0.16.0-dev2 → 0.16.0-dev3

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.16.0-dev2",
3
+ "version":"0.16.0-dev3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -51,6 +51,11 @@ export type ListVouchersResponse = {
51
51
  pagination?: Pagination
52
52
  }
53
53
 
54
+ export type ListAllVouchersResponse = {
55
+ items?: VoucherListInfo[]
56
+ pagination?: Pagination
57
+ }
58
+
54
59
  export type Pagination = {
55
60
  total?: number
56
61
  page?: number
@@ -68,8 +73,25 @@ export type VoucherInfo = {
68
73
  orderTypes?: string[]
69
74
  effectTimestamp?: string
70
75
  expireTimestamp?: string
76
+ }
77
+
78
+ export type VoucherListInfo = {
79
+ voucherId?: string
80
+ description?: string
81
+ status?: VoucherStatus
82
+ totalAmount?: string
83
+ remainingAmount?: string
84
+ regions?: string[]
85
+ products?: string[]
86
+ orderTypes?: string[]
87
+ effectTimestamp?: string
88
+ expireTimestamp?: string
71
89
  userId?: string
72
90
  username?: string
91
+ effectiveDays?: number
92
+ createdAt?: string
93
+ createUserId?: string
94
+ createUsername?: string
73
95
  }
74
96
 
75
97
  export type ActivateVoucherRequest = {
@@ -125,8 +147,8 @@ export class Voucher {
125
147
  static ListExpiredVouchersByCurrentUser(req: ListExpiredVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
126
148
  return fm.fetchReq<ListExpiredVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/expired?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
127
149
  }
128
- static ListVouchers(req: ListVouchersRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
129
- return fm.fetchReq<ListVouchersRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
150
+ static ListVouchers(req: ListVouchersRequest, initReq?: fm.InitReq): Promise<ListAllVouchersResponse> {
151
+ return fm.fetchReq<ListVouchersRequest, ListAllVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
130
152
  }
131
153
  static GetVoucherStatByCurrentUser(req: GetVoucherStatByCurrentUserRequest, initReq?: fm.InitReq): Promise<GetVoucherStatByCurrentUserResponse> {
132
154
  return fm.fetchReq<GetVoucherStatByCurrentUserRequest, GetVoucherStatByCurrentUserResponse>(`/apis/leopard.io/v1alpha1/vouchers/stat?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})