@aepstore-dev/contracts 1.19.0 → 1.21.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/products.ts +9 -2
- package/package.json +35 -35
- package/proto/activity.proto +195 -195
- package/proto/auth.proto +126 -126
- package/proto/mail.proto +42 -42
- package/proto/payments.proto +203 -203
- package/proto/products.proto +359 -353
- package/proto/support.proto +118 -118
- package/proto/taxonomy.proto +78 -78
- package/proto/upload.proto +150 -150
- package/proto/users.proto +278 -278
package/proto/users.proto
CHANGED
|
@@ -1,278 +1,278 @@
|
|
|
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 UpdateUserRole(UpdateUserRoleRequest) returns (UserResponse);
|
|
10
|
-
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse);
|
|
11
|
-
rpc GetActiveDevices(GetActiveDevicesRequest) returns (GetActiveDevicesResponse);
|
|
12
|
-
rpc ManageDevices(ManageDevicesRequest) returns (ManageDevicesResponse);
|
|
13
|
-
rpc GetUserFields(GetUserFieldsRequest) returns (GetUserFieldsResponse);
|
|
14
|
-
|
|
15
|
-
rpc CreateSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
16
|
-
rpc DeleteSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
17
|
-
|
|
18
|
-
rpc BanUser(BanUserRequest) returns (UserResponse);
|
|
19
|
-
rpc UnbanUser(UnbanUserRequest) returns (UserResponse);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// =================================================================
|
|
23
|
-
// Common types
|
|
24
|
-
// =================================================================
|
|
25
|
-
|
|
26
|
-
message User {
|
|
27
|
-
string id = 1;
|
|
28
|
-
string email = 2;
|
|
29
|
-
string username = 3;
|
|
30
|
-
string avatar_url = 4;
|
|
31
|
-
repeated string roles = 5;
|
|
32
|
-
string role = 6; // primary role for backwards compat
|
|
33
|
-
string created_at = 7; // ISO 8601
|
|
34
|
-
string updated_at = 8;
|
|
35
|
-
bool is_banned = 9;
|
|
36
|
-
string banned_until = 10; // ISO 8601, empty = permanent/none
|
|
37
|
-
string ban_reason = 11;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
message BanUserRequest {
|
|
41
|
-
string admin_id = 1;
|
|
42
|
-
string user_id = 2;
|
|
43
|
-
string reason = 3;
|
|
44
|
-
string until = 4; // ISO 8601; empty = permanent ban
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message UnbanUserRequest {
|
|
48
|
-
string admin_id = 1;
|
|
49
|
-
string user_id = 2;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
message Country {
|
|
53
|
-
string id = 1;
|
|
54
|
-
string code = 2;
|
|
55
|
-
string name = 3;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
message SocialMedia {
|
|
59
|
-
string id = 1;
|
|
60
|
-
string platform = 2;
|
|
61
|
-
string url = 3;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
message CreateSocialMedia {
|
|
65
|
-
string platform = 1;
|
|
66
|
-
string url = 2;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
message ProductUser {
|
|
70
|
-
string id = 1;
|
|
71
|
-
string username = 2;
|
|
72
|
-
string avatar_url = 3;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
message Category {
|
|
76
|
-
string id = 1;
|
|
77
|
-
string name = 2;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
message Product {
|
|
81
|
-
string id = 1;
|
|
82
|
-
string name = 2;
|
|
83
|
-
string description = 3;
|
|
84
|
-
string price = 4; // Decimal as string (D7)
|
|
85
|
-
string created_at = 5;
|
|
86
|
-
string updated_at = 6;
|
|
87
|
-
// profile-card preview fields
|
|
88
|
-
string preview = 7;
|
|
89
|
-
string final_price = 8; // Decimal as string
|
|
90
|
-
string average_rating = 9; // number as string
|
|
91
|
-
string status = 10;
|
|
92
|
-
// Author of the product (same person as the profile owner, but echoed per
|
|
93
|
-
// product so cards can render the author independently).
|
|
94
|
-
ProductUser user = 11;
|
|
95
|
-
repeated Category categories = 12;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message Video {
|
|
99
|
-
string id = 1;
|
|
100
|
-
string title = 2;
|
|
101
|
-
string description = 3;
|
|
102
|
-
string url = 4;
|
|
103
|
-
string created_at = 5;
|
|
104
|
-
string updated_at = 6;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
message ActiveDevice {
|
|
108
|
-
string id = 1;
|
|
109
|
-
string user_agent = 2;
|
|
110
|
-
string ip = 3;
|
|
111
|
-
string created_at = 4;
|
|
112
|
-
string last_used_at = 5;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
message ProfileStats {
|
|
116
|
-
int32 subscribers_count = 1;
|
|
117
|
-
int32 subscriptions_count = 2;
|
|
118
|
-
int32 products_count = 3;
|
|
119
|
-
int32 videos_count = 4;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// =================================================================
|
|
123
|
-
// GetPublicProfile
|
|
124
|
-
// =================================================================
|
|
125
|
-
|
|
126
|
-
message GetPublicProfileRequest {
|
|
127
|
-
string username = 1;
|
|
128
|
-
string viewer_user_id = 2; // optional — present when caller is authenticated
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
message PublicProfileResponse {
|
|
132
|
-
string id = 1;
|
|
133
|
-
string username = 2;
|
|
134
|
-
string full_name = 3;
|
|
135
|
-
string rating = 4; // Decimal as string
|
|
136
|
-
string about_me = 5;
|
|
137
|
-
repeated SocialMedia social_media = 6;
|
|
138
|
-
ProfileStats stats = 7;
|
|
139
|
-
repeated Video videos = 8;
|
|
140
|
-
repeated Product products = 9;
|
|
141
|
-
Country country = 10;
|
|
142
|
-
string avatar_url = 11;
|
|
143
|
-
string banner_url = 12;
|
|
144
|
-
string role = 13;
|
|
145
|
-
string created_at = 14;
|
|
146
|
-
bool hide_subscriptions = 15;
|
|
147
|
-
// Either populated lists or empty depending on hide_subscriptions
|
|
148
|
-
repeated User subscriptions = 16;
|
|
149
|
-
repeated User subscribers = 17;
|
|
150
|
-
bool is_owner = 18;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// =================================================================
|
|
154
|
-
// UpdateProfile
|
|
155
|
-
// =================================================================
|
|
156
|
-
|
|
157
|
-
message UpdateProfileRequest {
|
|
158
|
-
string user_id = 1;
|
|
159
|
-
string full_name = 2;
|
|
160
|
-
string about_me = 3;
|
|
161
|
-
bool newsletter_subscription = 4;
|
|
162
|
-
bool hide_subscriptions = 5;
|
|
163
|
-
string avatar_url = 6;
|
|
164
|
-
string banner_url = 7;
|
|
165
|
-
string country_id = 8;
|
|
166
|
-
string timezone = 9;
|
|
167
|
-
repeated CreateSocialMedia social_media = 10;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// =================================================================
|
|
171
|
-
// UpdateUser
|
|
172
|
-
// =================================================================
|
|
173
|
-
|
|
174
|
-
message UpdateUserRequest {
|
|
175
|
-
string user_id = 1;
|
|
176
|
-
string username = 2;
|
|
177
|
-
string email = 3;
|
|
178
|
-
string code = 4; // confirmation code when changing email/username
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
message UserResponse {
|
|
182
|
-
User user = 1;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// =================================================================
|
|
186
|
-
// UpdateUserRole (admin)
|
|
187
|
-
// =================================================================
|
|
188
|
-
|
|
189
|
-
message UpdateUserRoleRequest {
|
|
190
|
-
string admin_id = 1;
|
|
191
|
-
string user_id = 2;
|
|
192
|
-
string role = 3;
|
|
193
|
-
string action = 4; // "grant" (default) | "revoke"
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// =================================================================
|
|
197
|
-
// GetUsers (paginated)
|
|
198
|
-
// =================================================================
|
|
199
|
-
|
|
200
|
-
message GetUsersRequest {
|
|
201
|
-
string page = 1;
|
|
202
|
-
string limit = 2;
|
|
203
|
-
string search = 3;
|
|
204
|
-
string role_name = 4;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
message GetUsersResponse {
|
|
208
|
-
repeated User items = 1;
|
|
209
|
-
int32 total = 2;
|
|
210
|
-
int32 page = 3;
|
|
211
|
-
int32 limit = 4;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// =================================================================
|
|
215
|
-
// Active devices
|
|
216
|
-
// =================================================================
|
|
217
|
-
|
|
218
|
-
message GetActiveDevicesRequest {
|
|
219
|
-
string user_id = 1;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
message GetActiveDevicesResponse {
|
|
223
|
-
repeated ActiveDevice devices = 1;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
message ManageDevicesRequest {
|
|
227
|
-
string user_id = 1;
|
|
228
|
-
repeated string device_ids_to_remove = 2;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
message ManageDevicesResponse {
|
|
232
|
-
bool ok = 1;
|
|
233
|
-
int32 removed_count = 2;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// =================================================================
|
|
237
|
-
// GetUserFields — paginated dynamic field sets
|
|
238
|
-
// =================================================================
|
|
239
|
-
|
|
240
|
-
enum UserFieldsType {
|
|
241
|
-
USER_FIELDS_TYPE_UNSPECIFIED = 0;
|
|
242
|
-
USER_FIELDS_TYPE_VIDEOS = 1;
|
|
243
|
-
USER_FIELDS_TYPE_PRODUCTS = 2;
|
|
244
|
-
USER_FIELDS_TYPE_SUBSCRIPTIONS = 3;
|
|
245
|
-
USER_FIELDS_TYPE_SUBSCRIBERS = 4;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
message GetUserFieldsRequest {
|
|
249
|
-
string username = 1;
|
|
250
|
-
UserFieldsType type = 2;
|
|
251
|
-
int32 page = 3;
|
|
252
|
-
int32 limit = 4;
|
|
253
|
-
string viewer_user_id = 5; // optional
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
message GetUserFieldsResponse {
|
|
257
|
-
repeated Video videos = 1;
|
|
258
|
-
repeated Product products = 2;
|
|
259
|
-
repeated User subscriptions = 3;
|
|
260
|
-
repeated User subscribers = 4;
|
|
261
|
-
int32 total = 5;
|
|
262
|
-
int32 page = 6;
|
|
263
|
-
int32 limit = 7;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// =================================================================
|
|
267
|
-
// Subscriptions
|
|
268
|
-
// =================================================================
|
|
269
|
-
|
|
270
|
-
message SubscriptionRequest {
|
|
271
|
-
string subscriber_id = 1; // the authenticated user performing the action
|
|
272
|
-
string target_id = 2; // the user being (un)subscribed to/from
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
message SubscriptionResponse {
|
|
276
|
-
bool subscribed = 1; // state after the call
|
|
277
|
-
int32 subscribers_count = 2; // target's subscriber count after the call
|
|
278
|
-
}
|
|
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 UpdateUserRole(UpdateUserRoleRequest) returns (UserResponse);
|
|
10
|
+
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse);
|
|
11
|
+
rpc GetActiveDevices(GetActiveDevicesRequest) returns (GetActiveDevicesResponse);
|
|
12
|
+
rpc ManageDevices(ManageDevicesRequest) returns (ManageDevicesResponse);
|
|
13
|
+
rpc GetUserFields(GetUserFieldsRequest) returns (GetUserFieldsResponse);
|
|
14
|
+
|
|
15
|
+
rpc CreateSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
16
|
+
rpc DeleteSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
17
|
+
|
|
18
|
+
rpc BanUser(BanUserRequest) returns (UserResponse);
|
|
19
|
+
rpc UnbanUser(UnbanUserRequest) returns (UserResponse);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// =================================================================
|
|
23
|
+
// Common types
|
|
24
|
+
// =================================================================
|
|
25
|
+
|
|
26
|
+
message User {
|
|
27
|
+
string id = 1;
|
|
28
|
+
string email = 2;
|
|
29
|
+
string username = 3;
|
|
30
|
+
string avatar_url = 4;
|
|
31
|
+
repeated string roles = 5;
|
|
32
|
+
string role = 6; // primary role for backwards compat
|
|
33
|
+
string created_at = 7; // ISO 8601
|
|
34
|
+
string updated_at = 8;
|
|
35
|
+
bool is_banned = 9;
|
|
36
|
+
string banned_until = 10; // ISO 8601, empty = permanent/none
|
|
37
|
+
string ban_reason = 11;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message BanUserRequest {
|
|
41
|
+
string admin_id = 1;
|
|
42
|
+
string user_id = 2;
|
|
43
|
+
string reason = 3;
|
|
44
|
+
string until = 4; // ISO 8601; empty = permanent ban
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message UnbanUserRequest {
|
|
48
|
+
string admin_id = 1;
|
|
49
|
+
string user_id = 2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message Country {
|
|
53
|
+
string id = 1;
|
|
54
|
+
string code = 2;
|
|
55
|
+
string name = 3;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message SocialMedia {
|
|
59
|
+
string id = 1;
|
|
60
|
+
string platform = 2;
|
|
61
|
+
string url = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message CreateSocialMedia {
|
|
65
|
+
string platform = 1;
|
|
66
|
+
string url = 2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message ProductUser {
|
|
70
|
+
string id = 1;
|
|
71
|
+
string username = 2;
|
|
72
|
+
string avatar_url = 3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message Category {
|
|
76
|
+
string id = 1;
|
|
77
|
+
string name = 2;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message Product {
|
|
81
|
+
string id = 1;
|
|
82
|
+
string name = 2;
|
|
83
|
+
string description = 3;
|
|
84
|
+
string price = 4; // Decimal as string (D7)
|
|
85
|
+
string created_at = 5;
|
|
86
|
+
string updated_at = 6;
|
|
87
|
+
// profile-card preview fields
|
|
88
|
+
string preview = 7;
|
|
89
|
+
string final_price = 8; // Decimal as string
|
|
90
|
+
string average_rating = 9; // number as string
|
|
91
|
+
string status = 10;
|
|
92
|
+
// Author of the product (same person as the profile owner, but echoed per
|
|
93
|
+
// product so cards can render the author independently).
|
|
94
|
+
ProductUser user = 11;
|
|
95
|
+
repeated Category categories = 12;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message Video {
|
|
99
|
+
string id = 1;
|
|
100
|
+
string title = 2;
|
|
101
|
+
string description = 3;
|
|
102
|
+
string url = 4;
|
|
103
|
+
string created_at = 5;
|
|
104
|
+
string updated_at = 6;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message ActiveDevice {
|
|
108
|
+
string id = 1;
|
|
109
|
+
string user_agent = 2;
|
|
110
|
+
string ip = 3;
|
|
111
|
+
string created_at = 4;
|
|
112
|
+
string last_used_at = 5;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message ProfileStats {
|
|
116
|
+
int32 subscribers_count = 1;
|
|
117
|
+
int32 subscriptions_count = 2;
|
|
118
|
+
int32 products_count = 3;
|
|
119
|
+
int32 videos_count = 4;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// =================================================================
|
|
123
|
+
// GetPublicProfile
|
|
124
|
+
// =================================================================
|
|
125
|
+
|
|
126
|
+
message GetPublicProfileRequest {
|
|
127
|
+
string username = 1;
|
|
128
|
+
string viewer_user_id = 2; // optional — present when caller is authenticated
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message PublicProfileResponse {
|
|
132
|
+
string id = 1;
|
|
133
|
+
string username = 2;
|
|
134
|
+
string full_name = 3;
|
|
135
|
+
string rating = 4; // Decimal as string
|
|
136
|
+
string about_me = 5;
|
|
137
|
+
repeated SocialMedia social_media = 6;
|
|
138
|
+
ProfileStats stats = 7;
|
|
139
|
+
repeated Video videos = 8;
|
|
140
|
+
repeated Product products = 9;
|
|
141
|
+
Country country = 10;
|
|
142
|
+
string avatar_url = 11;
|
|
143
|
+
string banner_url = 12;
|
|
144
|
+
string role = 13;
|
|
145
|
+
string created_at = 14;
|
|
146
|
+
bool hide_subscriptions = 15;
|
|
147
|
+
// Either populated lists or empty depending on hide_subscriptions
|
|
148
|
+
repeated User subscriptions = 16;
|
|
149
|
+
repeated User subscribers = 17;
|
|
150
|
+
bool is_owner = 18;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// =================================================================
|
|
154
|
+
// UpdateProfile
|
|
155
|
+
// =================================================================
|
|
156
|
+
|
|
157
|
+
message UpdateProfileRequest {
|
|
158
|
+
string user_id = 1;
|
|
159
|
+
string full_name = 2;
|
|
160
|
+
string about_me = 3;
|
|
161
|
+
bool newsletter_subscription = 4;
|
|
162
|
+
bool hide_subscriptions = 5;
|
|
163
|
+
string avatar_url = 6;
|
|
164
|
+
string banner_url = 7;
|
|
165
|
+
string country_id = 8;
|
|
166
|
+
string timezone = 9;
|
|
167
|
+
repeated CreateSocialMedia social_media = 10;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// =================================================================
|
|
171
|
+
// UpdateUser
|
|
172
|
+
// =================================================================
|
|
173
|
+
|
|
174
|
+
message UpdateUserRequest {
|
|
175
|
+
string user_id = 1;
|
|
176
|
+
string username = 2;
|
|
177
|
+
string email = 3;
|
|
178
|
+
string code = 4; // confirmation code when changing email/username
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
message UserResponse {
|
|
182
|
+
User user = 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// =================================================================
|
|
186
|
+
// UpdateUserRole (admin)
|
|
187
|
+
// =================================================================
|
|
188
|
+
|
|
189
|
+
message UpdateUserRoleRequest {
|
|
190
|
+
string admin_id = 1;
|
|
191
|
+
string user_id = 2;
|
|
192
|
+
string role = 3;
|
|
193
|
+
string action = 4; // "grant" (default) | "revoke"
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// =================================================================
|
|
197
|
+
// GetUsers (paginated)
|
|
198
|
+
// =================================================================
|
|
199
|
+
|
|
200
|
+
message GetUsersRequest {
|
|
201
|
+
string page = 1;
|
|
202
|
+
string limit = 2;
|
|
203
|
+
string search = 3;
|
|
204
|
+
string role_name = 4;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
message GetUsersResponse {
|
|
208
|
+
repeated User items = 1;
|
|
209
|
+
int32 total = 2;
|
|
210
|
+
int32 page = 3;
|
|
211
|
+
int32 limit = 4;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// =================================================================
|
|
215
|
+
// Active devices
|
|
216
|
+
// =================================================================
|
|
217
|
+
|
|
218
|
+
message GetActiveDevicesRequest {
|
|
219
|
+
string user_id = 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
message GetActiveDevicesResponse {
|
|
223
|
+
repeated ActiveDevice devices = 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
message ManageDevicesRequest {
|
|
227
|
+
string user_id = 1;
|
|
228
|
+
repeated string device_ids_to_remove = 2;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
message ManageDevicesResponse {
|
|
232
|
+
bool ok = 1;
|
|
233
|
+
int32 removed_count = 2;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// =================================================================
|
|
237
|
+
// GetUserFields — paginated dynamic field sets
|
|
238
|
+
// =================================================================
|
|
239
|
+
|
|
240
|
+
enum UserFieldsType {
|
|
241
|
+
USER_FIELDS_TYPE_UNSPECIFIED = 0;
|
|
242
|
+
USER_FIELDS_TYPE_VIDEOS = 1;
|
|
243
|
+
USER_FIELDS_TYPE_PRODUCTS = 2;
|
|
244
|
+
USER_FIELDS_TYPE_SUBSCRIPTIONS = 3;
|
|
245
|
+
USER_FIELDS_TYPE_SUBSCRIBERS = 4;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
message GetUserFieldsRequest {
|
|
249
|
+
string username = 1;
|
|
250
|
+
UserFieldsType type = 2;
|
|
251
|
+
int32 page = 3;
|
|
252
|
+
int32 limit = 4;
|
|
253
|
+
string viewer_user_id = 5; // optional
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
message GetUserFieldsResponse {
|
|
257
|
+
repeated Video videos = 1;
|
|
258
|
+
repeated Product products = 2;
|
|
259
|
+
repeated User subscriptions = 3;
|
|
260
|
+
repeated User subscribers = 4;
|
|
261
|
+
int32 total = 5;
|
|
262
|
+
int32 page = 6;
|
|
263
|
+
int32 limit = 7;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// =================================================================
|
|
267
|
+
// Subscriptions
|
|
268
|
+
// =================================================================
|
|
269
|
+
|
|
270
|
+
message SubscriptionRequest {
|
|
271
|
+
string subscriber_id = 1; // the authenticated user performing the action
|
|
272
|
+
string target_id = 2; // the user being (un)subscribed to/from
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
message SubscriptionResponse {
|
|
276
|
+
bool subscribed = 1; // state after the call
|
|
277
|
+
int32 subscribers_count = 2; // target's subscriber count after the call
|
|
278
|
+
}
|