protobuf-platform 1.0.104 → 1.0.106

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.104",
3
+ "version": "1.0.106",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -12,11 +12,17 @@ service User {
12
12
  rpc addPermissionToUserRole(RolePermissionRequest) returns (RolePermissionStatusResponse);
13
13
  rpc rolesList(PaginationRequest) returns (RolesItemsResponse);
14
14
  rpc getSingleRole(GetRoleRequest) returns (Role);
15
+ //CRUD
16
+ rpc readListUsers(PaginationRequest) returns (UsersResponse);
15
17
  }
16
18
 
17
19
  message PingRequest { string ping = 1; }
18
20
  message PongResponse { string pong = 1; }
19
- message PaginationRequest { int32 limit = 1; int32 offset = 2; }
21
+ message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchParams user_search_params = 3; }
22
+ message UserSearchParams {
23
+ repeated string user_public_ids = 1;
24
+ repeated int32 user_ids = 2;
25
+ }
20
26
 
21
27
  //Auth [Registration & Login]
22
28
  message RegistrationRequest {
@@ -52,18 +58,27 @@ message UserDataRequest {
52
58
  message UserDataResponse {
53
59
  int32 id = 1;
54
60
  string public_id = 2;
55
- string email = 3;
56
- optional string currency = 4;
57
- optional string country = 5;
58
- optional string first_name = 6;
59
- optional string last_name = 7;
60
- optional string birthday = 8;
61
- optional string locale = 9;
62
- optional string permissions = 10;
63
- optional string role_name = 11;
64
- optional float balance_real = 12;
65
- optional float balance_bonus = 13;
66
- optional string balance_type = 14;
61
+ optional string email = 3;
62
+ optional string phone = 4;
63
+ optional string currency = 5;
64
+ optional string country = 6;
65
+ optional string city = 7;
66
+ optional string first_name = 8;
67
+ optional string last_name = 9;
68
+ optional string birthday = 10;
69
+ optional string locale = 11;
70
+ optional string permissions = 12;
71
+ optional string role_name = 13;
72
+ optional string verification_name = 14;
73
+ optional float balance_real = 15;
74
+ optional float balance_bonus = 16;
75
+ optional string balance_type = 17;
76
+ optional int32 affiliate_id = 18;
77
+ }
78
+ message UsersResponse {
79
+ repeated UserDataResponse items = 1;
80
+ optional int32 total_pages = 2;
81
+ optional int32 total_items = 3;
67
82
  }
68
83
  //Permissions
69
84
  message RolePermissionRequest {
@@ -147,6 +147,17 @@ function deserialize_user_UserDataResponse(buffer_arg) {
147
147
  return user_pb.UserDataResponse.deserializeBinary(new Uint8Array(buffer_arg));
148
148
  }
149
149
 
150
+ function serialize_user_UsersResponse(arg) {
151
+ if (!(arg instanceof user_pb.UsersResponse)) {
152
+ throw new Error('Expected argument of type user.UsersResponse');
153
+ }
154
+ return Buffer.from(arg.serializeBinary());
155
+ }
156
+
157
+ function deserialize_user_UsersResponse(buffer_arg) {
158
+ return user_pb.UsersResponse.deserializeBinary(new Uint8Array(buffer_arg));
159
+ }
160
+
150
161
 
151
162
  var UserService = exports.UserService = {
152
163
  checkConnection: {
@@ -228,6 +239,18 @@ addPermissionToUserRole: {
228
239
  responseSerialize: serialize_user_Role,
229
240
  responseDeserialize: deserialize_user_Role,
230
241
  },
242
+ // CRUD
243
+ readListUsers: {
244
+ path: '/user.User/readListUsers',
245
+ requestStream: false,
246
+ responseStream: false,
247
+ requestType: user_pb.PaginationRequest,
248
+ responseType: user_pb.UsersResponse,
249
+ requestSerialize: serialize_user_PaginationRequest,
250
+ requestDeserialize: deserialize_user_PaginationRequest,
251
+ responseSerialize: serialize_user_UsersResponse,
252
+ responseDeserialize: deserialize_user_UsersResponse,
253
+ },
231
254
  };
232
255
 
233
256
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);