jr-common-micro 1.1.126 → 1.1.128
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 +2 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.d.ts +2 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.js +4 -0
- package/dist/proto/micro/v1/notification/notification_messages_nest.d.ts +7 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.d.ts +3 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.js +2 -0
- package/dist/proto/micro/v1/support/services_connect.d.ts +7 -1
- package/dist/proto/micro/v1/support/services_connect.js +6 -0
- package/dist/proto/micro/v1/support/services_nest.d.ts +3 -1
- package/dist/proto/micro/v1/support/services_nest.js +1 -0
- package/dist/proto/micro/v1/support/support_messages_nest.d.ts +21 -0
- package/dist/proto/micro/v1/support/support_messages_pb.d.ts +45 -0
- package/dist/proto/micro/v1/support/support_messages_pb.js +100 -1
- package/package.json +1 -1
- package/proto/micro/v1/chat/chat_messages.proto +5 -0
- package/proto/micro/v1/notification/notification_messages.proto +3 -0
- package/proto/micro/v1/support/services.proto +2 -0
- package/proto/micro/v1/support/support_messages.proto +36 -0
|
@@ -217,6 +217,7 @@ export interface ChatPollOptionDto {
|
|
|
217
217
|
id: string;
|
|
218
218
|
text: string;
|
|
219
219
|
votes: number;
|
|
220
|
+
text_tl: string;
|
|
220
221
|
}
|
|
221
222
|
export interface ChatPollDto {
|
|
222
223
|
id: string;
|
|
@@ -227,6 +228,7 @@ export interface ChatPollDto {
|
|
|
227
228
|
ends_at: string;
|
|
228
229
|
closed: boolean;
|
|
229
230
|
voters_visibility: string;
|
|
231
|
+
question_tl: string;
|
|
230
232
|
}
|
|
231
233
|
export interface ChatReactorDto {
|
|
232
234
|
user_id: string;
|
|
@@ -418,6 +418,7 @@ export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
|
|
|
418
418
|
id: string;
|
|
419
419
|
text: string;
|
|
420
420
|
votes: number;
|
|
421
|
+
textTl: string;
|
|
421
422
|
constructor(data?: PartialMessage<ChatPollOptionDto>);
|
|
422
423
|
static readonly runtime: typeof proto3;
|
|
423
424
|
static readonly typeName = "micro.v1.chat.ChatPollOptionDto";
|
|
@@ -436,6 +437,7 @@ export declare class ChatPollDto extends Message<ChatPollDto> {
|
|
|
436
437
|
endsAt: string;
|
|
437
438
|
closed: boolean;
|
|
438
439
|
votersVisibility: string;
|
|
440
|
+
questionTl: string;
|
|
439
441
|
constructor(data?: PartialMessage<ChatPollDto>);
|
|
440
442
|
static readonly runtime: typeof proto3;
|
|
441
443
|
static readonly typeName = "micro.v1.chat.ChatPollDto";
|
|
@@ -909,6 +909,7 @@ class ChatPollOptionDto extends protobuf_1.Message {
|
|
|
909
909
|
id = "";
|
|
910
910
|
text = "";
|
|
911
911
|
votes = 0;
|
|
912
|
+
textTl = "";
|
|
912
913
|
constructor(data) {
|
|
913
914
|
super();
|
|
914
915
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -919,6 +920,7 @@ class ChatPollOptionDto extends protobuf_1.Message {
|
|
|
919
920
|
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
920
921
|
{ no: 2, name: "text", kind: "scalar", T: 9 },
|
|
921
922
|
{ no: 3, name: "votes", kind: "scalar", T: 13 },
|
|
923
|
+
{ no: 4, name: "text_tl", kind: "scalar", T: 9 },
|
|
922
924
|
]);
|
|
923
925
|
static fromBinary(bytes, options) {
|
|
924
926
|
return new ChatPollOptionDto().fromBinary(bytes, options);
|
|
@@ -943,6 +945,7 @@ class ChatPollDto extends protobuf_1.Message {
|
|
|
943
945
|
endsAt = "";
|
|
944
946
|
closed = false;
|
|
945
947
|
votersVisibility = "";
|
|
948
|
+
questionTl = "";
|
|
946
949
|
constructor(data) {
|
|
947
950
|
super();
|
|
948
951
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -958,6 +961,7 @@ class ChatPollDto extends protobuf_1.Message {
|
|
|
958
961
|
{ no: 6, name: "ends_at", kind: "scalar", T: 9 },
|
|
959
962
|
{ no: 7, name: "closed", kind: "scalar", T: 8 },
|
|
960
963
|
{ no: 8, name: "voters_visibility", kind: "scalar", T: 9 },
|
|
964
|
+
{ no: 9, name: "question_tl", kind: "scalar", T: 9 },
|
|
961
965
|
]);
|
|
962
966
|
static fromBinary(bytes, options) {
|
|
963
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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetHiddenRequest, SetStatusRequest, TicketDraftsRequest, TicketDraftsResponse, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_pb.js";
|
|
1
|
+
import { AttachmentRequest, AttachmentResponse, CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetHiddenRequest, SetStatusRequest, TicketDraftsRequest, TicketDraftsResponse, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_pb.js";
|
|
2
2
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
3
|
import { ByIdRequest, EmptyResponse } from "../general_pb.js";
|
|
4
4
|
export declare const PSupportService: {
|
|
@@ -34,6 +34,12 @@ export declare const PSupportService: {
|
|
|
34
34
|
readonly O: typeof TicketThreadResponse;
|
|
35
35
|
readonly kind: MethodKind.ServerStreaming;
|
|
36
36
|
};
|
|
37
|
+
readonly attachment: {
|
|
38
|
+
readonly name: "Attachment";
|
|
39
|
+
readonly I: typeof AttachmentRequest;
|
|
40
|
+
readonly O: typeof AttachmentResponse;
|
|
41
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
42
|
+
};
|
|
37
43
|
readonly adminTickets: {
|
|
38
44
|
readonly name: "AdminTickets";
|
|
39
45
|
readonly I: typeof TicketListRequest;
|
|
@@ -37,6 +37,12 @@ exports.PSupportService = {
|
|
|
37
37
|
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
38
38
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
39
39
|
},
|
|
40
|
+
attachment: {
|
|
41
|
+
name: "Attachment",
|
|
42
|
+
I: support_messages_pb_js_1.AttachmentRequest,
|
|
43
|
+
O: support_messages_pb_js_1.AttachmentResponse,
|
|
44
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
45
|
+
},
|
|
40
46
|
adminTickets: {
|
|
41
47
|
name: "AdminTickets",
|
|
42
48
|
I: support_messages_pb_js_1.TicketListRequest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "@grpc/grpc-js";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { ByIdRequest, EmptyResponse } from "../general_nest";
|
|
4
|
-
import { CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetHiddenRequest, SetStatusRequest, TicketDraftsRequest, TicketDraftsResponse, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_nest";
|
|
4
|
+
import { AttachmentRequest, AttachmentResponse, CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetHiddenRequest, SetStatusRequest, TicketDraftsRequest, TicketDraftsResponse, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_nest";
|
|
5
5
|
export declare const protobufPackage = "micro.v1.support";
|
|
6
6
|
export declare const MICRO_V1_SUPPORT_PACKAGE_NAME = "micro.v1.support";
|
|
7
7
|
export interface PSupportServiceClient {
|
|
@@ -10,6 +10,7 @@ export interface PSupportServiceClient {
|
|
|
10
10
|
ticket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
11
11
|
reply(request: ReplyRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
12
12
|
deleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
13
|
+
attachment(request: AttachmentRequest, metadata?: Metadata): Observable<AttachmentResponse>;
|
|
13
14
|
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
14
15
|
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
15
16
|
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
@@ -23,6 +24,7 @@ export interface PSupportServiceController {
|
|
|
23
24
|
ticket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
24
25
|
reply(request: ReplyRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
25
26
|
deleteMessage(request: DeleteMessageRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
27
|
+
attachment(request: AttachmentRequest, metadata?: Metadata): Observable<AttachmentResponse>;
|
|
26
28
|
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
27
29
|
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
28
30
|
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
@@ -20,6 +20,13 @@ export interface Ticket {
|
|
|
20
20
|
updated_at: string;
|
|
21
21
|
closed_at: string;
|
|
22
22
|
hidden: boolean;
|
|
23
|
+
last_has_attachment: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface TicketAttachment {
|
|
26
|
+
id: string;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
expired: boolean;
|
|
23
30
|
}
|
|
24
31
|
export interface TicketMessage {
|
|
25
32
|
id: string;
|
|
@@ -30,6 +37,7 @@ export interface TicketMessage {
|
|
|
30
37
|
message: string;
|
|
31
38
|
attachment_url: string;
|
|
32
39
|
created_at: string;
|
|
40
|
+
attachment?: TicketAttachment | undefined;
|
|
33
41
|
}
|
|
34
42
|
export interface CreateTicketRequest {
|
|
35
43
|
topic: string;
|
|
@@ -37,6 +45,8 @@ export interface CreateTicketRequest {
|
|
|
37
45
|
attachment_url: string;
|
|
38
46
|
platform: string;
|
|
39
47
|
app_version: string;
|
|
48
|
+
attachment_data: Buffer;
|
|
49
|
+
attachment_mimetype: string;
|
|
40
50
|
}
|
|
41
51
|
export interface TicketListRequest {
|
|
42
52
|
page: number;
|
|
@@ -48,6 +58,17 @@ export interface ReplyRequest {
|
|
|
48
58
|
ticket_id: string;
|
|
49
59
|
message: string;
|
|
50
60
|
attachment_url: string;
|
|
61
|
+
attachment_data: Buffer;
|
|
62
|
+
attachment_mimetype: string;
|
|
63
|
+
}
|
|
64
|
+
export interface AttachmentRequest {
|
|
65
|
+
id: string;
|
|
66
|
+
thumb: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface AttachmentResponse {
|
|
69
|
+
status: ResponseStatus | undefined;
|
|
70
|
+
data: Buffer;
|
|
71
|
+
mimetype: string;
|
|
51
72
|
}
|
|
52
73
|
export interface DeleteMessageRequest {
|
|
53
74
|
ticket_id: string;
|
|
@@ -21,6 +21,7 @@ export declare class Ticket extends Message<Ticket> {
|
|
|
21
21
|
updatedAt: string;
|
|
22
22
|
closedAt: string;
|
|
23
23
|
hidden: boolean;
|
|
24
|
+
lastHasAttachment: boolean;
|
|
24
25
|
constructor(data?: PartialMessage<Ticket>);
|
|
25
26
|
static readonly runtime: typeof proto3;
|
|
26
27
|
static readonly typeName = "micro.v1.support.Ticket";
|
|
@@ -30,6 +31,20 @@ export declare class Ticket extends Message<Ticket> {
|
|
|
30
31
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Ticket;
|
|
31
32
|
static equals(a: Ticket | PlainMessage<Ticket> | undefined, b: Ticket | PlainMessage<Ticket> | undefined): boolean;
|
|
32
33
|
}
|
|
34
|
+
export declare class TicketAttachment extends Message<TicketAttachment> {
|
|
35
|
+
id: string;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
expired: boolean;
|
|
39
|
+
constructor(data?: PartialMessage<TicketAttachment>);
|
|
40
|
+
static readonly runtime: typeof proto3;
|
|
41
|
+
static readonly typeName = "micro.v1.support.TicketAttachment";
|
|
42
|
+
static readonly fields: FieldList;
|
|
43
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketAttachment;
|
|
44
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketAttachment;
|
|
45
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketAttachment;
|
|
46
|
+
static equals(a: TicketAttachment | PlainMessage<TicketAttachment> | undefined, b: TicketAttachment | PlainMessage<TicketAttachment> | undefined): boolean;
|
|
47
|
+
}
|
|
33
48
|
export declare class TicketMessage extends Message<TicketMessage> {
|
|
34
49
|
id: string;
|
|
35
50
|
ticketId: string;
|
|
@@ -39,6 +54,7 @@ export declare class TicketMessage extends Message<TicketMessage> {
|
|
|
39
54
|
message: string;
|
|
40
55
|
attachmentUrl: string;
|
|
41
56
|
createdAt: string;
|
|
57
|
+
attachment?: TicketAttachment;
|
|
42
58
|
constructor(data?: PartialMessage<TicketMessage>);
|
|
43
59
|
static readonly runtime: typeof proto3;
|
|
44
60
|
static readonly typeName = "micro.v1.support.TicketMessage";
|
|
@@ -54,6 +70,8 @@ export declare class CreateTicketRequest extends Message<CreateTicketRequest> {
|
|
|
54
70
|
attachmentUrl: string;
|
|
55
71
|
platform: string;
|
|
56
72
|
appVersion: string;
|
|
73
|
+
attachmentData: Uint8Array<ArrayBuffer>;
|
|
74
|
+
attachmentMimetype: string;
|
|
57
75
|
constructor(data?: PartialMessage<CreateTicketRequest>);
|
|
58
76
|
static readonly runtime: typeof proto3;
|
|
59
77
|
static readonly typeName = "micro.v1.support.CreateTicketRequest";
|
|
@@ -81,6 +99,8 @@ export declare class ReplyRequest extends Message<ReplyRequest> {
|
|
|
81
99
|
ticketId: string;
|
|
82
100
|
message: string;
|
|
83
101
|
attachmentUrl: string;
|
|
102
|
+
attachmentData: Uint8Array<ArrayBuffer>;
|
|
103
|
+
attachmentMimetype: string;
|
|
84
104
|
constructor(data?: PartialMessage<ReplyRequest>);
|
|
85
105
|
static readonly runtime: typeof proto3;
|
|
86
106
|
static readonly typeName = "micro.v1.support.ReplyRequest";
|
|
@@ -90,6 +110,31 @@ export declare class ReplyRequest extends Message<ReplyRequest> {
|
|
|
90
110
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReplyRequest;
|
|
91
111
|
static equals(a: ReplyRequest | PlainMessage<ReplyRequest> | undefined, b: ReplyRequest | PlainMessage<ReplyRequest> | undefined): boolean;
|
|
92
112
|
}
|
|
113
|
+
export declare class AttachmentRequest extends Message<AttachmentRequest> {
|
|
114
|
+
id: string;
|
|
115
|
+
thumb: boolean;
|
|
116
|
+
constructor(data?: PartialMessage<AttachmentRequest>);
|
|
117
|
+
static readonly runtime: typeof proto3;
|
|
118
|
+
static readonly typeName = "micro.v1.support.AttachmentRequest";
|
|
119
|
+
static readonly fields: FieldList;
|
|
120
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AttachmentRequest;
|
|
121
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AttachmentRequest;
|
|
122
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AttachmentRequest;
|
|
123
|
+
static equals(a: AttachmentRequest | PlainMessage<AttachmentRequest> | undefined, b: AttachmentRequest | PlainMessage<AttachmentRequest> | undefined): boolean;
|
|
124
|
+
}
|
|
125
|
+
export declare class AttachmentResponse extends Message<AttachmentResponse> {
|
|
126
|
+
status?: ResponseStatus;
|
|
127
|
+
data: Uint8Array<ArrayBuffer>;
|
|
128
|
+
mimetype: string;
|
|
129
|
+
constructor(data?: PartialMessage<AttachmentResponse>);
|
|
130
|
+
static readonly runtime: typeof proto3;
|
|
131
|
+
static readonly typeName = "micro.v1.support.AttachmentResponse";
|
|
132
|
+
static readonly fields: FieldList;
|
|
133
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AttachmentResponse;
|
|
134
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AttachmentResponse;
|
|
135
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AttachmentResponse;
|
|
136
|
+
static equals(a: AttachmentResponse | PlainMessage<AttachmentResponse> | undefined, b: AttachmentResponse | PlainMessage<AttachmentResponse> | undefined): boolean;
|
|
137
|
+
}
|
|
93
138
|
export declare class DeleteMessageRequest extends Message<DeleteMessageRequest> {
|
|
94
139
|
ticketId: string;
|
|
95
140
|
messageId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketThreadResponse = exports.TicketListResponse = exports.TicketResponse = exports.TicketDraftsResponse = exports.TicketDraftsRequest = exports.TicketCounts = exports.SetHiddenRequest = exports.SetStatusRequest = exports.DeleteMessageRequest = exports.ReplyRequest = exports.TicketListRequest = exports.CreateTicketRequest = exports.TicketMessage = exports.Ticket = void 0;
|
|
3
|
+
exports.TicketThreadResponse = exports.TicketListResponse = exports.TicketResponse = exports.TicketDraftsResponse = exports.TicketDraftsRequest = exports.TicketCounts = exports.SetHiddenRequest = exports.SetStatusRequest = exports.DeleteMessageRequest = exports.AttachmentResponse = exports.AttachmentRequest = exports.ReplyRequest = exports.TicketListRequest = exports.CreateTicketRequest = exports.TicketMessage = exports.TicketAttachment = exports.Ticket = void 0;
|
|
4
4
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
5
|
const general_pb_js_1 = require("../general_pb.js");
|
|
6
6
|
class Ticket extends protobuf_1.Message {
|
|
@@ -23,6 +23,7 @@ class Ticket extends protobuf_1.Message {
|
|
|
23
23
|
updatedAt = "";
|
|
24
24
|
closedAt = "";
|
|
25
25
|
hidden = false;
|
|
26
|
+
lastHasAttachment = false;
|
|
26
27
|
constructor(data) {
|
|
27
28
|
super();
|
|
28
29
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -49,6 +50,7 @@ class Ticket extends protobuf_1.Message {
|
|
|
49
50
|
{ no: 17, name: "updated_at", kind: "scalar", T: 9 },
|
|
50
51
|
{ no: 18, name: "closed_at", kind: "scalar", T: 9 },
|
|
51
52
|
{ no: 19, name: "hidden", kind: "scalar", T: 8 },
|
|
53
|
+
{ no: 20, name: "last_has_attachment", kind: "scalar", T: 8 },
|
|
52
54
|
]);
|
|
53
55
|
static fromBinary(bytes, options) {
|
|
54
56
|
return new Ticket().fromBinary(bytes, options);
|
|
@@ -64,6 +66,37 @@ class Ticket extends protobuf_1.Message {
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
exports.Ticket = Ticket;
|
|
69
|
+
class TicketAttachment extends protobuf_1.Message {
|
|
70
|
+
id = "";
|
|
71
|
+
width = 0;
|
|
72
|
+
height = 0;
|
|
73
|
+
expired = false;
|
|
74
|
+
constructor(data) {
|
|
75
|
+
super();
|
|
76
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
77
|
+
}
|
|
78
|
+
static runtime = protobuf_1.proto3;
|
|
79
|
+
static typeName = "micro.v1.support.TicketAttachment";
|
|
80
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
81
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
82
|
+
{ no: 2, name: "width", kind: "scalar", T: 5 },
|
|
83
|
+
{ no: 3, name: "height", kind: "scalar", T: 5 },
|
|
84
|
+
{ no: 4, name: "expired", kind: "scalar", T: 8 },
|
|
85
|
+
]);
|
|
86
|
+
static fromBinary(bytes, options) {
|
|
87
|
+
return new TicketAttachment().fromBinary(bytes, options);
|
|
88
|
+
}
|
|
89
|
+
static fromJson(jsonValue, options) {
|
|
90
|
+
return new TicketAttachment().fromJson(jsonValue, options);
|
|
91
|
+
}
|
|
92
|
+
static fromJsonString(jsonString, options) {
|
|
93
|
+
return new TicketAttachment().fromJsonString(jsonString, options);
|
|
94
|
+
}
|
|
95
|
+
static equals(a, b) {
|
|
96
|
+
return protobuf_1.proto3.util.equals(TicketAttachment, a, b);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.TicketAttachment = TicketAttachment;
|
|
67
100
|
class TicketMessage extends protobuf_1.Message {
|
|
68
101
|
id = "";
|
|
69
102
|
ticketId = "";
|
|
@@ -73,6 +106,7 @@ class TicketMessage extends protobuf_1.Message {
|
|
|
73
106
|
message = "";
|
|
74
107
|
attachmentUrl = "";
|
|
75
108
|
createdAt = "";
|
|
109
|
+
attachment;
|
|
76
110
|
constructor(data) {
|
|
77
111
|
super();
|
|
78
112
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -88,6 +122,7 @@ class TicketMessage extends protobuf_1.Message {
|
|
|
88
122
|
{ no: 6, name: "message", kind: "scalar", T: 9 },
|
|
89
123
|
{ no: 7, name: "attachment_url", kind: "scalar", T: 9 },
|
|
90
124
|
{ no: 8, name: "created_at", kind: "scalar", T: 9 },
|
|
125
|
+
{ no: 9, name: "attachment", kind: "message", T: TicketAttachment, opt: true },
|
|
91
126
|
]);
|
|
92
127
|
static fromBinary(bytes, options) {
|
|
93
128
|
return new TicketMessage().fromBinary(bytes, options);
|
|
@@ -109,6 +144,8 @@ class CreateTicketRequest extends protobuf_1.Message {
|
|
|
109
144
|
attachmentUrl = "";
|
|
110
145
|
platform = "";
|
|
111
146
|
appVersion = "";
|
|
147
|
+
attachmentData = new Uint8Array(0);
|
|
148
|
+
attachmentMimetype = "";
|
|
112
149
|
constructor(data) {
|
|
113
150
|
super();
|
|
114
151
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -121,6 +158,8 @@ class CreateTicketRequest extends protobuf_1.Message {
|
|
|
121
158
|
{ no: 3, name: "attachment_url", kind: "scalar", T: 9 },
|
|
122
159
|
{ no: 4, name: "platform", kind: "scalar", T: 9 },
|
|
123
160
|
{ no: 5, name: "app_version", kind: "scalar", T: 9 },
|
|
161
|
+
{ no: 6, name: "attachment_data", kind: "scalar", T: 12 },
|
|
162
|
+
{ no: 7, name: "attachment_mimetype", kind: "scalar", T: 9 },
|
|
124
163
|
]);
|
|
125
164
|
static fromBinary(bytes, options) {
|
|
126
165
|
return new CreateTicketRequest().fromBinary(bytes, options);
|
|
@@ -171,6 +210,8 @@ class ReplyRequest extends protobuf_1.Message {
|
|
|
171
210
|
ticketId = "";
|
|
172
211
|
message = "";
|
|
173
212
|
attachmentUrl = "";
|
|
213
|
+
attachmentData = new Uint8Array(0);
|
|
214
|
+
attachmentMimetype = "";
|
|
174
215
|
constructor(data) {
|
|
175
216
|
super();
|
|
176
217
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -181,6 +222,8 @@ class ReplyRequest extends protobuf_1.Message {
|
|
|
181
222
|
{ no: 1, name: "ticket_id", kind: "scalar", T: 9 },
|
|
182
223
|
{ no: 2, name: "message", kind: "scalar", T: 9 },
|
|
183
224
|
{ no: 3, name: "attachment_url", kind: "scalar", T: 9 },
|
|
225
|
+
{ no: 4, name: "attachment_data", kind: "scalar", T: 12 },
|
|
226
|
+
{ no: 5, name: "attachment_mimetype", kind: "scalar", T: 9 },
|
|
184
227
|
]);
|
|
185
228
|
static fromBinary(bytes, options) {
|
|
186
229
|
return new ReplyRequest().fromBinary(bytes, options);
|
|
@@ -196,6 +239,62 @@ class ReplyRequest extends protobuf_1.Message {
|
|
|
196
239
|
}
|
|
197
240
|
}
|
|
198
241
|
exports.ReplyRequest = ReplyRequest;
|
|
242
|
+
class AttachmentRequest extends protobuf_1.Message {
|
|
243
|
+
id = "";
|
|
244
|
+
thumb = false;
|
|
245
|
+
constructor(data) {
|
|
246
|
+
super();
|
|
247
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
248
|
+
}
|
|
249
|
+
static runtime = protobuf_1.proto3;
|
|
250
|
+
static typeName = "micro.v1.support.AttachmentRequest";
|
|
251
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
252
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
253
|
+
{ no: 2, name: "thumb", kind: "scalar", T: 8 },
|
|
254
|
+
]);
|
|
255
|
+
static fromBinary(bytes, options) {
|
|
256
|
+
return new AttachmentRequest().fromBinary(bytes, options);
|
|
257
|
+
}
|
|
258
|
+
static fromJson(jsonValue, options) {
|
|
259
|
+
return new AttachmentRequest().fromJson(jsonValue, options);
|
|
260
|
+
}
|
|
261
|
+
static fromJsonString(jsonString, options) {
|
|
262
|
+
return new AttachmentRequest().fromJsonString(jsonString, options);
|
|
263
|
+
}
|
|
264
|
+
static equals(a, b) {
|
|
265
|
+
return protobuf_1.proto3.util.equals(AttachmentRequest, a, b);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.AttachmentRequest = AttachmentRequest;
|
|
269
|
+
class AttachmentResponse extends protobuf_1.Message {
|
|
270
|
+
status;
|
|
271
|
+
data = new Uint8Array(0);
|
|
272
|
+
mimetype = "";
|
|
273
|
+
constructor(data) {
|
|
274
|
+
super();
|
|
275
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
276
|
+
}
|
|
277
|
+
static runtime = protobuf_1.proto3;
|
|
278
|
+
static typeName = "micro.v1.support.AttachmentResponse";
|
|
279
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
280
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
281
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 },
|
|
282
|
+
{ no: 3, name: "mimetype", kind: "scalar", T: 9 },
|
|
283
|
+
]);
|
|
284
|
+
static fromBinary(bytes, options) {
|
|
285
|
+
return new AttachmentResponse().fromBinary(bytes, options);
|
|
286
|
+
}
|
|
287
|
+
static fromJson(jsonValue, options) {
|
|
288
|
+
return new AttachmentResponse().fromJson(jsonValue, options);
|
|
289
|
+
}
|
|
290
|
+
static fromJsonString(jsonString, options) {
|
|
291
|
+
return new AttachmentResponse().fromJsonString(jsonString, options);
|
|
292
|
+
}
|
|
293
|
+
static equals(a, b) {
|
|
294
|
+
return protobuf_1.proto3.util.equals(AttachmentResponse, a, b);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.AttachmentResponse = AttachmentResponse;
|
|
199
298
|
class DeleteMessageRequest extends protobuf_1.Message {
|
|
200
299
|
ticketId = "";
|
|
201
300
|
messageId = "";
|
package/package.json
CHANGED
|
@@ -341,6 +341,9 @@ message ChatPollOptionDto {
|
|
|
341
341
|
string id = 1;
|
|
342
342
|
string text = 2;
|
|
343
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;
|
|
344
347
|
}
|
|
345
348
|
|
|
346
349
|
message ChatPollDto {
|
|
@@ -354,6 +357,8 @@ message ChatPollDto {
|
|
|
354
357
|
bool closed = 7;
|
|
355
358
|
// everyone | mods | anonymous
|
|
356
359
|
string voters_visibility = 8;
|
|
360
|
+
// The question in the reader's language when translated; empty otherwise.
|
|
361
|
+
string question_tl = 9;
|
|
357
362
|
}
|
|
358
363
|
|
|
359
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 {
|
|
@@ -17,6 +17,8 @@ service PSupportService {
|
|
|
17
17
|
// Taking a message back: the author their own, an admin any team answer.
|
|
18
18
|
// The ticket's opening message cannot be taken back (it is the ticket).
|
|
19
19
|
rpc DeleteMessage(DeleteMessageRequest) returns(stream TicketThreadResponse) {}
|
|
20
|
+
// A message's photo, for the ticket's owner or an admin.
|
|
21
|
+
rpc Attachment(AttachmentRequest) returns(stream AttachmentResponse) {}
|
|
20
22
|
|
|
21
23
|
rpc AdminTickets(TicketListRequest) returns(stream TicketListResponse) {}
|
|
22
24
|
// The thread for an admin; marks the person's messages as read for admins.
|
|
@@ -36,6 +36,18 @@ message Ticket {
|
|
|
36
36
|
string closed_at = 18;
|
|
37
37
|
// Admin lists only: set aside from the inbox (the person sees no difference).
|
|
38
38
|
bool hidden = 19;
|
|
39
|
+
// The newest message carries a photo (its text may be empty).
|
|
40
|
+
bool last_has_attachment = 20;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// A photo on a message. The bytes are served to the ticket's owner and to
|
|
44
|
+
// admins only (Attachment below); after 30 days they are deleted and the
|
|
45
|
+
// message keeps expired = true, so the apps show a placeholder.
|
|
46
|
+
message TicketAttachment {
|
|
47
|
+
string id = 1;
|
|
48
|
+
int32 width = 2;
|
|
49
|
+
int32 height = 3;
|
|
50
|
+
bool expired = 4;
|
|
39
51
|
}
|
|
40
52
|
|
|
41
53
|
message TicketMessage {
|
|
@@ -45,16 +57,22 @@ message TicketMessage {
|
|
|
45
57
|
string author_username = 4;
|
|
46
58
|
bool from_admin = 5;
|
|
47
59
|
string message = 6;
|
|
60
|
+
// Unused, always empty: photos ride `attachment`.
|
|
48
61
|
string attachment_url = 7;
|
|
49
62
|
string created_at = 8;
|
|
63
|
+
optional TicketAttachment attachment = 9;
|
|
50
64
|
}
|
|
51
65
|
|
|
52
66
|
message CreateTicketRequest {
|
|
53
67
|
string topic = 1;
|
|
54
68
|
string message = 2;
|
|
69
|
+
// Unused, always empty.
|
|
55
70
|
string attachment_url = 3;
|
|
56
71
|
string platform = 4;
|
|
57
72
|
string app_version = 5;
|
|
73
|
+
// One photo (JPEG, PNG or WebP bytes); re-encoded by the service.
|
|
74
|
+
bytes attachment_data = 6;
|
|
75
|
+
string attachment_mimetype = 7;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
message TicketListRequest {
|
|
@@ -70,7 +88,25 @@ message TicketListRequest {
|
|
|
70
88
|
message ReplyRequest {
|
|
71
89
|
string ticket_id = 1;
|
|
72
90
|
string message = 2;
|
|
91
|
+
// Unused, always empty.
|
|
73
92
|
string attachment_url = 3;
|
|
93
|
+
// One photo, as in CreateTicketRequest; the text may then be empty.
|
|
94
|
+
bytes attachment_data = 4;
|
|
95
|
+
string attachment_mimetype = 5;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message AttachmentRequest {
|
|
99
|
+
string id = 1;
|
|
100
|
+
// The small variant for the bubble; false for the full photo.
|
|
101
|
+
bool thumb = 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 404 for someone who is neither the ticket's owner nor an admin, and for an
|
|
105
|
+
// expired photo.
|
|
106
|
+
message AttachmentResponse {
|
|
107
|
+
ResponseStatus status = 1;
|
|
108
|
+
bytes data = 2;
|
|
109
|
+
string mimetype = 3;
|
|
74
110
|
}
|
|
75
111
|
|
|
76
112
|
message DeleteMessageRequest {
|