jr-common-micro 1.1.53 → 1.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proto/micro/v1/chat/chat_messages_nest.d.ts +10 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.d.ts +26 -0
- package/dist/proto/micro/v1/chat/chat_messages_pb.js +59 -1
- package/dist/proto/micro/v1/chat/services_connect.d.ts +20 -2
- package/dist/proto/micro/v1/chat/services_connect.js +18 -0
- package/dist/proto/micro/v1/chat/services_nest.d.ts +8 -2
- package/dist/proto/micro/v1/chat/services_nest.js +3 -0
- package/dist/proto/micro/v1/user/profile_messages_nest.d.ts +9 -0
- package/dist/proto/micro/v1/user/profile_messages_pb.d.ts +25 -0
- package/dist/proto/micro/v1/user/profile_messages_pb.js +57 -1
- package/dist/proto/micro/v1/user/services_connect.d.ts +19 -1
- package/dist/proto/micro/v1/user/services_connect.js +18 -0
- package/dist/proto/micro/v1/user/services_nest.d.ts +7 -1
- package/dist/proto/micro/v1/user/services_nest.js +3 -0
- package/package.json +1 -1
- package/proto/micro/v1/chat/chat_messages.proto +13 -0
- package/proto/micro/v1/chat/services.proto +3 -0
- package/proto/micro/v1/user/profile_messages.proto +12 -0
- package/proto/micro/v1/user/services.proto +3 -0
|
@@ -135,6 +135,16 @@ export interface ChatMemberDto {
|
|
|
135
135
|
is_online: boolean;
|
|
136
136
|
reapplied: boolean;
|
|
137
137
|
}
|
|
138
|
+
export interface GroupPhotoSetRequest {
|
|
139
|
+
id: string;
|
|
140
|
+
data: Buffer;
|
|
141
|
+
mimetype: string;
|
|
142
|
+
}
|
|
143
|
+
export interface GroupPhotoResponse {
|
|
144
|
+
status: ResponseStatus | undefined;
|
|
145
|
+
data: Buffer;
|
|
146
|
+
mimetype: string;
|
|
147
|
+
}
|
|
138
148
|
export interface ChatUserAdminDto {
|
|
139
149
|
user_id: string;
|
|
140
150
|
username: string;
|
|
@@ -320,6 +320,32 @@ export declare class ChatMemberDto extends Message<ChatMemberDto> {
|
|
|
320
320
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMemberDto;
|
|
321
321
|
static equals(a: ChatMemberDto | PlainMessage<ChatMemberDto> | undefined, b: ChatMemberDto | PlainMessage<ChatMemberDto> | undefined): boolean;
|
|
322
322
|
}
|
|
323
|
+
export declare class GroupPhotoSetRequest extends Message<GroupPhotoSetRequest> {
|
|
324
|
+
id: string;
|
|
325
|
+
data: Uint8Array<ArrayBuffer>;
|
|
326
|
+
mimetype: string;
|
|
327
|
+
constructor(data?: PartialMessage<GroupPhotoSetRequest>);
|
|
328
|
+
static readonly runtime: typeof proto3;
|
|
329
|
+
static readonly typeName = "micro.v1.chat.GroupPhotoSetRequest";
|
|
330
|
+
static readonly fields: FieldList;
|
|
331
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupPhotoSetRequest;
|
|
332
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupPhotoSetRequest;
|
|
333
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupPhotoSetRequest;
|
|
334
|
+
static equals(a: GroupPhotoSetRequest | PlainMessage<GroupPhotoSetRequest> | undefined, b: GroupPhotoSetRequest | PlainMessage<GroupPhotoSetRequest> | undefined): boolean;
|
|
335
|
+
}
|
|
336
|
+
export declare class GroupPhotoResponse extends Message<GroupPhotoResponse> {
|
|
337
|
+
status?: ResponseStatus;
|
|
338
|
+
data: Uint8Array<ArrayBuffer>;
|
|
339
|
+
mimetype: string;
|
|
340
|
+
constructor(data?: PartialMessage<GroupPhotoResponse>);
|
|
341
|
+
static readonly runtime: typeof proto3;
|
|
342
|
+
static readonly typeName = "micro.v1.chat.GroupPhotoResponse";
|
|
343
|
+
static readonly fields: FieldList;
|
|
344
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GroupPhotoResponse;
|
|
345
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GroupPhotoResponse;
|
|
346
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GroupPhotoResponse;
|
|
347
|
+
static equals(a: GroupPhotoResponse | PlainMessage<GroupPhotoResponse> | undefined, b: GroupPhotoResponse | PlainMessage<GroupPhotoResponse> | undefined): boolean;
|
|
348
|
+
}
|
|
323
349
|
export declare class ChatUserAdminDto extends Message<ChatUserAdminDto> {
|
|
324
350
|
userId: string;
|
|
325
351
|
username: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.ChatMemberDto = exports.PendingMembersRequest = exports.MemberActionRequest = exports.PinMessageRequest = exports.DeleteMessageRequest = exports.RevokeSanctionRequest = exports.SanctionRequest = exports.GroupUpsertRequest = exports.BlockedUsersResponse = exports.BlockUserRequest = exports.ReportMessageRequest = exports.PinnedMessagesResponse = exports.PinnedMessagesRequest = exports.MessageHistoryResponse = exports.MessageHistoryRequest = exports.ChatReplyPreviewDto = exports.ChatReactionCountDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
|
|
3
|
+
exports.ReviewReportRequest = exports.ReportListResponse = exports.ReportDto = exports.SanctionListResponse = exports.SanctionDto = exports.ChatMemberListResponse = exports.ChatUserAdminListResponse = exports.ChatUserAdminDto = exports.GroupPhotoResponse = exports.GroupPhotoSetRequest = exports.ChatMemberDto = exports.PendingMembersRequest = exports.MemberActionRequest = exports.PinMessageRequest = exports.DeleteMessageRequest = exports.RevokeSanctionRequest = exports.SanctionRequest = exports.GroupUpsertRequest = exports.BlockedUsersResponse = exports.BlockUserRequest = exports.ReportMessageRequest = exports.PinnedMessagesResponse = exports.PinnedMessagesRequest = exports.MessageHistoryResponse = exports.MessageHistoryRequest = exports.ChatReplyPreviewDto = exports.ChatReactionCountDto = exports.ChatMessageDto = exports.ChatGroupSingleResponse = exports.JoinGroupResponse = exports.GroupBySlugRequest = exports.ChatGroupListResponse = exports.ChatGroupDto = void 0;
|
|
4
4
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
5
|
const general_pb_js_1 = require("../general_pb.js");
|
|
6
6
|
class ChatGroupDto extends protobuf_1.Message {
|
|
@@ -710,6 +710,64 @@ class ChatMemberDto extends protobuf_1.Message {
|
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
exports.ChatMemberDto = ChatMemberDto;
|
|
713
|
+
class GroupPhotoSetRequest extends protobuf_1.Message {
|
|
714
|
+
id = "";
|
|
715
|
+
data = new Uint8Array(0);
|
|
716
|
+
mimetype = "";
|
|
717
|
+
constructor(data) {
|
|
718
|
+
super();
|
|
719
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
720
|
+
}
|
|
721
|
+
static runtime = protobuf_1.proto3;
|
|
722
|
+
static typeName = "micro.v1.chat.GroupPhotoSetRequest";
|
|
723
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
724
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
725
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 },
|
|
726
|
+
{ no: 3, name: "mimetype", kind: "scalar", T: 9 },
|
|
727
|
+
]);
|
|
728
|
+
static fromBinary(bytes, options) {
|
|
729
|
+
return new GroupPhotoSetRequest().fromBinary(bytes, options);
|
|
730
|
+
}
|
|
731
|
+
static fromJson(jsonValue, options) {
|
|
732
|
+
return new GroupPhotoSetRequest().fromJson(jsonValue, options);
|
|
733
|
+
}
|
|
734
|
+
static fromJsonString(jsonString, options) {
|
|
735
|
+
return new GroupPhotoSetRequest().fromJsonString(jsonString, options);
|
|
736
|
+
}
|
|
737
|
+
static equals(a, b) {
|
|
738
|
+
return protobuf_1.proto3.util.equals(GroupPhotoSetRequest, a, b);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
exports.GroupPhotoSetRequest = GroupPhotoSetRequest;
|
|
742
|
+
class GroupPhotoResponse extends protobuf_1.Message {
|
|
743
|
+
status;
|
|
744
|
+
data = new Uint8Array(0);
|
|
745
|
+
mimetype = "";
|
|
746
|
+
constructor(data) {
|
|
747
|
+
super();
|
|
748
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
749
|
+
}
|
|
750
|
+
static runtime = protobuf_1.proto3;
|
|
751
|
+
static typeName = "micro.v1.chat.GroupPhotoResponse";
|
|
752
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
753
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
754
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 },
|
|
755
|
+
{ no: 3, name: "mimetype", kind: "scalar", T: 9 },
|
|
756
|
+
]);
|
|
757
|
+
static fromBinary(bytes, options) {
|
|
758
|
+
return new GroupPhotoResponse().fromBinary(bytes, options);
|
|
759
|
+
}
|
|
760
|
+
static fromJson(jsonValue, options) {
|
|
761
|
+
return new GroupPhotoResponse().fromJson(jsonValue, options);
|
|
762
|
+
}
|
|
763
|
+
static fromJsonString(jsonString, options) {
|
|
764
|
+
return new GroupPhotoResponse().fromJsonString(jsonString, options);
|
|
765
|
+
}
|
|
766
|
+
static equals(a, b) {
|
|
767
|
+
return protobuf_1.proto3.util.equals(GroupPhotoResponse, a, b);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
exports.GroupPhotoResponse = GroupPhotoResponse;
|
|
713
771
|
class ChatUserAdminDto extends protobuf_1.Message {
|
|
714
772
|
userId = "";
|
|
715
773
|
username = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
|
|
2
|
-
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_pb.js";
|
|
1
|
+
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
|
|
2
|
+
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupPhotoResponse, GroupPhotoSetRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } 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";
|
|
@@ -46,6 +46,12 @@ export declare const PChatService: {
|
|
|
46
46
|
readonly O: typeof ChatMemberListResponse;
|
|
47
47
|
readonly kind: MethodKind.ServerStreaming;
|
|
48
48
|
};
|
|
49
|
+
readonly getGroupPhoto: {
|
|
50
|
+
readonly name: "GetGroupPhoto";
|
|
51
|
+
readonly I: typeof ByIdRequest;
|
|
52
|
+
readonly O: typeof GroupPhotoResponse;
|
|
53
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
54
|
+
};
|
|
49
55
|
readonly reportMessage: {
|
|
50
56
|
readonly name: "ReportMessage";
|
|
51
57
|
readonly I: typeof ReportMessageRequest;
|
|
@@ -99,6 +105,18 @@ export declare const PChatModerationService: {
|
|
|
99
105
|
readonly O: typeof ChatUserAdminListResponse;
|
|
100
106
|
readonly kind: MethodKind.ServerStreaming;
|
|
101
107
|
};
|
|
108
|
+
readonly setGroupPhoto: {
|
|
109
|
+
readonly name: "SetGroupPhoto";
|
|
110
|
+
readonly I: typeof GroupPhotoSetRequest;
|
|
111
|
+
readonly O: typeof EmptyResponse;
|
|
112
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
113
|
+
};
|
|
114
|
+
readonly deleteGroupPhoto: {
|
|
115
|
+
readonly name: "DeleteGroupPhoto";
|
|
116
|
+
readonly I: typeof ByIdRequest;
|
|
117
|
+
readonly O: typeof EmptyResponse;
|
|
118
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
119
|
+
};
|
|
102
120
|
readonly applySanction: {
|
|
103
121
|
readonly name: "ApplySanction";
|
|
104
122
|
readonly I: typeof SanctionRequest;
|
|
@@ -49,6 +49,12 @@ exports.PChatService = {
|
|
|
49
49
|
O: chat_messages_pb_js_1.ChatMemberListResponse,
|
|
50
50
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
51
51
|
},
|
|
52
|
+
getGroupPhoto: {
|
|
53
|
+
name: "GetGroupPhoto",
|
|
54
|
+
I: general_pb_js_1.ByIdRequest,
|
|
55
|
+
O: chat_messages_pb_js_1.GroupPhotoResponse,
|
|
56
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
57
|
+
},
|
|
52
58
|
reportMessage: {
|
|
53
59
|
name: "ReportMessage",
|
|
54
60
|
I: chat_messages_pb_js_1.ReportMessageRequest,
|
|
@@ -102,6 +108,18 @@ exports.PChatModerationService = {
|
|
|
102
108
|
O: chat_messages_pb_js_1.ChatUserAdminListResponse,
|
|
103
109
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
104
110
|
},
|
|
111
|
+
setGroupPhoto: {
|
|
112
|
+
name: "SetGroupPhoto",
|
|
113
|
+
I: chat_messages_pb_js_1.GroupPhotoSetRequest,
|
|
114
|
+
O: general_pb_js_1.EmptyResponse,
|
|
115
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
116
|
+
},
|
|
117
|
+
deleteGroupPhoto: {
|
|
118
|
+
name: "DeleteGroupPhoto",
|
|
119
|
+
I: general_pb_js_1.ByIdRequest,
|
|
120
|
+
O: general_pb_js_1.EmptyResponse,
|
|
121
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
122
|
+
},
|
|
105
123
|
applySanction: {
|
|
106
124
|
name: "ApplySanction",
|
|
107
125
|
I: chat_messages_pb_js_1.SanctionRequest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "@grpc/grpc-js";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import { EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
|
|
4
|
-
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } from "./chat_messages_nest";
|
|
3
|
+
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
|
|
4
|
+
import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMemberListResponse, ChatUserAdminListResponse, DeleteMessageRequest, GroupBySlugRequest, GroupPhotoResponse, GroupPhotoSetRequest, GroupUpsertRequest, JoinGroupResponse, MemberActionRequest, MessageHistoryRequest, MessageHistoryResponse, PendingMembersRequest, PinMessageRequest, PinnedMessagesRequest, PinnedMessagesResponse, ReportListResponse, ReportMessageRequest, ReviewReportRequest, RevokeSanctionRequest, SanctionListResponse, SanctionRequest } 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 {
|
|
@@ -12,6 +12,7 @@ export interface PChatServiceClient {
|
|
|
12
12
|
messageHistory(request: MessageHistoryRequest, metadata?: Metadata): Observable<MessageHistoryResponse>;
|
|
13
13
|
pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
|
|
14
14
|
listMembers(request: GroupBySlugRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
|
|
15
|
+
getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
|
|
15
16
|
reportMessage(request: ReportMessageRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
16
17
|
blockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
17
18
|
unblockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
@@ -25,6 +26,7 @@ export interface PChatServiceController {
|
|
|
25
26
|
messageHistory(request: MessageHistoryRequest, metadata?: Metadata): Observable<MessageHistoryResponse>;
|
|
26
27
|
pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
|
|
27
28
|
listMembers(request: GroupBySlugRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
|
|
29
|
+
getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
|
|
28
30
|
reportMessage(request: ReportMessageRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
29
31
|
blockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
30
32
|
unblockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
@@ -37,6 +39,8 @@ export interface PChatModerationServiceClient {
|
|
|
37
39
|
deleteGroup(request: GroupBySlugRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
38
40
|
adminListGroups(request: EmptyRequest, metadata?: Metadata): Observable<ChatGroupListResponse>;
|
|
39
41
|
adminListUsers(request: PaginateRequest, metadata?: Metadata): Observable<ChatUserAdminListResponse>;
|
|
42
|
+
setGroupPhoto(request: GroupPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
43
|
+
deleteGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
40
44
|
applySanction(request: SanctionRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
41
45
|
revokeSanction(request: RevokeSanctionRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
42
46
|
listSanctions(request: PaginateRequest, metadata?: Metadata): Observable<SanctionListResponse>;
|
|
@@ -52,6 +56,8 @@ export interface PChatModerationServiceController {
|
|
|
52
56
|
deleteGroup(request: GroupBySlugRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
53
57
|
adminListGroups(request: EmptyRequest, metadata?: Metadata): Observable<ChatGroupListResponse>;
|
|
54
58
|
adminListUsers(request: PaginateRequest, metadata?: Metadata): Observable<ChatUserAdminListResponse>;
|
|
59
|
+
setGroupPhoto(request: GroupPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
60
|
+
deleteGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
55
61
|
applySanction(request: SanctionRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
56
62
|
revokeSanction(request: RevokeSanctionRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
57
63
|
listSanctions(request: PaginateRequest, metadata?: Metadata): Observable<SanctionListResponse>;
|
|
@@ -16,6 +16,7 @@ function PChatServiceControllerMethods() {
|
|
|
16
16
|
"messageHistory",
|
|
17
17
|
"pinnedMessages",
|
|
18
18
|
"listMembers",
|
|
19
|
+
"getGroupPhoto",
|
|
19
20
|
"reportMessage",
|
|
20
21
|
"blockUser",
|
|
21
22
|
"unblockUser",
|
|
@@ -40,6 +41,8 @@ function PChatModerationServiceControllerMethods() {
|
|
|
40
41
|
"deleteGroup",
|
|
41
42
|
"adminListGroups",
|
|
42
43
|
"adminListUsers",
|
|
44
|
+
"setGroupPhoto",
|
|
45
|
+
"deleteGroupPhoto",
|
|
43
46
|
"applySanction",
|
|
44
47
|
"revokeSanction",
|
|
45
48
|
"listSanctions",
|
|
@@ -65,4 +65,13 @@ export interface ProfileListResponse {
|
|
|
65
65
|
pagination: PaginationMetaResult | undefined;
|
|
66
66
|
data: ProfileListItemDto[];
|
|
67
67
|
}
|
|
68
|
+
export interface AvatarPhotoSetRequest {
|
|
69
|
+
data: Buffer;
|
|
70
|
+
mimetype: string;
|
|
71
|
+
}
|
|
72
|
+
export interface AvatarPhotoResponse {
|
|
73
|
+
status: ResponseStatus | undefined;
|
|
74
|
+
data: Buffer;
|
|
75
|
+
mimetype: string;
|
|
76
|
+
}
|
|
68
77
|
export declare const MICRO_V1_USER_PACKAGE_NAME = "micro.v1.user";
|
|
@@ -162,3 +162,28 @@ export declare class ProfileListResponse extends Message<ProfileListResponse> {
|
|
|
162
162
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileListResponse;
|
|
163
163
|
static equals(a: ProfileListResponse | PlainMessage<ProfileListResponse> | undefined, b: ProfileListResponse | PlainMessage<ProfileListResponse> | undefined): boolean;
|
|
164
164
|
}
|
|
165
|
+
export declare class AvatarPhotoSetRequest extends Message<AvatarPhotoSetRequest> {
|
|
166
|
+
data: Uint8Array<ArrayBuffer>;
|
|
167
|
+
mimetype: string;
|
|
168
|
+
constructor(data?: PartialMessage<AvatarPhotoSetRequest>);
|
|
169
|
+
static readonly runtime: typeof proto3;
|
|
170
|
+
static readonly typeName = "micro.v1.user.AvatarPhotoSetRequest";
|
|
171
|
+
static readonly fields: FieldList;
|
|
172
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AvatarPhotoSetRequest;
|
|
173
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AvatarPhotoSetRequest;
|
|
174
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AvatarPhotoSetRequest;
|
|
175
|
+
static equals(a: AvatarPhotoSetRequest | PlainMessage<AvatarPhotoSetRequest> | undefined, b: AvatarPhotoSetRequest | PlainMessage<AvatarPhotoSetRequest> | undefined): boolean;
|
|
176
|
+
}
|
|
177
|
+
export declare class AvatarPhotoResponse extends Message<AvatarPhotoResponse> {
|
|
178
|
+
status?: ResponseStatus;
|
|
179
|
+
data: Uint8Array<ArrayBuffer>;
|
|
180
|
+
mimetype: string;
|
|
181
|
+
constructor(data?: PartialMessage<AvatarPhotoResponse>);
|
|
182
|
+
static readonly runtime: typeof proto3;
|
|
183
|
+
static readonly typeName = "micro.v1.user.AvatarPhotoResponse";
|
|
184
|
+
static readonly fields: FieldList;
|
|
185
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AvatarPhotoResponse;
|
|
186
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AvatarPhotoResponse;
|
|
187
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AvatarPhotoResponse;
|
|
188
|
+
static equals(a: AvatarPhotoResponse | PlainMessage<AvatarPhotoResponse> | undefined, b: AvatarPhotoResponse | PlainMessage<AvatarPhotoResponse> | undefined): boolean;
|
|
189
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProfileListResponse = exports.ProfilesByIdsRequest = exports.ProfileListItemDto = exports.LikeRequest = exports.FollowRequest = exports.ProfileSingleResponse = exports.ProfileByUsernameRequest = exports.ProfileUpdateRequest = exports.ClaimUsernameRequest = exports.UsernameAvailableResponse = exports.UsernameAvailableRequest = exports.ProfileDto = void 0;
|
|
3
|
+
exports.AvatarPhotoResponse = exports.AvatarPhotoSetRequest = exports.ProfileListResponse = exports.ProfilesByIdsRequest = exports.ProfileListItemDto = exports.LikeRequest = exports.FollowRequest = exports.ProfileSingleResponse = exports.ProfileByUsernameRequest = exports.ProfileUpdateRequest = exports.ClaimUsernameRequest = exports.UsernameAvailableResponse = exports.UsernameAvailableRequest = exports.ProfileDto = void 0;
|
|
4
4
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
5
|
const general_pb_js_1 = require("../general_pb.js");
|
|
6
6
|
class ProfileDto extends protobuf_1.Message {
|
|
@@ -361,3 +361,59 @@ class ProfileListResponse extends protobuf_1.Message {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
exports.ProfileListResponse = ProfileListResponse;
|
|
364
|
+
class AvatarPhotoSetRequest extends protobuf_1.Message {
|
|
365
|
+
data = new Uint8Array(0);
|
|
366
|
+
mimetype = "";
|
|
367
|
+
constructor(data) {
|
|
368
|
+
super();
|
|
369
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
370
|
+
}
|
|
371
|
+
static runtime = protobuf_1.proto3;
|
|
372
|
+
static typeName = "micro.v1.user.AvatarPhotoSetRequest";
|
|
373
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
374
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 },
|
|
375
|
+
{ no: 2, name: "mimetype", kind: "scalar", T: 9 },
|
|
376
|
+
]);
|
|
377
|
+
static fromBinary(bytes, options) {
|
|
378
|
+
return new AvatarPhotoSetRequest().fromBinary(bytes, options);
|
|
379
|
+
}
|
|
380
|
+
static fromJson(jsonValue, options) {
|
|
381
|
+
return new AvatarPhotoSetRequest().fromJson(jsonValue, options);
|
|
382
|
+
}
|
|
383
|
+
static fromJsonString(jsonString, options) {
|
|
384
|
+
return new AvatarPhotoSetRequest().fromJsonString(jsonString, options);
|
|
385
|
+
}
|
|
386
|
+
static equals(a, b) {
|
|
387
|
+
return protobuf_1.proto3.util.equals(AvatarPhotoSetRequest, a, b);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
exports.AvatarPhotoSetRequest = AvatarPhotoSetRequest;
|
|
391
|
+
class AvatarPhotoResponse extends protobuf_1.Message {
|
|
392
|
+
status;
|
|
393
|
+
data = new Uint8Array(0);
|
|
394
|
+
mimetype = "";
|
|
395
|
+
constructor(data) {
|
|
396
|
+
super();
|
|
397
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
398
|
+
}
|
|
399
|
+
static runtime = protobuf_1.proto3;
|
|
400
|
+
static typeName = "micro.v1.user.AvatarPhotoResponse";
|
|
401
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
402
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
403
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 },
|
|
404
|
+
{ no: 3, name: "mimetype", kind: "scalar", T: 9 },
|
|
405
|
+
]);
|
|
406
|
+
static fromBinary(bytes, options) {
|
|
407
|
+
return new AvatarPhotoResponse().fromBinary(bytes, options);
|
|
408
|
+
}
|
|
409
|
+
static fromJson(jsonValue, options) {
|
|
410
|
+
return new AvatarPhotoResponse().fromJson(jsonValue, options);
|
|
411
|
+
}
|
|
412
|
+
static fromJsonString(jsonString, options) {
|
|
413
|
+
return new AvatarPhotoResponse().fromJsonString(jsonString, options);
|
|
414
|
+
}
|
|
415
|
+
static equals(a, b) {
|
|
416
|
+
return protobuf_1.proto3.util.equals(AvatarPhotoResponse, a, b);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
exports.AvatarPhotoResponse = AvatarPhotoResponse;
|
|
@@ -3,7 +3,7 @@ import { MethodKind } from "@bufbuild/protobuf";
|
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateFromRequest, PaginateRequest } from "../general_pb.js";
|
|
4
4
|
import { BetaCodePaginateResponse, BetaCodeSingleResponse, BetaCodeStoreRequest, BetaCodeUpdateRequest, ContactPaginationResponse, ContactRequest, ContactResponse, PreviewResponse, PublicUserPreviewResponse, UpdatePasswordRequest, UserAdminStoreRequest, UserPaginationResponse, UserSingleResponse, UserUpdateRequest } from "./user_messages_pb.js";
|
|
5
5
|
import { SiteSettingsRequest, SiteSettingsResponse } from "./site_settings_messages_pb.js";
|
|
6
|
-
import { ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_pb.js";
|
|
6
|
+
import { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_pb.js";
|
|
7
7
|
import { RoleAdminStoreRequest, RoleAdminUpdateRequest, RolePaginationResponse, RoleSingleResponse } from "./authorization_messages_pb.js";
|
|
8
8
|
export declare const PAuthService: {
|
|
9
9
|
readonly typeName: "micro.v1.user.PAuthService";
|
|
@@ -205,6 +205,24 @@ export declare const PProfileService: {
|
|
|
205
205
|
readonly O: typeof ProfileSingleResponse;
|
|
206
206
|
readonly kind: MethodKind.ServerStreaming;
|
|
207
207
|
};
|
|
208
|
+
readonly setAvatarPhoto: {
|
|
209
|
+
readonly name: "SetAvatarPhoto";
|
|
210
|
+
readonly I: typeof AvatarPhotoSetRequest;
|
|
211
|
+
readonly O: typeof EmptyResponse;
|
|
212
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
213
|
+
};
|
|
214
|
+
readonly getAvatarPhoto: {
|
|
215
|
+
readonly name: "GetAvatarPhoto";
|
|
216
|
+
readonly I: typeof ByIdRequest;
|
|
217
|
+
readonly O: typeof AvatarPhotoResponse;
|
|
218
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
219
|
+
};
|
|
220
|
+
readonly deleteAvatarPhoto: {
|
|
221
|
+
readonly name: "DeleteAvatarPhoto";
|
|
222
|
+
readonly I: typeof EmptyRequest;
|
|
223
|
+
readonly O: typeof EmptyResponse;
|
|
224
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
225
|
+
};
|
|
208
226
|
readonly myProfile: {
|
|
209
227
|
readonly name: "MyProfile";
|
|
210
228
|
readonly I: typeof EmptyRequest;
|
|
@@ -208,6 +208,24 @@ exports.PProfileService = {
|
|
|
208
208
|
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
209
209
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
210
210
|
},
|
|
211
|
+
setAvatarPhoto: {
|
|
212
|
+
name: "SetAvatarPhoto",
|
|
213
|
+
I: profile_messages_pb_js_1.AvatarPhotoSetRequest,
|
|
214
|
+
O: general_pb_js_1.EmptyResponse,
|
|
215
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
216
|
+
},
|
|
217
|
+
getAvatarPhoto: {
|
|
218
|
+
name: "GetAvatarPhoto",
|
|
219
|
+
I: general_pb_js_1.ByIdRequest,
|
|
220
|
+
O: profile_messages_pb_js_1.AvatarPhotoResponse,
|
|
221
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
222
|
+
},
|
|
223
|
+
deleteAvatarPhoto: {
|
|
224
|
+
name: "DeleteAvatarPhoto",
|
|
225
|
+
I: general_pb_js_1.EmptyRequest,
|
|
226
|
+
O: general_pb_js_1.EmptyResponse,
|
|
227
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
228
|
+
},
|
|
211
229
|
myProfile: {
|
|
212
230
|
name: "MyProfile",
|
|
213
231
|
I: general_pb_js_1.EmptyRequest,
|
|
@@ -3,7 +3,7 @@ import { Observable } from "rxjs";
|
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateFromRequest, PaginateRequest } from "../general_nest";
|
|
4
4
|
import { AppleRequest, GoogleRequest, LoginRequest, LoginResponse, LostPasswordChangePasswordRequest, LostPasswordChangePasswordResponse, LostPasswordHashCheckRequest, LostPasswordHashCheckResponse, LostPasswordStartRequest, LostPasswordStartResponse, RegisterRequest, RegisterResponse, RemoveUserDataRequest, ResendVerificationEmailRequest, ResendVerificationEmailResponse, TfaRequest, TfaResponse, UserVerificationRequest, UserVerificationResponse, VerifyTokenRequest, VerifyTokenResponse } from "./auth_messages_nest";
|
|
5
5
|
import { RoleAdminStoreRequest, RoleAdminUpdateRequest, RolePaginationResponse, RoleSingleResponse } from "./authorization_messages_nest";
|
|
6
|
-
import { ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_nest";
|
|
6
|
+
import { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_nest";
|
|
7
7
|
import { SiteSettingsRequest, SiteSettingsResponse } from "./site_settings_messages_nest";
|
|
8
8
|
import { BetaCodePaginateResponse, BetaCodeSingleResponse, BetaCodeStoreRequest, BetaCodeUpdateRequest, ContactPaginationResponse, ContactRequest, ContactResponse, PreviewResponse, PublicUserPreviewResponse, UpdatePasswordRequest, UserAdminStoreRequest, UserPaginationResponse, UserSingleResponse, UserUpdateRequest } from "./user_messages_nest";
|
|
9
9
|
export declare const protobufPackage = "micro.v1.user";
|
|
@@ -103,6 +103,9 @@ export declare const P_USER_EXIST_SERVICE_NAME = "PUserExistService";
|
|
|
103
103
|
export interface PProfileServiceClient {
|
|
104
104
|
usernameAvailable(request: UsernameAvailableRequest, metadata?: Metadata): Observable<UsernameAvailableResponse>;
|
|
105
105
|
claimUsername(request: ClaimUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
106
|
+
setAvatarPhoto(request: AvatarPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
107
|
+
getAvatarPhoto(request: ByIdRequest, metadata?: Metadata): Observable<AvatarPhotoResponse>;
|
|
108
|
+
deleteAvatarPhoto(request: EmptyRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
106
109
|
myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
107
110
|
updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
108
111
|
publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
@@ -117,6 +120,9 @@ export interface PProfileServiceClient {
|
|
|
117
120
|
export interface PProfileServiceController {
|
|
118
121
|
usernameAvailable(request: UsernameAvailableRequest, metadata?: Metadata): Observable<UsernameAvailableResponse>;
|
|
119
122
|
claimUsername(request: ClaimUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
123
|
+
setAvatarPhoto(request: AvatarPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
124
|
+
getAvatarPhoto(request: ByIdRequest, metadata?: Metadata): Observable<AvatarPhotoResponse>;
|
|
125
|
+
deleteAvatarPhoto(request: EmptyRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
120
126
|
myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
121
127
|
updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
122
128
|
publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
package/package.json
CHANGED
|
@@ -174,6 +174,19 @@ message ChatMemberDto {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
// Admin user directory row: chat-wide view of one user.
|
|
177
|
+
// Uploaded group photo (admin-set; resized to 512px JPEG micro-side).
|
|
178
|
+
message GroupPhotoSetRequest {
|
|
179
|
+
string id = 1;
|
|
180
|
+
bytes data = 2;
|
|
181
|
+
string mimetype = 3;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message GroupPhotoResponse {
|
|
185
|
+
ResponseStatus status = 1;
|
|
186
|
+
bytes data = 2;
|
|
187
|
+
string mimetype = 3;
|
|
188
|
+
}
|
|
189
|
+
|
|
177
190
|
message ChatUserAdminDto {
|
|
178
191
|
string user_id = 1;
|
|
179
192
|
string username = 2;
|
|
@@ -14,6 +14,7 @@ service PChatService {
|
|
|
14
14
|
rpc MessageHistory(MessageHistoryRequest) returns(stream MessageHistoryResponse) {}
|
|
15
15
|
rpc PinnedMessages(PinnedMessagesRequest) returns(stream PinnedMessagesResponse) {}
|
|
16
16
|
rpc ListMembers(GroupBySlugRequest) returns(stream ChatMemberListResponse) {}
|
|
17
|
+
rpc GetGroupPhoto(ByIdRequest) returns(stream GroupPhotoResponse) {}
|
|
17
18
|
|
|
18
19
|
rpc ReportMessage(ReportMessageRequest) returns(stream EmptyResponse) {}
|
|
19
20
|
rpc BlockUser(BlockUserRequest) returns(stream EmptyResponse) {}
|
|
@@ -29,6 +30,8 @@ service PChatModerationService {
|
|
|
29
30
|
rpc AdminListGroups(EmptyRequest) returns(stream ChatGroupListResponse) {}
|
|
30
31
|
// Chat-wide user directory (users who joined at least one group).
|
|
31
32
|
rpc AdminListUsers(PaginateRequest) returns(stream ChatUserAdminListResponse) {}
|
|
33
|
+
rpc SetGroupPhoto(GroupPhotoSetRequest) returns(stream EmptyResponse) {}
|
|
34
|
+
rpc DeleteGroupPhoto(ByIdRequest) returns(stream EmptyResponse) {}
|
|
32
35
|
|
|
33
36
|
rpc ApplySanction(SanctionRequest) returns(stream EmptyResponse) {}
|
|
34
37
|
rpc RevokeSanction(RevokeSanctionRequest) returns(stream EmptyResponse) {}
|
|
@@ -83,3 +83,15 @@ message ProfileListResponse {
|
|
|
83
83
|
PaginationMetaResult pagination = 2;
|
|
84
84
|
repeated ProfileListItemDto data = 3;
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
// Raw profile photo bytes (server resizes to 512px JPEG on upload).
|
|
88
|
+
message AvatarPhotoSetRequest {
|
|
89
|
+
bytes data = 1;
|
|
90
|
+
string mimetype = 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message AvatarPhotoResponse {
|
|
94
|
+
ResponseStatus status = 1;
|
|
95
|
+
bytes data = 2;
|
|
96
|
+
string mimetype = 3;
|
|
97
|
+
}
|
|
@@ -62,6 +62,9 @@ service PUserExistService {
|
|
|
62
62
|
service PProfileService {
|
|
63
63
|
rpc UsernameAvailable(UsernameAvailableRequest) returns(stream UsernameAvailableResponse) {}
|
|
64
64
|
rpc ClaimUsername(ClaimUsernameRequest) returns(stream ProfileSingleResponse) {}
|
|
65
|
+
rpc SetAvatarPhoto(AvatarPhotoSetRequest) returns(stream EmptyResponse) {}
|
|
66
|
+
rpc GetAvatarPhoto(ByIdRequest) returns(stream AvatarPhotoResponse) {}
|
|
67
|
+
rpc DeleteAvatarPhoto(EmptyRequest) returns(stream EmptyResponse) {}
|
|
65
68
|
rpc MyProfile(EmptyRequest) returns(stream ProfileSingleResponse) {}
|
|
66
69
|
rpc UpdateProfile(ProfileUpdateRequest) returns(stream ProfileSingleResponse) {}
|
|
67
70
|
rpc PublicProfile(ProfileByUsernameRequest) returns(stream ProfileSingleResponse) {}
|