@daocloud-proto/leopard 0.12.0-rc2 → 0.12.0-rc3

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.12.0-rc2",
3
+ "version":"0.12.0-rc3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -8,9 +8,15 @@ import * as fm from "../fetch.pb"
8
8
  export type GetInviteInfoRequest = {
9
9
  }
10
10
 
11
+ export type InviteRewardInfo = {
12
+ rewardText?: string
13
+ rewardDescriptionLink?: string
14
+ }
15
+
11
16
  export type GetInviteInfoResponse = {
12
17
  inviteCode?: string
13
18
  inviteUrl?: string
19
+ inviteRewardInfo?: InviteRewardInfo
14
20
  }
15
21
 
16
22
  export type InitInviteCodeRequest = {
@@ -22,6 +28,7 @@ export type InitInviteCodeResponse = {
22
28
  export type ListInvitedUsersRequest = {
23
29
  pageSize?: number
24
30
  page?: number
31
+ search?: string
25
32
  }
26
33
 
27
34
  export type ListInvitedUsersResponse = {
@@ -77,10 +77,26 @@ export type GetVoucherStatByCurrentUserResponse = {
77
77
  count?: number
78
78
  }
79
79
 
80
+ export type BatchCreateAndActiveVouchersRequest = {
81
+ users?: string[]
82
+ description?: string
83
+ totalAmount?: string
84
+ effectiveDays?: number
85
+ quantity?: number
86
+ regions?: string[]
87
+ expireTimestamp?: string
88
+ }
89
+
90
+ export type BatchCreateAndActiveVouchersResponse = {
91
+ }
92
+
80
93
  export class Voucher {
81
94
  static BatchCreateVouchers(req: BatchCreateVouchersRequest, initReq?: fm.InitReq): Promise<BatchCreateVouchersResponse> {
82
95
  return fm.fetchReq<BatchCreateVouchersRequest, BatchCreateVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/batch-create`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
83
96
  }
97
+ static BatchCreateAndActiveVouchers(req: BatchCreateAndActiveVouchersRequest, initReq?: fm.InitReq): Promise<BatchCreateAndActiveVouchersResponse> {
98
+ return fm.fetchReq<BatchCreateAndActiveVouchersRequest, BatchCreateAndActiveVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/batch-create-active`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
99
+ }
84
100
  static ActivateVoucher(req: ActivateVoucherRequest, initReq?: fm.InitReq): Promise<ActivateVoucherResponse> {
85
101
  return fm.fetchReq<ActivateVoucherRequest, ActivateVoucherResponse>(`/apis/leopard.io/v1alpha1/vouchers/activate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
86
102
  }