jr-common-micro 1.1.125 → 1.1.127

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.
@@ -29,6 +29,8 @@ export interface ChatGroupDto {
29
29
  list_visibility: string;
30
30
  access: string;
31
31
  theme: string;
32
+ name_tl: string;
33
+ description_tl: string;
32
34
  }
33
35
  export interface ChatGroupListResponse {
34
36
  status: ResponseStatus | undefined;
@@ -71,6 +73,12 @@ export interface ChatMessageDto {
71
73
  is_anonymous: boolean;
72
74
  is_own: boolean;
73
75
  badges: string[];
76
+ translation: MessageTranslationDto | undefined;
77
+ }
78
+ export interface MessageTranslationDto {
79
+ lang: string;
80
+ text: string;
81
+ src: string;
74
82
  }
75
83
  export interface ChatTickerCardDto {
76
84
  symbol: string;
@@ -209,6 +217,7 @@ export interface ChatPollOptionDto {
209
217
  id: string;
210
218
  text: string;
211
219
  votes: number;
220
+ text_tl: string;
212
221
  }
213
222
  export interface ChatPollDto {
214
223
  id: string;
@@ -219,6 +228,7 @@ export interface ChatPollDto {
219
228
  ends_at: string;
220
229
  closed: boolean;
221
230
  voters_visibility: string;
231
+ question_tl: string;
222
232
  }
223
233
  export interface ChatReactorDto {
224
234
  user_id: string;
@@ -30,6 +30,8 @@ export declare class ChatGroupDto extends Message<ChatGroupDto> {
30
30
  listVisibility: string;
31
31
  access: string;
32
32
  theme: string;
33
+ nameTl: string;
34
+ descriptionTl: string;
33
35
  constructor(data?: PartialMessage<ChatGroupDto>);
34
36
  static readonly runtime: typeof proto3;
35
37
  static readonly typeName = "micro.v1.chat.ChatGroupDto";
@@ -112,6 +114,7 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
112
114
  isAnonymous: boolean;
113
115
  isOwn: boolean;
114
116
  badges: string[];
117
+ translation?: MessageTranslationDto;
115
118
  constructor(data?: PartialMessage<ChatMessageDto>);
116
119
  static readonly runtime: typeof proto3;
117
120
  static readonly typeName = "micro.v1.chat.ChatMessageDto";
@@ -121,6 +124,19 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
121
124
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessageDto;
122
125
  static equals(a: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined, b: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined): boolean;
123
126
  }
127
+ export declare class MessageTranslationDto extends Message<MessageTranslationDto> {
128
+ lang: string;
129
+ text: string;
130
+ src: string;
131
+ constructor(data?: PartialMessage<MessageTranslationDto>);
132
+ static readonly runtime: typeof proto3;
133
+ static readonly typeName = "micro.v1.chat.MessageTranslationDto";
134
+ static readonly fields: FieldList;
135
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MessageTranslationDto;
136
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MessageTranslationDto;
137
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MessageTranslationDto;
138
+ static equals(a: MessageTranslationDto | PlainMessage<MessageTranslationDto> | undefined, b: MessageTranslationDto | PlainMessage<MessageTranslationDto> | undefined): boolean;
139
+ }
124
140
  export declare class ChatTickerCardDto extends Message<ChatTickerCardDto> {
125
141
  symbol: string;
126
142
  name: string;
@@ -402,6 +418,7 @@ export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
402
418
  id: string;
403
419
  text: string;
404
420
  votes: number;
421
+ textTl: string;
405
422
  constructor(data?: PartialMessage<ChatPollOptionDto>);
406
423
  static readonly runtime: typeof proto3;
407
424
  static readonly typeName = "micro.v1.chat.ChatPollOptionDto";
@@ -420,6 +437,7 @@ export declare class ChatPollDto extends Message<ChatPollDto> {
420
437
  endsAt: string;
421
438
  closed: boolean;
422
439
  votersVisibility: string;
440
+ questionTl: string;
423
441
  constructor(data?: PartialMessage<ChatPollDto>);
424
442
  static readonly runtime: typeof proto3;
425
443
  static readonly typeName = "micro.v1.chat.ChatPollDto";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.GifSearchResponse = exports.GifItemDto = exports.GifSearchRequest = exports.ChatMediaDto = exports.ChatLinkPreviewDto = exports.ChatTickerCardDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
4
- exports.VoiceSummaryRequest = exports.VoiceAccessResponse = exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = void 0;
3
+ 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.GifSearchResponse = exports.GifItemDto = exports.GifSearchRequest = exports.ChatMediaDto = exports.ChatLinkPreviewDto = exports.ChatTickerCardDto = exports.MessageTranslationDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
4
+ exports.VoiceSummaryRequest = exports.VoiceAccessResponse = exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = void 0;
5
5
  const protobuf_1 = require("@bufbuild/protobuf");
6
6
  const general_pb_js_1 = require("../general_pb.js");
7
7
  class ChatGroupDto extends protobuf_1.Message {
@@ -33,6 +33,8 @@ class ChatGroupDto extends protobuf_1.Message {
33
33
  listVisibility = "";
34
34
  access = "";
35
35
  theme = "";
36
+ nameTl = "";
37
+ descriptionTl = "";
36
38
  constructor(data) {
37
39
  super();
38
40
  protobuf_1.proto3.util.initPartial(data, this);
@@ -68,6 +70,8 @@ class ChatGroupDto extends protobuf_1.Message {
68
70
  { no: 26, name: "list_visibility", kind: "scalar", T: 9 },
69
71
  { no: 27, name: "access", kind: "scalar", T: 9 },
70
72
  { no: 28, name: "theme", kind: "scalar", T: 9 },
73
+ { no: 29, name: "name_tl", kind: "scalar", T: 9 },
74
+ { no: 30, name: "description_tl", kind: "scalar", T: 9 },
71
75
  ]);
72
76
  static fromBinary(bytes, options) {
73
77
  return new ChatGroupDto().fromBinary(bytes, options);
@@ -215,6 +219,7 @@ class ChatMessageDto extends protobuf_1.Message {
215
219
  isAnonymous = false;
216
220
  isOwn = false;
217
221
  badges = [];
222
+ translation;
218
223
  constructor(data) {
219
224
  super();
220
225
  protobuf_1.proto3.util.initPartial(data, this);
@@ -247,6 +252,7 @@ class ChatMessageDto extends protobuf_1.Message {
247
252
  { no: 23, name: "is_anonymous", kind: "scalar", T: 8 },
248
253
  { no: 24, name: "is_own", kind: "scalar", T: 8 },
249
254
  { no: 25, name: "badges", kind: "scalar", T: 9, repeated: true },
255
+ { no: 26, name: "translation", kind: "message", T: MessageTranslationDto },
250
256
  ]);
251
257
  static fromBinary(bytes, options) {
252
258
  return new ChatMessageDto().fromBinary(bytes, options);
@@ -262,6 +268,35 @@ class ChatMessageDto extends protobuf_1.Message {
262
268
  }
263
269
  }
264
270
  exports.ChatMessageDto = ChatMessageDto;
271
+ class MessageTranslationDto extends protobuf_1.Message {
272
+ lang = "";
273
+ text = "";
274
+ src = "";
275
+ constructor(data) {
276
+ super();
277
+ protobuf_1.proto3.util.initPartial(data, this);
278
+ }
279
+ static runtime = protobuf_1.proto3;
280
+ static typeName = "micro.v1.chat.MessageTranslationDto";
281
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
282
+ { no: 1, name: "lang", kind: "scalar", T: 9 },
283
+ { no: 2, name: "text", kind: "scalar", T: 9 },
284
+ { no: 3, name: "src", kind: "scalar", T: 9 },
285
+ ]);
286
+ static fromBinary(bytes, options) {
287
+ return new MessageTranslationDto().fromBinary(bytes, options);
288
+ }
289
+ static fromJson(jsonValue, options) {
290
+ return new MessageTranslationDto().fromJson(jsonValue, options);
291
+ }
292
+ static fromJsonString(jsonString, options) {
293
+ return new MessageTranslationDto().fromJsonString(jsonString, options);
294
+ }
295
+ static equals(a, b) {
296
+ return protobuf_1.proto3.util.equals(MessageTranslationDto, a, b);
297
+ }
298
+ }
299
+ exports.MessageTranslationDto = MessageTranslationDto;
265
300
  class ChatTickerCardDto extends protobuf_1.Message {
266
301
  symbol = "";
267
302
  name = "";
@@ -874,6 +909,7 @@ class ChatPollOptionDto extends protobuf_1.Message {
874
909
  id = "";
875
910
  text = "";
876
911
  votes = 0;
912
+ textTl = "";
877
913
  constructor(data) {
878
914
  super();
879
915
  protobuf_1.proto3.util.initPartial(data, this);
@@ -884,6 +920,7 @@ class ChatPollOptionDto extends protobuf_1.Message {
884
920
  { no: 1, name: "id", kind: "scalar", T: 9 },
885
921
  { no: 2, name: "text", kind: "scalar", T: 9 },
886
922
  { no: 3, name: "votes", kind: "scalar", T: 13 },
923
+ { no: 4, name: "text_tl", kind: "scalar", T: 9 },
887
924
  ]);
888
925
  static fromBinary(bytes, options) {
889
926
  return new ChatPollOptionDto().fromBinary(bytes, options);
@@ -908,6 +945,7 @@ class ChatPollDto extends protobuf_1.Message {
908
945
  endsAt = "";
909
946
  closed = false;
910
947
  votersVisibility = "";
948
+ questionTl = "";
911
949
  constructor(data) {
912
950
  super();
913
951
  protobuf_1.proto3.util.initPartial(data, this);
@@ -923,6 +961,7 @@ class ChatPollDto extends protobuf_1.Message {
923
961
  { no: 6, name: "ends_at", kind: "scalar", T: 9 },
924
962
  { no: 7, name: "closed", kind: "scalar", T: 8 },
925
963
  { no: 8, name: "voters_visibility", kind: "scalar", T: 9 },
964
+ { no: 9, name: "question_tl", kind: "scalar", T: 9 },
926
965
  ]);
927
966
  static fromBinary(bytes, options) {
928
967
  return new ChatPollDto().fromBinary(bytes, options);
@@ -170,6 +170,13 @@ export interface SendChatMentionRequest {
170
170
  sender_is_group: boolean;
171
171
  message_id: string;
172
172
  count: number;
173
+ previews: {
174
+ [key: string]: string;
175
+ };
176
+ }
177
+ export interface SendChatMentionRequest_PreviewsEntry {
178
+ key: string;
179
+ value: string;
173
180
  }
174
181
  export interface NotificationPaginationDto {
175
182
  id: string;
@@ -291,6 +291,9 @@ export declare class SendChatMentionRequest extends Message<SendChatMentionReque
291
291
  senderIsGroup: boolean;
292
292
  messageId: string;
293
293
  count: number;
294
+ previews: {
295
+ [key: string]: string;
296
+ };
294
297
  constructor(data?: PartialMessage<SendChatMentionRequest>);
295
298
  static readonly runtime: typeof proto3;
296
299
  static readonly typeName = "micro.v1.notification.SendChatMentionRequest";
@@ -608,6 +608,7 @@ class SendChatMentionRequest extends protobuf_1.Message {
608
608
  senderIsGroup = false;
609
609
  messageId = "";
610
610
  count = 0;
611
+ previews = {};
611
612
  constructor(data) {
612
613
  super();
613
614
  protobuf_1.proto3.util.initPartial(data, this);
@@ -624,6 +625,7 @@ class SendChatMentionRequest extends protobuf_1.Message {
624
625
  { no: 7, name: "sender_is_group", kind: "scalar", T: 8 },
625
626
  { no: 8, name: "message_id", kind: "scalar", T: 9 },
626
627
  { no: 9, name: "count", kind: "scalar", T: 5 },
628
+ { no: 10, name: "previews", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
627
629
  ]);
628
630
  static fromBinary(bytes, options) {
629
631
  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.125",
3
+ "version": "1.1.127",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -52,6 +52,11 @@ message ChatGroupDto {
52
52
  string access = 27;
53
53
  // Look of the group's row and header: default | gold.
54
54
  string theme = 28;
55
+ // The name and description in the caller's language (accept-language),
56
+ // when a translation exists; empty otherwise. Admin screens keep the
57
+ // originals.
58
+ string name_tl = 29;
59
+ string description_tl = 30;
55
60
  }
56
61
 
57
62
  message ChatGroupListResponse {
@@ -120,7 +125,18 @@ message ChatMessageDto {
120
125
  bool is_own = 24;
121
126
  // Display badges of the user (gold | premium); empty for anonymous.
122
127
  repeated string badges = 25;
128
+ // The content in the caller's language (accept-language), once it has
129
+ // been translated; absent otherwise. `content` stays the original.
130
+ MessageTranslationDto translation = 26;
131
+ }
123
132
 
133
+ // A machine translation of a message's content.
134
+ message MessageTranslationDto {
135
+ // The language of `text` (one of the app's languages).
136
+ string lang = 1;
137
+ string text = 2;
138
+ // The detected language of the original.
139
+ string src = 3;
124
140
  }
125
141
 
126
142
  message ChatTickerCardDto {
@@ -325,6 +341,9 @@ message ChatPollOptionDto {
325
341
  string id = 1;
326
342
  string text = 2;
327
343
  uint32 votes = 3;
344
+ // The option in the reader's language (accept-language) when the poll has
345
+ // been translated; empty otherwise.
346
+ string text_tl = 4;
328
347
  }
329
348
 
330
349
  message ChatPollDto {
@@ -338,6 +357,8 @@ message ChatPollDto {
338
357
  bool closed = 7;
339
358
  // everyone | mods | anonymous
340
359
  string voters_visibility = 8;
360
+ // The question in the reader's language when translated; empty otherwise.
361
+ string question_tl = 9;
341
362
  }
342
363
 
343
364
  // One of the first few people behind a reaction chip (avatar preview).
@@ -193,6 +193,9 @@ message SendChatMentionRequest {
193
193
  // kind "summary" only: unread count since the room was last opened;
194
194
  // 0 = open-ended wording ("new messages") once the per-absence cap hits.
195
195
  int32 count = 9;
196
+ // The preview in other languages (code → text) for devices in those
197
+ // languages; a device whose language is missing reads `preview`.
198
+ map<string, string> previews = 10;
196
199
  }
197
200
 
198
201
  message NotificationPaginationDto {