jr-common-micro 1.1.113 → 1.1.115
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/notification/notification_messages_nest.d.ts +3 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.d.ts +3 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.js +6 -0
- package/dist/proto/micro/v1/support/services_connect.d.ts +13 -1
- package/dist/proto/micro/v1/support/services_connect.js +12 -0
- package/dist/proto/micro/v1/support/services_nest.d.ts +5 -1
- package/dist/proto/micro/v1/support/services_nest.js +2 -0
- package/dist/proto/micro/v1/support/support_messages_nest.d.ts +24 -0
- package/dist/proto/micro/v1/support/support_messages_pb.d.ts +56 -0
- package/dist/proto/micro/v1/support/support_messages_pb.js +125 -1
- package/package.json +1 -1
- package/proto/micro/v1/notification/notification_messages.proto +4 -1
- package/proto/micro/v1/support/services.proto +4 -0
- package/proto/micro/v1/support/support_messages.proto +42 -1
|
@@ -236,6 +236,9 @@ export declare class SendNotificationRequest_NotificationMessage extends Message
|
|
|
236
236
|
ru: string;
|
|
237
237
|
id: string;
|
|
238
238
|
vi: string;
|
|
239
|
+
fr: string;
|
|
240
|
+
zh: string;
|
|
241
|
+
ja: string;
|
|
239
242
|
constructor(data?: PartialMessage<SendNotificationRequest_NotificationMessage>);
|
|
240
243
|
static readonly runtime: typeof proto3;
|
|
241
244
|
static readonly typeName = "micro.v1.notification.SendNotificationRequest.NotificationMessage";
|
|
@@ -505,6 +505,9 @@ class SendNotificationRequest_NotificationMessage extends protobuf_1.Message {
|
|
|
505
505
|
ru = "";
|
|
506
506
|
id = "";
|
|
507
507
|
vi = "";
|
|
508
|
+
fr = "";
|
|
509
|
+
zh = "";
|
|
510
|
+
ja = "";
|
|
508
511
|
constructor(data) {
|
|
509
512
|
super();
|
|
510
513
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -520,6 +523,9 @@ class SendNotificationRequest_NotificationMessage extends protobuf_1.Message {
|
|
|
520
523
|
{ no: 6, name: "ru", kind: "scalar", T: 9 },
|
|
521
524
|
{ no: 7, name: "id", kind: "scalar", T: 9 },
|
|
522
525
|
{ no: 8, name: "vi", kind: "scalar", T: 9 },
|
|
526
|
+
{ no: 9, name: "fr", kind: "scalar", T: 9 },
|
|
527
|
+
{ no: 10, name: "zh", kind: "scalar", T: 9 },
|
|
528
|
+
{ no: 11, name: "ja", kind: "scalar", T: 9 },
|
|
523
529
|
]);
|
|
524
530
|
static fromBinary(bytes, options) {
|
|
525
531
|
return new SendNotificationRequest_NotificationMessage().fromBinary(bytes, options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetStatusRequest, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_pb.js";
|
|
1
|
+
import { 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: {
|
|
@@ -52,6 +52,18 @@ export declare const PSupportService: {
|
|
|
52
52
|
readonly O: typeof TicketThreadResponse;
|
|
53
53
|
readonly kind: MethodKind.ServerStreaming;
|
|
54
54
|
};
|
|
55
|
+
readonly adminSetHidden: {
|
|
56
|
+
readonly name: "AdminSetHidden";
|
|
57
|
+
readonly I: typeof SetHiddenRequest;
|
|
58
|
+
readonly O: typeof TicketThreadResponse;
|
|
59
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
60
|
+
};
|
|
61
|
+
readonly adminTicketDrafts: {
|
|
62
|
+
readonly name: "AdminTicketDrafts";
|
|
63
|
+
readonly I: typeof TicketDraftsRequest;
|
|
64
|
+
readonly O: typeof TicketDraftsResponse;
|
|
65
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
66
|
+
};
|
|
55
67
|
readonly removeUserData: {
|
|
56
68
|
readonly name: "RemoveUserData";
|
|
57
69
|
readonly I: typeof ByIdRequest;
|
|
@@ -55,6 +55,18 @@ exports.PSupportService = {
|
|
|
55
55
|
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
56
56
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
57
57
|
},
|
|
58
|
+
adminSetHidden: {
|
|
59
|
+
name: "AdminSetHidden",
|
|
60
|
+
I: support_messages_pb_js_1.SetHiddenRequest,
|
|
61
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
62
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
63
|
+
},
|
|
64
|
+
adminTicketDrafts: {
|
|
65
|
+
name: "AdminTicketDrafts",
|
|
66
|
+
I: support_messages_pb_js_1.TicketDraftsRequest,
|
|
67
|
+
O: support_messages_pb_js_1.TicketDraftsResponse,
|
|
68
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
69
|
+
},
|
|
58
70
|
removeUserData: {
|
|
59
71
|
name: "RemoveUserData",
|
|
60
72
|
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, EmptyResponse } from "../general_nest";
|
|
4
|
-
import { CreateTicketRequest, DeleteMessageRequest, ReplyRequest, SetStatusRequest, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_nest";
|
|
4
|
+
import { 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 {
|
|
@@ -13,6 +13,8 @@ export interface PSupportServiceClient {
|
|
|
13
13
|
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
14
14
|
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
15
15
|
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
16
|
+
adminSetHidden(request: SetHiddenRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
17
|
+
adminTicketDrafts(request: TicketDraftsRequest, metadata?: Metadata): Observable<TicketDraftsResponse>;
|
|
16
18
|
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
17
19
|
}
|
|
18
20
|
export interface PSupportServiceController {
|
|
@@ -24,6 +26,8 @@ export interface PSupportServiceController {
|
|
|
24
26
|
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
25
27
|
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
26
28
|
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
29
|
+
adminSetHidden(request: SetHiddenRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
30
|
+
adminTicketDrafts(request: TicketDraftsRequest, metadata?: Metadata): Observable<TicketDraftsResponse>;
|
|
27
31
|
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
28
32
|
}
|
|
29
33
|
export declare function PSupportServiceControllerMethods(): (constructor: Function) => void;
|
|
@@ -19,6 +19,7 @@ export interface Ticket {
|
|
|
19
19
|
created_at: string;
|
|
20
20
|
updated_at: string;
|
|
21
21
|
closed_at: string;
|
|
22
|
+
hidden: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface TicketMessage {
|
|
24
25
|
id: string;
|
|
@@ -56,6 +57,28 @@ export interface SetStatusRequest {
|
|
|
56
57
|
ticket_id: string;
|
|
57
58
|
status: string;
|
|
58
59
|
}
|
|
60
|
+
export interface SetHiddenRequest {
|
|
61
|
+
ticket_id: string;
|
|
62
|
+
hidden: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface TicketCounts {
|
|
65
|
+
open: number;
|
|
66
|
+
answered: number;
|
|
67
|
+
closed: number;
|
|
68
|
+
all: number;
|
|
69
|
+
hidden: number;
|
|
70
|
+
}
|
|
71
|
+
export interface TicketDraftsRequest {
|
|
72
|
+
ticket_id: string;
|
|
73
|
+
refresh: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface TicketDraftsResponse {
|
|
76
|
+
status: ResponseStatus | undefined;
|
|
77
|
+
state: string;
|
|
78
|
+
drafts: string[];
|
|
79
|
+
uncertain: boolean;
|
|
80
|
+
for_message_id: string;
|
|
81
|
+
}
|
|
59
82
|
export interface TicketResponse {
|
|
60
83
|
status: ResponseStatus | undefined;
|
|
61
84
|
data?: Ticket | undefined;
|
|
@@ -65,6 +88,7 @@ export interface TicketListResponse {
|
|
|
65
88
|
data: Ticket[];
|
|
66
89
|
pagination?: PaginationMetaResult | undefined;
|
|
67
90
|
attention_count: number;
|
|
91
|
+
counts?: TicketCounts | undefined;
|
|
68
92
|
}
|
|
69
93
|
export interface TicketThreadResponse {
|
|
70
94
|
status: ResponseStatus | undefined;
|
|
@@ -20,6 +20,7 @@ export declare class Ticket extends Message<Ticket> {
|
|
|
20
20
|
createdAt: string;
|
|
21
21
|
updatedAt: string;
|
|
22
22
|
closedAt: string;
|
|
23
|
+
hidden: boolean;
|
|
23
24
|
constructor(data?: PartialMessage<Ticket>);
|
|
24
25
|
static readonly runtime: typeof proto3;
|
|
25
26
|
static readonly typeName = "micro.v1.support.Ticket";
|
|
@@ -113,6 +114,60 @@ export declare class SetStatusRequest extends Message<SetStatusRequest> {
|
|
|
113
114
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetStatusRequest;
|
|
114
115
|
static equals(a: SetStatusRequest | PlainMessage<SetStatusRequest> | undefined, b: SetStatusRequest | PlainMessage<SetStatusRequest> | undefined): boolean;
|
|
115
116
|
}
|
|
117
|
+
export declare class SetHiddenRequest extends Message<SetHiddenRequest> {
|
|
118
|
+
ticketId: string;
|
|
119
|
+
hidden: boolean;
|
|
120
|
+
constructor(data?: PartialMessage<SetHiddenRequest>);
|
|
121
|
+
static readonly runtime: typeof proto3;
|
|
122
|
+
static readonly typeName = "micro.v1.support.SetHiddenRequest";
|
|
123
|
+
static readonly fields: FieldList;
|
|
124
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetHiddenRequest;
|
|
125
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetHiddenRequest;
|
|
126
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetHiddenRequest;
|
|
127
|
+
static equals(a: SetHiddenRequest | PlainMessage<SetHiddenRequest> | undefined, b: SetHiddenRequest | PlainMessage<SetHiddenRequest> | undefined): boolean;
|
|
128
|
+
}
|
|
129
|
+
export declare class TicketCounts extends Message<TicketCounts> {
|
|
130
|
+
open: number;
|
|
131
|
+
answered: number;
|
|
132
|
+
closed: number;
|
|
133
|
+
all: number;
|
|
134
|
+
hidden: number;
|
|
135
|
+
constructor(data?: PartialMessage<TicketCounts>);
|
|
136
|
+
static readonly runtime: typeof proto3;
|
|
137
|
+
static readonly typeName = "micro.v1.support.TicketCounts";
|
|
138
|
+
static readonly fields: FieldList;
|
|
139
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketCounts;
|
|
140
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketCounts;
|
|
141
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketCounts;
|
|
142
|
+
static equals(a: TicketCounts | PlainMessage<TicketCounts> | undefined, b: TicketCounts | PlainMessage<TicketCounts> | undefined): boolean;
|
|
143
|
+
}
|
|
144
|
+
export declare class TicketDraftsRequest extends Message<TicketDraftsRequest> {
|
|
145
|
+
ticketId: string;
|
|
146
|
+
refresh: boolean;
|
|
147
|
+
constructor(data?: PartialMessage<TicketDraftsRequest>);
|
|
148
|
+
static readonly runtime: typeof proto3;
|
|
149
|
+
static readonly typeName = "micro.v1.support.TicketDraftsRequest";
|
|
150
|
+
static readonly fields: FieldList;
|
|
151
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketDraftsRequest;
|
|
152
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketDraftsRequest;
|
|
153
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketDraftsRequest;
|
|
154
|
+
static equals(a: TicketDraftsRequest | PlainMessage<TicketDraftsRequest> | undefined, b: TicketDraftsRequest | PlainMessage<TicketDraftsRequest> | undefined): boolean;
|
|
155
|
+
}
|
|
156
|
+
export declare class TicketDraftsResponse extends Message<TicketDraftsResponse> {
|
|
157
|
+
status?: ResponseStatus;
|
|
158
|
+
state: string;
|
|
159
|
+
drafts: string[];
|
|
160
|
+
uncertain: boolean;
|
|
161
|
+
forMessageId: string;
|
|
162
|
+
constructor(data?: PartialMessage<TicketDraftsResponse>);
|
|
163
|
+
static readonly runtime: typeof proto3;
|
|
164
|
+
static readonly typeName = "micro.v1.support.TicketDraftsResponse";
|
|
165
|
+
static readonly fields: FieldList;
|
|
166
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketDraftsResponse;
|
|
167
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketDraftsResponse;
|
|
168
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketDraftsResponse;
|
|
169
|
+
static equals(a: TicketDraftsResponse | PlainMessage<TicketDraftsResponse> | undefined, b: TicketDraftsResponse | PlainMessage<TicketDraftsResponse> | undefined): boolean;
|
|
170
|
+
}
|
|
116
171
|
export declare class TicketResponse extends Message<TicketResponse> {
|
|
117
172
|
status?: ResponseStatus;
|
|
118
173
|
data?: Ticket;
|
|
@@ -130,6 +185,7 @@ export declare class TicketListResponse extends Message<TicketListResponse> {
|
|
|
130
185
|
data: Ticket[];
|
|
131
186
|
pagination?: PaginationMetaResult;
|
|
132
187
|
attentionCount: number;
|
|
188
|
+
counts?: TicketCounts;
|
|
133
189
|
constructor(data?: PartialMessage<TicketListResponse>);
|
|
134
190
|
static readonly runtime: typeof proto3;
|
|
135
191
|
static readonly typeName = "micro.v1.support.TicketListResponse";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketThreadResponse = exports.TicketListResponse = exports.TicketResponse = 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.ReplyRequest = exports.TicketListRequest = exports.CreateTicketRequest = exports.TicketMessage = 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 {
|
|
@@ -22,6 +22,7 @@ class Ticket extends protobuf_1.Message {
|
|
|
22
22
|
createdAt = "";
|
|
23
23
|
updatedAt = "";
|
|
24
24
|
closedAt = "";
|
|
25
|
+
hidden = false;
|
|
25
26
|
constructor(data) {
|
|
26
27
|
super();
|
|
27
28
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -47,6 +48,7 @@ class Ticket extends protobuf_1.Message {
|
|
|
47
48
|
{ no: 16, name: "created_at", kind: "scalar", T: 9 },
|
|
48
49
|
{ no: 17, name: "updated_at", kind: "scalar", T: 9 },
|
|
49
50
|
{ no: 18, name: "closed_at", kind: "scalar", T: 9 },
|
|
51
|
+
{ no: 19, name: "hidden", kind: "scalar", T: 8 },
|
|
50
52
|
]);
|
|
51
53
|
static fromBinary(bytes, options) {
|
|
52
54
|
return new Ticket().fromBinary(bytes, options);
|
|
@@ -248,6 +250,126 @@ class SetStatusRequest extends protobuf_1.Message {
|
|
|
248
250
|
}
|
|
249
251
|
}
|
|
250
252
|
exports.SetStatusRequest = SetStatusRequest;
|
|
253
|
+
class SetHiddenRequest extends protobuf_1.Message {
|
|
254
|
+
ticketId = "";
|
|
255
|
+
hidden = false;
|
|
256
|
+
constructor(data) {
|
|
257
|
+
super();
|
|
258
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
259
|
+
}
|
|
260
|
+
static runtime = protobuf_1.proto3;
|
|
261
|
+
static typeName = "micro.v1.support.SetHiddenRequest";
|
|
262
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
263
|
+
{ no: 1, name: "ticket_id", kind: "scalar", T: 9 },
|
|
264
|
+
{ no: 2, name: "hidden", kind: "scalar", T: 8 },
|
|
265
|
+
]);
|
|
266
|
+
static fromBinary(bytes, options) {
|
|
267
|
+
return new SetHiddenRequest().fromBinary(bytes, options);
|
|
268
|
+
}
|
|
269
|
+
static fromJson(jsonValue, options) {
|
|
270
|
+
return new SetHiddenRequest().fromJson(jsonValue, options);
|
|
271
|
+
}
|
|
272
|
+
static fromJsonString(jsonString, options) {
|
|
273
|
+
return new SetHiddenRequest().fromJsonString(jsonString, options);
|
|
274
|
+
}
|
|
275
|
+
static equals(a, b) {
|
|
276
|
+
return protobuf_1.proto3.util.equals(SetHiddenRequest, a, b);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
exports.SetHiddenRequest = SetHiddenRequest;
|
|
280
|
+
class TicketCounts extends protobuf_1.Message {
|
|
281
|
+
open = 0;
|
|
282
|
+
answered = 0;
|
|
283
|
+
closed = 0;
|
|
284
|
+
all = 0;
|
|
285
|
+
hidden = 0;
|
|
286
|
+
constructor(data) {
|
|
287
|
+
super();
|
|
288
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
289
|
+
}
|
|
290
|
+
static runtime = protobuf_1.proto3;
|
|
291
|
+
static typeName = "micro.v1.support.TicketCounts";
|
|
292
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
293
|
+
{ no: 1, name: "open", kind: "scalar", T: 5 },
|
|
294
|
+
{ no: 2, name: "answered", kind: "scalar", T: 5 },
|
|
295
|
+
{ no: 3, name: "closed", kind: "scalar", T: 5 },
|
|
296
|
+
{ no: 4, name: "all", kind: "scalar", T: 5 },
|
|
297
|
+
{ no: 5, name: "hidden", kind: "scalar", T: 5 },
|
|
298
|
+
]);
|
|
299
|
+
static fromBinary(bytes, options) {
|
|
300
|
+
return new TicketCounts().fromBinary(bytes, options);
|
|
301
|
+
}
|
|
302
|
+
static fromJson(jsonValue, options) {
|
|
303
|
+
return new TicketCounts().fromJson(jsonValue, options);
|
|
304
|
+
}
|
|
305
|
+
static fromJsonString(jsonString, options) {
|
|
306
|
+
return new TicketCounts().fromJsonString(jsonString, options);
|
|
307
|
+
}
|
|
308
|
+
static equals(a, b) {
|
|
309
|
+
return protobuf_1.proto3.util.equals(TicketCounts, a, b);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
exports.TicketCounts = TicketCounts;
|
|
313
|
+
class TicketDraftsRequest extends protobuf_1.Message {
|
|
314
|
+
ticketId = "";
|
|
315
|
+
refresh = false;
|
|
316
|
+
constructor(data) {
|
|
317
|
+
super();
|
|
318
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
319
|
+
}
|
|
320
|
+
static runtime = protobuf_1.proto3;
|
|
321
|
+
static typeName = "micro.v1.support.TicketDraftsRequest";
|
|
322
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
323
|
+
{ no: 1, name: "ticket_id", kind: "scalar", T: 9 },
|
|
324
|
+
{ no: 2, name: "refresh", kind: "scalar", T: 8 },
|
|
325
|
+
]);
|
|
326
|
+
static fromBinary(bytes, options) {
|
|
327
|
+
return new TicketDraftsRequest().fromBinary(bytes, options);
|
|
328
|
+
}
|
|
329
|
+
static fromJson(jsonValue, options) {
|
|
330
|
+
return new TicketDraftsRequest().fromJson(jsonValue, options);
|
|
331
|
+
}
|
|
332
|
+
static fromJsonString(jsonString, options) {
|
|
333
|
+
return new TicketDraftsRequest().fromJsonString(jsonString, options);
|
|
334
|
+
}
|
|
335
|
+
static equals(a, b) {
|
|
336
|
+
return protobuf_1.proto3.util.equals(TicketDraftsRequest, a, b);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
exports.TicketDraftsRequest = TicketDraftsRequest;
|
|
340
|
+
class TicketDraftsResponse extends protobuf_1.Message {
|
|
341
|
+
status;
|
|
342
|
+
state = "";
|
|
343
|
+
drafts = [];
|
|
344
|
+
uncertain = false;
|
|
345
|
+
forMessageId = "";
|
|
346
|
+
constructor(data) {
|
|
347
|
+
super();
|
|
348
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
349
|
+
}
|
|
350
|
+
static runtime = protobuf_1.proto3;
|
|
351
|
+
static typeName = "micro.v1.support.TicketDraftsResponse";
|
|
352
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
353
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
354
|
+
{ no: 2, name: "state", kind: "scalar", T: 9 },
|
|
355
|
+
{ no: 3, name: "drafts", kind: "scalar", T: 9, repeated: true },
|
|
356
|
+
{ no: 4, name: "uncertain", kind: "scalar", T: 8 },
|
|
357
|
+
{ no: 5, name: "for_message_id", kind: "scalar", T: 9 },
|
|
358
|
+
]);
|
|
359
|
+
static fromBinary(bytes, options) {
|
|
360
|
+
return new TicketDraftsResponse().fromBinary(bytes, options);
|
|
361
|
+
}
|
|
362
|
+
static fromJson(jsonValue, options) {
|
|
363
|
+
return new TicketDraftsResponse().fromJson(jsonValue, options);
|
|
364
|
+
}
|
|
365
|
+
static fromJsonString(jsonString, options) {
|
|
366
|
+
return new TicketDraftsResponse().fromJsonString(jsonString, options);
|
|
367
|
+
}
|
|
368
|
+
static equals(a, b) {
|
|
369
|
+
return protobuf_1.proto3.util.equals(TicketDraftsResponse, a, b);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
exports.TicketDraftsResponse = TicketDraftsResponse;
|
|
251
373
|
class TicketResponse extends protobuf_1.Message {
|
|
252
374
|
status;
|
|
253
375
|
data;
|
|
@@ -280,6 +402,7 @@ class TicketListResponse extends protobuf_1.Message {
|
|
|
280
402
|
data = [];
|
|
281
403
|
pagination;
|
|
282
404
|
attentionCount = 0;
|
|
405
|
+
counts;
|
|
283
406
|
constructor(data) {
|
|
284
407
|
super();
|
|
285
408
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -291,6 +414,7 @@ class TicketListResponse extends protobuf_1.Message {
|
|
|
291
414
|
{ no: 2, name: "data", kind: "message", T: Ticket, repeated: true },
|
|
292
415
|
{ no: 3, name: "pagination", kind: "message", T: general_pb_js_1.PaginationMetaResult, opt: true },
|
|
293
416
|
{ no: 4, name: "attention_count", kind: "scalar", T: 5 },
|
|
417
|
+
{ no: 5, name: "counts", kind: "message", T: TicketCounts, opt: true },
|
|
294
418
|
]);
|
|
295
419
|
static fromBinary(bytes, options) {
|
|
296
420
|
return new TicketListResponse().fromBinary(bytes, options);
|
package/package.json
CHANGED
|
@@ -137,9 +137,12 @@ message SendNotificationRequest {
|
|
|
137
137
|
string ru = 6;
|
|
138
138
|
string id = 7;
|
|
139
139
|
string vi = 8;
|
|
140
|
+
string fr = 9;
|
|
141
|
+
string zh = 10;
|
|
142
|
+
string ja = 11;
|
|
140
143
|
}
|
|
141
144
|
NotificationMessage notificationMessage = 3;
|
|
142
|
-
// Title per language (en, es, pt, de, ru, id, vi); one missing reads the
|
|
145
|
+
// Title per language (en, es, pt, de, ru, id, vi, fr, zh, ja); one missing reads the
|
|
143
146
|
// English, then `title`.
|
|
144
147
|
map<string, string> titles = 4;
|
|
145
148
|
}
|
|
@@ -22,6 +22,10 @@ service PSupportService {
|
|
|
22
22
|
// The thread for an admin; marks the person's messages as read for admins.
|
|
23
23
|
rpc AdminTicket(ByIdRequest) returns(stream TicketThreadResponse) {}
|
|
24
24
|
rpc AdminSetStatus(SetStatusRequest) returns(stream TicketThreadResponse) {}
|
|
25
|
+
// Sets a ticket aside from the inbox, or brings it back.
|
|
26
|
+
rpc AdminSetHidden(SetHiddenRequest) returns(stream TicketThreadResponse) {}
|
|
27
|
+
// Yapay Zeka reply suggestions for the person's latest message.
|
|
28
|
+
rpc AdminTicketDrafts(TicketDraftsRequest) returns(stream TicketDraftsResponse) {}
|
|
25
29
|
|
|
26
30
|
rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
|
|
27
31
|
}
|
|
@@ -34,6 +34,8 @@ message Ticket {
|
|
|
34
34
|
string created_at = 16;
|
|
35
35
|
string updated_at = 17;
|
|
36
36
|
string closed_at = 18;
|
|
37
|
+
// Admin lists only: set aside from the inbox (the person sees no difference).
|
|
38
|
+
bool hidden = 19;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
message TicketMessage {
|
|
@@ -58,7 +60,8 @@ message CreateTicketRequest {
|
|
|
58
60
|
message TicketListRequest {
|
|
59
61
|
int32 page = 1;
|
|
60
62
|
int32 per_page = 2;
|
|
61
|
-
// all | open | answered | closed
|
|
63
|
+
// all | open | answered | closed; admin lists also hidden. Every status but
|
|
64
|
+
// hidden leaves hidden tickets out.
|
|
62
65
|
string status = 3;
|
|
63
66
|
// Admin lists only: username / number / text search.
|
|
64
67
|
string search = 4;
|
|
@@ -81,6 +84,42 @@ message SetStatusRequest {
|
|
|
81
84
|
string status = 2;
|
|
82
85
|
}
|
|
83
86
|
|
|
87
|
+
message SetHiddenRequest {
|
|
88
|
+
string ticket_id = 1;
|
|
89
|
+
bool hidden = 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// How many tickets each admin inbox tab holds (search does not change them).
|
|
93
|
+
// all and the statuses count the tickets that are not hidden.
|
|
94
|
+
message TicketCounts {
|
|
95
|
+
int32 open = 1;
|
|
96
|
+
int32 answered = 2;
|
|
97
|
+
int32 closed = 3;
|
|
98
|
+
int32 all = 4;
|
|
99
|
+
int32 hidden = 5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Yapay Zeka reply suggestions for an admin. Generated on the first request
|
|
103
|
+
// after the person's latest message, then served from the database.
|
|
104
|
+
message TicketDraftsRequest {
|
|
105
|
+
string ticket_id = 1;
|
|
106
|
+
// Ask again even if suggestions exist, or the ticket is closed or hidden.
|
|
107
|
+
bool refresh = 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message TicketDraftsResponse {
|
|
111
|
+
ResponseStatus status = 1;
|
|
112
|
+
// ready | not_needed (the team wrote last, or closed or hidden) |
|
|
113
|
+
// unavailable (not configured) | limit (the day's budget) | failed
|
|
114
|
+
string state = 2;
|
|
115
|
+
// Two suggestions when ready: a short one, then a fuller one.
|
|
116
|
+
repeated string drafts = 3;
|
|
117
|
+
// The knowledge did not cover the question well: read before sending.
|
|
118
|
+
bool uncertain = 4;
|
|
119
|
+
// The person's message these answer.
|
|
120
|
+
string for_message_id = 5;
|
|
121
|
+
}
|
|
122
|
+
|
|
84
123
|
message TicketResponse {
|
|
85
124
|
ResponseStatus status = 1;
|
|
86
125
|
optional Ticket data = 2;
|
|
@@ -92,6 +131,8 @@ message TicketListResponse {
|
|
|
92
131
|
optional PaginationMetaResult pagination = 3;
|
|
93
132
|
// Admin: tickets waiting for an answer; person: tickets with a new answer.
|
|
94
133
|
int32 attention_count = 4;
|
|
134
|
+
// Admin lists only.
|
|
135
|
+
optional TicketCounts counts = 5;
|
|
95
136
|
}
|
|
96
137
|
|
|
97
138
|
message TicketThreadResponse {
|