@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.
Files changed (38) hide show
  1. package/README.md +74 -0
  2. package/dist/google/api/annotations_pb.d.ts +14 -0
  3. package/dist/google/api/annotations_pb.d.ts.map +1 -0
  4. package/dist/google/api/annotations_pb.js +26 -0
  5. package/dist/google/api/http_pb.d.ts +441 -0
  6. package/dist/google/api/http_pb.d.ts.map +1 -0
  7. package/dist/google/api/http_pb.js +33 -0
  8. package/dist/index.d.ts +9 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +14 -0
  11. package/dist/v1/account/quota_service_pb.d.ts +603 -0
  12. package/dist/v1/account/quota_service_pb.d.ts.map +1 -0
  13. package/dist/v1/account/quota_service_pb.js +117 -0
  14. package/dist/v1/common/base_pb.d.ts +38 -0
  15. package/dist/v1/common/base_pb.d.ts.map +1 -0
  16. package/dist/v1/common/base_pb.js +14 -0
  17. package/dist/v1/common/code_pb.d.ts +69 -0
  18. package/dist/v1/common/code_pb.d.ts.map +1 -0
  19. package/dist/v1/common/code_pb.js +72 -0
  20. package/dist/v1/common/enums_pb.d.ts +76 -0
  21. package/dist/v1/common/enums_pb.d.ts.map +1 -0
  22. package/dist/v1/common/enums_pb.js +80 -0
  23. package/dist/v1/server_pb.d.ts +67 -0
  24. package/dist/v1/server_pb.d.ts.map +1 -0
  25. package/dist/v1/server_pb.js +41 -0
  26. package/dist/v1/topup/order_service_pb.d.ts +585 -0
  27. package/dist/v1/topup/order_service_pb.d.ts.map +1 -0
  28. package/dist/v1/topup/order_service_pb.js +171 -0
  29. package/package.json +42 -0
  30. package/src/google/api/annotations_pb.ts +39 -0
  31. package/src/google/api/http_pb.ts +474 -0
  32. package/src/index.ts +21 -0
  33. package/src/v1/account/quota_service_pb.ts +713 -0
  34. package/src/v1/common/base_pb.ts +51 -0
  35. package/src/v1/common/code_pb.ts +89 -0
  36. package/src/v1/common/enums_pb.ts +95 -0
  37. package/src/v1/server_pb.ts +87 -0
  38. package/src/v1/topup/order_service_pb.ts +695 -0
@@ -0,0 +1,695 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file v1/topup/order_service.proto (package mgx.wallet.v1.topup, 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 { Timestamp } from "@bufbuild/protobuf/wkt";
9
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
10
+ import type { Code } from "../common/code_pb";
11
+ import { file_v1_common_code } from "../common/code_pb";
12
+ import type { AccountType } from "../common/enums_pb";
13
+ import { file_v1_common_enums } from "../common/enums_pb";
14
+ import type { Message } from "@bufbuild/protobuf";
15
+
16
+ /**
17
+ * Describes the file v1/topup/order_service.proto.
18
+ */
19
+ export const file_v1_topup_order_service: GenFile = /*@__PURE__*/
20
+ fileDesc("Chx2MS90b3B1cC9vcmRlcl9zZXJ2aWNlLnByb3RvEhNtZ3gud2FsbGV0LnYxLnRvcHVwIr0BChFMaXN0T3JkZXJzUmVxdWVzdBIPCgd1c2VyX2lkGAEgASgDEiwKBHR5cGUYAiABKA4yHi5tZ3gud2FsbGV0LnYxLnRvcHVwLk9yZGVyVHlwZRIwCgZzdGF0dXMYAyABKA4yIC5tZ3gud2FsbGV0LnYxLnRvcHVwLk9yZGVyU3RhdHVzEhYKDmluY2x1ZGVfZmllbGRzGAQgASgJEgwKBHBhZ2UYBSABKAUSEQoJcGFnZV9zaXplGAYgASgFIqICChJMaXN0T3JkZXJzUmVzcG9uc2USLQoEY29kZRgBIAEoDjIaLm1neC53YWxsZXQudjEuY29tbW9uLkNvZGVIAIgBARIUCgdtZXNzYWdlGAIgASgJSAGIAQESOgoEZGF0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b3B1cGIGcHJvdG8z", [file_google_api_annotations, file_google_protobuf_timestamp, file_v1_common_code, file_v1_common_enums]);
21
+
22
+ /**
23
+ * @generated from message mgx.wallet.v1.topup.ListOrdersRequest
24
+ */
25
+ export type ListOrdersRequest = Message<"mgx.wallet.v1.topup.ListOrdersRequest"> & {
26
+ /**
27
+ * User ID (platform common user_id)
28
+ *
29
+ * @generated from field: int64 user_id = 1;
30
+ */
31
+ userId: bigint;
32
+
33
+ /**
34
+ * Optional, order type filter, 0 = all
35
+ *
36
+ * @generated from field: mgx.wallet.v1.topup.OrderType type = 2;
37
+ */
38
+ type: OrderType;
39
+
40
+ /**
41
+ * Optional, order status filter, 0 = all
42
+ *
43
+ * @generated from field: mgx.wallet.v1.topup.OrderStatus status = 3;
44
+ */
45
+ status: OrderStatus;
46
+
47
+ /**
48
+ * Optional, comma-separated fields to include in response, e.g. "order_id,amount,status", empty = all fields
49
+ *
50
+ * @generated from field: string include_fields = 4;
51
+ */
52
+ includeFields: string;
53
+
54
+ /**
55
+ * Optional, page number, default 1
56
+ *
57
+ * @generated from field: int32 page = 5;
58
+ */
59
+ page: number;
60
+
61
+ /**
62
+ * Optional, page size, default 20
63
+ *
64
+ * @generated from field: int32 page_size = 6;
65
+ */
66
+ pageSize: number;
67
+ };
68
+
69
+ /**
70
+ * Describes the message mgx.wallet.v1.topup.ListOrdersRequest.
71
+ * Use `create(ListOrdersRequestSchema)` to create a new message.
72
+ */
73
+ export const ListOrdersRequestSchema: GenMessage<ListOrdersRequest> = /*@__PURE__*/
74
+ messageDesc(file_v1_topup_order_service, 0);
75
+
76
+ /**
77
+ * @generated from message mgx.wallet.v1.topup.ListOrdersResponse
78
+ */
79
+ export type ListOrdersResponse = Message<"mgx.wallet.v1.topup.ListOrdersResponse"> & {
80
+ /**
81
+ * Response code
82
+ *
83
+ * @generated from field: optional mgx.wallet.v1.common.Code code = 1;
84
+ */
85
+ code?: Code;
86
+
87
+ /**
88
+ * Message
89
+ *
90
+ * @generated from field: optional string message = 2;
91
+ */
92
+ message?: string;
93
+
94
+ /**
95
+ * Response data
96
+ *
97
+ * @generated from field: mgx.wallet.v1.topup.ListOrdersResponse.Data data = 3;
98
+ */
99
+ data?: ListOrdersResponse_Data;
100
+ };
101
+
102
+ /**
103
+ * Describes the message mgx.wallet.v1.topup.ListOrdersResponse.
104
+ * Use `create(ListOrdersResponseSchema)` to create a new message.
105
+ */
106
+ export const ListOrdersResponseSchema: GenMessage<ListOrdersResponse> = /*@__PURE__*/
107
+ messageDesc(file_v1_topup_order_service, 1);
108
+
109
+ /**
110
+ * @generated from message mgx.wallet.v1.topup.ListOrdersResponse.Data
111
+ */
112
+ export type ListOrdersResponse_Data = Message<"mgx.wallet.v1.topup.ListOrdersResponse.Data"> & {
113
+ /**
114
+ * Order list
115
+ *
116
+ * @generated from field: repeated mgx.wallet.v1.topup.OrderDetail items = 1;
117
+ */
118
+ items: OrderDetail[];
119
+
120
+ /**
121
+ * Total count
122
+ *
123
+ * @generated from field: optional int64 total = 2;
124
+ */
125
+ total?: bigint;
126
+
127
+ /**
128
+ * Current page number
129
+ *
130
+ * @generated from field: int32 page = 3;
131
+ */
132
+ page: number;
133
+
134
+ /**
135
+ * Page size
136
+ *
137
+ * @generated from field: int32 page_size = 4;
138
+ */
139
+ pageSize: number;
140
+ };
141
+
142
+ /**
143
+ * Describes the message mgx.wallet.v1.topup.ListOrdersResponse.Data.
144
+ * Use `create(ListOrdersResponse_DataSchema)` to create a new message.
145
+ */
146
+ export const ListOrdersResponse_DataSchema: GenMessage<ListOrdersResponse_Data> = /*@__PURE__*/
147
+ messageDesc(file_v1_topup_order_service, 1, 0);
148
+
149
+ /**
150
+ * @generated from message mgx.wallet.v1.topup.OrderDetail
151
+ */
152
+ export type OrderDetail = Message<"mgx.wallet.v1.topup.OrderDetail"> & {
153
+ /**
154
+ * Order ID
155
+ *
156
+ * @generated from field: string order_id = 1;
157
+ */
158
+ orderId: string;
159
+
160
+ /**
161
+ * User ID
162
+ *
163
+ * @generated from field: int64 user_id = 2;
164
+ */
165
+ userId: bigint;
166
+
167
+ /**
168
+ * Caller, e.g. web_client
169
+ *
170
+ * @generated from field: string biz_name = 3;
171
+ */
172
+ bizName: string;
173
+
174
+ /**
175
+ * Business order number (idempotent key)
176
+ *
177
+ * @generated from field: string biz_no = 4;
178
+ */
179
+ bizNo: string;
180
+
181
+ /**
182
+ * Order type: manual_topup / auto_topup / platform_grant
183
+ *
184
+ * @generated from field: mgx.wallet.v1.topup.OrderType type = 5;
185
+ */
186
+ type: OrderType;
187
+
188
+ /**
189
+ * Amount
190
+ *
191
+ * @generated from field: string amount = 6;
192
+ */
193
+ amount: string;
194
+
195
+ /**
196
+ * Currency, e.g. USD
197
+ *
198
+ * @generated from field: string currency = 7;
199
+ */
200
+ currency: string;
201
+
202
+ /**
203
+ * Quota (amount × 500000)
204
+ *
205
+ * @generated from field: optional int64 quota = 8;
206
+ */
207
+ quota?: bigint;
208
+
209
+ /**
210
+ * Order status
211
+ *
212
+ * @generated from field: mgx.wallet.v1.topup.OrderStatus status = 9;
213
+ */
214
+ status: OrderStatus;
215
+
216
+ /**
217
+ * Top-up related fields (empty for platform_grant)
218
+ *
219
+ * Payment method info (for user top-up)
220
+ *
221
+ * @generated from field: mgx.wallet.v1.topup.PaymentMethodInfo payment_method_info = 10;
222
+ */
223
+ paymentMethodInfo?: PaymentMethodInfo;
224
+
225
+ /**
226
+ * Transaction-module associated transaction ID (for user top-up)
227
+ *
228
+ * @generated from field: string external_trans_id = 11;
229
+ */
230
+ externalTransId: string;
231
+
232
+ /**
233
+ * Grant related fields (empty for user top-up)
234
+ *
235
+ * Account type
236
+ *
237
+ * @generated from field: mgx.wallet.v1.common.AccountType account_type = 12;
238
+ */
239
+ accountType: AccountType;
240
+
241
+ /**
242
+ * Grant type (for grant): init_bonus / promotion / compensation
243
+ *
244
+ * @generated from field: mgx.wallet.v1.topup.GrantType grant_type = 13;
245
+ */
246
+ grantType: GrantType;
247
+
248
+ /**
249
+ * Grant reason (for grant)
250
+ *
251
+ * @generated from field: string grant_reason = 14;
252
+ */
253
+ grantReason: string;
254
+
255
+ /**
256
+ * Operator (for grant, admin)
257
+ *
258
+ * @generated from field: string operator = 15;
259
+ */
260
+ operator: string;
261
+
262
+ /**
263
+ * Common fields
264
+ *
265
+ * Failure reason
266
+ *
267
+ * @generated from field: string failure_reason = 16;
268
+ */
269
+ failureReason: string;
270
+
271
+ /**
272
+ * Whether balance has been increased
273
+ *
274
+ * @generated from field: optional bool balance_increased = 17;
275
+ */
276
+ balanceIncreased?: boolean;
277
+
278
+ /**
279
+ * Creation time
280
+ *
281
+ * @generated from field: google.protobuf.Timestamp created_at = 18;
282
+ */
283
+ createdAt?: Timestamp;
284
+ };
285
+
286
+ /**
287
+ * Describes the message mgx.wallet.v1.topup.OrderDetail.
288
+ * Use `create(OrderDetailSchema)` to create a new message.
289
+ */
290
+ export const OrderDetailSchema: GenMessage<OrderDetail> = /*@__PURE__*/
291
+ messageDesc(file_v1_topup_order_service, 2);
292
+
293
+ /**
294
+ * @generated from message mgx.wallet.v1.topup.PaymentMethodInfo
295
+ */
296
+ export type PaymentMethodInfo = Message<"mgx.wallet.v1.topup.PaymentMethodInfo"> & {
297
+ /**
298
+ * Payment method ID, e.g. pm_xxx (not returned in query responses)
299
+ *
300
+ * @generated from field: string payment_method_id = 1;
301
+ */
302
+ paymentMethodId: string;
303
+
304
+ /**
305
+ * Payment method type, e.g. card, alipay, amazon_pay
306
+ *
307
+ * @generated from field: string type = 2;
308
+ */
309
+ type: string;
310
+
311
+ /**
312
+ * Last 4 digits of card number or e-wallet account
313
+ *
314
+ * @generated from field: string last4 = 3;
315
+ */
316
+ last4: string;
317
+
318
+ /**
319
+ * Brand, e.g. visa / mastercard / amex
320
+ *
321
+ * @generated from field: string card_brand = 4;
322
+ */
323
+ cardBrand: string;
324
+
325
+ /**
326
+ * First 6 digits of card number, can be empty
327
+ *
328
+ * @generated from field: string card_bin = 5;
329
+ */
330
+ cardBin: string;
331
+
332
+ /**
333
+ * Wallet type, e.g. apple_pay / google_pay / link
334
+ *
335
+ * @generated from field: string wallet_type = 6;
336
+ */
337
+ walletType: string;
338
+ };
339
+
340
+ /**
341
+ * Describes the message mgx.wallet.v1.topup.PaymentMethodInfo.
342
+ * Use `create(PaymentMethodInfoSchema)` to create a new message.
343
+ */
344
+ export const PaymentMethodInfoSchema: GenMessage<PaymentMethodInfo> = /*@__PURE__*/
345
+ messageDesc(file_v1_topup_order_service, 3);
346
+
347
+ /**
348
+ * @generated from message mgx.wallet.v1.topup.PaymentResultData
349
+ */
350
+ export type PaymentResultData = Message<"mgx.wallet.v1.topup.PaymentResultData"> & {
351
+ /**
352
+ * Required. User ID to credit; used when no pre-created order
353
+ *
354
+ * @generated from field: int64 user_id = 1;
355
+ */
356
+ userId: bigint;
357
+
358
+ /**
359
+ * Payment scene; wallet only processes when scene == "wallet_manual_topup"
360
+ *
361
+ * @generated from field: string scene = 2;
362
+ */
363
+ scene: string;
364
+
365
+ /**
366
+ * Business name, e.g. wallet
367
+ *
368
+ * @generated from field: string biz_name = 3;
369
+ */
370
+ bizName: string;
371
+
372
+ /**
373
+ * Optional. Business order ID (may be empty in new flow; wallet generates from event_id)
374
+ *
375
+ * @generated from field: string biz_order_id = 4;
376
+ */
377
+ bizOrderId: string;
378
+
379
+ /**
380
+ * Payment/transaction order ID (idempotency and reconciliation)
381
+ *
382
+ * @generated from field: string order_id = 5;
383
+ */
384
+ orderId: string;
385
+
386
+ /**
387
+ * Payment result status: success / failed; other values ignored
388
+ *
389
+ * @generated from field: string status = 6;
390
+ */
391
+ status: string;
392
+
393
+ /**
394
+ * Stripe PaymentIntent ID
395
+ *
396
+ * @generated from field: string payment_intent_id = 7;
397
+ */
398
+ paymentIntentId: string;
399
+
400
+ /**
401
+ * Payment method info
402
+ *
403
+ * @generated from field: mgx.wallet.v1.topup.PaymentMethodInfo payment_method_info = 8;
404
+ */
405
+ paymentMethodInfo?: PaymentMethodInfo;
406
+
407
+ /**
408
+ * Payment amount (minor unit), e.g. 100 for $1.00
409
+ *
410
+ * @generated from field: optional int64 amount = 9;
411
+ */
412
+ amount?: bigint;
413
+
414
+ /**
415
+ * Currency, e.g. USD
416
+ *
417
+ * @generated from field: string currency = 10;
418
+ */
419
+ currency: string;
420
+
421
+ /**
422
+ * Failure error code (only for failed)
423
+ *
424
+ * @generated from field: string failure_code = 11;
425
+ */
426
+ failureCode: string;
427
+
428
+ /**
429
+ * Failure reason (only for failed)
430
+ *
431
+ * @generated from field: string failure_message = 12;
432
+ */
433
+ failureMessage: string;
434
+
435
+ /**
436
+ * Payment time (only for success), format: ISO 8601 (2026-01-22T10:00:00Z)
437
+ *
438
+ * @generated from field: string paid_at = 13;
439
+ */
440
+ paidAt: string;
441
+ };
442
+
443
+ /**
444
+ * Describes the message mgx.wallet.v1.topup.PaymentResultData.
445
+ * Use `create(PaymentResultDataSchema)` to create a new message.
446
+ */
447
+ export const PaymentResultDataSchema: GenMessage<PaymentResultData> = /*@__PURE__*/
448
+ messageDesc(file_v1_topup_order_service, 4);
449
+
450
+ /**
451
+ * Top-up payment event notification request (payment module → wallet)
452
+ *
453
+ * @generated from message mgx.wallet.v1.topup.NotifyTopupPaymentEventRequest
454
+ */
455
+ export type NotifyTopupPaymentEventRequest = Message<"mgx.wallet.v1.topup.NotifyTopupPaymentEventRequest"> & {
456
+ /**
457
+ * Event unique ID (idempotency)
458
+ *
459
+ * @generated from field: string event_id = 1;
460
+ */
461
+ eventId: string;
462
+
463
+ /**
464
+ * Event type: payment.success / payment.failed
465
+ *
466
+ * @generated from field: string event_type = 2;
467
+ */
468
+ eventType: string;
469
+
470
+ /**
471
+ * Event occurrence time, ISO 8601
472
+ *
473
+ * @generated from field: string event_time = 3;
474
+ */
475
+ eventTime: string;
476
+
477
+ /**
478
+ * Payment result data
479
+ *
480
+ * @generated from field: mgx.wallet.v1.topup.PaymentResultData data = 4;
481
+ */
482
+ data?: PaymentResultData;
483
+
484
+ /**
485
+ * Signature (optional, for verification)
486
+ *
487
+ * @generated from field: string signature = 5;
488
+ */
489
+ signature: string;
490
+ };
491
+
492
+ /**
493
+ * Describes the message mgx.wallet.v1.topup.NotifyTopupPaymentEventRequest.
494
+ * Use `create(NotifyTopupPaymentEventRequestSchema)` to create a new message.
495
+ */
496
+ export const NotifyTopupPaymentEventRequestSchema: GenMessage<NotifyTopupPaymentEventRequest> = /*@__PURE__*/
497
+ messageDesc(file_v1_topup_order_service, 5);
498
+
499
+ /**
500
+ * @generated from message mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse
501
+ */
502
+ export type NotifyTopupPaymentEventResponse = Message<"mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse"> & {
503
+ /**
504
+ * Response code
505
+ *
506
+ * @generated from field: optional mgx.wallet.v1.common.Code code = 1;
507
+ */
508
+ code?: Code;
509
+
510
+ /**
511
+ * Message
512
+ *
513
+ * @generated from field: optional string message = 2;
514
+ */
515
+ message?: string;
516
+
517
+ /**
518
+ * Response data
519
+ *
520
+ * @generated from field: mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse.Data data = 3;
521
+ */
522
+ data?: NotifyTopupPaymentEventResponse_Data;
523
+ };
524
+
525
+ /**
526
+ * Describes the message mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse.
527
+ * Use `create(NotifyTopupPaymentEventResponseSchema)` to create a new message.
528
+ */
529
+ export const NotifyTopupPaymentEventResponseSchema: GenMessage<NotifyTopupPaymentEventResponse> = /*@__PURE__*/
530
+ messageDesc(file_v1_topup_order_service, 6);
531
+
532
+ /**
533
+ * @generated from message mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse.Data
534
+ */
535
+ export type NotifyTopupPaymentEventResponse_Data = Message<"mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse.Data"> & {
536
+ };
537
+
538
+ /**
539
+ * Describes the message mgx.wallet.v1.topup.NotifyTopupPaymentEventResponse.Data.
540
+ * Use `create(NotifyTopupPaymentEventResponse_DataSchema)` to create a new message.
541
+ */
542
+ export const NotifyTopupPaymentEventResponse_DataSchema: GenMessage<NotifyTopupPaymentEventResponse_Data> = /*@__PURE__*/
543
+ messageDesc(file_v1_topup_order_service, 6, 0);
544
+
545
+ /**
546
+ * Order type enumeration
547
+ *
548
+ * @generated from enum mgx.wallet.v1.topup.OrderType
549
+ */
550
+ export enum OrderType {
551
+ /**
552
+ * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0;
553
+ */
554
+ UNSPECIFIED = 0,
555
+
556
+ /**
557
+ * Manual top-up
558
+ *
559
+ * @generated from enum value: ORDER_TYPE_MANUAL_TOPUP = 1;
560
+ */
561
+ MANUAL_TOPUP = 1,
562
+
563
+ /**
564
+ * Auto top-up
565
+ *
566
+ * @generated from enum value: ORDER_TYPE_AUTO_TOPUP = 2;
567
+ */
568
+ AUTO_TOPUP = 2,
569
+
570
+ /**
571
+ * Platform grant
572
+ *
573
+ * @generated from enum value: ORDER_TYPE_PLATFORM_GRANT = 3;
574
+ */
575
+ PLATFORM_GRANT = 3,
576
+ }
577
+
578
+ /**
579
+ * Describes the enum mgx.wallet.v1.topup.OrderType.
580
+ */
581
+ export const OrderTypeSchema: GenEnum<OrderType> = /*@__PURE__*/
582
+ enumDesc(file_v1_topup_order_service, 0);
583
+
584
+ /**
585
+ * Grant type enumeration
586
+ *
587
+ * @generated from enum mgx.wallet.v1.topup.GrantType
588
+ */
589
+ export enum GrantType {
590
+ /**
591
+ * @generated from enum value: GRANT_TYPE_UNSPECIFIED = 0;
592
+ */
593
+ UNSPECIFIED = 0,
594
+
595
+ /**
596
+ * Initial bonus
597
+ *
598
+ * @generated from enum value: GRANT_TYPE_INIT_BONUS = 1;
599
+ */
600
+ INIT_BONUS = 1,
601
+
602
+ /**
603
+ * Promotion
604
+ *
605
+ * @generated from enum value: GRANT_TYPE_PROMOTION = 2;
606
+ */
607
+ PROMOTION = 2,
608
+
609
+ /**
610
+ * Compensation
611
+ *
612
+ * @generated from enum value: GRANT_TYPE_COMPENSATION = 3;
613
+ */
614
+ COMPENSATION = 3,
615
+ }
616
+
617
+ /**
618
+ * Describes the enum mgx.wallet.v1.topup.GrantType.
619
+ */
620
+ export const GrantTypeSchema: GenEnum<GrantType> = /*@__PURE__*/
621
+ enumDesc(file_v1_topup_order_service, 1);
622
+
623
+ /**
624
+ * Order status enumeration
625
+ *
626
+ * @generated from enum mgx.wallet.v1.topup.OrderStatus
627
+ */
628
+ export enum OrderStatus {
629
+ /**
630
+ * @generated from enum value: ORDER_STATUS_UNSPECIFIED = 0;
631
+ */
632
+ UNSPECIFIED = 0,
633
+
634
+ /**
635
+ * Pending payment
636
+ *
637
+ * @generated from enum value: ORDER_STATUS_PENDING = 1;
638
+ */
639
+ PENDING = 1,
640
+
641
+ /**
642
+ * Processing
643
+ *
644
+ * @generated from enum value: ORDER_STATUS_PROCESSING = 2;
645
+ */
646
+ PROCESSING = 2,
647
+
648
+ /**
649
+ * Success
650
+ *
651
+ * @generated from enum value: ORDER_STATUS_SUCCESS = 3;
652
+ */
653
+ SUCCESS = 3,
654
+
655
+ /**
656
+ * Failed
657
+ *
658
+ * @generated from enum value: ORDER_STATUS_FAILED = 4;
659
+ */
660
+ FAILED = 4,
661
+ }
662
+
663
+ /**
664
+ * Describes the enum mgx.wallet.v1.topup.OrderStatus.
665
+ */
666
+ export const OrderStatusSchema: GenEnum<OrderStatus> = /*@__PURE__*/
667
+ enumDesc(file_v1_topup_order_service, 2);
668
+
669
+ /**
670
+ * Core service definition
671
+ *
672
+ * @generated from service mgx.wallet.v1.topup.OrderService
673
+ */
674
+ export const OrderService: GenService<{
675
+ /**
676
+ * @generated from rpc mgx.wallet.v1.topup.OrderService.ListOrders
677
+ */
678
+ listOrders: {
679
+ methodKind: "unary";
680
+ input: typeof ListOrdersRequestSchema;
681
+ output: typeof ListOrdersResponseSchema;
682
+ },
683
+ /**
684
+ * Top-up payment event notification: payment module calls this on success/failure; wallet credits account or records failure.
685
+ *
686
+ * @generated from rpc mgx.wallet.v1.topup.OrderService.NotifyTopupPaymentEvent
687
+ */
688
+ notifyTopupPaymentEvent: {
689
+ methodKind: "unary";
690
+ input: typeof NotifyTopupPaymentEventRequestSchema;
691
+ output: typeof NotifyTopupPaymentEventResponseSchema;
692
+ },
693
+ }> = /*@__PURE__*/
694
+ serviceDesc(file_v1_topup_order_service, 0);
695
+