jr-common-micro 1.1.62 → 1.1.64
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.
|
@@ -56,6 +56,16 @@ export interface ChatMessageDto {
|
|
|
56
56
|
edited_at: string;
|
|
57
57
|
poll: ChatPollDto | undefined;
|
|
58
58
|
media: ChatMediaDto | undefined;
|
|
59
|
+
link_preview: ChatLinkPreviewDto | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface ChatLinkPreviewDto {
|
|
62
|
+
url: string;
|
|
63
|
+
site_name: string;
|
|
64
|
+
title: string;
|
|
65
|
+
description: string;
|
|
66
|
+
image_public_id: string;
|
|
67
|
+
image_width: number;
|
|
68
|
+
image_height: number;
|
|
59
69
|
}
|
|
60
70
|
export interface ChatMediaDto {
|
|
61
71
|
public_id: string;
|
|
@@ -108,6 +118,7 @@ export interface ChatReplyPreviewDto {
|
|
|
108
118
|
id: string;
|
|
109
119
|
username: string;
|
|
110
120
|
content: string;
|
|
121
|
+
user_id: string;
|
|
111
122
|
}
|
|
112
123
|
export interface MessageHistoryRequest {
|
|
113
124
|
group_slug: string;
|
|
@@ -97,6 +97,7 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
|
|
|
97
97
|
editedAt: string;
|
|
98
98
|
poll?: ChatPollDto;
|
|
99
99
|
media?: ChatMediaDto;
|
|
100
|
+
linkPreview?: ChatLinkPreviewDto;
|
|
100
101
|
constructor(data?: PartialMessage<ChatMessageDto>);
|
|
101
102
|
static readonly runtime: typeof proto3;
|
|
102
103
|
static readonly typeName = "micro.v1.chat.ChatMessageDto";
|
|
@@ -106,6 +107,23 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
|
|
|
106
107
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessageDto;
|
|
107
108
|
static equals(a: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined, b: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined): boolean;
|
|
108
109
|
}
|
|
110
|
+
export declare class ChatLinkPreviewDto extends Message<ChatLinkPreviewDto> {
|
|
111
|
+
url: string;
|
|
112
|
+
siteName: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
imagePublicId: string;
|
|
116
|
+
imageWidth: number;
|
|
117
|
+
imageHeight: number;
|
|
118
|
+
constructor(data?: PartialMessage<ChatLinkPreviewDto>);
|
|
119
|
+
static readonly runtime: typeof proto3;
|
|
120
|
+
static readonly typeName = "micro.v1.chat.ChatLinkPreviewDto";
|
|
121
|
+
static readonly fields: FieldList;
|
|
122
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatLinkPreviewDto;
|
|
123
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatLinkPreviewDto;
|
|
124
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatLinkPreviewDto;
|
|
125
|
+
static equals(a: ChatLinkPreviewDto | PlainMessage<ChatLinkPreviewDto> | undefined, b: ChatLinkPreviewDto | PlainMessage<ChatLinkPreviewDto> | undefined): boolean;
|
|
126
|
+
}
|
|
109
127
|
export declare class ChatMediaDto extends Message<ChatMediaDto> {
|
|
110
128
|
publicId: string;
|
|
111
129
|
kind: string;
|
|
@@ -221,6 +239,7 @@ export declare class ChatReplyPreviewDto extends Message<ChatReplyPreviewDto> {
|
|
|
221
239
|
id: string;
|
|
222
240
|
username: string;
|
|
223
241
|
content: string;
|
|
242
|
+
userId: string;
|
|
224
243
|
constructor(data?: PartialMessage<ChatReplyPreviewDto>);
|
|
225
244
|
static readonly runtime: typeof proto3;
|
|
226
245
|
static readonly typeName = "micro.v1.chat.ChatReplyPreviewDto";
|
|
@@ -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.ChatPollDto = exports.ChatPollOptionDto = exports.ChatMediaGetResponse = exports.ChatMediaGetRequest = exports.ChatMediaUploadResponse = exports.ChatMediaUploadRequest = exports.ChatMediaDto = 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.ChatMediaGetResponse = exports.ChatMediaGetRequest = exports.ChatMediaUploadResponse = exports.ChatMediaUploadRequest = exports.ChatMediaDto = exports.ChatLinkPreviewDto = 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 {
|
|
@@ -191,6 +191,7 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
191
191
|
editedAt = "";
|
|
192
192
|
poll;
|
|
193
193
|
media;
|
|
194
|
+
linkPreview;
|
|
194
195
|
constructor(data) {
|
|
195
196
|
super();
|
|
196
197
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -216,6 +217,7 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
216
217
|
{ no: 16, name: "edited_at", kind: "scalar", T: 9 },
|
|
217
218
|
{ no: 17, name: "poll", kind: "message", T: ChatPollDto },
|
|
218
219
|
{ no: 18, name: "media", kind: "message", T: ChatMediaDto },
|
|
220
|
+
{ no: 19, name: "link_preview", kind: "message", T: ChatLinkPreviewDto },
|
|
219
221
|
]);
|
|
220
222
|
static fromBinary(bytes, options) {
|
|
221
223
|
return new ChatMessageDto().fromBinary(bytes, options);
|
|
@@ -231,6 +233,43 @@ class ChatMessageDto extends protobuf_1.Message {
|
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
exports.ChatMessageDto = ChatMessageDto;
|
|
236
|
+
class ChatLinkPreviewDto extends protobuf_1.Message {
|
|
237
|
+
url = "";
|
|
238
|
+
siteName = "";
|
|
239
|
+
title = "";
|
|
240
|
+
description = "";
|
|
241
|
+
imagePublicId = "";
|
|
242
|
+
imageWidth = 0;
|
|
243
|
+
imageHeight = 0;
|
|
244
|
+
constructor(data) {
|
|
245
|
+
super();
|
|
246
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
247
|
+
}
|
|
248
|
+
static runtime = protobuf_1.proto3;
|
|
249
|
+
static typeName = "micro.v1.chat.ChatLinkPreviewDto";
|
|
250
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
251
|
+
{ no: 1, name: "url", kind: "scalar", T: 9 },
|
|
252
|
+
{ no: 2, name: "site_name", kind: "scalar", T: 9 },
|
|
253
|
+
{ no: 3, name: "title", kind: "scalar", T: 9 },
|
|
254
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 },
|
|
255
|
+
{ no: 5, name: "image_public_id", kind: "scalar", T: 9 },
|
|
256
|
+
{ no: 6, name: "image_width", kind: "scalar", T: 13 },
|
|
257
|
+
{ no: 7, name: "image_height", kind: "scalar", T: 13 },
|
|
258
|
+
]);
|
|
259
|
+
static fromBinary(bytes, options) {
|
|
260
|
+
return new ChatLinkPreviewDto().fromBinary(bytes, options);
|
|
261
|
+
}
|
|
262
|
+
static fromJson(jsonValue, options) {
|
|
263
|
+
return new ChatLinkPreviewDto().fromJson(jsonValue, options);
|
|
264
|
+
}
|
|
265
|
+
static fromJsonString(jsonString, options) {
|
|
266
|
+
return new ChatLinkPreviewDto().fromJsonString(jsonString, options);
|
|
267
|
+
}
|
|
268
|
+
static equals(a, b) {
|
|
269
|
+
return protobuf_1.proto3.util.equals(ChatLinkPreviewDto, a, b);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
exports.ChatLinkPreviewDto = ChatLinkPreviewDto;
|
|
234
273
|
class ChatMediaDto extends protobuf_1.Message {
|
|
235
274
|
publicId = "";
|
|
236
275
|
kind = "";
|
|
@@ -481,6 +520,7 @@ class ChatReplyPreviewDto extends protobuf_1.Message {
|
|
|
481
520
|
id = "";
|
|
482
521
|
username = "";
|
|
483
522
|
content = "";
|
|
523
|
+
userId = "";
|
|
484
524
|
constructor(data) {
|
|
485
525
|
super();
|
|
486
526
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -491,6 +531,7 @@ class ChatReplyPreviewDto extends protobuf_1.Message {
|
|
|
491
531
|
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
492
532
|
{ no: 2, name: "username", kind: "scalar", T: 9 },
|
|
493
533
|
{ no: 3, name: "content", kind: "scalar", T: 9 },
|
|
534
|
+
{ no: 4, name: "user_id", kind: "scalar", T: 9 },
|
|
494
535
|
]);
|
|
495
536
|
static fromBinary(bytes, options) {
|
|
496
537
|
return new ChatReplyPreviewDto().fromBinary(bytes, options);
|
package/package.json
CHANGED
|
@@ -79,6 +79,20 @@ message ChatMessageDto {
|
|
|
79
79
|
ChatPollDto poll = 17;
|
|
80
80
|
// Attached photo/video; bytes are served separately by public_id.
|
|
81
81
|
ChatMediaDto media = 18;
|
|
82
|
+
// OpenGraph preview of the first link (staff messages only). Arrives
|
|
83
|
+
// asynchronously after the send; history carries it inline.
|
|
84
|
+
ChatLinkPreviewDto link_preview = 19;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message ChatLinkPreviewDto {
|
|
88
|
+
string url = 1;
|
|
89
|
+
string site_name = 2;
|
|
90
|
+
string title = 3;
|
|
91
|
+
string description = 4;
|
|
92
|
+
// Thumbnail rides the chat media store (kind='link'); empty = no image.
|
|
93
|
+
string image_public_id = 5;
|
|
94
|
+
uint32 image_width = 6;
|
|
95
|
+
uint32 image_height = 7;
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
// Media descriptor riding a message; the payload itself never travels with
|
|
@@ -148,6 +162,8 @@ message ChatReplyPreviewDto {
|
|
|
148
162
|
string id = 1;
|
|
149
163
|
string username = 2;
|
|
150
164
|
string content = 3;
|
|
165
|
+
// Quote header colors follow the author's identity color.
|
|
166
|
+
string user_id = 4;
|
|
151
167
|
}
|
|
152
168
|
|
|
153
169
|
message MessageHistoryRequest {
|