@sorokchat-messenger/microservices 1.0.7 → 1.0.8

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.
@@ -34,7 +34,7 @@ export interface ProfileRequest {
34
34
  accessToken: string;
35
35
  }
36
36
  export interface ProfileResponse {
37
- id: string;
37
+ id: number;
38
38
  login: string;
39
39
  displayName?: string | undefined;
40
40
  role: Role;
@@ -7,62 +7,62 @@ export declare enum ChatRole {
7
7
  UNRECOGNIZED = "UNRECOGNIZED"
8
8
  }
9
9
  export interface CreateChatRequest {
10
- actorId: string;
10
+ actorId: number;
11
11
  name: string;
12
12
  description: string;
13
13
  }
14
14
  export interface CreateChatResponse {
15
- id: string;
15
+ id: number;
16
16
  }
17
17
  export interface UpdateChatRequest {
18
- id: string;
18
+ id: number;
19
19
  name?: string | undefined;
20
20
  description?: string | undefined;
21
21
  }
22
22
  export interface DeleteChatRequest {
23
- id: string;
24
- actorId: string;
23
+ id: number;
24
+ actorId: number;
25
25
  }
26
26
  export interface GetChatByIdRequest {
27
- id: string;
27
+ id: number;
28
28
  }
29
29
  export interface GetChatByIdResponse {
30
30
  chat: ChatResponse | undefined;
31
31
  }
32
32
  export interface GetChatsByNameRequest {
33
33
  name: string;
34
- limit?: string | undefined;
35
- offset?: string | undefined;
34
+ limit?: number | undefined;
35
+ offset?: number | undefined;
36
36
  }
37
37
  export interface GetChatsByNameResponse {
38
38
  chats: ChatResponse[];
39
39
  }
40
40
  export interface ChatResponse {
41
- id: string;
41
+ id: number;
42
42
  name: string;
43
43
  description: string;
44
44
  participants: ParticipantResponse[];
45
45
  }
46
46
  export interface ParticipantResponse {
47
- userId: string;
47
+ userId: number;
48
48
  login: string;
49
49
  displayName: string;
50
50
  role: ChatRole;
51
51
  }
52
52
  export interface AddMemberToChatRequest {
53
- chatId: string;
54
- userId: string;
55
- actorId: string;
53
+ chatId: number;
54
+ userId: number;
55
+ actorId: number;
56
56
  }
57
57
  export interface RemoveMemberFromChatRequest {
58
- chatId: string;
59
- userId: string;
60
- actorId: string;
58
+ chatId: number;
59
+ userId: number;
60
+ actorId: number;
61
61
  }
62
62
  export interface ChangeRoleRequest {
63
- chatId: string;
64
- userId: string;
65
- actorId: string;
63
+ chatId: number;
64
+ userId: number;
65
+ actorId: number;
66
66
  role: ChatRole;
67
67
  }
68
68
  export declare const CHATS_V1_PACKAGE_NAME = "chats.v1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sorokchat-messenger/microservices",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Microservices contracts for sorokchat backend",
5
5
  "keywords": [
6
6
  "sorokchat",
@@ -44,7 +44,7 @@ message ProfileRequest {
44
44
  }
45
45
 
46
46
  message ProfileResponse {
47
- int64 id = 1;
47
+ int32 id = 1;
48
48
  string login = 2;
49
49
  optional string display_name = 3;
50
50
  Role role = 4;
package/proto/chats.proto CHANGED
@@ -16,28 +16,28 @@ service ChatsService {
16
16
  }
17
17
 
18
18
  message CreateChatRequest {
19
- int64 actor_id = 1;
19
+ int32 actor_id = 1;
20
20
  string name = 2;
21
21
  string description = 3;
22
22
  }
23
23
 
24
24
  message CreateChatResponse {
25
- int64 id = 1;
25
+ int32 id = 1;
26
26
  }
27
27
 
28
28
  message UpdateChatRequest {
29
- int64 id = 1;
29
+ int32 id = 1;
30
30
  optional string name = 2;
31
31
  optional string description = 3;
32
32
  }
33
33
 
34
34
  message DeleteChatRequest {
35
- int64 id = 1;
36
- int64 actor_id = 2;
35
+ int32 id = 1;
36
+ int32 actor_id = 2;
37
37
  }
38
38
 
39
39
  message GetChatByIdRequest {
40
- int64 id = 1;
40
+ int32 id = 1;
41
41
  }
42
42
 
43
43
  message GetChatByIdResponse {
@@ -46,8 +46,8 @@ message GetChatByIdResponse {
46
46
 
47
47
  message GetChatsByNameRequest {
48
48
  string name = 1;
49
- optional int64 limit = 2;
50
- optional int64 offset = 3;
49
+ optional int32 limit = 2;
50
+ optional int32 offset = 3;
51
51
  }
52
52
 
53
53
  message GetChatsByNameResponse {
@@ -55,14 +55,14 @@ message GetChatsByNameResponse {
55
55
  }
56
56
 
57
57
  message ChatResponse {
58
- int64 id = 1;
58
+ int32 id = 1;
59
59
  string name = 2;
60
60
  string description = 3;
61
61
  repeated ParticipantResponse participants = 4;
62
62
  }
63
63
 
64
64
  message ParticipantResponse {
65
- int64 user_id = 1;
65
+ int32 user_id = 1;
66
66
  string login = 2;
67
67
  string display_name = 3;
68
68
  ChatRole role = 4;
@@ -74,20 +74,20 @@ enum ChatRole {
74
74
  }
75
75
 
76
76
  message AddMemberToChatRequest {
77
- int64 chat_id = 1;
78
- int64 user_id = 2;
79
- int64 actor_id = 3;
77
+ int32 chat_id = 1;
78
+ int32 user_id = 2;
79
+ int32 actor_id = 3;
80
80
  }
81
81
 
82
82
  message RemoveMemberFromChatRequest {
83
- int64 chat_id = 1;
84
- int64 user_id = 2;
85
- int64 actor_id = 3;
83
+ int32 chat_id = 1;
84
+ int32 user_id = 2;
85
+ int32 actor_id = 3;
86
86
  }
87
87
 
88
88
  message ChangeRoleRequest {
89
- int64 chat_id = 1;
90
- int64 user_id = 2;
91
- int64 actor_id = 3;
89
+ int32 chat_id = 1;
90
+ int32 user_id = 2;
91
+ int32 actor_id = 3;
92
92
  ChatRole role = 4;
93
93
  }