@aepstore-dev/contracts 1.103.0 → 1.104.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 +90 -0
- package/gen/auth.js +5 -0
- package/gen/auth.ts +135 -0
- package/package.json +35 -35
- package/proto/activity.proto +200 -200
- package/proto/auth.proto +243 -152
- package/proto/mail.proto +54 -54
- package/proto/payments.proto +496 -496
- package/proto/products.proto +382 -382
- package/proto/support.proto +121 -121
- package/proto/taxonomy.proto +105 -105
- package/proto/upload.proto +171 -171
- package/proto/users.proto +600 -600
package/proto/users.proto
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package users.v1;
|
|
4
|
-
|
|
5
|
-
service UsersService {
|
|
6
|
-
rpc GetPublicProfile(GetPublicProfileRequest) returns (PublicProfileResponse);
|
|
7
|
-
rpc UpdateProfile(UpdateProfileRequest) returns (PublicProfileResponse);
|
|
8
|
-
rpc UpdateUser(UpdateUserRequest) returns (UserResponse);
|
|
9
|
-
rpc CheckAvailability(CheckAvailabilityRequest) returns (CheckAvailabilityResponse);
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package users.v1;
|
|
4
|
+
|
|
5
|
+
service UsersService {
|
|
6
|
+
rpc GetPublicProfile(GetPublicProfileRequest) returns (PublicProfileResponse);
|
|
7
|
+
rpc UpdateProfile(UpdateProfileRequest) returns (PublicProfileResponse);
|
|
8
|
+
rpc UpdateUser(UpdateUserRequest) returns (UserResponse);
|
|
9
|
+
rpc CheckAvailability(CheckAvailabilityRequest) returns (CheckAvailabilityResponse);
|
|
10
10
|
rpc UpdateUserRole(UpdateUserRoleRequest) returns (UserResponse);
|
|
11
11
|
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse);
|
|
12
12
|
rpc GetAdminUserOverview(GetAdminUserOverviewRequest) returns (AdminUserOverviewResponse);
|
|
@@ -14,78 +14,78 @@ service UsersService {
|
|
|
14
14
|
rpc GetActiveDevices(GetActiveDevicesRequest) returns (GetActiveDevicesResponse);
|
|
15
15
|
rpc ManageDevices(ManageDevicesRequest) returns (ManageDevicesResponse);
|
|
16
16
|
rpc GetUserFields(GetUserFieldsRequest) returns (GetUserFieldsResponse);
|
|
17
|
-
|
|
18
|
-
rpc CreateSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
19
|
-
rpc DeleteSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
20
|
-
|
|
21
|
-
rpc BanUser(BanUserRequest) returns (UserResponse);
|
|
22
|
-
rpc UnbanUser(UnbanUserRequest) returns (UserResponse);
|
|
23
|
-
|
|
24
|
-
// Premium (paid). State lives in users-service; payments-service handles
|
|
25
|
-
// money and calls ActivatePremium (internal) on completion.
|
|
26
|
-
rpc GetMyPremium(GetMyPremiumRequest) returns (PremiumStateResponse);
|
|
27
|
-
rpc SetPremiumAutoRenew(SetPremiumAutoRenewRequest) returns (PremiumStateResponse);
|
|
28
|
-
// Internal — InternalServiceGuard. Called by payments-service after a
|
|
29
|
-
// successful premium payment (balance or YooKassa webhook).
|
|
30
|
-
rpc ActivatePremium(ActivatePremiumRequest) returns (PremiumStateResponse);
|
|
31
|
-
// Internal — fast lookup for the commission engine in payments-service.
|
|
32
|
-
rpc IsPremiumActive(IsPremiumActiveRequest) returns (IsPremiumActiveResponse);
|
|
33
|
-
|
|
34
|
-
// Avatar borders (catalog + admin CRUD). Catalog read is public; mutations
|
|
35
|
-
// are admin only (gateway enforces with RolesGuard).
|
|
36
|
-
rpc ListAvatarBorders(ListAvatarBordersRequest) returns (ListAvatarBordersResponse);
|
|
37
|
-
rpc UpsertAvatarBorder(UpsertAvatarBorderRequest) returns (AvatarBorder);
|
|
38
|
-
rpc DeleteAvatarBorder(DeleteAvatarBorderRequest) returns (DeleteAvatarBorderResponse);
|
|
39
|
-
|
|
40
|
-
// Account settings — bundled write surface for the UI.
|
|
41
|
-
rpc UpdatePrivacy(UpdatePrivacyRequest) returns (PublicProfileResponse);
|
|
42
|
-
rpc UpdateEmailPrefs(UpdateEmailPrefsRequest) returns (UpdateEmailPrefsResponse);
|
|
43
|
-
rpc UpdateLocale(UpdateLocaleRequest) returns (UpdateLocaleResponse);
|
|
44
|
-
|
|
45
|
-
// Soft-delete + restore. Internal AuthService also queries the soft-delete
|
|
46
|
-
// state on login (rejects if deletedAt set).
|
|
47
|
-
rpc SoftDeleteAccount(SoftDeleteAccountRequest) returns (SoftDeleteAccountResponse);
|
|
48
|
-
rpc RestoreAccount(RestoreAccountRequest) returns (UserResponse);
|
|
49
|
-
rpc HardDeletePending(HardDeletePendingRequest) returns (HardDeletePendingResponse); // tasks-service cron
|
|
50
|
-
|
|
51
|
-
// Blocks
|
|
52
|
-
rpc BlockUser(BlockUserRequest) returns (BlockUserResponse);
|
|
53
|
-
rpc UnblockUser(BlockUserRequest) returns (BlockUserResponse);
|
|
54
|
-
rpc ListBlockedUsers(ListBlockedUsersRequest) returns (ListBlockedUsersResponse);
|
|
55
|
-
rpc IsBlocked(IsBlockedRequest) returns (IsBlockedResponse); // internal lookup
|
|
56
|
-
|
|
57
|
-
// Data export
|
|
58
|
-
rpc RequestDataExport(RequestDataExportRequest) returns (DataExportRequestRow);
|
|
59
|
-
rpc ListDataExports(ListDataExportsRequest) returns (ListDataExportsResponse);
|
|
60
|
-
rpc PickPendingDataExport(PickPendingDataExportRequest) returns (DataExportRequestRow); // tasks-service
|
|
61
|
-
rpc CompleteDataExport(CompleteDataExportRequest) returns (DataExportRequestRow); // tasks-service
|
|
62
|
-
rpc CollectUserExportData(CollectUserExportDataRequest) returns (CollectUserExportDataResponse); // tasks-service
|
|
63
|
-
|
|
64
|
-
// Unified read for the settings page
|
|
65
|
-
rpc GetAccountSettings(GetAccountSettingsRequest) returns (AccountSettingsResponse);
|
|
66
|
-
|
|
67
|
-
// Password — separate from generic createCode/verifyCode reset flow.
|
|
68
|
-
rpc ChangePassword(ChangePasswordRequest) returns (Ok);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
message Ok { bool ok = 1; }
|
|
72
|
-
|
|
73
|
-
// =================================================================
|
|
74
|
-
// Common types
|
|
75
|
-
// =================================================================
|
|
76
|
-
|
|
17
|
+
|
|
18
|
+
rpc CreateSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
19
|
+
rpc DeleteSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
20
|
+
|
|
21
|
+
rpc BanUser(BanUserRequest) returns (UserResponse);
|
|
22
|
+
rpc UnbanUser(UnbanUserRequest) returns (UserResponse);
|
|
23
|
+
|
|
24
|
+
// Premium (paid). State lives in users-service; payments-service handles
|
|
25
|
+
// money and calls ActivatePremium (internal) on completion.
|
|
26
|
+
rpc GetMyPremium(GetMyPremiumRequest) returns (PremiumStateResponse);
|
|
27
|
+
rpc SetPremiumAutoRenew(SetPremiumAutoRenewRequest) returns (PremiumStateResponse);
|
|
28
|
+
// Internal — InternalServiceGuard. Called by payments-service after a
|
|
29
|
+
// successful premium payment (balance or YooKassa webhook).
|
|
30
|
+
rpc ActivatePremium(ActivatePremiumRequest) returns (PremiumStateResponse);
|
|
31
|
+
// Internal — fast lookup for the commission engine in payments-service.
|
|
32
|
+
rpc IsPremiumActive(IsPremiumActiveRequest) returns (IsPremiumActiveResponse);
|
|
33
|
+
|
|
34
|
+
// Avatar borders (catalog + admin CRUD). Catalog read is public; mutations
|
|
35
|
+
// are admin only (gateway enforces with RolesGuard).
|
|
36
|
+
rpc ListAvatarBorders(ListAvatarBordersRequest) returns (ListAvatarBordersResponse);
|
|
37
|
+
rpc UpsertAvatarBorder(UpsertAvatarBorderRequest) returns (AvatarBorder);
|
|
38
|
+
rpc DeleteAvatarBorder(DeleteAvatarBorderRequest) returns (DeleteAvatarBorderResponse);
|
|
39
|
+
|
|
40
|
+
// Account settings — bundled write surface for the UI.
|
|
41
|
+
rpc UpdatePrivacy(UpdatePrivacyRequest) returns (PublicProfileResponse);
|
|
42
|
+
rpc UpdateEmailPrefs(UpdateEmailPrefsRequest) returns (UpdateEmailPrefsResponse);
|
|
43
|
+
rpc UpdateLocale(UpdateLocaleRequest) returns (UpdateLocaleResponse);
|
|
44
|
+
|
|
45
|
+
// Soft-delete + restore. Internal AuthService also queries the soft-delete
|
|
46
|
+
// state on login (rejects if deletedAt set).
|
|
47
|
+
rpc SoftDeleteAccount(SoftDeleteAccountRequest) returns (SoftDeleteAccountResponse);
|
|
48
|
+
rpc RestoreAccount(RestoreAccountRequest) returns (UserResponse);
|
|
49
|
+
rpc HardDeletePending(HardDeletePendingRequest) returns (HardDeletePendingResponse); // tasks-service cron
|
|
50
|
+
|
|
51
|
+
// Blocks
|
|
52
|
+
rpc BlockUser(BlockUserRequest) returns (BlockUserResponse);
|
|
53
|
+
rpc UnblockUser(BlockUserRequest) returns (BlockUserResponse);
|
|
54
|
+
rpc ListBlockedUsers(ListBlockedUsersRequest) returns (ListBlockedUsersResponse);
|
|
55
|
+
rpc IsBlocked(IsBlockedRequest) returns (IsBlockedResponse); // internal lookup
|
|
56
|
+
|
|
57
|
+
// Data export
|
|
58
|
+
rpc RequestDataExport(RequestDataExportRequest) returns (DataExportRequestRow);
|
|
59
|
+
rpc ListDataExports(ListDataExportsRequest) returns (ListDataExportsResponse);
|
|
60
|
+
rpc PickPendingDataExport(PickPendingDataExportRequest) returns (DataExportRequestRow); // tasks-service
|
|
61
|
+
rpc CompleteDataExport(CompleteDataExportRequest) returns (DataExportRequestRow); // tasks-service
|
|
62
|
+
rpc CollectUserExportData(CollectUserExportDataRequest) returns (CollectUserExportDataResponse); // tasks-service
|
|
63
|
+
|
|
64
|
+
// Unified read for the settings page
|
|
65
|
+
rpc GetAccountSettings(GetAccountSettingsRequest) returns (AccountSettingsResponse);
|
|
66
|
+
|
|
67
|
+
// Password — separate from generic createCode/verifyCode reset flow.
|
|
68
|
+
rpc ChangePassword(ChangePasswordRequest) returns (Ok);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message Ok { bool ok = 1; }
|
|
72
|
+
|
|
73
|
+
// =================================================================
|
|
74
|
+
// Common types
|
|
75
|
+
// =================================================================
|
|
76
|
+
|
|
77
77
|
message User {
|
|
78
78
|
string id = 1;
|
|
79
79
|
string email = 2;
|
|
80
80
|
string username = 3;
|
|
81
|
-
string avatar_url = 4;
|
|
82
|
-
repeated string roles = 5;
|
|
83
|
-
reserved 6;
|
|
84
|
-
reserved "role";
|
|
85
|
-
string created_at = 7; // ISO 8601
|
|
86
|
-
string updated_at = 8;
|
|
87
|
-
bool is_banned = 9;
|
|
88
|
-
string banned_until = 10; // ISO 8601, empty = permanent/none
|
|
81
|
+
string avatar_url = 4;
|
|
82
|
+
repeated string roles = 5;
|
|
83
|
+
reserved 6;
|
|
84
|
+
reserved "role";
|
|
85
|
+
string created_at = 7; // ISO 8601
|
|
86
|
+
string updated_at = 8;
|
|
87
|
+
bool is_banned = 9;
|
|
88
|
+
string banned_until = 10; // ISO 8601, empty = permanent/none
|
|
89
89
|
string ban_reason = 11;
|
|
90
90
|
string full_name = 12;
|
|
91
91
|
string avatar_border = 13;
|
|
@@ -93,92 +93,92 @@ message User {
|
|
|
93
93
|
int32 subscribers_count = 15;
|
|
94
94
|
int32 products_count = 16;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
message BanUserRequest {
|
|
98
|
-
string admin_id = 1;
|
|
99
|
-
string user_id = 2;
|
|
100
|
-
string reason = 3;
|
|
101
|
-
string until = 4; // ISO 8601; empty = permanent ban
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
message UnbanUserRequest {
|
|
105
|
-
string admin_id = 1;
|
|
106
|
-
string user_id = 2;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message Country {
|
|
110
|
-
string id = 1;
|
|
111
|
-
string code = 2;
|
|
112
|
-
string name = 3;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
message SocialMedia {
|
|
116
|
-
string id = 1;
|
|
117
|
-
string platform = 2;
|
|
118
|
-
string url = 3; // full link (built from username on read; empty for discord)
|
|
119
|
-
string username = 4; // handle for handle-based platforms; empty for website
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
message CreateSocialMedia {
|
|
123
|
-
string platform = 1;
|
|
124
|
-
string url = 2; // only for platform="website"
|
|
125
|
-
string username = 3; // handle for all other platforms
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
message ProductUser {
|
|
129
|
-
string id = 1;
|
|
130
|
-
string username = 2;
|
|
131
|
-
string avatar_url = 3;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
message Category {
|
|
135
|
-
string id = 1;
|
|
136
|
-
string name = 2;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
message Product {
|
|
140
|
-
string id = 1;
|
|
141
|
-
string name = 2;
|
|
142
|
-
string description = 3;
|
|
143
|
-
string price = 4; // Decimal as string (D7)
|
|
144
|
-
string created_at = 5;
|
|
145
|
-
string updated_at = 6;
|
|
146
|
-
// profile-card preview fields
|
|
147
|
-
string preview = 7;
|
|
148
|
-
string final_price = 8; // Decimal as string
|
|
149
|
-
string average_rating = 9; // number as string
|
|
150
|
-
string status = 10;
|
|
151
|
-
// Author of the product (same person as the profile owner, but echoed per
|
|
152
|
-
// product so cards can render the author independently).
|
|
153
|
-
ProductUser user = 11;
|
|
154
|
-
repeated Category categories = 12;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
message Video {
|
|
158
|
-
string id = 1;
|
|
159
|
-
string title = 2;
|
|
160
|
-
string description = 3;
|
|
161
|
-
string url = 4;
|
|
162
|
-
string created_at = 5;
|
|
163
|
-
string updated_at = 6;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
message ActiveDevice {
|
|
167
|
-
string id = 1;
|
|
168
|
-
string user_agent = 2;
|
|
169
|
-
string ip = 3;
|
|
170
|
-
string created_at = 4;
|
|
171
|
-
string last_used_at = 5;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
message ProfileStats {
|
|
175
|
-
int32 subscribers_count = 1;
|
|
176
|
-
int32 subscriptions_count = 2;
|
|
177
|
-
int32 products_count = 3;
|
|
178
|
-
int32 videos_count = 4;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Compact public user card for subscriber/subscription lists — no email/ban data.
|
|
96
|
+
|
|
97
|
+
message BanUserRequest {
|
|
98
|
+
string admin_id = 1;
|
|
99
|
+
string user_id = 2;
|
|
100
|
+
string reason = 3;
|
|
101
|
+
string until = 4; // ISO 8601; empty = permanent ban
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message UnbanUserRequest {
|
|
105
|
+
string admin_id = 1;
|
|
106
|
+
string user_id = 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message Country {
|
|
110
|
+
string id = 1;
|
|
111
|
+
string code = 2;
|
|
112
|
+
string name = 3;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message SocialMedia {
|
|
116
|
+
string id = 1;
|
|
117
|
+
string platform = 2;
|
|
118
|
+
string url = 3; // full link (built from username on read; empty for discord)
|
|
119
|
+
string username = 4; // handle for handle-based platforms; empty for website
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message CreateSocialMedia {
|
|
123
|
+
string platform = 1;
|
|
124
|
+
string url = 2; // only for platform="website"
|
|
125
|
+
string username = 3; // handle for all other platforms
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
message ProductUser {
|
|
129
|
+
string id = 1;
|
|
130
|
+
string username = 2;
|
|
131
|
+
string avatar_url = 3;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
message Category {
|
|
135
|
+
string id = 1;
|
|
136
|
+
string name = 2;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message Product {
|
|
140
|
+
string id = 1;
|
|
141
|
+
string name = 2;
|
|
142
|
+
string description = 3;
|
|
143
|
+
string price = 4; // Decimal as string (D7)
|
|
144
|
+
string created_at = 5;
|
|
145
|
+
string updated_at = 6;
|
|
146
|
+
// profile-card preview fields
|
|
147
|
+
string preview = 7;
|
|
148
|
+
string final_price = 8; // Decimal as string
|
|
149
|
+
string average_rating = 9; // number as string
|
|
150
|
+
string status = 10;
|
|
151
|
+
// Author of the product (same person as the profile owner, but echoed per
|
|
152
|
+
// product so cards can render the author independently).
|
|
153
|
+
ProductUser user = 11;
|
|
154
|
+
repeated Category categories = 12;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
message Video {
|
|
158
|
+
string id = 1;
|
|
159
|
+
string title = 2;
|
|
160
|
+
string description = 3;
|
|
161
|
+
string url = 4;
|
|
162
|
+
string created_at = 5;
|
|
163
|
+
string updated_at = 6;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
message ActiveDevice {
|
|
167
|
+
string id = 1;
|
|
168
|
+
string user_agent = 2;
|
|
169
|
+
string ip = 3;
|
|
170
|
+
string created_at = 4;
|
|
171
|
+
string last_used_at = 5;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message ProfileStats {
|
|
175
|
+
int32 subscribers_count = 1;
|
|
176
|
+
int32 subscriptions_count = 2;
|
|
177
|
+
int32 products_count = 3;
|
|
178
|
+
int32 videos_count = 4;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Compact public user card for subscriber/subscription lists — no email/ban data.
|
|
182
182
|
message ProfileUser {
|
|
183
183
|
string id = 1;
|
|
184
184
|
string username = 2;
|
|
@@ -186,25 +186,25 @@ message ProfileUser {
|
|
|
186
186
|
string full_name = 4;
|
|
187
187
|
string avatar_border = 5;
|
|
188
188
|
}
|
|
189
|
-
|
|
190
|
-
// =================================================================
|
|
191
|
-
// GetPublicProfile
|
|
192
|
-
// =================================================================
|
|
193
|
-
|
|
194
|
-
message GetPublicProfileRequest {
|
|
195
|
-
string username = 1;
|
|
196
|
-
string viewer_user_id = 2; // optional — present when caller is authenticated
|
|
197
|
-
}
|
|
198
|
-
|
|
189
|
+
|
|
190
|
+
// =================================================================
|
|
191
|
+
// GetPublicProfile
|
|
192
|
+
// =================================================================
|
|
193
|
+
|
|
194
|
+
message GetPublicProfileRequest {
|
|
195
|
+
string username = 1;
|
|
196
|
+
string viewer_user_id = 2; // optional — present when caller is authenticated
|
|
197
|
+
}
|
|
198
|
+
|
|
199
199
|
message PublicProfileResponse {
|
|
200
200
|
string id = 1;
|
|
201
201
|
string username = 2;
|
|
202
202
|
string full_name = 3;
|
|
203
|
-
string rating = 4; // Decimal as string
|
|
204
|
-
string about_me = 5;
|
|
205
|
-
repeated SocialMedia social_media = 6;
|
|
206
|
-
ProfileStats stats = 7;
|
|
207
|
-
repeated Video videos = 8;
|
|
203
|
+
string rating = 4; // Decimal as string
|
|
204
|
+
string about_me = 5;
|
|
205
|
+
repeated SocialMedia social_media = 6;
|
|
206
|
+
ProfileStats stats = 7;
|
|
207
|
+
repeated Video videos = 8;
|
|
208
208
|
repeated Product products = 9;
|
|
209
209
|
Country country = 10;
|
|
210
210
|
string avatar_url = 11;
|
|
@@ -228,84 +228,84 @@ message PublicProfileResponse {
|
|
|
228
228
|
reserved "premium_expires_at";
|
|
229
229
|
repeated string roles = 26;
|
|
230
230
|
}
|
|
231
|
-
|
|
232
|
-
// =================================================================
|
|
233
|
-
// UpdateProfile
|
|
234
|
-
// =================================================================
|
|
235
|
-
|
|
236
|
-
message UpdateProfileRequest {
|
|
237
|
-
string user_id = 1;
|
|
238
|
-
// Every editable field is `optional` so the wire format preserves the
|
|
239
|
-
// "not set" state. A partial patch from the client (e.g. only avatarUrl)
|
|
240
|
-
// no longer accidentally wipes the other columns to proto3 defaults.
|
|
241
|
-
optional string full_name = 2;
|
|
242
|
-
optional string about_me = 3;
|
|
243
|
-
optional bool newsletter_subscription = 4;
|
|
244
|
-
optional bool hide_subscriptions = 5;
|
|
245
|
-
optional string avatar_url = 6;
|
|
246
|
-
optional string banner_url = 7;
|
|
247
|
-
optional string country_id = 8;
|
|
248
|
-
optional string timezone = 9;
|
|
249
|
-
// social_media remains repeated (an empty list is still a meaningful
|
|
250
|
-
// "replace with empty"); the gateway omits the field entirely when the
|
|
251
|
-
// client didn't send it so partial patches don't clear social links.
|
|
252
|
-
repeated CreateSocialMedia social_media = 10;
|
|
253
|
-
// Premium-only fields — rejected with FAILED_PRECONDITION when the caller
|
|
254
|
-
// has no active premium. `''` = no change, `__clear__` = explicit reset.
|
|
255
|
-
optional string profile_color = 11;
|
|
256
|
-
optional string avatar_border_id = 12;
|
|
231
|
+
|
|
232
|
+
// =================================================================
|
|
233
|
+
// UpdateProfile
|
|
234
|
+
// =================================================================
|
|
235
|
+
|
|
236
|
+
message UpdateProfileRequest {
|
|
237
|
+
string user_id = 1;
|
|
238
|
+
// Every editable field is `optional` so the wire format preserves the
|
|
239
|
+
// "not set" state. A partial patch from the client (e.g. only avatarUrl)
|
|
240
|
+
// no longer accidentally wipes the other columns to proto3 defaults.
|
|
241
|
+
optional string full_name = 2;
|
|
242
|
+
optional string about_me = 3;
|
|
243
|
+
optional bool newsletter_subscription = 4;
|
|
244
|
+
optional bool hide_subscriptions = 5;
|
|
245
|
+
optional string avatar_url = 6;
|
|
246
|
+
optional string banner_url = 7;
|
|
247
|
+
optional string country_id = 8;
|
|
248
|
+
optional string timezone = 9;
|
|
249
|
+
// social_media remains repeated (an empty list is still a meaningful
|
|
250
|
+
// "replace with empty"); the gateway omits the field entirely when the
|
|
251
|
+
// client didn't send it so partial patches don't clear social links.
|
|
252
|
+
repeated CreateSocialMedia social_media = 10;
|
|
253
|
+
// Premium-only fields — rejected with FAILED_PRECONDITION when the caller
|
|
254
|
+
// has no active premium. `''` = no change, `__clear__` = explicit reset.
|
|
255
|
+
optional string profile_color = 11;
|
|
256
|
+
optional string avatar_border_id = 12;
|
|
257
257
|
reserved 13, 14;
|
|
258
258
|
reserved "animated_avatar_url", "animated_banner_url";
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// =================================================================
|
|
262
|
-
// UpdateUser
|
|
263
|
-
// =================================================================
|
|
264
|
-
|
|
265
|
-
message UpdateUserRequest {
|
|
266
|
-
string user_id = 1;
|
|
267
|
-
string username = 2;
|
|
268
|
-
string email = 3;
|
|
269
|
-
string code = 4; // confirmation code when changing email/username
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
message UserResponse {
|
|
273
|
-
User user = 1;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// Lightweight uniqueness probe for signup / account-settings forms. Called
|
|
277
|
-
// often (per keystroke/blur) — backed by a single indexed query, no writes.
|
|
278
|
-
// Mirrors the exact-match uniqueness check in UpdateUser so availability never
|
|
279
|
-
// disagrees with the real collision at submit time.
|
|
280
|
-
message CheckAvailabilityRequest {
|
|
281
|
-
string username = 1; // empty = skip this field
|
|
282
|
-
string email = 2; // empty = skip this field
|
|
283
|
-
string exclude_user_id = 3; // empty = none; set to current user so editing
|
|
284
|
-
// your OWN account doesn't report "taken"
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
message CheckAvailabilityResponse {
|
|
288
|
-
bool username_checked = 1; // false = username wasn't part of the query
|
|
289
|
-
bool username_available = 2;
|
|
290
|
-
bool email_checked = 3; // false = email wasn't part of the query
|
|
291
|
-
bool email_available = 4;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// =================================================================
|
|
295
|
-
// UpdateUserRole (admin)
|
|
296
|
-
// =================================================================
|
|
297
|
-
|
|
298
|
-
message UpdateUserRoleRequest {
|
|
299
|
-
string admin_id = 1;
|
|
300
|
-
string user_id = 2;
|
|
301
|
-
string role = 3;
|
|
302
|
-
string action = 4; // "grant" (default) | "revoke"
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// =================================================================
|
|
306
|
-
// GetUsers (paginated)
|
|
307
|
-
// =================================================================
|
|
308
|
-
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// =================================================================
|
|
262
|
+
// UpdateUser
|
|
263
|
+
// =================================================================
|
|
264
|
+
|
|
265
|
+
message UpdateUserRequest {
|
|
266
|
+
string user_id = 1;
|
|
267
|
+
string username = 2;
|
|
268
|
+
string email = 3;
|
|
269
|
+
string code = 4; // confirmation code when changing email/username
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
message UserResponse {
|
|
273
|
+
User user = 1;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Lightweight uniqueness probe for signup / account-settings forms. Called
|
|
277
|
+
// often (per keystroke/blur) — backed by a single indexed query, no writes.
|
|
278
|
+
// Mirrors the exact-match uniqueness check in UpdateUser so availability never
|
|
279
|
+
// disagrees with the real collision at submit time.
|
|
280
|
+
message CheckAvailabilityRequest {
|
|
281
|
+
string username = 1; // empty = skip this field
|
|
282
|
+
string email = 2; // empty = skip this field
|
|
283
|
+
string exclude_user_id = 3; // empty = none; set to current user so editing
|
|
284
|
+
// your OWN account doesn't report "taken"
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
message CheckAvailabilityResponse {
|
|
288
|
+
bool username_checked = 1; // false = username wasn't part of the query
|
|
289
|
+
bool username_available = 2;
|
|
290
|
+
bool email_checked = 3; // false = email wasn't part of the query
|
|
291
|
+
bool email_available = 4;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// =================================================================
|
|
295
|
+
// UpdateUserRole (admin)
|
|
296
|
+
// =================================================================
|
|
297
|
+
|
|
298
|
+
message UpdateUserRoleRequest {
|
|
299
|
+
string admin_id = 1;
|
|
300
|
+
string user_id = 2;
|
|
301
|
+
string role = 3;
|
|
302
|
+
string action = 4; // "grant" (default) | "revoke"
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// =================================================================
|
|
306
|
+
// GetUsers (paginated)
|
|
307
|
+
// =================================================================
|
|
308
|
+
|
|
309
309
|
message GetUsersRequest {
|
|
310
310
|
string page = 1;
|
|
311
311
|
string limit = 2;
|
|
@@ -313,7 +313,7 @@ message GetUsersRequest {
|
|
|
313
313
|
string role_name = 4;
|
|
314
314
|
string full_name = 5;
|
|
315
315
|
}
|
|
316
|
-
|
|
316
|
+
|
|
317
317
|
message GetUsersResponse {
|
|
318
318
|
repeated User items = 1;
|
|
319
319
|
int32 total = 2;
|
|
@@ -456,37 +456,37 @@ message ListAdminUserRelationsResponse {
|
|
|
456
456
|
// =================================================================
|
|
457
457
|
// Active devices
|
|
458
458
|
// =================================================================
|
|
459
|
-
|
|
460
|
-
message GetActiveDevicesRequest {
|
|
461
|
-
string user_id = 1;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
message GetActiveDevicesResponse {
|
|
465
|
-
repeated ActiveDevice devices = 1;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
message ManageDevicesRequest {
|
|
469
|
-
string user_id = 1;
|
|
470
|
-
repeated string device_ids_to_remove = 2;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
message ManageDevicesResponse {
|
|
474
|
-
bool ok = 1;
|
|
475
|
-
int32 removed_count = 2;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
// =================================================================
|
|
479
|
-
// GetUserFields — paginated dynamic field sets
|
|
480
|
-
// =================================================================
|
|
481
|
-
|
|
482
|
-
enum UserFieldsType {
|
|
483
|
-
USER_FIELDS_TYPE_UNSPECIFIED = 0;
|
|
484
|
-
USER_FIELDS_TYPE_VIDEOS = 1;
|
|
485
|
-
USER_FIELDS_TYPE_PRODUCTS = 2;
|
|
486
|
-
USER_FIELDS_TYPE_SUBSCRIPTIONS = 3;
|
|
487
|
-
USER_FIELDS_TYPE_SUBSCRIBERS = 4;
|
|
488
|
-
}
|
|
489
|
-
|
|
459
|
+
|
|
460
|
+
message GetActiveDevicesRequest {
|
|
461
|
+
string user_id = 1;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
message GetActiveDevicesResponse {
|
|
465
|
+
repeated ActiveDevice devices = 1;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
message ManageDevicesRequest {
|
|
469
|
+
string user_id = 1;
|
|
470
|
+
repeated string device_ids_to_remove = 2;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
message ManageDevicesResponse {
|
|
474
|
+
bool ok = 1;
|
|
475
|
+
int32 removed_count = 2;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// =================================================================
|
|
479
|
+
// GetUserFields — paginated dynamic field sets
|
|
480
|
+
// =================================================================
|
|
481
|
+
|
|
482
|
+
enum UserFieldsType {
|
|
483
|
+
USER_FIELDS_TYPE_UNSPECIFIED = 0;
|
|
484
|
+
USER_FIELDS_TYPE_VIDEOS = 1;
|
|
485
|
+
USER_FIELDS_TYPE_PRODUCTS = 2;
|
|
486
|
+
USER_FIELDS_TYPE_SUBSCRIPTIONS = 3;
|
|
487
|
+
USER_FIELDS_TYPE_SUBSCRIBERS = 4;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
490
|
message GetUserFieldsRequest {
|
|
491
491
|
string username = 1;
|
|
492
492
|
UserFieldsType type = 2;
|
|
@@ -511,38 +511,38 @@ message GetUserFieldsResponse {
|
|
|
511
511
|
int32 limit = 7;
|
|
512
512
|
UserFieldsOwner user = 8;
|
|
513
513
|
}
|
|
514
|
-
|
|
515
|
-
// =================================================================
|
|
516
|
-
// Subscriptions
|
|
517
|
-
// =================================================================
|
|
518
|
-
|
|
519
|
-
message SubscriptionRequest {
|
|
520
|
-
string subscriber_id = 1; // the authenticated user performing the action
|
|
521
|
-
string target_id = 2; // the user being (un)subscribed to/from
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
message SubscriptionResponse {
|
|
525
|
-
bool subscribed = 1; // state after the call
|
|
526
|
-
int32 subscribers_count = 2; // target's subscriber count after the call
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
// =================================================================
|
|
530
|
-
// Premium
|
|
531
|
-
// =================================================================
|
|
532
|
-
|
|
533
|
-
// Periods mirror PremiumPeriod enum in schema.prisma.
|
|
534
|
-
enum PremiumPeriod {
|
|
535
|
-
PREMIUM_PERIOD_UNSPECIFIED = 0;
|
|
536
|
-
PREMIUM_PERIOD_MONTH_1 = 1;
|
|
537
|
-
PREMIUM_PERIOD_MONTH_3 = 2;
|
|
538
|
-
PREMIUM_PERIOD_MONTH_6 = 3;
|
|
539
|
-
PREMIUM_PERIOD_MONTH_12 = 4;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
message GetMyPremiumRequest {
|
|
543
|
-
string user_id = 1;
|
|
544
|
-
}
|
|
545
|
-
|
|
514
|
+
|
|
515
|
+
// =================================================================
|
|
516
|
+
// Subscriptions
|
|
517
|
+
// =================================================================
|
|
518
|
+
|
|
519
|
+
message SubscriptionRequest {
|
|
520
|
+
string subscriber_id = 1; // the authenticated user performing the action
|
|
521
|
+
string target_id = 2; // the user being (un)subscribed to/from
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
message SubscriptionResponse {
|
|
525
|
+
bool subscribed = 1; // state after the call
|
|
526
|
+
int32 subscribers_count = 2; // target's subscriber count after the call
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// =================================================================
|
|
530
|
+
// Premium
|
|
531
|
+
// =================================================================
|
|
532
|
+
|
|
533
|
+
// Periods mirror PremiumPeriod enum in schema.prisma.
|
|
534
|
+
enum PremiumPeriod {
|
|
535
|
+
PREMIUM_PERIOD_UNSPECIFIED = 0;
|
|
536
|
+
PREMIUM_PERIOD_MONTH_1 = 1;
|
|
537
|
+
PREMIUM_PERIOD_MONTH_3 = 2;
|
|
538
|
+
PREMIUM_PERIOD_MONTH_6 = 3;
|
|
539
|
+
PREMIUM_PERIOD_MONTH_12 = 4;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
message GetMyPremiumRequest {
|
|
543
|
+
string user_id = 1;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
546
|
message PremiumStateResponse {
|
|
547
547
|
bool is_active = 1;
|
|
548
548
|
string status = 2; // ACTIVE | EXPIRED | CANCELED | empty (never purchased)
|
|
@@ -581,14 +581,14 @@ message PremiumSavedPaymentCard {
|
|
|
581
581
|
string nickname = 7;
|
|
582
582
|
string created_at = 8;
|
|
583
583
|
}
|
|
584
|
-
|
|
585
|
-
message SetPremiumAutoRenewRequest {
|
|
586
|
-
string user_id = 1;
|
|
587
|
-
bool enabled = 2;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
// Internal — payments-service hands us the period that was just paid for, plus
|
|
591
|
-
// the YooKassa payment_method id (empty for balance/non-recurring purchases).
|
|
584
|
+
|
|
585
|
+
message SetPremiumAutoRenewRequest {
|
|
586
|
+
string user_id = 1;
|
|
587
|
+
bool enabled = 2;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// Internal — payments-service hands us the period that was just paid for, plus
|
|
591
|
+
// the YooKassa payment_method id (empty for balance/non-recurring purchases).
|
|
592
592
|
message ActivatePremiumRequest {
|
|
593
593
|
string user_id = 1;
|
|
594
594
|
PremiumPeriod period = 2;
|
|
@@ -596,275 +596,275 @@ message ActivatePremiumRequest {
|
|
|
596
596
|
bool is_renewal = 4; // false = first purchase; true = cron-driven renewal
|
|
597
597
|
bool auto_renew = 5; // set by the purchase flow; renewals keep true
|
|
598
598
|
}
|
|
599
|
-
|
|
600
|
-
message IsPremiumActiveRequest {
|
|
601
|
-
string user_id = 1;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
message IsPremiumActiveResponse {
|
|
605
|
-
bool is_active = 1;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
// =================================================================
|
|
609
|
-
// Avatar borders
|
|
610
|
-
// =================================================================
|
|
611
|
-
|
|
612
|
-
message AvatarBorder {
|
|
613
|
-
string id = 1;
|
|
614
|
-
string code = 2;
|
|
615
|
-
string name = 3;
|
|
616
|
-
string description = 4;
|
|
617
|
-
string image_url = 5;
|
|
618
|
-
bool is_animated = 6;
|
|
619
|
-
string source = 7;
|
|
620
|
-
int32 sort_order = 8;
|
|
621
|
-
bool is_active = 9;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
message ListAvatarBordersRequest {
|
|
625
|
-
bool include_inactive = 1; // admin-only — gateway gates by role
|
|
626
|
-
string source = 2; // optional filter
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
message ListAvatarBordersResponse {
|
|
630
|
-
repeated AvatarBorder items = 1;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
message UpsertAvatarBorderRequest {
|
|
634
|
-
string id = 1; // empty = create
|
|
635
|
-
string code = 2; // required when creating
|
|
636
|
-
string name = 3;
|
|
637
|
-
string description = 4;
|
|
638
|
-
string image_url = 5;
|
|
639
|
-
bool is_animated = 6;
|
|
640
|
-
string source = 7;
|
|
641
|
-
int32 sort_order = 8;
|
|
642
|
-
bool is_active = 9;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
message DeleteAvatarBorderRequest {
|
|
646
|
-
string id = 1;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
message DeleteAvatarBorderResponse {
|
|
650
|
-
bool ok = 1;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// =================================================================
|
|
654
|
-
// Account settings
|
|
655
|
-
// =================================================================
|
|
656
|
-
|
|
657
|
-
message UpdatePrivacyRequest {
|
|
658
|
-
string user_id = 1;
|
|
659
|
-
bool hide_email = 2;
|
|
660
|
-
bool hide_balance = 3;
|
|
661
|
-
bool hide_online = 4;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
message UpdateEmailPrefsRequest {
|
|
665
|
-
string user_id = 1;
|
|
666
|
-
bool email_on_sales = 2;
|
|
667
|
-
bool email_on_reviews = 3;
|
|
668
|
-
bool email_on_news = 4;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
message UpdateEmailPrefsResponse {
|
|
672
|
-
bool email_on_sales = 1;
|
|
673
|
-
bool email_on_reviews = 2;
|
|
674
|
-
bool email_on_news = 3;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
message UpdateLocaleRequest {
|
|
678
|
-
string user_id = 1;
|
|
679
|
-
string locale = 2; // "ru" | "en" | ...
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
message UpdateLocaleResponse {
|
|
683
|
-
string locale = 1;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
message SoftDeleteAccountRequest {
|
|
687
|
-
string user_id = 1;
|
|
688
|
-
string reason = 2; // optional, for support/audit
|
|
689
|
-
int32 cooldown_days = 3; // 0 → use server default (30)
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
message SoftDeleteAccountResponse {
|
|
693
|
-
string deleted_at = 1; // ISO 8601
|
|
694
|
-
string scheduled_for_hard_delete = 2;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
message RestoreAccountRequest {
|
|
698
|
-
string user_id = 1;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
message HardDeletePendingRequest {
|
|
702
|
-
int32 max_batch = 1; // 0 → default 100
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
message HardDeletePendingResponse {
|
|
706
|
-
int32 deleted = 1;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
message ChangePasswordRequest {
|
|
710
|
-
string user_id = 1;
|
|
711
|
-
string current_password = 2;
|
|
712
|
-
string new_password = 3;
|
|
713
|
-
// Optional: revoke all other sessions on success.
|
|
714
|
-
bool revoke_other_sessions = 4;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
// =================================================================
|
|
718
|
-
// Blocks
|
|
719
|
-
// =================================================================
|
|
720
|
-
|
|
721
|
-
message BlockUserRequest {
|
|
722
|
-
string blocker_id = 1;
|
|
723
|
-
string blocked_id = 2;
|
|
724
|
-
string reason = 3; // optional
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
message BlockUserResponse {
|
|
728
|
-
bool blocked = 1;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
message BlockedUserRow {
|
|
732
|
-
string id = 1;
|
|
733
|
-
string username = 2;
|
|
734
|
-
string avatar_url = 3;
|
|
735
|
-
string blocked_at = 4;
|
|
736
|
-
string reason = 5;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
message ListBlockedUsersRequest {
|
|
740
|
-
string blocker_id = 1;
|
|
741
|
-
int32 page = 2;
|
|
742
|
-
int32 limit = 3;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
message ListBlockedUsersResponse {
|
|
746
|
-
repeated BlockedUserRow items = 1;
|
|
747
|
-
int32 total = 2;
|
|
748
|
-
int32 page = 3;
|
|
749
|
-
int32 limit = 4;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
message IsBlockedRequest {
|
|
753
|
-
string blocker_id = 1;
|
|
754
|
-
string blocked_id = 2;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
message IsBlockedResponse {
|
|
758
|
-
bool is_blocked = 1;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// =================================================================
|
|
762
|
-
// Data export
|
|
763
|
-
// =================================================================
|
|
764
|
-
|
|
765
|
-
message DataExportRequestRow {
|
|
766
|
-
string id = 1;
|
|
767
|
-
string user_id = 2;
|
|
768
|
-
string status = 3; // PENDING | PROCESSING | READY | FAILED
|
|
769
|
-
string file_url = 4;
|
|
770
|
-
int32 file_size = 5;
|
|
771
|
-
string error = 6;
|
|
772
|
-
string created_at = 7;
|
|
773
|
-
string completed_at = 8;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
message RequestDataExportRequest {
|
|
777
|
-
string user_id = 1;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
message ListDataExportsRequest {
|
|
781
|
-
string user_id = 1;
|
|
782
|
-
int32 page = 2;
|
|
783
|
-
int32 limit = 3;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
message ListDataExportsResponse {
|
|
787
|
-
repeated DataExportRequestRow items = 1;
|
|
788
|
-
int32 total = 2;
|
|
789
|
-
int32 page = 3;
|
|
790
|
-
int32 limit = 4;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
message PickPendingDataExportRequest {
|
|
794
|
-
// tasks-service polls; returns one PENDING row marked PROCESSING, or empty.
|
|
795
|
-
bool _placeholder = 1;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
message CompleteDataExportRequest {
|
|
799
|
-
string id = 1;
|
|
800
|
-
string file_url = 2;
|
|
801
|
-
int32 file_size = 3;
|
|
802
|
-
string error = 4; // if set, marks FAILED instead of READY
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
message CollectUserExportDataRequest {
|
|
806
|
-
string user_id = 1;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
message CollectUserExportDataResponse {
|
|
810
|
-
// Opaque JSON-as-string of user-owned data. tasks-service writes it to
|
|
811
|
-
// S3 verbatim. Keeps the schema-specific marshaling private to users-service.
|
|
812
|
-
string payload_json = 1;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
// =================================================================
|
|
816
|
-
// Settings — unified read
|
|
817
|
-
// =================================================================
|
|
818
|
-
|
|
819
|
-
message GetAccountSettingsRequest {
|
|
820
|
-
string user_id = 1;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
// Current premium plan the user holds. Mirrors a PremiumPlan catalog entry.
|
|
824
|
-
// Absent (null) when the user has no active subscription.
|
|
825
|
-
message PremiumPlanInfo {
|
|
826
|
-
string period = 1; // MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12
|
|
827
|
-
int32 months = 2;
|
|
828
|
-
string price = 3; // total for the period, Decimal-as-string
|
|
829
|
-
string monthly_price = 4; // ≈ X ₽/month
|
|
830
|
-
string discount_percent = 5;
|
|
831
|
-
string currency = 6;
|
|
832
|
-
}
|
|
833
|
-
|
|
599
|
+
|
|
600
|
+
message IsPremiumActiveRequest {
|
|
601
|
+
string user_id = 1;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
message IsPremiumActiveResponse {
|
|
605
|
+
bool is_active = 1;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// =================================================================
|
|
609
|
+
// Avatar borders
|
|
610
|
+
// =================================================================
|
|
611
|
+
|
|
612
|
+
message AvatarBorder {
|
|
613
|
+
string id = 1;
|
|
614
|
+
string code = 2;
|
|
615
|
+
string name = 3;
|
|
616
|
+
string description = 4;
|
|
617
|
+
string image_url = 5;
|
|
618
|
+
bool is_animated = 6;
|
|
619
|
+
string source = 7;
|
|
620
|
+
int32 sort_order = 8;
|
|
621
|
+
bool is_active = 9;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
message ListAvatarBordersRequest {
|
|
625
|
+
bool include_inactive = 1; // admin-only — gateway gates by role
|
|
626
|
+
string source = 2; // optional filter
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
message ListAvatarBordersResponse {
|
|
630
|
+
repeated AvatarBorder items = 1;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
message UpsertAvatarBorderRequest {
|
|
634
|
+
string id = 1; // empty = create
|
|
635
|
+
string code = 2; // required when creating
|
|
636
|
+
string name = 3;
|
|
637
|
+
string description = 4;
|
|
638
|
+
string image_url = 5;
|
|
639
|
+
bool is_animated = 6;
|
|
640
|
+
string source = 7;
|
|
641
|
+
int32 sort_order = 8;
|
|
642
|
+
bool is_active = 9;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
message DeleteAvatarBorderRequest {
|
|
646
|
+
string id = 1;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
message DeleteAvatarBorderResponse {
|
|
650
|
+
bool ok = 1;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// =================================================================
|
|
654
|
+
// Account settings
|
|
655
|
+
// =================================================================
|
|
656
|
+
|
|
657
|
+
message UpdatePrivacyRequest {
|
|
658
|
+
string user_id = 1;
|
|
659
|
+
bool hide_email = 2;
|
|
660
|
+
bool hide_balance = 3;
|
|
661
|
+
bool hide_online = 4;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
message UpdateEmailPrefsRequest {
|
|
665
|
+
string user_id = 1;
|
|
666
|
+
bool email_on_sales = 2;
|
|
667
|
+
bool email_on_reviews = 3;
|
|
668
|
+
bool email_on_news = 4;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
message UpdateEmailPrefsResponse {
|
|
672
|
+
bool email_on_sales = 1;
|
|
673
|
+
bool email_on_reviews = 2;
|
|
674
|
+
bool email_on_news = 3;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
message UpdateLocaleRequest {
|
|
678
|
+
string user_id = 1;
|
|
679
|
+
string locale = 2; // "ru" | "en" | ...
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
message UpdateLocaleResponse {
|
|
683
|
+
string locale = 1;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
message SoftDeleteAccountRequest {
|
|
687
|
+
string user_id = 1;
|
|
688
|
+
string reason = 2; // optional, for support/audit
|
|
689
|
+
int32 cooldown_days = 3; // 0 → use server default (30)
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
message SoftDeleteAccountResponse {
|
|
693
|
+
string deleted_at = 1; // ISO 8601
|
|
694
|
+
string scheduled_for_hard_delete = 2;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
message RestoreAccountRequest {
|
|
698
|
+
string user_id = 1;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
message HardDeletePendingRequest {
|
|
702
|
+
int32 max_batch = 1; // 0 → default 100
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
message HardDeletePendingResponse {
|
|
706
|
+
int32 deleted = 1;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
message ChangePasswordRequest {
|
|
710
|
+
string user_id = 1;
|
|
711
|
+
string current_password = 2;
|
|
712
|
+
string new_password = 3;
|
|
713
|
+
// Optional: revoke all other sessions on success.
|
|
714
|
+
bool revoke_other_sessions = 4;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// =================================================================
|
|
718
|
+
// Blocks
|
|
719
|
+
// =================================================================
|
|
720
|
+
|
|
721
|
+
message BlockUserRequest {
|
|
722
|
+
string blocker_id = 1;
|
|
723
|
+
string blocked_id = 2;
|
|
724
|
+
string reason = 3; // optional
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
message BlockUserResponse {
|
|
728
|
+
bool blocked = 1;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
message BlockedUserRow {
|
|
732
|
+
string id = 1;
|
|
733
|
+
string username = 2;
|
|
734
|
+
string avatar_url = 3;
|
|
735
|
+
string blocked_at = 4;
|
|
736
|
+
string reason = 5;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
message ListBlockedUsersRequest {
|
|
740
|
+
string blocker_id = 1;
|
|
741
|
+
int32 page = 2;
|
|
742
|
+
int32 limit = 3;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
message ListBlockedUsersResponse {
|
|
746
|
+
repeated BlockedUserRow items = 1;
|
|
747
|
+
int32 total = 2;
|
|
748
|
+
int32 page = 3;
|
|
749
|
+
int32 limit = 4;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
message IsBlockedRequest {
|
|
753
|
+
string blocker_id = 1;
|
|
754
|
+
string blocked_id = 2;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
message IsBlockedResponse {
|
|
758
|
+
bool is_blocked = 1;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// =================================================================
|
|
762
|
+
// Data export
|
|
763
|
+
// =================================================================
|
|
764
|
+
|
|
765
|
+
message DataExportRequestRow {
|
|
766
|
+
string id = 1;
|
|
767
|
+
string user_id = 2;
|
|
768
|
+
string status = 3; // PENDING | PROCESSING | READY | FAILED
|
|
769
|
+
string file_url = 4;
|
|
770
|
+
int32 file_size = 5;
|
|
771
|
+
string error = 6;
|
|
772
|
+
string created_at = 7;
|
|
773
|
+
string completed_at = 8;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
message RequestDataExportRequest {
|
|
777
|
+
string user_id = 1;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
message ListDataExportsRequest {
|
|
781
|
+
string user_id = 1;
|
|
782
|
+
int32 page = 2;
|
|
783
|
+
int32 limit = 3;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
message ListDataExportsResponse {
|
|
787
|
+
repeated DataExportRequestRow items = 1;
|
|
788
|
+
int32 total = 2;
|
|
789
|
+
int32 page = 3;
|
|
790
|
+
int32 limit = 4;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
message PickPendingDataExportRequest {
|
|
794
|
+
// tasks-service polls; returns one PENDING row marked PROCESSING, or empty.
|
|
795
|
+
bool _placeholder = 1;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
message CompleteDataExportRequest {
|
|
799
|
+
string id = 1;
|
|
800
|
+
string file_url = 2;
|
|
801
|
+
int32 file_size = 3;
|
|
802
|
+
string error = 4; // if set, marks FAILED instead of READY
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
message CollectUserExportDataRequest {
|
|
806
|
+
string user_id = 1;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
message CollectUserExportDataResponse {
|
|
810
|
+
// Opaque JSON-as-string of user-owned data. tasks-service writes it to
|
|
811
|
+
// S3 verbatim. Keeps the schema-specific marshaling private to users-service.
|
|
812
|
+
string payload_json = 1;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// =================================================================
|
|
816
|
+
// Settings — unified read
|
|
817
|
+
// =================================================================
|
|
818
|
+
|
|
819
|
+
message GetAccountSettingsRequest {
|
|
820
|
+
string user_id = 1;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
// Current premium plan the user holds. Mirrors a PremiumPlan catalog entry.
|
|
824
|
+
// Absent (null) when the user has no active subscription.
|
|
825
|
+
message PremiumPlanInfo {
|
|
826
|
+
string period = 1; // MONTH_1 | MONTH_3 | MONTH_6 | MONTH_12
|
|
827
|
+
int32 months = 2;
|
|
828
|
+
string price = 3; // total for the period, Decimal-as-string
|
|
829
|
+
string monthly_price = 4; // ≈ X ₽/month
|
|
830
|
+
string discount_percent = 5;
|
|
831
|
+
string currency = 6;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
834
|
message AccountSettingsResponse {
|
|
835
|
-
// Identity
|
|
836
|
-
string id = 1;
|
|
837
|
-
string username = 2;
|
|
838
|
-
string email = 3;
|
|
839
|
-
string full_name = 4;
|
|
840
|
-
string about_me = 5;
|
|
841
|
-
string avatar_url = 6;
|
|
842
|
-
string banner_url = 7;
|
|
843
|
-
string locale = 8;
|
|
844
|
-
string timezone = 9;
|
|
845
|
-
string country_id = 10;
|
|
846
|
-
string created_at = 11;
|
|
847
|
-
|
|
848
|
-
// 2FA
|
|
849
|
-
string two_factor_type = 12; // NONE | APP | EMAIL
|
|
850
|
-
bool two_factor_enabled = 13;
|
|
851
|
-
int32 backup_codes_remaining = 14;
|
|
852
|
-
|
|
853
|
-
// Privacy
|
|
854
|
-
bool hide_email = 15;
|
|
855
|
-
bool hide_balance = 16;
|
|
856
|
-
bool hide_online = 17;
|
|
857
|
-
bool hide_subscriptions = 18;
|
|
858
|
-
|
|
859
|
-
// Email prefs
|
|
860
|
-
bool email_on_sales = 19;
|
|
861
|
-
bool email_on_reviews = 20;
|
|
862
|
-
bool email_on_news = 21;
|
|
863
|
-
|
|
864
|
-
// Payout defaults
|
|
865
|
-
string payout_method = 22;
|
|
866
|
-
string payout_details = 23;
|
|
867
|
-
|
|
835
|
+
// Identity
|
|
836
|
+
string id = 1;
|
|
837
|
+
string username = 2;
|
|
838
|
+
string email = 3;
|
|
839
|
+
string full_name = 4;
|
|
840
|
+
string about_me = 5;
|
|
841
|
+
string avatar_url = 6;
|
|
842
|
+
string banner_url = 7;
|
|
843
|
+
string locale = 8;
|
|
844
|
+
string timezone = 9;
|
|
845
|
+
string country_id = 10;
|
|
846
|
+
string created_at = 11;
|
|
847
|
+
|
|
848
|
+
// 2FA
|
|
849
|
+
string two_factor_type = 12; // NONE | APP | EMAIL
|
|
850
|
+
bool two_factor_enabled = 13;
|
|
851
|
+
int32 backup_codes_remaining = 14;
|
|
852
|
+
|
|
853
|
+
// Privacy
|
|
854
|
+
bool hide_email = 15;
|
|
855
|
+
bool hide_balance = 16;
|
|
856
|
+
bool hide_online = 17;
|
|
857
|
+
bool hide_subscriptions = 18;
|
|
858
|
+
|
|
859
|
+
// Email prefs
|
|
860
|
+
bool email_on_sales = 19;
|
|
861
|
+
bool email_on_reviews = 20;
|
|
862
|
+
bool email_on_news = 21;
|
|
863
|
+
|
|
864
|
+
// Payout defaults
|
|
865
|
+
string payout_method = 22;
|
|
866
|
+
string payout_details = 23;
|
|
867
|
+
|
|
868
868
|
// Premium snapshot — flat flag only. Rich subscription state lives at
|
|
869
869
|
// /premium/me.
|
|
870
870
|
reserved 24, 25, 26, 27;
|
|
@@ -875,15 +875,15 @@ message AccountSettingsResponse {
|
|
|
875
875
|
|
|
876
876
|
// Soft-delete state
|
|
877
877
|
string deleted_at = 28;
|
|
878
|
-
string scheduled_for_hard_delete = 29;
|
|
879
|
-
|
|
880
|
-
repeated SocialMedia social_media = 30;
|
|
881
|
-
|
|
878
|
+
string scheduled_for_hard_delete = 29;
|
|
879
|
+
|
|
880
|
+
repeated SocialMedia social_media = 30;
|
|
881
|
+
|
|
882
882
|
// Premium customization snapshot — denormalised border image URL so the
|
|
883
883
|
// client can render the current overlay without a second roundtrip.
|
|
884
884
|
string avatar_border_id = 31;
|
|
885
885
|
string avatar_border = 32;
|
|
886
886
|
reserved 33, 34;
|
|
887
887
|
reserved "animated_avatar_url", "animated_banner_url";
|
|
888
|
-
string profile_color = 35;
|
|
889
|
-
}
|
|
888
|
+
string profile_color = 35;
|
|
889
|
+
}
|