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