@sorokchat-messenger/microservices 1.0.9 → 1.0.11

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: number;
37
+ id: string;
38
38
  login: string;
39
39
  displayName?: string | undefined;
40
40
  role: Role;
@@ -7,24 +7,24 @@ export declare enum ChatRole {
7
7
  UNRECOGNIZED = "UNRECOGNIZED"
8
8
  }
9
9
  export interface CreateChatRequest {
10
- actorId: number;
10
+ actorId: string;
11
11
  name: string;
12
12
  description: string;
13
13
  }
14
14
  export interface CreateChatResponse {
15
- id: number;
15
+ id: string;
16
16
  }
17
17
  export interface UpdateChatRequest {
18
- id: number;
18
+ id: string;
19
19
  name?: string | undefined;
20
20
  description?: string | undefined;
21
21
  }
22
22
  export interface DeleteChatRequest {
23
- id: number;
24
- actorId: number;
23
+ id: string;
24
+ actorId: string;
25
25
  }
26
26
  export interface GetChatByIdRequest {
27
- id: number;
27
+ id: string;
28
28
  }
29
29
  export interface GetChatByIdResponse {
30
30
  chat: ChatResponse | undefined;
@@ -38,31 +38,31 @@ export interface GetChatsByNameResponse {
38
38
  chats: ChatResponse[];
39
39
  }
40
40
  export interface ChatResponse {
41
- id: number;
41
+ id: string;
42
42
  name: string;
43
43
  description: string;
44
44
  participants: ParticipantResponse[];
45
45
  }
46
46
  export interface ParticipantResponse {
47
- userId: number;
47
+ userId: string;
48
48
  login: string;
49
49
  displayName: string;
50
50
  role: ChatRole;
51
51
  }
52
52
  export interface AddMemberToChatRequest {
53
- chatId: number;
54
- userId: number;
55
- actorId: number;
53
+ chatId: string;
54
+ userId: string;
55
+ actorId: string;
56
56
  }
57
57
  export interface RemoveMemberFromChatRequest {
58
- chatId: number;
59
- userId: number;
60
- actorId: number;
58
+ chatId: string;
59
+ userId: string;
60
+ actorId: string;
61
61
  }
62
62
  export interface ChangeRoleRequest {
63
- chatId: number;
64
- userId: number;
65
- actorId: number;
63
+ chatId: string;
64
+ userId: string;
65
+ actorId: string;
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.9",
3
+ "version": "1.0.11",
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
- int32 id = 1;
47
+ string 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
- int32 actor_id = 1;
19
+ string actor_id = 1;
20
20
  string name = 2;
21
21
  string description = 3;
22
22
  }
23
23
 
24
24
  message CreateChatResponse {
25
- int32 id = 1;
25
+ string id = 1;
26
26
  }
27
27
 
28
28
  message UpdateChatRequest {
29
- int32 id = 1;
29
+ string id = 1;
30
30
  optional string name = 2;
31
31
  optional string description = 3;
32
32
  }
33
33
 
34
34
  message DeleteChatRequest {
35
- int32 id = 1;
36
- int32 actor_id = 2;
35
+ string id = 1;
36
+ string actor_id = 2;
37
37
  }
38
38
 
39
39
  message GetChatByIdRequest {
40
- int32 id = 1;
40
+ string id = 1;
41
41
  }
42
42
 
43
43
  message GetChatByIdResponse {
@@ -55,14 +55,14 @@ message GetChatsByNameResponse {
55
55
  }
56
56
 
57
57
  message ChatResponse {
58
- int32 id = 1;
58
+ string 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
- int32 user_id = 1;
65
+ string 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
- int32 chat_id = 1;
78
- int32 user_id = 2;
79
- int32 actor_id = 3;
77
+ string chat_id = 1;
78
+ string user_id = 2;
79
+ string actor_id = 3;
80
80
  }
81
81
 
82
82
  message RemoveMemberFromChatRequest {
83
- int32 chat_id = 1;
84
- int32 user_id = 2;
85
- int32 actor_id = 3;
83
+ string chat_id = 1;
84
+ string user_id = 2;
85
+ string actor_id = 3;
86
86
  }
87
87
 
88
88
  message ChangeRoleRequest {
89
- int32 chat_id = 1;
90
- int32 user_id = 2;
91
- int32 actor_id = 3;
89
+ string chat_id = 1;
90
+ string user_id = 2;
91
+ string actor_id = 3;
92
92
  ChatRole role = 4;
93
93
  }