@verychat/channel-protos 1.0.20 → 1.0.22

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;
@@ -201,10 +209,11 @@ service ChannelService {
201
209
  rpc CreateChannel (CreateChannelRequest) returns (CreateChannelResponse);
202
210
  rpc EditChannel (EditChannelRequest) returns (EditChannelResponse);
203
211
 
204
- rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
205
- rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
206
-
207
- rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
212
+ rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
213
+ rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
214
+ rpc GetRecommendChannels (GetRecommendChannelsRequest) returns (GetRecommendChannelsResponse);
215
+
216
+ rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
208
217
 
209
218
  rpc ReadMessage (ReadMessageRequest) returns (Empty);
210
219
  rpc GetViewCount (GetMessageViewCountRequest) returns (GetMessageViewCountResponse);
@@ -242,4 +251,4 @@ service ChannelService {
242
251
  rpc ChannelChatGetMessage (GetMessageRequest) returns (GetMessageResponse);
243
252
  rpc ChannelChatGetMessages (GetMessagesRequest) returns (GetMessagesResponse);
244
253
  rpc ChannelChatGetHistorys (GetHistorysRequest) returns (GetHistorysResponse);
245
- }
254
+ }
@@ -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;
@@ -118,13 +129,7 @@ message ChannelChatInfo {
118
129
  optional int64 lastChannelChatStreamId = 3;
119
130
  }
120
131
 
121
-
122
- message Highlight {
123
- repeated string title = 1;
124
- repeated string description = 2;
125
- }
126
-
127
- message ChannelESSchema {
132
+ message ChannelSearchData {
128
133
  string channelId = 1;
129
134
  optional string title = 2;
130
135
  optional string description = 3;
@@ -133,17 +138,11 @@ message ChannelESSchema {
133
138
  optional int32 joinUserCount = 6;
134
139
  optional string lastMessage = 7;
135
140
  optional ChannelType channelType = 8;
136
- }
137
-
138
- message SearchResultItem {
139
- string id = 1;
140
- optional ChannelESSchema source = 2;
141
- optional Highlight highlight = 3;
141
+ int32 score = 9;
142
142
  }
143
143
 
144
144
  message SearchChannelResult {
145
- int32 total = 1;
146
- repeated SearchResultItem items = 2;
145
+ repeated ChannelSearchData datas = 1;
147
146
  }
148
147
 
149
148
  enum MessageType {
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';
@@ -47,6 +49,7 @@ export { HistoryOperation } from './proto-libs/channel-types';
47
49
  export { LastMessage } from './proto-libs/channel-types';
48
50
  export { ChannelInfo } from './proto-libs/channel-types';
49
51
  export { Channel } from './proto-libs/channel-types';
52
+ export { RecommendChannel } from './proto-libs/channel-types';
50
53
  export { UserChannel } from './proto-libs/channel-types';
51
54
  export { CreateChannelDto } from './proto-libs/channel-types';
52
55
  export { EditChannelDto } from './proto-libs/channel-types';
@@ -57,7 +60,5 @@ export { Reaction } from './proto-libs/channel-types';
57
60
  export { History } from './proto-libs/channel-types';
58
61
  export { Operator } from './proto-libs/channel-types';
59
62
  export { ChannelChatInfo } from './proto-libs/channel-types';
60
- export { Highlight } from './proto-libs/channel-types';
61
- export { ChannelESSchema } from './proto-libs/channel-types';
62
- export { SearchResultItem } from './proto-libs/channel-types';
63
+ export { ChannelSearchData } from './proto-libs/channel-types';
63
64
  export { SearchChannelResult } 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, 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;
@@ -170,6 +176,7 @@ export interface ChannelServiceClient {
170
176
  editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
171
177
  getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
172
178
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
179
+ getRecommendChannels(request: GetRecommendChannelsRequest, metadata?: Metadata): Observable<GetRecommendChannelsResponse>;
173
180
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
174
181
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
175
182
  getViewCount(request: GetMessageViewCountRequest, metadata?: Metadata): Observable<GetMessageViewCountResponse>;
@@ -204,6 +211,7 @@ export interface ChannelServiceController {
204
211
  editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
205
212
  getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
206
213
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
214
+ getRecommendChannels(request: GetRecommendChannelsRequest, metadata?: Metadata): Observable<GetRecommendChannelsResponse>;
207
215
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
208
216
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
209
217
  getViewCount(request: GetMessageViewCountRequest, metadata?: Metadata): Observable<GetMessageViewCountResponse>;
@@ -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",
@@ -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;
@@ -121,11 +131,7 @@ export interface ChannelChatInfo {
121
131
  lastChannelChatMessageSeq?: number | undefined;
122
132
  lastChannelChatStreamId?: number | undefined;
123
133
  }
124
- export interface Highlight {
125
- title: string[];
126
- description: string[];
127
- }
128
- export interface ChannelESSchema {
134
+ export interface ChannelSearchData {
129
135
  channelId: string;
130
136
  title?: string | undefined;
131
137
  description?: string | undefined;
@@ -134,14 +140,9 @@ export interface ChannelESSchema {
134
140
  joinUserCount?: number | undefined;
135
141
  lastMessage?: string | undefined;
136
142
  channelType?: ChannelType | undefined;
137
- }
138
- export interface SearchResultItem {
139
- id: string;
140
- source?: ChannelESSchema | undefined;
141
- highlight?: Highlight | undefined;
143
+ score: number;
142
144
  }
143
145
  export interface SearchChannelResult {
144
- total: number;
145
- items: SearchResultItem[];
146
+ datas: ChannelSearchData[];
146
147
  }
147
148
  export declare const CHANNEL_PACKAGE_NAME = "channel";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verychat/channel-protos",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,6 +19,7 @@ import {
19
19
  History,
20
20
  Operator,
21
21
  ReactionMessageDto,
22
+ RecommendChannel,
22
23
  SearchChannelResult,
23
24
  UserChannel,
24
25
  } from "./channel-types";
@@ -40,6 +41,14 @@ export interface GetMySubscribedChannelResponse {
40
41
  userChannels: UserChannel[];
41
42
  }
42
43
 
44
+ export interface GetRecommendChannelsRequest {
45
+ userId: number;
46
+ }
47
+
48
+ export interface GetRecommendChannelsResponse {
49
+ channels: RecommendChannel[];
50
+ }
51
+
43
52
  export interface CreateChannelRequest {
44
53
  userId: number;
45
54
  dto: CreateChannelDto | undefined;
@@ -236,6 +245,11 @@ export interface ChannelServiceClient {
236
245
 
237
246
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
238
247
 
248
+ getRecommendChannels(
249
+ request: GetRecommendChannelsRequest,
250
+ metadata?: Metadata,
251
+ ): Observable<GetRecommendChannelsResponse>;
252
+
239
253
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
240
254
 
241
255
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -305,6 +319,11 @@ export interface ChannelServiceController {
305
319
 
306
320
  getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
307
321
 
322
+ getRecommendChannels(
323
+ request: GetRecommendChannelsRequest,
324
+ metadata?: Metadata,
325
+ ): Observable<GetRecommendChannelsResponse>;
326
+
308
327
  getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
309
328
 
310
329
  readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -372,6 +391,7 @@ export function ChannelServiceControllerMethods() {
372
391
  "editChannel",
373
392
  "getMyChannels",
374
393
  "getMySubscribeChannels",
394
+ "getRecommendChannels",
375
395
  "getChannelInfo",
376
396
  "readMessage",
377
397
  "getViewCount",
@@ -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;
@@ -146,12 +157,7 @@ export interface ChannelChatInfo {
146
157
  lastChannelChatStreamId?: number | undefined;
147
158
  }
148
159
 
149
- export interface Highlight {
150
- title: string[];
151
- description: string[];
152
- }
153
-
154
- export interface ChannelESSchema {
160
+ export interface ChannelSearchData {
155
161
  channelId: string;
156
162
  title?: string | undefined;
157
163
  description?: string | undefined;
@@ -160,17 +166,11 @@ export interface ChannelESSchema {
160
166
  joinUserCount?: number | undefined;
161
167
  lastMessage?: string | undefined;
162
168
  channelType?: ChannelType | undefined;
163
- }
164
-
165
- export interface SearchResultItem {
166
- id: string;
167
- source?: ChannelESSchema | undefined;
168
- highlight?: Highlight | undefined;
169
+ score: number;
169
170
  }
170
171
 
171
172
  export interface SearchChannelResult {
172
- total: number;
173
- items: SearchResultItem[];
173
+ datas: ChannelSearchData[];
174
174
  }
175
175
 
176
176
  export const CHANNEL_PACKAGE_NAME = "channel";