@daocloud-proto/leopard 0.16.0-dev1 → 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-dev1",
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
@@ -70,6 +75,25 @@ export type VoucherInfo = {
70
75
  expireTimestamp?: string
71
76
  }
72
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
89
+ userId?: string
90
+ username?: string
91
+ effectiveDays?: number
92
+ createdAt?: string
93
+ createUserId?: string
94
+ createUsername?: string
95
+ }
96
+
73
97
  export type ActivateVoucherRequest = {
74
98
  voucherId?: string
75
99
  }
@@ -123,8 +147,8 @@ export class Voucher {
123
147
  static ListExpiredVouchersByCurrentUser(req: ListExpiredVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
124
148
  return fm.fetchReq<ListExpiredVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/expired?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
125
149
  }
126
- static ListVouchers(req: ListVouchersRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
127
- 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"})
128
152
  }
129
153
  static GetVoucherStatByCurrentUser(req: GetVoucherStatByCurrentUserRequest, initReq?: fm.InitReq): Promise<GetVoucherStatByCurrentUserResponse> {
130
154
  return fm.fetchReq<GetVoucherStatByCurrentUserRequest, GetVoucherStatByCurrentUserResponse>(`/apis/leopard.io/v1alpha1/vouchers/stat?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})