@readytomog/contracts 1.5.6 → 1.5.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readytomog/contracts",
3
- "version": "1.5.6",
3
+ "version": "1.5.9",
4
4
  "description": "Protobuf definitions and generated Typescript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,6 +20,7 @@
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
22
  "@nestjs/microservices": "^11.1.27",
23
+ "@readytomog/contracts": "^1.5.6",
23
24
  "rxjs": "^7.8.2",
24
25
  "ts-proto": "^2.11.8"
25
26
  },
package/gen/chat.d.ts DELETED
@@ -1,60 +0,0 @@
1
- import { Observable } from "rxjs";
2
- export declare const protobufPackage = "chat.v1";
3
- export interface CreateChatRequest {
4
- participant: number;
5
- }
6
- export interface CreateChatResponse {
7
- id: number;
8
- participant1: number;
9
- participant2: number;
10
- }
11
- export interface DeleteChatRequest {
12
- chatId: number;
13
- }
14
- export interface DeleteChatResponse {
15
- message: string;
16
- }
17
- export interface Mesage {
18
- message: string;
19
- senderId: number;
20
- recieverId: number;
21
- id: number;
22
- }
23
- export interface User {
24
- id: number;
25
- name: string;
26
- surname: string;
27
- avatar: string;
28
- }
29
- export interface Chat {
30
- id: number;
31
- users: User[];
32
- lastMessage: string;
33
- }
34
- export interface GetMessagesRequest {
35
- chatId: number;
36
- }
37
- export interface GetMessagesResponse {
38
- mesages: Mesage[];
39
- }
40
- export interface GetChatsRequest {
41
- userId: number;
42
- }
43
- export interface GetChatsResponse {
44
- chats: Chat[];
45
- }
46
- export declare const CHAT_V1_PACKAGE_NAME = "chat.v1";
47
- export interface ChatServiceClient {
48
- createChat(request: CreateChatRequest): Observable<CreateChatResponse>;
49
- deleteChat(request: DeleteChatRequest): Observable<DeleteChatResponse>;
50
- getMessages(request: GetMessagesRequest): Observable<GetMessagesResponse>;
51
- getChats(request: GetChatsRequest): Observable<GetChatsResponse>;
52
- }
53
- export interface ChatServiceController {
54
- createChat(request: CreateChatRequest): Promise<CreateChatResponse> | Observable<CreateChatResponse> | CreateChatResponse;
55
- deleteChat(request: DeleteChatRequest): Promise<DeleteChatResponse> | Observable<DeleteChatResponse> | DeleteChatResponse;
56
- getMessages(request: GetMessagesRequest): Promise<GetMessagesResponse> | Observable<GetMessagesResponse> | GetMessagesResponse;
57
- getChats(request: GetChatsRequest): Promise<GetChatsResponse> | Observable<GetChatsResponse> | GetChatsResponse;
58
- }
59
- export declare function ChatServiceControllerMethods(): (constructor: Function) => void;
60
- export declare const CHAT_SERVICE_NAME = "ChatService";
package/gen/chat.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHAT_SERVICE_NAME = exports.CHAT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
4
- exports.ChatServiceControllerMethods = ChatServiceControllerMethods;
5
- const microservices_1 = require("@nestjs/microservices");
6
- exports.protobufPackage = "chat.v1";
7
- exports.CHAT_V1_PACKAGE_NAME = "chat.v1";
8
- function ChatServiceControllerMethods() {
9
- return function (constructor) {
10
- const grpcMethods = ["createChat", "deleteChat", "getMessages", "getChats"];
11
- for (const method of grpcMethods) {
12
- const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
13
- (0, microservices_1.GrpcMethod)("ChatService", method)(constructor.prototype[method], method, descriptor);
14
- }
15
- const grpcStreamMethods = [];
16
- for (const method of grpcStreamMethods) {
17
- const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
18
- (0, microservices_1.GrpcStreamMethod)("ChatService", method)(constructor.prototype[method], method, descriptor);
19
- }
20
- };
21
- }
22
- exports.CHAT_SERVICE_NAME = "ChatService";
23
- //# sourceMappingURL=chat.js.map
package/gen/chat.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["chat.ts"],"names":[],"mappings":";;;AA8FA,oEAaC;AApGD,yDAAqE;AAGxD,QAAA,eAAe,GAAG,SAAS,CAAC;AAwD5B,QAAA,oBAAoB,GAAG,SAAS,CAAC;AA4B9C,SAAgB,4BAA4B;IAC1C,OAAO,UAAU,WAAqB;QACpC,MAAM,WAAW,GAAa,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;QACtF,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,IAAA,0BAAU,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACvF,CAAC;QACD,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE,CAAC;YACvC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,IAAA,gCAAgB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,iBAAiB,GAAG,aAAa,CAAC"}