@readytomog/contracts 1.3.1 → 1.3.2

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.
@@ -1,6 +1,6 @@
1
1
  import { Roles } from "../../types";
2
2
  export interface UpdateUserEvent {
3
- id: number;
3
+ id: string;
4
4
  email?: string;
5
5
  name?: string;
6
6
  surname?: string;
@@ -1,6 +1,6 @@
1
1
  export interface SendMessageEvent {
2
2
  message: string;
3
- sendFrom: number;
4
- sendTo: number;
5
- chatId: number;
3
+ sendFrom: string;
4
+ sendTo: string;
5
+ chatId: string;
6
6
  }
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: number;
14
+ participant: string;
15
15
  }
16
16
 
17
17
  export interface CreateChatResponse {
18
- id: number;
19
- participant1: number;
20
- participant2: number;
18
+ id: string;
19
+ participant1: string;
20
+ participant2: string;
21
21
  }
22
22
 
23
23
  export interface DeleteChatRequest {
24
- chatId: number;
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: number;
34
- recieverId: number;
35
- id: number;
33
+ senderId: string;
34
+ recieverId: string;
35
+ id: string;
36
36
  }
37
37
 
38
38
  export interface User {
39
- id: number;
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: number;
46
+ id: string;
47
47
  users: User[];
48
48
  lastMessage: string;
49
49
  }
50
50
 
51
51
  export interface GetMessagesRequest {
52
- chatId: number;
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: number;
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: number;
23
+ userId: string;
24
24
  }
25
25
 
26
26
  export interface GetUserByIdResponse {
27
- userId: number;
27
+ userId: string;
28
28
  name: string;
29
29
  surname: string;
30
30
  isOtpVerified: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readytomog/contracts",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Protobuf definitions and generated Typescript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/chat.proto CHANGED
@@ -10,17 +10,17 @@ service ChatService {
10
10
  }
11
11
 
12
12
  message CreateChatRequest {
13
- int32 participant = 1;
13
+ string participant = 1;
14
14
 
15
15
  }
16
16
  message CreateChatResponse {
17
- int32 id = 1;
18
- int32 participant1 = 2;
19
- int32 participant2 = 3;
17
+ string id = 1;
18
+ string participant1 = 2;
19
+ string participant2 = 3;
20
20
  }
21
21
 
22
22
  message DeleteChatRequest {
23
- int32 chatId = 1;
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
- int32 senderId = 2;
33
- int32 recieverId = 3;
34
- int32 id = 4;
32
+ string senderId = 2;
33
+ string recieverId = 3;
34
+ string id = 4;
35
35
  }
36
36
 
37
37
  message User {
38
- int32 id = 1;
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
- int32 id = 1;
45
+ string id = 1;
46
46
  repeated User users = 2;
47
47
  string lastMessage = 3;
48
48
  }
49
49
 
50
50
  message GetMessagesRequest {
51
- int32 chatId = 1;
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
- int32 userId = 1;
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
- int32 userId = 1;
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
- int32 userId = 1;
24
+ string userId = 1;
25
25
  string name = 2;
26
26
  string surname = 3;
27
27
  bool isOtpVerified = 4;