@daocloud-proto/leopard 0.9.0 → 0.10.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/account.pb.ts +1 -1
- package/v1alpha1/accounts.pb.ts +74 -0
- package/v1alpha1/product.pb.ts +11 -0
- package/v1alpha1/wallet.pb.ts +60 -0
package/package.json
CHANGED
package/v1alpha1/account.pb.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type GetExportURLResponse = {
|
|
|
51
51
|
method?: RequestMethod
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export class
|
|
54
|
+
export class Accounts {
|
|
55
55
|
static ListCurrentMembers(req: ListCurrentMembersRequest, initReq?: fm.InitReq): Promise<ListCurrentMembersResponse> {
|
|
56
56
|
return fm.fetchReq<ListCurrentMembersRequest, ListCurrentMembersResponse>(`/apis/leopard.io/v1alpha1/accounts/current/members?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
57
57
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
|
|
9
|
+
export enum Modules {
|
|
10
|
+
bills = "bills",
|
|
11
|
+
monthly_bills = "monthly_bills",
|
|
12
|
+
orders = "orders",
|
|
13
|
+
transactions = "transactions",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum RequestMethod {
|
|
17
|
+
GET = "GET",
|
|
18
|
+
POST = "POST",
|
|
19
|
+
PUT = "PUT",
|
|
20
|
+
DELETE = "DELETE",
|
|
21
|
+
PATCH = "PATCH",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type ListSubAccountsRequest = {
|
|
25
|
+
page?: number
|
|
26
|
+
pageSize?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type ListSubAccountsResponse = {
|
|
30
|
+
items?: AccountInfo[]
|
|
31
|
+
pagination?: Pagination
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ListCurrentMembersRequest = {
|
|
35
|
+
page?: number
|
|
36
|
+
pageSize?: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type ListCurrentMembersResponse = {
|
|
40
|
+
items?: AccountInfo[]
|
|
41
|
+
pagination?: Pagination
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type AccountInfo = {
|
|
45
|
+
id?: string
|
|
46
|
+
name?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type Pagination = {
|
|
50
|
+
total?: number
|
|
51
|
+
page?: number
|
|
52
|
+
pageSize?: number
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type GetExportURLRequest = {
|
|
56
|
+
module?: Modules
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type GetExportURLResponse = {
|
|
60
|
+
url?: string
|
|
61
|
+
method?: RequestMethod
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class Accounts {
|
|
65
|
+
static ListCurrentMembers(req: ListCurrentMembersRequest, initReq?: fm.InitReq): Promise<ListCurrentMembersResponse> {
|
|
66
|
+
return fm.fetchReq<ListCurrentMembersRequest, ListCurrentMembersResponse>(`/apis/leopard.io/v1alpha1/accounts/current/members?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
67
|
+
}
|
|
68
|
+
static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
|
|
69
|
+
return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/leopard.io/v1alpha1/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
70
|
+
}
|
|
71
|
+
static GetExportURL(req: GetExportURLRequest, initReq?: fm.InitReq): Promise<GetExportURLResponse> {
|
|
72
|
+
return fm.fetchReq<GetExportURLRequest, GetExportURLResponse>(`/apis/leopard.io/v1alpha1/export/url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
73
|
+
}
|
|
74
|
+
}
|
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -352,6 +352,14 @@ export type DeleteSKUInfoRequest = {
|
|
|
352
352
|
export type DeleteSKUInfoResponse = {
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
+
export type CreateRegionDomainRequest = {
|
|
356
|
+
region?: string
|
|
357
|
+
domain?: string
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export type CreateRegionDomainResponse = {
|
|
361
|
+
}
|
|
362
|
+
|
|
355
363
|
export class Product {
|
|
356
364
|
static ListProductSKUs(req: ListProductSKUsRequest, initReq?: fm.InitReq): Promise<ListProductSKUsResponse> {
|
|
357
365
|
return fm.fetchReq<ListProductSKUsRequest, ListProductSKUsResponse>(`/apis/leopard.io/v1alpha1/products/skus`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -416,4 +424,7 @@ export class Product {
|
|
|
416
424
|
static UpdateSKUDiscountRule(req: UpdateSKUDiscountRuleRequest, initReq?: fm.InitReq): Promise<UpdateSKUDiscountRuleResponse> {
|
|
417
425
|
return fm.fetchReq<UpdateSKUDiscountRuleRequest, UpdateSKUDiscountRuleResponse>(`/apis/leopard.io/v1alpha1/products/sku-infos/${req["skuId"]}/discount`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
418
426
|
}
|
|
427
|
+
static CreateRegionDomain(req: CreateRegionDomainRequest, initReq?: fm.InitReq): Promise<CreateRegionDomainResponse> {
|
|
428
|
+
return fm.fetchReq<CreateRegionDomainRequest, CreateRegionDomainResponse>(`/apis/leopard.io/v1alpha1/products/region-domain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
429
|
+
}
|
|
419
430
|
}
|
package/v1alpha1/wallet.pb.ts
CHANGED
|
@@ -17,11 +17,17 @@ export enum PaymentType {
|
|
|
17
17
|
REDIRECT = "REDIRECT",
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export enum OperationType {
|
|
21
|
+
INCREASE = "INCREASE",
|
|
22
|
+
DECREASE = "DECREASE",
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
export type BalanceRequest = {
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export type BalanceResponse = {
|
|
24
29
|
balance?: string
|
|
30
|
+
isVirtual?: boolean
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
export type RechargeRequest = {
|
|
@@ -86,6 +92,48 @@ export type CorporateTransferRechargeRequest = {
|
|
|
86
92
|
export type CorporateTransferRechargeResponse = {
|
|
87
93
|
}
|
|
88
94
|
|
|
95
|
+
export type VirtualWallet = {
|
|
96
|
+
id?: string
|
|
97
|
+
name?: string
|
|
98
|
+
balance?: string
|
|
99
|
+
arrearsStop?: boolean
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type ListVirtualWalletsResponse = {
|
|
103
|
+
items?: VirtualWallet[]
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type ListVirtualWalletsRequest = {
|
|
107
|
+
username?: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type CreateVirtualWalletRequest = {
|
|
111
|
+
id?: string
|
|
112
|
+
amount?: string
|
|
113
|
+
arrearsStop?: boolean
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type CreateVirtualWalletResponse = {
|
|
117
|
+
id?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type UpdateVirtualWalletRequest = {
|
|
121
|
+
id?: string
|
|
122
|
+
amount?: string
|
|
123
|
+
arrearsStop?: boolean
|
|
124
|
+
type?: OperationType
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type UpdateVirtualWalletResponse = {
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type DeleteVirtualWalletRequest = {
|
|
131
|
+
id?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type DeleteVirtualWalletResponse = {
|
|
135
|
+
}
|
|
136
|
+
|
|
89
137
|
export class Wallet {
|
|
90
138
|
static Balance(req: BalanceRequest, initReq?: fm.InitReq): Promise<BalanceResponse> {
|
|
91
139
|
return fm.fetchReq<BalanceRequest, BalanceResponse>(`/apis/leopard.io/v1alpha1/wallet/balance?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -102,6 +150,18 @@ export class Wallet {
|
|
|
102
150
|
static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
|
|
103
151
|
return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
104
152
|
}
|
|
153
|
+
static ListVirtualWallets(req: ListVirtualWalletsRequest, initReq?: fm.InitReq): Promise<ListVirtualWalletsResponse> {
|
|
154
|
+
return fm.fetchReq<ListVirtualWalletsRequest, ListVirtualWalletsResponse>(`/apis/leopard.io/v1alpha1/wallet/virtual-wallets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
155
|
+
}
|
|
156
|
+
static CreateVirtualWallet(req: CreateVirtualWalletRequest, initReq?: fm.InitReq): Promise<CreateVirtualWalletResponse> {
|
|
157
|
+
return fm.fetchReq<CreateVirtualWalletRequest, CreateVirtualWalletResponse>(`/apis/leopard.io/v1alpha1/wallet/virtual-wallet`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
158
|
+
}
|
|
159
|
+
static UpdateVirtualWallet(req: UpdateVirtualWalletRequest, initReq?: fm.InitReq): Promise<UpdateVirtualWalletResponse> {
|
|
160
|
+
return fm.fetchReq<UpdateVirtualWalletRequest, UpdateVirtualWalletResponse>(`/apis/leopard.io/v1alpha1/wallet/virtual-wallet/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
161
|
+
}
|
|
162
|
+
static DeleteVirtualWallet(req: DeleteVirtualWalletRequest, initReq?: fm.InitReq): Promise<DeleteVirtualWalletResponse> {
|
|
163
|
+
return fm.fetchReq<DeleteVirtualWalletRequest, DeleteVirtualWalletResponse>(`/apis/leopard.io/v1alpha1/wallet/virtual-wallet/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
164
|
+
}
|
|
105
165
|
static UserState(req: UserStateRequest, initReq?: fm.InitReq): Promise<UserStateResponse> {
|
|
106
166
|
return fm.fetchReq<UserStateRequest, UserStateResponse>(`/v1alpha1.wallet.Wallet/UserState`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
107
167
|
}
|