jr-common-micro 1.1.96 → 1.1.97
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/index.d.ts +1 -0
- package/dist/proto/micro/v1/index.js +2 -1
- package/dist/proto/micro/v1/support/index.d.ts +3 -0
- package/dist/proto/micro/v1/support/index.js +7 -0
- package/dist/proto/micro/v1/support/services_connect.d.ts +56 -0
- package/dist/proto/micro/v1/support/services_connect.js +59 -0
- package/dist/proto/micro/v1/support/services_nest.d.ts +28 -0
- package/dist/proto/micro/v1/support/services_nest.js +31 -0
- package/dist/proto/micro/v1/support/support_messages_nest.d.ts +70 -0
- package/dist/proto/micro/v1/support/support_messages_nest.js +5 -0
- package/dist/proto/micro/v1/support/support_messages_pb.d.ts +142 -0
- package/dist/proto/micro/v1/support/support_messages_pb.js +310 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +2 -1
- package/package.json +1 -1
- package/proto/micro/v1/support/services.proto +24 -0
- package/proto/micro/v1/support/support_messages.proto +96 -0
|
@@ -10,5 +10,6 @@ export * as notification from './notification';
|
|
|
10
10
|
export * as portfolio from './portfolio';
|
|
11
11
|
export * as puppeteer from './puppeteer';
|
|
12
12
|
export * as subscription from './subscription';
|
|
13
|
+
export * as support from './support';
|
|
13
14
|
export * as user from './user';
|
|
14
15
|
export * as voice from './voice';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.voice = exports.user = exports.subscription = exports.puppeteer = exports.portfolio = exports.notification = exports.news = exports.mining = exports.media = exports.general_nest = exports.education = exports.data = exports.coin = exports.chat = void 0;
|
|
3
|
+
exports.voice = exports.user = exports.support = exports.subscription = exports.puppeteer = exports.portfolio = exports.notification = exports.news = exports.mining = exports.media = exports.general_nest = exports.education = exports.data = exports.coin = exports.chat = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
exports.chat = tslib_1.__importStar(require("./chat"));
|
|
6
6
|
exports.coin = tslib_1.__importStar(require("./coin"));
|
|
@@ -14,5 +14,6 @@ exports.notification = tslib_1.__importStar(require("./notification"));
|
|
|
14
14
|
exports.portfolio = tslib_1.__importStar(require("./portfolio"));
|
|
15
15
|
exports.puppeteer = tslib_1.__importStar(require("./puppeteer"));
|
|
16
16
|
exports.subscription = tslib_1.__importStar(require("./subscription"));
|
|
17
|
+
exports.support = tslib_1.__importStar(require("./support"));
|
|
17
18
|
exports.user = tslib_1.__importStar(require("./user"));
|
|
18
19
|
exports.voice = tslib_1.__importStar(require("./voice"));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.support_messages_nest = exports.services_nest = exports.services_connect = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
exports.services_connect = tslib_1.__importStar(require("./services_connect"));
|
|
6
|
+
exports.services_nest = tslib_1.__importStar(require("./services_nest"));
|
|
7
|
+
exports.support_messages_nest = tslib_1.__importStar(require("./support_messages_nest"));
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CreateTicketRequest, ReplyRequest, SetStatusRequest, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_pb.js";
|
|
2
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
|
+
import { ByIdRequest, EmptyResponse } from "../general_pb.js";
|
|
4
|
+
export declare const PSupportService: {
|
|
5
|
+
readonly typeName: "micro.v1.support.PSupportService";
|
|
6
|
+
readonly methods: {
|
|
7
|
+
readonly createTicket: {
|
|
8
|
+
readonly name: "CreateTicket";
|
|
9
|
+
readonly I: typeof CreateTicketRequest;
|
|
10
|
+
readonly O: typeof TicketThreadResponse;
|
|
11
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
12
|
+
};
|
|
13
|
+
readonly myTickets: {
|
|
14
|
+
readonly name: "MyTickets";
|
|
15
|
+
readonly I: typeof TicketListRequest;
|
|
16
|
+
readonly O: typeof TicketListResponse;
|
|
17
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
18
|
+
};
|
|
19
|
+
readonly ticket: {
|
|
20
|
+
readonly name: "Ticket";
|
|
21
|
+
readonly I: typeof ByIdRequest;
|
|
22
|
+
readonly O: typeof TicketThreadResponse;
|
|
23
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
24
|
+
};
|
|
25
|
+
readonly reply: {
|
|
26
|
+
readonly name: "Reply";
|
|
27
|
+
readonly I: typeof ReplyRequest;
|
|
28
|
+
readonly O: typeof TicketThreadResponse;
|
|
29
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
30
|
+
};
|
|
31
|
+
readonly adminTickets: {
|
|
32
|
+
readonly name: "AdminTickets";
|
|
33
|
+
readonly I: typeof TicketListRequest;
|
|
34
|
+
readonly O: typeof TicketListResponse;
|
|
35
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
36
|
+
};
|
|
37
|
+
readonly adminTicket: {
|
|
38
|
+
readonly name: "AdminTicket";
|
|
39
|
+
readonly I: typeof ByIdRequest;
|
|
40
|
+
readonly O: typeof TicketThreadResponse;
|
|
41
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
42
|
+
};
|
|
43
|
+
readonly adminSetStatus: {
|
|
44
|
+
readonly name: "AdminSetStatus";
|
|
45
|
+
readonly I: typeof SetStatusRequest;
|
|
46
|
+
readonly O: typeof TicketThreadResponse;
|
|
47
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
48
|
+
};
|
|
49
|
+
readonly removeUserData: {
|
|
50
|
+
readonly name: "RemoveUserData";
|
|
51
|
+
readonly I: typeof ByIdRequest;
|
|
52
|
+
readonly O: typeof EmptyResponse;
|
|
53
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PSupportService = void 0;
|
|
4
|
+
const support_messages_pb_js_1 = require("./support_messages_pb.js");
|
|
5
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
6
|
+
const general_pb_js_1 = require("../general_pb.js");
|
|
7
|
+
exports.PSupportService = {
|
|
8
|
+
typeName: "micro.v1.support.PSupportService",
|
|
9
|
+
methods: {
|
|
10
|
+
createTicket: {
|
|
11
|
+
name: "CreateTicket",
|
|
12
|
+
I: support_messages_pb_js_1.CreateTicketRequest,
|
|
13
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
14
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
15
|
+
},
|
|
16
|
+
myTickets: {
|
|
17
|
+
name: "MyTickets",
|
|
18
|
+
I: support_messages_pb_js_1.TicketListRequest,
|
|
19
|
+
O: support_messages_pb_js_1.TicketListResponse,
|
|
20
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
21
|
+
},
|
|
22
|
+
ticket: {
|
|
23
|
+
name: "Ticket",
|
|
24
|
+
I: general_pb_js_1.ByIdRequest,
|
|
25
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
26
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
27
|
+
},
|
|
28
|
+
reply: {
|
|
29
|
+
name: "Reply",
|
|
30
|
+
I: support_messages_pb_js_1.ReplyRequest,
|
|
31
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
32
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
33
|
+
},
|
|
34
|
+
adminTickets: {
|
|
35
|
+
name: "AdminTickets",
|
|
36
|
+
I: support_messages_pb_js_1.TicketListRequest,
|
|
37
|
+
O: support_messages_pb_js_1.TicketListResponse,
|
|
38
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
39
|
+
},
|
|
40
|
+
adminTicket: {
|
|
41
|
+
name: "AdminTicket",
|
|
42
|
+
I: general_pb_js_1.ByIdRequest,
|
|
43
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
44
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
45
|
+
},
|
|
46
|
+
adminSetStatus: {
|
|
47
|
+
name: "AdminSetStatus",
|
|
48
|
+
I: support_messages_pb_js_1.SetStatusRequest,
|
|
49
|
+
O: support_messages_pb_js_1.TicketThreadResponse,
|
|
50
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
51
|
+
},
|
|
52
|
+
removeUserData: {
|
|
53
|
+
name: "RemoveUserData",
|
|
54
|
+
I: general_pb_js_1.ByIdRequest,
|
|
55
|
+
O: general_pb_js_1.EmptyResponse,
|
|
56
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Metadata } from "@grpc/grpc-js";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { ByIdRequest, EmptyResponse } from "../general_nest";
|
|
4
|
+
import { CreateTicketRequest, ReplyRequest, SetStatusRequest, TicketListRequest, TicketListResponse, TicketThreadResponse } from "./support_messages_nest";
|
|
5
|
+
export declare const protobufPackage = "micro.v1.support";
|
|
6
|
+
export declare const MICRO_V1_SUPPORT_PACKAGE_NAME = "micro.v1.support";
|
|
7
|
+
export interface PSupportServiceClient {
|
|
8
|
+
createTicket(request: CreateTicketRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
9
|
+
myTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
10
|
+
ticket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
11
|
+
reply(request: ReplyRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
12
|
+
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
13
|
+
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
14
|
+
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
15
|
+
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface PSupportServiceController {
|
|
18
|
+
createTicket(request: CreateTicketRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
19
|
+
myTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
20
|
+
ticket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
21
|
+
reply(request: ReplyRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
22
|
+
adminTickets(request: TicketListRequest, metadata?: Metadata): Observable<TicketListResponse>;
|
|
23
|
+
adminTicket(request: ByIdRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
24
|
+
adminSetStatus(request: SetStatusRequest, metadata?: Metadata): Observable<TicketThreadResponse>;
|
|
25
|
+
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
26
|
+
}
|
|
27
|
+
export declare function PSupportServiceControllerMethods(): (constructor: Function) => void;
|
|
28
|
+
export declare const P_SUPPORT_SERVICE_NAME = "PSupportService";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.P_SUPPORT_SERVICE_NAME = exports.MICRO_V1_SUPPORT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
4
|
+
exports.PSupportServiceControllerMethods = PSupportServiceControllerMethods;
|
|
5
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
6
|
+
exports.protobufPackage = "micro.v1.support";
|
|
7
|
+
exports.MICRO_V1_SUPPORT_PACKAGE_NAME = "micro.v1.support";
|
|
8
|
+
function PSupportServiceControllerMethods() {
|
|
9
|
+
return function (constructor) {
|
|
10
|
+
const grpcMethods = [
|
|
11
|
+
"createTicket",
|
|
12
|
+
"myTickets",
|
|
13
|
+
"ticket",
|
|
14
|
+
"reply",
|
|
15
|
+
"adminTickets",
|
|
16
|
+
"adminTicket",
|
|
17
|
+
"adminSetStatus",
|
|
18
|
+
"removeUserData",
|
|
19
|
+
];
|
|
20
|
+
for (const method of grpcMethods) {
|
|
21
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
22
|
+
(0, microservices_1.GrpcMethod)("PSupportService", method)(constructor.prototype[method], method, descriptor);
|
|
23
|
+
}
|
|
24
|
+
const grpcStreamMethods = [];
|
|
25
|
+
for (const method of grpcStreamMethods) {
|
|
26
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
+
(0, microservices_1.GrpcStreamMethod)("PSupportService", method)(constructor.prototype[method], method, descriptor);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.P_SUPPORT_SERVICE_NAME = "PSupportService";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PaginationMetaResult, ResponseStatus } from "../general_nest";
|
|
2
|
+
export declare const protobufPackage = "micro.v1.support";
|
|
3
|
+
export interface Ticket {
|
|
4
|
+
id: string;
|
|
5
|
+
number: number;
|
|
6
|
+
user_id: string;
|
|
7
|
+
username: string;
|
|
8
|
+
avatar_url: string;
|
|
9
|
+
topic: string;
|
|
10
|
+
status: string;
|
|
11
|
+
preview: string;
|
|
12
|
+
last_message: string;
|
|
13
|
+
last_from_admin: boolean;
|
|
14
|
+
message_count: number;
|
|
15
|
+
unread_for_user: boolean;
|
|
16
|
+
unread_for_admin: boolean;
|
|
17
|
+
platform: string;
|
|
18
|
+
app_version: string;
|
|
19
|
+
created_at: string;
|
|
20
|
+
updated_at: string;
|
|
21
|
+
closed_at: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TicketMessage {
|
|
24
|
+
id: string;
|
|
25
|
+
ticket_id: string;
|
|
26
|
+
author_id: string;
|
|
27
|
+
author_username: string;
|
|
28
|
+
from_admin: boolean;
|
|
29
|
+
message: string;
|
|
30
|
+
attachment_url: string;
|
|
31
|
+
created_at: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CreateTicketRequest {
|
|
34
|
+
topic: string;
|
|
35
|
+
message: string;
|
|
36
|
+
attachment_url: string;
|
|
37
|
+
platform: string;
|
|
38
|
+
app_version: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TicketListRequest {
|
|
41
|
+
page: number;
|
|
42
|
+
per_page: number;
|
|
43
|
+
status: string;
|
|
44
|
+
search: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ReplyRequest {
|
|
47
|
+
ticket_id: string;
|
|
48
|
+
message: string;
|
|
49
|
+
attachment_url: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SetStatusRequest {
|
|
52
|
+
ticket_id: string;
|
|
53
|
+
status: string;
|
|
54
|
+
}
|
|
55
|
+
export interface TicketResponse {
|
|
56
|
+
status: ResponseStatus | undefined;
|
|
57
|
+
data?: Ticket | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface TicketListResponse {
|
|
60
|
+
status: ResponseStatus | undefined;
|
|
61
|
+
data: Ticket[];
|
|
62
|
+
pagination?: PaginationMetaResult | undefined;
|
|
63
|
+
attention_count: number;
|
|
64
|
+
}
|
|
65
|
+
export interface TicketThreadResponse {
|
|
66
|
+
status: ResponseStatus | undefined;
|
|
67
|
+
data?: Ticket | undefined;
|
|
68
|
+
messages: TicketMessage[];
|
|
69
|
+
}
|
|
70
|
+
export declare const MICRO_V1_SUPPORT_PACKAGE_NAME = "micro.v1.support";
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
3
|
+
import { PaginationMetaResult, ResponseStatus } from "../general_pb.js";
|
|
4
|
+
export declare class Ticket extends Message<Ticket> {
|
|
5
|
+
id: string;
|
|
6
|
+
number: number;
|
|
7
|
+
userId: string;
|
|
8
|
+
username: string;
|
|
9
|
+
avatarUrl: string;
|
|
10
|
+
topic: string;
|
|
11
|
+
status: string;
|
|
12
|
+
preview: string;
|
|
13
|
+
lastMessage: string;
|
|
14
|
+
lastFromAdmin: boolean;
|
|
15
|
+
messageCount: number;
|
|
16
|
+
unreadForUser: boolean;
|
|
17
|
+
unreadForAdmin: boolean;
|
|
18
|
+
platform: string;
|
|
19
|
+
appVersion: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
closedAt: string;
|
|
23
|
+
constructor(data?: PartialMessage<Ticket>);
|
|
24
|
+
static readonly runtime: typeof proto3;
|
|
25
|
+
static readonly typeName = "micro.v1.support.Ticket";
|
|
26
|
+
static readonly fields: FieldList;
|
|
27
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Ticket;
|
|
28
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Ticket;
|
|
29
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Ticket;
|
|
30
|
+
static equals(a: Ticket | PlainMessage<Ticket> | undefined, b: Ticket | PlainMessage<Ticket> | undefined): boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class TicketMessage extends Message<TicketMessage> {
|
|
33
|
+
id: string;
|
|
34
|
+
ticketId: string;
|
|
35
|
+
authorId: string;
|
|
36
|
+
authorUsername: string;
|
|
37
|
+
fromAdmin: boolean;
|
|
38
|
+
message: string;
|
|
39
|
+
attachmentUrl: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
constructor(data?: PartialMessage<TicketMessage>);
|
|
42
|
+
static readonly runtime: typeof proto3;
|
|
43
|
+
static readonly typeName = "micro.v1.support.TicketMessage";
|
|
44
|
+
static readonly fields: FieldList;
|
|
45
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketMessage;
|
|
46
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketMessage;
|
|
47
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketMessage;
|
|
48
|
+
static equals(a: TicketMessage | PlainMessage<TicketMessage> | undefined, b: TicketMessage | PlainMessage<TicketMessage> | undefined): boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare class CreateTicketRequest extends Message<CreateTicketRequest> {
|
|
51
|
+
topic: string;
|
|
52
|
+
message: string;
|
|
53
|
+
attachmentUrl: string;
|
|
54
|
+
platform: string;
|
|
55
|
+
appVersion: string;
|
|
56
|
+
constructor(data?: PartialMessage<CreateTicketRequest>);
|
|
57
|
+
static readonly runtime: typeof proto3;
|
|
58
|
+
static readonly typeName = "micro.v1.support.CreateTicketRequest";
|
|
59
|
+
static readonly fields: FieldList;
|
|
60
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateTicketRequest;
|
|
61
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateTicketRequest;
|
|
62
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateTicketRequest;
|
|
63
|
+
static equals(a: CreateTicketRequest | PlainMessage<CreateTicketRequest> | undefined, b: CreateTicketRequest | PlainMessage<CreateTicketRequest> | undefined): boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare class TicketListRequest extends Message<TicketListRequest> {
|
|
66
|
+
page: number;
|
|
67
|
+
perPage: number;
|
|
68
|
+
status: string;
|
|
69
|
+
search: string;
|
|
70
|
+
constructor(data?: PartialMessage<TicketListRequest>);
|
|
71
|
+
static readonly runtime: typeof proto3;
|
|
72
|
+
static readonly typeName = "micro.v1.support.TicketListRequest";
|
|
73
|
+
static readonly fields: FieldList;
|
|
74
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketListRequest;
|
|
75
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketListRequest;
|
|
76
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketListRequest;
|
|
77
|
+
static equals(a: TicketListRequest | PlainMessage<TicketListRequest> | undefined, b: TicketListRequest | PlainMessage<TicketListRequest> | undefined): boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare class ReplyRequest extends Message<ReplyRequest> {
|
|
80
|
+
ticketId: string;
|
|
81
|
+
message: string;
|
|
82
|
+
attachmentUrl: string;
|
|
83
|
+
constructor(data?: PartialMessage<ReplyRequest>);
|
|
84
|
+
static readonly runtime: typeof proto3;
|
|
85
|
+
static readonly typeName = "micro.v1.support.ReplyRequest";
|
|
86
|
+
static readonly fields: FieldList;
|
|
87
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReplyRequest;
|
|
88
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReplyRequest;
|
|
89
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReplyRequest;
|
|
90
|
+
static equals(a: ReplyRequest | PlainMessage<ReplyRequest> | undefined, b: ReplyRequest | PlainMessage<ReplyRequest> | undefined): boolean;
|
|
91
|
+
}
|
|
92
|
+
export declare class SetStatusRequest extends Message<SetStatusRequest> {
|
|
93
|
+
ticketId: string;
|
|
94
|
+
status: string;
|
|
95
|
+
constructor(data?: PartialMessage<SetStatusRequest>);
|
|
96
|
+
static readonly runtime: typeof proto3;
|
|
97
|
+
static readonly typeName = "micro.v1.support.SetStatusRequest";
|
|
98
|
+
static readonly fields: FieldList;
|
|
99
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetStatusRequest;
|
|
100
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetStatusRequest;
|
|
101
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetStatusRequest;
|
|
102
|
+
static equals(a: SetStatusRequest | PlainMessage<SetStatusRequest> | undefined, b: SetStatusRequest | PlainMessage<SetStatusRequest> | undefined): boolean;
|
|
103
|
+
}
|
|
104
|
+
export declare class TicketResponse extends Message<TicketResponse> {
|
|
105
|
+
status?: ResponseStatus;
|
|
106
|
+
data?: Ticket;
|
|
107
|
+
constructor(data?: PartialMessage<TicketResponse>);
|
|
108
|
+
static readonly runtime: typeof proto3;
|
|
109
|
+
static readonly typeName = "micro.v1.support.TicketResponse";
|
|
110
|
+
static readonly fields: FieldList;
|
|
111
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketResponse;
|
|
112
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketResponse;
|
|
113
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketResponse;
|
|
114
|
+
static equals(a: TicketResponse | PlainMessage<TicketResponse> | undefined, b: TicketResponse | PlainMessage<TicketResponse> | undefined): boolean;
|
|
115
|
+
}
|
|
116
|
+
export declare class TicketListResponse extends Message<TicketListResponse> {
|
|
117
|
+
status?: ResponseStatus;
|
|
118
|
+
data: Ticket[];
|
|
119
|
+
pagination?: PaginationMetaResult;
|
|
120
|
+
attentionCount: number;
|
|
121
|
+
constructor(data?: PartialMessage<TicketListResponse>);
|
|
122
|
+
static readonly runtime: typeof proto3;
|
|
123
|
+
static readonly typeName = "micro.v1.support.TicketListResponse";
|
|
124
|
+
static readonly fields: FieldList;
|
|
125
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketListResponse;
|
|
126
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketListResponse;
|
|
127
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketListResponse;
|
|
128
|
+
static equals(a: TicketListResponse | PlainMessage<TicketListResponse> | undefined, b: TicketListResponse | PlainMessage<TicketListResponse> | undefined): boolean;
|
|
129
|
+
}
|
|
130
|
+
export declare class TicketThreadResponse extends Message<TicketThreadResponse> {
|
|
131
|
+
status?: ResponseStatus;
|
|
132
|
+
data?: Ticket;
|
|
133
|
+
messages: TicketMessage[];
|
|
134
|
+
constructor(data?: PartialMessage<TicketThreadResponse>);
|
|
135
|
+
static readonly runtime: typeof proto3;
|
|
136
|
+
static readonly typeName = "micro.v1.support.TicketThreadResponse";
|
|
137
|
+
static readonly fields: FieldList;
|
|
138
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TicketThreadResponse;
|
|
139
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TicketThreadResponse;
|
|
140
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TicketThreadResponse;
|
|
141
|
+
static equals(a: TicketThreadResponse | PlainMessage<TicketThreadResponse> | undefined, b: TicketThreadResponse | PlainMessage<TicketThreadResponse> | undefined): boolean;
|
|
142
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketThreadResponse = exports.TicketListResponse = exports.TicketResponse = exports.SetStatusRequest = exports.ReplyRequest = exports.TicketListRequest = exports.CreateTicketRequest = exports.TicketMessage = exports.Ticket = void 0;
|
|
4
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
|
+
const general_pb_js_1 = require("../general_pb.js");
|
|
6
|
+
class Ticket extends protobuf_1.Message {
|
|
7
|
+
id = "";
|
|
8
|
+
number = 0;
|
|
9
|
+
userId = "";
|
|
10
|
+
username = "";
|
|
11
|
+
avatarUrl = "";
|
|
12
|
+
topic = "";
|
|
13
|
+
status = "";
|
|
14
|
+
preview = "";
|
|
15
|
+
lastMessage = "";
|
|
16
|
+
lastFromAdmin = false;
|
|
17
|
+
messageCount = 0;
|
|
18
|
+
unreadForUser = false;
|
|
19
|
+
unreadForAdmin = false;
|
|
20
|
+
platform = "";
|
|
21
|
+
appVersion = "";
|
|
22
|
+
createdAt = "";
|
|
23
|
+
updatedAt = "";
|
|
24
|
+
closedAt = "";
|
|
25
|
+
constructor(data) {
|
|
26
|
+
super();
|
|
27
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
28
|
+
}
|
|
29
|
+
static runtime = protobuf_1.proto3;
|
|
30
|
+
static typeName = "micro.v1.support.Ticket";
|
|
31
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
32
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
33
|
+
{ no: 2, name: "number", kind: "scalar", T: 5 },
|
|
34
|
+
{ no: 3, name: "user_id", kind: "scalar", T: 9 },
|
|
35
|
+
{ no: 4, name: "username", kind: "scalar", T: 9 },
|
|
36
|
+
{ no: 5, name: "avatar_url", kind: "scalar", T: 9 },
|
|
37
|
+
{ no: 6, name: "topic", kind: "scalar", T: 9 },
|
|
38
|
+
{ no: 7, name: "status", kind: "scalar", T: 9 },
|
|
39
|
+
{ no: 8, name: "preview", kind: "scalar", T: 9 },
|
|
40
|
+
{ no: 9, name: "last_message", kind: "scalar", T: 9 },
|
|
41
|
+
{ no: 10, name: "last_from_admin", kind: "scalar", T: 8 },
|
|
42
|
+
{ no: 11, name: "message_count", kind: "scalar", T: 5 },
|
|
43
|
+
{ no: 12, name: "unread_for_user", kind: "scalar", T: 8 },
|
|
44
|
+
{ no: 13, name: "unread_for_admin", kind: "scalar", T: 8 },
|
|
45
|
+
{ no: 14, name: "platform", kind: "scalar", T: 9 },
|
|
46
|
+
{ no: 15, name: "app_version", kind: "scalar", T: 9 },
|
|
47
|
+
{ no: 16, name: "created_at", kind: "scalar", T: 9 },
|
|
48
|
+
{ no: 17, name: "updated_at", kind: "scalar", T: 9 },
|
|
49
|
+
{ no: 18, name: "closed_at", kind: "scalar", T: 9 },
|
|
50
|
+
]);
|
|
51
|
+
static fromBinary(bytes, options) {
|
|
52
|
+
return new Ticket().fromBinary(bytes, options);
|
|
53
|
+
}
|
|
54
|
+
static fromJson(jsonValue, options) {
|
|
55
|
+
return new Ticket().fromJson(jsonValue, options);
|
|
56
|
+
}
|
|
57
|
+
static fromJsonString(jsonString, options) {
|
|
58
|
+
return new Ticket().fromJsonString(jsonString, options);
|
|
59
|
+
}
|
|
60
|
+
static equals(a, b) {
|
|
61
|
+
return protobuf_1.proto3.util.equals(Ticket, a, b);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.Ticket = Ticket;
|
|
65
|
+
class TicketMessage extends protobuf_1.Message {
|
|
66
|
+
id = "";
|
|
67
|
+
ticketId = "";
|
|
68
|
+
authorId = "";
|
|
69
|
+
authorUsername = "";
|
|
70
|
+
fromAdmin = false;
|
|
71
|
+
message = "";
|
|
72
|
+
attachmentUrl = "";
|
|
73
|
+
createdAt = "";
|
|
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.TicketMessage";
|
|
80
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
81
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
82
|
+
{ no: 2, name: "ticket_id", kind: "scalar", T: 9 },
|
|
83
|
+
{ no: 3, name: "author_id", kind: "scalar", T: 9 },
|
|
84
|
+
{ no: 4, name: "author_username", kind: "scalar", T: 9 },
|
|
85
|
+
{ no: 5, name: "from_admin", kind: "scalar", T: 8 },
|
|
86
|
+
{ no: 6, name: "message", kind: "scalar", T: 9 },
|
|
87
|
+
{ no: 7, name: "attachment_url", kind: "scalar", T: 9 },
|
|
88
|
+
{ no: 8, name: "created_at", kind: "scalar", T: 9 },
|
|
89
|
+
]);
|
|
90
|
+
static fromBinary(bytes, options) {
|
|
91
|
+
return new TicketMessage().fromBinary(bytes, options);
|
|
92
|
+
}
|
|
93
|
+
static fromJson(jsonValue, options) {
|
|
94
|
+
return new TicketMessage().fromJson(jsonValue, options);
|
|
95
|
+
}
|
|
96
|
+
static fromJsonString(jsonString, options) {
|
|
97
|
+
return new TicketMessage().fromJsonString(jsonString, options);
|
|
98
|
+
}
|
|
99
|
+
static equals(a, b) {
|
|
100
|
+
return protobuf_1.proto3.util.equals(TicketMessage, a, b);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.TicketMessage = TicketMessage;
|
|
104
|
+
class CreateTicketRequest extends protobuf_1.Message {
|
|
105
|
+
topic = "";
|
|
106
|
+
message = "";
|
|
107
|
+
attachmentUrl = "";
|
|
108
|
+
platform = "";
|
|
109
|
+
appVersion = "";
|
|
110
|
+
constructor(data) {
|
|
111
|
+
super();
|
|
112
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
113
|
+
}
|
|
114
|
+
static runtime = protobuf_1.proto3;
|
|
115
|
+
static typeName = "micro.v1.support.CreateTicketRequest";
|
|
116
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
117
|
+
{ no: 1, name: "topic", kind: "scalar", T: 9 },
|
|
118
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 },
|
|
119
|
+
{ no: 3, name: "attachment_url", kind: "scalar", T: 9 },
|
|
120
|
+
{ no: 4, name: "platform", kind: "scalar", T: 9 },
|
|
121
|
+
{ no: 5, name: "app_version", kind: "scalar", T: 9 },
|
|
122
|
+
]);
|
|
123
|
+
static fromBinary(bytes, options) {
|
|
124
|
+
return new CreateTicketRequest().fromBinary(bytes, options);
|
|
125
|
+
}
|
|
126
|
+
static fromJson(jsonValue, options) {
|
|
127
|
+
return new CreateTicketRequest().fromJson(jsonValue, options);
|
|
128
|
+
}
|
|
129
|
+
static fromJsonString(jsonString, options) {
|
|
130
|
+
return new CreateTicketRequest().fromJsonString(jsonString, options);
|
|
131
|
+
}
|
|
132
|
+
static equals(a, b) {
|
|
133
|
+
return protobuf_1.proto3.util.equals(CreateTicketRequest, a, b);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.CreateTicketRequest = CreateTicketRequest;
|
|
137
|
+
class TicketListRequest extends protobuf_1.Message {
|
|
138
|
+
page = 0;
|
|
139
|
+
perPage = 0;
|
|
140
|
+
status = "";
|
|
141
|
+
search = "";
|
|
142
|
+
constructor(data) {
|
|
143
|
+
super();
|
|
144
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
145
|
+
}
|
|
146
|
+
static runtime = protobuf_1.proto3;
|
|
147
|
+
static typeName = "micro.v1.support.TicketListRequest";
|
|
148
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
149
|
+
{ no: 1, name: "page", kind: "scalar", T: 5 },
|
|
150
|
+
{ no: 2, name: "per_page", kind: "scalar", T: 5 },
|
|
151
|
+
{ no: 3, name: "status", kind: "scalar", T: 9 },
|
|
152
|
+
{ no: 4, name: "search", kind: "scalar", T: 9 },
|
|
153
|
+
]);
|
|
154
|
+
static fromBinary(bytes, options) {
|
|
155
|
+
return new TicketListRequest().fromBinary(bytes, options);
|
|
156
|
+
}
|
|
157
|
+
static fromJson(jsonValue, options) {
|
|
158
|
+
return new TicketListRequest().fromJson(jsonValue, options);
|
|
159
|
+
}
|
|
160
|
+
static fromJsonString(jsonString, options) {
|
|
161
|
+
return new TicketListRequest().fromJsonString(jsonString, options);
|
|
162
|
+
}
|
|
163
|
+
static equals(a, b) {
|
|
164
|
+
return protobuf_1.proto3.util.equals(TicketListRequest, a, b);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
exports.TicketListRequest = TicketListRequest;
|
|
168
|
+
class ReplyRequest extends protobuf_1.Message {
|
|
169
|
+
ticketId = "";
|
|
170
|
+
message = "";
|
|
171
|
+
attachmentUrl = "";
|
|
172
|
+
constructor(data) {
|
|
173
|
+
super();
|
|
174
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
175
|
+
}
|
|
176
|
+
static runtime = protobuf_1.proto3;
|
|
177
|
+
static typeName = "micro.v1.support.ReplyRequest";
|
|
178
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
179
|
+
{ no: 1, name: "ticket_id", kind: "scalar", T: 9 },
|
|
180
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 },
|
|
181
|
+
{ no: 3, name: "attachment_url", kind: "scalar", T: 9 },
|
|
182
|
+
]);
|
|
183
|
+
static fromBinary(bytes, options) {
|
|
184
|
+
return new ReplyRequest().fromBinary(bytes, options);
|
|
185
|
+
}
|
|
186
|
+
static fromJson(jsonValue, options) {
|
|
187
|
+
return new ReplyRequest().fromJson(jsonValue, options);
|
|
188
|
+
}
|
|
189
|
+
static fromJsonString(jsonString, options) {
|
|
190
|
+
return new ReplyRequest().fromJsonString(jsonString, options);
|
|
191
|
+
}
|
|
192
|
+
static equals(a, b) {
|
|
193
|
+
return protobuf_1.proto3.util.equals(ReplyRequest, a, b);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.ReplyRequest = ReplyRequest;
|
|
197
|
+
class SetStatusRequest extends protobuf_1.Message {
|
|
198
|
+
ticketId = "";
|
|
199
|
+
status = "";
|
|
200
|
+
constructor(data) {
|
|
201
|
+
super();
|
|
202
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
203
|
+
}
|
|
204
|
+
static runtime = protobuf_1.proto3;
|
|
205
|
+
static typeName = "micro.v1.support.SetStatusRequest";
|
|
206
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
207
|
+
{ no: 1, name: "ticket_id", kind: "scalar", T: 9 },
|
|
208
|
+
{ no: 2, name: "status", kind: "scalar", T: 9 },
|
|
209
|
+
]);
|
|
210
|
+
static fromBinary(bytes, options) {
|
|
211
|
+
return new SetStatusRequest().fromBinary(bytes, options);
|
|
212
|
+
}
|
|
213
|
+
static fromJson(jsonValue, options) {
|
|
214
|
+
return new SetStatusRequest().fromJson(jsonValue, options);
|
|
215
|
+
}
|
|
216
|
+
static fromJsonString(jsonString, options) {
|
|
217
|
+
return new SetStatusRequest().fromJsonString(jsonString, options);
|
|
218
|
+
}
|
|
219
|
+
static equals(a, b) {
|
|
220
|
+
return protobuf_1.proto3.util.equals(SetStatusRequest, a, b);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.SetStatusRequest = SetStatusRequest;
|
|
224
|
+
class TicketResponse extends protobuf_1.Message {
|
|
225
|
+
status;
|
|
226
|
+
data;
|
|
227
|
+
constructor(data) {
|
|
228
|
+
super();
|
|
229
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
230
|
+
}
|
|
231
|
+
static runtime = protobuf_1.proto3;
|
|
232
|
+
static typeName = "micro.v1.support.TicketResponse";
|
|
233
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
234
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
235
|
+
{ no: 2, name: "data", kind: "message", T: Ticket, opt: true },
|
|
236
|
+
]);
|
|
237
|
+
static fromBinary(bytes, options) {
|
|
238
|
+
return new TicketResponse().fromBinary(bytes, options);
|
|
239
|
+
}
|
|
240
|
+
static fromJson(jsonValue, options) {
|
|
241
|
+
return new TicketResponse().fromJson(jsonValue, options);
|
|
242
|
+
}
|
|
243
|
+
static fromJsonString(jsonString, options) {
|
|
244
|
+
return new TicketResponse().fromJsonString(jsonString, options);
|
|
245
|
+
}
|
|
246
|
+
static equals(a, b) {
|
|
247
|
+
return protobuf_1.proto3.util.equals(TicketResponse, a, b);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
exports.TicketResponse = TicketResponse;
|
|
251
|
+
class TicketListResponse extends protobuf_1.Message {
|
|
252
|
+
status;
|
|
253
|
+
data = [];
|
|
254
|
+
pagination;
|
|
255
|
+
attentionCount = 0;
|
|
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.TicketListResponse";
|
|
262
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
263
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
264
|
+
{ no: 2, name: "data", kind: "message", T: Ticket, repeated: true },
|
|
265
|
+
{ no: 3, name: "pagination", kind: "message", T: general_pb_js_1.PaginationMetaResult, opt: true },
|
|
266
|
+
{ no: 4, name: "attention_count", kind: "scalar", T: 5 },
|
|
267
|
+
]);
|
|
268
|
+
static fromBinary(bytes, options) {
|
|
269
|
+
return new TicketListResponse().fromBinary(bytes, options);
|
|
270
|
+
}
|
|
271
|
+
static fromJson(jsonValue, options) {
|
|
272
|
+
return new TicketListResponse().fromJson(jsonValue, options);
|
|
273
|
+
}
|
|
274
|
+
static fromJsonString(jsonString, options) {
|
|
275
|
+
return new TicketListResponse().fromJsonString(jsonString, options);
|
|
276
|
+
}
|
|
277
|
+
static equals(a, b) {
|
|
278
|
+
return protobuf_1.proto3.util.equals(TicketListResponse, a, b);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
exports.TicketListResponse = TicketListResponse;
|
|
282
|
+
class TicketThreadResponse extends protobuf_1.Message {
|
|
283
|
+
status;
|
|
284
|
+
data;
|
|
285
|
+
messages = [];
|
|
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.TicketThreadResponse";
|
|
292
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
293
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
294
|
+
{ no: 2, name: "data", kind: "message", T: Ticket, opt: true },
|
|
295
|
+
{ no: 3, name: "messages", kind: "message", T: TicketMessage, repeated: true },
|
|
296
|
+
]);
|
|
297
|
+
static fromBinary(bytes, options) {
|
|
298
|
+
return new TicketThreadResponse().fromBinary(bytes, options);
|
|
299
|
+
}
|
|
300
|
+
static fromJson(jsonValue, options) {
|
|
301
|
+
return new TicketThreadResponse().fromJson(jsonValue, options);
|
|
302
|
+
}
|
|
303
|
+
static fromJsonString(jsonString, options) {
|
|
304
|
+
return new TicketThreadResponse().fromJsonString(jsonString, options);
|
|
305
|
+
}
|
|
306
|
+
static equals(a, b) {
|
|
307
|
+
return protobuf_1.proto3.util.equals(TicketThreadResponse, a, b);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
exports.TicketThreadResponse = TicketThreadResponse;
|
|
@@ -11,6 +11,7 @@ export declare const CHAT_MICRO = "CHAT_MICRO";
|
|
|
11
11
|
export declare const VOICE_MICRO = "VOICE_MICRO";
|
|
12
12
|
export declare const SUBSCRIPTION_MICRO = "SUBSCRIPTION_MICRO";
|
|
13
13
|
export declare const MINING_MICRO = "MINING_MICRO";
|
|
14
|
+
export declare const SUPPORT_MICRO = "SUPPORT_MICRO";
|
|
14
15
|
export declare const X_INTERNAL_HASH = "x-internal-hash";
|
|
15
16
|
export declare const FILTER_SEPARATOR = "_|_";
|
|
16
17
|
export declare const KAFKA_KEYS: {
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MEDIA_UPLOADS_PATH = exports.KEYS = exports.KAFKA_KEYS = exports.FILTER_SEPARATOR = exports.X_INTERNAL_HASH = exports.MINING_MICRO = exports.SUBSCRIPTION_MICRO = exports.VOICE_MICRO = exports.CHAT_MICRO = exports.MEDIA_MICRO = exports.PUPPETEER_MICRO = exports.EDUCATION_MICRO = exports.DATA_MICRO = exports.PORTFOLIO_MICRO = exports.USER_MICRO = exports.NOTIFICATION_MICRO = exports.NEWS_MICRO = exports.COIN_MICRO = void 0;
|
|
3
|
+
exports.MEDIA_UPLOADS_PATH = exports.KEYS = exports.KAFKA_KEYS = exports.FILTER_SEPARATOR = exports.X_INTERNAL_HASH = exports.SUPPORT_MICRO = exports.MINING_MICRO = exports.SUBSCRIPTION_MICRO = exports.VOICE_MICRO = exports.CHAT_MICRO = exports.MEDIA_MICRO = exports.PUPPETEER_MICRO = exports.EDUCATION_MICRO = exports.DATA_MICRO = exports.PORTFOLIO_MICRO = exports.USER_MICRO = exports.NOTIFICATION_MICRO = exports.NEWS_MICRO = exports.COIN_MICRO = void 0;
|
|
4
4
|
exports.COIN_MICRO = 'COIN_MICRO';
|
|
5
5
|
exports.NEWS_MICRO = 'NEWS_MICRO';
|
|
6
6
|
exports.NOTIFICATION_MICRO = 'NOTIFICATION_MICRO';
|
|
@@ -14,6 +14,7 @@ exports.CHAT_MICRO = 'CHAT_MICRO';
|
|
|
14
14
|
exports.VOICE_MICRO = 'VOICE_MICRO';
|
|
15
15
|
exports.SUBSCRIPTION_MICRO = 'SUBSCRIPTION_MICRO';
|
|
16
16
|
exports.MINING_MICRO = 'MINING_MICRO';
|
|
17
|
+
exports.SUPPORT_MICRO = 'SUPPORT_MICRO';
|
|
17
18
|
exports.X_INTERNAL_HASH = 'x-internal-hash';
|
|
18
19
|
exports.FILTER_SEPARATOR = '_|_';
|
|
19
20
|
exports.KAFKA_KEYS = {
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package micro.v1.support;
|
|
4
|
+
|
|
5
|
+
import "micro/v1/general.proto";
|
|
6
|
+
import "micro/v1/support/support_messages.proto";
|
|
7
|
+
|
|
8
|
+
// Support tickets. Person-side calls carry the app token; the admin calls
|
|
9
|
+
// require the admin role; RemoveUserData is internal (account deletion).
|
|
10
|
+
service PSupportService {
|
|
11
|
+
rpc CreateTicket(CreateTicketRequest) returns(stream TicketThreadResponse) {}
|
|
12
|
+
rpc MyTickets(TicketListRequest) returns(stream TicketListResponse) {}
|
|
13
|
+
// The thread; marks the admin's answers as read for the person.
|
|
14
|
+
rpc Ticket(ByIdRequest) returns(stream TicketThreadResponse) {}
|
|
15
|
+
// A person writing into their own ticket, or an admin answering any.
|
|
16
|
+
rpc Reply(ReplyRequest) returns(stream TicketThreadResponse) {}
|
|
17
|
+
|
|
18
|
+
rpc AdminTickets(TicketListRequest) returns(stream TicketListResponse) {}
|
|
19
|
+
// The thread for an admin; marks the person's messages as read for admins.
|
|
20
|
+
rpc AdminTicket(ByIdRequest) returns(stream TicketThreadResponse) {}
|
|
21
|
+
rpc AdminSetStatus(SetStatusRequest) returns(stream TicketThreadResponse) {}
|
|
22
|
+
|
|
23
|
+
rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package micro.v1.support;
|
|
4
|
+
|
|
5
|
+
import "micro/v1/general.proto";
|
|
6
|
+
|
|
7
|
+
// In-app support tickets ("Destek"): a person writes from the app, admins
|
|
8
|
+
// answer from the admin panel or the app. Lives in jr-mining-micro next to
|
|
9
|
+
// JR, served under its own package. Times are RFC 3339 UTC.
|
|
10
|
+
|
|
11
|
+
// A ticket as lists and the thread header show it.
|
|
12
|
+
message Ticket {
|
|
13
|
+
string id = 1;
|
|
14
|
+
// Short human number shown to the person ("#1043").
|
|
15
|
+
int32 number = 2;
|
|
16
|
+
string user_id = 3;
|
|
17
|
+
string username = 4;
|
|
18
|
+
string avatar_url = 5;
|
|
19
|
+
// mining | referral | tasks | team | account | other
|
|
20
|
+
string topic = 6;
|
|
21
|
+
// open | answered | closed
|
|
22
|
+
string status = 7;
|
|
23
|
+
// First message, trimmed, for list rows.
|
|
24
|
+
string preview = 8;
|
|
25
|
+
// The newest message, trimmed, for list rows.
|
|
26
|
+
string last_message = 9;
|
|
27
|
+
bool last_from_admin = 10;
|
|
28
|
+
int32 message_count = 11;
|
|
29
|
+
// Admin replied after the person last looked / person wrote after an admin last looked.
|
|
30
|
+
bool unread_for_user = 12;
|
|
31
|
+
bool unread_for_admin = 13;
|
|
32
|
+
string platform = 14;
|
|
33
|
+
string app_version = 15;
|
|
34
|
+
string created_at = 16;
|
|
35
|
+
string updated_at = 17;
|
|
36
|
+
string closed_at = 18;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message TicketMessage {
|
|
40
|
+
string id = 1;
|
|
41
|
+
string ticket_id = 2;
|
|
42
|
+
string author_id = 3;
|
|
43
|
+
string author_username = 4;
|
|
44
|
+
bool from_admin = 5;
|
|
45
|
+
string message = 6;
|
|
46
|
+
string attachment_url = 7;
|
|
47
|
+
string created_at = 8;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message CreateTicketRequest {
|
|
51
|
+
string topic = 1;
|
|
52
|
+
string message = 2;
|
|
53
|
+
string attachment_url = 3;
|
|
54
|
+
string platform = 4;
|
|
55
|
+
string app_version = 5;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message TicketListRequest {
|
|
59
|
+
int32 page = 1;
|
|
60
|
+
int32 per_page = 2;
|
|
61
|
+
// all | open | answered | closed
|
|
62
|
+
string status = 3;
|
|
63
|
+
// Admin lists only: username / number / text search.
|
|
64
|
+
string search = 4;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message ReplyRequest {
|
|
68
|
+
string ticket_id = 1;
|
|
69
|
+
string message = 2;
|
|
70
|
+
string attachment_url = 3;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message SetStatusRequest {
|
|
74
|
+
string ticket_id = 1;
|
|
75
|
+
// open | closed
|
|
76
|
+
string status = 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message TicketResponse {
|
|
80
|
+
ResponseStatus status = 1;
|
|
81
|
+
optional Ticket data = 2;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message TicketListResponse {
|
|
85
|
+
ResponseStatus status = 1;
|
|
86
|
+
repeated Ticket data = 2;
|
|
87
|
+
optional PaginationMetaResult pagination = 3;
|
|
88
|
+
// Admin: tickets waiting for an answer; person: tickets with a new answer.
|
|
89
|
+
int32 attention_count = 4;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message TicketThreadResponse {
|
|
93
|
+
ResponseStatus status = 1;
|
|
94
|
+
optional Ticket data = 2;
|
|
95
|
+
repeated TicketMessage messages = 3;
|
|
96
|
+
}
|