@aepstore-dev/contracts 1.94.0 → 1.96.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 +2 -0
- package/gen/payments.ts +2 -0
- package/gen/users.d.ts +14 -0
- package/gen/users.ts +18 -1
- package/package.json +1 -1
- package/proto/payments.proto +6 -5
- package/proto/users.proto +9 -0
package/gen/payments.d.ts
CHANGED
package/gen/payments.ts
CHANGED
package/gen/users.d.ts
CHANGED
|
@@ -424,6 +424,20 @@ export interface PremiumStateResponse {
|
|
|
424
424
|
plan: PremiumPlanInfo | undefined;
|
|
425
425
|
/** null when no premium payment method preference */
|
|
426
426
|
savedPaymentMethod: PremiumSavedPaymentMethod | undefined;
|
|
427
|
+
/** auto-renew capabilities for the current subscription */
|
|
428
|
+
renewal: PremiumRenewalOptions | undefined;
|
|
429
|
+
}
|
|
430
|
+
export interface PremiumRenewalOptions {
|
|
431
|
+
/** true when /premium/auto-renew can be enabled without changing method first */
|
|
432
|
+
canEnable: boolean;
|
|
433
|
+
/** BALANCE|SAVED_CARD|YOOKASSA methods selectable for this subscription */
|
|
434
|
+
availableMethods: string[];
|
|
435
|
+
/** current preferred method, empty when not selected */
|
|
436
|
+
currentMethod: string;
|
|
437
|
+
/** empty | NO_ACTIVE_PREMIUM | NO_RENEWAL_METHOD_SELECTED */
|
|
438
|
+
reason: string;
|
|
439
|
+
/** e.g. YOOKASSA requires purchase flow with autoRenew=true */
|
|
440
|
+
setupRequiredMethods: string[];
|
|
427
441
|
}
|
|
428
442
|
export interface PremiumSavedPaymentMethod {
|
|
429
443
|
/** BALANCE | YOOKASSA | SAVED_CARD */
|
package/gen/users.ts
CHANGED
|
@@ -487,7 +487,24 @@ export interface PremiumStateResponse {
|
|
|
487
487
|
| PremiumPlanInfo
|
|
488
488
|
| undefined;
|
|
489
489
|
/** null when no premium payment method preference */
|
|
490
|
-
savedPaymentMethod:
|
|
490
|
+
savedPaymentMethod:
|
|
491
|
+
| PremiumSavedPaymentMethod
|
|
492
|
+
| undefined;
|
|
493
|
+
/** auto-renew capabilities for the current subscription */
|
|
494
|
+
renewal: PremiumRenewalOptions | undefined;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export interface PremiumRenewalOptions {
|
|
498
|
+
/** true when /premium/auto-renew can be enabled without changing method first */
|
|
499
|
+
canEnable: boolean;
|
|
500
|
+
/** BALANCE|SAVED_CARD|YOOKASSA methods selectable for this subscription */
|
|
501
|
+
availableMethods: string[];
|
|
502
|
+
/** current preferred method, empty when not selected */
|
|
503
|
+
currentMethod: string;
|
|
504
|
+
/** empty | NO_ACTIVE_PREMIUM | NO_RENEWAL_METHOD_SELECTED */
|
|
505
|
+
reason: string;
|
|
506
|
+
/** e.g. YOOKASSA requires purchase flow with autoRenew=true */
|
|
507
|
+
setupRequiredMethods: string[];
|
|
491
508
|
}
|
|
492
509
|
|
|
493
510
|
export interface PremiumSavedPaymentMethod {
|
package/package.json
CHANGED
package/proto/payments.proto
CHANGED
|
@@ -480,11 +480,12 @@ message RefundPremiumResponse {
|
|
|
480
480
|
bool subscription_revoked = 3; // true when rollback put expiresAt <= now
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
message GetMyPremiumPaymentsRequest {
|
|
484
|
-
string user_id = 1;
|
|
485
|
-
int32 page = 2;
|
|
486
|
-
int32 limit = 3;
|
|
487
|
-
|
|
483
|
+
message GetMyPremiumPaymentsRequest {
|
|
484
|
+
string user_id = 1;
|
|
485
|
+
int32 page = 2;
|
|
486
|
+
int32 limit = 3;
|
|
487
|
+
string refundable = 4; // optional: "true"|"false"
|
|
488
|
+
}
|
|
488
489
|
|
|
489
490
|
message GetPremiumPaymentRequest {
|
|
490
491
|
string user_id = 1;
|
package/proto/users.proto
CHANGED
|
@@ -552,11 +552,20 @@ message PremiumStateResponse {
|
|
|
552
552
|
bool auto_renew = 6;
|
|
553
553
|
PremiumPlanInfo plan = 8; // null when not active
|
|
554
554
|
PremiumSavedPaymentMethod saved_payment_method = 9; // null when no premium payment method preference
|
|
555
|
+
PremiumRenewalOptions renewal = 10; // auto-renew capabilities for the current subscription
|
|
555
556
|
|
|
556
557
|
reserved 7;
|
|
557
558
|
reserved "has_saved_payment_method";
|
|
558
559
|
}
|
|
559
560
|
|
|
561
|
+
message PremiumRenewalOptions {
|
|
562
|
+
bool can_enable = 1; // true when /premium/auto-renew can be enabled without changing method first
|
|
563
|
+
repeated string available_methods = 2; // BALANCE|SAVED_CARD|YOOKASSA methods selectable for this subscription
|
|
564
|
+
string current_method = 3; // current preferred method, empty when not selected
|
|
565
|
+
string reason = 4; // empty | NO_ACTIVE_PREMIUM | NO_RENEWAL_METHOD_SELECTED
|
|
566
|
+
repeated string setup_required_methods = 5; // e.g. YOOKASSA requires purchase flow with autoRenew=true
|
|
567
|
+
}
|
|
568
|
+
|
|
560
569
|
message PremiumSavedPaymentMethod {
|
|
561
570
|
string method = 1; // BALANCE | YOOKASSA | SAVED_CARD
|
|
562
571
|
PremiumSavedPaymentCard card = 2; // null unless method=SAVED_CARD
|