jr-common-micro 1.1.86 → 1.1.88

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.
@@ -116,6 +116,7 @@ export interface ChatMediaUploadRequest {
116
116
  kind: string;
117
117
  data: Buffer;
118
118
  mimetype: string;
119
+ poster: Buffer;
119
120
  }
120
121
  export interface ChatMediaUploadResponse {
121
122
  status: ResponseStatus | undefined;
@@ -386,4 +387,16 @@ export interface ReviewReportRequest {
386
387
  report_id: string;
387
388
  status: string;
388
389
  }
390
+ export interface VoiceAccessResponse {
391
+ status: ResponseStatus | undefined;
392
+ can_listen: boolean;
393
+ can_host: boolean;
394
+ can_raise_hand: boolean;
395
+ username: string;
396
+ avatar_id: string;
397
+ role: string;
398
+ reason: string;
399
+ group_id: string;
400
+ group_name: string;
401
+ }
389
402
  export declare const MICRO_V1_CHAT_PACKAGE_NAME = "micro.v1.chat";
@@ -213,6 +213,7 @@ export declare class ChatMediaUploadRequest extends Message<ChatMediaUploadReque
213
213
  kind: string;
214
214
  data: Uint8Array<ArrayBuffer>;
215
215
  mimetype: string;
216
+ poster: Uint8Array<ArrayBuffer>;
216
217
  constructor(data?: PartialMessage<ChatMediaUploadRequest>);
217
218
  static readonly runtime: typeof proto3;
218
219
  static readonly typeName = "micro.v1.chat.ChatMediaUploadRequest";
@@ -827,3 +828,23 @@ export declare class ReviewReportRequest extends Message<ReviewReportRequest> {
827
828
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReviewReportRequest;
828
829
  static equals(a: ReviewReportRequest | PlainMessage<ReviewReportRequest> | undefined, b: ReviewReportRequest | PlainMessage<ReviewReportRequest> | undefined): boolean;
829
830
  }
831
+ export declare class VoiceAccessResponse extends Message<VoiceAccessResponse> {
832
+ status?: ResponseStatus;
833
+ canListen: boolean;
834
+ canHost: boolean;
835
+ canRaiseHand: boolean;
836
+ username: string;
837
+ avatarId: string;
838
+ role: string;
839
+ reason: string;
840
+ groupId: string;
841
+ groupName: string;
842
+ constructor(data?: PartialMessage<VoiceAccessResponse>);
843
+ static readonly runtime: typeof proto3;
844
+ static readonly typeName = "micro.v1.chat.VoiceAccessResponse";
845
+ static readonly fields: FieldList;
846
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceAccessResponse;
847
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceAccessResponse;
848
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceAccessResponse;
849
+ static equals(a: VoiceAccessResponse | PlainMessage<VoiceAccessResponse> | undefined, b: VoiceAccessResponse | PlainMessage<VoiceAccessResponse> | undefined): boolean;
850
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.GroupPhotoResponse = exports.GroupPhotoSetRequest = exports.ChatMemberDto = exports.ChatMemberListRequest = exports.PendingMembersRequest = exports.MemberActionRequest = exports.PinMessageRequest = exports.DeleteMessageRequest = exports.RevokeSanctionRequest = exports.SanctionRequest = exports.GroupUpsertRequest = exports.BlockedUsersResponse = exports.BlockUserRequest = exports.ReportMessageRequest = exports.PinnedMessagesResponse = exports.PinnedMessagesRequest = exports.MessageHistoryResponse = exports.MessageHistoryRequest = exports.ChatReplyPreviewDto = exports.ChatReactionCountDto = exports.ChatReactorDto = exports.ChatPollDto = exports.ChatPollOptionDto = exports.GroupStatsResponse = exports.GroupStatsOverviewDto = exports.GroupStatsMemberDto = exports.GroupStatsDayDto = exports.GroupStatsRequest = exports.ChatMediaGetResponse = exports.GroupMediaResponse = exports.ChatMediaItemDto = exports.GroupMediaRequest = exports.ChatMediaGetRequest = exports.ChatMediaUploadResponse = exports.ChatMediaUploadRequest = exports.GifSearchResponse = exports.GifItemDto = exports.GifSearchRequest = exports.ChatMediaDto = exports.ChatLinkPreviewDto = exports.ChatTickerCardDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
4
- exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = void 0;
4
+ exports.VoiceAccessResponse = exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = void 0;
5
5
  const protobuf_1 = require("@bufbuild/protobuf");
6
6
  const general_pb_js_1 = require("../general_pb.js");
7
7
  class ChatGroupDto extends protobuf_1.Message {
@@ -459,6 +459,7 @@ class ChatMediaUploadRequest extends protobuf_1.Message {
459
459
  kind = "";
460
460
  data = new Uint8Array(0);
461
461
  mimetype = "";
462
+ poster = new Uint8Array(0);
462
463
  constructor(data) {
463
464
  super();
464
465
  protobuf_1.proto3.util.initPartial(data, this);
@@ -470,6 +471,7 @@ class ChatMediaUploadRequest extends protobuf_1.Message {
470
471
  { no: 2, name: "kind", kind: "scalar", T: 9 },
471
472
  { no: 3, name: "data", kind: "scalar", T: 12 },
472
473
  { no: 4, name: "mimetype", kind: "scalar", T: 9 },
474
+ { no: 5, name: "poster", kind: "scalar", T: 12 },
473
475
  ]);
474
476
  static fromBinary(bytes, options) {
475
477
  return new ChatMediaUploadRequest().fromBinary(bytes, options);
@@ -1821,3 +1823,46 @@ class ReviewReportRequest extends protobuf_1.Message {
1821
1823
  }
1822
1824
  }
1823
1825
  exports.ReviewReportRequest = ReviewReportRequest;
1826
+ class VoiceAccessResponse extends protobuf_1.Message {
1827
+ status;
1828
+ canListen = false;
1829
+ canHost = false;
1830
+ canRaiseHand = false;
1831
+ username = "";
1832
+ avatarId = "";
1833
+ role = "";
1834
+ reason = "";
1835
+ groupId = "";
1836
+ groupName = "";
1837
+ constructor(data) {
1838
+ super();
1839
+ protobuf_1.proto3.util.initPartial(data, this);
1840
+ }
1841
+ static runtime = protobuf_1.proto3;
1842
+ static typeName = "micro.v1.chat.VoiceAccessResponse";
1843
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1844
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
1845
+ { no: 2, name: "can_listen", kind: "scalar", T: 8 },
1846
+ { no: 3, name: "can_host", kind: "scalar", T: 8 },
1847
+ { no: 4, name: "can_raise_hand", kind: "scalar", T: 8 },
1848
+ { no: 5, name: "username", kind: "scalar", T: 9 },
1849
+ { no: 6, name: "avatar_id", kind: "scalar", T: 9 },
1850
+ { no: 7, name: "role", kind: "scalar", T: 9 },
1851
+ { no: 8, name: "reason", kind: "scalar", T: 9 },
1852
+ { no: 9, name: "group_id", kind: "scalar", T: 9 },
1853
+ { no: 10, name: "group_name", kind: "scalar", T: 9 },
1854
+ ]);
1855
+ static fromBinary(bytes, options) {
1856
+ return new VoiceAccessResponse().fromBinary(bytes, options);
1857
+ }
1858
+ static fromJson(jsonValue, options) {
1859
+ return new VoiceAccessResponse().fromJson(jsonValue, options);
1860
+ }
1861
+ static fromJsonString(jsonString, options) {
1862
+ return new VoiceAccessResponse().fromJsonString(jsonString, options);
1863
+ }
1864
+ static equals(a, b) {
1865
+ return protobuf_1.proto3.util.equals(VoiceAccessResponse, a, b);
1866
+ }
1867
+ }
1868
+ exports.VoiceAccessResponse = VoiceAccessResponse;
@@ -1,5 +1,5 @@
1
1
  import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
2
- import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GifSearchRequest, GifSearchResponse, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_pb.js";
2
+ import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GifSearchRequest, GifSearchResponse, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest, VoiceAccessResponse } from "./chat_messages_pb.js";
3
3
  import { MethodKind } from "@bufbuild/protobuf";
4
4
  export declare const PChatService: {
5
5
  readonly typeName: "micro.v1.chat.PChatService";
@@ -64,6 +64,12 @@ export declare const PChatService: {
64
64
  readonly O: typeof GifSearchResponse;
65
65
  readonly kind: MethodKind.ServerStreaming;
66
66
  };
67
+ readonly voiceAccess: {
68
+ readonly name: "VoiceAccess";
69
+ readonly I: typeof GroupBySlugRequest;
70
+ readonly O: typeof VoiceAccessResponse;
71
+ readonly kind: MethodKind.ServerStreaming;
72
+ };
67
73
  readonly getGroupPhoto: {
68
74
  readonly name: "GetGroupPhoto";
69
75
  readonly I: typeof ByIdRequest;
@@ -67,6 +67,12 @@ exports.PChatService = {
67
67
  O: chat_messages_pb_js_1.GifSearchResponse,
68
68
  kind: protobuf_1.MethodKind.ServerStreaming,
69
69
  },
70
+ voiceAccess: {
71
+ name: "VoiceAccess",
72
+ I: chat_messages_pb_js_1.GroupBySlugRequest,
73
+ O: chat_messages_pb_js_1.VoiceAccessResponse,
74
+ kind: protobuf_1.MethodKind.ServerStreaming,
75
+ },
70
76
  getGroupPhoto: {
71
77
  name: "GetGroupPhoto",
72
78
  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, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
4
- import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GifSearchRequest, GifSearchResponse, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_nest";
4
+ import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, ChatMemberListRequest, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GifSearchRequest, GifSearchResponse, GroupBySlugRequest, GroupMediaRequest, GroupMediaResponse, GroupPhotoResponse, GroupPhotoSetRequest, GroupStatsRequest, GroupStatsResponse, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest, VoiceAccessResponse } from "./chat_messages_nest";
5
5
  export declare const protobufPackage = "micro.v1.chat";
6
6
  export declare const MICRO_V1_CHAT_PACKAGE_NAME = "micro.v1.chat";
7
7
  export interface PChatServiceClient {
@@ -15,6 +15,7 @@ export interface PChatServiceClient {
15
15
  groupMedia(request: GroupMediaRequest, metadata?: Metadata): Observable<GroupMediaResponse>;
16
16
  groupStats(request: GroupStatsRequest, metadata?: Metadata): Observable<GroupStatsResponse>;
17
17
  gifSearch(request: GifSearchRequest, metadata?: Metadata): Observable<GifSearchResponse>;
18
+ voiceAccess(request: GroupBySlugRequest, metadata?: Metadata): Observable<VoiceAccessResponse>;
18
19
  getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
19
20
  uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
20
21
  getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
@@ -35,6 +36,7 @@ export interface PChatServiceController {
35
36
  groupMedia(request: GroupMediaRequest, metadata?: Metadata): Observable<GroupMediaResponse>;
36
37
  groupStats(request: GroupStatsRequest, metadata?: Metadata): Observable<GroupStatsResponse>;
37
38
  gifSearch(request: GifSearchRequest, metadata?: Metadata): Observable<GifSearchResponse>;
39
+ voiceAccess(request: GroupBySlugRequest, metadata?: Metadata): Observable<VoiceAccessResponse>;
38
40
  getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
39
41
  uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
40
42
  getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
@@ -19,6 +19,7 @@ function PChatServiceControllerMethods() {
19
19
  "groupMedia",
20
20
  "groupStats",
21
21
  "gifSearch",
22
+ "voiceAccess",
22
23
  "getGroupPhoto",
23
24
  "uploadChatMedia",
24
25
  "getChatMedia",
@@ -9,3 +9,4 @@ export * as notification from './notification';
9
9
  export * as portfolio from './portfolio';
10
10
  export * as puppeteer from './puppeteer';
11
11
  export * as user from './user';
12
+ export * as voice from './voice';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.user = exports.puppeteer = exports.portfolio = exports.notification = exports.news = exports.media = exports.general_nest = exports.education = exports.data = exports.coin = exports.chat = void 0;
3
+ exports.voice = exports.user = exports.puppeteer = exports.portfolio = exports.notification = exports.news = 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"));
@@ -13,3 +13,4 @@ exports.notification = tslib_1.__importStar(require("./notification"));
13
13
  exports.portfolio = tslib_1.__importStar(require("./portfolio"));
14
14
  exports.puppeteer = tslib_1.__importStar(require("./puppeteer"));
15
15
  exports.user = tslib_1.__importStar(require("./user"));
16
+ exports.voice = tslib_1.__importStar(require("./voice"));
@@ -0,0 +1,3 @@
1
+ export * as services_connect from './services_connect';
2
+ export * as services_nest from './services_nest';
3
+ export * as voice_messages_nest from './voice_messages_nest';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.voice_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.voice_messages_nest = tslib_1.__importStar(require("./voice_messages_nest"));
@@ -0,0 +1,68 @@
1
+ import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_pb.js";
2
+ import { VoiceHandsResponse, VoiceJoinResponse, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_pb.js";
3
+ import { MethodKind } from "@bufbuild/protobuf";
4
+ export declare const PVoiceService: {
5
+ readonly typeName: "micro.v1.voice.PVoiceService";
6
+ readonly methods: {
7
+ readonly listLiveRooms: {
8
+ readonly name: "ListLiveRooms";
9
+ readonly I: typeof EmptyRequest;
10
+ readonly O: typeof VoiceRoomListResponse;
11
+ readonly kind: MethodKind.ServerStreaming;
12
+ };
13
+ readonly getRoom: {
14
+ readonly name: "GetRoom";
15
+ readonly I: typeof VoiceRoomByGroupRequest;
16
+ readonly O: typeof VoiceRoomResponse;
17
+ readonly kind: MethodKind.ServerStreaming;
18
+ };
19
+ readonly startRoom: {
20
+ readonly name: "StartRoom";
21
+ readonly I: typeof VoiceStartRequest;
22
+ readonly O: typeof VoiceJoinResponse;
23
+ readonly kind: MethodKind.ServerStreaming;
24
+ };
25
+ readonly endRoom: {
26
+ readonly name: "EndRoom";
27
+ readonly I: typeof VoiceRoomIdRequest;
28
+ readonly O: typeof EmptyResponse;
29
+ readonly kind: MethodKind.ServerStreaming;
30
+ };
31
+ readonly joinRoom: {
32
+ readonly name: "JoinRoom";
33
+ readonly I: typeof VoiceRoomIdRequest;
34
+ readonly O: typeof VoiceJoinResponse;
35
+ readonly kind: MethodKind.ServerStreaming;
36
+ };
37
+ readonly raiseHand: {
38
+ readonly name: "RaiseHand";
39
+ readonly I: typeof VoiceRoomIdRequest;
40
+ readonly O: typeof EmptyResponse;
41
+ readonly kind: MethodKind.ServerStreaming;
42
+ };
43
+ readonly lowerHand: {
44
+ readonly name: "LowerHand";
45
+ readonly I: typeof VoiceRoomIdRequest;
46
+ readonly O: typeof EmptyResponse;
47
+ readonly kind: MethodKind.ServerStreaming;
48
+ };
49
+ readonly listHands: {
50
+ readonly name: "ListHands";
51
+ readonly I: typeof VoiceRoomIdRequest;
52
+ readonly O: typeof VoiceHandsResponse;
53
+ readonly kind: MethodKind.ServerStreaming;
54
+ };
55
+ readonly setSpeaker: {
56
+ readonly name: "SetSpeaker";
57
+ readonly I: typeof VoiceSpeakerRequest;
58
+ readonly O: typeof EmptyResponse;
59
+ readonly kind: MethodKind.ServerStreaming;
60
+ };
61
+ readonly removeUserData: {
62
+ readonly name: "RemoveUserData";
63
+ readonly I: typeof ByIdRequest;
64
+ readonly O: typeof EmptyResponse;
65
+ readonly kind: MethodKind.ServerStreaming;
66
+ };
67
+ };
68
+ };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PVoiceService = void 0;
4
+ const general_pb_js_1 = require("../general_pb.js");
5
+ const voice_messages_pb_js_1 = require("./voice_messages_pb.js");
6
+ const protobuf_1 = require("@bufbuild/protobuf");
7
+ exports.PVoiceService = {
8
+ typeName: "micro.v1.voice.PVoiceService",
9
+ methods: {
10
+ listLiveRooms: {
11
+ name: "ListLiveRooms",
12
+ I: general_pb_js_1.EmptyRequest,
13
+ O: voice_messages_pb_js_1.VoiceRoomListResponse,
14
+ kind: protobuf_1.MethodKind.ServerStreaming,
15
+ },
16
+ getRoom: {
17
+ name: "GetRoom",
18
+ I: voice_messages_pb_js_1.VoiceRoomByGroupRequest,
19
+ O: voice_messages_pb_js_1.VoiceRoomResponse,
20
+ kind: protobuf_1.MethodKind.ServerStreaming,
21
+ },
22
+ startRoom: {
23
+ name: "StartRoom",
24
+ I: voice_messages_pb_js_1.VoiceStartRequest,
25
+ O: voice_messages_pb_js_1.VoiceJoinResponse,
26
+ kind: protobuf_1.MethodKind.ServerStreaming,
27
+ },
28
+ endRoom: {
29
+ name: "EndRoom",
30
+ I: voice_messages_pb_js_1.VoiceRoomIdRequest,
31
+ O: general_pb_js_1.EmptyResponse,
32
+ kind: protobuf_1.MethodKind.ServerStreaming,
33
+ },
34
+ joinRoom: {
35
+ name: "JoinRoom",
36
+ I: voice_messages_pb_js_1.VoiceRoomIdRequest,
37
+ O: voice_messages_pb_js_1.VoiceJoinResponse,
38
+ kind: protobuf_1.MethodKind.ServerStreaming,
39
+ },
40
+ raiseHand: {
41
+ name: "RaiseHand",
42
+ I: voice_messages_pb_js_1.VoiceRoomIdRequest,
43
+ O: general_pb_js_1.EmptyResponse,
44
+ kind: protobuf_1.MethodKind.ServerStreaming,
45
+ },
46
+ lowerHand: {
47
+ name: "LowerHand",
48
+ I: voice_messages_pb_js_1.VoiceRoomIdRequest,
49
+ O: general_pb_js_1.EmptyResponse,
50
+ kind: protobuf_1.MethodKind.ServerStreaming,
51
+ },
52
+ listHands: {
53
+ name: "ListHands",
54
+ I: voice_messages_pb_js_1.VoiceRoomIdRequest,
55
+ O: voice_messages_pb_js_1.VoiceHandsResponse,
56
+ kind: protobuf_1.MethodKind.ServerStreaming,
57
+ },
58
+ setSpeaker: {
59
+ name: "SetSpeaker",
60
+ I: voice_messages_pb_js_1.VoiceSpeakerRequest,
61
+ O: general_pb_js_1.EmptyResponse,
62
+ kind: protobuf_1.MethodKind.ServerStreaming,
63
+ },
64
+ removeUserData: {
65
+ name: "RemoveUserData",
66
+ I: general_pb_js_1.ByIdRequest,
67
+ O: general_pb_js_1.EmptyResponse,
68
+ kind: protobuf_1.MethodKind.ServerStreaming,
69
+ },
70
+ }
71
+ };
@@ -0,0 +1,32 @@
1
+ import type { Metadata } from "@grpc/grpc-js";
2
+ import { Observable } from "rxjs";
3
+ import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_nest";
4
+ import { VoiceHandsResponse, VoiceJoinResponse, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_nest";
5
+ export declare const protobufPackage = "micro.v1.voice";
6
+ export declare const MICRO_V1_VOICE_PACKAGE_NAME = "micro.v1.voice";
7
+ export interface PVoiceServiceClient {
8
+ listLiveRooms(request: EmptyRequest, metadata?: Metadata): Observable<VoiceRoomListResponse>;
9
+ getRoom(request: VoiceRoomByGroupRequest, metadata?: Metadata): Observable<VoiceRoomResponse>;
10
+ startRoom(request: VoiceStartRequest, metadata?: Metadata): Observable<VoiceJoinResponse>;
11
+ endRoom(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
12
+ joinRoom(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceJoinResponse>;
13
+ raiseHand(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
14
+ lowerHand(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
15
+ listHands(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceHandsResponse>;
16
+ setSpeaker(request: VoiceSpeakerRequest, metadata?: Metadata): Observable<EmptyResponse>;
17
+ removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
18
+ }
19
+ export interface PVoiceServiceController {
20
+ listLiveRooms(request: EmptyRequest, metadata?: Metadata): Observable<VoiceRoomListResponse>;
21
+ getRoom(request: VoiceRoomByGroupRequest, metadata?: Metadata): Observable<VoiceRoomResponse>;
22
+ startRoom(request: VoiceStartRequest, metadata?: Metadata): Observable<VoiceJoinResponse>;
23
+ endRoom(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
24
+ joinRoom(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceJoinResponse>;
25
+ raiseHand(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
26
+ lowerHand(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
27
+ listHands(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceHandsResponse>;
28
+ setSpeaker(request: VoiceSpeakerRequest, metadata?: Metadata): Observable<EmptyResponse>;
29
+ removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
30
+ }
31
+ export declare function PVoiceServiceControllerMethods(): (constructor: Function) => void;
32
+ export declare const P_VOICE_SERVICE_NAME = "PVoiceService";
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.P_VOICE_SERVICE_NAME = exports.MICRO_V1_VOICE_PACKAGE_NAME = exports.protobufPackage = void 0;
4
+ exports.PVoiceServiceControllerMethods = PVoiceServiceControllerMethods;
5
+ const microservices_1 = require("@nestjs/microservices");
6
+ exports.protobufPackage = "micro.v1.voice";
7
+ exports.MICRO_V1_VOICE_PACKAGE_NAME = "micro.v1.voice";
8
+ function PVoiceServiceControllerMethods() {
9
+ return function (constructor) {
10
+ const grpcMethods = [
11
+ "listLiveRooms",
12
+ "getRoom",
13
+ "startRoom",
14
+ "endRoom",
15
+ "joinRoom",
16
+ "raiseHand",
17
+ "lowerHand",
18
+ "listHands",
19
+ "setSpeaker",
20
+ "removeUserData",
21
+ ];
22
+ for (const method of grpcMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcMethod)("PVoiceService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ const grpcStreamMethods = [];
27
+ for (const method of grpcStreamMethods) {
28
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
29
+ (0, microservices_1.GrpcStreamMethod)("PVoiceService", method)(constructor.prototype[method], method, descriptor);
30
+ }
31
+ };
32
+ }
33
+ exports.P_VOICE_SERVICE_NAME = "PVoiceService";
@@ -0,0 +1,60 @@
1
+ import { ResponseStatus } from "../general_nest";
2
+ export declare const protobufPackage = "micro.v1.voice";
3
+ export interface VoiceRoom {
4
+ id: string;
5
+ group_id: string;
6
+ group_slug: string;
7
+ group_name: string;
8
+ title: string;
9
+ host_user_id: string;
10
+ host_username: string;
11
+ status: string;
12
+ listener_count: number;
13
+ speaker_count: number;
14
+ peak_listeners: number;
15
+ started_at: string;
16
+ ended_at: string;
17
+ livekit_room: string;
18
+ }
19
+ export interface VoiceRoomByGroupRequest {
20
+ group_slug: string;
21
+ }
22
+ export interface VoiceRoomIdRequest {
23
+ room_id: string;
24
+ }
25
+ export interface VoiceStartRequest {
26
+ group_slug: string;
27
+ title: string;
28
+ }
29
+ export interface VoiceRoomResponse {
30
+ status: ResponseStatus | undefined;
31
+ room?: VoiceRoom | undefined;
32
+ }
33
+ export interface VoiceRoomListResponse {
34
+ status: ResponseStatus | undefined;
35
+ rooms: VoiceRoom[];
36
+ }
37
+ export interface VoiceJoinResponse {
38
+ status: ResponseStatus | undefined;
39
+ token: string;
40
+ url: string;
41
+ room?: VoiceRoom | undefined;
42
+ role: string;
43
+ expires_in: number;
44
+ }
45
+ export interface VoiceSpeakerRequest {
46
+ room_id: string;
47
+ user_id: string;
48
+ action: string;
49
+ }
50
+ export interface VoiceHand {
51
+ user_id: string;
52
+ username: string;
53
+ avatar_id: string;
54
+ raised_at: string;
55
+ }
56
+ export interface VoiceHandsResponse {
57
+ status: ResponseStatus | undefined;
58
+ hands: VoiceHand[];
59
+ }
60
+ export declare const MICRO_V1_VOICE_PACKAGE_NAME = "micro.v1.voice";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MICRO_V1_VOICE_PACKAGE_NAME = exports.protobufPackage = void 0;
4
+ exports.protobufPackage = "micro.v1.voice";
5
+ exports.MICRO_V1_VOICE_PACKAGE_NAME = "micro.v1.voice";
@@ -0,0 +1,140 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ import { ResponseStatus } from "../general_pb.js";
4
+ export declare class VoiceRoom extends Message<VoiceRoom> {
5
+ id: string;
6
+ groupId: string;
7
+ groupSlug: string;
8
+ groupName: string;
9
+ title: string;
10
+ hostUserId: string;
11
+ hostUsername: string;
12
+ status: string;
13
+ listenerCount: number;
14
+ speakerCount: number;
15
+ peakListeners: number;
16
+ startedAt: string;
17
+ endedAt: string;
18
+ livekitRoom: string;
19
+ constructor(data?: PartialMessage<VoiceRoom>);
20
+ static readonly runtime: typeof proto3;
21
+ static readonly typeName = "micro.v1.voice.VoiceRoom";
22
+ static readonly fields: FieldList;
23
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRoom;
24
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRoom;
25
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRoom;
26
+ static equals(a: VoiceRoom | PlainMessage<VoiceRoom> | undefined, b: VoiceRoom | PlainMessage<VoiceRoom> | undefined): boolean;
27
+ }
28
+ export declare class VoiceRoomByGroupRequest extends Message<VoiceRoomByGroupRequest> {
29
+ groupSlug: string;
30
+ constructor(data?: PartialMessage<VoiceRoomByGroupRequest>);
31
+ static readonly runtime: typeof proto3;
32
+ static readonly typeName = "micro.v1.voice.VoiceRoomByGroupRequest";
33
+ static readonly fields: FieldList;
34
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRoomByGroupRequest;
35
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRoomByGroupRequest;
36
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRoomByGroupRequest;
37
+ static equals(a: VoiceRoomByGroupRequest | PlainMessage<VoiceRoomByGroupRequest> | undefined, b: VoiceRoomByGroupRequest | PlainMessage<VoiceRoomByGroupRequest> | undefined): boolean;
38
+ }
39
+ export declare class VoiceRoomIdRequest extends Message<VoiceRoomIdRequest> {
40
+ roomId: string;
41
+ constructor(data?: PartialMessage<VoiceRoomIdRequest>);
42
+ static readonly runtime: typeof proto3;
43
+ static readonly typeName = "micro.v1.voice.VoiceRoomIdRequest";
44
+ static readonly fields: FieldList;
45
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRoomIdRequest;
46
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRoomIdRequest;
47
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRoomIdRequest;
48
+ static equals(a: VoiceRoomIdRequest | PlainMessage<VoiceRoomIdRequest> | undefined, b: VoiceRoomIdRequest | PlainMessage<VoiceRoomIdRequest> | undefined): boolean;
49
+ }
50
+ export declare class VoiceStartRequest extends Message<VoiceStartRequest> {
51
+ groupSlug: string;
52
+ title: string;
53
+ constructor(data?: PartialMessage<VoiceStartRequest>);
54
+ static readonly runtime: typeof proto3;
55
+ static readonly typeName = "micro.v1.voice.VoiceStartRequest";
56
+ static readonly fields: FieldList;
57
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceStartRequest;
58
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceStartRequest;
59
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceStartRequest;
60
+ static equals(a: VoiceStartRequest | PlainMessage<VoiceStartRequest> | undefined, b: VoiceStartRequest | PlainMessage<VoiceStartRequest> | undefined): boolean;
61
+ }
62
+ export declare class VoiceRoomResponse extends Message<VoiceRoomResponse> {
63
+ status?: ResponseStatus;
64
+ room?: VoiceRoom;
65
+ constructor(data?: PartialMessage<VoiceRoomResponse>);
66
+ static readonly runtime: typeof proto3;
67
+ static readonly typeName = "micro.v1.voice.VoiceRoomResponse";
68
+ static readonly fields: FieldList;
69
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRoomResponse;
70
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRoomResponse;
71
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRoomResponse;
72
+ static equals(a: VoiceRoomResponse | PlainMessage<VoiceRoomResponse> | undefined, b: VoiceRoomResponse | PlainMessage<VoiceRoomResponse> | undefined): boolean;
73
+ }
74
+ export declare class VoiceRoomListResponse extends Message<VoiceRoomListResponse> {
75
+ status?: ResponseStatus;
76
+ rooms: VoiceRoom[];
77
+ constructor(data?: PartialMessage<VoiceRoomListResponse>);
78
+ static readonly runtime: typeof proto3;
79
+ static readonly typeName = "micro.v1.voice.VoiceRoomListResponse";
80
+ static readonly fields: FieldList;
81
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRoomListResponse;
82
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRoomListResponse;
83
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRoomListResponse;
84
+ static equals(a: VoiceRoomListResponse | PlainMessage<VoiceRoomListResponse> | undefined, b: VoiceRoomListResponse | PlainMessage<VoiceRoomListResponse> | undefined): boolean;
85
+ }
86
+ export declare class VoiceJoinResponse extends Message<VoiceJoinResponse> {
87
+ status?: ResponseStatus;
88
+ token: string;
89
+ url: string;
90
+ room?: VoiceRoom;
91
+ role: string;
92
+ expiresIn: number;
93
+ constructor(data?: PartialMessage<VoiceJoinResponse>);
94
+ static readonly runtime: typeof proto3;
95
+ static readonly typeName = "micro.v1.voice.VoiceJoinResponse";
96
+ static readonly fields: FieldList;
97
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceJoinResponse;
98
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceJoinResponse;
99
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceJoinResponse;
100
+ static equals(a: VoiceJoinResponse | PlainMessage<VoiceJoinResponse> | undefined, b: VoiceJoinResponse | PlainMessage<VoiceJoinResponse> | undefined): boolean;
101
+ }
102
+ export declare class VoiceSpeakerRequest extends Message<VoiceSpeakerRequest> {
103
+ roomId: string;
104
+ userId: string;
105
+ action: string;
106
+ constructor(data?: PartialMessage<VoiceSpeakerRequest>);
107
+ static readonly runtime: typeof proto3;
108
+ static readonly typeName = "micro.v1.voice.VoiceSpeakerRequest";
109
+ static readonly fields: FieldList;
110
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceSpeakerRequest;
111
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceSpeakerRequest;
112
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceSpeakerRequest;
113
+ static equals(a: VoiceSpeakerRequest | PlainMessage<VoiceSpeakerRequest> | undefined, b: VoiceSpeakerRequest | PlainMessage<VoiceSpeakerRequest> | undefined): boolean;
114
+ }
115
+ export declare class VoiceHand extends Message<VoiceHand> {
116
+ userId: string;
117
+ username: string;
118
+ avatarId: string;
119
+ raisedAt: string;
120
+ constructor(data?: PartialMessage<VoiceHand>);
121
+ static readonly runtime: typeof proto3;
122
+ static readonly typeName = "micro.v1.voice.VoiceHand";
123
+ static readonly fields: FieldList;
124
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceHand;
125
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceHand;
126
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceHand;
127
+ static equals(a: VoiceHand | PlainMessage<VoiceHand> | undefined, b: VoiceHand | PlainMessage<VoiceHand> | undefined): boolean;
128
+ }
129
+ export declare class VoiceHandsResponse extends Message<VoiceHandsResponse> {
130
+ status?: ResponseStatus;
131
+ hands: VoiceHand[];
132
+ constructor(data?: PartialMessage<VoiceHandsResponse>);
133
+ static readonly runtime: typeof proto3;
134
+ static readonly typeName = "micro.v1.voice.VoiceHandsResponse";
135
+ static readonly fields: FieldList;
136
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceHandsResponse;
137
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceHandsResponse;
138
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceHandsResponse;
139
+ static equals(a: VoiceHandsResponse | PlainMessage<VoiceHandsResponse> | undefined, b: VoiceHandsResponse | PlainMessage<VoiceHandsResponse> | undefined): boolean;
140
+ }
@@ -0,0 +1,309 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VoiceHandsResponse = exports.VoiceHand = exports.VoiceSpeakerRequest = exports.VoiceJoinResponse = exports.VoiceRoomListResponse = exports.VoiceRoomResponse = exports.VoiceStartRequest = exports.VoiceRoomIdRequest = exports.VoiceRoomByGroupRequest = exports.VoiceRoom = void 0;
4
+ const protobuf_1 = require("@bufbuild/protobuf");
5
+ const general_pb_js_1 = require("../general_pb.js");
6
+ class VoiceRoom extends protobuf_1.Message {
7
+ id = "";
8
+ groupId = "";
9
+ groupSlug = "";
10
+ groupName = "";
11
+ title = "";
12
+ hostUserId = "";
13
+ hostUsername = "";
14
+ status = "";
15
+ listenerCount = 0;
16
+ speakerCount = 0;
17
+ peakListeners = 0;
18
+ startedAt = "";
19
+ endedAt = "";
20
+ livekitRoom = "";
21
+ constructor(data) {
22
+ super();
23
+ protobuf_1.proto3.util.initPartial(data, this);
24
+ }
25
+ static runtime = protobuf_1.proto3;
26
+ static typeName = "micro.v1.voice.VoiceRoom";
27
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
28
+ { no: 1, name: "id", kind: "scalar", T: 9 },
29
+ { no: 2, name: "group_id", kind: "scalar", T: 9 },
30
+ { no: 3, name: "group_slug", kind: "scalar", T: 9 },
31
+ { no: 4, name: "group_name", kind: "scalar", T: 9 },
32
+ { no: 5, name: "title", kind: "scalar", T: 9 },
33
+ { no: 6, name: "host_user_id", kind: "scalar", T: 9 },
34
+ { no: 7, name: "host_username", kind: "scalar", T: 9 },
35
+ { no: 8, name: "status", kind: "scalar", T: 9 },
36
+ { no: 9, name: "listener_count", kind: "scalar", T: 5 },
37
+ { no: 10, name: "speaker_count", kind: "scalar", T: 5 },
38
+ { no: 11, name: "peak_listeners", kind: "scalar", T: 5 },
39
+ { no: 12, name: "started_at", kind: "scalar", T: 9 },
40
+ { no: 13, name: "ended_at", kind: "scalar", T: 9 },
41
+ { no: 14, name: "livekit_room", kind: "scalar", T: 9 },
42
+ ]);
43
+ static fromBinary(bytes, options) {
44
+ return new VoiceRoom().fromBinary(bytes, options);
45
+ }
46
+ static fromJson(jsonValue, options) {
47
+ return new VoiceRoom().fromJson(jsonValue, options);
48
+ }
49
+ static fromJsonString(jsonString, options) {
50
+ return new VoiceRoom().fromJsonString(jsonString, options);
51
+ }
52
+ static equals(a, b) {
53
+ return protobuf_1.proto3.util.equals(VoiceRoom, a, b);
54
+ }
55
+ }
56
+ exports.VoiceRoom = VoiceRoom;
57
+ class VoiceRoomByGroupRequest extends protobuf_1.Message {
58
+ groupSlug = "";
59
+ constructor(data) {
60
+ super();
61
+ protobuf_1.proto3.util.initPartial(data, this);
62
+ }
63
+ static runtime = protobuf_1.proto3;
64
+ static typeName = "micro.v1.voice.VoiceRoomByGroupRequest";
65
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
66
+ { no: 1, name: "group_slug", kind: "scalar", T: 9 },
67
+ ]);
68
+ static fromBinary(bytes, options) {
69
+ return new VoiceRoomByGroupRequest().fromBinary(bytes, options);
70
+ }
71
+ static fromJson(jsonValue, options) {
72
+ return new VoiceRoomByGroupRequest().fromJson(jsonValue, options);
73
+ }
74
+ static fromJsonString(jsonString, options) {
75
+ return new VoiceRoomByGroupRequest().fromJsonString(jsonString, options);
76
+ }
77
+ static equals(a, b) {
78
+ return protobuf_1.proto3.util.equals(VoiceRoomByGroupRequest, a, b);
79
+ }
80
+ }
81
+ exports.VoiceRoomByGroupRequest = VoiceRoomByGroupRequest;
82
+ class VoiceRoomIdRequest extends protobuf_1.Message {
83
+ roomId = "";
84
+ constructor(data) {
85
+ super();
86
+ protobuf_1.proto3.util.initPartial(data, this);
87
+ }
88
+ static runtime = protobuf_1.proto3;
89
+ static typeName = "micro.v1.voice.VoiceRoomIdRequest";
90
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
91
+ { no: 1, name: "room_id", kind: "scalar", T: 9 },
92
+ ]);
93
+ static fromBinary(bytes, options) {
94
+ return new VoiceRoomIdRequest().fromBinary(bytes, options);
95
+ }
96
+ static fromJson(jsonValue, options) {
97
+ return new VoiceRoomIdRequest().fromJson(jsonValue, options);
98
+ }
99
+ static fromJsonString(jsonString, options) {
100
+ return new VoiceRoomIdRequest().fromJsonString(jsonString, options);
101
+ }
102
+ static equals(a, b) {
103
+ return protobuf_1.proto3.util.equals(VoiceRoomIdRequest, a, b);
104
+ }
105
+ }
106
+ exports.VoiceRoomIdRequest = VoiceRoomIdRequest;
107
+ class VoiceStartRequest extends protobuf_1.Message {
108
+ groupSlug = "";
109
+ title = "";
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.voice.VoiceStartRequest";
116
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
117
+ { no: 1, name: "group_slug", kind: "scalar", T: 9 },
118
+ { no: 2, name: "title", kind: "scalar", T: 9 },
119
+ ]);
120
+ static fromBinary(bytes, options) {
121
+ return new VoiceStartRequest().fromBinary(bytes, options);
122
+ }
123
+ static fromJson(jsonValue, options) {
124
+ return new VoiceStartRequest().fromJson(jsonValue, options);
125
+ }
126
+ static fromJsonString(jsonString, options) {
127
+ return new VoiceStartRequest().fromJsonString(jsonString, options);
128
+ }
129
+ static equals(a, b) {
130
+ return protobuf_1.proto3.util.equals(VoiceStartRequest, a, b);
131
+ }
132
+ }
133
+ exports.VoiceStartRequest = VoiceStartRequest;
134
+ class VoiceRoomResponse extends protobuf_1.Message {
135
+ status;
136
+ room;
137
+ constructor(data) {
138
+ super();
139
+ protobuf_1.proto3.util.initPartial(data, this);
140
+ }
141
+ static runtime = protobuf_1.proto3;
142
+ static typeName = "micro.v1.voice.VoiceRoomResponse";
143
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
144
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
145
+ { no: 2, name: "room", kind: "message", T: VoiceRoom, opt: true },
146
+ ]);
147
+ static fromBinary(bytes, options) {
148
+ return new VoiceRoomResponse().fromBinary(bytes, options);
149
+ }
150
+ static fromJson(jsonValue, options) {
151
+ return new VoiceRoomResponse().fromJson(jsonValue, options);
152
+ }
153
+ static fromJsonString(jsonString, options) {
154
+ return new VoiceRoomResponse().fromJsonString(jsonString, options);
155
+ }
156
+ static equals(a, b) {
157
+ return protobuf_1.proto3.util.equals(VoiceRoomResponse, a, b);
158
+ }
159
+ }
160
+ exports.VoiceRoomResponse = VoiceRoomResponse;
161
+ class VoiceRoomListResponse extends protobuf_1.Message {
162
+ status;
163
+ rooms = [];
164
+ constructor(data) {
165
+ super();
166
+ protobuf_1.proto3.util.initPartial(data, this);
167
+ }
168
+ static runtime = protobuf_1.proto3;
169
+ static typeName = "micro.v1.voice.VoiceRoomListResponse";
170
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
171
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
172
+ { no: 2, name: "rooms", kind: "message", T: VoiceRoom, repeated: true },
173
+ ]);
174
+ static fromBinary(bytes, options) {
175
+ return new VoiceRoomListResponse().fromBinary(bytes, options);
176
+ }
177
+ static fromJson(jsonValue, options) {
178
+ return new VoiceRoomListResponse().fromJson(jsonValue, options);
179
+ }
180
+ static fromJsonString(jsonString, options) {
181
+ return new VoiceRoomListResponse().fromJsonString(jsonString, options);
182
+ }
183
+ static equals(a, b) {
184
+ return protobuf_1.proto3.util.equals(VoiceRoomListResponse, a, b);
185
+ }
186
+ }
187
+ exports.VoiceRoomListResponse = VoiceRoomListResponse;
188
+ class VoiceJoinResponse extends protobuf_1.Message {
189
+ status;
190
+ token = "";
191
+ url = "";
192
+ room;
193
+ role = "";
194
+ expiresIn = 0;
195
+ constructor(data) {
196
+ super();
197
+ protobuf_1.proto3.util.initPartial(data, this);
198
+ }
199
+ static runtime = protobuf_1.proto3;
200
+ static typeName = "micro.v1.voice.VoiceJoinResponse";
201
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
202
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
203
+ { no: 2, name: "token", kind: "scalar", T: 9 },
204
+ { no: 3, name: "url", kind: "scalar", T: 9 },
205
+ { no: 4, name: "room", kind: "message", T: VoiceRoom, opt: true },
206
+ { no: 5, name: "role", kind: "scalar", T: 9 },
207
+ { no: 6, name: "expires_in", kind: "scalar", T: 5 },
208
+ ]);
209
+ static fromBinary(bytes, options) {
210
+ return new VoiceJoinResponse().fromBinary(bytes, options);
211
+ }
212
+ static fromJson(jsonValue, options) {
213
+ return new VoiceJoinResponse().fromJson(jsonValue, options);
214
+ }
215
+ static fromJsonString(jsonString, options) {
216
+ return new VoiceJoinResponse().fromJsonString(jsonString, options);
217
+ }
218
+ static equals(a, b) {
219
+ return protobuf_1.proto3.util.equals(VoiceJoinResponse, a, b);
220
+ }
221
+ }
222
+ exports.VoiceJoinResponse = VoiceJoinResponse;
223
+ class VoiceSpeakerRequest extends protobuf_1.Message {
224
+ roomId = "";
225
+ userId = "";
226
+ action = "";
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.voice.VoiceSpeakerRequest";
233
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
234
+ { no: 1, name: "room_id", kind: "scalar", T: 9 },
235
+ { no: 2, name: "user_id", kind: "scalar", T: 9 },
236
+ { no: 3, name: "action", kind: "scalar", T: 9 },
237
+ ]);
238
+ static fromBinary(bytes, options) {
239
+ return new VoiceSpeakerRequest().fromBinary(bytes, options);
240
+ }
241
+ static fromJson(jsonValue, options) {
242
+ return new VoiceSpeakerRequest().fromJson(jsonValue, options);
243
+ }
244
+ static fromJsonString(jsonString, options) {
245
+ return new VoiceSpeakerRequest().fromJsonString(jsonString, options);
246
+ }
247
+ static equals(a, b) {
248
+ return protobuf_1.proto3.util.equals(VoiceSpeakerRequest, a, b);
249
+ }
250
+ }
251
+ exports.VoiceSpeakerRequest = VoiceSpeakerRequest;
252
+ class VoiceHand extends protobuf_1.Message {
253
+ userId = "";
254
+ username = "";
255
+ avatarId = "";
256
+ raisedAt = "";
257
+ constructor(data) {
258
+ super();
259
+ protobuf_1.proto3.util.initPartial(data, this);
260
+ }
261
+ static runtime = protobuf_1.proto3;
262
+ static typeName = "micro.v1.voice.VoiceHand";
263
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
264
+ { no: 1, name: "user_id", kind: "scalar", T: 9 },
265
+ { no: 2, name: "username", kind: "scalar", T: 9 },
266
+ { no: 3, name: "avatar_id", kind: "scalar", T: 9 },
267
+ { no: 4, name: "raised_at", kind: "scalar", T: 9 },
268
+ ]);
269
+ static fromBinary(bytes, options) {
270
+ return new VoiceHand().fromBinary(bytes, options);
271
+ }
272
+ static fromJson(jsonValue, options) {
273
+ return new VoiceHand().fromJson(jsonValue, options);
274
+ }
275
+ static fromJsonString(jsonString, options) {
276
+ return new VoiceHand().fromJsonString(jsonString, options);
277
+ }
278
+ static equals(a, b) {
279
+ return protobuf_1.proto3.util.equals(VoiceHand, a, b);
280
+ }
281
+ }
282
+ exports.VoiceHand = VoiceHand;
283
+ class VoiceHandsResponse extends protobuf_1.Message {
284
+ status;
285
+ hands = [];
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.voice.VoiceHandsResponse";
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: "hands", kind: "message", T: VoiceHand, repeated: true },
295
+ ]);
296
+ static fromBinary(bytes, options) {
297
+ return new VoiceHandsResponse().fromBinary(bytes, options);
298
+ }
299
+ static fromJson(jsonValue, options) {
300
+ return new VoiceHandsResponse().fromJson(jsonValue, options);
301
+ }
302
+ static fromJsonString(jsonString, options) {
303
+ return new VoiceHandsResponse().fromJsonString(jsonString, options);
304
+ }
305
+ static equals(a, b) {
306
+ return protobuf_1.proto3.util.equals(VoiceHandsResponse, a, b);
307
+ }
308
+ }
309
+ exports.VoiceHandsResponse = VoiceHandsResponse;
@@ -8,6 +8,7 @@ export declare const EDUCATION_MICRO = "EDUCATION_MICRO";
8
8
  export declare const PUPPETEER_MICRO = "PUPPETEER_MICRO";
9
9
  export declare const MEDIA_MICRO = "MEDIA_MICRO";
10
10
  export declare const CHAT_MICRO = "CHAT_MICRO";
11
+ export declare const VOICE_MICRO = "VOICE_MICRO";
11
12
  export declare const X_INTERNAL_HASH = "x-internal-hash";
12
13
  export declare const FILTER_SEPARATOR = "_|_";
13
14
  export declare const KAFKA_KEYS: {
@@ -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.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.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';
@@ -11,6 +11,7 @@ exports.EDUCATION_MICRO = 'EDUCATION_MICRO';
11
11
  exports.PUPPETEER_MICRO = 'PUPPETEER_MICRO';
12
12
  exports.MEDIA_MICRO = 'MEDIA_MICRO';
13
13
  exports.CHAT_MICRO = 'CHAT_MICRO';
14
+ exports.VOICE_MICRO = 'VOICE_MICRO';
14
15
  exports.X_INTERNAL_HASH = 'x-internal-hash';
15
16
  exports.FILTER_SEPARATOR = '_|_';
16
17
  exports.KAFKA_KEYS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.86",
3
+ "version": "1.1.88",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -182,6 +182,10 @@ message ChatMediaUploadRequest {
182
182
  string kind = 2;
183
183
  bytes data = 3;
184
184
  string mimetype = 4;
185
+ // kind=video only: a still frame the sender's device took from the clip
186
+ // (JPEG). Stored as the media thumbnail; empty when the app could not
187
+ // produce one, in which case the video shows a plain play tile.
188
+ bytes poster = 5;
185
189
  }
186
190
 
187
191
  message ChatMediaUploadResponse {
@@ -554,3 +558,24 @@ message ReviewReportRequest {
554
558
  // reviewed | dismissed
555
559
  string status = 2;
556
560
  }
561
+
562
+ // Answer for the voice service: may this user enter the group's audio room,
563
+ // and in what capacity. Drawn from the same roles, per-group moderator
564
+ // override and sanctions that govern the text room, so the two can never
565
+ // disagree.
566
+ message VoiceAccessResponse {
567
+ ResponseStatus status = 1;
568
+ // May enter and listen: a member with no ban in force.
569
+ bool can_listen = 2;
570
+ // May open and run a room: staff or a full moderator of the group.
571
+ bool can_host = 3;
572
+ // May ask for the floor: listens and has no mute in force.
573
+ bool can_raise_hand = 4;
574
+ string username = 5;
575
+ string avatar_id = 6;
576
+ string role = 7;
577
+ // When can_listen is false: not_verified | not_found | join_required | banned
578
+ string reason = 8;
579
+ string group_id = 9;
580
+ string group_name = 10;
581
+ }
@@ -17,6 +17,8 @@ service PChatService {
17
17
  rpc GroupMedia(GroupMediaRequest) returns(stream GroupMediaResponse) {}
18
18
  rpc GroupStats(GroupStatsRequest) returns(stream GroupStatsResponse) {}
19
19
  rpc GifSearch(GifSearchRequest) returns(stream GifSearchResponse) {}
20
+ // Voice rooms ask here before signing a LiveKit token.
21
+ rpc VoiceAccess(GroupBySlugRequest) returns(stream VoiceAccessResponse) {}
20
22
  rpc GetGroupPhoto(ByIdRequest) returns(stream GroupPhotoResponse) {}
21
23
  // Authed upload (staging row); the send then references media_id.
22
24
  rpc UploadChatMedia(ChatMediaUploadRequest) returns(stream ChatMediaUploadResponse) {}
@@ -0,0 +1,25 @@
1
+ syntax = "proto3";
2
+
3
+ package micro.v1.voice;
4
+
5
+ import "micro/v1/general.proto";
6
+ import "micro/v1/voice/voice_messages.proto";
7
+
8
+ service PVoiceService {
9
+ // Rooms visible to the caller (live only).
10
+ rpc ListLiveRooms(EmptyRequest) returns(stream VoiceRoomListResponse) {}
11
+ rpc GetRoom(VoiceRoomByGroupRequest) returns(stream VoiceRoomResponse) {}
12
+ // Host: opens the group's room (or returns the live one) with a host token.
13
+ rpc StartRoom(VoiceStartRequest) returns(stream VoiceJoinResponse) {}
14
+ rpc EndRoom(VoiceRoomIdRequest) returns(stream EmptyResponse) {}
15
+ // Anyone allowed in: a listener token.
16
+ rpc JoinRoom(VoiceRoomIdRequest) returns(stream VoiceJoinResponse) {}
17
+ rpc RaiseHand(VoiceRoomIdRequest) returns(stream EmptyResponse) {}
18
+ rpc LowerHand(VoiceRoomIdRequest) returns(stream EmptyResponse) {}
19
+ // Host: who is asking for the floor.
20
+ rpc ListHands(VoiceRoomIdRequest) returns(stream VoiceHandsResponse) {}
21
+ // Host: approve | remove | mute | kick
22
+ rpc SetSpeaker(VoiceSpeakerRequest) returns(stream EmptyResponse) {}
23
+ // Account deletion parity with every other micro.
24
+ rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
25
+ }
@@ -0,0 +1,79 @@
1
+ syntax = "proto3";
2
+
3
+ package micro.v1.voice;
4
+
5
+ import "micro/v1/general.proto";
6
+
7
+ // A live audio room attached to a chat group. Audio itself never passes
8
+ // through our services: participants connect straight to LiveKit with a
9
+ // token this service signs. These messages carry only control and state.
10
+
11
+ message VoiceRoom {
12
+ string id = 1;
13
+ string group_id = 2;
14
+ string group_slug = 3;
15
+ string group_name = 4;
16
+ string title = 5;
17
+ string host_user_id = 6;
18
+ string host_username = 7;
19
+ // live | ended
20
+ string status = 8;
21
+ int32 listener_count = 9;
22
+ int32 speaker_count = 10;
23
+ int32 peak_listeners = 11;
24
+ string started_at = 12;
25
+ string ended_at = 13;
26
+ // LiveKit room name; what the client passes to the SDK.
27
+ string livekit_room = 14;
28
+ }
29
+
30
+ message VoiceRoomByGroupRequest { string group_slug = 1; }
31
+ message VoiceRoomIdRequest { string room_id = 1; }
32
+
33
+ message VoiceStartRequest {
34
+ string group_slug = 1;
35
+ string title = 2;
36
+ }
37
+
38
+ message VoiceRoomResponse {
39
+ ResponseStatus status = 1;
40
+ // Absent when the group has no live room.
41
+ optional VoiceRoom room = 2;
42
+ }
43
+
44
+ message VoiceRoomListResponse {
45
+ ResponseStatus status = 1;
46
+ repeated VoiceRoom rooms = 2;
47
+ }
48
+
49
+ // What a client needs to connect: the signed token, where to connect, and
50
+ // what it is allowed to do. Role is host | speaker | listener.
51
+ message VoiceJoinResponse {
52
+ ResponseStatus status = 1;
53
+ string token = 2;
54
+ string url = 3;
55
+ optional VoiceRoom room = 4;
56
+ string role = 5;
57
+ // Seconds until the token stops being accepted for a NEW connection. An
58
+ // existing connection is never dropped by expiry.
59
+ int32 expires_in = 6;
60
+ }
61
+
62
+ // Host actions on another participant. action: approve | remove | mute | kick
63
+ message VoiceSpeakerRequest {
64
+ string room_id = 1;
65
+ string user_id = 2;
66
+ string action = 3;
67
+ }
68
+
69
+ message VoiceHand {
70
+ string user_id = 1;
71
+ string username = 2;
72
+ string avatar_id = 3;
73
+ string raised_at = 4;
74
+ }
75
+
76
+ message VoiceHandsResponse {
77
+ ResponseStatus status = 1;
78
+ repeated VoiceHand hands = 2;
79
+ }