@aepstore-dev/contracts 1.60.0 → 1.62.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/gen/payments.d.ts +84 -3
- package/gen/payments.js +4 -1
- package/gen/payments.ts +109 -4
- package/gen/products.d.ts +11 -2
- package/gen/products.js +1 -1
- package/gen/products.ts +12 -3
- package/package.json +35 -35
- package/proto/activity.proto +200 -200
- package/proto/auth.proto +198 -198
- package/proto/mail.proto +54 -54
- package/proto/payments.proto +465 -415
- package/proto/products.proto +407 -402
- package/proto/support.proto +144 -144
- package/proto/taxonomy.proto +105 -105
- package/proto/upload.proto +171 -171
- package/proto/users.proto +690 -690
package/gen/payments.d.ts
CHANGED
|
@@ -13,23 +13,30 @@ export interface Purchase {
|
|
|
13
13
|
productId: string;
|
|
14
14
|
productName: string;
|
|
15
15
|
userId: string;
|
|
16
|
+
/** settled RUB amount */
|
|
16
17
|
price: string;
|
|
17
18
|
/** PENDING | COMPLETED | FAILED | REFUNDED */
|
|
18
19
|
status: string;
|
|
19
20
|
paymentId: string;
|
|
20
|
-
/** BALANCE | YOOKASSA */
|
|
21
|
+
/** BALANCE | YOOKASSA | CRYPTO */
|
|
21
22
|
paymentMethod: string;
|
|
22
23
|
commissionPercent: string;
|
|
23
24
|
sellerAmount: string;
|
|
24
25
|
createdAt: string;
|
|
25
26
|
completedAt: string;
|
|
27
|
+
/** FX snapshot at checkout (empty for legacy RUB purchases). */
|
|
28
|
+
listingCurrency: string;
|
|
29
|
+
/** Decimal as string, in listing_currency */
|
|
30
|
+
listingPrice: string;
|
|
31
|
+
/** listing→RUB rate used (Decimal as string) */
|
|
32
|
+
fxRate: string;
|
|
26
33
|
}
|
|
27
34
|
export interface TopupRequest {
|
|
28
35
|
userId: string;
|
|
29
36
|
/** >= 10.00 */
|
|
30
37
|
amount: string;
|
|
31
38
|
returnUrl: string;
|
|
32
|
-
/** YOOKASSA | SAVED_CARD (default YOOKASSA) */
|
|
39
|
+
/** YOOKASSA | SAVED_CARD | CRYPTO (default YOOKASSA) */
|
|
33
40
|
paymentMethod: string;
|
|
34
41
|
/** required when payment_method=SAVED_CARD */
|
|
35
42
|
savedCardId: string;
|
|
@@ -37,7 +44,7 @@ export interface TopupRequest {
|
|
|
37
44
|
export interface CreateCheckoutRequest {
|
|
38
45
|
userId: string;
|
|
39
46
|
productId: string;
|
|
40
|
-
/** BALANCE | YOOKASSA | SAVED_CARD (default YOOKASSA) */
|
|
47
|
+
/** BALANCE | YOOKASSA | SAVED_CARD | CRYPTO (default YOOKASSA) */
|
|
41
48
|
paymentMethod: string;
|
|
42
49
|
returnUrl: string;
|
|
43
50
|
/**
|
|
@@ -271,6 +278,44 @@ export interface PaymentEventRequest {
|
|
|
271
278
|
event: string;
|
|
272
279
|
paymentId: string;
|
|
273
280
|
}
|
|
281
|
+
export interface ProviderCallbackRequest {
|
|
282
|
+
/** yookassa | heleket | … */
|
|
283
|
+
provider: string;
|
|
284
|
+
/** exact raw JSON body as received (signature input) */
|
|
285
|
+
rawBody: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* ---------------------------------------------------------------------------
|
|
289
|
+
* FX rates / payment methods
|
|
290
|
+
* ---------------------------------------------------------------------------
|
|
291
|
+
*/
|
|
292
|
+
export interface GetRatesRequest {
|
|
293
|
+
}
|
|
294
|
+
export interface FxRate {
|
|
295
|
+
/** USD | EUR */
|
|
296
|
+
currency: string;
|
|
297
|
+
/** RUB per 1 unit, Decimal as string */
|
|
298
|
+
rate: string;
|
|
299
|
+
}
|
|
300
|
+
export interface GetRatesResponse {
|
|
301
|
+
/** always RUB */
|
|
302
|
+
base: string;
|
|
303
|
+
/** YYYY-MM-DD the rates are for */
|
|
304
|
+
asOf: string;
|
|
305
|
+
rates: FxRate[];
|
|
306
|
+
}
|
|
307
|
+
export interface GetPaymentMethodsRequest {
|
|
308
|
+
}
|
|
309
|
+
export interface PaymentMethodInfo {
|
|
310
|
+
/** YOOKASSA | SAVED_CARD | CRYPTO | BALANCE */
|
|
311
|
+
method: string;
|
|
312
|
+
/** yookassa | heleket | '' (BALANCE) */
|
|
313
|
+
provider: string;
|
|
314
|
+
currencies: string[];
|
|
315
|
+
}
|
|
316
|
+
export interface GetPaymentMethodsResponse {
|
|
317
|
+
methods: PaymentMethodInfo[];
|
|
318
|
+
}
|
|
274
319
|
/**
|
|
275
320
|
* ---------------------------------------------------------------------------
|
|
276
321
|
* Admin
|
|
@@ -580,6 +625,12 @@ export interface PaymentsServiceClient {
|
|
|
580
625
|
processWithdrawal(request: ProcessWithdrawalRequest): Observable<Withdrawal>;
|
|
581
626
|
/** ----- provider webhook (gateway forwards a verified event) ----- */
|
|
582
627
|
handlePaymentEvent(request: PaymentEventRequest): Observable<Ok>;
|
|
628
|
+
/**
|
|
629
|
+
* Generalized per-provider callback (POST /payments/webhook/:provider).
|
|
630
|
+
* Carries the EXACT raw JSON body: signed providers (Heleket) hash the
|
|
631
|
+
* byte-exact payload, so re-serializing a parsed body would break the sign.
|
|
632
|
+
*/
|
|
633
|
+
handleProviderCallback(request: ProviderCallbackRequest): Observable<Ok>;
|
|
583
634
|
/** ----- premium ----- */
|
|
584
635
|
getPremiumPlans(request: GetPremiumPlansRequest): Observable<PremiumPlansResponse>;
|
|
585
636
|
purchasePremium(request: PurchasePremiumRequest): Observable<PurchasePremiumResponse>;
|
|
@@ -612,6 +663,18 @@ export interface PaymentsServiceClient {
|
|
|
612
663
|
* completion. Ownership-checked by user_id.
|
|
613
664
|
*/
|
|
614
665
|
getPaymentIntent(request: GetPaymentIntentRequest): Observable<PaymentIntentStatus>;
|
|
666
|
+
/**
|
|
667
|
+
* ----- FX / available methods (public, cached) -----
|
|
668
|
+
* Daily CBR rates (RUB base). Frontend uses this for the "≈" display hint;
|
|
669
|
+
* the authoritative charge amount is always computed server-side at checkout.
|
|
670
|
+
*/
|
|
671
|
+
getRates(request: GetRatesRequest): Observable<GetRatesResponse>;
|
|
672
|
+
/**
|
|
673
|
+
* Payment methods derived from live provider capabilities — the client
|
|
674
|
+
* renders only what is actually available (e.g. CRYPTO appears once the
|
|
675
|
+
* Heleket merchant is configured).
|
|
676
|
+
*/
|
|
677
|
+
getPaymentMethods(request: GetPaymentMethodsRequest): Observable<GetPaymentMethodsResponse>;
|
|
615
678
|
/** ----- payout details ----- */
|
|
616
679
|
updatePayoutDetails(request: UpdatePayoutDetailsRequest): Observable<UpdatePayoutDetailsResponse>;
|
|
617
680
|
getPayoutDetails(request: GetPayoutDetailsRequest): Observable<UpdatePayoutDetailsResponse>;
|
|
@@ -644,6 +707,12 @@ export interface PaymentsServiceController {
|
|
|
644
707
|
processWithdrawal(request: ProcessWithdrawalRequest): Promise<Withdrawal> | Observable<Withdrawal> | Withdrawal;
|
|
645
708
|
/** ----- provider webhook (gateway forwards a verified event) ----- */
|
|
646
709
|
handlePaymentEvent(request: PaymentEventRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
710
|
+
/**
|
|
711
|
+
* Generalized per-provider callback (POST /payments/webhook/:provider).
|
|
712
|
+
* Carries the EXACT raw JSON body: signed providers (Heleket) hash the
|
|
713
|
+
* byte-exact payload, so re-serializing a parsed body would break the sign.
|
|
714
|
+
*/
|
|
715
|
+
handleProviderCallback(request: ProviderCallbackRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
647
716
|
/** ----- premium ----- */
|
|
648
717
|
getPremiumPlans(request: GetPremiumPlansRequest): Promise<PremiumPlansResponse> | Observable<PremiumPlansResponse> | PremiumPlansResponse;
|
|
649
718
|
purchasePremium(request: PurchasePremiumRequest): Promise<PurchasePremiumResponse> | Observable<PurchasePremiumResponse> | PurchasePremiumResponse;
|
|
@@ -676,6 +745,18 @@ export interface PaymentsServiceController {
|
|
|
676
745
|
* completion. Ownership-checked by user_id.
|
|
677
746
|
*/
|
|
678
747
|
getPaymentIntent(request: GetPaymentIntentRequest): Promise<PaymentIntentStatus> | Observable<PaymentIntentStatus> | PaymentIntentStatus;
|
|
748
|
+
/**
|
|
749
|
+
* ----- FX / available methods (public, cached) -----
|
|
750
|
+
* Daily CBR rates (RUB base). Frontend uses this for the "≈" display hint;
|
|
751
|
+
* the authoritative charge amount is always computed server-side at checkout.
|
|
752
|
+
*/
|
|
753
|
+
getRates(request: GetRatesRequest): Promise<GetRatesResponse> | Observable<GetRatesResponse> | GetRatesResponse;
|
|
754
|
+
/**
|
|
755
|
+
* Payment methods derived from live provider capabilities — the client
|
|
756
|
+
* renders only what is actually available (e.g. CRYPTO appears once the
|
|
757
|
+
* Heleket merchant is configured).
|
|
758
|
+
*/
|
|
759
|
+
getPaymentMethods(request: GetPaymentMethodsRequest): Promise<GetPaymentMethodsResponse> | Observable<GetPaymentMethodsResponse> | GetPaymentMethodsResponse;
|
|
679
760
|
/** ----- payout details ----- */
|
|
680
761
|
updatePayoutDetails(request: UpdatePayoutDetailsRequest): Promise<UpdatePayoutDetailsResponse> | Observable<UpdatePayoutDetailsResponse> | UpdatePayoutDetailsResponse;
|
|
681
762
|
getPayoutDetails(request: GetPayoutDetailsRequest): Promise<UpdatePayoutDetailsResponse> | Observable<UpdatePayoutDetailsResponse> | UpdatePayoutDetailsResponse;
|
package/gen/payments.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.10.1
|
|
5
|
-
// protoc v7.35.
|
|
5
|
+
// protoc v7.35.0
|
|
6
6
|
// source: payments.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.PAYMENTS_SERVICE_NAME = exports.PAYMENTS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
@@ -26,6 +26,7 @@ function PaymentsServiceControllerMethods() {
|
|
|
26
26
|
"listWithdrawals",
|
|
27
27
|
"processWithdrawal",
|
|
28
28
|
"handlePaymentEvent",
|
|
29
|
+
"handleProviderCallback",
|
|
29
30
|
"getPremiumPlans",
|
|
30
31
|
"purchasePremium",
|
|
31
32
|
"setPremiumPaymentMethod",
|
|
@@ -39,6 +40,8 @@ function PaymentsServiceControllerMethods() {
|
|
|
39
40
|
"updateSavedCard",
|
|
40
41
|
"bindCard",
|
|
41
42
|
"getPaymentIntent",
|
|
43
|
+
"getRates",
|
|
44
|
+
"getPaymentMethods",
|
|
42
45
|
"updatePayoutDetails",
|
|
43
46
|
"getPayoutDetails",
|
|
44
47
|
"getAdminOverview",
|
package/gen/payments.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.10.1
|
|
4
|
-
// protoc v7.35.
|
|
4
|
+
// protoc v7.35.0
|
|
5
5
|
// source: payments.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -24,16 +24,23 @@ export interface Purchase {
|
|
|
24
24
|
productId: string;
|
|
25
25
|
productName: string;
|
|
26
26
|
userId: string;
|
|
27
|
+
/** settled RUB amount */
|
|
27
28
|
price: string;
|
|
28
29
|
/** PENDING | COMPLETED | FAILED | REFUNDED */
|
|
29
30
|
status: string;
|
|
30
31
|
paymentId: string;
|
|
31
|
-
/** BALANCE | YOOKASSA */
|
|
32
|
+
/** BALANCE | YOOKASSA | CRYPTO */
|
|
32
33
|
paymentMethod: string;
|
|
33
34
|
commissionPercent: string;
|
|
34
35
|
sellerAmount: string;
|
|
35
36
|
createdAt: string;
|
|
36
37
|
completedAt: string;
|
|
38
|
+
/** FX snapshot at checkout (empty for legacy RUB purchases). */
|
|
39
|
+
listingCurrency: string;
|
|
40
|
+
/** Decimal as string, in listing_currency */
|
|
41
|
+
listingPrice: string;
|
|
42
|
+
/** listing→RUB rate used (Decimal as string) */
|
|
43
|
+
fxRate: string;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
export interface TopupRequest {
|
|
@@ -41,7 +48,7 @@ export interface TopupRequest {
|
|
|
41
48
|
/** >= 10.00 */
|
|
42
49
|
amount: string;
|
|
43
50
|
returnUrl: string;
|
|
44
|
-
/** YOOKASSA | SAVED_CARD (default YOOKASSA) */
|
|
51
|
+
/** YOOKASSA | SAVED_CARD | CRYPTO (default YOOKASSA) */
|
|
45
52
|
paymentMethod: string;
|
|
46
53
|
/** required when payment_method=SAVED_CARD */
|
|
47
54
|
savedCardId: string;
|
|
@@ -50,7 +57,7 @@ export interface TopupRequest {
|
|
|
50
57
|
export interface CreateCheckoutRequest {
|
|
51
58
|
userId: string;
|
|
52
59
|
productId: string;
|
|
53
|
-
/** BALANCE | YOOKASSA | SAVED_CARD (default YOOKASSA) */
|
|
60
|
+
/** BALANCE | YOOKASSA | SAVED_CARD | CRYPTO (default YOOKASSA) */
|
|
54
61
|
paymentMethod: string;
|
|
55
62
|
returnUrl: string;
|
|
56
63
|
/**
|
|
@@ -306,6 +313,51 @@ export interface PaymentEventRequest {
|
|
|
306
313
|
paymentId: string;
|
|
307
314
|
}
|
|
308
315
|
|
|
316
|
+
export interface ProviderCallbackRequest {
|
|
317
|
+
/** yookassa | heleket | … */
|
|
318
|
+
provider: string;
|
|
319
|
+
/** exact raw JSON body as received (signature input) */
|
|
320
|
+
rawBody: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* ---------------------------------------------------------------------------
|
|
325
|
+
* FX rates / payment methods
|
|
326
|
+
* ---------------------------------------------------------------------------
|
|
327
|
+
*/
|
|
328
|
+
export interface GetRatesRequest {
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface FxRate {
|
|
332
|
+
/** USD | EUR */
|
|
333
|
+
currency: string;
|
|
334
|
+
/** RUB per 1 unit, Decimal as string */
|
|
335
|
+
rate: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface GetRatesResponse {
|
|
339
|
+
/** always RUB */
|
|
340
|
+
base: string;
|
|
341
|
+
/** YYYY-MM-DD the rates are for */
|
|
342
|
+
asOf: string;
|
|
343
|
+
rates: FxRate[];
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface GetPaymentMethodsRequest {
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface PaymentMethodInfo {
|
|
350
|
+
/** YOOKASSA | SAVED_CARD | CRYPTO | BALANCE */
|
|
351
|
+
method: string;
|
|
352
|
+
/** yookassa | heleket | '' (BALANCE) */
|
|
353
|
+
provider: string;
|
|
354
|
+
currencies: string[];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface GetPaymentMethodsResponse {
|
|
358
|
+
methods: PaymentMethodInfo[];
|
|
359
|
+
}
|
|
360
|
+
|
|
309
361
|
/**
|
|
310
362
|
* ---------------------------------------------------------------------------
|
|
311
363
|
* Admin
|
|
@@ -673,6 +725,14 @@ export interface PaymentsServiceClient {
|
|
|
673
725
|
|
|
674
726
|
handlePaymentEvent(request: PaymentEventRequest): Observable<Ok>;
|
|
675
727
|
|
|
728
|
+
/**
|
|
729
|
+
* Generalized per-provider callback (POST /payments/webhook/:provider).
|
|
730
|
+
* Carries the EXACT raw JSON body: signed providers (Heleket) hash the
|
|
731
|
+
* byte-exact payload, so re-serializing a parsed body would break the sign.
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
handleProviderCallback(request: ProviderCallbackRequest): Observable<Ok>;
|
|
735
|
+
|
|
676
736
|
/** ----- premium ----- */
|
|
677
737
|
|
|
678
738
|
getPremiumPlans(request: GetPremiumPlansRequest): Observable<PremiumPlansResponse>;
|
|
@@ -724,6 +784,22 @@ export interface PaymentsServiceClient {
|
|
|
724
784
|
|
|
725
785
|
getPaymentIntent(request: GetPaymentIntentRequest): Observable<PaymentIntentStatus>;
|
|
726
786
|
|
|
787
|
+
/**
|
|
788
|
+
* ----- FX / available methods (public, cached) -----
|
|
789
|
+
* Daily CBR rates (RUB base). Frontend uses this for the "≈" display hint;
|
|
790
|
+
* the authoritative charge amount is always computed server-side at checkout.
|
|
791
|
+
*/
|
|
792
|
+
|
|
793
|
+
getRates(request: GetRatesRequest): Observable<GetRatesResponse>;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Payment methods derived from live provider capabilities — the client
|
|
797
|
+
* renders only what is actually available (e.g. CRYPTO appears once the
|
|
798
|
+
* Heleket merchant is configured).
|
|
799
|
+
*/
|
|
800
|
+
|
|
801
|
+
getPaymentMethods(request: GetPaymentMethodsRequest): Observable<GetPaymentMethodsResponse>;
|
|
802
|
+
|
|
727
803
|
/** ----- payout details ----- */
|
|
728
804
|
|
|
729
805
|
updatePayoutDetails(request: UpdatePayoutDetailsRequest): Observable<UpdatePayoutDetailsResponse>;
|
|
@@ -792,6 +868,14 @@ export interface PaymentsServiceController {
|
|
|
792
868
|
|
|
793
869
|
handlePaymentEvent(request: PaymentEventRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
794
870
|
|
|
871
|
+
/**
|
|
872
|
+
* Generalized per-provider callback (POST /payments/webhook/:provider).
|
|
873
|
+
* Carries the EXACT raw JSON body: signed providers (Heleket) hash the
|
|
874
|
+
* byte-exact payload, so re-serializing a parsed body would break the sign.
|
|
875
|
+
*/
|
|
876
|
+
|
|
877
|
+
handleProviderCallback(request: ProviderCallbackRequest): Promise<Ok> | Observable<Ok> | Ok;
|
|
878
|
+
|
|
795
879
|
/** ----- premium ----- */
|
|
796
880
|
|
|
797
881
|
getPremiumPlans(
|
|
@@ -861,6 +945,24 @@ export interface PaymentsServiceController {
|
|
|
861
945
|
request: GetPaymentIntentRequest,
|
|
862
946
|
): Promise<PaymentIntentStatus> | Observable<PaymentIntentStatus> | PaymentIntentStatus;
|
|
863
947
|
|
|
948
|
+
/**
|
|
949
|
+
* ----- FX / available methods (public, cached) -----
|
|
950
|
+
* Daily CBR rates (RUB base). Frontend uses this for the "≈" display hint;
|
|
951
|
+
* the authoritative charge amount is always computed server-side at checkout.
|
|
952
|
+
*/
|
|
953
|
+
|
|
954
|
+
getRates(request: GetRatesRequest): Promise<GetRatesResponse> | Observable<GetRatesResponse> | GetRatesResponse;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Payment methods derived from live provider capabilities — the client
|
|
958
|
+
* renders only what is actually available (e.g. CRYPTO appears once the
|
|
959
|
+
* Heleket merchant is configured).
|
|
960
|
+
*/
|
|
961
|
+
|
|
962
|
+
getPaymentMethods(
|
|
963
|
+
request: GetPaymentMethodsRequest,
|
|
964
|
+
): Promise<GetPaymentMethodsResponse> | Observable<GetPaymentMethodsResponse> | GetPaymentMethodsResponse;
|
|
965
|
+
|
|
864
966
|
/** ----- payout details ----- */
|
|
865
967
|
|
|
866
968
|
updatePayoutDetails(
|
|
@@ -907,6 +1009,7 @@ export function PaymentsServiceControllerMethods() {
|
|
|
907
1009
|
"listWithdrawals",
|
|
908
1010
|
"processWithdrawal",
|
|
909
1011
|
"handlePaymentEvent",
|
|
1012
|
+
"handleProviderCallback",
|
|
910
1013
|
"getPremiumPlans",
|
|
911
1014
|
"purchasePremium",
|
|
912
1015
|
"setPremiumPaymentMethod",
|
|
@@ -920,6 +1023,8 @@ export function PaymentsServiceControllerMethods() {
|
|
|
920
1023
|
"updateSavedCard",
|
|
921
1024
|
"bindCard",
|
|
922
1025
|
"getPaymentIntent",
|
|
1026
|
+
"getRates",
|
|
1027
|
+
"getPaymentMethods",
|
|
923
1028
|
"updatePayoutDetails",
|
|
924
1029
|
"getPayoutDetails",
|
|
925
1030
|
"getAdminOverview",
|
package/gen/products.d.ts
CHANGED
|
@@ -71,15 +71,20 @@ export interface Product {
|
|
|
71
71
|
id: string;
|
|
72
72
|
name: string;
|
|
73
73
|
description: string;
|
|
74
|
-
/** Decimal as string (D7) */
|
|
74
|
+
/** Decimal as string (D7), in `currency` */
|
|
75
75
|
price: string;
|
|
76
76
|
/** Decimal as string */
|
|
77
77
|
discountPercent: string;
|
|
78
|
-
/** Decimal as string */
|
|
78
|
+
/** Decimal as string, in `currency` */
|
|
79
79
|
finalPrice: string;
|
|
80
80
|
/** double as string for consistency */
|
|
81
81
|
averageRating: string;
|
|
82
82
|
status: ProductStatus;
|
|
83
|
+
/**
|
|
84
|
+
* Listing currency the seller priced in: RUB | USD | EUR (default RUB).
|
|
85
|
+
* Settlement/ledger is always RUB — conversion is snapshotted at checkout.
|
|
86
|
+
*/
|
|
87
|
+
currency: string;
|
|
83
88
|
/** null while DRAFT / not yet submitted */
|
|
84
89
|
moderation: ProductModeration | undefined;
|
|
85
90
|
createdAt: string;
|
|
@@ -170,6 +175,8 @@ export interface CreateProductRequest {
|
|
|
170
175
|
video: string;
|
|
171
176
|
description: string;
|
|
172
177
|
status: ProductStatus;
|
|
178
|
+
/** RUB | USD | EUR; empty → RUB */
|
|
179
|
+
currency: string;
|
|
173
180
|
}
|
|
174
181
|
export interface UpdateProductRequest {
|
|
175
182
|
userId: string;
|
|
@@ -182,6 +189,8 @@ export interface UpdateProductRequest {
|
|
|
182
189
|
tags: string[];
|
|
183
190
|
categoryIds: string[];
|
|
184
191
|
applicationIds: string[];
|
|
192
|
+
/** RUB | USD | EUR; empty → no change */
|
|
193
|
+
currency: string;
|
|
185
194
|
}
|
|
186
195
|
export interface QueryProductsRequest {
|
|
187
196
|
search: string;
|
package/gen/products.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.10.1
|
|
5
|
-
// protoc v7.35.
|
|
5
|
+
// protoc v7.35.0
|
|
6
6
|
// source: products.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.PRODUCTS_SERVICE_NAME = exports.PRODUCTS_V1_PACKAGE_NAME = exports.MediaType = exports.ModerationStatus = exports.ProductStatus = exports.protobufPackage = void 0;
|
package/gen/products.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.10.1
|
|
4
|
-
// protoc v7.35.
|
|
4
|
+
// protoc v7.35.0
|
|
5
5
|
// source: products.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -91,15 +91,20 @@ export interface Product {
|
|
|
91
91
|
id: string;
|
|
92
92
|
name: string;
|
|
93
93
|
description: string;
|
|
94
|
-
/** Decimal as string (D7) */
|
|
94
|
+
/** Decimal as string (D7), in `currency` */
|
|
95
95
|
price: string;
|
|
96
96
|
/** Decimal as string */
|
|
97
97
|
discountPercent: string;
|
|
98
|
-
/** Decimal as string */
|
|
98
|
+
/** Decimal as string, in `currency` */
|
|
99
99
|
finalPrice: string;
|
|
100
100
|
/** double as string for consistency */
|
|
101
101
|
averageRating: string;
|
|
102
102
|
status: ProductStatus;
|
|
103
|
+
/**
|
|
104
|
+
* Listing currency the seller priced in: RUB | USD | EUR (default RUB).
|
|
105
|
+
* Settlement/ledger is always RUB — conversion is snapshotted at checkout.
|
|
106
|
+
*/
|
|
107
|
+
currency: string;
|
|
103
108
|
/** null while DRAFT / not yet submitted */
|
|
104
109
|
moderation: ProductModeration | undefined;
|
|
105
110
|
createdAt: string;
|
|
@@ -200,6 +205,8 @@ export interface CreateProductRequest {
|
|
|
200
205
|
video: string;
|
|
201
206
|
description: string;
|
|
202
207
|
status: ProductStatus;
|
|
208
|
+
/** RUB | USD | EUR; empty → RUB */
|
|
209
|
+
currency: string;
|
|
203
210
|
}
|
|
204
211
|
|
|
205
212
|
export interface UpdateProductRequest {
|
|
@@ -213,6 +220,8 @@ export interface UpdateProductRequest {
|
|
|
213
220
|
tags: string[];
|
|
214
221
|
categoryIds: string[];
|
|
215
222
|
applicationIds: string[];
|
|
223
|
+
/** RUB | USD | EUR; empty → no change */
|
|
224
|
+
currency: string;
|
|
216
225
|
}
|
|
217
226
|
|
|
218
227
|
export interface QueryProductsRequest {
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aepstore-dev/contracts",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"generate": "node scripts/generate.cjs",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.gen.json"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"proto",
|
|
14
|
-
"gen"
|
|
15
|
-
],
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public"
|
|
18
|
-
},
|
|
19
|
-
"author": {
|
|
20
|
-
"name": "torroixq",
|
|
21
|
-
"email": "cato.ixq@gmail.com"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@nestjs/microservices": "^11.1.11",
|
|
25
|
-
"rxjs": "^7.8.2"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@nestjs/microservices": "^11.1.11",
|
|
29
|
-
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
-
"@types/node": "^25.0.3",
|
|
31
|
-
"rxjs": "^7.8.2",
|
|
32
|
-
"ts-proto": "^2.10.1",
|
|
33
|
-
"typescript": "^5.9.3"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@aepstore-dev/contracts",
|
|
3
|
+
"version": "1.62.0",
|
|
4
|
+
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"generate": "node scripts/generate.cjs",
|
|
9
|
+
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.gen.json"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"proto",
|
|
14
|
+
"gen"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "torroixq",
|
|
21
|
+
"email": "cato.ixq@gmail.com"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@nestjs/microservices": "^11.1.11",
|
|
25
|
+
"rxjs": "^7.8.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@nestjs/microservices": "^11.1.11",
|
|
29
|
+
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
+
"@types/node": "^25.0.3",
|
|
31
|
+
"rxjs": "^7.8.2",
|
|
32
|
+
"ts-proto": "^2.10.1",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
}
|
|
35
|
+
}
|