@verychat/channel-protos 1.0.11 → 1.0.14

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.
@@ -1,227 +1,239 @@
1
- syntax = "proto3";
2
-
3
- package channel;
4
- import "channel-types.proto";
5
-
6
- message Empty {}
7
-
8
- message GetChannelRequest {
9
- int32 userId = 1;
10
- }
11
-
12
- message GetMyChannelsResponse {
13
- repeated Channel channels = 1;
14
- }
15
-
16
- message GetMySubscribedChannelResponse {
17
- repeated UserChannel userChannels = 1;
18
- }
19
-
20
- message CreateChannelRequest {
21
- int32 userId = 1;
22
- CreateChannelDto dto = 2;
23
- }
24
-
25
- message CreateChannelResponse {
26
- string channelId = 1;
27
- }
28
-
29
- message EditChannelRequest {
30
- string channelId = 1;
31
- int32 userId = 2;
32
- EditChannelDto dto = 3;
33
- }
34
-
35
- message EditChannelResponse {
36
- string channelId = 1;
37
- }
38
-
39
- message GetChannelInfoRequest {
40
- string channelId = 1;
41
- }
42
-
43
- message GetChannelInfoResponse {
44
- ChannelInfo channelInfo = 1;
45
- }
46
-
47
- message ReadMessageRequest {
48
- string channelId = 1;
49
- int32 userId = 2;
50
- int32 lastSeq = 3;
51
- }
52
-
53
- message GetMessageViewCountRequest {
54
- string channelId = 1;
55
- repeated int32 seqs = 2;
56
- }
57
-
58
- message GetMessageViewCountResponse {
59
- map<int32, int32> viewCount = 1;
60
- }
61
-
62
- message CreateMessageRequest {
63
- string channelId = 1;
64
- optional string title = 2;
65
- int32 userId = 3;
66
- CreateMessageDto dto = 4;
67
- int32 lastChatSeq = 5;
68
- }
69
-
70
- message CreateMessageResponse {
71
- int32 seq = 1;
72
- }
73
-
74
- message UpdateMessageRequest {
75
- string channelId = 1;
76
- int32 userId = 2;
77
- int32 seq = 3;
78
- string originMessage = 4;
79
- string message = 5;
80
- }
81
-
82
- message DeleteMessageRequest {
83
- string channelId = 1;
84
- int32 seq = 2;
85
- }
86
-
87
- message ReactionMessageRequest {
88
- string channelId = 1;
89
- repeated ReactionMessageDto dto = 2;
90
- }
91
-
92
- message JoinChannelRequest {
93
- repeated int32 userIds = 1;
94
- string channelId = 2;
95
- }
96
-
97
- message LeaveChannelRequest {
98
- int32 userId = 1;
99
- string channelId = 2;
100
- }
101
-
102
- message DestroyChannelRequest {
103
- string channelId = 1;
104
- }
105
-
106
- message ChangeChannelOwnerRequest {
107
- string channelId = 1;
108
- int32 targetUserId = 2;
109
- }
110
-
111
- message GetOperatorRequest {
112
- string channelId = 1;
113
- }
114
-
115
- message GetOperatorResponse {
116
- repeated Operator operators = 1;
117
- }
118
-
119
- message SetOperatorRequest {
120
- string channelId = 1;
121
- int32 targetUserId = 2;
122
- optional bool chatDeleteAuth = 3;
123
- optional bool chatSlowAuth = 4;
124
- optional bool infoAuth = 5;
125
- optional bool pinAuth = 6;
126
- optional bool postAuth = 7;
127
- optional bool userBanAuth = 8;
128
- }
129
-
130
- message RemoveOperatorRequest {
131
- string channelId = 1;
132
- int32 targetUserId = 2;
133
- }
134
-
135
- message RemoveOperatorResponse {
136
- int32 removeId = 1;
137
- }
138
-
139
- message GetMessageRequest {
140
- string channelId = 1;
141
- int32 seq = 2;
142
- }
143
-
144
- message GetMessageResponse {
145
- ChannelMessage message = 1;
146
- }
147
-
148
- message GetMessagesRequest {
149
- string channelId = 1;
150
- int32 lastMessageSeq = 2;
151
- int32 seq = 3;
152
- int32 take = 4;
153
- }
154
-
155
- message GetMessagesResponse {
156
- repeated ChannelMessage messages = 1;
157
- }
158
-
159
- message GetMessageReactionsRequest {
160
- string channelId = 1;
161
- int32 lastStreamId = 2;
162
- int32 streamId = 3;
163
- }
164
-
165
- message GetMessageReactionsResponse {
166
- repeated MessageReaction historys = 1;
167
- bool next = 2;
168
- }
169
-
170
- message HoldMessageRequest {
171
- string channelId = 1;
172
- int32 seq = 2;
173
- }
174
-
175
- message GetMembersRequest {
176
- string channelId = 1;
177
- optional int32 cursorUserId = 2;
178
- }
179
-
180
- message GetMembersResponse {
181
- repeated int32 members = 1;
182
- }
183
-
184
- service ChannelService {
185
- rpc CreateChannel (CreateChannelRequest) returns (CreateChannelResponse);
186
- rpc EditChannel (EditChannelRequest) returns (EditChannelResponse);
187
-
188
- rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
189
- rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
190
-
191
- rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
192
-
193
- rpc ReadMessage (ReadMessageRequest) returns (Empty);
194
- rpc GetViewCount (GetMessageViewCountRequest) returns (GetMessageViewCountResponse);
195
-
196
- rpc CreateMessage (CreateMessageRequest) returns (CreateMessageResponse);
197
- rpc UpdateMessage (UpdateMessageRequest) returns (Empty);
198
- rpc DeleteMessage (DeleteMessageRequest) returns (Empty);
199
-
200
- rpc ReactionMessage (ReactionMessageRequest) returns (Empty);
201
-
202
- rpc JoinChannel (JoinChannelRequest) returns (Empty);
203
- rpc LeaveChannel (LeaveChannelRequest) returns (Empty);
204
- rpc DestroyChannel (DestroyChannelRequest) returns (Empty);
205
-
206
- rpc ChangeChannelOwner (ChangeChannelOwnerRequest) returns (Empty);
207
-
208
- rpc GetOperator (GetOperatorRequest) returns (GetOperatorResponse);
209
- rpc SetOperator (SetOperatorRequest) returns (Empty);
210
- rpc RemoveOperator (RemoveOperatorRequest) returns (RemoveOperatorResponse);
211
-
212
- rpc GetMessage (GetMessageRequest) returns (GetMessageResponse);
213
- rpc GetMessages (GetMessagesRequest) returns (GetMessagesResponse);
214
- rpc GetMessageReactions (GetMessageReactionsRequest) returns (GetMessageReactionsResponse);
215
-
216
- rpc HoldMessage (HoldMessageRequest) returns (Empty);
217
- rpc GetMembers (GetMembersRequest) returns (GetMembersResponse);
218
-
219
-
220
- rpc ChannelChatCreateMessage (CreateMessageRequest) returns (CreateMessageResponse);
221
- rpc ChannelChatUpdateMessage (UpdateMessageRequest) returns (Empty);
222
- rpc ChannelChatDeleteMessage (DeleteMessageRequest) returns (Empty);
223
- rpc ChannelChatReactionMessage (ReactionMessageRequest) returns (Empty);
224
- rpc ChannelChatGetMessage (GetMessageRequest) returns (GetMessageResponse);
225
- rpc ChannelChatGetMessages (GetMessagesRequest) returns (GetMessagesResponse);
226
- rpc ChannelChatGetMessageReactions (GetMessageReactionsRequest) returns (GetMessageReactionsResponse);
1
+ syntax = "proto3";
2
+
3
+ package channel;
4
+ import "channel-types.proto";
5
+
6
+ message Empty {}
7
+
8
+ message GetChannelRequest {
9
+ int32 userId = 1;
10
+ }
11
+
12
+ message GetMyChannelsResponse {
13
+ repeated Channel channels = 1;
14
+ }
15
+
16
+ message GetMySubscribedChannelResponse {
17
+ repeated UserChannel userChannels = 1;
18
+ }
19
+
20
+ message CreateChannelRequest {
21
+ int32 userId = 1;
22
+ CreateChannelDto dto = 2;
23
+ }
24
+
25
+ message CreateChannelResponse {
26
+ string channelId = 1;
27
+ }
28
+
29
+ message EditChannelRequest {
30
+ string channelId = 1;
31
+ int32 userId = 2;
32
+ EditChannelDto dto = 3;
33
+ }
34
+
35
+ message EditChannelResponse {
36
+ string channelId = 1;
37
+ }
38
+
39
+ message GetChannelInfoRequest {
40
+ string channelId = 1;
41
+ }
42
+
43
+ message GetChannelInfoResponse {
44
+ ChannelInfo channelInfo = 1;
45
+ }
46
+
47
+ message ReadMessageRequest {
48
+ string channelId = 1;
49
+ int32 userId = 2;
50
+ int32 lastSeq = 3;
51
+ }
52
+
53
+ message GetMessageViewCountRequest {
54
+ string channelId = 1;
55
+ repeated int32 seqs = 2;
56
+ }
57
+
58
+ message GetMessageViewCountResponse {
59
+ map<int32, int32> viewCount = 1;
60
+ }
61
+
62
+ message CreateMessageRequest {
63
+ string channelId = 1;
64
+ optional string title = 2;
65
+ int32 userId = 3;
66
+ CreateMessageDto dto = 4;
67
+ int32 lastChatSeq = 5;
68
+ }
69
+
70
+ message CreateMessageResponse {
71
+ int32 seq = 1;
72
+ }
73
+
74
+ message UpdateMessageRequest {
75
+ string channelId = 1;
76
+ int32 userId = 2;
77
+ int32 seq = 3;
78
+ string originMessage = 4;
79
+ string message = 5;
80
+ }
81
+
82
+ message DeleteMessageRequest {
83
+ string channelId = 1;
84
+ int32 seq = 2;
85
+ }
86
+
87
+ message ReactionMessageRequest {
88
+ string channelId = 1;
89
+ repeated ReactionMessageDto dto = 2;
90
+ }
91
+
92
+ message JoinChannelRequest {
93
+ repeated int32 userIds = 1;
94
+ string channelId = 2;
95
+ }
96
+
97
+ message LeaveChannelRequest {
98
+ int32 userId = 1;
99
+ string channelId = 2;
100
+ }
101
+
102
+ message DestroyChannelRequest {
103
+ string channelId = 1;
104
+ }
105
+
106
+ message ChangeChannelOwnerRequest {
107
+ string channelId = 1;
108
+ int32 targetUserId = 2;
109
+ }
110
+
111
+ message GetOperatorRequest {
112
+ string channelId = 1;
113
+ }
114
+
115
+ message GetOperatorResponse {
116
+ repeated Operator operators = 1;
117
+ }
118
+
119
+ message SetOperatorRequest {
120
+ string channelId = 1;
121
+ int32 targetUserId = 2;
122
+ optional bool chatDeleteAuth = 3;
123
+ optional bool chatSlowAuth = 4;
124
+ optional bool infoAuth = 5;
125
+ optional bool pinAuth = 6;
126
+ optional bool postAuth = 7;
127
+ optional bool userBanAuth = 8;
128
+ }
129
+
130
+ message RemoveOperatorRequest {
131
+ string channelId = 1;
132
+ int32 targetUserId = 2;
133
+ }
134
+
135
+ message RemoveOperatorResponse {
136
+ int32 removeId = 1;
137
+ }
138
+
139
+ message GetMessageRequest {
140
+ string channelId = 1;
141
+ int32 seq = 2;
142
+ }
143
+
144
+ message GetMessageResponse {
145
+ ChannelMessage message = 1;
146
+ }
147
+
148
+ message GetMessagesRequest {
149
+ string channelId = 1;
150
+ int32 lastMessageSeq = 2;
151
+ int32 seq = 3;
152
+ int32 take = 4;
153
+ }
154
+
155
+ message GetMessagesResponse {
156
+ repeated ChannelMessage messages = 1;
157
+ }
158
+
159
+ message GetMessageReactionsRequest {
160
+ string channelId = 1;
161
+ int64 lastStreamId = 2;
162
+ int64 streamId = 3;
163
+ }
164
+
165
+ message GetMessageReactionsResponse {
166
+ repeated MessageReaction historys = 1;
167
+ bool next = 2;
168
+ }
169
+
170
+ message HoldMessageRequest {
171
+ string channelId = 1;
172
+ int32 seq = 2;
173
+ }
174
+
175
+ message GetMembersRequest {
176
+ string channelId = 1;
177
+ optional int32 cursorUserId = 2;
178
+ }
179
+
180
+ message GetMembersResponse {
181
+ repeated int32 members = 1;
182
+ }
183
+
184
+ message SearchChannelsRequest {
185
+ optional string search = 1;
186
+ optional string searchType = 2;
187
+ optional int32 page = 3;
188
+ optional int32 take = 4;
189
+ }
190
+
191
+ message SearchChannelsResponse {
192
+ repeated Channel channels = 1;
193
+ }
194
+
195
+ service ChannelService {
196
+ rpc CreateChannel (CreateChannelRequest) returns (CreateChannelResponse);
197
+ rpc EditChannel (EditChannelRequest) returns (EditChannelResponse);
198
+
199
+ rpc GetMyChannels (GetChannelRequest) returns (GetMyChannelsResponse);
200
+ rpc GetMySubscribeChannels (GetChannelRequest) returns (GetMySubscribedChannelResponse);
201
+
202
+ rpc GetChannelInfo (GetChannelInfoRequest) returns (GetChannelInfoResponse);
203
+
204
+ rpc ReadMessage (ReadMessageRequest) returns (Empty);
205
+ rpc GetViewCount (GetMessageViewCountRequest) returns (GetMessageViewCountResponse);
206
+
207
+ rpc CreateMessage (CreateMessageRequest) returns (CreateMessageResponse);
208
+ rpc UpdateMessage (UpdateMessageRequest) returns (Empty);
209
+ rpc DeleteMessage (DeleteMessageRequest) returns (Empty);
210
+
211
+ rpc ReactionMessage (ReactionMessageRequest) returns (Empty);
212
+
213
+ rpc JoinChannel (JoinChannelRequest) returns (Empty);
214
+ rpc LeaveChannel (LeaveChannelRequest) returns (Empty);
215
+ rpc DestroyChannel (DestroyChannelRequest) returns (Empty);
216
+
217
+ rpc ChangeChannelOwner (ChangeChannelOwnerRequest) returns (Empty);
218
+
219
+ rpc GetOperator (GetOperatorRequest) returns (GetOperatorResponse);
220
+ rpc SetOperator (SetOperatorRequest) returns (Empty);
221
+ rpc RemoveOperator (RemoveOperatorRequest) returns (RemoveOperatorResponse);
222
+
223
+ rpc GetMessage (GetMessageRequest) returns (GetMessageResponse);
224
+ rpc GetMessages (GetMessagesRequest) returns (GetMessagesResponse);
225
+ rpc GetMessageReactions (GetMessageReactionsRequest) returns (GetMessageReactionsResponse);
226
+
227
+ rpc HoldMessage (HoldMessageRequest) returns (Empty);
228
+ rpc GetMembers (GetMembersRequest) returns (GetMembersResponse);
229
+
230
+ rpc SearchChannel (SearchChannelsRequest) returns (SearchChannelsResponse);
231
+
232
+ rpc ChannelChatCreateMessage (CreateMessageRequest) returns (CreateMessageResponse);
233
+ rpc ChannelChatUpdateMessage (UpdateMessageRequest) returns (Empty);
234
+ rpc ChannelChatDeleteMessage (DeleteMessageRequest) returns (Empty);
235
+ rpc ChannelChatReactionMessage (ReactionMessageRequest) returns (Empty);
236
+ rpc ChannelChatGetMessage (GetMessageRequest) returns (GetMessageResponse);
237
+ rpc ChannelChatGetMessages (GetMessagesRequest) returns (GetMessagesResponse);
238
+ rpc ChannelChatGetMessageReactions (GetMessageReactionsRequest) returns (GetMessageReactionsResponse);
227
239
  }
@@ -1,122 +1,122 @@
1
- syntax = "proto3";
2
-
3
- package channel;
4
-
5
- message LastMessage {
6
- int32 seq = 1;
7
- string createdAt = 2;
8
- string message = 3;
9
- MessageType type = 4;
10
- int32 userId = 5;
11
- }
12
-
13
- message ChannelInfo {
14
- string channelId = 1;
15
- ChannelType channelType = 2;
16
- repeated string channelTag = 3;
17
- string title = 4;
18
- optional string description = 5;
19
- int32 ownerId = 6;
20
- int32 joinUserCount = 7;
21
- optional string thumbnailUrl = 8;
22
- optional int32 holdMessageSeq = 9;
23
- optional int32 lastMessageSeq = 10;
24
- optional int32 lastStreamId = 11;
25
- optional int32 lastChannelChatMessageSeq = 12;
26
- optional int32 lastChannelChatStreamId = 13;
27
- }
28
-
29
- message Channel {
30
- string title = 1;
31
- ChannelType channelType = 2;
32
- int32 joinUserCount = 3;
33
- string thumbnailUrl = 4;
34
- LastMessage lastMessage = 5;
35
- string channelId = 6;
36
- string userChannelId = 7;
37
- int32 ownerId = 8;
38
- string countryCode = 9;
39
- }
40
-
41
- message UserChannel {
42
- string channelId = 1;
43
- Channel channel = 2;
44
- int32 lastReadMessageSeq = 3;
45
- }
46
-
47
- message CreateChannelDto {
48
- string userChannelId = 1;
49
- optional string title = 2;
50
- optional string description = 3;
51
- ChannelType type = 4;
52
- optional string password = 5;
53
- optional string thumbnailUrl = 6;
54
- }
55
-
56
- message EditChannelDto {
57
- optional string title = 1;
58
- optional string description = 2;
59
- optional ChannelType type = 3;
60
- optional string password = 4;
61
- optional string thumbnailUrl = 5;
62
- }
63
-
64
- message CreateMessageDto {
65
- MessageType type = 1;
66
- string message = 2;
67
- repeated int32 mentions = 3;
68
- optional int32 reply = 4;
69
- }
70
-
71
- message ReactionMessageDto {
72
- int32 userId = 1;
73
- int32 seq = 2;
74
- string reactionCode = 3;
75
- int32 streamId = 4;
76
- }
77
-
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
- int64 reply = 8;
87
- repeated Reaction reactions = 9;
88
- }
89
-
90
- message Reaction {
91
- int32 userId = 1;
92
- string reactionCode = 2;
93
- }
94
-
95
- message MessageReaction {
96
- int32 streamId = 1;
97
- int32 userId = 2;
98
- int32 seq = 3;
99
- string reactionCode = 4;
100
- }
101
-
102
- message Operator {
103
- int32 userId = 1;
104
- bool chatDeleteAuth = 2;
105
- bool chatSlowAuth = 3;
106
- bool infoAuth = 4;
107
- bool pinAuth = 5;
108
- bool postAuth = 6;
109
- bool userBanAuth = 7;
110
- }
111
-
112
- enum MessageType {
113
- text = 0;
114
- image = 1;
115
- video = 2;
116
- file = 3;
117
- }
118
-
119
- enum ChannelType {
120
- PRIVATE = 0;
121
- PUBLIC = 1;
1
+ syntax = "proto3";
2
+
3
+ package channel;
4
+
5
+ message LastMessage {
6
+ int32 seq = 1;
7
+ string createdAt = 2;
8
+ string message = 3;
9
+ MessageType type = 4;
10
+ int32 userId = 5;
11
+ }
12
+
13
+ message ChannelInfo {
14
+ string channelId = 1;
15
+ ChannelType channelType = 2;
16
+ repeated string channelTag = 3;
17
+ string title = 4;
18
+ optional string description = 5;
19
+ int32 ownerId = 6;
20
+ int32 joinUserCount = 7;
21
+ optional string thumbnailUrl = 8;
22
+ optional int32 holdMessageSeq = 9;
23
+ optional int32 lastMessageSeq = 10;
24
+ optional int64 lastStreamId = 11;
25
+ optional int32 lastChannelChatMessageSeq = 12;
26
+ optional int64 lastChannelChatStreamId = 13;
27
+ }
28
+
29
+ message Channel {
30
+ string title = 1;
31
+ ChannelType channelType = 2;
32
+ int32 joinUserCount = 3;
33
+ string thumbnailUrl = 4;
34
+ LastMessage lastMessage = 5;
35
+ string channelId = 6;
36
+ string userChannelId = 7;
37
+ int32 ownerId = 8;
38
+ string countryCode = 9;
39
+ }
40
+
41
+ message UserChannel {
42
+ string channelId = 1;
43
+ Channel channel = 2;
44
+ int32 lastReadMessageSeq = 3;
45
+ }
46
+
47
+ message CreateChannelDto {
48
+ string userChannelId = 1;
49
+ optional string title = 2;
50
+ optional string description = 3;
51
+ ChannelType type = 4;
52
+ optional string password = 5;
53
+ optional string thumbnailUrl = 6;
54
+ }
55
+
56
+ message EditChannelDto {
57
+ optional string title = 1;
58
+ optional string description = 2;
59
+ optional ChannelType type = 3;
60
+ optional string password = 4;
61
+ optional string thumbnailUrl = 5;
62
+ }
63
+
64
+ message CreateMessageDto {
65
+ MessageType type = 1;
66
+ string message = 2;
67
+ repeated int32 mentions = 3;
68
+ optional int32 reply = 4;
69
+ }
70
+
71
+ message ReactionMessageDto {
72
+ int32 userId = 1;
73
+ int32 seq = 2;
74
+ string reactionCode = 3;
75
+ int64 streamId = 4;
76
+ }
77
+
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
+ }
89
+
90
+ message Reaction {
91
+ int32 userId = 1;
92
+ string reactionCode = 2;
93
+ }
94
+
95
+ message MessageReaction {
96
+ int64 streamId = 1;
97
+ int32 userId = 2;
98
+ int32 seq = 3;
99
+ string reactionCode = 4;
100
+ }
101
+
102
+ message Operator {
103
+ int32 userId = 1;
104
+ bool chatDeleteAuth = 2;
105
+ bool chatSlowAuth = 3;
106
+ bool infoAuth = 4;
107
+ bool pinAuth = 5;
108
+ bool postAuth = 6;
109
+ bool userBanAuth = 7;
110
+ }
111
+
112
+ enum MessageType {
113
+ text = 0;
114
+ image = 1;
115
+ video = 2;
116
+ file = 3;
117
+ }
118
+
119
+ enum ChannelType {
120
+ PRIVATE = 0;
121
+ PUBLIC = 1;
122
122
  }
package/dist/index.d.ts CHANGED
@@ -35,6 +35,8 @@ export { GetMessageReactionsResponse } from './proto-libs/channel-services';
35
35
  export { HoldMessageRequest } from './proto-libs/channel-services';
36
36
  export { GetMembersRequest } from './proto-libs/channel-services';
37
37
  export { GetMembersResponse } from './proto-libs/channel-services';
38
+ export { SearchChannelsRequest } from './proto-libs/channel-services';
39
+ export { SearchChannelsResponse } from './proto-libs/channel-services';
38
40
  export { ChannelServiceClient } from './proto-libs/channel-services';
39
41
  export { ChannelServiceController } from './proto-libs/channel-services';
40
42
  export { protobufPackage } from './proto-libs/channel-services';
@@ -1,4 +1,4 @@
1
- import type { Metadata } from "@grpc/grpc-js";
1
+ import { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { Channel, ChannelInfo, ChannelMessage, CreateChannelDto, CreateMessageDto, EditChannelDto, MessageReaction, Operator, ReactionMessageDto, UserChannel } from "./channel-types";
4
4
  export declare const protobufPackage = "channel";
@@ -151,6 +151,15 @@ export interface GetMembersRequest {
151
151
  export interface GetMembersResponse {
152
152
  members: number[];
153
153
  }
154
+ export interface SearchChannelsRequest {
155
+ search?: string | undefined;
156
+ searchType?: string | undefined;
157
+ page?: number | undefined;
158
+ take?: number | undefined;
159
+ }
160
+ export interface SearchChannelsResponse {
161
+ channels: Channel[];
162
+ }
154
163
  export declare const CHANNEL_PACKAGE_NAME = "channel";
155
164
  export interface ChannelServiceClient {
156
165
  createChannel(request: CreateChannelRequest, metadata?: Metadata): Observable<CreateChannelResponse>;
@@ -176,6 +185,7 @@ export interface ChannelServiceClient {
176
185
  getMessageReactions(request: GetMessageReactionsRequest, metadata?: Metadata): Observable<GetMessageReactionsResponse>;
177
186
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
178
187
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
188
+ searchChannel(request: SearchChannelsRequest, metadata?: Metadata): Observable<SearchChannelsResponse>;
179
189
  channelChatCreateMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
180
190
  channelChatUpdateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
181
191
  channelChatDeleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -208,6 +218,7 @@ export interface ChannelServiceController {
208
218
  getMessageReactions(request: GetMessageReactionsRequest, metadata?: Metadata): Observable<GetMessageReactionsResponse>;
209
219
  holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
210
220
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
221
+ searchChannel(request: SearchChannelsRequest, metadata?: Metadata): Observable<SearchChannelsResponse>;
211
222
  channelChatCreateMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
212
223
  channelChatUpdateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
213
224
  channelChatDeleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.7.5
4
+ // protoc-gen-ts_proto v2.7.0
5
5
  // protoc v3.20.3
6
6
  // source: channel-services.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -36,6 +36,7 @@ function ChannelServiceControllerMethods() {
36
36
  "getMessageReactions",
37
37
  "holdMessage",
38
38
  "getMembers",
39
+ "searchChannel",
39
40
  "channelChatCreateMessage",
40
41
  "channelChatUpdateMessage",
41
42
  "channelChatDeleteMessage",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.7.5
4
+ // protoc-gen-ts_proto v2.7.0
5
5
  // protoc v3.20.3
6
6
  // source: channel-types.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,173 @@
1
+ import { Metadata } from "@grpc/grpc-js";
2
+ import { Observable } from "rxjs";
3
+ import { ChatMessage, ChatRoom, CreateChatRoom, CreateMessageDto, MessageReaction, ReactionMessageDto, RoomType, UserInfo, UserRoom } from "./chat-room-types";
4
+ export declare const protobufPackage = "chat_room";
5
+ export interface Empty {
6
+ }
7
+ export interface GetChatRoomRequest {
8
+ userId: number;
9
+ }
10
+ export interface GetChatRoomResponse {
11
+ userRooms: UserRoom[];
12
+ }
13
+ export interface CreateChatRoomRequest {
14
+ userId: number;
15
+ dto: CreateChatRoom | undefined;
16
+ }
17
+ export interface CreateChatRoomResponse {
18
+ roomId: string;
19
+ }
20
+ export interface GetRoomInfoRequest {
21
+ roomId: string;
22
+ }
23
+ export interface GetRoomInfoResponse {
24
+ roomInfo: ChatRoom | undefined;
25
+ }
26
+ export interface ReadMessageRequest {
27
+ roomId: string;
28
+ userId: number;
29
+ lastSeq: number;
30
+ }
31
+ export interface CreateMessageRequest {
32
+ roomId: string;
33
+ title?: string | undefined;
34
+ userId: number;
35
+ dto: CreateMessageDto | undefined;
36
+ lastChatSeq: number;
37
+ }
38
+ export interface CreateMessageResponse {
39
+ seq: number;
40
+ }
41
+ export interface UpdateMessageRequest {
42
+ roomId: string;
43
+ userId: number;
44
+ seq: number;
45
+ originMessage: string;
46
+ message: string;
47
+ }
48
+ export interface DeleteMessageRequest {
49
+ roomId: string;
50
+ seq: number;
51
+ }
52
+ export interface ReactionMessageRequest {
53
+ roomId: string;
54
+ dto: ReactionMessageDto[];
55
+ }
56
+ export interface JoinRoomRequest {
57
+ userIds: number[];
58
+ roomId: string;
59
+ }
60
+ export interface LeaveRoomRequest {
61
+ userId: number;
62
+ roomId: string;
63
+ roomType: RoomType;
64
+ }
65
+ export interface GetMemberSeqRequest {
66
+ roomId: string;
67
+ userId: number;
68
+ }
69
+ export interface GetMemberSeqResponse {
70
+ lastReadMessageSeq: number;
71
+ }
72
+ export interface GetAllMembersRequest {
73
+ roomId: string;
74
+ onlyUser: boolean;
75
+ }
76
+ export interface GetAllMembersResponse {
77
+ userIds: number[];
78
+ userSeqs: {
79
+ [key: number]: number;
80
+ };
81
+ }
82
+ export interface GetAllMembersResponse_UserSeqsEntry {
83
+ key: number;
84
+ value: number;
85
+ }
86
+ export interface GetMessageRequest {
87
+ roomId: string;
88
+ seq: number;
89
+ }
90
+ export interface GetMessageResponse {
91
+ message: ChatMessage | undefined;
92
+ }
93
+ export interface GetMessagesRequest {
94
+ roomId: string;
95
+ lastMessageSeq: number;
96
+ seq: number;
97
+ take: number;
98
+ }
99
+ export interface GetMessagesResponse {
100
+ messages: ChatMessage[];
101
+ }
102
+ export interface GetMessageReactionsRequest {
103
+ roomId: string;
104
+ lastStreamId: number;
105
+ streamId: number;
106
+ }
107
+ export interface GetMessageReactionsResponse {
108
+ historys: MessageReaction[];
109
+ next: boolean;
110
+ }
111
+ export interface HoldMessageRequest {
112
+ roomId: string;
113
+ seq: number;
114
+ }
115
+ export interface GetUserInfoRequest {
116
+ userIds: number[];
117
+ }
118
+ export interface GetUserInfoResponse {
119
+ infos: {
120
+ [key: number]: UserInfo;
121
+ };
122
+ }
123
+ export interface GetUserInfoResponse_InfosEntry {
124
+ key: number;
125
+ value: UserInfo | undefined;
126
+ }
127
+ export interface SetUserInfoRequest {
128
+ userId: number;
129
+ userInfo: UserInfo | undefined;
130
+ }
131
+ export declare const CHAT_ROOM_PACKAGE_NAME = "chat_room";
132
+ export interface ChatRoomServiceClient {
133
+ createChatRoom(request: CreateChatRoomRequest, metadata?: Metadata): Observable<CreateChatRoomResponse>;
134
+ getChatRooms(request: GetChatRoomRequest, metadata?: Metadata): Observable<GetChatRoomResponse>;
135
+ getRoomInfo(request: GetRoomInfoRequest, metadata?: Metadata): Observable<GetRoomInfoResponse>;
136
+ readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
137
+ createMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
138
+ updateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
139
+ deleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<Empty>;
140
+ reactionMessage(request: ReactionMessageRequest, metadata?: Metadata): Observable<Empty>;
141
+ joinRoom(request: JoinRoomRequest, metadata?: Metadata): Observable<Empty>;
142
+ leaveRoom(request: LeaveRoomRequest, metadata?: Metadata): Observable<Empty>;
143
+ getMemberSeqInRoom(request: GetMemberSeqRequest, metadata?: Metadata): Observable<GetMemberSeqResponse>;
144
+ getAllMembers(request: GetAllMembersRequest, metadata?: Metadata): Observable<GetAllMembersResponse>;
145
+ getMessage(request: GetMessageRequest, metadata?: Metadata): Observable<GetMessageResponse>;
146
+ getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
147
+ getMessageReactions(request: GetMessageReactionsRequest, metadata?: Metadata): Observable<GetMessageReactionsResponse>;
148
+ holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
149
+ getUserInfos(request: GetUserInfoRequest, metadata?: Metadata): Observable<GetUserInfoResponse>;
150
+ setUserInfo(request: SetUserInfoRequest, metadata?: Metadata): Observable<Empty>;
151
+ }
152
+ export interface ChatRoomServiceController {
153
+ createChatRoom(request: CreateChatRoomRequest, metadata?: Metadata): Observable<CreateChatRoomResponse>;
154
+ getChatRooms(request: GetChatRoomRequest, metadata?: Metadata): Observable<GetChatRoomResponse>;
155
+ getRoomInfo(request: GetRoomInfoRequest, metadata?: Metadata): Observable<GetRoomInfoResponse>;
156
+ readMessage(request: ReadMessageRequest, metadata?: Metadata): Observable<Empty>;
157
+ createMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
158
+ updateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
159
+ deleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<Empty>;
160
+ reactionMessage(request: ReactionMessageRequest, metadata?: Metadata): Observable<Empty>;
161
+ joinRoom(request: JoinRoomRequest, metadata?: Metadata): Observable<Empty>;
162
+ leaveRoom(request: LeaveRoomRequest, metadata?: Metadata): Observable<Empty>;
163
+ getMemberSeqInRoom(request: GetMemberSeqRequest, metadata?: Metadata): Observable<GetMemberSeqResponse>;
164
+ getAllMembers(request: GetAllMembersRequest, metadata?: Metadata): Observable<GetAllMembersResponse>;
165
+ getMessage(request: GetMessageRequest, metadata?: Metadata): Observable<GetMessageResponse>;
166
+ getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<GetMessagesResponse>;
167
+ getMessageReactions(request: GetMessageReactionsRequest, metadata?: Metadata): Observable<GetMessageReactionsResponse>;
168
+ holdMessage(request: HoldMessageRequest, metadata?: Metadata): Observable<Empty>;
169
+ getUserInfos(request: GetUserInfoRequest, metadata?: Metadata): Observable<GetUserInfoResponse>;
170
+ setUserInfo(request: SetUserInfoRequest, metadata?: Metadata): Observable<Empty>;
171
+ }
172
+ export declare function ChatRoomServiceControllerMethods(): (constructor: Function) => void;
173
+ export declare const CHAT_ROOM_SERVICE_NAME = "ChatRoomService";
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.20.3
6
+ // source: chat-room-services.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CHAT_ROOM_SERVICE_NAME = exports.CHAT_ROOM_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.ChatRoomServiceControllerMethods = ChatRoomServiceControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ exports.protobufPackage = "chat_room";
12
+ exports.CHAT_ROOM_PACKAGE_NAME = "chat_room";
13
+ function ChatRoomServiceControllerMethods() {
14
+ return function (constructor) {
15
+ const grpcMethods = [
16
+ "createChatRoom",
17
+ "getChatRooms",
18
+ "getRoomInfo",
19
+ "readMessage",
20
+ "createMessage",
21
+ "updateMessage",
22
+ "deleteMessage",
23
+ "reactionMessage",
24
+ "joinRoom",
25
+ "leaveRoom",
26
+ "getMemberSeqInRoom",
27
+ "getAllMembers",
28
+ "getMessage",
29
+ "getMessages",
30
+ "getMessageReactions",
31
+ "holdMessage",
32
+ "getUserInfos",
33
+ "setUserInfo",
34
+ ];
35
+ for (const method of grpcMethods) {
36
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
37
+ (0, microservices_1.GrpcMethod)("ChatRoomService", method)(constructor.prototype[method], method, descriptor);
38
+ }
39
+ const grpcStreamMethods = [];
40
+ for (const method of grpcStreamMethods) {
41
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
42
+ (0, microservices_1.GrpcStreamMethod)("ChatRoomService", method)(constructor.prototype[method], method, descriptor);
43
+ }
44
+ };
45
+ }
46
+ exports.CHAT_ROOM_SERVICE_NAME = "ChatRoomService";
@@ -0,0 +1,101 @@
1
+ export declare const protobufPackage = "chat_room";
2
+ export declare enum MessageType {
3
+ text = "text",
4
+ image = "image",
5
+ video = "video",
6
+ file = "file",
7
+ UNRECOGNIZED = "UNRECOGNIZED"
8
+ }
9
+ export declare enum RoomType {
10
+ DM = "DM",
11
+ GROUP = "GROUP",
12
+ UNRECOGNIZED = "UNRECOGNIZED"
13
+ }
14
+ export interface LastMessage {
15
+ seq: number;
16
+ createdAt: string;
17
+ message: string;
18
+ type: MessageType;
19
+ userId: number;
20
+ }
21
+ export interface Room {
22
+ title: string;
23
+ roomType: RoomType;
24
+ joinUserCount: number;
25
+ thumbnailUrl: string;
26
+ lastMessage: LastMessage | undefined;
27
+ }
28
+ export interface UserRoom {
29
+ roomId: string;
30
+ lastReadMessageSeq: number;
31
+ mute: boolean;
32
+ room: Room | undefined;
33
+ }
34
+ export interface CreateChatRoom {
35
+ title?: string | undefined;
36
+ roomType: RoomType;
37
+ members: number[];
38
+ }
39
+ export interface UpdateChatRoom {
40
+ title?: string | undefined;
41
+ joinUserCount?: number | undefined;
42
+ addUserCount?: number | undefined;
43
+ thumbnailUrl?: string | undefined;
44
+ maxUserCount?: number | undefined;
45
+ description?: string | undefined;
46
+ holdMessageSeq?: number | undefined;
47
+ }
48
+ export interface ChatRoom {
49
+ roomId: string;
50
+ title: string;
51
+ description: string;
52
+ roomType: RoomType;
53
+ ownerId: number;
54
+ joinUserCount: number;
55
+ maxUserCount: number;
56
+ thumbnailUrl: string;
57
+ holdMessageSeq?: number | undefined;
58
+ lastMessageSeq?: number | undefined;
59
+ lastStreamId?: number | undefined;
60
+ dmMembers: number[];
61
+ }
62
+ export interface CreateMessageDto {
63
+ type: MessageType;
64
+ message: string;
65
+ mentions: number[];
66
+ reply?: number | undefined;
67
+ }
68
+ export interface ReactionMessageDto {
69
+ userId: number;
70
+ seq: number;
71
+ reactionCode: string;
72
+ streamId: number;
73
+ }
74
+ export interface ChatMessage {
75
+ userId: number;
76
+ type: MessageType;
77
+ createdAt: string;
78
+ deletedAt: string;
79
+ seq: number;
80
+ message: string;
81
+ mentions: number[];
82
+ reply: number;
83
+ reactions: Reaction[];
84
+ }
85
+ export interface Reaction {
86
+ userId: number;
87
+ reactionCode: string;
88
+ }
89
+ export interface MessageReaction {
90
+ streamId: number;
91
+ userId: number;
92
+ seq: number;
93
+ reactionCode: string;
94
+ }
95
+ export interface UserInfo {
96
+ userId: number;
97
+ nickname: string;
98
+ thumbnailUrl: string;
99
+ firebaseToken: string;
100
+ }
101
+ export declare const CHAT_ROOM_PACKAGE_NAME = "chat_room";
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.20.3
6
+ // source: chat-room-types.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CHAT_ROOM_PACKAGE_NAME = exports.RoomType = exports.MessageType = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "chat_room";
11
+ var MessageType;
12
+ (function (MessageType) {
13
+ MessageType["text"] = "text";
14
+ MessageType["image"] = "image";
15
+ MessageType["video"] = "video";
16
+ MessageType["file"] = "file";
17
+ MessageType["UNRECOGNIZED"] = "UNRECOGNIZED";
18
+ })(MessageType || (exports.MessageType = MessageType = {}));
19
+ var RoomType;
20
+ (function (RoomType) {
21
+ RoomType["DM"] = "DM";
22
+ RoomType["GROUP"] = "GROUP";
23
+ RoomType["UNRECOGNIZED"] = "UNRECOGNIZED";
24
+ })(RoomType || (exports.RoomType = RoomType = {}));
25
+ exports.CHAT_ROOM_PACKAGE_NAME = "chat_room";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verychat/channel-protos",
3
- "version": "1.0.11",
3
+ "version": "1.0.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,11 +1,11 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.7.5
3
+ // protoc-gen-ts_proto v2.7.0
4
4
  // protoc v3.20.3
5
5
  // source: channel-services.proto
6
6
 
7
7
  /* eslint-disable */
8
- import type { Metadata } from "@grpc/grpc-js";
8
+ import { Metadata } from "@grpc/grpc-js";
9
9
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
10
10
  import { Observable } from "rxjs";
11
11
  import {
@@ -207,6 +207,17 @@ export interface GetMembersResponse {
207
207
  members: number[];
208
208
  }
209
209
 
210
+ export interface SearchChannelsRequest {
211
+ search?: string | undefined;
212
+ searchType?: string | undefined;
213
+ page?: number | undefined;
214
+ take?: number | undefined;
215
+ }
216
+
217
+ export interface SearchChannelsResponse {
218
+ channels: Channel[];
219
+ }
220
+
210
221
  export const CHANNEL_PACKAGE_NAME = "channel";
211
222
 
212
223
  export interface ChannelServiceClient {
@@ -259,6 +270,8 @@ export interface ChannelServiceClient {
259
270
 
260
271
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
261
272
 
273
+ searchChannel(request: SearchChannelsRequest, metadata?: Metadata): Observable<SearchChannelsResponse>;
274
+
262
275
  channelChatCreateMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
263
276
 
264
277
  channelChatUpdateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -327,6 +340,8 @@ export interface ChannelServiceController {
327
340
 
328
341
  getMembers(request: GetMembersRequest, metadata?: Metadata): Observable<GetMembersResponse>;
329
342
 
343
+ searchChannel(request: SearchChannelsRequest, metadata?: Metadata): Observable<SearchChannelsResponse>;
344
+
330
345
  channelChatCreateMessage(request: CreateMessageRequest, metadata?: Metadata): Observable<CreateMessageResponse>;
331
346
 
332
347
  channelChatUpdateMessage(request: UpdateMessageRequest, metadata?: Metadata): Observable<Empty>;
@@ -371,6 +386,7 @@ export function ChannelServiceControllerMethods() {
371
386
  "getMessageReactions",
372
387
  "holdMessage",
373
388
  "getMembers",
389
+ "searchChannel",
374
390
  "channelChatCreateMessage",
375
391
  "channelChatUpdateMessage",
376
392
  "channelChatDeleteMessage",
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.7.5
3
+ // protoc-gen-ts_proto v2.7.0
4
4
  // protoc v3.20.3
5
5
  // source: channel-types.proto
6
6