@readytomog/contracts 1.3.1 → 1.3.3
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/event/auth/create-user.interface.d.ts +1 -0
- package/dist/event/auth/update-user.interface.d.ts +1 -1
- package/dist/event/chat/send-message.interface.d.ts +3 -3
- package/dist/event/events-constants.d.ts +8 -0
- package/dist/event/events-constants.js +11 -0
- package/dist/event/index.d.ts +1 -0
- package/dist/event/index.js +1 -0
- package/gen/chat.ts +12 -12
- package/gen/user.ts +2 -2
- package/package.json +1 -1
- package/proto/chat.proto +12 -12
- package/proto/user.proto +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EVENT_CONSTANTS = void 0;
|
|
4
|
+
exports.EVENT_CONSTANTS = {
|
|
5
|
+
createUser: "auth.user.created",
|
|
6
|
+
updateUser: "user.update",
|
|
7
|
+
change2FA: "auth.2fa.status",
|
|
8
|
+
emailSend: "notification.email.send",
|
|
9
|
+
smsSend: "notification.phone.send",
|
|
10
|
+
sendChatMessage: "chat.message.send",
|
|
11
|
+
};
|
package/dist/event/index.d.ts
CHANGED
package/dist/event/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./auth"), exports);
|
|
18
18
|
__exportStar(require("./chat"), exports);
|
|
19
|
+
__exportStar(require("./events-constants"), exports);
|
package/gen/chat.ts
CHANGED
|
@@ -11,17 +11,17 @@ import { Observable } from "rxjs";
|
|
|
11
11
|
export const protobufPackage = "chat.v1";
|
|
12
12
|
|
|
13
13
|
export interface CreateChatRequest {
|
|
14
|
-
participant:
|
|
14
|
+
participant: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface CreateChatResponse {
|
|
18
|
-
id:
|
|
19
|
-
participant1:
|
|
20
|
-
participant2:
|
|
18
|
+
id: string;
|
|
19
|
+
participant1: string;
|
|
20
|
+
participant2: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface DeleteChatRequest {
|
|
24
|
-
chatId:
|
|
24
|
+
chatId: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface DeleteChatResponse {
|
|
@@ -30,26 +30,26 @@ export interface DeleteChatResponse {
|
|
|
30
30
|
|
|
31
31
|
export interface Mesage {
|
|
32
32
|
message: string;
|
|
33
|
-
senderId:
|
|
34
|
-
recieverId:
|
|
35
|
-
id:
|
|
33
|
+
senderId: string;
|
|
34
|
+
recieverId: string;
|
|
35
|
+
id: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface User {
|
|
39
|
-
id:
|
|
39
|
+
id: string;
|
|
40
40
|
name: string;
|
|
41
41
|
surname: string;
|
|
42
42
|
avatar: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface Chat {
|
|
46
|
-
id:
|
|
46
|
+
id: string;
|
|
47
47
|
users: User[];
|
|
48
48
|
lastMessage: string;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export interface GetMessagesRequest {
|
|
52
|
-
chatId:
|
|
52
|
+
chatId: string;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface GetMessagesResponse {
|
|
@@ -57,7 +57,7 @@ export interface GetMessagesResponse {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export interface GetChatsRequest {
|
|
60
|
-
userId:
|
|
60
|
+
userId: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export interface GetChatsResponse {
|
package/gen/user.ts
CHANGED
|
@@ -20,11 +20,11 @@ export enum Role {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface GetUserByIdRequst {
|
|
23
|
-
userId:
|
|
23
|
+
userId: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface GetUserByIdResponse {
|
|
27
|
-
userId:
|
|
27
|
+
userId: string;
|
|
28
28
|
name: string;
|
|
29
29
|
surname: string;
|
|
30
30
|
isOtpVerified: boolean;
|
package/package.json
CHANGED
package/proto/chat.proto
CHANGED
|
@@ -10,17 +10,17 @@ service ChatService {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
message CreateChatRequest {
|
|
13
|
-
|
|
13
|
+
string participant = 1;
|
|
14
14
|
|
|
15
15
|
}
|
|
16
16
|
message CreateChatResponse {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
string id = 1;
|
|
18
|
+
string participant1 = 2;
|
|
19
|
+
string participant2 = 3;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
message DeleteChatRequest {
|
|
23
|
-
|
|
23
|
+
string chatId = 1;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
message DeleteChatResponse {
|
|
@@ -29,26 +29,26 @@ message DeleteChatResponse {
|
|
|
29
29
|
|
|
30
30
|
message Mesage {
|
|
31
31
|
string message = 1;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
string senderId = 2;
|
|
33
|
+
string recieverId = 3;
|
|
34
|
+
string id = 4;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
message User {
|
|
38
|
-
|
|
38
|
+
string id = 1;
|
|
39
39
|
string name = 2;
|
|
40
40
|
string surname =3;
|
|
41
41
|
string avatar =4;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
message Chat {
|
|
45
|
-
|
|
45
|
+
string id = 1;
|
|
46
46
|
repeated User users = 2;
|
|
47
47
|
string lastMessage = 3;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
message GetMessagesRequest {
|
|
51
|
-
|
|
51
|
+
string chatId = 1;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
message GetMessagesResponse {
|
|
@@ -56,7 +56,7 @@ message GetMessagesResponse {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
message GetChatsRequest {
|
|
59
|
-
|
|
59
|
+
string userId = 1;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
message GetChatsResponse {
|
package/proto/user.proto
CHANGED
|
@@ -8,7 +8,7 @@ service UserService {
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
message GetUserByIdRequst {
|
|
11
|
-
|
|
11
|
+
string userId = 1;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ enum Role {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
message GetUserByIdResponse{
|
|
24
|
-
|
|
24
|
+
string userId = 1;
|
|
25
25
|
string name = 2;
|
|
26
26
|
string surname = 3;
|
|
27
27
|
bool isOtpVerified = 4;
|