@in-human-resources/backend-proto 0.1.0 → 0.1.3

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.
@@ -0,0 +1,203 @@
1
+ syntax = "proto3";
2
+
3
+ package api.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/api/v1;apiv1";
6
+
7
+ import "api/v1/common.proto";
8
+
9
+ // CandidateService is the client-facing candidate profile service.
10
+ service CandidateService {
11
+ // Profile management
12
+ rpc GetCandidateProfile(GetCandidateProfileRequest) returns (CandidateProfileResponse);
13
+ rpc UpdateCandidateProfile(UpdateCandidateProfileRequest) returns (CandidateProfileResponse);
14
+ rpc UpdateCandidateSkills(UpdateCandidateSkillsRequest) returns (CandidateProfileResponse);
15
+ rpc UpdateCandidatePreferences(UpdateCandidatePreferencesRequest) returns (CandidateProfileResponse);
16
+
17
+ // Experience management
18
+ rpc AddCandidateExperience(AddCandidateExperienceRequest) returns (CandidateProfileResponse);
19
+ rpc UpdateCandidateExperience(UpdateCandidateExperienceRequest) returns (CandidateProfileResponse);
20
+ rpc DeleteCandidateExperience(DeleteCandidateExperienceRequest) returns (CandidateProfileResponse);
21
+
22
+ // Application readiness
23
+ rpc CheckApplicationReady(CheckApplicationReadyRequest) returns (CheckApplicationReadyResponse);
24
+
25
+ // Candidate onboarding (step-by-step)
26
+ rpc GetCandidateOnboardingStatus(GetCandidateOnboardingStatusRequest) returns (OnboardingStatusResponse);
27
+ rpc SubmitCandidateBasicProfile(SubmitCandidateBasicProfileRequest) returns (OnboardingStatusResponse);
28
+ rpc SubmitCandidateResume(SubmitCandidateResumeRequest) returns (OnboardingStatusResponse);
29
+ rpc SubmitCandidateSkills(SubmitCandidateSkillsRequest) returns (OnboardingStatusResponse);
30
+ rpc SubmitCandidateExperience(SubmitCandidateExperienceRequest) returns (OnboardingStatusResponse);
31
+ rpc SubmitCandidatePreferences(SubmitCandidatePreferencesRequest) returns (OnboardingStatusResponse);
32
+ rpc SkipCandidateOnboardingStep(SkipOnboardingStepRequest) returns (OnboardingStatusResponse);
33
+ rpc CompleteCandidateOnboarding(CompleteOnboardingRequest) returns (OnboardingStatusResponse);
34
+ }
35
+
36
+ // ==================== Profile Management ====================
37
+
38
+ message GetCandidateProfileRequest {
39
+ // User ID extracted from auth token
40
+ }
41
+
42
+ message CandidateProfileResponse {
43
+ string id = 1;
44
+ string user_id = 2;
45
+ string professional_headline = 3;
46
+ string phone = 4;
47
+ string location_city = 5;
48
+ string location_country = 6;
49
+ string linkedin_url = 7;
50
+ string resume_url = 8;
51
+ int32 years_of_experience = 9;
52
+ repeated CandidateSkill skills = 10;
53
+ repeated CandidateExperience experience = 11;
54
+ CandidatePreferences preferences = 12;
55
+ int32 profile_completion_percentage = 13;
56
+ bool can_apply_to_jobs = 14;
57
+ }
58
+
59
+ message CandidateSkill {
60
+ string id = 1;
61
+ string skill_name = 2;
62
+ string proficiency_level = 3; // "beginner", "intermediate", "advanced", "expert"
63
+ }
64
+
65
+ message CandidateExperience {
66
+ string id = 1;
67
+ string job_title = 2;
68
+ string company_name = 3;
69
+ string location = 4;
70
+ string start_date = 5; // YYYY-MM format
71
+ string end_date = 6; // YYYY-MM format or empty if current
72
+ bool is_current = 7;
73
+ string description = 8;
74
+ }
75
+
76
+ message CandidatePreferences {
77
+ repeated string preferred_job_types = 1; // "full_time", "part_time", "contract", "freelance"
78
+ repeated string preferred_industries = 2;
79
+ int32 expected_salary_min = 3;
80
+ int32 expected_salary_max = 4;
81
+ string expected_salary_currency = 5; // "USD", "EUR", "EGP", etc.
82
+ string preferred_work_mode = 6; // "remote", "hybrid", "onsite"
83
+ string availability = 7; // "immediate", "2_weeks", "1_month", "3_months"
84
+ }
85
+
86
+ message UpdateCandidateProfileRequest {
87
+ string professional_headline = 1;
88
+ string phone = 2;
89
+ string location_city = 3;
90
+ string location_country = 4;
91
+ string linkedin_url = 5;
92
+ int32 years_of_experience = 6;
93
+ // User ID extracted from auth token
94
+ }
95
+
96
+ message UpdateCandidateSkillsRequest {
97
+ repeated CandidateSkillInput skills = 1;
98
+ // User ID extracted from auth token
99
+ }
100
+
101
+ message CandidateSkillInput {
102
+ string skill_name = 1;
103
+ string proficiency_level = 2;
104
+ }
105
+
106
+ message UpdateCandidatePreferencesRequest {
107
+ repeated string preferred_job_types = 1;
108
+ repeated string preferred_industries = 2;
109
+ int32 expected_salary_min = 3;
110
+ int32 expected_salary_max = 4;
111
+ string expected_salary_currency = 5;
112
+ string preferred_work_mode = 6;
113
+ string availability = 7;
114
+ // User ID extracted from auth token
115
+ }
116
+
117
+ // ==================== Experience Management ====================
118
+
119
+ message AddCandidateExperienceRequest {
120
+ string job_title = 1;
121
+ string company_name = 2;
122
+ string location = 3;
123
+ string start_date = 4;
124
+ string end_date = 5;
125
+ bool is_current = 6;
126
+ string description = 7;
127
+ // User ID extracted from auth token
128
+ }
129
+
130
+ message UpdateCandidateExperienceRequest {
131
+ string experience_id = 1;
132
+ string job_title = 2;
133
+ string company_name = 3;
134
+ string location = 4;
135
+ string start_date = 5;
136
+ string end_date = 6;
137
+ bool is_current = 7;
138
+ string description = 8;
139
+ // User ID extracted from auth token
140
+ }
141
+
142
+ message DeleteCandidateExperienceRequest {
143
+ string experience_id = 1;
144
+ // User ID extracted from auth token
145
+ }
146
+
147
+ // ==================== Application Readiness ====================
148
+
149
+ message CheckApplicationReadyRequest {
150
+ // User ID extracted from auth token
151
+ }
152
+
153
+ message CheckApplicationReadyResponse {
154
+ bool can_apply = 1;
155
+ repeated string missing_fields = 2;
156
+ int32 completion_percentage = 3;
157
+ }
158
+
159
+ // ==================== Candidate Onboarding ====================
160
+
161
+ message GetCandidateOnboardingStatusRequest {
162
+ // User ID extracted from auth token
163
+ }
164
+
165
+ message SubmitCandidateBasicProfileRequest {
166
+ string professional_headline = 1;
167
+ string phone = 2;
168
+ string location_city = 3;
169
+ string location_country = 4;
170
+ // User ID extracted from auth token
171
+ }
172
+
173
+ message SubmitCandidateResumeRequest {
174
+ string resume_url = 1;
175
+ string resume_filename = 2;
176
+ // User ID extracted from auth token
177
+ }
178
+
179
+ message SubmitCandidateSkillsRequest {
180
+ repeated CandidateSkillInput skills = 1;
181
+ // User ID extracted from auth token
182
+ }
183
+
184
+ message SubmitCandidateExperienceRequest {
185
+ string job_title = 1;
186
+ string company_name = 2;
187
+ string location = 3;
188
+ string start_date = 4;
189
+ string end_date = 5;
190
+ bool is_current = 6;
191
+ string description = 7;
192
+ // User ID extracted from auth token
193
+ }
194
+
195
+ message SubmitCandidatePreferencesRequest {
196
+ repeated string preferred_job_types = 1;
197
+ string preferred_work_mode = 2;
198
+ string availability = 3;
199
+ int32 expected_salary_min = 4;
200
+ int32 expected_salary_max = 5;
201
+ string expected_salary_currency = 6;
202
+ // User ID extracted from auth token
203
+ }
@@ -0,0 +1,66 @@
1
+ syntax = "proto3";
2
+
3
+ package api.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/api/v1;apiv1";
6
+
7
+ // RequestContext contains metadata about the client request.
8
+ // This is optional and can be used for idempotency, tracing, etc.
9
+ message RequestContext {
10
+ string request_id = 1;
11
+ string idempotency_key = 2;
12
+ string client_version = 3;
13
+ string device_type = 4; // "mobile", "web", "desktop"
14
+ string device_id = 5;
15
+ map<string, string> metadata = 10;
16
+ }
17
+
18
+ // ProfileCompletion tracks how complete a user's profile is.
19
+ message ProfileCompletion {
20
+ int32 completion_percentage = 1;
21
+ bool can_apply_to_jobs = 2;
22
+ repeated string missing_for_application = 3;
23
+ string next_suggested_action = 4;
24
+ }
25
+
26
+ // SessionInfo represents an active user session.
27
+ message SessionInfo {
28
+ string session_id = 1;
29
+ string ip_address = 2;
30
+ string user_agent = 3;
31
+ string device_name = 4;
32
+ string location = 5;
33
+ string last_used_at = 6;
34
+ string created_at = 7;
35
+ bool is_current = 8;
36
+ }
37
+
38
+ // Empty is used for RPCs that don't return data (just success/failure).
39
+ message Empty {}
40
+
41
+ // ==================== Shared Onboarding Types ====================
42
+
43
+ // OnboardingStatusResponse is used by both company and candidate onboarding flows.
44
+ message OnboardingStatusResponse {
45
+ string entity_id = 1;
46
+ string current_step = 2;
47
+ bool onboarding_complete = 3;
48
+ repeated OnboardingStepDetail steps = 4;
49
+ int32 profile_completion_percentage = 5;
50
+ }
51
+
52
+ message OnboardingStepDetail {
53
+ string step = 1;
54
+ bool completed = 2;
55
+ bool skippable = 3;
56
+ bool skipped = 4;
57
+ }
58
+
59
+ message SkipOnboardingStepRequest {
60
+ string step = 1;
61
+ // User ID extracted from auth token
62
+ }
63
+
64
+ message CompleteOnboardingRequest {
65
+ // User ID extracted from auth token
66
+ }
@@ -0,0 +1,203 @@
1
+ syntax = "proto3";
2
+
3
+ package api.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/api/v1;apiv1";
6
+
7
+ import "api/v1/common.proto";
8
+
9
+ // CompanyService is the client-facing company management service.
10
+ service CompanyService {
11
+ // Company CRUD
12
+ rpc GetCompany(GetCompanyRequest) returns (GetCompanyResponse);
13
+ rpc GetMyCompany(GetMyCompanyRequest) returns (GetCompanyResponse);
14
+ rpc UpdateCompanyProfile(UpdateCompanyProfileRequest) returns (CompanyProfileResponse);
15
+
16
+ // Company members
17
+ rpc GetMyCompanyMembership(GetMyCompanyMembershipRequest) returns (CompanyMemberInfo);
18
+ rpc ListCompanyMembers(ListCompanyMembersRequest) returns (ListCompanyMembersResponse);
19
+ rpc InviteCompanyMember(InviteCompanyMemberRequest) returns (Empty);
20
+ rpc AcceptCompanyInvitation(AcceptCompanyInvitationRequest) returns (AcceptCompanyInvitationResponse);
21
+ rpc RemoveCompanyMember(RemoveCompanyMemberRequest) returns (Empty);
22
+ rpc UpdateCompanyMemberRole(UpdateCompanyMemberRoleRequest) returns (Empty);
23
+
24
+ // Company onboarding (step-by-step)
25
+ rpc GetCompanyOnboardingStatus(GetCompanyOnboardingStatusRequest) returns (OnboardingStatusResponse);
26
+ rpc SubmitAccountSetup(SubmitAccountSetupRequest) returns (OnboardingStatusResponse);
27
+ rpc SubmitCompanyInfo(SubmitCompanyInfoRequest) returns (OnboardingStatusResponse);
28
+ rpc SubmitCompanyDetails(SubmitCompanyDetailsRequest) returns (OnboardingStatusResponse);
29
+ rpc SubmitCompanyBranding(SubmitCompanyBrandingRequest) returns (OnboardingStatusResponse);
30
+ rpc SubmitCompanyInviteTeam(SubmitCompanyInviteTeamRequest) returns (OnboardingStatusResponse);
31
+ rpc SkipCompanyOnboardingStep(SkipOnboardingStepRequest) returns (OnboardingStatusResponse);
32
+ rpc CompleteCompanyOnboarding(CompleteOnboardingRequest) returns (OnboardingStatusResponse);
33
+ }
34
+
35
+ // ==================== Company CRUD ====================
36
+
37
+ message GetCompanyRequest {
38
+ string company_id = 1;
39
+ }
40
+
41
+ message GetMyCompanyRequest {
42
+ // User ID extracted from auth token
43
+ }
44
+
45
+ message GetCompanyResponse {
46
+ string company_id = 1;
47
+ string name = 2;
48
+ string slug = 3;
49
+ string website = 4;
50
+ string status = 5;
51
+ string created_at = 6;
52
+ string onboarding_status = 7;
53
+ string logo_url = 8;
54
+ string industry = 9;
55
+ string company_size = 10;
56
+ string description = 11;
57
+ string city = 12;
58
+ string country = 13;
59
+ int32 founded_year = 14;
60
+ string linkedin_url = 15;
61
+ string twitter_url = 16;
62
+ }
63
+
64
+ message CompanyProfileResponse {
65
+ string id = 1;
66
+ string name = 2;
67
+ string slug = 3;
68
+ string industry = 4;
69
+ string company_size = 5;
70
+ string description = 6;
71
+ string city = 7;
72
+ string country = 8;
73
+ string website = 9;
74
+ string logo_url = 10;
75
+ string linkedin_url = 11;
76
+ string twitter_url = 12;
77
+ int32 founded_year = 13;
78
+ int32 profile_completion_percentage = 14;
79
+ string status = 15;
80
+ }
81
+
82
+ message UpdateCompanyProfileRequest {
83
+ string name = 1;
84
+ string industry = 2;
85
+ string company_size = 3;
86
+ string description = 4;
87
+ string city = 5;
88
+ string country = 6;
89
+ string website = 7;
90
+ string logo_url = 8;
91
+ string linkedin_url = 9;
92
+ string twitter_url = 10;
93
+ int32 founded_year = 11;
94
+ // User ID extracted from auth token
95
+ }
96
+
97
+ // ==================== Company Members ====================
98
+
99
+ message GetMyCompanyMembershipRequest {
100
+ // User ID extracted from auth token
101
+ }
102
+
103
+ message CompanyMemberInfo {
104
+ string member_id = 1;
105
+ string user_id = 2;
106
+ string user_name = 3;
107
+ string user_email = 4;
108
+ string company_id = 5;
109
+ string company_name = 6;
110
+ string hierarchy_level = 7;
111
+ string department = 8;
112
+ string joined_at = 9;
113
+ }
114
+
115
+ message ListCompanyMembersRequest {
116
+ string company_id = 1;
117
+ }
118
+
119
+ message ListCompanyMembersResponse {
120
+ repeated CompanyMemberInfo members = 1;
121
+ }
122
+
123
+ message InviteCompanyMemberRequest {
124
+ string company_id = 1;
125
+ string email = 2;
126
+ string hierarchy_level = 3;
127
+ string department = 4;
128
+ // Inviter user ID extracted from auth token
129
+ }
130
+
131
+ message AcceptCompanyInvitationRequest {
132
+ string token = 1;
133
+ // User ID extracted from auth token
134
+ }
135
+
136
+ message AcceptCompanyInvitationResponse {
137
+ string access_token = 1;
138
+ string refresh_token = 2;
139
+ string user_type = 3;
140
+ bool email_verified = 4;
141
+ string onboarding_step = 5;
142
+ bool onboarding_complete = 6;
143
+ string company_id = 7;
144
+ string hierarchy_level = 8;
145
+ string department = 9;
146
+ }
147
+
148
+ message RemoveCompanyMemberRequest {
149
+ string company_id = 1;
150
+ string target_user_id = 2;
151
+ // Remover user ID extracted from auth token
152
+ }
153
+
154
+ message UpdateCompanyMemberRoleRequest {
155
+ string company_id = 1;
156
+ string target_user_id = 2;
157
+ string hierarchy_level = 3;
158
+ string department = 4;
159
+ // Updater user ID extracted from auth token
160
+ }
161
+
162
+ // ==================== Company Onboarding ====================
163
+
164
+ message GetCompanyOnboardingStatusRequest {
165
+ // User ID extracted from auth token
166
+ }
167
+
168
+ message SubmitAccountSetupRequest {
169
+ string company_name = 1;
170
+ string company_slug = 2;
171
+ string department = 3; // "hr" or "tech_lead"
172
+ string role = 4; // "hr", "founder", "tech_lead"
173
+ // User ID extracted from auth token
174
+ }
175
+
176
+ message SubmitCompanyInfoRequest {
177
+ string industry = 1;
178
+ string company_size = 2;
179
+ string description = 3;
180
+ // User ID extracted from auth token
181
+ }
182
+
183
+ message SubmitCompanyDetailsRequest {
184
+ string city = 1;
185
+ string country = 2;
186
+ string website = 3;
187
+ int32 founded_year = 4;
188
+ // User ID extracted from auth token
189
+ }
190
+
191
+ message SubmitCompanyBrandingRequest {
192
+ string logo_url = 1;
193
+ string linkedin_url = 2;
194
+ string twitter_url = 3;
195
+ // User ID extracted from auth token
196
+ }
197
+
198
+ message SubmitCompanyInviteTeamRequest {
199
+ repeated string emails = 1;
200
+ string hierarchy_level = 2;
201
+ string department = 3;
202
+ // User ID extracted from auth token
203
+ }