@aepstore-dev/contracts 1.41.0 → 1.42.1

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.
@@ -0,0 +1,603 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "payments.v1";
3
+ export interface Ok {
4
+ ok: boolean;
5
+ }
6
+ /**
7
+ * ---------------------------------------------------------------------------
8
+ * Purchase / checkout / topup
9
+ * ---------------------------------------------------------------------------
10
+ */
11
+ export interface Purchase {
12
+ id: string;
13
+ productId: string;
14
+ productName: string;
15
+ userId: string;
16
+ price: string;
17
+ /** PENDING | COMPLETED | FAILED | REFUNDED */
18
+ status: string;
19
+ paymentId: string;
20
+ /** BALANCE | YOOKASSA */
21
+ paymentMethod: string;
22
+ commissionPercent: string;
23
+ sellerAmount: string;
24
+ createdAt: string;
25
+ completedAt: string;
26
+ }
27
+ export interface TopupRequest {
28
+ userId: string;
29
+ /** >= 10.00 */
30
+ amount: string;
31
+ returnUrl: string;
32
+ }
33
+ export interface CreateCheckoutRequest {
34
+ userId: string;
35
+ productId: string;
36
+ /** BALANCE | YOOKASSA (default YOOKASSA) */
37
+ paymentMethod: string;
38
+ returnUrl: string;
39
+ }
40
+ export interface CheckoutResponse {
41
+ purchaseId: string;
42
+ paymentId: string;
43
+ /** empty when paid from balance (instant) */
44
+ confirmationUrl: string;
45
+ /** PENDING (redirect) | COMPLETED (balance) */
46
+ status: string;
47
+ }
48
+ export interface GetMyPurchasesRequest {
49
+ userId: string;
50
+ page: number;
51
+ limit: number;
52
+ }
53
+ export interface PurchasesListResponse {
54
+ items: Purchase[];
55
+ total: number;
56
+ page: number;
57
+ limit: number;
58
+ }
59
+ export interface GetPurchaseRequest {
60
+ id: string;
61
+ userId: string;
62
+ }
63
+ export interface RefundPurchaseRequest {
64
+ purchaseId: string;
65
+ actorUserId: string;
66
+ isAdmin: boolean;
67
+ reason: string;
68
+ }
69
+ /**
70
+ * ---------------------------------------------------------------------------
71
+ * Wallet & statement
72
+ * ---------------------------------------------------------------------------
73
+ */
74
+ export interface GetWalletRequest {
75
+ userId: string;
76
+ }
77
+ export interface WalletResponse {
78
+ spending: string;
79
+ pending: string;
80
+ payout: string;
81
+ /** spending + payout */
82
+ spendable: string;
83
+ /** payout */
84
+ withdrawable: string;
85
+ currency: string;
86
+ lifetimeSales: number;
87
+ currentCommissionPercent: string;
88
+ }
89
+ export interface ListTransactionsRequest {
90
+ userId: string;
91
+ /**
92
+ * Legacy low-level filter (one of LedgerTxType). Kept for backward
93
+ * compatibility — admin tooling still uses it directly.
94
+ */
95
+ type: string;
96
+ page: number;
97
+ limit: number;
98
+ /**
99
+ * ↓ added for the wallet statement page (Round 3)
100
+ * UI-semantic filter mapped onto displayKind:
101
+ * ALL | SALES | INCOME | OUTCOME | REFUND | WITHDRAWAL | PREMIUM
102
+ * SALES = the seller's earnings on this account (USER_PENDING credits from
103
+ * PURCHASE transactions); these stay separate from INCOME (TOPUP).
104
+ */
105
+ flow: string;
106
+ /**
107
+ * Period selection. `month` is the convenience form (YYYY-MM) used by the
108
+ * month dropdown; from/to override it for an arbitrary range.
109
+ */
110
+ month: string;
111
+ from: string;
112
+ to: string;
113
+ /**
114
+ * Filter wallet to purchases/refunds of a specific Product category. Has
115
+ * no effect on TOPUP/WITHDRAWAL/PREMIUM/ADJUSTMENT entries (they have no
116
+ * product).
117
+ */
118
+ productCategoryId: string;
119
+ /** sort_by ∈ { date | amount | type }. Default: date. */
120
+ sortBy: string;
121
+ /** order ∈ { asc | desc }. Default: desc. */
122
+ order: string;
123
+ }
124
+ export interface StatementEntry {
125
+ id: string;
126
+ txId: string;
127
+ /** raw tx type (TOPUP|PURCHASE|...) */
128
+ type: string;
129
+ accountKind: string;
130
+ /** DEBIT | CREDIT */
131
+ direction: string;
132
+ amount: string;
133
+ description: string;
134
+ createdAt: string;
135
+ /**
136
+ * ↓ added for the wallet statement page (Round 3)
137
+ * UI-friendly classification computed server-side:
138
+ * TOPUP | PURCHASE | SALE | REFUND | PREMIUM | WITHDRAWAL | ADJUSTMENT
139
+ * SALE is the seller's view of someone else's PURCHASE (CREDIT to their
140
+ * USER_PENDING) — distinct from PURCHASE which is the buyer's DEBIT.
141
+ * PREMIUM is split out of PURCHASE/REFUND so the UI can show
142
+ * "Продление Premium" / refund-of-premium in their own filter bucket.
143
+ * SALE_CLEAR transactions are excluded from the wallet view — the maturity
144
+ * event is surfaced via sale_status on the original SALE row instead.
145
+ */
146
+ displayKind: string;
147
+ /** affected-account running balance, Decimal-as-string */
148
+ balanceAfter: string;
149
+ /** empty for non-product entries */
150
+ productId: string;
151
+ productName: string;
152
+ /** "Assets" | "Project File" | "Templates" */
153
+ productCategory: string;
154
+ /** optional thumbnail URL for richer rows */
155
+ productPreview: string;
156
+ /**
157
+ * Sale lifecycle. Populated only when display_kind=SALE.
158
+ * PENDING — held in USER_PENDING, not yet withdrawable.
159
+ * MATURED — SALE_CLEAR has fired; money is in USER_PAYOUT.
160
+ */
161
+ saleStatus: string;
162
+ /**
163
+ * ISO 8601 when the sale becomes withdrawable (sale_completed_at +
164
+ * GRACE_DAYS). Empty for non-sale rows.
165
+ */
166
+ maturesAt: string;
167
+ }
168
+ export interface TransactionsListResponse {
169
+ items: StatementEntry[];
170
+ total: number;
171
+ page: number;
172
+ limit: number;
173
+ }
174
+ export interface GetTransactionMonthsRequest {
175
+ userId: string;
176
+ }
177
+ export interface GetTransactionMonthsResponse {
178
+ /**
179
+ * Newest first. "YYYY-MM" strings; the dropdown renders them
180
+ * localized client-side.
181
+ */
182
+ months: string[];
183
+ }
184
+ /**
185
+ * ---------------------------------------------------------------------------
186
+ * Withdrawals
187
+ * ---------------------------------------------------------------------------
188
+ */
189
+ export interface Withdrawal {
190
+ id: string;
191
+ sellerId: string;
192
+ amount: string;
193
+ /** PENDING | PROCESSING | COMPLETED | REJECTED */
194
+ status: string;
195
+ method: string;
196
+ details: string;
197
+ comment: string;
198
+ processedBy: string;
199
+ processedAt: string;
200
+ createdAt: string;
201
+ }
202
+ export interface RequestWithdrawalRequest {
203
+ sellerId: string;
204
+ amount: string;
205
+ method: string;
206
+ details: string;
207
+ }
208
+ export interface ListWithdrawalsRequest {
209
+ sellerId: string;
210
+ status: string;
211
+ page: number;
212
+ limit: number;
213
+ }
214
+ export interface WithdrawalsListResponse {
215
+ items: Withdrawal[];
216
+ total: number;
217
+ page: number;
218
+ limit: number;
219
+ }
220
+ export interface ProcessWithdrawalRequest {
221
+ withdrawalId: string;
222
+ adminId: string;
223
+ action: string;
224
+ comment: string;
225
+ }
226
+ /**
227
+ * ---------------------------------------------------------------------------
228
+ * Webhook
229
+ * ---------------------------------------------------------------------------
230
+ */
231
+ export interface PaymentEventRequest {
232
+ event: string;
233
+ paymentId: string;
234
+ }
235
+ /**
236
+ * ---------------------------------------------------------------------------
237
+ * Admin
238
+ * ---------------------------------------------------------------------------
239
+ */
240
+ export interface AdminOverviewRequest {
241
+ from: string;
242
+ to: string;
243
+ }
244
+ export interface AdminOverviewResponse {
245
+ /** platform commission earned (period) */
246
+ revenue: string;
247
+ /** gross merchandise value (period) */
248
+ gmv: string;
249
+ /** Σ all users' (pending+payout+spending) — what we owe */
250
+ liabilities: string;
251
+ /** money in transit at PSP */
252
+ pspClearing: string;
253
+ /** reserved for approved withdrawals */
254
+ payoutsPayable: string;
255
+ refundsTotal: string;
256
+ topupsTotal: string;
257
+ withdrawalsTotal: string;
258
+ salesCount: number;
259
+ currency: string;
260
+ }
261
+ export interface AdminListTransactionsRequest {
262
+ type: string;
263
+ userId: string;
264
+ accountKind: string;
265
+ from: string;
266
+ to: string;
267
+ page: number;
268
+ limit: number;
269
+ }
270
+ export interface AdminEntry {
271
+ accountId: string;
272
+ accountKind: string;
273
+ ownerId: string;
274
+ direction: string;
275
+ amount: string;
276
+ }
277
+ export interface AdminLedgerTx {
278
+ id: string;
279
+ type: string;
280
+ status: string;
281
+ refType: string;
282
+ refId: string;
283
+ description: string;
284
+ createdBy: string;
285
+ createdAt: string;
286
+ entries: AdminEntry[];
287
+ }
288
+ export interface AdminTransactionsListResponse {
289
+ items: AdminLedgerTx[];
290
+ total: number;
291
+ page: number;
292
+ limit: number;
293
+ }
294
+ export interface GetUserFinanceRequest {
295
+ userId: string;
296
+ }
297
+ export interface AccountBalance {
298
+ kind: string;
299
+ balance: string;
300
+ currency: string;
301
+ }
302
+ export interface UserFinanceResponse {
303
+ wallet: WalletResponse | undefined;
304
+ accounts: AccountBalance[];
305
+ recent: StatementEntry[];
306
+ }
307
+ export interface CreateAdjustmentRequest {
308
+ adminId: string;
309
+ userId: string;
310
+ /** USER_SPENDING | USER_PAYOUT | USER_PENDING */
311
+ accountKind: string;
312
+ /** CREDIT (give) | DEBIT (take) */
313
+ direction: string;
314
+ amount: string;
315
+ reason: string;
316
+ }
317
+ export interface SalesAnalyticsRequest {
318
+ from: string;
319
+ to: string;
320
+ granularity: string;
321
+ }
322
+ export interface SalesPoint {
323
+ date: string;
324
+ salesCount: number;
325
+ gmv: string;
326
+ revenue: string;
327
+ }
328
+ export interface SellerStat {
329
+ sellerId: string;
330
+ username: string;
331
+ sales: number;
332
+ gmv: string;
333
+ }
334
+ export interface SalesAnalyticsResponse {
335
+ points: SalesPoint[];
336
+ topSellers: SellerStat[];
337
+ /** % refunded purchases */
338
+ refundRate: string;
339
+ }
340
+ /**
341
+ * ---------------------------------------------------------------------------
342
+ * Premium
343
+ * ---------------------------------------------------------------------------
344
+ */
345
+ export interface GetPremiumPlansRequest {
346
+ }
347
+ /**
348
+ * One plan per (period). Prices are computed server-side from BASE_PRICE × months
349
+ * × (1 − discount); kept here as canonical strings so the gateway has no math.
350
+ */
351
+ export interface PremiumPlan {
352
+ /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
353
+ period: string;
354
+ months: number;
355
+ /** total to charge, Decimal-as-string */
356
+ price: string;
357
+ /** for UI "≈ X ₽/month" */
358
+ monthlyPrice: string;
359
+ discountPercent: string;
360
+ currency: string;
361
+ }
362
+ export interface PremiumPlansResponse {
363
+ plans: PremiumPlan[];
364
+ baseMonthlyPrice: string;
365
+ }
366
+ export interface PurchasePremiumRequest {
367
+ userId: string;
368
+ /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
369
+ period: string;
370
+ /** BALANCE | YOOKASSA */
371
+ paymentMethod: string;
372
+ /** YooKassa only */
373
+ returnUrl: string;
374
+ /**
375
+ * Save the YooKassa payment_method for future auto-renewals. Ignored for
376
+ * BALANCE. Default true — the UI surfaces a checkbox.
377
+ */
378
+ savePaymentMethod: boolean;
379
+ }
380
+ export interface PurchasePremiumResponse {
381
+ /** PremiumPayment.id */
382
+ paymentId: string;
383
+ /** empty for BALANCE (instant) or YooKassa-issued */
384
+ confirmationUrl: string;
385
+ /** PENDING (redirect) | COMPLETED (balance) */
386
+ status: string;
387
+ }
388
+ export interface RunPremiumRenewalsRequest {
389
+ /** safety cap; default 100 */
390
+ maxBatch: number;
391
+ }
392
+ export interface RunPremiumRenewalsResponse {
393
+ attempted: number;
394
+ succeeded: number;
395
+ failed: number;
396
+ }
397
+ export interface PremiumPaymentRow {
398
+ id: string;
399
+ userId: string;
400
+ amount: string;
401
+ /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
402
+ period: string;
403
+ /** BALANCE | YOOKASSA */
404
+ method: string;
405
+ /** PENDING | COMPLETED | FAILED | REFUNDED */
406
+ status: string;
407
+ isRenewal: boolean;
408
+ createdAt: string;
409
+ completedAt: string;
410
+ refundedAt: string;
411
+ refundedAmount: string;
412
+ /**
413
+ * Convenience: true if this payment is currently inside the 7-day refund
414
+ * window AND status == COMPLETED AND not already refunded.
415
+ */
416
+ refundable: boolean;
417
+ }
418
+ export interface RefundPremiumRequest {
419
+ userId: string;
420
+ paymentId: string;
421
+ /** optional */
422
+ reason: string;
423
+ }
424
+ export interface RefundPremiumResponse {
425
+ payment: PremiumPaymentRow | undefined;
426
+ /** ISO 8601 after rollback */
427
+ newExpiresAt: string;
428
+ /** true when rollback put expiresAt <= now */
429
+ subscriptionRevoked: boolean;
430
+ }
431
+ export interface GetMyPremiumPaymentsRequest {
432
+ userId: string;
433
+ page: number;
434
+ limit: number;
435
+ }
436
+ export interface PremiumPaymentsListResponse {
437
+ items: PremiumPaymentRow[];
438
+ total: number;
439
+ page: number;
440
+ limit: number;
441
+ }
442
+ /**
443
+ * ---------------------------------------------------------------------------
444
+ * Saved cards (YooKassa payment_method tokens; we never see PAN)
445
+ * ---------------------------------------------------------------------------
446
+ */
447
+ export interface SavedCard {
448
+ id: string;
449
+ /** "MIR" | "VISA" | "MASTERCARD" | "" */
450
+ brand: string;
451
+ /** "0000" etc, display-only */
452
+ last4: string;
453
+ expMonth: number;
454
+ expYear: number;
455
+ isDefault: boolean;
456
+ /** user-set label */
457
+ nickname: string;
458
+ createdAt: string;
459
+ }
460
+ export interface ListSavedCardsRequest {
461
+ userId: string;
462
+ }
463
+ export interface ListSavedCardsResponse {
464
+ items: SavedCard[];
465
+ }
466
+ export interface DeleteSavedCardRequest {
467
+ userId: string;
468
+ id: string;
469
+ }
470
+ export interface SetDefaultSavedCardRequest {
471
+ userId: string;
472
+ id: string;
473
+ }
474
+ export interface UpdateSavedCardRequest {
475
+ userId: string;
476
+ id: string;
477
+ /** empty = clear */
478
+ nickname: string;
479
+ }
480
+ /**
481
+ * ---------------------------------------------------------------------------
482
+ * Payout details (persistent default; per-withdrawal override still allowed)
483
+ * ---------------------------------------------------------------------------
484
+ */
485
+ export interface UpdatePayoutDetailsRequest {
486
+ userId: string;
487
+ /** "card" | "sbp" | "bank" | "" (clear) */
488
+ method: string;
489
+ /** JSON string — payments-service treats opaquely */
490
+ details: string;
491
+ }
492
+ export interface UpdatePayoutDetailsResponse {
493
+ method: string;
494
+ details: string;
495
+ }
496
+ export interface GetPayoutDetailsRequest {
497
+ userId: string;
498
+ }
499
+ export declare const PAYMENTS_V1_PACKAGE_NAME = "payments.v1";
500
+ /**
501
+ * Commerce + double-entry wallet/ledger (D9 / D9.2). See payments-service/docs/FINANCE.md.
502
+ * Money = Decimal-as-string (D7). Statuses/enums as strings (avoid proto enum
503
+ * value-name clashes within one package).
504
+ */
505
+ export interface PaymentsServiceClient {
506
+ /** ----- buyer ----- */
507
+ topup(request: TopupRequest): Observable<CheckoutResponse>;
508
+ createCheckout(request: CreateCheckoutRequest): Observable<CheckoutResponse>;
509
+ getMyPurchases(request: GetMyPurchasesRequest): Observable<PurchasesListResponse>;
510
+ getPurchase(request: GetPurchaseRequest): Observable<Purchase>;
511
+ refundPurchase(request: RefundPurchaseRequest): Observable<Purchase>;
512
+ /** ----- wallet ----- */
513
+ getWallet(request: GetWalletRequest): Observable<WalletResponse>;
514
+ listTransactions(request: ListTransactionsRequest): Observable<TransactionsListResponse>;
515
+ getTransactionMonths(request: GetTransactionMonthsRequest): Observable<GetTransactionMonthsResponse>;
516
+ /** ----- withdrawals ----- */
517
+ requestWithdrawal(request: RequestWithdrawalRequest): Observable<Withdrawal>;
518
+ listWithdrawals(request: ListWithdrawalsRequest): Observable<WithdrawalsListResponse>;
519
+ processWithdrawal(request: ProcessWithdrawalRequest): Observable<Withdrawal>;
520
+ /** ----- provider webhook (gateway forwards a verified event) ----- */
521
+ handlePaymentEvent(request: PaymentEventRequest): Observable<Ok>;
522
+ /** ----- premium ----- */
523
+ getPremiumPlans(request: GetPremiumPlansRequest): Observable<PremiumPlansResponse>;
524
+ purchasePremium(request: PurchasePremiumRequest): Observable<PurchasePremiumResponse>;
525
+ /**
526
+ * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
527
+ * card purchases, rolls back the subscription's expiresAt by the period.
528
+ */
529
+ refundPremium(request: RefundPremiumRequest): Observable<RefundPremiumResponse>;
530
+ getMyPremiumPayments(request: GetMyPremiumPaymentsRequest): Observable<PremiumPaymentsListResponse>;
531
+ /**
532
+ * Internal — InternalServiceGuard. tasks-service cron triggers due renewals;
533
+ * payments-service iterates ACTIVE subscriptions with autoRenew+savedCard.
534
+ */
535
+ runPremiumRenewals(request: RunPremiumRenewalsRequest): Observable<RunPremiumRenewalsResponse>;
536
+ /** ----- saved cards ----- */
537
+ listSavedCards(request: ListSavedCardsRequest): Observable<ListSavedCardsResponse>;
538
+ deleteSavedCard(request: DeleteSavedCardRequest): Observable<Ok>;
539
+ setDefaultSavedCard(request: SetDefaultSavedCardRequest): Observable<SavedCard>;
540
+ updateSavedCard(request: UpdateSavedCardRequest): Observable<SavedCard>;
541
+ /** ----- payout details ----- */
542
+ updatePayoutDetails(request: UpdatePayoutDetailsRequest): Observable<UpdatePayoutDetailsResponse>;
543
+ getPayoutDetails(request: GetPayoutDetailsRequest): Observable<UpdatePayoutDetailsResponse>;
544
+ /** ----- admin ----- */
545
+ getAdminOverview(request: AdminOverviewRequest): Observable<AdminOverviewResponse>;
546
+ adminListTransactions(request: AdminListTransactionsRequest): Observable<AdminTransactionsListResponse>;
547
+ getUserFinance(request: GetUserFinanceRequest): Observable<UserFinanceResponse>;
548
+ createAdjustment(request: CreateAdjustmentRequest): Observable<Ok>;
549
+ getSalesAnalytics(request: SalesAnalyticsRequest): Observable<SalesAnalyticsResponse>;
550
+ }
551
+ /**
552
+ * Commerce + double-entry wallet/ledger (D9 / D9.2). See payments-service/docs/FINANCE.md.
553
+ * Money = Decimal-as-string (D7). Statuses/enums as strings (avoid proto enum
554
+ * value-name clashes within one package).
555
+ */
556
+ export interface PaymentsServiceController {
557
+ /** ----- buyer ----- */
558
+ topup(request: TopupRequest): Promise<CheckoutResponse> | Observable<CheckoutResponse> | CheckoutResponse;
559
+ createCheckout(request: CreateCheckoutRequest): Promise<CheckoutResponse> | Observable<CheckoutResponse> | CheckoutResponse;
560
+ getMyPurchases(request: GetMyPurchasesRequest): Promise<PurchasesListResponse> | Observable<PurchasesListResponse> | PurchasesListResponse;
561
+ getPurchase(request: GetPurchaseRequest): Promise<Purchase> | Observable<Purchase> | Purchase;
562
+ refundPurchase(request: RefundPurchaseRequest): Promise<Purchase> | Observable<Purchase> | Purchase;
563
+ /** ----- wallet ----- */
564
+ getWallet(request: GetWalletRequest): Promise<WalletResponse> | Observable<WalletResponse> | WalletResponse;
565
+ listTransactions(request: ListTransactionsRequest): Promise<TransactionsListResponse> | Observable<TransactionsListResponse> | TransactionsListResponse;
566
+ getTransactionMonths(request: GetTransactionMonthsRequest): Promise<GetTransactionMonthsResponse> | Observable<GetTransactionMonthsResponse> | GetTransactionMonthsResponse;
567
+ /** ----- withdrawals ----- */
568
+ requestWithdrawal(request: RequestWithdrawalRequest): Promise<Withdrawal> | Observable<Withdrawal> | Withdrawal;
569
+ listWithdrawals(request: ListWithdrawalsRequest): Promise<WithdrawalsListResponse> | Observable<WithdrawalsListResponse> | WithdrawalsListResponse;
570
+ processWithdrawal(request: ProcessWithdrawalRequest): Promise<Withdrawal> | Observable<Withdrawal> | Withdrawal;
571
+ /** ----- provider webhook (gateway forwards a verified event) ----- */
572
+ handlePaymentEvent(request: PaymentEventRequest): Promise<Ok> | Observable<Ok> | Ok;
573
+ /** ----- premium ----- */
574
+ getPremiumPlans(request: GetPremiumPlansRequest): Promise<PremiumPlansResponse> | Observable<PremiumPlansResponse> | PremiumPlansResponse;
575
+ purchasePremium(request: PurchasePremiumRequest): Promise<PurchasePremiumResponse> | Observable<PurchasePremiumResponse> | PurchasePremiumResponse;
576
+ /**
577
+ * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
578
+ * card purchases, rolls back the subscription's expiresAt by the period.
579
+ */
580
+ refundPremium(request: RefundPremiumRequest): Promise<RefundPremiumResponse> | Observable<RefundPremiumResponse> | RefundPremiumResponse;
581
+ getMyPremiumPayments(request: GetMyPremiumPaymentsRequest): Promise<PremiumPaymentsListResponse> | Observable<PremiumPaymentsListResponse> | PremiumPaymentsListResponse;
582
+ /**
583
+ * Internal — InternalServiceGuard. tasks-service cron triggers due renewals;
584
+ * payments-service iterates ACTIVE subscriptions with autoRenew+savedCard.
585
+ */
586
+ runPremiumRenewals(request: RunPremiumRenewalsRequest): Promise<RunPremiumRenewalsResponse> | Observable<RunPremiumRenewalsResponse> | RunPremiumRenewalsResponse;
587
+ /** ----- saved cards ----- */
588
+ listSavedCards(request: ListSavedCardsRequest): Promise<ListSavedCardsResponse> | Observable<ListSavedCardsResponse> | ListSavedCardsResponse;
589
+ deleteSavedCard(request: DeleteSavedCardRequest): Promise<Ok> | Observable<Ok> | Ok;
590
+ setDefaultSavedCard(request: SetDefaultSavedCardRequest): Promise<SavedCard> | Observable<SavedCard> | SavedCard;
591
+ updateSavedCard(request: UpdateSavedCardRequest): Promise<SavedCard> | Observable<SavedCard> | SavedCard;
592
+ /** ----- payout details ----- */
593
+ updatePayoutDetails(request: UpdatePayoutDetailsRequest): Promise<UpdatePayoutDetailsResponse> | Observable<UpdatePayoutDetailsResponse> | UpdatePayoutDetailsResponse;
594
+ getPayoutDetails(request: GetPayoutDetailsRequest): Promise<UpdatePayoutDetailsResponse> | Observable<UpdatePayoutDetailsResponse> | UpdatePayoutDetailsResponse;
595
+ /** ----- admin ----- */
596
+ getAdminOverview(request: AdminOverviewRequest): Promise<AdminOverviewResponse> | Observable<AdminOverviewResponse> | AdminOverviewResponse;
597
+ adminListTransactions(request: AdminListTransactionsRequest): Promise<AdminTransactionsListResponse> | Observable<AdminTransactionsListResponse> | AdminTransactionsListResponse;
598
+ getUserFinance(request: GetUserFinanceRequest): Promise<UserFinanceResponse> | Observable<UserFinanceResponse> | UserFinanceResponse;
599
+ createAdjustment(request: CreateAdjustmentRequest): Promise<Ok> | Observable<Ok> | Ok;
600
+ getSalesAnalytics(request: SalesAnalyticsRequest): Promise<SalesAnalyticsResponse> | Observable<SalesAnalyticsResponse> | SalesAnalyticsResponse;
601
+ }
602
+ export declare function PaymentsServiceControllerMethods(): (constructor: Function) => void;
603
+ export declare const PAYMENTS_SERVICE_NAME = "PaymentsService";
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.1
5
+ // protoc v7.35.0
6
+ // source: payments.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PAYMENTS_SERVICE_NAME = exports.PAYMENTS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.PaymentsServiceControllerMethods = PaymentsServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "payments.v1";
13
+ exports.PAYMENTS_V1_PACKAGE_NAME = "payments.v1";
14
+ function PaymentsServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = [
17
+ "topup",
18
+ "createCheckout",
19
+ "getMyPurchases",
20
+ "getPurchase",
21
+ "refundPurchase",
22
+ "getWallet",
23
+ "listTransactions",
24
+ "getTransactionMonths",
25
+ "requestWithdrawal",
26
+ "listWithdrawals",
27
+ "processWithdrawal",
28
+ "handlePaymentEvent",
29
+ "getPremiumPlans",
30
+ "purchasePremium",
31
+ "refundPremium",
32
+ "getMyPremiumPayments",
33
+ "runPremiumRenewals",
34
+ "listSavedCards",
35
+ "deleteSavedCard",
36
+ "setDefaultSavedCard",
37
+ "updateSavedCard",
38
+ "updatePayoutDetails",
39
+ "getPayoutDetails",
40
+ "getAdminOverview",
41
+ "adminListTransactions",
42
+ "getUserFinance",
43
+ "createAdjustment",
44
+ "getSalesAnalytics",
45
+ ];
46
+ for (const method of grpcMethods) {
47
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
48
+ (0, microservices_1.GrpcMethod)("PaymentsService", method)(constructor.prototype[method], method, descriptor);
49
+ }
50
+ const grpcStreamMethods = [];
51
+ for (const method of grpcStreamMethods) {
52
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
53
+ (0, microservices_1.GrpcStreamMethod)("PaymentsService", method)(constructor.prototype[method], method, descriptor);
54
+ }
55
+ };
56
+ }
57
+ exports.PAYMENTS_SERVICE_NAME = "PaymentsService";