jr-common-micro 1.1.75 → 1.1.77

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.
@@ -126,10 +126,16 @@ export interface ChatPollDto {
126
126
  closed: boolean;
127
127
  voters_visibility: string;
128
128
  }
129
+ export interface ChatReactorDto {
130
+ user_id: string;
131
+ avatar_id: string;
132
+ is_anonymous: boolean;
133
+ }
129
134
  export interface ChatReactionCountDto {
130
135
  emoji: string;
131
136
  count: number;
132
137
  reacted_by_me: boolean;
138
+ reactors: ChatReactorDto[];
133
139
  }
134
140
  export interface ChatReplyPreviewDto {
135
141
  id: string;
@@ -247,10 +247,24 @@ export declare class ChatPollDto extends Message<ChatPollDto> {
247
247
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatPollDto;
248
248
  static equals(a: ChatPollDto | PlainMessage<ChatPollDto> | undefined, b: ChatPollDto | PlainMessage<ChatPollDto> | undefined): boolean;
249
249
  }
250
+ export declare class ChatReactorDto extends Message<ChatReactorDto> {
251
+ userId: string;
252
+ avatarId: string;
253
+ isAnonymous: boolean;
254
+ constructor(data?: PartialMessage<ChatReactorDto>);
255
+ static readonly runtime: typeof proto3;
256
+ static readonly typeName = "micro.v1.chat.ChatReactorDto";
257
+ static readonly fields: FieldList;
258
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatReactorDto;
259
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatReactorDto;
260
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatReactorDto;
261
+ static equals(a: ChatReactorDto | PlainMessage<ChatReactorDto> | undefined, b: ChatReactorDto | PlainMessage<ChatReactorDto> | undefined): boolean;
262
+ }
250
263
  export declare class ChatReactionCountDto extends Message<ChatReactionCountDto> {
251
264
  emoji: string;
252
265
  count: number;
253
266
  reactedByMe: boolean;
267
+ reactors: ChatReactorDto[];
254
268
  constructor(data?: PartialMessage<ChatReactionCountDto>);
255
269
  static readonly runtime: typeof proto3;
256
270
  static readonly typeName = "micro.v1.chat.ChatReactionCountDto";
@@ -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.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.ChatPollDto = exports.ChatPollOptionDto = exports.ChatMediaGetResponse = 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;
3
+ exports.ReviewReportRequest = exports.ReportListResponse = 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.ChatMediaGetResponse = 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
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 {
@@ -540,10 +540,40 @@ class ChatPollDto extends protobuf_1.Message {
540
540
  }
541
541
  }
542
542
  exports.ChatPollDto = ChatPollDto;
543
+ class ChatReactorDto extends protobuf_1.Message {
544
+ userId = "";
545
+ avatarId = "";
546
+ isAnonymous = false;
547
+ constructor(data) {
548
+ super();
549
+ protobuf_1.proto3.util.initPartial(data, this);
550
+ }
551
+ static runtime = protobuf_1.proto3;
552
+ static typeName = "micro.v1.chat.ChatReactorDto";
553
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
554
+ { no: 1, name: "user_id", kind: "scalar", T: 9 },
555
+ { no: 2, name: "avatar_id", kind: "scalar", T: 9 },
556
+ { no: 3, name: "is_anonymous", kind: "scalar", T: 8 },
557
+ ]);
558
+ static fromBinary(bytes, options) {
559
+ return new ChatReactorDto().fromBinary(bytes, options);
560
+ }
561
+ static fromJson(jsonValue, options) {
562
+ return new ChatReactorDto().fromJson(jsonValue, options);
563
+ }
564
+ static fromJsonString(jsonString, options) {
565
+ return new ChatReactorDto().fromJsonString(jsonString, options);
566
+ }
567
+ static equals(a, b) {
568
+ return protobuf_1.proto3.util.equals(ChatReactorDto, a, b);
569
+ }
570
+ }
571
+ exports.ChatReactorDto = ChatReactorDto;
543
572
  class ChatReactionCountDto extends protobuf_1.Message {
544
573
  emoji = "";
545
574
  count = 0;
546
575
  reactedByMe = false;
576
+ reactors = [];
547
577
  constructor(data) {
548
578
  super();
549
579
  protobuf_1.proto3.util.initPartial(data, this);
@@ -554,6 +584,7 @@ class ChatReactionCountDto extends protobuf_1.Message {
554
584
  { no: 1, name: "emoji", kind: "scalar", T: 9 },
555
585
  { no: 2, name: "count", kind: "scalar", T: 13 },
556
586
  { no: 3, name: "reacted_by_me", kind: "scalar", T: 8 },
587
+ { no: 4, name: "reactors", kind: "message", T: ChatReactorDto, repeated: true },
557
588
  ]);
558
589
  static fromBinary(bytes, options) {
559
590
  return new ChatReactionCountDto().fromBinary(bytes, options);
@@ -115,6 +115,8 @@ export interface SendChatMentionRequest {
115
115
  preview: string;
116
116
  kind: string;
117
117
  sender_is_group: boolean;
118
+ message_id: string;
119
+ count: number;
118
120
  }
119
121
  export interface NotificationPaginationDto {
120
122
  id: string;
@@ -244,6 +244,8 @@ export declare class SendChatMentionRequest extends Message<SendChatMentionReque
244
244
  preview: string;
245
245
  kind: string;
246
246
  senderIsGroup: boolean;
247
+ messageId: string;
248
+ count: number;
247
249
  constructor(data?: PartialMessage<SendChatMentionRequest>);
248
250
  static readonly runtime: typeof proto3;
249
251
  static readonly typeName = "micro.v1.notification.SendChatMentionRequest";
@@ -529,6 +529,8 @@ class SendChatMentionRequest extends protobuf_1.Message {
529
529
  preview = "";
530
530
  kind = "";
531
531
  senderIsGroup = false;
532
+ messageId = "";
533
+ count = 0;
532
534
  constructor(data) {
533
535
  super();
534
536
  protobuf_1.proto3.util.initPartial(data, this);
@@ -543,6 +545,8 @@ class SendChatMentionRequest extends protobuf_1.Message {
543
545
  { no: 5, name: "preview", kind: "scalar", T: 9 },
544
546
  { no: 6, name: "kind", kind: "scalar", T: 9 },
545
547
  { no: 7, name: "sender_is_group", kind: "scalar", T: 8 },
548
+ { no: 8, name: "message_id", kind: "scalar", T: 9 },
549
+ { no: 9, name: "count", kind: "scalar", T: 5 },
546
550
  ]);
547
551
  static fromBinary(bytes, options) {
548
552
  return new SendChatMentionRequest().fromBinary(bytes, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.75",
3
+ "version": "1.1.77",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -188,12 +188,23 @@ message ChatPollDto {
188
188
  string voters_visibility = 8;
189
189
  }
190
190
 
191
+ // One of the first few people behind a reaction chip (avatar preview).
192
+ message ChatReactorDto {
193
+ // '' for an anonymous staff member (shown as the group).
194
+ string user_id = 1;
195
+ string avatar_id = 2;
196
+ bool is_anonymous = 3;
197
+ }
198
+
191
199
  // Aggregated reaction chip for one emoji on one message.
192
200
  message ChatReactionCountDto {
193
201
  string emoji = 1;
194
202
  uint32 count = 2;
195
203
  // True when the requesting user set this reaction (per-viewer field).
196
204
  bool reacted_by_me = 3;
205
+ // Latest reactors, at most 3: lets the chip show faces instead of a
206
+ // number while the count is small (Telegram style).
207
+ repeated ChatReactorDto reactors = 4;
197
208
  }
198
209
 
199
210
  message ChatReplyPreviewDto {
@@ -140,11 +140,17 @@ message SendChatMentionRequest {
140
140
  string group_name = 3;
141
141
  string group_slug = 4;
142
142
  string preview = 5;
143
- // "mention" (default) or "message" (all-messages subscription push).
143
+ // "mention" (default) | "reply" | "message" (first all-messages line)
144
+ // | "summary" (N new messages since the room was last opened).
144
145
  string kind = 6;
145
146
  // sender_username is the GROUP's name (anonymous staff post): the push
146
147
  // text must not put an "@" in front of it.
147
148
  bool sender_is_group = 7;
149
+ // Message the push deep-links to; '' when there is no single target.
150
+ string message_id = 8;
151
+ // kind "summary" only: unread count since the room was last opened;
152
+ // 0 = open-ended wording ("new messages") once the per-absence cap hits.
153
+ int32 count = 9;
148
154
  }
149
155
 
150
156
  message NotificationPaginationDto {