jr-common-micro 1.1.80 → 1.1.82
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/dist/proto/micro/v1/chat/chat_messages_nest.d.ts +42 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.d.ts +82 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.js +181 -1
- package/dist/proto/micro/v1/chat/services_connect.d.ts +7 -1
- package/dist/proto/micro/v1/chat/services_connect.js +6 -0
- package/dist/proto/micro/v1/chat/services_nest.d.ts +3 -1
- package/dist/proto/micro/v1/chat/services_nest.js +1 -0
- package/package.json +1 -1
- package/proto/micro/v1/chat/chat_messages.proto +61 -0
- package/proto/micro/v1/chat/services.proto +1 -0
|
@@ -123,6 +123,7 @@ export interface ChatMediaItemDto {
|
|
|
123
123
|
user_id: string;
|
|
124
124
|
username: string;
|
|
125
125
|
has_thumb: boolean;
|
|
126
|
+
caption: string;
|
|
126
127
|
}
|
|
127
128
|
export interface GroupMediaResponse {
|
|
128
129
|
status: ResponseStatus | undefined;
|
|
@@ -135,6 +136,47 @@ export interface ChatMediaGetResponse {
|
|
|
135
136
|
mimetype: string;
|
|
136
137
|
kind: string;
|
|
137
138
|
}
|
|
139
|
+
export interface GroupStatsRequest {
|
|
140
|
+
group_slug: string;
|
|
141
|
+
from: string;
|
|
142
|
+
to: string;
|
|
143
|
+
}
|
|
144
|
+
export interface GroupStatsDayDto {
|
|
145
|
+
day: string;
|
|
146
|
+
messages: number;
|
|
147
|
+
members: number;
|
|
148
|
+
joined: number;
|
|
149
|
+
left: number;
|
|
150
|
+
removed: number;
|
|
151
|
+
}
|
|
152
|
+
export interface GroupStatsMemberDto {
|
|
153
|
+
user_id: string;
|
|
154
|
+
username: string;
|
|
155
|
+
avatar_id: string;
|
|
156
|
+
badges: string[];
|
|
157
|
+
messages: number;
|
|
158
|
+
chars: number;
|
|
159
|
+
}
|
|
160
|
+
export interface GroupStatsOverviewDto {
|
|
161
|
+
members: number;
|
|
162
|
+
members_delta: number;
|
|
163
|
+
messages: number;
|
|
164
|
+
messages_prev: number;
|
|
165
|
+
joined: number;
|
|
166
|
+
left: number;
|
|
167
|
+
removed: number;
|
|
168
|
+
notify_all: number;
|
|
169
|
+
notify_mentions: number;
|
|
170
|
+
notify_off: number;
|
|
171
|
+
}
|
|
172
|
+
export interface GroupStatsResponse {
|
|
173
|
+
status: ResponseStatus | undefined;
|
|
174
|
+
overview: GroupStatsOverviewDto | undefined;
|
|
175
|
+
days: GroupStatsDayDto[];
|
|
176
|
+
top_members: GroupStatsMemberDto[];
|
|
177
|
+
from: string;
|
|
178
|
+
to: string;
|
|
179
|
+
}
|
|
138
180
|
export interface ChatPollOptionDto {
|
|
139
181
|
id: string;
|
|
140
182
|
text: string;
|
|
@@ -228,6 +228,7 @@ export declare class ChatMediaItemDto extends Message<ChatMediaItemDto> {
|
|
|
228
228
|
userId: string;
|
|
229
229
|
username: string;
|
|
230
230
|
hasThumb: boolean;
|
|
231
|
+
caption: string;
|
|
231
232
|
constructor(data?: PartialMessage<ChatMediaItemDto>);
|
|
232
233
|
static readonly runtime: typeof proto3;
|
|
233
234
|
static readonly typeName = "micro.v1.chat.ChatMediaItemDto";
|
|
@@ -264,6 +265,87 @@ export declare class ChatMediaGetResponse extends Message<ChatMediaGetResponse>
|
|
|
264
265
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaGetResponse;
|
|
265
266
|
static equals(a: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined, b: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined): boolean;
|
|
266
267
|
}
|
|
268
|
+
export declare class GroupStatsRequest extends Message<GroupStatsRequest> {
|
|
269
|
+
groupSlug: string;
|
|
270
|
+
from: string;
|
|
271
|
+
to: string;
|
|
272
|
+
constructor(data?: PartialMessage<GroupStatsRequest>);
|
|
273
|
+
static readonly runtime: typeof proto3;
|
|
274
|
+
static readonly typeName = "micro.v1.chat.GroupStatsRequest";
|
|
275
|
+
static readonly fields: FieldList;
|
|
276
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsRequest;
|
|
277
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsRequest;
|
|
278
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsRequest;
|
|
279
|
+
static equals(a: GroupStatsRequest | PlainMessage<GroupStatsRequest> | undefined, b: GroupStatsRequest | PlainMessage<GroupStatsRequest> | undefined): boolean;
|
|
280
|
+
}
|
|
281
|
+
export declare class GroupStatsDayDto extends Message<GroupStatsDayDto> {
|
|
282
|
+
day: string;
|
|
283
|
+
messages: number;
|
|
284
|
+
members: number;
|
|
285
|
+
joined: number;
|
|
286
|
+
left: number;
|
|
287
|
+
removed: number;
|
|
288
|
+
constructor(data?: PartialMessage<GroupStatsDayDto>);
|
|
289
|
+
static readonly runtime: typeof proto3;
|
|
290
|
+
static readonly typeName = "micro.v1.chat.GroupStatsDayDto";
|
|
291
|
+
static readonly fields: FieldList;
|
|
292
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsDayDto;
|
|
293
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsDayDto;
|
|
294
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsDayDto;
|
|
295
|
+
static equals(a: GroupStatsDayDto | PlainMessage<GroupStatsDayDto> | undefined, b: GroupStatsDayDto | PlainMessage<GroupStatsDayDto> | undefined): boolean;
|
|
296
|
+
}
|
|
297
|
+
export declare class GroupStatsMemberDto extends Message<GroupStatsMemberDto> {
|
|
298
|
+
userId: string;
|
|
299
|
+
username: string;
|
|
300
|
+
avatarId: string;
|
|
301
|
+
badges: string[];
|
|
302
|
+
messages: number;
|
|
303
|
+
chars: bigint;
|
|
304
|
+
constructor(data?: PartialMessage<GroupStatsMemberDto>);
|
|
305
|
+
static readonly runtime: typeof proto3;
|
|
306
|
+
static readonly typeName = "micro.v1.chat.GroupStatsMemberDto";
|
|
307
|
+
static readonly fields: FieldList;
|
|
308
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsMemberDto;
|
|
309
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsMemberDto;
|
|
310
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsMemberDto;
|
|
311
|
+
static equals(a: GroupStatsMemberDto | PlainMessage<GroupStatsMemberDto> | undefined, b: GroupStatsMemberDto | PlainMessage<GroupStatsMemberDto> | undefined): boolean;
|
|
312
|
+
}
|
|
313
|
+
export declare class GroupStatsOverviewDto extends Message<GroupStatsOverviewDto> {
|
|
314
|
+
members: number;
|
|
315
|
+
membersDelta: number;
|
|
316
|
+
messages: number;
|
|
317
|
+
messagesPrev: number;
|
|
318
|
+
joined: number;
|
|
319
|
+
left: number;
|
|
320
|
+
removed: number;
|
|
321
|
+
notifyAll: number;
|
|
322
|
+
notifyMentions: number;
|
|
323
|
+
notifyOff: number;
|
|
324
|
+
constructor(data?: PartialMessage<GroupStatsOverviewDto>);
|
|
325
|
+
static readonly runtime: typeof proto3;
|
|
326
|
+
static readonly typeName = "micro.v1.chat.GroupStatsOverviewDto";
|
|
327
|
+
static readonly fields: FieldList;
|
|
328
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsOverviewDto;
|
|
329
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsOverviewDto;
|
|
330
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsOverviewDto;
|
|
331
|
+
static equals(a: GroupStatsOverviewDto | PlainMessage<GroupStatsOverviewDto> | undefined, b: GroupStatsOverviewDto | PlainMessage<GroupStatsOverviewDto> | undefined): boolean;
|
|
332
|
+
}
|
|
333
|
+
export declare class GroupStatsResponse extends Message<GroupStatsResponse> {
|
|
334
|
+
status?: ResponseStatus;
|
|
335
|
+
overview?: GroupStatsOverviewDto;
|
|
336
|
+
days: GroupStatsDayDto[];
|
|
337
|
+
topMembers: GroupStatsMemberDto[];
|
|
338
|
+
from: string;
|
|
339
|
+
to: string;
|
|
340
|
+
constructor(data?: PartialMessage<GroupStatsResponse>);
|
|
341
|
+
static readonly runtime: typeof proto3;
|
|
342
|
+
static readonly typeName = "micro.v1.chat.GroupStatsResponse";
|
|
343
|
+
static readonly fields: FieldList;
|
|
344
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsResponse;
|
|
345
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsResponse;
|
|
346
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsResponse;
|
|
347
|
+
static equals(a: GroupStatsResponse | PlainMessage<GroupStatsResponse> | undefined, b: GroupStatsResponse | PlainMessage<GroupStatsResponse> | undefined): boolean;
|
|
348
|
+
}
|
|
267
349
|
export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
|
|
268
350
|
id: string;
|
|
269
351
|
text: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.GroupPhotoResponse = exports.GroupPhotoSetRequest = exports.ChatMemberDto = exports.ChatMemberListRequest = 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.ChatReactorDto = exports.ChatPollDto = exports.ChatPollOptionDto = exports.GroupStatsResponse = exports.GroupStatsOverviewDto = exports.GroupStatsMemberDto = exports.GroupStatsDayDto = exports.GroupStatsRequest = exports.ChatMediaGetResponse = exports.GroupMediaResponse = exports.ChatMediaItemDto = exports.GroupMediaRequest = exports.ChatMediaGetRequest = exports.ChatMediaUploadResponse = exports.ChatMediaUploadRequest = exports.ChatMediaDto = exports.ChatLinkPreviewDto = exports.ChatTickerCardDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
|
|
4
|
+
exports.ReviewReportRequest = exports.ReportListResponse = void 0;
|
|
4
5
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
6
|
const general_pb_js_1 = require("../general_pb.js");
|
|
6
7
|
class ChatGroupDto extends protobuf_1.Message {
|
|
@@ -486,6 +487,7 @@ class ChatMediaItemDto extends protobuf_1.Message {
|
|
|
486
487
|
userId = "";
|
|
487
488
|
username = "";
|
|
488
489
|
hasThumb = false;
|
|
490
|
+
caption = "";
|
|
489
491
|
constructor(data) {
|
|
490
492
|
super();
|
|
491
493
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -502,6 +504,7 @@ class ChatMediaItemDto extends protobuf_1.Message {
|
|
|
502
504
|
{ no: 7, name: "user_id", kind: "scalar", T: 9 },
|
|
503
505
|
{ no: 8, name: "username", kind: "scalar", T: 9 },
|
|
504
506
|
{ no: 9, name: "has_thumb", kind: "scalar", T: 8 },
|
|
507
|
+
{ no: 10, name: "caption", kind: "scalar", T: 9 },
|
|
505
508
|
]);
|
|
506
509
|
static fromBinary(bytes, options) {
|
|
507
510
|
return new ChatMediaItemDto().fromBinary(bytes, options);
|
|
@@ -577,6 +580,183 @@ class ChatMediaGetResponse extends protobuf_1.Message {
|
|
|
577
580
|
}
|
|
578
581
|
}
|
|
579
582
|
exports.ChatMediaGetResponse = ChatMediaGetResponse;
|
|
583
|
+
class GroupStatsRequest extends protobuf_1.Message {
|
|
584
|
+
groupSlug = "";
|
|
585
|
+
from = "";
|
|
586
|
+
to = "";
|
|
587
|
+
constructor(data) {
|
|
588
|
+
super();
|
|
589
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
590
|
+
}
|
|
591
|
+
static runtime = protobuf_1.proto3;
|
|
592
|
+
static typeName = "micro.v1.chat.GroupStatsRequest";
|
|
593
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
594
|
+
{ no: 1, name: "group_slug", kind: "scalar", T: 9 },
|
|
595
|
+
{ no: 2, name: "from", kind: "scalar", T: 9 },
|
|
596
|
+
{ no: 3, name: "to", kind: "scalar", T: 9 },
|
|
597
|
+
]);
|
|
598
|
+
static fromBinary(bytes, options) {
|
|
599
|
+
return new GroupStatsRequest().fromBinary(bytes, options);
|
|
600
|
+
}
|
|
601
|
+
static fromJson(jsonValue, options) {
|
|
602
|
+
return new GroupStatsRequest().fromJson(jsonValue, options);
|
|
603
|
+
}
|
|
604
|
+
static fromJsonString(jsonString, options) {
|
|
605
|
+
return new GroupStatsRequest().fromJsonString(jsonString, options);
|
|
606
|
+
}
|
|
607
|
+
static equals(a, b) {
|
|
608
|
+
return protobuf_1.proto3.util.equals(GroupStatsRequest, a, b);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
exports.GroupStatsRequest = GroupStatsRequest;
|
|
612
|
+
class GroupStatsDayDto extends protobuf_1.Message {
|
|
613
|
+
day = "";
|
|
614
|
+
messages = 0;
|
|
615
|
+
members = 0;
|
|
616
|
+
joined = 0;
|
|
617
|
+
left = 0;
|
|
618
|
+
removed = 0;
|
|
619
|
+
constructor(data) {
|
|
620
|
+
super();
|
|
621
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
622
|
+
}
|
|
623
|
+
static runtime = protobuf_1.proto3;
|
|
624
|
+
static typeName = "micro.v1.chat.GroupStatsDayDto";
|
|
625
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
626
|
+
{ no: 1, name: "day", kind: "scalar", T: 9 },
|
|
627
|
+
{ no: 2, name: "messages", kind: "scalar", T: 13 },
|
|
628
|
+
{ no: 3, name: "members", kind: "scalar", T: 13 },
|
|
629
|
+
{ no: 4, name: "joined", kind: "scalar", T: 13 },
|
|
630
|
+
{ no: 5, name: "left", kind: "scalar", T: 13 },
|
|
631
|
+
{ no: 6, name: "removed", kind: "scalar", T: 13 },
|
|
632
|
+
]);
|
|
633
|
+
static fromBinary(bytes, options) {
|
|
634
|
+
return new GroupStatsDayDto().fromBinary(bytes, options);
|
|
635
|
+
}
|
|
636
|
+
static fromJson(jsonValue, options) {
|
|
637
|
+
return new GroupStatsDayDto().fromJson(jsonValue, options);
|
|
638
|
+
}
|
|
639
|
+
static fromJsonString(jsonString, options) {
|
|
640
|
+
return new GroupStatsDayDto().fromJsonString(jsonString, options);
|
|
641
|
+
}
|
|
642
|
+
static equals(a, b) {
|
|
643
|
+
return protobuf_1.proto3.util.equals(GroupStatsDayDto, a, b);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
exports.GroupStatsDayDto = GroupStatsDayDto;
|
|
647
|
+
class GroupStatsMemberDto extends protobuf_1.Message {
|
|
648
|
+
userId = "";
|
|
649
|
+
username = "";
|
|
650
|
+
avatarId = "";
|
|
651
|
+
badges = [];
|
|
652
|
+
messages = 0;
|
|
653
|
+
chars = protobuf_1.protoInt64.zero;
|
|
654
|
+
constructor(data) {
|
|
655
|
+
super();
|
|
656
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
657
|
+
}
|
|
658
|
+
static runtime = protobuf_1.proto3;
|
|
659
|
+
static typeName = "micro.v1.chat.GroupStatsMemberDto";
|
|
660
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
661
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 },
|
|
662
|
+
{ no: 2, name: "username", kind: "scalar", T: 9 },
|
|
663
|
+
{ no: 3, name: "avatar_id", kind: "scalar", T: 9 },
|
|
664
|
+
{ no: 4, name: "badges", kind: "scalar", T: 9, repeated: true },
|
|
665
|
+
{ no: 5, name: "messages", kind: "scalar", T: 13 },
|
|
666
|
+
{ no: 6, name: "chars", kind: "scalar", T: 4 },
|
|
667
|
+
]);
|
|
668
|
+
static fromBinary(bytes, options) {
|
|
669
|
+
return new GroupStatsMemberDto().fromBinary(bytes, options);
|
|
670
|
+
}
|
|
671
|
+
static fromJson(jsonValue, options) {
|
|
672
|
+
return new GroupStatsMemberDto().fromJson(jsonValue, options);
|
|
673
|
+
}
|
|
674
|
+
static fromJsonString(jsonString, options) {
|
|
675
|
+
return new GroupStatsMemberDto().fromJsonString(jsonString, options);
|
|
676
|
+
}
|
|
677
|
+
static equals(a, b) {
|
|
678
|
+
return protobuf_1.proto3.util.equals(GroupStatsMemberDto, a, b);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
exports.GroupStatsMemberDto = GroupStatsMemberDto;
|
|
682
|
+
class GroupStatsOverviewDto extends protobuf_1.Message {
|
|
683
|
+
members = 0;
|
|
684
|
+
membersDelta = 0;
|
|
685
|
+
messages = 0;
|
|
686
|
+
messagesPrev = 0;
|
|
687
|
+
joined = 0;
|
|
688
|
+
left = 0;
|
|
689
|
+
removed = 0;
|
|
690
|
+
notifyAll = 0;
|
|
691
|
+
notifyMentions = 0;
|
|
692
|
+
notifyOff = 0;
|
|
693
|
+
constructor(data) {
|
|
694
|
+
super();
|
|
695
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
696
|
+
}
|
|
697
|
+
static runtime = protobuf_1.proto3;
|
|
698
|
+
static typeName = "micro.v1.chat.GroupStatsOverviewDto";
|
|
699
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
700
|
+
{ no: 1, name: "members", kind: "scalar", T: 13 },
|
|
701
|
+
{ no: 2, name: "members_delta", kind: "scalar", T: 5 },
|
|
702
|
+
{ no: 3, name: "messages", kind: "scalar", T: 13 },
|
|
703
|
+
{ no: 4, name: "messages_prev", kind: "scalar", T: 13 },
|
|
704
|
+
{ no: 5, name: "joined", kind: "scalar", T: 13 },
|
|
705
|
+
{ no: 6, name: "left", kind: "scalar", T: 13 },
|
|
706
|
+
{ no: 7, name: "removed", kind: "scalar", T: 13 },
|
|
707
|
+
{ no: 8, name: "notify_all", kind: "scalar", T: 13 },
|
|
708
|
+
{ no: 9, name: "notify_mentions", kind: "scalar", T: 13 },
|
|
709
|
+
{ no: 10, name: "notify_off", kind: "scalar", T: 13 },
|
|
710
|
+
]);
|
|
711
|
+
static fromBinary(bytes, options) {
|
|
712
|
+
return new GroupStatsOverviewDto().fromBinary(bytes, options);
|
|
713
|
+
}
|
|
714
|
+
static fromJson(jsonValue, options) {
|
|
715
|
+
return new GroupStatsOverviewDto().fromJson(jsonValue, options);
|
|
716
|
+
}
|
|
717
|
+
static fromJsonString(jsonString, options) {
|
|
718
|
+
return new GroupStatsOverviewDto().fromJsonString(jsonString, options);
|
|
719
|
+
}
|
|
720
|
+
static equals(a, b) {
|
|
721
|
+
return protobuf_1.proto3.util.equals(GroupStatsOverviewDto, a, b);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
exports.GroupStatsOverviewDto = GroupStatsOverviewDto;
|
|
725
|
+
class GroupStatsResponse extends protobuf_1.Message {
|
|
726
|
+
status;
|
|
727
|
+
overview;
|
|
728
|
+
days = [];
|
|
729
|
+
topMembers = [];
|
|
730
|
+
from = "";
|
|
731
|
+
to = "";
|
|
732
|
+
constructor(data) {
|
|
733
|
+
super();
|
|
734
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
735
|
+
}
|
|
736
|
+
static runtime = protobuf_1.proto3;
|
|
737
|
+
static typeName = "micro.v1.chat.GroupStatsResponse";
|
|
738
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
739
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
740
|
+
{ no: 2, name: "overview", kind: "message", T: GroupStatsOverviewDto },
|
|
741
|
+
{ no: 3, name: "days", kind: "message", T: GroupStatsDayDto, repeated: true },
|
|
742
|
+
{ no: 4, name: "top_members", kind: "message", T: GroupStatsMemberDto, repeated: true },
|
|
743
|
+
{ no: 5, name: "from", kind: "scalar", T: 9 },
|
|
744
|
+
{ no: 6, name: "to", kind: "scalar", T: 9 },
|
|
745
|
+
]);
|
|
746
|
+
static fromBinary(bytes, options) {
|
|
747
|
+
return new GroupStatsResponse().fromBinary(bytes, options);
|
|
748
|
+
}
|
|
749
|
+
static fromJson(jsonValue, options) {
|
|
750
|
+
return new GroupStatsResponse().fromJson(jsonValue, options);
|
|
751
|
+
}
|
|
752
|
+
static fromJsonString(jsonString, options) {
|
|
753
|
+
return new GroupStatsResponse().fromJsonString(jsonString, options);
|
|
754
|
+
}
|
|
755
|
+
static equals(a, b) {
|
|
756
|
+
return protobuf_1.proto3.util.equals(GroupStatsResponse, a, b);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
exports.GroupStatsResponse = GroupStatsResponse;
|
|
580
760
|
class ChatPollOptionDto extends protobuf_1.Message {
|
|
581
761
|
id = "";
|
|
582
762
|
text = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
|
|
2
|
-
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_pb.js";
|
|
2
|
+
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_pb.js";
|
|
3
3
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
4
4
|
export declare const PChatService: {
|
|
5
5
|
readonly typeName: "micro.v1.chat.PChatService";
|
|
@@ -52,6 +52,12 @@ export declare const PChatService: {
|
|
|
52
52
|
readonly O: typeof GroupMediaResponse;
|
|
53
53
|
readonly kind: MethodKind.ServerStreaming;
|
|
54
54
|
};
|
|
55
|
+
readonly groupStats: {
|
|
56
|
+
readonly name: "GroupStats";
|
|
57
|
+
readonly I: typeof GroupStatsRequest;
|
|
58
|
+
readonly O: typeof GroupStatsResponse;
|
|
59
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
60
|
+
};
|
|
55
61
|
readonly getGroupPhoto: {
|
|
56
62
|
readonly name: "GetGroupPhoto";
|
|
57
63
|
readonly I: typeof ByIdRequest;
|
|
@@ -55,6 +55,12 @@ exports.PChatService = {
|
|
|
55
55
|
O: chat_messages_pb_js_1.GroupMediaResponse,
|
|
56
56
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
57
57
|
},
|
|
58
|
+
groupStats: {
|
|
59
|
+
name: "GroupStats",
|
|
60
|
+
I: chat_messages_pb_js_1.GroupStatsRequest,
|
|
61
|
+
O: chat_messages_pb_js_1.GroupStatsResponse,
|
|
62
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
63
|
+
},
|
|
58
64
|
getGroupPhoto: {
|
|
59
65
|
name: "GetGroupPhoto",
|
|
60
66
|
I: general_pb_js_1.ByIdRequest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "@grpc/grpc-js";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
|
|
4
|
-
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_nest";
|
|
4
|
+
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_nest";
|
|
5
5
|
export declare const protobufPackage = "micro.v1.chat";
|
|
6
6
|
export declare const MICRO_V1_CHAT_PACKAGE_NAME = "micro.v1.chat";
|
|
7
7
|
export interface PChatServiceClient {
|
|
@@ -13,6 +13,7 @@ export interface PChatServiceClient {
|
|
|
13
13
|
pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
|
|
14
14
|
listMembers(request: ChatMemberListRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
|
|
15
15
|
groupMedia(request: GroupMediaRequest, metadata?: Metadata): Observable<GroupMediaResponse>;
|
|
16
|
+
groupStats(request: GroupStatsRequest, metadata?: Metadata): Observable<GroupStatsResponse>;
|
|
16
17
|
getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
|
|
17
18
|
uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
|
|
18
19
|
getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
|
|
@@ -31,6 +32,7 @@ export interface PChatServiceController {
|
|
|
31
32
|
pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
|
|
32
33
|
listMembers(request: ChatMemberListRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
|
|
33
34
|
groupMedia(request: GroupMediaRequest, metadata?: Metadata): Observable<GroupMediaResponse>;
|
|
35
|
+
groupStats(request: GroupStatsRequest, metadata?: Metadata): Observable<GroupStatsResponse>;
|
|
34
36
|
getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
|
|
35
37
|
uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
|
|
36
38
|
getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
|
package/package.json
CHANGED
|
@@ -191,6 +191,8 @@ message ChatMediaItemDto {
|
|
|
191
191
|
// A grid thumbnail exists (uploads from before the column fall back to
|
|
192
192
|
// the full image).
|
|
193
193
|
bool has_thumb = 9;
|
|
194
|
+
// Message text sent with the media ('' when none), for the viewer.
|
|
195
|
+
string caption = 10;
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
message GroupMediaResponse {
|
|
@@ -207,6 +209,65 @@ message ChatMediaGetResponse {
|
|
|
207
209
|
string kind = 4;
|
|
208
210
|
}
|
|
209
211
|
|
|
212
|
+
// Admin-only group statistics. Daily aggregates live in their own tables
|
|
213
|
+
// and are kept forever, so they survive the message retention purge.
|
|
214
|
+
message GroupStatsRequest {
|
|
215
|
+
string group_slug = 1;
|
|
216
|
+
// Inclusive day range as YYYY-MM-DD. Empty from = whole history,
|
|
217
|
+
// empty to = today.
|
|
218
|
+
string from = 2;
|
|
219
|
+
string to = 3;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
message GroupStatsDayDto {
|
|
223
|
+
// YYYY-MM-DD
|
|
224
|
+
string day = 1;
|
|
225
|
+
uint32 messages = 2;
|
|
226
|
+
// Member count at the end of the day (0 = no snapshot taken that day).
|
|
227
|
+
uint32 members = 3;
|
|
228
|
+
uint32 joined = 4;
|
|
229
|
+
// Left on their own / removed or banned by staff.
|
|
230
|
+
uint32 left = 5;
|
|
231
|
+
uint32 removed = 6;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
message GroupStatsMemberDto {
|
|
235
|
+
string user_id = 1;
|
|
236
|
+
// '' when the account no longer exists.
|
|
237
|
+
string username = 2;
|
|
238
|
+
string avatar_id = 3;
|
|
239
|
+
repeated string badges = 4;
|
|
240
|
+
uint32 messages = 5;
|
|
241
|
+
uint64 chars = 6;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message GroupStatsOverviewDto {
|
|
245
|
+
// Members right now and the change since the start of the period.
|
|
246
|
+
uint32 members = 1;
|
|
247
|
+
int32 members_delta = 2;
|
|
248
|
+
// Messages in the period and in the previous period of the same length.
|
|
249
|
+
uint32 messages = 3;
|
|
250
|
+
uint32 messages_prev = 4;
|
|
251
|
+
uint32 joined = 5;
|
|
252
|
+
uint32 left = 6;
|
|
253
|
+
uint32 removed = 7;
|
|
254
|
+
// Current notification preference split among members.
|
|
255
|
+
uint32 notify_all = 8;
|
|
256
|
+
uint32 notify_mentions = 9;
|
|
257
|
+
uint32 notify_off = 10;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
message GroupStatsResponse {
|
|
261
|
+
ResponseStatus status = 1;
|
|
262
|
+
GroupStatsOverviewDto overview = 2;
|
|
263
|
+
repeated GroupStatsDayDto days = 3;
|
|
264
|
+
// Up to 50, most messages first.
|
|
265
|
+
repeated GroupStatsMemberDto top_members = 4;
|
|
266
|
+
// The resolved range actually used.
|
|
267
|
+
string from = 5;
|
|
268
|
+
string to = 6;
|
|
269
|
+
}
|
|
270
|
+
|
|
210
271
|
// In-chat poll (rides a type='poll' message; dies with it via FK cascade).
|
|
211
272
|
message ChatPollOptionDto {
|
|
212
273
|
string id = 1;
|
|
@@ -15,6 +15,7 @@ service PChatService {
|
|
|
15
15
|
rpc PinnedMessages(PinnedMessagesRequest) returns(stream PinnedMessagesResponse) {}
|
|
16
16
|
rpc ListMembers(ChatMemberListRequest) returns(stream ChatMemberListResponse) {}
|
|
17
17
|
rpc GroupMedia(GroupMediaRequest) returns(stream GroupMediaResponse) {}
|
|
18
|
+
rpc GroupStats(GroupStatsRequest) returns(stream GroupStatsResponse) {}
|
|
18
19
|
rpc GetGroupPhoto(ByIdRequest) returns(stream GroupPhotoResponse) {}
|
|
19
20
|
// Authed upload (staging row); the send then references media_id.
|
|
20
21
|
rpc UploadChatMedia(ChatMediaUploadRequest) returns(stream ChatMediaUploadResponse) {}
|