@daocloud-proto/leopard 0.11.0 → 0.12.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 +1 -1
- package/v1alpha1/activity.pb.ts +60 -0
- package/v1alpha1/order.pb.ts +1 -1
- package/v1alpha1/voucher.pb.ts +16 -0
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../fetch.pb"
|
|
8
|
+
export type GetInviteInfoRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type InviteRewardInfo = {
|
|
12
|
+
rewardText?: string
|
|
13
|
+
rewardDescriptionLink?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type GetInviteInfoResponse = {
|
|
17
|
+
inviteCode?: string
|
|
18
|
+
inviteUrl?: string
|
|
19
|
+
inviteRewardInfo?: InviteRewardInfo
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type InitInviteCodeRequest = {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type InitInviteCodeResponse = {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ListInvitedUsersRequest = {
|
|
29
|
+
pageSize?: number
|
|
30
|
+
page?: number
|
|
31
|
+
search?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ListInvitedUsersResponse = {
|
|
35
|
+
items?: InvitedUser[]
|
|
36
|
+
pagination?: Pagination
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type InvitedUser = {
|
|
40
|
+
username?: string
|
|
41
|
+
registerAt?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type Pagination = {
|
|
45
|
+
total?: number
|
|
46
|
+
page?: number
|
|
47
|
+
pageSize?: number
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export class Activity {
|
|
51
|
+
static GetInviteInfo(req: GetInviteInfoRequest, initReq?: fm.InitReq): Promise<GetInviteInfoResponse> {
|
|
52
|
+
return fm.fetchReq<GetInviteInfoRequest, GetInviteInfoResponse>(`/apis/leopard.io/v1alpha1/activity/invite/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
53
|
+
}
|
|
54
|
+
static InitInviteCode(req: InitInviteCodeRequest, initReq?: fm.InitReq): Promise<InitInviteCodeResponse> {
|
|
55
|
+
return fm.fetchReq<InitInviteCodeRequest, InitInviteCodeResponse>(`/apis/leopard.io/v1alpha1/activity/invite/code`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
56
|
+
}
|
|
57
|
+
static ListInvitedUsers(req: ListInvitedUsersRequest, initReq?: fm.InitReq): Promise<ListInvitedUsersResponse> {
|
|
58
|
+
return fm.fetchReq<ListInvitedUsersRequest, ListInvitedUsersResponse>(`/apis/leopard.io/v1alpha1/activity/invite/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
59
|
+
}
|
|
60
|
+
}
|
package/v1alpha1/order.pb.ts
CHANGED
package/v1alpha1/voucher.pb.ts
CHANGED
|
@@ -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
|
}
|