jr-common-micro 1.1.81 → 1.1.83
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
|
@@ -136,6 +136,48 @@ export interface ChatMediaGetResponse {
|
|
|
136
136
|
mimetype: string;
|
|
137
137
|
kind: string;
|
|
138
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
|
+
active_members: number;
|
|
172
|
+
}
|
|
173
|
+
export interface GroupStatsResponse {
|
|
174
|
+
status: ResponseStatus | undefined;
|
|
175
|
+
overview: GroupStatsOverviewDto | undefined;
|
|
176
|
+
days: GroupStatsDayDto[];
|
|
177
|
+
top_members: GroupStatsMemberDto[];
|
|
178
|
+
from: string;
|
|
179
|
+
to: string;
|
|
180
|
+
}
|
|
139
181
|
export interface ChatPollOptionDto {
|
|
140
182
|
id: string;
|
|
141
183
|
text: string;
|
|
@@ -265,6 +265,88 @@ export declare class ChatMediaGetResponse extends Message<ChatMediaGetResponse>
|
|
|
265
265
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaGetResponse;
|
|
266
266
|
static equals(a: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined, b: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined): boolean;
|
|
267
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
|
+
activeMembers: number;
|
|
325
|
+
constructor(data?: PartialMessage<GroupStatsOverviewDto>);
|
|
326
|
+
static readonly runtime: typeof proto3;
|
|
327
|
+
static readonly typeName = "micro.v1.chat.GroupStatsOverviewDto";
|
|
328
|
+
static readonly fields: FieldList;
|
|
329
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsOverviewDto;
|
|
330
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsOverviewDto;
|
|
331
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsOverviewDto;
|
|
332
|
+
static equals(a: GroupStatsOverviewDto | PlainMessage<GroupStatsOverviewDto> | undefined, b: GroupStatsOverviewDto | PlainMessage<GroupStatsOverviewDto> | undefined): boolean;
|
|
333
|
+
}
|
|
334
|
+
export declare class GroupStatsResponse extends Message<GroupStatsResponse> {
|
|
335
|
+
status?: ResponseStatus;
|
|
336
|
+
overview?: GroupStatsOverviewDto;
|
|
337
|
+
days: GroupStatsDayDto[];
|
|
338
|
+
topMembers: GroupStatsMemberDto[];
|
|
339
|
+
from: string;
|
|
340
|
+
to: string;
|
|
341
|
+
constructor(data?: PartialMessage<GroupStatsResponse>);
|
|
342
|
+
static readonly runtime: typeof proto3;
|
|
343
|
+
static readonly typeName = "micro.v1.chat.GroupStatsResponse";
|
|
344
|
+
static readonly fields: FieldList;
|
|
345
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupStatsResponse;
|
|
346
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupStatsResponse;
|
|
347
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupStatsResponse;
|
|
348
|
+
static equals(a: GroupStatsResponse | PlainMessage<GroupStatsResponse> | undefined, b: GroupStatsResponse | PlainMessage<GroupStatsResponse> | undefined): boolean;
|
|
349
|
+
}
|
|
268
350
|
export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
|
|
269
351
|
id: string;
|
|
270
352
|
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 {
|
|
@@ -579,6 +580,185 @@ class ChatMediaGetResponse extends protobuf_1.Message {
|
|
|
579
580
|
}
|
|
580
581
|
}
|
|
581
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
|
+
activeMembers = 0;
|
|
694
|
+
constructor(data) {
|
|
695
|
+
super();
|
|
696
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
697
|
+
}
|
|
698
|
+
static runtime = protobuf_1.proto3;
|
|
699
|
+
static typeName = "micro.v1.chat.GroupStatsOverviewDto";
|
|
700
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
701
|
+
{ no: 1, name: "members", kind: "scalar", T: 13 },
|
|
702
|
+
{ no: 2, name: "members_delta", kind: "scalar", T: 5 },
|
|
703
|
+
{ no: 3, name: "messages", kind: "scalar", T: 13 },
|
|
704
|
+
{ no: 4, name: "messages_prev", kind: "scalar", T: 13 },
|
|
705
|
+
{ no: 5, name: "joined", kind: "scalar", T: 13 },
|
|
706
|
+
{ no: 6, name: "left", kind: "scalar", T: 13 },
|
|
707
|
+
{ no: 7, name: "removed", kind: "scalar", T: 13 },
|
|
708
|
+
{ no: 8, name: "notify_all", kind: "scalar", T: 13 },
|
|
709
|
+
{ no: 9, name: "notify_mentions", kind: "scalar", T: 13 },
|
|
710
|
+
{ no: 10, name: "notify_off", kind: "scalar", T: 13 },
|
|
711
|
+
{ no: 11, name: "active_members", kind: "scalar", T: 13 },
|
|
712
|
+
]);
|
|
713
|
+
static fromBinary(bytes, options) {
|
|
714
|
+
return new GroupStatsOverviewDto().fromBinary(bytes, options);
|
|
715
|
+
}
|
|
716
|
+
static fromJson(jsonValue, options) {
|
|
717
|
+
return new GroupStatsOverviewDto().fromJson(jsonValue, options);
|
|
718
|
+
}
|
|
719
|
+
static fromJsonString(jsonString, options) {
|
|
720
|
+
return new GroupStatsOverviewDto().fromJsonString(jsonString, options);
|
|
721
|
+
}
|
|
722
|
+
static equals(a, b) {
|
|
723
|
+
return protobuf_1.proto3.util.equals(GroupStatsOverviewDto, a, b);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
exports.GroupStatsOverviewDto = GroupStatsOverviewDto;
|
|
727
|
+
class GroupStatsResponse extends protobuf_1.Message {
|
|
728
|
+
status;
|
|
729
|
+
overview;
|
|
730
|
+
days = [];
|
|
731
|
+
topMembers = [];
|
|
732
|
+
from = "";
|
|
733
|
+
to = "";
|
|
734
|
+
constructor(data) {
|
|
735
|
+
super();
|
|
736
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
737
|
+
}
|
|
738
|
+
static runtime = protobuf_1.proto3;
|
|
739
|
+
static typeName = "micro.v1.chat.GroupStatsResponse";
|
|
740
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
741
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
742
|
+
{ no: 2, name: "overview", kind: "message", T: GroupStatsOverviewDto },
|
|
743
|
+
{ no: 3, name: "days", kind: "message", T: GroupStatsDayDto, repeated: true },
|
|
744
|
+
{ no: 4, name: "top_members", kind: "message", T: GroupStatsMemberDto, repeated: true },
|
|
745
|
+
{ no: 5, name: "from", kind: "scalar", T: 9 },
|
|
746
|
+
{ no: 6, name: "to", kind: "scalar", T: 9 },
|
|
747
|
+
]);
|
|
748
|
+
static fromBinary(bytes, options) {
|
|
749
|
+
return new GroupStatsResponse().fromBinary(bytes, options);
|
|
750
|
+
}
|
|
751
|
+
static fromJson(jsonValue, options) {
|
|
752
|
+
return new GroupStatsResponse().fromJson(jsonValue, options);
|
|
753
|
+
}
|
|
754
|
+
static fromJsonString(jsonString, options) {
|
|
755
|
+
return new GroupStatsResponse().fromJsonString(jsonString, options);
|
|
756
|
+
}
|
|
757
|
+
static equals(a, b) {
|
|
758
|
+
return protobuf_1.proto3.util.equals(GroupStatsResponse, a, b);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
exports.GroupStatsResponse = GroupStatsResponse;
|
|
582
762
|
class ChatPollOptionDto extends protobuf_1.Message {
|
|
583
763
|
id = "";
|
|
584
764
|
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
|
@@ -209,6 +209,67 @@ message ChatMediaGetResponse {
|
|
|
209
209
|
string kind = 4;
|
|
210
210
|
}
|
|
211
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
|
+
// Members who posted at least once in the period.
|
|
259
|
+
uint32 active_members = 11;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
message GroupStatsResponse {
|
|
263
|
+
ResponseStatus status = 1;
|
|
264
|
+
GroupStatsOverviewDto overview = 2;
|
|
265
|
+
repeated GroupStatsDayDto days = 3;
|
|
266
|
+
// Up to 50, most messages first.
|
|
267
|
+
repeated GroupStatsMemberDto top_members = 4;
|
|
268
|
+
// The resolved range actually used.
|
|
269
|
+
string from = 5;
|
|
270
|
+
string to = 6;
|
|
271
|
+
}
|
|
272
|
+
|
|
212
273
|
// In-chat poll (rides a type='poll' message; dies with it via FK cascade).
|
|
213
274
|
message ChatPollOptionDto {
|
|
214
275
|
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) {}
|