jr-common-micro 1.1.54 → 1.1.56

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.
@@ -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",
@@ -74,4 +74,12 @@ export interface AvatarPhotoResponse {
74
74
  data: Buffer;
75
75
  mimetype: string;
76
76
  }
77
+ export interface SearchProfilesRequest {
78
+ query: string;
79
+ limit: number;
80
+ }
81
+ export interface ProfileIdListResponse {
82
+ status: ResponseStatus | undefined;
83
+ user_ids: string[];
84
+ }
77
85
  export declare const MICRO_V1_USER_PACKAGE_NAME = "micro.v1.user";
@@ -187,3 +187,27 @@ export declare class AvatarPhotoResponse extends Message<AvatarPhotoResponse> {
187
187
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AvatarPhotoResponse;
188
188
  static equals(a: AvatarPhotoResponse | PlainMessage<AvatarPhotoResponse> | undefined, b: AvatarPhotoResponse | PlainMessage<AvatarPhotoResponse> | undefined): boolean;
189
189
  }
190
+ export declare class SearchProfilesRequest extends Message<SearchProfilesRequest> {
191
+ query: string;
192
+ limit: number;
193
+ constructor(data?: PartialMessage<SearchProfilesRequest>);
194
+ static readonly runtime: typeof proto3;
195
+ static readonly typeName = "micro.v1.user.SearchProfilesRequest";
196
+ static readonly fields: FieldList;
197
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SearchProfilesRequest;
198
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SearchProfilesRequest;
199
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SearchProfilesRequest;
200
+ static equals(a: SearchProfilesRequest | PlainMessage<SearchProfilesRequest> | undefined, b: SearchProfilesRequest | PlainMessage<SearchProfilesRequest> | undefined): boolean;
201
+ }
202
+ export declare class ProfileIdListResponse extends Message<ProfileIdListResponse> {
203
+ status?: ResponseStatus;
204
+ userIds: string[];
205
+ constructor(data?: PartialMessage<ProfileIdListResponse>);
206
+ static readonly runtime: typeof proto3;
207
+ static readonly typeName = "micro.v1.user.ProfileIdListResponse";
208
+ static readonly fields: FieldList;
209
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileIdListResponse;
210
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileIdListResponse;
211
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileIdListResponse;
212
+ static equals(a: ProfileIdListResponse | PlainMessage<ProfileIdListResponse> | undefined, b: ProfileIdListResponse | PlainMessage<ProfileIdListResponse> | undefined): boolean;
213
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.ProfileIdListResponse = exports.SearchProfilesRequest = 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 {
@@ -417,3 +417,57 @@ class AvatarPhotoResponse extends protobuf_1.Message {
417
417
  }
418
418
  }
419
419
  exports.AvatarPhotoResponse = AvatarPhotoResponse;
420
+ class SearchProfilesRequest extends protobuf_1.Message {
421
+ query = "";
422
+ limit = 0;
423
+ constructor(data) {
424
+ super();
425
+ protobuf_1.proto3.util.initPartial(data, this);
426
+ }
427
+ static runtime = protobuf_1.proto3;
428
+ static typeName = "micro.v1.user.SearchProfilesRequest";
429
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
430
+ { no: 1, name: "query", kind: "scalar", T: 9 },
431
+ { no: 2, name: "limit", kind: "scalar", T: 5 },
432
+ ]);
433
+ static fromBinary(bytes, options) {
434
+ return new SearchProfilesRequest().fromBinary(bytes, options);
435
+ }
436
+ static fromJson(jsonValue, options) {
437
+ return new SearchProfilesRequest().fromJson(jsonValue, options);
438
+ }
439
+ static fromJsonString(jsonString, options) {
440
+ return new SearchProfilesRequest().fromJsonString(jsonString, options);
441
+ }
442
+ static equals(a, b) {
443
+ return protobuf_1.proto3.util.equals(SearchProfilesRequest, a, b);
444
+ }
445
+ }
446
+ exports.SearchProfilesRequest = SearchProfilesRequest;
447
+ class ProfileIdListResponse extends protobuf_1.Message {
448
+ status;
449
+ userIds = [];
450
+ constructor(data) {
451
+ super();
452
+ protobuf_1.proto3.util.initPartial(data, this);
453
+ }
454
+ static runtime = protobuf_1.proto3;
455
+ static typeName = "micro.v1.user.ProfileIdListResponse";
456
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
457
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
458
+ { no: 2, name: "user_ids", kind: "scalar", T: 9, repeated: true },
459
+ ]);
460
+ static fromBinary(bytes, options) {
461
+ return new ProfileIdListResponse().fromBinary(bytes, options);
462
+ }
463
+ static fromJson(jsonValue, options) {
464
+ return new ProfileIdListResponse().fromJson(jsonValue, options);
465
+ }
466
+ static fromJsonString(jsonString, options) {
467
+ return new ProfileIdListResponse().fromJsonString(jsonString, options);
468
+ }
469
+ static equals(a, b) {
470
+ return protobuf_1.proto3.util.equals(ProfileIdListResponse, a, b);
471
+ }
472
+ }
473
+ exports.ProfileIdListResponse = ProfileIdListResponse;
@@ -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 { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_pb.js";
6
+ import { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileIdListResponse, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, SearchProfilesRequest, 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";
@@ -223,6 +223,12 @@ export declare const PProfileService: {
223
223
  readonly O: typeof EmptyResponse;
224
224
  readonly kind: MethodKind.ServerStreaming;
225
225
  };
226
+ readonly searchProfiles: {
227
+ readonly name: "SearchProfiles";
228
+ readonly I: typeof SearchProfilesRequest;
229
+ readonly O: typeof ProfileIdListResponse;
230
+ readonly kind: MethodKind.ServerStreaming;
231
+ };
226
232
  readonly myProfile: {
227
233
  readonly name: "MyProfile";
228
234
  readonly I: typeof EmptyRequest;
@@ -226,6 +226,12 @@ exports.PProfileService = {
226
226
  O: general_pb_js_1.EmptyResponse,
227
227
  kind: protobuf_1.MethodKind.ServerStreaming,
228
228
  },
229
+ searchProfiles: {
230
+ name: "SearchProfiles",
231
+ I: profile_messages_pb_js_1.SearchProfilesRequest,
232
+ O: profile_messages_pb_js_1.ProfileIdListResponse,
233
+ kind: protobuf_1.MethodKind.ServerStreaming,
234
+ },
229
235
  myProfile: {
230
236
  name: "MyProfile",
231
237
  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 { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_nest";
6
+ import { AvatarPhotoResponse, AvatarPhotoSetRequest, ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileIdListResponse, ProfileListResponse, ProfilesByIdsRequest, ProfileSingleResponse, ProfileUpdateRequest, SearchProfilesRequest, 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";
@@ -106,6 +106,7 @@ export interface PProfileServiceClient {
106
106
  setAvatarPhoto(request: AvatarPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
107
107
  getAvatarPhoto(request: ByIdRequest, metadata?: Metadata): Observable<AvatarPhotoResponse>;
108
108
  deleteAvatarPhoto(request: EmptyRequest, metadata?: Metadata): Observable<EmptyResponse>;
109
+ searchProfiles(request: SearchProfilesRequest, metadata?: Metadata): Observable<ProfileIdListResponse>;
109
110
  myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
110
111
  updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
111
112
  publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
@@ -123,6 +124,7 @@ export interface PProfileServiceController {
123
124
  setAvatarPhoto(request: AvatarPhotoSetRequest, metadata?: Metadata): Observable<EmptyResponse>;
124
125
  getAvatarPhoto(request: ByIdRequest, metadata?: Metadata): Observable<AvatarPhotoResponse>;
125
126
  deleteAvatarPhoto(request: EmptyRequest, metadata?: Metadata): Observable<EmptyResponse>;
127
+ searchProfiles(request: SearchProfilesRequest, metadata?: Metadata): Observable<ProfileIdListResponse>;
126
128
  myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
127
129
  updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
128
130
  publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
@@ -140,6 +140,7 @@ function PProfileServiceControllerMethods() {
140
140
  "setAvatarPhoto",
141
141
  "getAvatarPhoto",
142
142
  "deleteAvatarPhoto",
143
+ "searchProfiles",
143
144
  "myProfile",
144
145
  "updateProfile",
145
146
  "publicProfile",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.54",
3
+ "version": "1.1.56",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -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) {}
@@ -95,3 +95,14 @@ message AvatarPhotoResponse {
95
95
  bytes data = 2;
96
96
  string mimetype = 3;
97
97
  }
98
+
99
+ // Username substring search (admin user directory).
100
+ message SearchProfilesRequest {
101
+ string query = 1;
102
+ int32 limit = 2;
103
+ }
104
+
105
+ message ProfileIdListResponse {
106
+ ResponseStatus status = 1;
107
+ repeated string user_ids = 2;
108
+ }
@@ -65,6 +65,7 @@ service PProfileService {
65
65
  rpc SetAvatarPhoto(AvatarPhotoSetRequest) returns(stream EmptyResponse) {}
66
66
  rpc GetAvatarPhoto(ByIdRequest) returns(stream AvatarPhotoResponse) {}
67
67
  rpc DeleteAvatarPhoto(EmptyRequest) returns(stream EmptyResponse) {}
68
+ rpc SearchProfiles(SearchProfilesRequest) returns(stream ProfileIdListResponse) {}
68
69
  rpc MyProfile(EmptyRequest) returns(stream ProfileSingleResponse) {}
69
70
  rpc UpdateProfile(ProfileUpdateRequest) returns(stream ProfileSingleResponse) {}
70
71
  rpc PublicProfile(ProfileByUsernameRequest) returns(stream ProfileSingleResponse) {}