Size: 1154 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// cs/apps/trycopilot.ai/protos/user.proto.hh
// cs/apps/trycopilot.ai/protos/user.proto.hh
// cs/apps/trycopilot.ai/protos/user.proto.hh
#ifndef CS_APPS_TRYCOPILOT_AI_PROTOS_USER_PROTO_HH
#define CS_APPS_TRYCOPILOT_AI_PROTOS_USER_PROTO_HH

#include <string>

#include "cs/net/proto/proto.hh"

namespace cs::apps::trycopilotai::protos {

// Password hash data.
DECLARE_PROTO(Password) {
  // Password salt.
  std::string salt;
  // Password hash.
  std::string hash;
};

// User account payload.
DECLARE_PROTO(User) {
  // User UUID.
  std::string uuid;
  // User email.
  std::string email;
  // Password data.
  Password password;
  // Admin flag.
  bool admin;
};

// Create user request.
DECLARE_PROTO(CreateUserRequest) {
  // User email.
  std::string email;
  // Password text.
  std::string password;
  // Confirm password text.
  std::string confirm_password;
};

// Create user response.
DECLARE_PROTO(CreateUserResponse) {
  // User email.
  std::string email;
  // User UUID.
  std::string user_uuid;
  // Created flag.
  bool created;
};

}  // namespace cs::apps::trycopilotai::protos

#endif  // CS_APPS_TRYCOPILOT_AI_PROTOS_USER_PROTO_HH
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-3:8080 in 4ms.