@metagptx/wallet 1.0.0
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/README.md +74 -0
- package/dist/google/api/annotations_pb.d.ts +14 -0
- package/dist/google/api/annotations_pb.d.ts.map +1 -0
- package/dist/google/api/annotations_pb.js +26 -0
- package/dist/google/api/http_pb.d.ts +441 -0
- package/dist/google/api/http_pb.d.ts.map +1 -0
- package/dist/google/api/http_pb.js +33 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/v1/account/quota_service_pb.d.ts +603 -0
- package/dist/v1/account/quota_service_pb.d.ts.map +1 -0
- package/dist/v1/account/quota_service_pb.js +117 -0
- package/dist/v1/common/base_pb.d.ts +38 -0
- package/dist/v1/common/base_pb.d.ts.map +1 -0
- package/dist/v1/common/base_pb.js +14 -0
- package/dist/v1/common/code_pb.d.ts +69 -0
- package/dist/v1/common/code_pb.d.ts.map +1 -0
- package/dist/v1/common/code_pb.js +72 -0
- package/dist/v1/common/enums_pb.d.ts +76 -0
- package/dist/v1/common/enums_pb.d.ts.map +1 -0
- package/dist/v1/common/enums_pb.js +80 -0
- package/dist/v1/server_pb.d.ts +67 -0
- package/dist/v1/server_pb.d.ts.map +1 -0
- package/dist/v1/server_pb.js +41 -0
- package/dist/v1/topup/order_service_pb.d.ts +585 -0
- package/dist/v1/topup/order_service_pb.d.ts.map +1 -0
- package/dist/v1/topup/order_service_pb.js +171 -0
- package/package.json +42 -0
- package/src/google/api/annotations_pb.ts +39 -0
- package/src/google/api/http_pb.ts +474 -0
- package/src/index.ts +21 -0
- package/src/v1/account/quota_service_pb.ts +713 -0
- package/src/v1/common/base_pb.ts +51 -0
- package/src/v1/common/code_pb.ts +89 -0
- package/src/v1/common/enums_pb.ts +95 -0
- package/src/v1/server_pb.ts +87 -0
- package/src/v1/topup/order_service_pb.ts +695 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file v1/account/quota_service.proto (package mgx.wallet.v1.account, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
+
import { file_google_api_annotations } from "../../google/api/annotations_pb";
|
|
8
|
+
import type { Code } from "../common/code_pb";
|
|
9
|
+
import { file_v1_common_code } from "../common/code_pb";
|
|
10
|
+
import type { AccountType, QuotaCategory } from "../common/enums_pb";
|
|
11
|
+
import { file_v1_common_enums } from "../common/enums_pb";
|
|
12
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Describes the file v1/account/quota_service.proto.
|
|
16
|
+
*/
|
|
17
|
+
export const file_v1_account_quota_service: GenFile = /*@__PURE__*/
|
|
18
|
+
fileDesc("Ch52MS9hY2NvdW50L3F1b3RhX3NlcnZpY2UucHJvdG8SFW1neC53YWxsZXQudjEuYWNjb3VudCL5AQoPRGVjcmVhc2VSZXF1ZXN0Eg8KB3VzZXJfaWQYASABKAMSDQoFcXVvdGEYAiABKAMSEgoFc2NhbGUYAyABKAVIAIgBARIQCghiaXpfbmFtZRgEIAEoCRI1CghjYXRlZ29yeRgFIAEoDjIjLm1neC53YWxsZXQudjEuY29tbW9uLlF1b3RhQ2F0ZWdvcnkSDAoEaXRlbRgGIAEoCRIOCgZiaXpfbm8YByABKAkSDwoHY2hhdF9pZBgIIAEoCRIcCg9hbGxvd19vdmVyZHJhZnQYCSABKAhIAYgBAUIICgZfc2NhbGVCEgoQX2FsbG93X292ZXJkcmFmdCKFAwoQRGVjcmVhc2VSZXNwb25zZRItCgRjb2RlGAEgASgOMhoubWd4LndhbGxldC52MS5jb21tb24uQ29kZUgAiAEBEhQ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0FDVElPTl9OT1RJRllfT05MWRACMr0DCgxRdW90YVNlcnZpY2UShwEKCERlY3JlYXNlEiYubWd4LndhbGxldC52MS5hY2NvdW50LkRlY3JlYXNlUmVxdWVzdBonLm1neC53YWxsZXQudjEuYWNjb3VudC5EZWNyZWFzZVJlc3BvbnNlIiqC0+STAiQ6ASoiHy9hcGkvdjEvd2FsbGV0L2FjY291bnQvZGVjcmVhc2USiQEKCkdldEJhbGFuY2USKC5tZ3gud2FsbGV0LnYxLmFjY291bnQuR2V0QmFsYW5jZVJlcXVlc3QaKS5tZ3gud2FsbGV0LnYxLmFjY291bnQuR2V0QmFsYW5jZVJlc3BvbnNlIiaC0+STAiASHi9hcGkvdjEvd2FsbGV0L2FjY291bnQvYmFsYW5jZRKWAQoNR2V0VXNhZ2VTdGF0cxIrLm1neC53YWxsZXQudjEuYWNjb3VudC5HZXRVc2FnZVN0YXRzUmVxdWVzdBosLm1neC53YWxsZXQudjEuYWNjb3VudC5HZXRVc2FnZVN0YXRzUmVzcG9uc2UiKoLT5JMCJBIiL2FwaS92MS93YWxsZXQvYWNjb3VudC91c2FnZS9zdGF0c0JAWj5naXRsYWIuZGVlcHdpc2RvbWFpLmNvbS9pZGwvZ29sYW5nL21neC93YWxsZXQvcHJvdG8vdjEvYWNjb3VudGIGcHJvdG8z", [file_google_api_annotations, file_v1_common_code, file_v1_common_enums]);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @generated from message mgx.wallet.v1.account.DecreaseRequest
|
|
22
|
+
*/
|
|
23
|
+
export type DecreaseRequest = Message<"mgx.wallet.v1.account.DecreaseRequest"> & {
|
|
24
|
+
/**
|
|
25
|
+
* User ID
|
|
26
|
+
*
|
|
27
|
+
* @generated from field: int64 user_id = 1;
|
|
28
|
+
*/
|
|
29
|
+
userId: bigint;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Quota to deduct,actual_quota = quota / 10^scale
|
|
33
|
+
*
|
|
34
|
+
* @generated from field: int64 quota = 2;
|
|
35
|
+
*/
|
|
36
|
+
quota: bigint;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The number of decimal places for the quota, actual_quota = quota / 10^scale,scale is in [0 ~ 6]
|
|
40
|
+
*
|
|
41
|
+
* @generated from field: optional int32 scale = 3;
|
|
42
|
+
*/
|
|
43
|
+
scale?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Caller: oneapi / infra
|
|
47
|
+
*
|
|
48
|
+
* @generated from field: string biz_name = 4;
|
|
49
|
+
*/
|
|
50
|
+
bizName: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Quota category (Cloud/AI/General), determines which account to deduct
|
|
54
|
+
*
|
|
55
|
+
* @generated from field: mgx.wallet.v1.common.QuotaCategory category = 5;
|
|
56
|
+
*/
|
|
57
|
+
category: QuotaCategory;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Optional, billing item (defined by caller, e.g., Lambda/gpt-4)
|
|
61
|
+
*
|
|
62
|
+
* @generated from field: string item = 6;
|
|
63
|
+
*/
|
|
64
|
+
item: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Business order number (forms idempotent key with biz_name)
|
|
68
|
+
*
|
|
69
|
+
* @generated from field: string biz_no = 7;
|
|
70
|
+
*/
|
|
71
|
+
bizNo: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Chat ID, used for per-chat usage statistics
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: string chat_id = 8;
|
|
77
|
+
*/
|
|
78
|
+
chatId: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Whether overdraft is allowed
|
|
82
|
+
*
|
|
83
|
+
* @generated from field: optional bool allow_overdraft = 9;
|
|
84
|
+
*/
|
|
85
|
+
allowOverdraft?: boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Describes the message mgx.wallet.v1.account.DecreaseRequest.
|
|
90
|
+
* Use `create(DecreaseRequestSchema)` to create a new message.
|
|
91
|
+
*/
|
|
92
|
+
export const DecreaseRequestSchema: GenMessage<DecreaseRequest> = /*@__PURE__*/
|
|
93
|
+
messageDesc(file_v1_account_quota_service, 0);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @generated from message mgx.wallet.v1.account.DecreaseResponse
|
|
97
|
+
*/
|
|
98
|
+
export type DecreaseResponse = Message<"mgx.wallet.v1.account.DecreaseResponse"> & {
|
|
99
|
+
/**
|
|
100
|
+
* Response code
|
|
101
|
+
*
|
|
102
|
+
* @generated from field: optional mgx.wallet.v1.common.Code code = 1;
|
|
103
|
+
*/
|
|
104
|
+
code?: Code;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Message
|
|
108
|
+
*
|
|
109
|
+
* @generated from field: optional string message = 2;
|
|
110
|
+
*/
|
|
111
|
+
message?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Response data
|
|
115
|
+
*
|
|
116
|
+
* @generated from field: mgx.wallet.v1.account.DecreaseResponse.Data data = 3;
|
|
117
|
+
*/
|
|
118
|
+
data?: DecreaseResponse_Data;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Describes the message mgx.wallet.v1.account.DecreaseResponse.
|
|
123
|
+
* Use `create(DecreaseResponseSchema)` to create a new message.
|
|
124
|
+
*/
|
|
125
|
+
export const DecreaseResponseSchema: GenMessage<DecreaseResponse> = /*@__PURE__*/
|
|
126
|
+
messageDesc(file_v1_account_quota_service, 1);
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @generated from message mgx.wallet.v1.account.DecreaseResponse.Data
|
|
130
|
+
*/
|
|
131
|
+
export type DecreaseResponse_Data = Message<"mgx.wallet.v1.account.DecreaseResponse.Data"> & {
|
|
132
|
+
/**
|
|
133
|
+
* Business order number
|
|
134
|
+
*
|
|
135
|
+
* @generated from field: string biz_no = 1;
|
|
136
|
+
*/
|
|
137
|
+
bizNo: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Ledger details (multiple accounts)
|
|
141
|
+
*
|
|
142
|
+
* @generated from field: repeated mgx.wallet.v1.account.LedgerDetail ledger_details = 2;
|
|
143
|
+
*/
|
|
144
|
+
ledgerDetails: LedgerDetail[];
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Whether monthly limit is reached
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: optional bool monthly_limit_reached = 3;
|
|
150
|
+
*/
|
|
151
|
+
monthlyLimitReached?: boolean;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Monthly limit action: pause / notify_only
|
|
155
|
+
*
|
|
156
|
+
* @generated from field: mgx.wallet.v1.account.MonthlyLimitAction monthly_limit_action = 4;
|
|
157
|
+
*/
|
|
158
|
+
monthlyLimitAction: MonthlyLimitAction;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Describes the message mgx.wallet.v1.account.DecreaseResponse.Data.
|
|
163
|
+
* Use `create(DecreaseResponse_DataSchema)` to create a new message.
|
|
164
|
+
*/
|
|
165
|
+
export const DecreaseResponse_DataSchema: GenMessage<DecreaseResponse_Data> = /*@__PURE__*/
|
|
166
|
+
messageDesc(file_v1_account_quota_service, 1, 0);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @generated from message mgx.wallet.v1.account.LedgerDetail
|
|
170
|
+
*/
|
|
171
|
+
export type LedgerDetail = Message<"mgx.wallet.v1.account.LedgerDetail"> & {
|
|
172
|
+
/**
|
|
173
|
+
* Ledger ID
|
|
174
|
+
*
|
|
175
|
+
* @generated from field: int64 ledger_id = 1;
|
|
176
|
+
*/
|
|
177
|
+
ledgerId: bigint;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Account type
|
|
181
|
+
*
|
|
182
|
+
* @generated from field: mgx.wallet.v1.common.AccountType account_type = 2;
|
|
183
|
+
*/
|
|
184
|
+
accountType: AccountType;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Quota change
|
|
188
|
+
*
|
|
189
|
+
* @generated from field: optional int64 quota = 3;
|
|
190
|
+
*/
|
|
191
|
+
quota?: bigint;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Account balance after operation
|
|
195
|
+
*
|
|
196
|
+
* @generated from field: optional int64 balance_after = 4;
|
|
197
|
+
*/
|
|
198
|
+
balanceAfter?: bigint;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Describes the message mgx.wallet.v1.account.LedgerDetail.
|
|
203
|
+
* Use `create(LedgerDetailSchema)` to create a new message.
|
|
204
|
+
*/
|
|
205
|
+
export const LedgerDetailSchema: GenMessage<LedgerDetail> = /*@__PURE__*/
|
|
206
|
+
messageDesc(file_v1_account_quota_service, 2);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @generated from message mgx.wallet.v1.account.GetBalanceRequest
|
|
210
|
+
*/
|
|
211
|
+
export type GetBalanceRequest = Message<"mgx.wallet.v1.account.GetBalanceRequest"> & {
|
|
212
|
+
/**
|
|
213
|
+
* User ID
|
|
214
|
+
*
|
|
215
|
+
* @generated from field: int64 user_id = 1;
|
|
216
|
+
*/
|
|
217
|
+
userId: bigint;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Optional, empty = return all accounts
|
|
221
|
+
*
|
|
222
|
+
* @generated from field: mgx.wallet.v1.common.AccountType account_type = 2;
|
|
223
|
+
*/
|
|
224
|
+
accountType: AccountType;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Optional, quota category, e.g., Cloud/AI/General
|
|
228
|
+
*
|
|
229
|
+
* @generated from field: mgx.wallet.v1.common.QuotaCategory category = 3;
|
|
230
|
+
*/
|
|
231
|
+
category: QuotaCategory;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Describes the message mgx.wallet.v1.account.GetBalanceRequest.
|
|
236
|
+
* Use `create(GetBalanceRequestSchema)` to create a new message.
|
|
237
|
+
*/
|
|
238
|
+
export const GetBalanceRequestSchema: GenMessage<GetBalanceRequest> = /*@__PURE__*/
|
|
239
|
+
messageDesc(file_v1_account_quota_service, 3);
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @generated from message mgx.wallet.v1.account.GetBalanceResponse
|
|
243
|
+
*/
|
|
244
|
+
export type GetBalanceResponse = Message<"mgx.wallet.v1.account.GetBalanceResponse"> & {
|
|
245
|
+
/**
|
|
246
|
+
* Response code
|
|
247
|
+
*
|
|
248
|
+
* @generated from field: optional mgx.wallet.v1.common.Code code = 1;
|
|
249
|
+
*/
|
|
250
|
+
code?: Code;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Message
|
|
254
|
+
*
|
|
255
|
+
* @generated from field: optional string message = 2;
|
|
256
|
+
*/
|
|
257
|
+
message?: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Response data
|
|
261
|
+
*
|
|
262
|
+
* @generated from field: mgx.wallet.v1.account.GetBalanceResponse.Data data = 3;
|
|
263
|
+
*/
|
|
264
|
+
data?: GetBalanceResponse_Data;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Describes the message mgx.wallet.v1.account.GetBalanceResponse.
|
|
269
|
+
* Use `create(GetBalanceResponseSchema)` to create a new message.
|
|
270
|
+
*/
|
|
271
|
+
export const GetBalanceResponseSchema: GenMessage<GetBalanceResponse> = /*@__PURE__*/
|
|
272
|
+
messageDesc(file_v1_account_quota_service, 4);
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @generated from message mgx.wallet.v1.account.GetBalanceResponse.Data
|
|
276
|
+
*/
|
|
277
|
+
export type GetBalanceResponse_Data = Message<"mgx.wallet.v1.account.GetBalanceResponse.Data"> & {
|
|
278
|
+
/**
|
|
279
|
+
* Account balances (balance, bonus_cloud, bonus_ai)
|
|
280
|
+
*
|
|
281
|
+
* @generated from field: repeated mgx.wallet.v1.account.AccountBalance accounts_balance = 1;
|
|
282
|
+
*/
|
|
283
|
+
accountsBalance: AccountBalance[];
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Available quota per category: bonus_* + max(0, balance)
|
|
287
|
+
*
|
|
288
|
+
* @generated from field: repeated mgx.wallet.v1.account.CategoryAvailableQuota available_by_category = 2;
|
|
289
|
+
*/
|
|
290
|
+
availableByCategory: CategoryAvailableQuota[];
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Whether monthly limit is reached
|
|
294
|
+
*
|
|
295
|
+
* @generated from field: optional bool monthly_limit_reached = 3;
|
|
296
|
+
*/
|
|
297
|
+
monthlyLimitReached?: boolean;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* 1:pause, 2:notify_only
|
|
301
|
+
*
|
|
302
|
+
* @generated from field: mgx.wallet.v1.account.MonthlyLimitAction monthly_limit_action = 4;
|
|
303
|
+
*/
|
|
304
|
+
monthlyLimitAction: MonthlyLimitAction;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Describes the message mgx.wallet.v1.account.GetBalanceResponse.Data.
|
|
309
|
+
* Use `create(GetBalanceResponse_DataSchema)` to create a new message.
|
|
310
|
+
*/
|
|
311
|
+
export const GetBalanceResponse_DataSchema: GenMessage<GetBalanceResponse_Data> = /*@__PURE__*/
|
|
312
|
+
messageDesc(file_v1_account_quota_service, 4, 0);
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* CategoryAvailableQuota available quota per category (not account balance; for GetBalanceResponse.available_by_category)
|
|
316
|
+
*
|
|
317
|
+
* @generated from message mgx.wallet.v1.account.CategoryAvailableQuota
|
|
318
|
+
*/
|
|
319
|
+
export type CategoryAvailableQuota = Message<"mgx.wallet.v1.account.CategoryAvailableQuota"> & {
|
|
320
|
+
/**
|
|
321
|
+
* Category (Cloud/AI/General)
|
|
322
|
+
*
|
|
323
|
+
* @generated from field: mgx.wallet.v1.common.QuotaCategory category = 1;
|
|
324
|
+
*/
|
|
325
|
+
category: QuotaCategory;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Available quota for this category
|
|
329
|
+
*
|
|
330
|
+
* @generated from field: optional int64 quota = 2;
|
|
331
|
+
*/
|
|
332
|
+
quota?: bigint;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Formatted amount, e.g. "20.00"
|
|
336
|
+
*
|
|
337
|
+
* @generated from field: string amount = 3;
|
|
338
|
+
*/
|
|
339
|
+
amount: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Currency, e.g. USD
|
|
343
|
+
*
|
|
344
|
+
* @generated from field: string currency = 4;
|
|
345
|
+
*/
|
|
346
|
+
currency: string;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Describes the message mgx.wallet.v1.account.CategoryAvailableQuota.
|
|
351
|
+
* Use `create(CategoryAvailableQuotaSchema)` to create a new message.
|
|
352
|
+
*/
|
|
353
|
+
export const CategoryAvailableQuotaSchema: GenMessage<CategoryAvailableQuota> = /*@__PURE__*/
|
|
354
|
+
messageDesc(file_v1_account_quota_service, 5);
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* @generated from message mgx.wallet.v1.account.AccountBalance
|
|
358
|
+
*/
|
|
359
|
+
export type AccountBalance = Message<"mgx.wallet.v1.account.AccountBalance"> & {
|
|
360
|
+
/**
|
|
361
|
+
* Account type
|
|
362
|
+
*
|
|
363
|
+
* @generated from field: mgx.wallet.v1.common.AccountType account_type = 1;
|
|
364
|
+
*/
|
|
365
|
+
accountType: AccountType;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Quota
|
|
369
|
+
*
|
|
370
|
+
* @generated from field: optional int64 quota = 2;
|
|
371
|
+
*/
|
|
372
|
+
quota?: bigint;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Amount corresponding to quota
|
|
376
|
+
*
|
|
377
|
+
* @generated from field: string amount = 3;
|
|
378
|
+
*/
|
|
379
|
+
amount: string;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Currency, e.g. USD
|
|
383
|
+
*
|
|
384
|
+
* @generated from field: string currency = 4;
|
|
385
|
+
*/
|
|
386
|
+
currency: string;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Describes the message mgx.wallet.v1.account.AccountBalance.
|
|
391
|
+
* Use `create(AccountBalanceSchema)` to create a new message.
|
|
392
|
+
*/
|
|
393
|
+
export const AccountBalanceSchema: GenMessage<AccountBalance> = /*@__PURE__*/
|
|
394
|
+
messageDesc(file_v1_account_quota_service, 6);
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @generated from message mgx.wallet.v1.account.GetUsageStatsRequest
|
|
398
|
+
*/
|
|
399
|
+
export type GetUsageStatsRequest = Message<"mgx.wallet.v1.account.GetUsageStatsRequest"> & {
|
|
400
|
+
/**
|
|
401
|
+
* User ID
|
|
402
|
+
*
|
|
403
|
+
* @generated from field: int64 user_id = 1;
|
|
404
|
+
*/
|
|
405
|
+
userId: bigint;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Optional, chat ID filter
|
|
409
|
+
*
|
|
410
|
+
* @generated from field: string chat_id = 2;
|
|
411
|
+
*/
|
|
412
|
+
chatId: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Optional, quota category filter (Cloud/AI/General)
|
|
416
|
+
*
|
|
417
|
+
* @generated from field: mgx.wallet.v1.common.QuotaCategory category = 3;
|
|
418
|
+
*/
|
|
419
|
+
category: QuotaCategory;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Optional, statistics date (YYYY-MM-DD), empty = total, specified = daily
|
|
423
|
+
*
|
|
424
|
+
* @generated from field: string stat_date = 4;
|
|
425
|
+
*/
|
|
426
|
+
statDate: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Optional, page number, default 1
|
|
430
|
+
*
|
|
431
|
+
* @generated from field: int32 page = 5;
|
|
432
|
+
*/
|
|
433
|
+
page: number;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Optional, page size, default 20
|
|
437
|
+
*
|
|
438
|
+
* @generated from field: int32 page_size = 6;
|
|
439
|
+
*/
|
|
440
|
+
pageSize: number;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Describes the message mgx.wallet.v1.account.GetUsageStatsRequest.
|
|
445
|
+
* Use `create(GetUsageStatsRequestSchema)` to create a new message.
|
|
446
|
+
*/
|
|
447
|
+
export const GetUsageStatsRequestSchema: GenMessage<GetUsageStatsRequest> = /*@__PURE__*/
|
|
448
|
+
messageDesc(file_v1_account_quota_service, 7);
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @generated from message mgx.wallet.v1.account.GetUsageStatsResponse
|
|
452
|
+
*/
|
|
453
|
+
export type GetUsageStatsResponse = Message<"mgx.wallet.v1.account.GetUsageStatsResponse"> & {
|
|
454
|
+
/**
|
|
455
|
+
* Response code
|
|
456
|
+
*
|
|
457
|
+
* @generated from field: optional mgx.wallet.v1.common.Code code = 1;
|
|
458
|
+
*/
|
|
459
|
+
code?: Code;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Message
|
|
463
|
+
*
|
|
464
|
+
* @generated from field: optional string message = 2;
|
|
465
|
+
*/
|
|
466
|
+
message?: string;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Response data
|
|
470
|
+
*
|
|
471
|
+
* @generated from field: mgx.wallet.v1.account.GetUsageStatsResponse.Data data = 3;
|
|
472
|
+
*/
|
|
473
|
+
data?: GetUsageStatsResponse_Data;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Describes the message mgx.wallet.v1.account.GetUsageStatsResponse.
|
|
478
|
+
* Use `create(GetUsageStatsResponseSchema)` to create a new message.
|
|
479
|
+
*/
|
|
480
|
+
export const GetUsageStatsResponseSchema: GenMessage<GetUsageStatsResponse> = /*@__PURE__*/
|
|
481
|
+
messageDesc(file_v1_account_quota_service, 8);
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* @generated from message mgx.wallet.v1.account.GetUsageStatsResponse.Data
|
|
485
|
+
*/
|
|
486
|
+
export type GetUsageStatsResponse_Data = Message<"mgx.wallet.v1.account.GetUsageStatsResponse.Data"> & {
|
|
487
|
+
/**
|
|
488
|
+
* Total quota (sum of all items)
|
|
489
|
+
*
|
|
490
|
+
* @generated from field: optional int64 total_quota = 1;
|
|
491
|
+
*/
|
|
492
|
+
totalQuota?: bigint;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Total amount (USD), converted by backend: quota / 500000
|
|
496
|
+
*
|
|
497
|
+
* @generated from field: string total_amount = 2;
|
|
498
|
+
*/
|
|
499
|
+
totalAmount: string;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Currency, e.g. USD
|
|
503
|
+
*
|
|
504
|
+
* @generated from field: string currency = 3;
|
|
505
|
+
*/
|
|
506
|
+
currency: string;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Usage summary by category
|
|
510
|
+
*
|
|
511
|
+
* @generated from field: repeated mgx.wallet.v1.account.CategoryUsage summary_by_category = 4;
|
|
512
|
+
*/
|
|
513
|
+
summaryByCategory: CategoryUsage[];
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Details by chat_id (each item includes usage for all categories)
|
|
517
|
+
*
|
|
518
|
+
* @generated from field: repeated mgx.wallet.v1.account.UsageItem items = 5;
|
|
519
|
+
*/
|
|
520
|
+
items: UsageItem[];
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Total count of items
|
|
524
|
+
*
|
|
525
|
+
* @generated from field: optional int64 total = 6;
|
|
526
|
+
*/
|
|
527
|
+
total?: bigint;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Current page number of items
|
|
531
|
+
*
|
|
532
|
+
* @generated from field: int32 page = 7;
|
|
533
|
+
*/
|
|
534
|
+
page: number;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Page size of items
|
|
538
|
+
*
|
|
539
|
+
* @generated from field: int32 page_size = 8;
|
|
540
|
+
*/
|
|
541
|
+
pageSize: number;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Describes the message mgx.wallet.v1.account.GetUsageStatsResponse.Data.
|
|
546
|
+
* Use `create(GetUsageStatsResponse_DataSchema)` to create a new message.
|
|
547
|
+
*/
|
|
548
|
+
export const GetUsageStatsResponse_DataSchema: GenMessage<GetUsageStatsResponse_Data> = /*@__PURE__*/
|
|
549
|
+
messageDesc(file_v1_account_quota_service, 8, 0);
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* @generated from message mgx.wallet.v1.account.CategoryUsage
|
|
553
|
+
*/
|
|
554
|
+
export type CategoryUsage = Message<"mgx.wallet.v1.account.CategoryUsage"> & {
|
|
555
|
+
/**
|
|
556
|
+
* Quota category (Cloud/AI/General)
|
|
557
|
+
*
|
|
558
|
+
* @generated from field: mgx.wallet.v1.common.QuotaCategory category = 1;
|
|
559
|
+
*/
|
|
560
|
+
category: QuotaCategory;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Quota consumed in this category
|
|
564
|
+
*
|
|
565
|
+
* @generated from field: optional int64 quota = 2;
|
|
566
|
+
*/
|
|
567
|
+
quota?: bigint;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Amount in this category
|
|
571
|
+
*
|
|
572
|
+
* @generated from field: string amount = 3;
|
|
573
|
+
*/
|
|
574
|
+
amount: string;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Currency, e.g. USD
|
|
578
|
+
*
|
|
579
|
+
* @generated from field: string currency = 4;
|
|
580
|
+
*/
|
|
581
|
+
currency: string;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Describes the message mgx.wallet.v1.account.CategoryUsage.
|
|
586
|
+
* Use `create(CategoryUsageSchema)` to create a new message.
|
|
587
|
+
*/
|
|
588
|
+
export const CategoryUsageSchema: GenMessage<CategoryUsage> = /*@__PURE__*/
|
|
589
|
+
messageDesc(file_v1_account_quota_service, 9);
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* UsageItem: one per chat_id, with usage for all categories (Cloud/AI/General) in that chat.
|
|
593
|
+
*
|
|
594
|
+
* @generated from message mgx.wallet.v1.account.UsageItem
|
|
595
|
+
*/
|
|
596
|
+
export type UsageItem = Message<"mgx.wallet.v1.account.UsageItem"> & {
|
|
597
|
+
/**
|
|
598
|
+
* Chat ID
|
|
599
|
+
*
|
|
600
|
+
* @generated from field: string chat_id = 1;
|
|
601
|
+
*/
|
|
602
|
+
chatId: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Chat name, only used for display
|
|
606
|
+
*
|
|
607
|
+
* @generated from field: optional string chat_name = 2;
|
|
608
|
+
*/
|
|
609
|
+
chatName?: string;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Total quota consumed in this chat (sum of all categories)
|
|
613
|
+
*
|
|
614
|
+
* @generated from field: optional int64 quota = 3;
|
|
615
|
+
*/
|
|
616
|
+
quota?: bigint;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Total amount in this chat
|
|
620
|
+
*
|
|
621
|
+
* @generated from field: string amount = 4;
|
|
622
|
+
*/
|
|
623
|
+
amount: string;
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Currency, e.g. USD
|
|
627
|
+
*
|
|
628
|
+
* @generated from field: string currency = 5;
|
|
629
|
+
*/
|
|
630
|
+
currency: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Usage per category (Cloud/AI/General) for this chat
|
|
634
|
+
*
|
|
635
|
+
* @generated from field: repeated mgx.wallet.v1.account.CategoryUsage usage_by_category = 6;
|
|
636
|
+
*/
|
|
637
|
+
usageByCategory: CategoryUsage[];
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Describes the message mgx.wallet.v1.account.UsageItem.
|
|
642
|
+
* Use `create(UsageItemSchema)` to create a new message.
|
|
643
|
+
*/
|
|
644
|
+
export const UsageItemSchema: GenMessage<UsageItem> = /*@__PURE__*/
|
|
645
|
+
messageDesc(file_v1_account_quota_service, 10);
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Monthly limit action enumeration
|
|
649
|
+
*
|
|
650
|
+
* @generated from enum mgx.wallet.v1.account.MonthlyLimitAction
|
|
651
|
+
*/
|
|
652
|
+
export enum MonthlyLimitAction {
|
|
653
|
+
/**
|
|
654
|
+
* Default value, unspecified
|
|
655
|
+
*
|
|
656
|
+
* @generated from enum value: MONTHLY_LIMIT_ACTION_UNSPECIFIED = 0;
|
|
657
|
+
*/
|
|
658
|
+
UNSPECIFIED = 0,
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Pause usage
|
|
662
|
+
*
|
|
663
|
+
* @generated from enum value: MONTHLY_LIMIT_ACTION_PAUSE = 1;
|
|
664
|
+
*/
|
|
665
|
+
PAUSE = 1,
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Notify only
|
|
669
|
+
*
|
|
670
|
+
* @generated from enum value: MONTHLY_LIMIT_ACTION_NOTIFY_ONLY = 2;
|
|
671
|
+
*/
|
|
672
|
+
NOTIFY_ONLY = 2,
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Describes the enum mgx.wallet.v1.account.MonthlyLimitAction.
|
|
677
|
+
*/
|
|
678
|
+
export const MonthlyLimitActionSchema: GenEnum<MonthlyLimitAction> = /*@__PURE__*/
|
|
679
|
+
enumDesc(file_v1_account_quota_service, 0);
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Core service definition
|
|
683
|
+
*
|
|
684
|
+
* @generated from service mgx.wallet.v1.account.QuotaService
|
|
685
|
+
*/
|
|
686
|
+
export const QuotaService: GenService<{
|
|
687
|
+
/**
|
|
688
|
+
* @generated from rpc mgx.wallet.v1.account.QuotaService.Decrease
|
|
689
|
+
*/
|
|
690
|
+
decrease: {
|
|
691
|
+
methodKind: "unary";
|
|
692
|
+
input: typeof DecreaseRequestSchema;
|
|
693
|
+
output: typeof DecreaseResponseSchema;
|
|
694
|
+
},
|
|
695
|
+
/**
|
|
696
|
+
* @generated from rpc mgx.wallet.v1.account.QuotaService.GetBalance
|
|
697
|
+
*/
|
|
698
|
+
getBalance: {
|
|
699
|
+
methodKind: "unary";
|
|
700
|
+
input: typeof GetBalanceRequestSchema;
|
|
701
|
+
output: typeof GetBalanceResponseSchema;
|
|
702
|
+
},
|
|
703
|
+
/**
|
|
704
|
+
* @generated from rpc mgx.wallet.v1.account.QuotaService.GetUsageStats
|
|
705
|
+
*/
|
|
706
|
+
getUsageStats: {
|
|
707
|
+
methodKind: "unary";
|
|
708
|
+
input: typeof GetUsageStatsRequestSchema;
|
|
709
|
+
output: typeof GetUsageStatsResponseSchema;
|
|
710
|
+
},
|
|
711
|
+
}> = /*@__PURE__*/
|
|
712
|
+
serviceDesc(file_v1_account_quota_service, 0);
|
|
713
|
+
|