jr-common-micro 1.1.58 → 1.1.60
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.
|
@@ -18,6 +18,9 @@ export interface ChatGroupDto {
|
|
|
18
18
|
sort_order: number;
|
|
19
19
|
is_active: boolean;
|
|
20
20
|
system_notices: boolean;
|
|
21
|
+
poll_policy: string;
|
|
22
|
+
has_unread_mention: boolean;
|
|
23
|
+
has_unread_reaction: boolean;
|
|
21
24
|
}
|
|
22
25
|
export interface ChatGroupListResponse {
|
|
23
26
|
status: ResponseStatus | undefined;
|
|
@@ -51,6 +54,22 @@ export interface ChatMessageDto {
|
|
|
51
54
|
is_deleted: boolean;
|
|
52
55
|
reactions: ChatReactionCountDto[];
|
|
53
56
|
edited_at: string;
|
|
57
|
+
poll: ChatPollDto | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface ChatPollOptionDto {
|
|
60
|
+
id: string;
|
|
61
|
+
text: string;
|
|
62
|
+
votes: number;
|
|
63
|
+
}
|
|
64
|
+
export interface ChatPollDto {
|
|
65
|
+
id: string;
|
|
66
|
+
question: string;
|
|
67
|
+
options: ChatPollOptionDto[];
|
|
68
|
+
total_votes: number;
|
|
69
|
+
my_option_id: string;
|
|
70
|
+
ends_at: string;
|
|
71
|
+
closed: boolean;
|
|
72
|
+
voters_visibility: string;
|
|
54
73
|
}
|
|
55
74
|
export interface ChatReactionCountDto {
|
|
56
75
|
emoji: string;
|
|
@@ -19,6 +19,9 @@ export declare class ChatGroupDto extends Message<ChatGroupDto> {
|
|
|
19
19
|
sortOrder: number;
|
|
20
20
|
isActive: boolean;
|
|
21
21
|
systemNotices: boolean;
|
|
22
|
+
pollPolicy: string;
|
|
23
|
+
hasUnreadMention: boolean;
|
|
24
|
+
hasUnreadReaction: boolean;
|
|
22
25
|
constructor(data?: PartialMessage<ChatGroupDto>);
|
|
23
26
|
static readonly runtime: typeof proto3;
|
|
24
27
|
static readonly typeName = "micro.v1.chat.ChatGroupDto";
|
|
@@ -92,6 +95,7 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
|
|
|
92
95
|
isDeleted: boolean;
|
|
93
96
|
reactions: ChatReactionCountDto[];
|
|
94
97
|
editedAt: string;
|
|
98
|
+
poll?: ChatPollDto;
|
|
95
99
|
constructor(data?: PartialMessage<ChatMessageDto>);
|
|
96
100
|
static readonly runtime: typeof proto3;
|
|
97
101
|
static readonly typeName = "micro.v1.chat.ChatMessageDto";
|
|
@@ -101,6 +105,37 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
|
|
|
101
105
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessageDto;
|
|
102
106
|
static equals(a: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined, b: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined): boolean;
|
|
103
107
|
}
|
|
108
|
+
export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
|
|
109
|
+
id: string;
|
|
110
|
+
text: string;
|
|
111
|
+
votes: number;
|
|
112
|
+
constructor(data?: PartialMessage<ChatPollOptionDto>);
|
|
113
|
+
static readonly runtime: typeof proto3;
|
|
114
|
+
static readonly typeName = "micro.v1.chat.ChatPollOptionDto";
|
|
115
|
+
static readonly fields: FieldList;
|
|
116
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatPollOptionDto;
|
|
117
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatPollOptionDto;
|
|
118
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatPollOptionDto;
|
|
119
|
+
static equals(a: ChatPollOptionDto | PlainMessage<ChatPollOptionDto> | undefined, b: ChatPollOptionDto | PlainMessage<ChatPollOptionDto> | undefined): boolean;
|
|
120
|
+
}
|
|
121
|
+
export declare class ChatPollDto extends Message<ChatPollDto> {
|
|
122
|
+
id: string;
|
|
123
|
+
question: string;
|
|
124
|
+
options: ChatPollOptionDto[];
|
|
125
|
+
totalVotes: number;
|
|
126
|
+
myOptionId: string;
|
|
127
|
+
endsAt: string;
|
|
128
|
+
closed: boolean;
|
|
129
|
+
votersVisibility: string;
|
|
130
|
+
constructor(data?: PartialMessage<ChatPollDto>);
|
|
131
|
+
static readonly runtime: typeof proto3;
|
|
132
|
+
static readonly typeName = "micro.v1.chat.ChatPollDto";
|
|
133
|
+
static readonly fields: FieldList;
|
|
134
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatPollDto;
|
|
135
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatPollDto;
|
|
136
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatPollDto;
|
|
137
|
+
static equals(a: ChatPollDto | PlainMessage<ChatPollDto> | undefined, b: ChatPollDto | PlainMessage<ChatPollDto> | undefined): boolean;
|
|
138
|
+
}
|
|
104
139
|
export declare class ChatReactionCountDto extends Message<ChatReactionCountDto> {
|
|
105
140
|
emoji: string;
|
|
106
141
|
count: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.GroupPhotoResponse = exports.GroupPhotoSetRequest = exports.ChatMemberDto = exports.PendingMembersRequest = exports.MemberActionRequest = exports.PinMessageRequest = exports.DeleteMessageRequest = exports.RevokeSanctionRequest = exports.SanctionRequest = exports.GroupUpsertRequest = exports.BlockedUsersResponse = exports.BlockUserRequest = exports.ReportMessageRequest = exports.PinnedMessagesResponse = exports.PinnedMessagesRequest = exports.MessageHistoryResponse = exports.MessageHistoryRequest = exports.ChatReplyPreviewDto = exports.ChatReactionCountDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
|
|
3
|
+
exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.GroupPhotoResponse = exports.GroupPhotoSetRequest = exports.ChatMemberDto = exports.PendingMembersRequest = exports.MemberActionRequest = exports.PinMessageRequest = exports.DeleteMessageRequest = exports.RevokeSanctionRequest = exports.SanctionRequest = exports.GroupUpsertRequest = exports.BlockedUsersResponse = exports.BlockUserRequest = exports.ReportMessageRequest = exports.PinnedMessagesResponse = exports.PinnedMessagesRequest = exports.MessageHistoryResponse = exports.MessageHistoryRequest = exports.ChatReplyPreviewDto = exports.ChatReactionCountDto = exports.ChatPollDto = exports.ChatPollOptionDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
|
|
4
4
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
5
|
const general_pb_js_1 = require("../general_pb.js");
|
|
6
6
|
class ChatGroupDto extends protobuf_1.Message {
|
|
@@ -21,6 +21,9 @@ class ChatGroupDto extends protobuf_1.Message {
|
|
|
21
21
|
sortOrder = 0;
|
|
22
22
|
isActive = false;
|
|
23
23
|
systemNotices = false;
|
|
24
|
+
pollPolicy = "";
|
|
25
|
+
hasUnreadMention = false;
|
|
26
|
+
hasUnreadReaction = false;
|
|
24
27
|
constructor(data) {
|
|
25
28
|
super();
|
|
26
29
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -45,6 +48,9 @@ class ChatGroupDto extends protobuf_1.Message {
|
|
|
45
48
|
{ no: 15, name: "sort_order", kind: "scalar", T: 5 },
|
|
46
49
|
{ no: 16, name: "is_active", kind: "scalar", T: 8 },
|
|
47
50
|
{ no: 17, name: "system_notices", kind: "scalar", T: 8 },
|
|
51
|
+
{ no: 18, name: "poll_policy", kind: "scalar", T: 9 },
|
|
52
|
+
{ no: 19, name: "has_unread_mention", kind: "scalar", T: 8 },
|
|
53
|
+
{ no: 20, name: "has_unread_reaction", kind: "scalar", T: 8 },
|
|
48
54
|
]);
|
|
49
55
|
static fromBinary(bytes, options) {
|
|
50
56
|
return new ChatGroupDto().fromBinary(bytes, options);
|
|
@@ -183,6 +189,7 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
183
189
|
isDeleted = false;
|
|
184
190
|
reactions = [];
|
|
185
191
|
editedAt = "";
|
|
192
|
+
poll;
|
|
186
193
|
constructor(data) {
|
|
187
194
|
super();
|
|
188
195
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -206,6 +213,7 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
206
213
|
{ no: 14, name: "is_deleted", kind: "scalar", T: 8 },
|
|
207
214
|
{ no: 15, name: "reactions", kind: "message", T: ChatReactionCountDto, repeated: true },
|
|
208
215
|
{ no: 16, name: "edited_at", kind: "scalar", T: 9 },
|
|
216
|
+
{ no: 17, name: "poll", kind: "message", T: ChatPollDto },
|
|
209
217
|
]);
|
|
210
218
|
static fromBinary(bytes, options) {
|
|
211
219
|
return new ChatMessageDto().fromBinary(bytes, options);
|
|
@@ -221,6 +229,74 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
221
229
|
}
|
|
222
230
|
}
|
|
223
231
|
exports.ChatMessageDto = ChatMessageDto;
|
|
232
|
+
class ChatPollOptionDto extends protobuf_1.Message {
|
|
233
|
+
id = "";
|
|
234
|
+
text = "";
|
|
235
|
+
votes = 0;
|
|
236
|
+
constructor(data) {
|
|
237
|
+
super();
|
|
238
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
239
|
+
}
|
|
240
|
+
static runtime = protobuf_1.proto3;
|
|
241
|
+
static typeName = "micro.v1.chat.ChatPollOptionDto";
|
|
242
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
243
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
244
|
+
{ no: 2, name: "text", kind: "scalar", T: 9 },
|
|
245
|
+
{ no: 3, name: "votes", kind: "scalar", T: 13 },
|
|
246
|
+
]);
|
|
247
|
+
static fromBinary(bytes, options) {
|
|
248
|
+
return new ChatPollOptionDto().fromBinary(bytes, options);
|
|
249
|
+
}
|
|
250
|
+
static fromJson(jsonValue, options) {
|
|
251
|
+
return new ChatPollOptionDto().fromJson(jsonValue, options);
|
|
252
|
+
}
|
|
253
|
+
static fromJsonString(jsonString, options) {
|
|
254
|
+
return new ChatPollOptionDto().fromJsonString(jsonString, options);
|
|
255
|
+
}
|
|
256
|
+
static equals(a, b) {
|
|
257
|
+
return protobuf_1.proto3.util.equals(ChatPollOptionDto, a, b);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
exports.ChatPollOptionDto = ChatPollOptionDto;
|
|
261
|
+
class ChatPollDto extends protobuf_1.Message {
|
|
262
|
+
id = "";
|
|
263
|
+
question = "";
|
|
264
|
+
options = [];
|
|
265
|
+
totalVotes = 0;
|
|
266
|
+
myOptionId = "";
|
|
267
|
+
endsAt = "";
|
|
268
|
+
closed = false;
|
|
269
|
+
votersVisibility = "";
|
|
270
|
+
constructor(data) {
|
|
271
|
+
super();
|
|
272
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
273
|
+
}
|
|
274
|
+
static runtime = protobuf_1.proto3;
|
|
275
|
+
static typeName = "micro.v1.chat.ChatPollDto";
|
|
276
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
277
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
278
|
+
{ no: 2, name: "question", kind: "scalar", T: 9 },
|
|
279
|
+
{ no: 3, name: "options", kind: "message", T: ChatPollOptionDto, repeated: true },
|
|
280
|
+
{ no: 4, name: "total_votes", kind: "scalar", T: 13 },
|
|
281
|
+
{ no: 5, name: "my_option_id", kind: "scalar", T: 9 },
|
|
282
|
+
{ no: 6, name: "ends_at", kind: "scalar", T: 9 },
|
|
283
|
+
{ no: 7, name: "closed", kind: "scalar", T: 8 },
|
|
284
|
+
{ no: 8, name: "voters_visibility", kind: "scalar", T: 9 },
|
|
285
|
+
]);
|
|
286
|
+
static fromBinary(bytes, options) {
|
|
287
|
+
return new ChatPollDto().fromBinary(bytes, options);
|
|
288
|
+
}
|
|
289
|
+
static fromJson(jsonValue, options) {
|
|
290
|
+
return new ChatPollDto().fromJson(jsonValue, options);
|
|
291
|
+
}
|
|
292
|
+
static fromJsonString(jsonString, options) {
|
|
293
|
+
return new ChatPollDto().fromJsonString(jsonString, options);
|
|
294
|
+
}
|
|
295
|
+
static equals(a, b) {
|
|
296
|
+
return protobuf_1.proto3.util.equals(ChatPollDto, a, b);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.ChatPollDto = ChatPollDto;
|
|
224
300
|
class ChatReactionCountDto extends protobuf_1.Message {
|
|
225
301
|
emoji = "";
|
|
226
302
|
count = 0;
|
package/package.json
CHANGED
|
@@ -29,6 +29,11 @@ message ChatGroupDto {
|
|
|
29
29
|
bool is_active = 16;
|
|
30
30
|
// Per-group policy: generate sanction/join system bubbles (mods-only view).
|
|
31
31
|
bool system_notices = 17;
|
|
32
|
+
// Who may create polls: mods | everyone
|
|
33
|
+
string poll_policy = 18;
|
|
34
|
+
// Viewer has unseen mentions/replies or reactions in this group.
|
|
35
|
+
bool has_unread_mention = 19;
|
|
36
|
+
bool has_unread_reaction = 20;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
message ChatGroupListResponse {
|
|
@@ -70,6 +75,28 @@ message ChatMessageDto {
|
|
|
70
75
|
repeated ChatReactionCountDto reactions = 15;
|
|
71
76
|
// Set when the owner edited the message (15-minute window).
|
|
72
77
|
string edited_at = 16;
|
|
78
|
+
// Present only on type='poll' messages.
|
|
79
|
+
ChatPollDto poll = 17;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// In-chat poll (rides a type='poll' message; dies with it via FK cascade).
|
|
83
|
+
message ChatPollOptionDto {
|
|
84
|
+
string id = 1;
|
|
85
|
+
string text = 2;
|
|
86
|
+
uint32 votes = 3;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message ChatPollDto {
|
|
90
|
+
string id = 1;
|
|
91
|
+
string question = 2;
|
|
92
|
+
repeated ChatPollOptionDto options = 3;
|
|
93
|
+
uint32 total_votes = 4;
|
|
94
|
+
// Viewer's current vote (option id) or empty.
|
|
95
|
+
string my_option_id = 5;
|
|
96
|
+
string ends_at = 6;
|
|
97
|
+
bool closed = 7;
|
|
98
|
+
// everyone | mods | anonymous
|
|
99
|
+
string voters_visibility = 8;
|
|
73
100
|
}
|
|
74
101
|
|
|
75
102
|
// Aggregated reaction chip for one emoji on one message.
|