@verychat/channel-protos 1.0.5 → 1.0.11
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/channel-services.proto +226 -214
- package/channel-types.proto +121 -108
- package/dist/index.d.ts +3 -0
- package/dist/proto-libs/channel-services.d.ts +12 -2
- package/dist/proto-libs/channel-services.js +2 -1
- package/dist/proto-libs/channel-types.d.ts +12 -0
- package/dist/proto-libs/channel-types.js +1 -1
- package/package.json +1 -1
- package/proto-libs/channel-services.ts +18 -2
- package/proto-libs/channel-types.ts +14 -1
- package/dist/proto-libs/chat-room-services.d.ts +0 -173
- package/dist/proto-libs/chat-room-services.js +0 -46
- package/dist/proto-libs/chat-room-types.d.ts +0 -101
- package/dist/proto-libs/chat-room-types.js +0 -25
package/channel-services.proto
CHANGED
|
@@ -1,215 +1,227 @@
|
|
|
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
|
|
30
|
-
string channelId = 1;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
message
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
int32
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
int32
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
string
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
message
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
message
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
message
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
int32
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
int32 seq =
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
message
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
int32
|
|
152
|
-
int32
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
message
|
|
156
|
-
repeated
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
int32
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
message
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
message
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
rpc
|
|
186
|
-
rpc
|
|
187
|
-
|
|
188
|
-
rpc
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
rpc
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
rpc
|
|
195
|
-
|
|
196
|
-
rpc
|
|
197
|
-
rpc
|
|
198
|
-
rpc
|
|
199
|
-
|
|
200
|
-
rpc
|
|
201
|
-
|
|
202
|
-
rpc
|
|
203
|
-
|
|
204
|
-
rpc
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
rpc
|
|
209
|
-
rpc
|
|
210
|
-
rpc
|
|
211
|
-
|
|
212
|
-
rpc
|
|
213
|
-
rpc
|
|
214
|
-
rpc
|
|
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);
|
|
215
227
|
}
|
package/channel-types.proto
CHANGED
|
@@ -1,109 +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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
string
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
string
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
string
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
int32
|
|
84
|
-
|
|
85
|
-
int32
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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;
|
|
109
122
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { GetMyChannelsResponse } from './proto-libs/channel-services';
|
|
|
4
4
|
export { GetMySubscribedChannelResponse } from './proto-libs/channel-services';
|
|
5
5
|
export { CreateChannelRequest } from './proto-libs/channel-services';
|
|
6
6
|
export { CreateChannelResponse } from './proto-libs/channel-services';
|
|
7
|
+
export { EditChannelRequest } from './proto-libs/channel-services';
|
|
8
|
+
export { EditChannelResponse } from './proto-libs/channel-services';
|
|
7
9
|
export { GetChannelInfoRequest } from './proto-libs/channel-services';
|
|
8
10
|
export { GetChannelInfoResponse } from './proto-libs/channel-services';
|
|
9
11
|
export { ReadMessageRequest } from './proto-libs/channel-services';
|
|
@@ -43,6 +45,7 @@ export { ChannelInfo } from './proto-libs/channel-types';
|
|
|
43
45
|
export { Channel } from './proto-libs/channel-types';
|
|
44
46
|
export { UserChannel } from './proto-libs/channel-types';
|
|
45
47
|
export { CreateChannelDto } from './proto-libs/channel-types';
|
|
48
|
+
export { EditChannelDto } from './proto-libs/channel-types';
|
|
46
49
|
export { CreateMessageDto } from './proto-libs/channel-types';
|
|
47
50
|
export { ReactionMessageDto } from './proto-libs/channel-types';
|
|
48
51
|
export { ChannelMessage } from './proto-libs/channel-types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Metadata } from "@grpc/grpc-js";
|
|
1
|
+
import type { Metadata } from "@grpc/grpc-js";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import { Channel, ChannelInfo, ChannelMessage, CreateChannelDto, CreateMessageDto, MessageReaction, Operator, ReactionMessageDto, UserChannel } from "./channel-types";
|
|
3
|
+
import { Channel, ChannelInfo, ChannelMessage, CreateChannelDto, CreateMessageDto, EditChannelDto, MessageReaction, Operator, ReactionMessageDto, UserChannel } from "./channel-types";
|
|
4
4
|
export declare const protobufPackage = "channel";
|
|
5
5
|
export interface Empty {
|
|
6
6
|
}
|
|
@@ -20,6 +20,14 @@ export interface CreateChannelRequest {
|
|
|
20
20
|
export interface CreateChannelResponse {
|
|
21
21
|
channelId: string;
|
|
22
22
|
}
|
|
23
|
+
export interface EditChannelRequest {
|
|
24
|
+
channelId: string;
|
|
25
|
+
userId: number;
|
|
26
|
+
dto: EditChannelDto | undefined;
|
|
27
|
+
}
|
|
28
|
+
export interface EditChannelResponse {
|
|
29
|
+
channelId: string;
|
|
30
|
+
}
|
|
23
31
|
export interface GetChannelInfoRequest {
|
|
24
32
|
channelId: string;
|
|
25
33
|
}
|
|
@@ -146,6 +154,7 @@ export interface GetMembersResponse {
|
|
|
146
154
|
export declare const CHANNEL_PACKAGE_NAME = "channel";
|
|
147
155
|
export interface ChannelServiceClient {
|
|
148
156
|
createChannel(request: CreateChannelRequest, metadata?: Metadata): Observable<CreateChannelResponse>;
|
|
157
|
+
editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
|
|
149
158
|
getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
|
|
150
159
|
getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
|
|
151
160
|
getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
|
|
@@ -177,6 +186,7 @@ export interface ChannelServiceClient {
|
|
|
177
186
|
}
|
|
178
187
|
export interface ChannelServiceController {
|
|
179
188
|
createChannel(request: CreateChannelRequest, metadata?: Metadata): Observable<CreateChannelResponse>;
|
|
189
|
+
editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
|
|
180
190
|
getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
|
|
181
191
|
getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
|
|
182
192
|
getChannelInfo(request: GetChannelInfoRequest, metadata?: Metadata): Observable<GetChannelInfoResponse>;
|
|
@@ -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.
|
|
4
|
+
// protoc-gen-ts_proto v2.7.5
|
|
5
5
|
// protoc v3.20.3
|
|
6
6
|
// source: channel-services.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -14,6 +14,7 @@ function ChannelServiceControllerMethods() {
|
|
|
14
14
|
return function (constructor) {
|
|
15
15
|
const grpcMethods = [
|
|
16
16
|
"createChannel",
|
|
17
|
+
"editChannel",
|
|
17
18
|
"getMyChannels",
|
|
18
19
|
"getMySubscribeChannels",
|
|
19
20
|
"getChannelInfo",
|
|
@@ -30,6 +30,8 @@ export interface ChannelInfo {
|
|
|
30
30
|
holdMessageSeq?: number | undefined;
|
|
31
31
|
lastMessageSeq?: number | undefined;
|
|
32
32
|
lastStreamId?: number | undefined;
|
|
33
|
+
lastChannelChatMessageSeq?: number | undefined;
|
|
34
|
+
lastChannelChatStreamId?: number | undefined;
|
|
33
35
|
}
|
|
34
36
|
export interface Channel {
|
|
35
37
|
title: string;
|
|
@@ -38,6 +40,9 @@ export interface Channel {
|
|
|
38
40
|
thumbnailUrl: string;
|
|
39
41
|
lastMessage: LastMessage | undefined;
|
|
40
42
|
channelId: string;
|
|
43
|
+
userChannelId: string;
|
|
44
|
+
ownerId: number;
|
|
45
|
+
countryCode: string;
|
|
41
46
|
}
|
|
42
47
|
export interface UserChannel {
|
|
43
48
|
channelId: string;
|
|
@@ -52,6 +57,13 @@ export interface CreateChannelDto {
|
|
|
52
57
|
password?: string | undefined;
|
|
53
58
|
thumbnailUrl?: string | undefined;
|
|
54
59
|
}
|
|
60
|
+
export interface EditChannelDto {
|
|
61
|
+
title?: string | undefined;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
type?: ChannelType | undefined;
|
|
64
|
+
password?: string | undefined;
|
|
65
|
+
thumbnailUrl?: string | undefined;
|
|
66
|
+
}
|
|
55
67
|
export interface CreateMessageDto {
|
|
56
68
|
type: MessageType;
|
|
57
69
|
message: string;
|
|
@@ -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.
|
|
4
|
+
// protoc-gen-ts_proto v2.7.5
|
|
5
5
|
// protoc v3.20.3
|
|
6
6
|
// source: channel-types.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -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.
|
|
3
|
+
// protoc-gen-ts_proto v2.7.5
|
|
4
4
|
// protoc v3.20.3
|
|
5
5
|
// source: channel-services.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
|
-
import { Metadata } from "@grpc/grpc-js";
|
|
8
|
+
import type { Metadata } from "@grpc/grpc-js";
|
|
9
9
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
10
10
|
import { Observable } from "rxjs";
|
|
11
11
|
import {
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
ChannelMessage,
|
|
15
15
|
CreateChannelDto,
|
|
16
16
|
CreateMessageDto,
|
|
17
|
+
EditChannelDto,
|
|
17
18
|
MessageReaction,
|
|
18
19
|
Operator,
|
|
19
20
|
ReactionMessageDto,
|
|
@@ -46,6 +47,16 @@ export interface CreateChannelResponse {
|
|
|
46
47
|
channelId: string;
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
export interface EditChannelRequest {
|
|
51
|
+
channelId: string;
|
|
52
|
+
userId: number;
|
|
53
|
+
dto: EditChannelDto | undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface EditChannelResponse {
|
|
57
|
+
channelId: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
export interface GetChannelInfoRequest {
|
|
50
61
|
channelId: string;
|
|
51
62
|
}
|
|
@@ -201,6 +212,8 @@ export const CHANNEL_PACKAGE_NAME = "channel";
|
|
|
201
212
|
export interface ChannelServiceClient {
|
|
202
213
|
createChannel(request: CreateChannelRequest, metadata?: Metadata): Observable<CreateChannelResponse>;
|
|
203
214
|
|
|
215
|
+
editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
|
|
216
|
+
|
|
204
217
|
getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
|
|
205
218
|
|
|
206
219
|
getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
|
|
@@ -267,6 +280,8 @@ export interface ChannelServiceClient {
|
|
|
267
280
|
export interface ChannelServiceController {
|
|
268
281
|
createChannel(request: CreateChannelRequest, metadata?: Metadata): Observable<CreateChannelResponse>;
|
|
269
282
|
|
|
283
|
+
editChannel(request: EditChannelRequest, metadata?: Metadata): Observable<EditChannelResponse>;
|
|
284
|
+
|
|
270
285
|
getMyChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMyChannelsResponse>;
|
|
271
286
|
|
|
272
287
|
getMySubscribeChannels(request: GetChannelRequest, metadata?: Metadata): Observable<GetMySubscribedChannelResponse>;
|
|
@@ -334,6 +349,7 @@ export function ChannelServiceControllerMethods() {
|
|
|
334
349
|
return function (constructor: Function) {
|
|
335
350
|
const grpcMethods: string[] = [
|
|
336
351
|
"createChannel",
|
|
352
|
+
"editChannel",
|
|
337
353
|
"getMyChannels",
|
|
338
354
|
"getMySubscribeChannels",
|
|
339
355
|
"getChannelInfo",
|
|
@@ -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.
|
|
3
|
+
// protoc-gen-ts_proto v2.7.5
|
|
4
4
|
// protoc v3.20.3
|
|
5
5
|
// source: channel-types.proto
|
|
6
6
|
|
|
@@ -42,6 +42,8 @@ export interface ChannelInfo {
|
|
|
42
42
|
holdMessageSeq?: number | undefined;
|
|
43
43
|
lastMessageSeq?: number | undefined;
|
|
44
44
|
lastStreamId?: number | undefined;
|
|
45
|
+
lastChannelChatMessageSeq?: number | undefined;
|
|
46
|
+
lastChannelChatStreamId?: number | undefined;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
export interface Channel {
|
|
@@ -51,6 +53,9 @@ export interface Channel {
|
|
|
51
53
|
thumbnailUrl: string;
|
|
52
54
|
lastMessage: LastMessage | undefined;
|
|
53
55
|
channelId: string;
|
|
56
|
+
userChannelId: string;
|
|
57
|
+
ownerId: number;
|
|
58
|
+
countryCode: string;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
export interface UserChannel {
|
|
@@ -68,6 +73,14 @@ export interface CreateChannelDto {
|
|
|
68
73
|
thumbnailUrl?: string | undefined;
|
|
69
74
|
}
|
|
70
75
|
|
|
76
|
+
export interface EditChannelDto {
|
|
77
|
+
title?: string | undefined;
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
type?: ChannelType | undefined;
|
|
80
|
+
password?: string | undefined;
|
|
81
|
+
thumbnailUrl?: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
71
84
|
export interface CreateMessageDto {
|
|
72
85
|
type: MessageType;
|
|
73
86
|
message: string;
|
|
@@ -1,173 +0,0 @@
|
|
|
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";
|
|
@@ -1,46 +0,0 @@
|
|
|
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";
|
|
@@ -1,101 +0,0 @@
|
|
|
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";
|
|
@@ -1,25 +0,0 @@
|
|
|
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";
|