jr-common-micro 1.1.60 → 1.1.62

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.
@@ -16,6 +16,8 @@ const grpcClientFactory = (provide, grpcPackage, hostKey, portKey) => {
16
16
  channelOptions: {
17
17
  'grpc.min_reconnect_backoff_ms': 1000,
18
18
  'grpc.max_reconnect_backoff_ms': 10000,
19
+ 'grpc.max_receive_message_length': 32 * 1024 * 1024,
20
+ 'grpc.max_send_message_length': 32 * 1024 * 1024,
19
21
  },
20
22
  keepalive: {
21
23
  keepaliveTimeMs: 1e3 * 60 * 2,
@@ -48,6 +50,8 @@ const grpcServerOptions = (grpcPackage, grpcHost, grpcPort) => {
48
50
  options: {
49
51
  url: grpcHost + ':' + grpcPort,
50
52
  package: grpcPackage,
53
+ maxReceiveMessageLength: 32 * 1024 * 1024,
54
+ maxSendMessageLength: 32 * 1024 * 1024,
51
55
  protoPath: (0, walk_sync_1.walkSync)((0, path_1.join)(process.cwd(), 'node_modules/jr-common-micro/proto'), { includeBasePath: true, globs: ['**/*.proto'] }),
52
56
  loader: {
53
57
  keepCase: true,
@@ -55,6 +55,34 @@ export interface ChatMessageDto {
55
55
  reactions: ChatReactionCountDto[];
56
56
  edited_at: string;
57
57
  poll: ChatPollDto | undefined;
58
+ media: ChatMediaDto | undefined;
59
+ }
60
+ export interface ChatMediaDto {
61
+ public_id: string;
62
+ kind: string;
63
+ width: number;
64
+ height: number;
65
+ }
66
+ export interface ChatMediaUploadRequest {
67
+ group_slug: string;
68
+ kind: string;
69
+ data: Buffer;
70
+ mimetype: string;
71
+ }
72
+ export interface ChatMediaUploadResponse {
73
+ status: ResponseStatus | undefined;
74
+ media_id: string;
75
+ width: number;
76
+ height: number;
77
+ }
78
+ export interface ChatMediaGetRequest {
79
+ public_id: string;
80
+ }
81
+ export interface ChatMediaGetResponse {
82
+ status: ResponseStatus | undefined;
83
+ data: Buffer;
84
+ mimetype: string;
85
+ kind: string;
58
86
  }
59
87
  export interface ChatPollOptionDto {
60
88
  id: string;
@@ -96,6 +96,7 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
96
96
  reactions: ChatReactionCountDto[];
97
97
  editedAt: string;
98
98
  poll?: ChatPollDto;
99
+ media?: ChatMediaDto;
99
100
  constructor(data?: PartialMessage<ChatMessageDto>);
100
101
  static readonly runtime: typeof proto3;
101
102
  static readonly typeName = "micro.v1.chat.ChatMessageDto";
@@ -105,6 +106,73 @@ export declare class ChatMessageDto extends Message<ChatMessageDto> {
105
106
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMessageDto;
106
107
  static equals(a: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined, b: ChatMessageDto | PlainMessage<ChatMessageDto> | undefined): boolean;
107
108
  }
109
+ export declare class ChatMediaDto extends Message<ChatMediaDto> {
110
+ publicId: string;
111
+ kind: string;
112
+ width: number;
113
+ height: number;
114
+ constructor(data?: PartialMessage<ChatMediaDto>);
115
+ static readonly runtime: typeof proto3;
116
+ static readonly typeName = "micro.v1.chat.ChatMediaDto";
117
+ static readonly fields: FieldList;
118
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMediaDto;
119
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMediaDto;
120
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaDto;
121
+ static equals(a: ChatMediaDto | PlainMessage<ChatMediaDto> | undefined, b: ChatMediaDto | PlainMessage<ChatMediaDto> | undefined): boolean;
122
+ }
123
+ export declare class ChatMediaUploadRequest extends Message<ChatMediaUploadRequest> {
124
+ groupSlug: string;
125
+ kind: string;
126
+ data: Uint8Array<ArrayBuffer>;
127
+ mimetype: string;
128
+ constructor(data?: PartialMessage<ChatMediaUploadRequest>);
129
+ static readonly runtime: typeof proto3;
130
+ static readonly typeName = "micro.v1.chat.ChatMediaUploadRequest";
131
+ static readonly fields: FieldList;
132
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMediaUploadRequest;
133
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMediaUploadRequest;
134
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaUploadRequest;
135
+ static equals(a: ChatMediaUploadRequest | PlainMessage<ChatMediaUploadRequest> | undefined, b: ChatMediaUploadRequest | PlainMessage<ChatMediaUploadRequest> | undefined): boolean;
136
+ }
137
+ export declare class ChatMediaUploadResponse extends Message<ChatMediaUploadResponse> {
138
+ status?: ResponseStatus;
139
+ mediaId: string;
140
+ width: number;
141
+ height: number;
142
+ constructor(data?: PartialMessage<ChatMediaUploadResponse>);
143
+ static readonly runtime: typeof proto3;
144
+ static readonly typeName = "micro.v1.chat.ChatMediaUploadResponse";
145
+ static readonly fields: FieldList;
146
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMediaUploadResponse;
147
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMediaUploadResponse;
148
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaUploadResponse;
149
+ static equals(a: ChatMediaUploadResponse | PlainMessage<ChatMediaUploadResponse> | undefined, b: ChatMediaUploadResponse | PlainMessage<ChatMediaUploadResponse> | undefined): boolean;
150
+ }
151
+ export declare class ChatMediaGetRequest extends Message<ChatMediaGetRequest> {
152
+ publicId: string;
153
+ constructor(data?: PartialMessage<ChatMediaGetRequest>);
154
+ static readonly runtime: typeof proto3;
155
+ static readonly typeName = "micro.v1.chat.ChatMediaGetRequest";
156
+ static readonly fields: FieldList;
157
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMediaGetRequest;
158
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMediaGetRequest;
159
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaGetRequest;
160
+ static equals(a: ChatMediaGetRequest | PlainMessage<ChatMediaGetRequest> | undefined, b: ChatMediaGetRequest | PlainMessage<ChatMediaGetRequest> | undefined): boolean;
161
+ }
162
+ export declare class ChatMediaGetResponse extends Message<ChatMediaGetResponse> {
163
+ status?: ResponseStatus;
164
+ data: Uint8Array<ArrayBuffer>;
165
+ mimetype: string;
166
+ kind: string;
167
+ constructor(data?: PartialMessage<ChatMediaGetResponse>);
168
+ static readonly runtime: typeof proto3;
169
+ static readonly typeName = "micro.v1.chat.ChatMediaGetResponse";
170
+ static readonly fields: FieldList;
171
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChatMediaGetResponse;
172
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChatMediaGetResponse;
173
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChatMediaGetResponse;
174
+ static equals(a: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined, b: ChatMediaGetResponse | PlainMessage<ChatMediaGetResponse> | undefined): boolean;
175
+ }
108
176
  export declare class ChatPollOptionDto extends Message<ChatPollOptionDto> {
109
177
  id: string;
110
178
  text: 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.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.ChatPollDto = exports.ChatPollOptionDto = 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.ChatPollDto = exports.ChatPollOptionDto = exports.ChatMediaGetResponse = exports.ChatMediaGetRequest = exports.ChatMediaUploadResponse = exports.ChatMediaUploadRequest = exports.ChatMediaDto = 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 {
@@ -190,6 +190,7 @@ class ChatMessageDto extends protobuf_1.Message {
190
190
  reactions = [];
191
191
  editedAt = "";
192
192
  poll;
193
+ media;
193
194
  constructor(data) {
194
195
  super();
195
196
  protobuf_1.proto3.util.initPartial(data, this);
@@ -214,6 +215,7 @@ class ChatMessageDto extends protobuf_1.Message {
214
215
  { no: 15, name: "reactions", kind: "message", T: ChatReactionCountDto, repeated: true },
215
216
  { no: 16, name: "edited_at", kind: "scalar", T: 9 },
216
217
  { no: 17, name: "poll", kind: "message", T: ChatPollDto },
218
+ { no: 18, name: "media", kind: "message", T: ChatMediaDto },
217
219
  ]);
218
220
  static fromBinary(bytes, options) {
219
221
  return new ChatMessageDto().fromBinary(bytes, options);
@@ -229,6 +231,155 @@ class ChatMessageDto extends protobuf_1.Message {
229
231
  }
230
232
  }
231
233
  exports.ChatMessageDto = ChatMessageDto;
234
+ class ChatMediaDto extends protobuf_1.Message {
235
+ publicId = "";
236
+ kind = "";
237
+ width = 0;
238
+ height = 0;
239
+ constructor(data) {
240
+ super();
241
+ protobuf_1.proto3.util.initPartial(data, this);
242
+ }
243
+ static runtime = protobuf_1.proto3;
244
+ static typeName = "micro.v1.chat.ChatMediaDto";
245
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
246
+ { no: 1, name: "public_id", kind: "scalar", T: 9 },
247
+ { no: 2, name: "kind", kind: "scalar", T: 9 },
248
+ { no: 3, name: "width", kind: "scalar", T: 13 },
249
+ { no: 4, name: "height", kind: "scalar", T: 13 },
250
+ ]);
251
+ static fromBinary(bytes, options) {
252
+ return new ChatMediaDto().fromBinary(bytes, options);
253
+ }
254
+ static fromJson(jsonValue, options) {
255
+ return new ChatMediaDto().fromJson(jsonValue, options);
256
+ }
257
+ static fromJsonString(jsonString, options) {
258
+ return new ChatMediaDto().fromJsonString(jsonString, options);
259
+ }
260
+ static equals(a, b) {
261
+ return protobuf_1.proto3.util.equals(ChatMediaDto, a, b);
262
+ }
263
+ }
264
+ exports.ChatMediaDto = ChatMediaDto;
265
+ class ChatMediaUploadRequest extends protobuf_1.Message {
266
+ groupSlug = "";
267
+ kind = "";
268
+ data = new Uint8Array(0);
269
+ mimetype = "";
270
+ constructor(data) {
271
+ super();
272
+ protobuf_1.proto3.util.initPartial(data, this);
273
+ }
274
+ static runtime = protobuf_1.proto3;
275
+ static typeName = "micro.v1.chat.ChatMediaUploadRequest";
276
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
277
+ { no: 1, name: "group_slug", kind: "scalar", T: 9 },
278
+ { no: 2, name: "kind", kind: "scalar", T: 9 },
279
+ { no: 3, name: "data", kind: "scalar", T: 12 },
280
+ { no: 4, name: "mimetype", kind: "scalar", T: 9 },
281
+ ]);
282
+ static fromBinary(bytes, options) {
283
+ return new ChatMediaUploadRequest().fromBinary(bytes, options);
284
+ }
285
+ static fromJson(jsonValue, options) {
286
+ return new ChatMediaUploadRequest().fromJson(jsonValue, options);
287
+ }
288
+ static fromJsonString(jsonString, options) {
289
+ return new ChatMediaUploadRequest().fromJsonString(jsonString, options);
290
+ }
291
+ static equals(a, b) {
292
+ return protobuf_1.proto3.util.equals(ChatMediaUploadRequest, a, b);
293
+ }
294
+ }
295
+ exports.ChatMediaUploadRequest = ChatMediaUploadRequest;
296
+ class ChatMediaUploadResponse extends protobuf_1.Message {
297
+ status;
298
+ mediaId = "";
299
+ width = 0;
300
+ height = 0;
301
+ constructor(data) {
302
+ super();
303
+ protobuf_1.proto3.util.initPartial(data, this);
304
+ }
305
+ static runtime = protobuf_1.proto3;
306
+ static typeName = "micro.v1.chat.ChatMediaUploadResponse";
307
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
308
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
309
+ { no: 2, name: "media_id", kind: "scalar", T: 9 },
310
+ { no: 3, name: "width", kind: "scalar", T: 13 },
311
+ { no: 4, name: "height", kind: "scalar", T: 13 },
312
+ ]);
313
+ static fromBinary(bytes, options) {
314
+ return new ChatMediaUploadResponse().fromBinary(bytes, options);
315
+ }
316
+ static fromJson(jsonValue, options) {
317
+ return new ChatMediaUploadResponse().fromJson(jsonValue, options);
318
+ }
319
+ static fromJsonString(jsonString, options) {
320
+ return new ChatMediaUploadResponse().fromJsonString(jsonString, options);
321
+ }
322
+ static equals(a, b) {
323
+ return protobuf_1.proto3.util.equals(ChatMediaUploadResponse, a, b);
324
+ }
325
+ }
326
+ exports.ChatMediaUploadResponse = ChatMediaUploadResponse;
327
+ class ChatMediaGetRequest extends protobuf_1.Message {
328
+ publicId = "";
329
+ constructor(data) {
330
+ super();
331
+ protobuf_1.proto3.util.initPartial(data, this);
332
+ }
333
+ static runtime = protobuf_1.proto3;
334
+ static typeName = "micro.v1.chat.ChatMediaGetRequest";
335
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
336
+ { no: 1, name: "public_id", kind: "scalar", T: 9 },
337
+ ]);
338
+ static fromBinary(bytes, options) {
339
+ return new ChatMediaGetRequest().fromBinary(bytes, options);
340
+ }
341
+ static fromJson(jsonValue, options) {
342
+ return new ChatMediaGetRequest().fromJson(jsonValue, options);
343
+ }
344
+ static fromJsonString(jsonString, options) {
345
+ return new ChatMediaGetRequest().fromJsonString(jsonString, options);
346
+ }
347
+ static equals(a, b) {
348
+ return protobuf_1.proto3.util.equals(ChatMediaGetRequest, a, b);
349
+ }
350
+ }
351
+ exports.ChatMediaGetRequest = ChatMediaGetRequest;
352
+ class ChatMediaGetResponse extends protobuf_1.Message {
353
+ status;
354
+ data = new Uint8Array(0);
355
+ mimetype = "";
356
+ kind = "";
357
+ constructor(data) {
358
+ super();
359
+ protobuf_1.proto3.util.initPartial(data, this);
360
+ }
361
+ static runtime = protobuf_1.proto3;
362
+ static typeName = "micro.v1.chat.ChatMediaGetResponse";
363
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
364
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
365
+ { no: 2, name: "data", kind: "scalar", T: 12 },
366
+ { no: 3, name: "mimetype", kind: "scalar", T: 9 },
367
+ { no: 4, name: "kind", kind: "scalar", T: 9 },
368
+ ]);
369
+ static fromBinary(bytes, options) {
370
+ return new ChatMediaGetResponse().fromBinary(bytes, options);
371
+ }
372
+ static fromJson(jsonValue, options) {
373
+ return new ChatMediaGetResponse().fromJson(jsonValue, options);
374
+ }
375
+ static fromJsonString(jsonString, options) {
376
+ return new ChatMediaGetResponse().fromJsonString(jsonString, options);
377
+ }
378
+ static equals(a, b) {
379
+ return protobuf_1.proto3.util.equals(ChatMediaGetResponse, a, b);
380
+ }
381
+ }
382
+ exports.ChatMediaGetResponse = ChatMediaGetResponse;
232
383
  class ChatPollOptionDto extends protobuf_1.Message {
233
384
  id = "";
234
385
  text = "";
@@ -1,5 +1,5 @@
1
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";
2
+ import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, 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";
@@ -52,6 +52,18 @@ export declare const PChatService: {
52
52
  readonly O: typeof GroupPhotoResponse;
53
53
  readonly kind: MethodKind.ServerStreaming;
54
54
  };
55
+ readonly uploadChatMedia: {
56
+ readonly name: "UploadChatMedia";
57
+ readonly I: typeof ChatMediaUploadRequest;
58
+ readonly O: typeof ChatMediaUploadResponse;
59
+ readonly kind: MethodKind.ServerStreaming;
60
+ };
61
+ readonly getChatMedia: {
62
+ readonly name: "GetChatMedia";
63
+ readonly I: typeof ChatMediaGetRequest;
64
+ readonly O: typeof ChatMediaGetResponse;
65
+ readonly kind: MethodKind.ServerStreaming;
66
+ };
55
67
  readonly reportMessage: {
56
68
  readonly name: "ReportMessage";
57
69
  readonly I: typeof ReportMessageRequest;
@@ -55,6 +55,18 @@ exports.PChatService = {
55
55
  O: chat_messages_pb_js_1.GroupPhotoResponse,
56
56
  kind: protobuf_1.MethodKind.ServerStreaming,
57
57
  },
58
+ uploadChatMedia: {
59
+ name: "UploadChatMedia",
60
+ I: chat_messages_pb_js_1.ChatMediaUploadRequest,
61
+ O: chat_messages_pb_js_1.ChatMediaUploadResponse,
62
+ kind: protobuf_1.MethodKind.ServerStreaming,
63
+ },
64
+ getChatMedia: {
65
+ name: "GetChatMedia",
66
+ I: chat_messages_pb_js_1.ChatMediaGetRequest,
67
+ O: chat_messages_pb_js_1.ChatMediaGetResponse,
68
+ kind: protobuf_1.MethodKind.ServerStreaming,
69
+ },
58
70
  reportMessage: {
59
71
  name: "ReportMessage",
60
72
  I: chat_messages_pb_js_1.ReportMessageRequest,
@@ -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, 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";
4
+ import { BlockedUsersResponse, BlockUserRequest, ChatGroupListResponse, ChatGroupSingleResponse, ChatMediaGetRequest, ChatMediaGetResponse, ChatMediaUploadRequest, ChatMediaUploadResponse, 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 {
@@ -13,6 +13,8 @@ export interface PChatServiceClient {
13
13
  pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
14
14
  listMembers(request: GroupBySlugRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
15
15
  getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
16
+ uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
17
+ getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
16
18
  reportMessage(request: ReportMessageRequest, metadata?: Metadata): Observable<EmptyResponse>;
17
19
  blockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
18
20
  unblockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
@@ -27,6 +29,8 @@ export interface PChatServiceController {
27
29
  pinnedMessages(request: PinnedMessagesRequest, metadata?: Metadata): Observable<PinnedMessagesResponse>;
28
30
  listMembers(request: GroupBySlugRequest, metadata?: Metadata): Observable<ChatMemberListResponse>;
29
31
  getGroupPhoto(request: ByIdRequest, metadata?: Metadata): Observable<GroupPhotoResponse>;
32
+ uploadChatMedia(request: ChatMediaUploadRequest, metadata?: Metadata): Observable<ChatMediaUploadResponse>;
33
+ getChatMedia(request: ChatMediaGetRequest, metadata?: Metadata): Observable<ChatMediaGetResponse>;
30
34
  reportMessage(request: ReportMessageRequest, metadata?: Metadata): Observable<EmptyResponse>;
31
35
  blockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
32
36
  unblockUser(request: BlockUserRequest, metadata?: Metadata): Observable<EmptyResponse>;
@@ -17,6 +17,8 @@ function PChatServiceControllerMethods() {
17
17
  "pinnedMessages",
18
18
  "listMembers",
19
19
  "getGroupPhoto",
20
+ "uploadChatMedia",
21
+ "getChatMedia",
20
22
  "reportMessage",
21
23
  "blockUser",
22
24
  "unblockUser",
@@ -20,6 +20,7 @@ export interface PortfolioDto {
20
20
  coins: CoinData[];
21
21
  createdAt: string;
22
22
  updatedAt: string;
23
+ isPublic: boolean;
23
24
  }
24
25
  export interface PortfoliosResponse {
25
26
  status: ResponseStatus | undefined;
@@ -93,6 +94,7 @@ export interface PortfolioBundleDto {
93
94
  createdAt: string;
94
95
  updatedAt: string;
95
96
  portfolioCoins: PortfolioCoinBundleDto[];
97
+ isPublic: boolean;
96
98
  }
97
99
  export interface PortfolioCoinBundleDto {
98
100
  id: string;
@@ -151,4 +153,19 @@ export interface DefaultCurrencyResponse {
151
153
  status: ResponseStatus | undefined;
152
154
  data: CurrencyDto | undefined;
153
155
  }
156
+ export interface PublicPortfolioItemDto {
157
+ coin_id: string;
158
+ symbol: string;
159
+ name: string;
160
+ percent: string;
161
+ }
162
+ export interface PublicPortfolioDto {
163
+ name: string;
164
+ coin_count: number;
165
+ items: PublicPortfolioItemDto[];
166
+ }
167
+ export interface PublicPortfolioResponse {
168
+ status: ResponseStatus | undefined;
169
+ data?: PublicPortfolioDto | undefined;
170
+ }
154
171
  export declare const MICRO_V1_PORTFOLIO_PACKAGE_NAME = "micro.v1.portfolio";
@@ -45,6 +45,7 @@ export declare class PortfolioDto extends Message<PortfolioDto> {
45
45
  coins: CoinData[];
46
46
  createdAt: string;
47
47
  updatedAt: string;
48
+ isPublic: boolean;
48
49
  constructor(data?: PartialMessage<PortfolioDto>);
49
50
  static readonly runtime: typeof proto3;
50
51
  static readonly typeName = "micro.v1.portfolio.PortfolioDto";
@@ -214,6 +215,7 @@ export declare class PortfolioBundleDto extends Message<PortfolioBundleDto> {
214
215
  createdAt: string;
215
216
  updatedAt: string;
216
217
  portfolioCoins: PortfolioCoinBundleDto[];
218
+ isPublic: boolean;
217
219
  constructor(data?: PartialMessage<PortfolioBundleDto>);
218
220
  static readonly runtime: typeof proto3;
219
221
  static readonly typeName = "micro.v1.portfolio.PortfolioBundleDto";
@@ -368,3 +370,42 @@ export declare class DefaultCurrencyResponse extends Message<DefaultCurrencyResp
368
370
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DefaultCurrencyResponse;
369
371
  static equals(a: DefaultCurrencyResponse | PlainMessage<DefaultCurrencyResponse> | undefined, b: DefaultCurrencyResponse | PlainMessage<DefaultCurrencyResponse> | undefined): boolean;
370
372
  }
373
+ export declare class PublicPortfolioItemDto extends Message<PublicPortfolioItemDto> {
374
+ coinId: string;
375
+ symbol: string;
376
+ name: string;
377
+ percent: string;
378
+ constructor(data?: PartialMessage<PublicPortfolioItemDto>);
379
+ static readonly runtime: typeof proto3;
380
+ static readonly typeName = "micro.v1.portfolio.PublicPortfolioItemDto";
381
+ static readonly fields: FieldList;
382
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublicPortfolioItemDto;
383
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublicPortfolioItemDto;
384
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublicPortfolioItemDto;
385
+ static equals(a: PublicPortfolioItemDto | PlainMessage<PublicPortfolioItemDto> | undefined, b: PublicPortfolioItemDto | PlainMessage<PublicPortfolioItemDto> | undefined): boolean;
386
+ }
387
+ export declare class PublicPortfolioDto extends Message<PublicPortfolioDto> {
388
+ name: string;
389
+ coinCount: number;
390
+ items: PublicPortfolioItemDto[];
391
+ constructor(data?: PartialMessage<PublicPortfolioDto>);
392
+ static readonly runtime: typeof proto3;
393
+ static readonly typeName = "micro.v1.portfolio.PublicPortfolioDto";
394
+ static readonly fields: FieldList;
395
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublicPortfolioDto;
396
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublicPortfolioDto;
397
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublicPortfolioDto;
398
+ static equals(a: PublicPortfolioDto | PlainMessage<PublicPortfolioDto> | undefined, b: PublicPortfolioDto | PlainMessage<PublicPortfolioDto> | undefined): boolean;
399
+ }
400
+ export declare class PublicPortfolioResponse extends Message<PublicPortfolioResponse> {
401
+ status?: ResponseStatus;
402
+ data?: PublicPortfolioDto;
403
+ constructor(data?: PartialMessage<PublicPortfolioResponse>);
404
+ static readonly runtime: typeof proto3;
405
+ static readonly typeName = "micro.v1.portfolio.PublicPortfolioResponse";
406
+ static readonly fields: FieldList;
407
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublicPortfolioResponse;
408
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublicPortfolioResponse;
409
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublicPortfolioResponse;
410
+ static equals(a: PublicPortfolioResponse | PlainMessage<PublicPortfolioResponse> | undefined, b: PublicPortfolioResponse | PlainMessage<PublicPortfolioResponse> | undefined): boolean;
411
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultCurrencyResponse = exports.PortfolioWithCoinIdResponse = exports.AddCoinListResponse = exports.AddCoinListRequest = exports.RemovePortfolioResponse = exports.ResetPortfolioResponse = exports.RenamePortfolioResponse = exports.RenamePortfolioRequest = exports.SetMainPortfolioResponse = exports.PortfolioCoinChartData = exports.PortfolioCoinBundleDto = exports.PortfolioBundleDto = exports.PortfoliosBundleResponse = exports.CurrencyDto = exports.FeeDto = exports.TransactionDto = exports.AddCoinDto = exports.AddCoinResponse = exports.AddCoinRequest = exports.PortfolioStoreResponse = exports.PortfolioStoreRequest = exports.PortfolioCoinDto = exports.PortfoliosResponse = exports.PortfolioDto = exports.PortfolioByCoinIdResponse = exports.PortfolioUserResponse = exports.PortfolioByCoinIdDto = void 0;
3
+ exports.PublicPortfolioResponse = exports.PublicPortfolioDto = exports.PublicPortfolioItemDto = exports.DefaultCurrencyResponse = exports.PortfolioWithCoinIdResponse = exports.AddCoinListResponse = exports.AddCoinListRequest = exports.RemovePortfolioResponse = exports.ResetPortfolioResponse = exports.RenamePortfolioResponse = exports.RenamePortfolioRequest = exports.SetMainPortfolioResponse = exports.PortfolioCoinChartData = exports.PortfolioCoinBundleDto = exports.PortfolioBundleDto = exports.PortfoliosBundleResponse = exports.CurrencyDto = exports.FeeDto = exports.TransactionDto = exports.AddCoinDto = exports.AddCoinResponse = exports.AddCoinRequest = exports.PortfolioStoreResponse = exports.PortfolioStoreRequest = exports.PortfolioCoinDto = exports.PortfoliosResponse = exports.PortfolioDto = exports.PortfolioByCoinIdResponse = exports.PortfolioUserResponse = exports.PortfolioByCoinIdDto = void 0;
4
4
  const protobuf_1 = require("@bufbuild/protobuf");
5
5
  const general_pb_js_1 = require("../general_pb.js");
6
6
  class PortfolioByCoinIdDto extends protobuf_1.Message {
@@ -92,6 +92,7 @@ class PortfolioDto extends protobuf_1.Message {
92
92
  coins = [];
93
93
  createdAt = "";
94
94
  updatedAt = "";
95
+ isPublic = false;
95
96
  constructor(data) {
96
97
  super();
97
98
  protobuf_1.proto3.util.initPartial(data, this);
@@ -106,6 +107,7 @@ class PortfolioDto extends protobuf_1.Message {
106
107
  { no: 5, name: "coins", kind: "message", T: general_pb_js_1.CoinData, repeated: true },
107
108
  { no: 6, name: "createdAt", kind: "scalar", T: 9 },
108
109
  { no: 7, name: "updatedAt", kind: "scalar", T: 9 },
110
+ { no: 8, name: "isPublic", kind: "scalar", T: 8 },
109
111
  ]);
110
112
  static fromBinary(bytes, options) {
111
113
  return new PortfolioDto().fromBinary(bytes, options);
@@ -466,6 +468,7 @@ class PortfolioBundleDto extends protobuf_1.Message {
466
468
  createdAt = "";
467
469
  updatedAt = "";
468
470
  portfolioCoins = [];
471
+ isPublic = false;
469
472
  constructor(data) {
470
473
  super();
471
474
  protobuf_1.proto3.util.initPartial(data, this);
@@ -480,6 +483,7 @@ class PortfolioBundleDto extends protobuf_1.Message {
480
483
  { no: 5, name: "createdAt", kind: "scalar", T: 9 },
481
484
  { no: 6, name: "updatedAt", kind: "scalar", T: 9 },
482
485
  { no: 7, name: "portfolioCoins", kind: "message", T: PortfolioCoinBundleDto, repeated: true },
486
+ { no: 8, name: "isPublic", kind: "scalar", T: 8 },
483
487
  ]);
484
488
  static fromBinary(bytes, options) {
485
489
  return new PortfolioBundleDto().fromBinary(bytes, options);
@@ -818,3 +822,90 @@ class DefaultCurrencyResponse extends protobuf_1.Message {
818
822
  }
819
823
  }
820
824
  exports.DefaultCurrencyResponse = DefaultCurrencyResponse;
825
+ class PublicPortfolioItemDto extends protobuf_1.Message {
826
+ coinId = "";
827
+ symbol = "";
828
+ name = "";
829
+ percent = "";
830
+ constructor(data) {
831
+ super();
832
+ protobuf_1.proto3.util.initPartial(data, this);
833
+ }
834
+ static runtime = protobuf_1.proto3;
835
+ static typeName = "micro.v1.portfolio.PublicPortfolioItemDto";
836
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
837
+ { no: 1, name: "coin_id", kind: "scalar", T: 9 },
838
+ { no: 2, name: "symbol", kind: "scalar", T: 9 },
839
+ { no: 3, name: "name", kind: "scalar", T: 9 },
840
+ { no: 4, name: "percent", kind: "scalar", T: 9 },
841
+ ]);
842
+ static fromBinary(bytes, options) {
843
+ return new PublicPortfolioItemDto().fromBinary(bytes, options);
844
+ }
845
+ static fromJson(jsonValue, options) {
846
+ return new PublicPortfolioItemDto().fromJson(jsonValue, options);
847
+ }
848
+ static fromJsonString(jsonString, options) {
849
+ return new PublicPortfolioItemDto().fromJsonString(jsonString, options);
850
+ }
851
+ static equals(a, b) {
852
+ return protobuf_1.proto3.util.equals(PublicPortfolioItemDto, a, b);
853
+ }
854
+ }
855
+ exports.PublicPortfolioItemDto = PublicPortfolioItemDto;
856
+ class PublicPortfolioDto extends protobuf_1.Message {
857
+ name = "";
858
+ coinCount = 0;
859
+ items = [];
860
+ constructor(data) {
861
+ super();
862
+ protobuf_1.proto3.util.initPartial(data, this);
863
+ }
864
+ static runtime = protobuf_1.proto3;
865
+ static typeName = "micro.v1.portfolio.PublicPortfolioDto";
866
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
867
+ { no: 1, name: "name", kind: "scalar", T: 9 },
868
+ { no: 2, name: "coin_count", kind: "scalar", T: 13 },
869
+ { no: 3, name: "items", kind: "message", T: PublicPortfolioItemDto, repeated: true },
870
+ ]);
871
+ static fromBinary(bytes, options) {
872
+ return new PublicPortfolioDto().fromBinary(bytes, options);
873
+ }
874
+ static fromJson(jsonValue, options) {
875
+ return new PublicPortfolioDto().fromJson(jsonValue, options);
876
+ }
877
+ static fromJsonString(jsonString, options) {
878
+ return new PublicPortfolioDto().fromJsonString(jsonString, options);
879
+ }
880
+ static equals(a, b) {
881
+ return protobuf_1.proto3.util.equals(PublicPortfolioDto, a, b);
882
+ }
883
+ }
884
+ exports.PublicPortfolioDto = PublicPortfolioDto;
885
+ class PublicPortfolioResponse extends protobuf_1.Message {
886
+ status;
887
+ data;
888
+ constructor(data) {
889
+ super();
890
+ protobuf_1.proto3.util.initPartial(data, this);
891
+ }
892
+ static runtime = protobuf_1.proto3;
893
+ static typeName = "micro.v1.portfolio.PublicPortfolioResponse";
894
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
895
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
896
+ { no: 2, name: "data", kind: "message", T: PublicPortfolioDto, opt: true },
897
+ ]);
898
+ static fromBinary(bytes, options) {
899
+ return new PublicPortfolioResponse().fromBinary(bytes, options);
900
+ }
901
+ static fromJson(jsonValue, options) {
902
+ return new PublicPortfolioResponse().fromJson(jsonValue, options);
903
+ }
904
+ static fromJsonString(jsonString, options) {
905
+ return new PublicPortfolioResponse().fromJsonString(jsonString, options);
906
+ }
907
+ static equals(a, b) {
908
+ return protobuf_1.proto3.util.equals(PublicPortfolioResponse, a, b);
909
+ }
910
+ }
911
+ exports.PublicPortfolioResponse = PublicPortfolioResponse;
@@ -1,4 +1,4 @@
1
- import { AddCoinListRequest, AddCoinListResponse, AddCoinRequest, AddCoinResponse, DefaultCurrencyResponse, PortfolioByCoinIdResponse, PortfoliosBundleResponse, PortfoliosResponse, PortfolioStoreRequest, PortfolioStoreResponse, PortfolioUserResponse, PortfolioWithCoinIdResponse, RemovePortfolioResponse, RenamePortfolioRequest, RenamePortfolioResponse, ResetPortfolioResponse, SetMainPortfolioResponse } from "./portfolio_messages_pb.js";
1
+ import { AddCoinListRequest, AddCoinListResponse, AddCoinRequest, AddCoinResponse, DefaultCurrencyResponse, PortfolioByCoinIdResponse, PortfoliosBundleResponse, PortfoliosResponse, PortfolioStoreRequest, PortfolioStoreResponse, PortfolioUserResponse, PortfolioWithCoinIdResponse, PublicPortfolioResponse, RemovePortfolioResponse, RenamePortfolioRequest, RenamePortfolioResponse, ResetPortfolioResponse, SetMainPortfolioResponse } from "./portfolio_messages_pb.js";
2
2
  import { MethodKind } from "@bufbuild/protobuf";
3
3
  import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_pb.js";
4
4
  import { PortfolioCoinPaginateRequest, PortfolioCoinPaginateResponse, RemovePortfolioCoinResponse } from "./portfolio_coin_messages_pb.js";
@@ -90,6 +90,18 @@ export declare const PPortfolioService: {
90
90
  readonly O: typeof PortfolioUserResponse;
91
91
  readonly kind: MethodKind.ServerStreaming;
92
92
  };
93
+ readonly setPublicPortfolio: {
94
+ readonly name: "SetPublicPortfolio";
95
+ readonly I: typeof ByIdRequest;
96
+ readonly O: typeof EmptyResponse;
97
+ readonly kind: MethodKind.ServerStreaming;
98
+ };
99
+ readonly getPublicPortfolio: {
100
+ readonly name: "GetPublicPortfolio";
101
+ readonly I: typeof ByIdRequest;
102
+ readonly O: typeof PublicPortfolioResponse;
103
+ readonly kind: MethodKind.ServerStreaming;
104
+ };
93
105
  };
94
106
  };
95
107
  export declare const PPortfolioCoinService: {
@@ -93,6 +93,18 @@ exports.PPortfolioService = {
93
93
  O: portfolio_messages_pb_js_1.PortfolioUserResponse,
94
94
  kind: protobuf_1.MethodKind.ServerStreaming,
95
95
  },
96
+ setPublicPortfolio: {
97
+ name: "SetPublicPortfolio",
98
+ I: general_pb_js_1.ByIdRequest,
99
+ O: general_pb_js_1.EmptyResponse,
100
+ kind: protobuf_1.MethodKind.ServerStreaming,
101
+ },
102
+ getPublicPortfolio: {
103
+ name: "GetPublicPortfolio",
104
+ I: general_pb_js_1.ByIdRequest,
105
+ O: portfolio_messages_pb_js_1.PublicPortfolioResponse,
106
+ kind: protobuf_1.MethodKind.ServerStreaming,
107
+ },
96
108
  }
97
109
  };
98
110
  exports.PPortfolioCoinService = {
@@ -3,7 +3,7 @@ import { Observable } from "rxjs";
3
3
  import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_nest";
4
4
  import { PortfolioCoinPaginateRequest, PortfolioCoinPaginateResponse, RemovePortfolioCoinResponse } from "./portfolio_coin_messages_nest";
5
5
  import { AddPortfolioCoinTransactionRequest, AddPortfolioCoinTransactionResponse, DeleteTransactionResponse, PortfolioCoinTransactionResponse, UpdateTransactionRequest, UpdateTransactionResponse } from "./portfolio_coin_trasaction_messages_nest";
6
- import { AddCoinListRequest, AddCoinListResponse, AddCoinRequest, AddCoinResponse, DefaultCurrencyResponse, PortfolioByCoinIdResponse, PortfoliosBundleResponse, PortfoliosResponse, PortfolioStoreRequest, PortfolioStoreResponse, PortfolioUserResponse, PortfolioWithCoinIdResponse, RemovePortfolioResponse, RenamePortfolioRequest, RenamePortfolioResponse, ResetPortfolioResponse, SetMainPortfolioResponse } from "./portfolio_messages_nest";
6
+ import { AddCoinListRequest, AddCoinListResponse, AddCoinRequest, AddCoinResponse, DefaultCurrencyResponse, PortfolioByCoinIdResponse, PortfoliosBundleResponse, PortfoliosResponse, PortfolioStoreRequest, PortfolioStoreResponse, PortfolioUserResponse, PortfolioWithCoinIdResponse, PublicPortfolioResponse, RemovePortfolioResponse, RenamePortfolioRequest, RenamePortfolioResponse, ResetPortfolioResponse, SetMainPortfolioResponse } from "./portfolio_messages_nest";
7
7
  export declare const protobufPackage = "micro.v1.portfolio";
8
8
  export declare const MICRO_V1_PORTFOLIO_PACKAGE_NAME = "micro.v1.portfolio";
9
9
  export interface PPortfolioServiceClient {
@@ -21,6 +21,8 @@ export interface PPortfolioServiceClient {
21
21
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
22
22
  getPortfolioByCoinId(request: ByIdRequest, metadata?: Metadata): Observable<PortfolioByCoinIdResponse>;
23
23
  getPortfolioUser(request: ByIdRequest, metadata?: Metadata): Observable<PortfolioUserResponse>;
24
+ setPublicPortfolio(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
25
+ getPublicPortfolio(request: ByIdRequest, metadata?: Metadata): Observable<PublicPortfolioResponse>;
24
26
  }
25
27
  export interface PPortfolioServiceController {
26
28
  store(request: PortfolioStoreRequest, metadata?: Metadata): Observable<PortfolioStoreResponse>;
@@ -37,6 +39,8 @@ export interface PPortfolioServiceController {
37
39
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
38
40
  getPortfolioByCoinId(request: ByIdRequest, metadata?: Metadata): Observable<PortfolioByCoinIdResponse>;
39
41
  getPortfolioUser(request: ByIdRequest, metadata?: Metadata): Observable<PortfolioUserResponse>;
42
+ setPublicPortfolio(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
43
+ getPublicPortfolio(request: ByIdRequest, metadata?: Metadata): Observable<PublicPortfolioResponse>;
40
44
  }
41
45
  export declare function PPortfolioServiceControllerMethods(): (constructor: Function) => void;
42
46
  export declare const P_PORTFOLIO_SERVICE_NAME = "PPortfolioService";
@@ -24,6 +24,8 @@ function PPortfolioServiceControllerMethods() {
24
24
  "removeUserData",
25
25
  "getPortfolioByCoinId",
26
26
  "getPortfolioUser",
27
+ "setPublicPortfolio",
28
+ "getPublicPortfolio",
27
29
  ];
28
30
  for (const method of grpcMethods) {
29
31
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.60",
3
+ "version": "1.1.62",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -77,6 +77,43 @@ message ChatMessageDto {
77
77
  string edited_at = 16;
78
78
  // Present only on type='poll' messages.
79
79
  ChatPollDto poll = 17;
80
+ // Attached photo/video; bytes are served separately by public_id.
81
+ ChatMediaDto media = 18;
82
+ }
83
+
84
+ // Media descriptor riding a message; the payload itself never travels with
85
+ // the message (fan-out stays light), it is fetched via GetChatMedia.
86
+ message ChatMediaDto {
87
+ string public_id = 1;
88
+ // image | video
89
+ string kind = 2;
90
+ uint32 width = 3;
91
+ uint32 height = 4;
92
+ }
93
+
94
+ message ChatMediaUploadRequest {
95
+ string group_slug = 1;
96
+ string kind = 2;
97
+ bytes data = 3;
98
+ string mimetype = 4;
99
+ }
100
+
101
+ message ChatMediaUploadResponse {
102
+ ResponseStatus status = 1;
103
+ string media_id = 2;
104
+ uint32 width = 3;
105
+ uint32 height = 4;
106
+ }
107
+
108
+ message ChatMediaGetRequest {
109
+ string public_id = 1;
110
+ }
111
+
112
+ message ChatMediaGetResponse {
113
+ ResponseStatus status = 1;
114
+ bytes data = 2;
115
+ string mimetype = 3;
116
+ string kind = 4;
80
117
  }
81
118
 
82
119
  // In-chat poll (rides a type='poll' message; dies with it via FK cascade).
@@ -15,6 +15,10 @@ service PChatService {
15
15
  rpc PinnedMessages(PinnedMessagesRequest) returns(stream PinnedMessagesResponse) {}
16
16
  rpc ListMembers(GroupBySlugRequest) returns(stream ChatMemberListResponse) {}
17
17
  rpc GetGroupPhoto(ByIdRequest) returns(stream GroupPhotoResponse) {}
18
+ // Authed upload (staging row); the send then references media_id.
19
+ rpc UploadChatMedia(ChatMediaUploadRequest) returns(stream ChatMediaUploadResponse) {}
20
+ // Public serve by unguessable public_id (capability URL).
21
+ rpc GetChatMedia(ChatMediaGetRequest) returns(stream ChatMediaGetResponse) {}
18
22
 
19
23
  rpc ReportMessage(ReportMessageRequest) returns(stream EmptyResponse) {}
20
24
  rpc BlockUser(BlockUserRequest) returns(stream EmptyResponse) {}
@@ -30,6 +30,7 @@ message PortfolioDto {
30
30
 
31
31
  string createdAt = 6;
32
32
  string updatedAt = 7;
33
+ bool isPublic = 8;
33
34
  }
34
35
 
35
36
  message PortfoliosResponse {
@@ -116,6 +117,7 @@ message PortfolioBundleDto {
116
117
  string createdAt = 5;
117
118
  string updatedAt = 6;
118
119
  repeated PortfolioCoinBundleDto portfolioCoins = 7;
120
+ bool isPublic = 8;
119
121
  }
120
122
 
121
123
  message PortfolioCoinBundleDto {
@@ -185,3 +187,24 @@ message DefaultCurrencyResponse {
185
187
  ResponseStatus status = 1;
186
188
  CurrencyDto data = 2;
187
189
  }
190
+
191
+ // Public portfolio showcase: percentage distribution only. Deliberately no
192
+ // portfolio id, no amounts, no prices, no transactions.
193
+ message PublicPortfolioItemDto {
194
+ string coin_id = 1;
195
+ string symbol = 2;
196
+ string name = 3;
197
+ // "34.6" — percent of current portfolio value, 1 decimal.
198
+ string percent = 4;
199
+ }
200
+
201
+ message PublicPortfolioDto {
202
+ string name = 1;
203
+ uint32 coin_count = 2;
204
+ repeated PublicPortfolioItemDto items = 3;
205
+ }
206
+
207
+ message PublicPortfolioResponse {
208
+ ResponseStatus status = 1;
209
+ optional PublicPortfolioDto data = 2;
210
+ }
@@ -22,6 +22,10 @@ service PPortfolioService {
22
22
  rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
23
23
  rpc GetPortfolioByCoinId(ByIdRequest) returns(stream PortfolioByCoinIdResponse) {}
24
24
  rpc GetPortfolioUser(ByIdRequest) returns(stream PortfolioUserResponse) {}
25
+ // id = portfolio id to publish, empty string = hide.
26
+ rpc SetPublicPortfolio(ByIdRequest) returns(stream EmptyResponse) {}
27
+ // id = target user id; unauthenticated read, percent distribution only.
28
+ rpc GetPublicPortfolio(ByIdRequest) returns(stream PublicPortfolioResponse) {}
25
29
  }
26
30
 
27
31
  service PPortfolioCoinService {