@aepstore-dev/contracts 1.50.0 → 1.52.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/auth.d.ts CHANGED
@@ -66,19 +66,12 @@ export interface AuthUser {
66
66
  avatarUrl: string;
67
67
  bannerUrl: string;
68
68
  roles: string[];
69
- /** primary role (roles[0]) */
70
- role: string;
71
- isVerified: boolean;
72
- twoFactorType: TwoFactorType;
73
- twoFactorEnabled: boolean;
74
- /** Decimal as string (D7) */
75
- balance: string;
76
69
  }
77
70
  /**
78
71
  * Unified result for login/register/createCode/verifyCode/refresh. Which fields
79
72
  * are populated depends on the flow:
80
73
  * - fully authenticated → access_token + refresh_token + expires_in + user
81
- * - 2FA required / pending confirm → message + requires_2fa + two_factor_type + user (no tokens)
74
+ * - 2FA required / pending confirm → message + two_factor_required + two_factor_type + user (no tokens)
82
75
  * - totp_generate → secret + otpauth + qr (+ user)
83
76
  * - totp_activate → backup_codes (+ tokens/user)
84
77
  */
@@ -88,7 +81,15 @@ export interface AuthResult {
88
81
  expiresIn: number;
89
82
  user: AuthUser | undefined;
90
83
  message: string;
91
- requires2fa: boolean;
84
+ /**
85
+ * Renamed from `requires_2fa` in 1.52.0: the digit-after-underscore broke
86
+ * the grpc proto-loader's camelCase pass (`_2` isn't `_<letter>`), so the
87
+ * wire key stayed snake_case and never matched the camelCase handler output
88
+ * → always serialised false. `two_factor_required` camelCases cleanly to
89
+ * `twoFactorRequired` on every layer. Field number 6 is unchanged (wire-
90
+ * compatible).
91
+ */
92
+ twoFactorRequired: boolean;
92
93
  twoFactorType: TwoFactorType;
93
94
  /** TOTP setup extras */
94
95
  secret: string;
package/gen/auth.ts CHANGED
@@ -85,20 +85,13 @@ export interface AuthUser {
85
85
  avatarUrl: string;
86
86
  bannerUrl: string;
87
87
  roles: string[];
88
- /** primary role (roles[0]) */
89
- role: string;
90
- isVerified: boolean;
91
- twoFactorType: TwoFactorType;
92
- twoFactorEnabled: boolean;
93
- /** Decimal as string (D7) */
94
- balance: string;
95
88
  }
96
89
 
97
90
  /**
98
91
  * Unified result for login/register/createCode/verifyCode/refresh. Which fields
99
92
  * are populated depends on the flow:
100
93
  * - fully authenticated → access_token + refresh_token + expires_in + user
101
- * - 2FA required / pending confirm → message + requires_2fa + two_factor_type + user (no tokens)
94
+ * - 2FA required / pending confirm → message + two_factor_required + two_factor_type + user (no tokens)
102
95
  * - totp_generate → secret + otpauth + qr (+ user)
103
96
  * - totp_activate → backup_codes (+ tokens/user)
104
97
  */
@@ -108,7 +101,15 @@ export interface AuthResult {
108
101
  expiresIn: number;
109
102
  user: AuthUser | undefined;
110
103
  message: string;
111
- requires2fa: boolean;
104
+ /**
105
+ * Renamed from `requires_2fa` in 1.52.0: the digit-after-underscore broke
106
+ * the grpc proto-loader's camelCase pass (`_2` isn't `_<letter>`), so the
107
+ * wire key stayed snake_case and never matched the camelCase handler output
108
+ * → always serialised false. `two_factor_required` camelCases cleanly to
109
+ * `twoFactorRequired` on every layer. Field number 6 is unchanged (wire-
110
+ * compatible).
111
+ */
112
+ twoFactorRequired: boolean;
112
113
  twoFactorType: TwoFactorType;
113
114
  /** TOTP setup extras */
114
115
  secret: string;
package/gen/users.d.ts CHANGED
@@ -26,8 +26,6 @@ export interface User {
26
26
  username: string;
27
27
  avatarUrl: string;
28
28
  roles: string[];
29
- /** primary role for backwards compat */
30
- role: string;
31
29
  /** ISO 8601 */
32
30
  createdAt: string;
33
31
  updatedAt: string;
package/gen/users.ts CHANGED
@@ -39,8 +39,6 @@ export interface User {
39
39
  username: string;
40
40
  avatarUrl: string;
41
41
  roles: string[];
42
- /** primary role for backwards compat */
43
- role: string;
44
42
  /** ISO 8601 */
45
43
  createdAt: string;
46
44
  updatedAt: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "description": "Protobuf definitions for aepstore microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -107,17 +107,17 @@ message AuthUser {
107
107
  string avatar_url = 4;
108
108
  string banner_url = 5;
109
109
  repeated string roles = 6;
110
- string role = 7; // primary role (roles[0])
111
- bool is_verified = 8;
112
- TwoFactorType two_factor_type = 9;
113
- bool two_factor_enabled = 10;
114
- string balance = 11; // Decimal as string (D7)
110
+ // Reserved: 7=role, 8=is_verified, 9=two_factor_type, 10=two_factor_enabled,
111
+ // 11=balance. Dropped in contracts 1.51.0 — clients read 2FA flags from
112
+ // AuthResult / /account/settings, balance from /payments/wallet.
113
+ reserved 7, 8, 9, 10, 11;
114
+ reserved "role", "is_verified", "two_factor_type", "two_factor_enabled", "balance";
115
115
  }
116
116
 
117
117
  // Unified result for login/register/createCode/verifyCode/refresh. Which fields
118
118
  // are populated depends on the flow:
119
119
  // - fully authenticated → access_token + refresh_token + expires_in + user
120
- // - 2FA required / pending confirm → message + requires_2fa + two_factor_type + user (no tokens)
120
+ // - 2FA required / pending confirm → message + two_factor_required + two_factor_type + user (no tokens)
121
121
  // - totp_generate → secret + otpauth + qr (+ user)
122
122
  // - totp_activate → backup_codes (+ tokens/user)
123
123
  message AuthResult {
@@ -127,7 +127,13 @@ message AuthResult {
127
127
  AuthUser user = 4;
128
128
 
129
129
  string message = 5;
130
- bool requires_2fa = 6;
130
+ // Renamed from `requires_2fa` in 1.52.0: the digit-after-underscore broke
131
+ // the grpc proto-loader's camelCase pass (`_2` isn't `_<letter>`), so the
132
+ // wire key stayed snake_case and never matched the camelCase handler output
133
+ // → always serialised false. `two_factor_required` camelCases cleanly to
134
+ // `twoFactorRequired` on every layer. Field number 6 is unchanged (wire-
135
+ // compatible).
136
+ bool two_factor_required = 6;
131
137
  TwoFactorType two_factor_type = 7;
132
138
 
133
139
  // TOTP setup extras
package/proto/users.proto CHANGED
@@ -77,7 +77,8 @@ message User {
77
77
  string username = 3;
78
78
  string avatar_url = 4;
79
79
  repeated string roles = 5;
80
- string role = 6; // primary role for backwards compat
80
+ reserved 6;
81
+ reserved "role";
81
82
  string created_at = 7; // ISO 8601
82
83
  string updated_at = 8;
83
84
  bool is_banned = 9;