@devline-smart-taxi/common 2.3.51 → 2.3.52

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/index.d.ts CHANGED
@@ -42,3 +42,4 @@ export * from './proto/wallet-proto-path';
42
42
  export * from './proto/bonus-campaign-proto-path';
43
43
  export * from './proto/support-contact-proto-path';
44
44
  export * from './proto/legal-document-proto-path';
45
+ export * from './proto/chat-message-proto-path';
package/dist/index.js CHANGED
@@ -59,3 +59,4 @@ __exportStar(require("./proto/wallet-proto-path"), exports);
59
59
  __exportStar(require("./proto/bonus-campaign-proto-path"), exports);
60
60
  __exportStar(require("./proto/support-contact-proto-path"), exports);
61
61
  __exportStar(require("./proto/legal-document-proto-path"), exports);
62
+ __exportStar(require("./proto/chat-message-proto-path"), exports);
@@ -0,0 +1 @@
1
+ export declare const chatMessageProtoPath: string;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chatMessageProtoPath = void 0;
4
+ exports.chatMessageProtoPath = `${__dirname}/chat-message.proto`;
@@ -0,0 +1,3 @@
1
+ declare const __dirname: string;
2
+
3
+ export const chatMessageProtoPath = `${__dirname}/chat-message.proto`;
@@ -0,0 +1,72 @@
1
+ syntax = "proto3";
2
+
3
+ package chat_message;
4
+
5
+ import "common.proto";
6
+
7
+ // ==========================================
8
+ // 1. SERVICE
9
+ // ==========================================
10
+
11
+ service ChatMessageService {
12
+ rpc GetMyMessages (GetMyMessagesRequest) returns (MessageListResponse);
13
+ rpc GetByTripId (GetByTripIdRequest) returns (MessageListResponse);
14
+ rpc GetById (common.IdRequest) returns (SingleMessageResponse);
15
+ }
16
+
17
+ // ==========================================
18
+ // 2. DATA MESSAGES
19
+ // ==========================================
20
+
21
+ message MessageData {
22
+ string id = 1;
23
+ optional string correlationId = 2;
24
+ optional string tripId = 3;
25
+ string senderId = 4;
26
+ string senderType = 5;
27
+ string recipientId = 6;
28
+ string recipientType = 7;
29
+ string category = 8;
30
+ string type = 9;
31
+ string content = 10;
32
+ optional string metadata = 11;
33
+ string priority = 12;
34
+ string status = 13;
35
+ string createdAt = 14;
36
+ optional string updatedAt = 15;
37
+ optional string sentAt = 16;
38
+ optional string deliveredAt = 17;
39
+ optional string readAt = 18;
40
+ }
41
+
42
+ // ==========================================
43
+ // 3. REQUESTS
44
+ // ==========================================
45
+
46
+ message GetMyMessagesRequest {
47
+ string userId = 1;
48
+ int32 limit = 2;
49
+ int32 offset = 3;
50
+ }
51
+
52
+ message GetByTripIdRequest {
53
+ string tripId = 1;
54
+ int32 limit = 2;
55
+ int32 offset = 3;
56
+ }
57
+
58
+ // ==========================================
59
+ // 4. RESPONSES
60
+ // ==========================================
61
+
62
+ message MessageListResponse {
63
+ int32 statusCode = 1;
64
+ string message = 2;
65
+ repeated MessageData data = 3;
66
+ }
67
+
68
+ message SingleMessageResponse {
69
+ int32 statusCode = 1;
70
+ string message = 2;
71
+ MessageData data = 3;
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.51",
3
+ "version": "2.3.52",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",