@verychat/channel-protos 1.0.21 → 1.0.23

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.
@@ -13,14 +13,22 @@ message GetMyChannelsResponse {
13
13
  repeated Channel channels = 1;
14
14
  }
15
15
 
16
- message GetMySubscribedChannelResponse {
17
- repeated UserChannel userChannels = 1;
18
- }
19
-
20
- message CreateChannelRequest {
21
- int32 userId = 1;
22
- CreateChannelDto dto = 2;
23
- }
16
+ message GetMySubscribedChannelResponse {
17
+ repeated UserChannel userChannels = 1;
18
+ }
19
+
20
+ message GetRecommendChannelsRequest {
21
+ int32 userId = 1;
22
+ }
23
+
24
+ message GetRecommendChannelsResponse {
25
+ repeated RecommendChannel channels = 1;
26
+ }
27
+
28
+ message CreateChannelRequest {
29
+ int32 userId = 1;
30
+ CreateChannelDto dto = 2;
31
+ }
24
32
 
25
33
  message CreateChannelResponse {
26
34
  string channelId = 1;
@@ -153,15 +161,24 @@ message GetMessagesRequest {
153
161
  int32 take = 4;
154
162
  }
155
163
 
156
- message GetMessagesResponse {
157
- repeated ChannelMessage messages = 1;
158
- }
159
-
160
- message GetHistorysRequest {
161
- string channelId = 1;
162
- int64 lastStreamId = 2;
163
- int64 streamId = 3;
164
- }
164
+ message GetMessagesResponse {
165
+ repeated ChannelMessage messages = 1;
166
+ }
167
+
168
+ message GetNewChannelMessageRequest {
169
+ int32 userId = 1;
170
+ optional int32 page = 2;
171
+ }
172
+
173
+ message GetNewChannelMessageResponse {
174
+ repeated NewChannelMessage messages = 1;
175
+ }
176
+
177
+ message GetHistorysRequest {
178
+ string channelId = 1;
179
+ int64 lastStreamId = 2;
180
+ int64 streamId = 3;
181
+ }
165
182
 
166
183
  message GetHistorysResponse {
167
184
  repeated History historys = 1;
@@ -201,10 +218,11 @@ service ChannelService {
201
218
  rpc CreateChannel (CreateChannelRequest) returns (CreateChannelResponse);
202
219
  rpc EditChannel (EditChannelRequest) returns (EditChannelResponse);
203
220
 
204
- rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
205
- rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
206
-
207
- rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
221
+ rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
222
+ rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
223
+ rpc GetRecommendChannels (GetRecommendChannelsRequest) returns (GetRecommendChannelsResponse);
224
+
225
+ rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
208
226
 
209
227
  rpc ReadMessage (ReadMessageRequest) returns (Empty);
210
228
  rpc GetViewCount (GetMessageViewCountRequest) returns (GetMessageViewCountResponse);
@@ -225,9 +243,10 @@ service ChannelService {
225
243
  rpc SetOperator (SetOperatorRequest) returns (Empty);
226
244
  rpc RemoveOperator (RemoveOperatorRequest) returns (RemoveOperatorResponse);
227
245
 
228
- rpc GetMessage (GetMessageRequest) returns (GetMessageResponse);
229
- rpc GetMessages (GetMessagesRequest) returns (GetMessagesResponse);
230
- rpc GetHistorys (GetHistorysRequest) returns (GetHistorysResponse);
246
+ rpc GetMessage (GetMessageRequest) returns (GetMessageResponse);
247
+ rpc GetMessages (GetMessagesRequest) returns (GetMessagesResponse);
248
+ rpc GetNewChannelMessage (GetNewChannelMessageRequest) returns (GetNewChannelMessageResponse);
249
+ rpc GetHistorys (GetHistorysRequest) returns (GetHistorysResponse);
231
250
 
232
251
  rpc HoldMessage (HoldMessageRequest) returns (Empty);
233
252
  rpc GetMembers (GetMembersRequest) returns (GetMembersResponse);
@@ -242,4 +261,4 @@ service ChannelService {
242
261
  rpc ChannelChatGetMessage (GetMessageRequest) returns (GetMessageResponse);
243
262
  rpc ChannelChatGetMessages (GetMessagesRequest) returns (GetMessagesResponse);
244
263
  rpc ChannelChatGetHistorys (GetHistorysRequest) returns (GetHistorysResponse);
245
- }
264
+ }
@@ -36,6 +36,17 @@ message Channel {
36
36
  string countryCode = 9;
37
37
  }
38
38
 
39
+ message RecommendChannel {
40
+ string channelId = 1;
41
+ optional string title = 2;
42
+ optional string description = 3;
43
+ ChannelType channelType = 4;
44
+ optional string thumbnailUrl = 5;
45
+ int32 joinUserCount = 6;
46
+ optional int32 ownerId = 7;
47
+ optional string lastMessage = 8;
48
+ }
49
+
39
50
  message UserChannel {
40
51
  string channelId = 1;
41
52
  Channel channel = 2;
@@ -75,23 +86,33 @@ message ReactionMessageDto {
75
86
  bool add = 5;
76
87
  }
77
88
 
78
- message ChannelMessage {
79
- int32 userId = 1;
80
- MessageType type = 2;
81
- string createdAt = 3;
82
- string deletedAt = 4;
83
- int32 seq = 5;
84
- string message = 6;
85
- repeated int32 mentions = 7;
86
- int32 reply = 8;
87
- repeated Reaction reactions = 9;
88
- int64 streamId = 10;
89
- }
90
-
91
- message Reaction {
92
- int32 userId = 1;
93
- string reactionCode = 2;
94
- }
89
+ message ChannelMessage {
90
+ int32 userId = 1;
91
+ MessageType type = 2;
92
+ string createdAt = 3;
93
+ string deletedAt = 4;
94
+ int32 seq = 5;
95
+ string message = 6;
96
+ repeated int32 mentions = 7;
97
+ int32 reply = 8;
98
+ repeated Reaction reactions = 9;
99
+ int64 streamId = 10;
100
+ }
101
+
102
+ message NewChannelMessage {
103
+ string channelId = 1;
104
+ int32 seq = 2;
105
+ int32 userId = 3;
106
+ string message = 4;
107
+ MessageType type = 5;
108
+ string createdAt = 6;
109
+ int32 likeCount = 7;
110
+ }
111
+
112
+ message Reaction {
113
+ int32 userId = 1;
114
+ string reactionCode = 2;
115
+ }
95
116
 
96
117
  message History {
97
118
  int64 streamId = 1;
@@ -151,4 +172,4 @@ enum HistoryOperation {
151
172
  REACTION_REMOVE = 1;
152
173
  MESSAGE_EDIT = 2;
153
174
  MESSAGE_DELETE = 3;
154
- }
175
+ }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export { Empty } from './proto-libs/channel-services';
2
2
  export { GetChannelRequest } from './proto-libs/channel-services';
3
3
  export { GetMyChannelsResponse } from './proto-libs/channel-services';
4
4
  export { GetMySubscribedChannelResponse } from './proto-libs/channel-services';
5
+ export { GetRecommendChannelsRequest } from './proto-libs/channel-services';
6
+ export { GetRecommendChannelsResponse } from './proto-libs/channel-services';
5
7
  export { CreateChannelRequest } from './proto-libs/channel-services';
6
8
  export { CreateChannelResponse } from './proto-libs/channel-services';
7
9
  export { EditChannelRequest } from './proto-libs/channel-services';
@@ -30,6 +32,8 @@ export { GetMessageRequest } from './proto-libs/channel-services';
30
32
  export { GetMessageResponse } from './proto-libs/channel-services';
31
33
  export { GetMessagesRequest } from './proto-libs/channel-services';
32
34
  export { GetMessagesResponse } from './proto-libs/channel-services';
35
+ export { GetNewChannelMessageRequest } from './proto-libs/channel-services';
36
+ export { GetNewChannelMessageResponse } from './proto-libs/channel-services';
33
37
  export { GetHistorysRequest } from './proto-libs/channel-services';
34
38
  export { GetHistorysResponse } from './proto-libs/channel-services';
35
39
  export { HoldMessageRequest } from './proto-libs/channel-services';
@@ -47,12 +51,14 @@ export { HistoryOperation } from './proto-libs/channel-types';
47
51
  export { LastMessage } from './proto-libs/channel-types';
48
52
  export { ChannelInfo } from './proto-libs/channel-types';
49
53
  export { Channel } from './proto-libs/channel-types';
54
+ export { RecommendChannel } from './proto-libs/channel-types';
50
55
  export { UserChannel } from './proto-libs/channel-types';
51
56
  export { CreateChannelDto } from './proto-libs/channel-types';
52
57
  export { EditChannelDto } from './proto-libs/channel-types';
53
58
  export { CreateMessageDto } from './proto-libs/channel-types';
54
59
  export { ReactionMessageDto } from './proto-libs/channel-types';
55
60
  export { ChannelMessage } from './proto-libs/channel-types';
61
+ export { NewChannelMessage } from './proto-libs/channel-types';
56
62
  export { Reaction } from './proto-libs/channel-types';
57
63
  export { History } from './proto-libs/channel-types';
58
64
  export { Operator } from './proto-libs/channel-types';
@@ -1,6 +1,6 @@
1
1
  import { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
- import { Channel, ChannelChatInfo, ChannelInfo, ChannelMessage, CreateChannelDto, CreateMessageDto, EditChannelDto, History, Operator, ReactionMessageDto, SearchChannelResult, UserChannel } from "./channel-types";
3
+ import { Channel, ChannelChatInfo, ChannelInfo, ChannelMessage, CreateChannelDto, CreateMessageDto, EditChannelDto, History, NewChannelMessage, Operator, ReactionMessageDto, RecommendChannel, SearchChannelResult, UserChannel } from "./channel-types";
4
4
  export declare const protobufPackage = "channel";
5
5
  export interface Empty {
6
6
  }
@@ -13,6 +13,12 @@ export interface GetMyChannelsResponse {
13
13
  export interface GetMySubscribedChannelResponse {
14
14
  userChannels: UserChannel[];
15
15
  }
16
+ export interface GetRecommendChannelsRequest {
17
+ userId: number;
18
+ }
19
+ export interface GetRecommendChannelsResponse {
20
+ channels: RecommendChannel[];
21
+ }
16
22
  export interface CreateChannelRequest {
17
23
  userId: number;
18
24
  dto: CreateChannelDto | undefined;
@@ -132,6 +138,13 @@ export interface GetMessagesRequest {
132
138
  export interface GetMessagesResponse {
133
139
  messages: ChannelMessage[];
134
140
  }
141
+ export interface GetNewChannelMessageRequest {
142
+ userId: number;
143
+ page?: number | undefined;
144
+ }
145
+ export interface GetNewChannelMessageResponse {
146
+ messages: NewChannelMessage[];
147
+ }
135
148
  export interface GetHistorysRequest {
136
149
  channelId: string;
137
150
  lastStreamId: number;
@@ -170,6 +183,7 @@ export interface ChannelServiceClient {
170
183
  editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
171
184
  getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
172
185
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
186
+ getRecommendChannels(request: GetRecommendChannelsRequest, metadata?: Metadata): Observable<GetRecommendChannelsResponse>;
173
187
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
174
188
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
175
189
  getViewCount(request: GetMessageViewCountRequest, metadata?: Metadata): Observable<GetMessageViewCountResponse>;
@@ -186,6 +200,7 @@ export interface ChannelServiceClient {
186
200
  removeOperator(request: RemoveOperatorRequest, metadata?: Metadata): Observable<RemoveOperatorResponse>;
187
201
  getMessage(request: GetMessageRequest, metadata?: Metadata): Observable<GetMessageResponse>;
188
202
  getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
203
+ getNewChannelMessage(request: GetNewChannelMessageRequest, metadata?: Metadata): Observable<GetNewChannelMessageResponse>;
189
204
  getHistorys(request: GetHistorysRequest, metadata?: Metadata): Observable<GetHistorysResponse>;
190
205
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
191
206
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
@@ -204,6 +219,7 @@ export interface ChannelServiceController {
204
219
  editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
205
220
  getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
206
221
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
222
+ getRecommendChannels(request: GetRecommendChannelsRequest, metadata?: Metadata): Observable<GetRecommendChannelsResponse>;
207
223
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
208
224
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
209
225
  getViewCount(request: GetMessageViewCountRequest, metadata?: Metadata): Observable<GetMessageViewCountResponse>;
@@ -220,6 +236,7 @@ export interface ChannelServiceController {
220
236
  removeOperator(request: RemoveOperatorRequest, metadata?: Metadata): Observable<RemoveOperatorResponse>;
221
237
  getMessage(request: GetMessageRequest, metadata?: Metadata): Observable<GetMessageResponse>;
222
238
  getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
239
+ getNewChannelMessage(request: GetNewChannelMessageRequest, metadata?: Metadata): Observable<GetNewChannelMessageResponse>;
223
240
  getHistorys(request: GetHistorysRequest, metadata?: Metadata): Observable<GetHistorysResponse>;
224
241
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
225
242
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
@@ -17,6 +17,7 @@ function ChannelServiceControllerMethods() {
17
17
  "editChannel",
18
18
  "getMyChannels",
19
19
  "getMySubscribeChannels",
20
+ "getRecommendChannels",
20
21
  "getChannelInfo",
21
22
  "readMessage",
22
23
  "getViewCount",
@@ -33,6 +34,7 @@ function ChannelServiceControllerMethods() {
33
34
  "removeOperator",
34
35
  "getMessage",
35
36
  "getMessages",
37
+ "getNewChannelMessage",
36
38
  "getHistorys",
37
39
  "holdMessage",
38
40
  "getMembers",
@@ -49,6 +49,16 @@ export interface Channel {
49
49
  ownerId: number;
50
50
  countryCode: string;
51
51
  }
52
+ export interface RecommendChannel {
53
+ channelId: string;
54
+ title?: string | undefined;
55
+ description?: string | undefined;
56
+ channelType: ChannelType;
57
+ thumbnailUrl?: string | undefined;
58
+ joinUserCount: number;
59
+ ownerId?: number | undefined;
60
+ lastMessage?: string | undefined;
61
+ }
52
62
  export interface UserChannel {
53
63
  channelId: string;
54
64
  channel: Channel | undefined;
@@ -95,6 +105,15 @@ export interface ChannelMessage {
95
105
  reactions: Reaction[];
96
106
  streamId: number;
97
107
  }
108
+ export interface NewChannelMessage {
109
+ channelId: string;
110
+ seq: number;
111
+ userId: number;
112
+ message: string;
113
+ type: MessageType;
114
+ createdAt: string;
115
+ likeCount: number;
116
+ }
98
117
  export interface Reaction {
99
118
  userId: number;
100
119
  reactionCode: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verychat/channel-protos",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,8 +17,10 @@ import {
17
17
  CreateMessageDto,
18
18
  EditChannelDto,
19
19
  History,
20
+ NewChannelMessage,
20
21
  Operator,
21
22
  ReactionMessageDto,
23
+ RecommendChannel,
22
24
  SearchChannelResult,
23
25
  UserChannel,
24
26
  } from "./channel-types";
@@ -40,6 +42,14 @@ export interface GetMySubscribedChannelResponse {
40
42
  userChannels: UserChannel[];
41
43
  }
42
44
 
45
+ export interface GetRecommendChannelsRequest {
46
+ userId: number;
47
+ }
48
+
49
+ export interface GetRecommendChannelsResponse {
50
+ channels: RecommendChannel[];
51
+ }
52
+
43
53
  export interface CreateChannelRequest {
44
54
  userId: number;
45
55
  dto: CreateChannelDto | undefined;
@@ -185,6 +195,15 @@ export interface GetMessagesResponse {
185
195
  messages: ChannelMessage[];
186
196
  }
187
197
 
198
+ export interface GetNewChannelMessageRequest {
199
+ userId: number;
200
+ page?: number | undefined;
201
+ }
202
+
203
+ export interface GetNewChannelMessageResponse {
204
+ messages: NewChannelMessage[];
205
+ }
206
+
188
207
  export interface GetHistorysRequest {
189
208
  channelId: string;
190
209
  lastStreamId: number;
@@ -236,6 +255,11 @@ export interface ChannelServiceClient {
236
255
 
237
256
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
238
257
 
258
+ getRecommendChannels(
259
+ request: GetRecommendChannelsRequest,
260
+ metadata?: Metadata,
261
+ ): Observable<GetRecommendChannelsResponse>;
262
+
239
263
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
240
264
 
241
265
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -268,6 +292,11 @@ export interface ChannelServiceClient {
268
292
 
269
293
  getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
270
294
 
295
+ getNewChannelMessage(
296
+ request: GetNewChannelMessageRequest,
297
+ metadata?: Metadata,
298
+ ): Observable<GetNewChannelMessageResponse>;
299
+
271
300
  getHistorys(request: GetHistorysRequest, metadata?: Metadata): Observable<GetHistorysResponse>;
272
301
 
273
302
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -305,6 +334,11 @@ export interface ChannelServiceController {
305
334
 
306
335
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
307
336
 
337
+ getRecommendChannels(
338
+ request: GetRecommendChannelsRequest,
339
+ metadata?: Metadata,
340
+ ): Observable<GetRecommendChannelsResponse>;
341
+
308
342
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
309
343
 
310
344
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -337,6 +371,11 @@ export interface ChannelServiceController {
337
371
 
338
372
  getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
339
373
 
374
+ getNewChannelMessage(
375
+ request: GetNewChannelMessageRequest,
376
+ metadata?: Metadata,
377
+ ): Observable<GetNewChannelMessageResponse>;
378
+
340
379
  getHistorys(request: GetHistorysRequest, metadata?: Metadata): Observable<GetHistorysResponse>;
341
380
 
342
381
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -372,6 +411,7 @@ export function ChannelServiceControllerMethods() {
372
411
  "editChannel",
373
412
  "getMyChannels",
374
413
  "getMySubscribeChannels",
414
+ "getRecommendChannels",
375
415
  "getChannelInfo",
376
416
  "readMessage",
377
417
  "getViewCount",
@@ -388,6 +428,7 @@ export function ChannelServiceControllerMethods() {
388
428
  "removeOperator",
389
429
  "getMessage",
390
430
  "getMessages",
431
+ "getNewChannelMessage",
391
432
  "getHistorys",
392
433
  "holdMessage",
393
434
  "getMembers",
@@ -64,6 +64,17 @@ export interface Channel {
64
64
  countryCode: string;
65
65
  }
66
66
 
67
+ export interface RecommendChannel {
68
+ channelId: string;
69
+ title?: string | undefined;
70
+ description?: string | undefined;
71
+ channelType: ChannelType;
72
+ thumbnailUrl?: string | undefined;
73
+ joinUserCount: number;
74
+ ownerId?: number | undefined;
75
+ lastMessage?: string | undefined;
76
+ }
77
+
67
78
  export interface UserChannel {
68
79
  channelId: string;
69
80
  channel: Channel | undefined;
@@ -116,6 +127,16 @@ export interface ChannelMessage {
116
127
  streamId: number;
117
128
  }
118
129
 
130
+ export interface NewChannelMessage {
131
+ channelId: string;
132
+ seq: number;
133
+ userId: number;
134
+ message: string;
135
+ type: MessageType;
136
+ createdAt: string;
137
+ likeCount: number;
138
+ }
139
+
119
140
  export interface Reaction {
120
141
  userId: number;
121
142
  reactionCode: string;