@aepstore-dev/contracts 1.55.0 → 1.58.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/activity.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.0
5
+ // protoc v7.35.1
6
6
  // source: activity.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.ACTIVITY_SERVICE_NAME = exports.ACTIVITY_V1_PACKAGE_NAME = exports.ReportStatus = exports.ReportType = exports.protobufPackage = void 0;
package/gen/activity.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.0
4
+ // protoc v7.35.1
5
5
  // source: activity.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/auth.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.0
5
+ // protoc v7.35.1
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.TwoFactorType = exports.protobufPackage = void 0;
package/gen/auth.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.0
4
+ // protoc v7.35.1
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/mail.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.0
5
+ // protoc v7.35.1
6
6
  // source: mail.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.MAIL_SERVICE_NAME = exports.MAIL_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
package/gen/mail.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.0
4
+ // protoc v7.35.1
5
5
  // source: mail.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/payments.d.ts CHANGED
@@ -406,15 +406,19 @@ export interface PurchasePremiumRequest {
406
406
  userId: string;
407
407
  /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
408
408
  period: string;
409
- /** BALANCE | YOOKASSA */
409
+ /** BALANCE | YOOKASSA | SAVED_CARD (empty = smart default) */
410
410
  paymentMethod: string;
411
411
  /** YooKassa only */
412
412
  returnUrl: string;
413
413
  /**
414
414
  * Save the YooKassa payment_method for future auto-renewals. Ignored for
415
- * BALANCE. Default true the UI surfaces a checkbox.
415
+ * BALANCE. Kept for backwards compatibility; auto_renew=true implies save.
416
416
  */
417
417
  savePaymentMethod: boolean;
418
+ /** default false; requires off-session-capable method */
419
+ autoRenew: boolean;
420
+ /** optional for SAVED_CARD; empty = default card */
421
+ savedCardId: string;
418
422
  }
419
423
  export interface PurchasePremiumResponse {
420
424
  /** PremiumPayment.id */
@@ -433,6 +437,20 @@ export interface RunPremiumRenewalsResponse {
433
437
  succeeded: number;
434
438
  failed: number;
435
439
  }
440
+ export interface SetPremiumPaymentMethodRequest {
441
+ userId: string;
442
+ /** BALANCE | YOOKASSA | SAVED_CARD */
443
+ method: string;
444
+ /** optional for SAVED_CARD; empty = default card */
445
+ savedCardId: string;
446
+ }
447
+ export interface PremiumPaymentMethodResponse {
448
+ /** BALANCE | YOOKASSA | SAVED_CARD */
449
+ method: string;
450
+ /** empty unless SAVED_CARD */
451
+ savedCardId: string;
452
+ autoRenew: boolean;
453
+ }
436
454
  export interface PremiumPaymentRow {
437
455
  id: string;
438
456
  userId: string;
@@ -561,6 +579,7 @@ export interface PaymentsServiceClient {
561
579
  /** ----- premium ----- */
562
580
  getPremiumPlans(request: GetPremiumPlansRequest): Observable<PremiumPlansResponse>;
563
581
  purchasePremium(request: PurchasePremiumRequest): Observable<PurchasePremiumResponse>;
582
+ setPremiumPaymentMethod(request: SetPremiumPaymentMethodRequest): Observable<PremiumPaymentMethodResponse>;
564
583
  /**
565
584
  * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
566
585
  * card purchases, rolls back the subscription's expiresAt by the period.
@@ -623,6 +642,7 @@ export interface PaymentsServiceController {
623
642
  /** ----- premium ----- */
624
643
  getPremiumPlans(request: GetPremiumPlansRequest): Promise<PremiumPlansResponse> | Observable<PremiumPlansResponse> | PremiumPlansResponse;
625
644
  purchasePremium(request: PurchasePremiumRequest): Promise<PurchasePremiumResponse> | Observable<PurchasePremiumResponse> | PurchasePremiumResponse;
645
+ setPremiumPaymentMethod(request: SetPremiumPaymentMethodRequest): Promise<PremiumPaymentMethodResponse> | Observable<PremiumPaymentMethodResponse> | PremiumPaymentMethodResponse;
626
646
  /**
627
647
  * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
628
648
  * card purchases, rolls back the subscription's expiresAt by the period.
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.0
5
+ // protoc v7.35.1
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;
@@ -28,6 +28,7 @@ function PaymentsServiceControllerMethods() {
28
28
  "handlePaymentEvent",
29
29
  "getPremiumPlans",
30
30
  "purchasePremium",
31
+ "setPremiumPaymentMethod",
31
32
  "refundPremium",
32
33
  "getMyPremiumPayments",
33
34
  "runPremiumRenewals",
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.0
4
+ // protoc v7.35.1
5
5
  // source: payments.proto
6
6
 
7
7
  /* eslint-disable */
@@ -458,15 +458,19 @@ export interface PurchasePremiumRequest {
458
458
  userId: string;
459
459
  /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
460
460
  period: string;
461
- /** BALANCE | YOOKASSA */
461
+ /** BALANCE | YOOKASSA | SAVED_CARD (empty = smart default) */
462
462
  paymentMethod: string;
463
463
  /** YooKassa only */
464
464
  returnUrl: string;
465
465
  /**
466
466
  * Save the YooKassa payment_method for future auto-renewals. Ignored for
467
- * BALANCE. Default true the UI surfaces a checkbox.
467
+ * BALANCE. Kept for backwards compatibility; auto_renew=true implies save.
468
468
  */
469
469
  savePaymentMethod: boolean;
470
+ /** default false; requires off-session-capable method */
471
+ autoRenew: boolean;
472
+ /** optional for SAVED_CARD; empty = default card */
473
+ savedCardId: string;
470
474
  }
471
475
 
472
476
  export interface PurchasePremiumResponse {
@@ -489,6 +493,22 @@ export interface RunPremiumRenewalsResponse {
489
493
  failed: number;
490
494
  }
491
495
 
496
+ export interface SetPremiumPaymentMethodRequest {
497
+ userId: string;
498
+ /** BALANCE | YOOKASSA | SAVED_CARD */
499
+ method: string;
500
+ /** optional for SAVED_CARD; empty = default card */
501
+ savedCardId: string;
502
+ }
503
+
504
+ export interface PremiumPaymentMethodResponse {
505
+ /** BALANCE | YOOKASSA | SAVED_CARD */
506
+ method: string;
507
+ /** empty unless SAVED_CARD */
508
+ savedCardId: string;
509
+ autoRenew: boolean;
510
+ }
511
+
492
512
  export interface PremiumPaymentRow {
493
513
  id: string;
494
514
  userId: string;
@@ -654,6 +674,8 @@ export interface PaymentsServiceClient {
654
674
 
655
675
  purchasePremium(request: PurchasePremiumRequest): Observable<PurchasePremiumResponse>;
656
676
 
677
+ setPremiumPaymentMethod(request: SetPremiumPaymentMethodRequest): Observable<PremiumPaymentMethodResponse>;
678
+
657
679
  /**
658
680
  * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
659
681
  * card purchases, rolls back the subscription's expiresAt by the period.
@@ -773,6 +795,10 @@ export interface PaymentsServiceController {
773
795
  request: PurchasePremiumRequest,
774
796
  ): Promise<PurchasePremiumResponse> | Observable<PurchasePremiumResponse> | PurchasePremiumResponse;
775
797
 
798
+ setPremiumPaymentMethod(
799
+ request: SetPremiumPaymentMethodRequest,
800
+ ): Promise<PremiumPaymentMethodResponse> | Observable<PremiumPaymentMethodResponse> | PremiumPaymentMethodResponse;
801
+
776
802
  /**
777
803
  * 7-day refund window from completedAt. Reverses ledger, calls YooKassa for
778
804
  * card purchases, rolls back the subscription's expiresAt by the period.
@@ -872,6 +898,7 @@ export function PaymentsServiceControllerMethods() {
872
898
  "handlePaymentEvent",
873
899
  "getPremiumPlans",
874
900
  "purchasePremium",
901
+ "setPremiumPaymentMethod",
875
902
  "refundPremium",
876
903
  "getMyPremiumPayments",
877
904
  "runPremiumRenewals",
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.0
5
+ // protoc v7.35.1
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.0
4
+ // protoc v7.35.1
5
5
  // source: products.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/support.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.0
5
+ // protoc v7.35.1
6
6
  // source: support.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.SUPPORT_SERVICE_NAME = exports.SUPPORT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
package/gen/support.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.0
4
+ // protoc v7.35.1
5
5
  // source: support.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/taxonomy.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.0
5
+ // protoc v7.35.1
6
6
  // source: taxonomy.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.TAXONOMY_SERVICE_NAME = exports.TAXONOMY_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
package/gen/taxonomy.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.0
4
+ // protoc v7.35.1
5
5
  // source: taxonomy.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/upload.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.0
5
+ // protoc v7.35.1
6
6
  // source: upload.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.UPLOAD_SERVICE_NAME = exports.UPLOAD_V1_PACKAGE_NAME = exports.UploadKind = exports.protobufPackage = void 0;
package/gen/upload.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.0
4
+ // protoc v7.35.1
5
5
  // source: upload.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/users.d.ts CHANGED
@@ -306,6 +306,8 @@ export interface PremiumStateResponse {
306
306
  expiresAt: string;
307
307
  autoRenew: boolean;
308
308
  hasSavedPaymentMethod: boolean;
309
+ /** null when not active */
310
+ plan: PremiumPlanInfo | undefined;
309
311
  }
310
312
  export interface SetPremiumAutoRenewRequest {
311
313
  userId: string;
@@ -322,6 +324,8 @@ export interface ActivatePremiumRequest {
322
324
  paymentMethodId: string;
323
325
  /** false = first purchase; true = cron-driven renewal */
324
326
  isRenewal: boolean;
327
+ /** set by the purchase flow; renewals keep true */
328
+ autoRenew: boolean;
325
329
  }
326
330
  export interface IsPremiumActiveRequest {
327
331
  userId: string;
@@ -505,6 +509,21 @@ export interface CollectUserExportDataResponse {
505
509
  export interface GetAccountSettingsRequest {
506
510
  userId: string;
507
511
  }
512
+ /**
513
+ * Current premium plan the user holds. Mirrors a PremiumPlan catalog entry.
514
+ * Absent (null) when the user has no active subscription.
515
+ */
516
+ export interface PremiumPlanInfo {
517
+ /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
518
+ period: string;
519
+ months: number;
520
+ /** total for the period, Decimal-as-string */
521
+ price: string;
522
+ /** ≈ X ₽/month */
523
+ monthlyPrice: string;
524
+ discountPercent: string;
525
+ currency: string;
526
+ }
508
527
  export interface AccountSettingsResponse {
509
528
  /** Identity */
510
529
  id: string;
@@ -534,11 +553,7 @@ export interface AccountSettingsResponse {
534
553
  /** Payout defaults */
535
554
  payoutMethod: string;
536
555
  payoutDetails: string;
537
- /** Premium snapshot */
538
556
  premiumIsActive: boolean;
539
- premiumStatus: string;
540
- premiumExpiresAt: string;
541
- premiumAutoRenew: boolean;
542
557
  /** Soft-delete state */
543
558
  deletedAt: string;
544
559
  scheduledForHardDelete: string;
package/gen/users.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.0
5
+ // protoc v7.35.1
6
6
  // source: users.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.PremiumPeriod = exports.UserFieldsType = exports.protobufPackage = void 0;
package/gen/users.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.0
4
+ // protoc v7.35.1
5
5
  // source: users.proto
6
6
 
7
7
  /* eslint-disable */
@@ -353,6 +353,8 @@ export interface PremiumStateResponse {
353
353
  expiresAt: string;
354
354
  autoRenew: boolean;
355
355
  hasSavedPaymentMethod: boolean;
356
+ /** null when not active */
357
+ plan: PremiumPlanInfo | undefined;
356
358
  }
357
359
 
358
360
  export interface SetPremiumAutoRenewRequest {
@@ -371,6 +373,8 @@ export interface ActivatePremiumRequest {
371
373
  paymentMethodId: string;
372
374
  /** false = first purchase; true = cron-driven renewal */
373
375
  isRenewal: boolean;
376
+ /** set by the purchase flow; renewals keep true */
377
+ autoRenew: boolean;
374
378
  }
375
379
 
376
380
  export interface IsPremiumActiveRequest {
@@ -590,6 +594,22 @@ export interface GetAccountSettingsRequest {
590
594
  userId: string;
591
595
  }
592
596
 
597
+ /**
598
+ * Current premium plan the user holds. Mirrors a PremiumPlan catalog entry.
599
+ * Absent (null) when the user has no active subscription.
600
+ */
601
+ export interface PremiumPlanInfo {
602
+ /** MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12 */
603
+ period: string;
604
+ months: number;
605
+ /** total for the period, Decimal-as-string */
606
+ price: string;
607
+ /** ≈ X ₽/month */
608
+ monthlyPrice: string;
609
+ discountPercent: string;
610
+ currency: string;
611
+ }
612
+
593
613
  export interface AccountSettingsResponse {
594
614
  /** Identity */
595
615
  id: string;
@@ -619,11 +639,7 @@ export interface AccountSettingsResponse {
619
639
  /** Payout defaults */
620
640
  payoutMethod: string;
621
641
  payoutDetails: string;
622
- /** Premium snapshot */
623
642
  premiumIsActive: boolean;
624
- premiumStatus: string;
625
- premiumExpiresAt: string;
626
- premiumAutoRenew: boolean;
627
643
  /** Soft-delete state */
628
644
  deletedAt: string;
629
645
  scheduledForHardDelete: string;
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "@aepstore-dev/contracts",
3
- "version": "1.55.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
- }
1
+ {
2
+ "name": "@aepstore-dev/contracts",
3
+ "version": "1.58.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
+ }