@trash-streamers/contracts 1.1.89 → 1.1.91
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.
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { FieldMask } from "./common";
|
|
3
|
+
export declare const protobufPackage = "system.chats.v1";
|
|
4
|
+
export interface GetUserMessagesRequest {
|
|
5
|
+
userId: string;
|
|
6
|
+
publicKey: string;
|
|
7
|
+
selectMask: FieldMask | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface GetUserMessagesResponse {
|
|
10
|
+
chatId: string;
|
|
11
|
+
encryptedChatKey: string;
|
|
12
|
+
messages: SystemMessage[];
|
|
13
|
+
}
|
|
14
|
+
export interface SystemMessage {
|
|
15
|
+
id: string;
|
|
16
|
+
chatId: string;
|
|
17
|
+
senderId: string;
|
|
18
|
+
content: string;
|
|
19
|
+
authTag: string;
|
|
20
|
+
initialVector: string;
|
|
21
|
+
isEdited: boolean;
|
|
22
|
+
isDeleted: boolean;
|
|
23
|
+
createdAt: Date | undefined;
|
|
24
|
+
updatedAt: Date | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare const SYSTEM_CHATS_V1_PACKAGE_NAME = "system.chats.v1";
|
|
27
|
+
export interface SystemChatsServiceClient {
|
|
28
|
+
getUserMessages(request: GetUserMessagesRequest): Observable<GetUserMessagesResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface SystemChatsServiceController {
|
|
31
|
+
getUserMessages(request: GetUserMessagesRequest): Promise<GetUserMessagesResponse> | Observable<GetUserMessagesResponse> | GetUserMessagesResponse;
|
|
32
|
+
}
|
|
33
|
+
export declare function SystemChatsServiceControllerMethods(): (constructor: Function) => void;
|
|
34
|
+
export declare const SYSTEM_CHATS_SERVICE_NAME = "SystemChatsService";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.10.1
|
|
5
|
+
// protoc v6.33.5
|
|
6
|
+
// source: system-chats.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SYSTEM_CHATS_SERVICE_NAME = exports.SYSTEM_CHATS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.SystemChatsServiceControllerMethods = SystemChatsServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
13
|
+
exports.protobufPackage = "system.chats.v1";
|
|
14
|
+
exports.SYSTEM_CHATS_V1_PACKAGE_NAME = "system.chats.v1";
|
|
15
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
16
|
+
fromObject(value) {
|
|
17
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
18
|
+
},
|
|
19
|
+
toObject(message) {
|
|
20
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
function SystemChatsServiceControllerMethods() {
|
|
24
|
+
return function (constructor) {
|
|
25
|
+
const grpcMethods = ["getUserMessages"];
|
|
26
|
+
for (const method of grpcMethods) {
|
|
27
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
28
|
+
(0, microservices_1.GrpcMethod)("SystemChatsService", method)(constructor.prototype[method], method, descriptor);
|
|
29
|
+
}
|
|
30
|
+
const grpcStreamMethods = [];
|
|
31
|
+
for (const method of grpcStreamMethods) {
|
|
32
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
33
|
+
(0, microservices_1.GrpcStreamMethod)("SystemChatsService", method)(constructor.prototype[method], method, descriptor);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.SYSTEM_CHATS_SERVICE_NAME = "SystemChatsService";
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ package system.chats.v1;
|
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/timestamp.proto";
|
|
6
6
|
|
|
7
|
-
import "
|
|
7
|
+
import "common.proto";
|
|
8
8
|
|
|
9
9
|
service SystemChatsService {
|
|
10
10
|
rpc GetUserMessages (GetUserMessagesRequest) returns (GetUserMessagesResponse);
|
|
@@ -19,16 +19,17 @@ message GetUserMessagesRequest {
|
|
|
19
19
|
message GetUserMessagesResponse {
|
|
20
20
|
string chat_id = 1;
|
|
21
21
|
string encrypted_chat_key = 2;
|
|
22
|
-
repeated
|
|
22
|
+
repeated SystemMessage messages = 3;
|
|
23
23
|
}
|
|
24
|
-
message
|
|
24
|
+
message SystemMessage {
|
|
25
25
|
string id = 1;
|
|
26
|
-
string
|
|
27
|
-
string
|
|
28
|
-
string
|
|
29
|
-
string
|
|
30
|
-
|
|
31
|
-
bool
|
|
32
|
-
|
|
33
|
-
google.protobuf.Timestamp
|
|
26
|
+
string chat_id = 2;
|
|
27
|
+
string sender_id = 3;
|
|
28
|
+
string content = 4;
|
|
29
|
+
string auth_tag = 5;
|
|
30
|
+
string initial_vector = 6;
|
|
31
|
+
bool is_edited = 7;
|
|
32
|
+
bool is_deleted = 8;
|
|
33
|
+
google.protobuf.Timestamp created_at = 9;
|
|
34
|
+
google.protobuf.Timestamp updated_at = 10;
|
|
34
35
|
}
|