@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,824 @@
1
+ syntax = "proto3";
2
+
3
+ package auth.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/auth/v1;authv1";
6
+
7
+ import "common/v1/common.proto";
8
+
9
+ service AuthService {
10
+ // Core auth
11
+ rpc Register(RegisterRequest) returns (RegisterResponse);
12
+ rpc Login(LoginRequest) returns (LoginResponse);
13
+ rpc VerifyToken(VerifyTokenRequest) returns (VerifyTokenResponse);
14
+ rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse);
15
+ rpc Logout(LogoutRequest) returns (LogoutResponse);
16
+
17
+ // Email verification
18
+ rpc VerifyEmail(VerifyEmailRequest) returns (VerifyEmailResponse);
19
+ rpc ResendVerificationEmail(ResendVerificationEmailRequest) returns (ResendVerificationEmailResponse);
20
+ rpc SendEmailVerificationOtp(SendEmailVerificationOtpRequest) returns (SendEmailVerificationOtpResponse);
21
+ rpc VerifyEmailWithOtp(VerifyEmailWithOtpRequest) returns (VerifyEmailWithOtpResponse);
22
+
23
+ // Password management
24
+ rpc RequestPasswordReset(RequestPasswordResetRequest) returns (RequestPasswordResetResponse);
25
+ rpc ResetPassword(ResetPasswordRequest) returns (ResetPasswordResponse);
26
+ rpc ChangePassword(ChangePasswordRequest) returns (ChangePasswordResponse);
27
+
28
+ // Profile
29
+ rpc GetProfile(GetProfileRequest) returns (GetProfileResponse);
30
+ rpc UpdateProfile(UpdateProfileRequest) returns (UpdateProfileResponse);
31
+
32
+ // Session management
33
+ rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse);
34
+ rpc RevokeSession(RevokeSessionRequest) returns (RevokeSessionResponse);
35
+ rpc RevokeAllSessions(RevokeAllSessionsRequest) returns (RevokeAllSessionsResponse);
36
+
37
+ // OAuth
38
+ rpc OAuthLogin(OAuthLoginRequest) returns (OAuthLoginResponse);
39
+ rpc OAuthCallback(OAuthCallbackRequest) returns (OAuthCallbackResponse);
40
+ rpc LinkOAuthAccount(LinkOAuthAccountRequest) returns (LinkOAuthAccountResponse);
41
+ rpc UnlinkOAuthAccount(UnlinkOAuthAccountRequest) returns (UnlinkOAuthAccountResponse);
42
+
43
+ // RBAC
44
+ rpc CheckPermission(CheckPermissionRequest) returns (CheckPermissionResponse);
45
+
46
+ // Company management
47
+ rpc CreateCompany(CreateCompanyRequest) returns (CreateCompanyResponse);
48
+ rpc GetCompany(GetCompanyRequest) returns (GetCompanyResponse);
49
+ // Resolves the caller's company via membership then loads company details (gateway must not orchestrate).
50
+ rpc GetMyCompany(GetMyCompanyForUserRequest) returns (GetCompanyResponse);
51
+ rpc UpdateCompany(UpdateCompanyProtoRequest) returns (UpdateCompanyResponse);
52
+ rpc GetCompanyProfile(GetCompanyProfileRequest) returns (CompanyProfileResponse);
53
+ rpc UpdateCompanyProfile(UpdateCompanyProfileRequest) returns (CompanyProfileResponse);
54
+
55
+ // Company member management
56
+ rpc InviteCompanyMember(InviteCompanyMemberRequest) returns (InviteCompanyMemberResponse);
57
+ rpc AcceptCompanyInvitation(AcceptCompanyInvitationRequest) returns (AcceptCompanyInvitationResponse);
58
+ rpc RemoveCompanyMember(RemoveCompanyMemberRequest) returns (RemoveCompanyMemberResponse);
59
+ rpc UpdateCompanyMemberRole(UpdateCompanyMemberRoleRequest) returns (UpdateCompanyMemberRoleResponse);
60
+ rpc ListCompanyMembers(ListCompanyMembersRequest) returns (ListCompanyMembersResponse);
61
+ rpc GetMyCompanyMembership(GetMyCompanyMembershipRequest) returns (GetMyCompanyMembershipResponse);
62
+
63
+ // Company onboarding (legacy — kept for backward compatibility)
64
+ rpc CompleteCompanyProfile(CompleteCompanyProfileRequest) returns (CompleteCompanyProfileResponse);
65
+ rpc SkipTeamInvite(SkipTeamInviteRequest) returns (SkipTeamInviteResponse);
66
+ rpc GetOnboardingStatus(GetOnboardingStatusRequest) returns (GetOnboardingStatusResponse);
67
+
68
+ // Company onboarding (step-by-step workflow)
69
+ rpc GetCompanyOnboardingStatus(GetCompanyOnboardingStatusRequest) returns (OnboardingStatusResponse);
70
+ rpc SubmitAccountSetup(SubmitAccountSetupRequest) returns (OnboardingStatusResponse);
71
+ rpc SubmitCompanyInfo(SubmitCompanyInfoRequest) returns (OnboardingStatusResponse);
72
+ rpc SubmitCompanyDetails(SubmitCompanyDetailsRequest) returns (OnboardingStatusResponse);
73
+ rpc SubmitCompanyBranding(SubmitCompanyBrandingRequest) returns (OnboardingStatusResponse);
74
+ rpc SubmitCompanyInviteTeam(SubmitCompanyInviteTeamRequest) returns (OnboardingStatusResponse);
75
+ rpc SkipCompanyOnboardingStep(SkipOnboardingStepRequest) returns (OnboardingStatusResponse);
76
+ rpc CompleteCompanyOnboarding(CompleteOnboardingRequest) returns (OnboardingStatusResponse);
77
+
78
+ // Candidate onboarding (step-by-step workflow)
79
+ rpc GetCandidateOnboardingStatus(GetCandidateOnboardingStatusRequest) returns (OnboardingStatusResponse);
80
+ rpc SubmitCandidateBasicProfile(SubmitCandidateBasicProfileRequest) returns (OnboardingStatusResponse);
81
+ rpc SubmitCandidateResume(SubmitCandidateResumeRequest) returns (OnboardingStatusResponse);
82
+ rpc SubmitCandidateSkills(SubmitCandidateSkillsRequest) returns (OnboardingStatusResponse);
83
+ rpc SubmitCandidateExperience(SubmitCandidateExperienceRequest) returns (OnboardingStatusResponse);
84
+ rpc SubmitCandidatePreferences(SubmitCandidatePreferencesRequest) returns (OnboardingStatusResponse);
85
+ rpc SkipCandidateOnboardingStep(SkipOnboardingStepRequest) returns (OnboardingStatusResponse);
86
+ rpc CompleteCandidateOnboarding(CompleteOnboardingRequest) returns (OnboardingStatusResponse);
87
+
88
+ // Candidate profile operations
89
+ rpc GetCandidateProfile(GetCandidateProfileRequest) returns (CandidateProfileResponse);
90
+ rpc UpdateCandidateProfile(UpdateCandidateProfileRequest) returns (CandidateProfileResponse);
91
+ rpc UpdateCandidateSkills(UpdateCandidateSkillsRequest) returns (CandidateProfileResponse);
92
+ rpc AddCandidateExperience(AddCandidateExperienceRequest) returns (CandidateProfileResponse);
93
+ rpc UpdateCandidateExperience(UpdateCandidateExperienceRequest) returns (CandidateProfileResponse);
94
+ rpc DeleteCandidateExperience(DeleteCandidateExperienceRequest) returns (CandidateProfileResponse);
95
+ rpc UpdateCandidatePreferences(UpdateCandidatePreferencesRequest) returns (CandidateProfileResponse);
96
+ rpc CheckApplicationReady(CheckApplicationReadyRequest) returns (CheckApplicationReadyResponse);
97
+ }
98
+
99
+ // --- Core auth messages ---
100
+
101
+ message RegisterRequest {
102
+ string email = 1;
103
+ string password = 2;
104
+ string name = 3;
105
+ string user_type = 4; // "company" or "candidate"
106
+ reserved 5, 6, 7, 9; // removed: company_name, company_slug, department, role (moved to account_setup onboarding step)
107
+ string professional_headline = 8; // required if user_type=candidate
108
+ common.v1.RequestMeta meta = 10;
109
+ string company_invite_token = 12; // optional; raw token from invite email when user_type=company
110
+ }
111
+
112
+ message RegisterResponse {
113
+ string user_id = 1;
114
+ string access_token = 2;
115
+ string refresh_token = 3;
116
+ string user_type = 4;
117
+ reserved 5, 6, 7; // removed: company_id, hierarchy_level, department (not available at registration for company users)
118
+ bool email_verified = 8;
119
+ string onboarding_status = 9;
120
+ ProfileCompletionInfo profile = 10;
121
+ string onboarding_step = 11;
122
+ bool onboarding_complete = 12;
123
+ }
124
+
125
+ message ProfileCompletionInfo {
126
+ int32 completion_percentage = 1;
127
+ bool can_apply_to_jobs = 2;
128
+ repeated string missing_for_application = 3;
129
+ string next_suggested_action = 4;
130
+ }
131
+
132
+ message LoginRequest {
133
+ string email = 1;
134
+ string password = 2;
135
+ string ip_address = 3;
136
+ string user_agent = 4;
137
+ common.v1.RequestMeta meta = 10;
138
+ }
139
+
140
+ message LoginResponse {
141
+ string user_id = 1;
142
+ string access_token = 2;
143
+ string refresh_token = 3;
144
+ string user_type = 4;
145
+ string company_id = 5;
146
+ string hierarchy_level = 6;
147
+ string department = 7;
148
+ bool email_verified = 8;
149
+ string onboarding_status = 9;
150
+ string onboarding_step = 10;
151
+ bool onboarding_complete = 11;
152
+ }
153
+
154
+ message VerifyTokenRequest {
155
+ string access_token = 1;
156
+ }
157
+
158
+ message VerifyTokenResponse {
159
+ bool valid = 1;
160
+ string user_id = 2;
161
+ string session_id = 3;
162
+ string user_type = 4;
163
+ string company_id = 5;
164
+ string hierarchy_level = 6;
165
+ string department = 7;
166
+ bool email_verified = 8;
167
+ string onboarding_status = 9;
168
+ string onboarding_step = 10;
169
+ bool onboarding_complete = 11;
170
+ }
171
+
172
+ message RefreshTokenRequest {
173
+ string refresh_token = 1;
174
+ }
175
+
176
+ message RefreshTokenResponse {
177
+ string user_id = 1;
178
+ string access_token = 2;
179
+ string refresh_token = 3;
180
+ string user_type = 4;
181
+ string company_id = 5;
182
+ string hierarchy_level = 6;
183
+ string department = 7;
184
+ bool email_verified = 8;
185
+ string onboarding_status = 9;
186
+ string onboarding_step = 10;
187
+ bool onboarding_complete = 11;
188
+ }
189
+
190
+ message LogoutRequest {
191
+ string session_id = 1;
192
+ }
193
+
194
+ message LogoutResponse {}
195
+
196
+ // --- Email verification ---
197
+
198
+ message VerifyEmailRequest {
199
+ string token = 1;
200
+ }
201
+
202
+ message VerifyEmailResponse {}
203
+
204
+ message ResendVerificationEmailRequest {
205
+ string email = 1;
206
+ }
207
+
208
+ message ResendVerificationEmailResponse {}
209
+
210
+ message SendEmailVerificationOtpRequest {
211
+ string email = 1;
212
+ }
213
+
214
+ message SendEmailVerificationOtpResponse {}
215
+
216
+ message VerifyEmailWithOtpRequest {
217
+ string email = 1;
218
+ string code = 2;
219
+ }
220
+
221
+ message VerifyEmailWithOtpResponse {}
222
+
223
+ // --- Password management ---
224
+
225
+ message RequestPasswordResetRequest {
226
+ string email = 1;
227
+ }
228
+
229
+ message RequestPasswordResetResponse {}
230
+
231
+ message ResetPasswordRequest {
232
+ string token = 1;
233
+ string new_password = 2;
234
+ }
235
+
236
+ message ResetPasswordResponse {}
237
+
238
+ message ChangePasswordRequest {
239
+ string user_id = 1;
240
+ string old_password = 2;
241
+ string new_password = 3;
242
+ }
243
+
244
+ message ChangePasswordResponse {}
245
+
246
+ // --- Profile ---
247
+
248
+ message GetProfileRequest {
249
+ string user_id = 1;
250
+ }
251
+
252
+ message GetProfileResponse {
253
+ string user_id = 1;
254
+ string email = 2;
255
+ string name = 3;
256
+ string user_type = 4;
257
+ string company_id = 5;
258
+ string company_name = 6;
259
+ string hierarchy_level = 7;
260
+ string department = 8;
261
+ bool email_verified = 9;
262
+ string created_at = 10;
263
+ }
264
+
265
+ message UpdateProfileRequest {
266
+ string user_id = 1;
267
+ string name = 2;
268
+ }
269
+
270
+ message UpdateProfileResponse {}
271
+
272
+ // --- Session management ---
273
+
274
+ message ListSessionsRequest {
275
+ string user_id = 1;
276
+ }
277
+
278
+ message SessionInfo {
279
+ string session_id = 1;
280
+ string ip_address = 2;
281
+ string user_agent = 3;
282
+ string device_name = 4;
283
+ string location = 5;
284
+ string last_used_at = 6;
285
+ string created_at = 7;
286
+ bool is_current = 8;
287
+ }
288
+
289
+ message ListSessionsResponse {
290
+ repeated SessionInfo sessions = 1;
291
+ }
292
+
293
+ message RevokeSessionRequest {
294
+ string user_id = 1;
295
+ string session_id = 2;
296
+ }
297
+
298
+ message RevokeSessionResponse {}
299
+
300
+ message RevokeAllSessionsRequest {
301
+ string user_id = 1;
302
+ }
303
+
304
+ message RevokeAllSessionsResponse {}
305
+
306
+ // --- OAuth ---
307
+
308
+ message OAuthLoginRequest {
309
+ string provider = 1;
310
+ }
311
+
312
+ message OAuthLoginResponse {
313
+ string redirect_url = 1;
314
+ }
315
+
316
+ message OAuthCallbackRequest {
317
+ string provider = 1;
318
+ string code = 2;
319
+ string state = 3;
320
+ }
321
+
322
+ message OAuthCallbackResponse {
323
+ string user_id = 1;
324
+ string access_token = 2;
325
+ string refresh_token = 3;
326
+ string user_type = 4;
327
+ string company_id = 5;
328
+ string hierarchy_level = 6;
329
+ string department = 7;
330
+ bool email_verified = 8;
331
+ string onboarding_status = 9;
332
+ string onboarding_step = 10;
333
+ bool onboarding_complete = 11;
334
+ }
335
+
336
+ // --- OAuth account linking ---
337
+
338
+ message LinkOAuthAccountRequest {
339
+ string user_id = 1;
340
+ string provider = 2;
341
+ string code = 3;
342
+ }
343
+
344
+ message LinkOAuthAccountResponse {}
345
+
346
+ message UnlinkOAuthAccountRequest {
347
+ string user_id = 1;
348
+ string provider = 2;
349
+ }
350
+
351
+ message UnlinkOAuthAccountResponse {}
352
+
353
+ // --- RBAC ---
354
+
355
+ message CheckPermissionRequest {
356
+ string user_id = 1;
357
+ string resource = 2;
358
+ string action = 3;
359
+ }
360
+
361
+ message CheckPermissionResponse {
362
+ bool allowed = 1;
363
+ }
364
+
365
+ // --- Company management ---
366
+
367
+ message CreateCompanyRequest {
368
+ string owner_user_id = 1;
369
+ string name = 2;
370
+ string slug = 3;
371
+ string website = 4;
372
+ string department = 5;
373
+ }
374
+
375
+ message CreateCompanyResponse {
376
+ string company_id = 1;
377
+ string name = 2;
378
+ string slug = 3;
379
+ string website = 4;
380
+ string status = 5;
381
+ string created_at = 6;
382
+ string onboarding_status = 7;
383
+ string logo_url = 8;
384
+ string industry = 9;
385
+ string company_size = 10;
386
+ string description = 11;
387
+ string city = 12;
388
+ string country = 13;
389
+ int32 founded_year = 14;
390
+ string linkedin_url = 15;
391
+ string twitter_url = 16;
392
+ }
393
+
394
+ message GetCompanyRequest {
395
+ string user_id = 1;
396
+ string company_id = 2;
397
+ }
398
+
399
+ message GetMyCompanyForUserRequest {
400
+ string user_id = 1;
401
+ }
402
+
403
+ message GetCompanyResponse {
404
+ string company_id = 1;
405
+ string name = 2;
406
+ string slug = 3;
407
+ string website = 4;
408
+ string status = 5;
409
+ string created_at = 6;
410
+ string onboarding_status = 7;
411
+ string logo_url = 8;
412
+ string industry = 9;
413
+ string company_size = 10;
414
+ string description = 11;
415
+ string city = 12;
416
+ string country = 13;
417
+ int32 founded_year = 14;
418
+ string linkedin_url = 15;
419
+ string twitter_url = 16;
420
+ }
421
+
422
+ message UpdateCompanyProtoRequest {
423
+ string user_id = 1;
424
+ string company_id = 2;
425
+ string name = 3;
426
+ string website = 4;
427
+ string logo_url = 5;
428
+ }
429
+
430
+ message UpdateCompanyResponse {}
431
+
432
+ // --- Company member management ---
433
+
434
+ message InviteCompanyMemberRequest {
435
+ string inviter_user_id = 1;
436
+ string company_id = 2;
437
+ string email = 3;
438
+ string hierarchy_level = 4;
439
+ string department = 5;
440
+ }
441
+
442
+ message InviteCompanyMemberResponse {}
443
+
444
+ message AcceptCompanyInvitationRequest {
445
+ string user_id = 1;
446
+ string token = 2;
447
+ }
448
+
449
+ message AcceptCompanyInvitationResponse {
450
+ string access_token = 1;
451
+ string refresh_token = 2;
452
+ string user_type = 3;
453
+ bool email_verified = 4;
454
+ string onboarding_status = 5;
455
+ string onboarding_step = 6;
456
+ bool onboarding_complete = 7;
457
+ string company_id = 8;
458
+ string hierarchy_level = 9;
459
+ string department = 10;
460
+ }
461
+
462
+ message RemoveCompanyMemberRequest {
463
+ string remover_user_id = 1;
464
+ string company_id = 2;
465
+ string target_user_id = 3;
466
+ }
467
+
468
+ message RemoveCompanyMemberResponse {}
469
+
470
+ message UpdateCompanyMemberRoleRequest {
471
+ string updater_user_id = 1;
472
+ string company_id = 2;
473
+ string target_user_id = 3;
474
+ string hierarchy_level = 4;
475
+ string department = 5;
476
+ }
477
+
478
+ message UpdateCompanyMemberRoleResponse {}
479
+
480
+ message ListCompanyMembersRequest {
481
+ string user_id = 1;
482
+ string company_id = 2;
483
+ }
484
+
485
+ message ListCompanyMembersResponse {
486
+ repeated CompanyMemberInfo members = 1;
487
+ }
488
+
489
+ message CompanyMemberInfo {
490
+ string member_id = 1;
491
+ string user_id = 2;
492
+ string user_name = 3;
493
+ string user_email = 4;
494
+ string company_id = 5;
495
+ string company_name = 6;
496
+ string hierarchy_level = 7;
497
+ string department = 8;
498
+ string joined_at = 9;
499
+ }
500
+
501
+ message GetMyCompanyMembershipRequest {
502
+ string user_id = 1;
503
+ }
504
+
505
+ message GetMyCompanyMembershipResponse {
506
+ CompanyMemberInfo membership = 1;
507
+ }
508
+
509
+ // --- Company onboarding (legacy) ---
510
+
511
+ message CompleteCompanyProfileRequest {
512
+ string user_id = 1;
513
+ string company_id = 2;
514
+ string industry = 3;
515
+ string company_size = 4;
516
+ string description = 5;
517
+ string city = 6;
518
+ string country = 7;
519
+ int32 founded_year = 8;
520
+ string linkedin_url = 9;
521
+ string twitter_url = 10;
522
+ string logo_url = 11;
523
+ string website = 12;
524
+ }
525
+
526
+ message CompleteCompanyProfileResponse {}
527
+
528
+ message SkipTeamInviteRequest {
529
+ string user_id = 1;
530
+ string company_id = 2;
531
+ }
532
+
533
+ message SkipTeamInviteResponse {}
534
+
535
+ message GetOnboardingStatusRequest {
536
+ string user_id = 1;
537
+ string company_id = 2;
538
+ }
539
+
540
+ message GetOnboardingStatusResponse {
541
+ string company_id = 1;
542
+ string onboarding_status = 2;
543
+ repeated OnboardingStep steps = 3;
544
+ }
545
+
546
+ message OnboardingStep {
547
+ string step = 1;
548
+ bool completed = 2;
549
+ }
550
+
551
+ // --- Step-by-step onboarding (shared response) ---
552
+
553
+ message OnboardingStepDetail {
554
+ string step = 1;
555
+ bool completed = 2;
556
+ bool skippable = 3;
557
+ bool skipped = 4;
558
+ }
559
+
560
+ message OnboardingStatusResponse {
561
+ string entity_id = 1;
562
+ string current_step = 2;
563
+ bool onboarding_complete = 3;
564
+ repeated OnboardingStepDetail steps = 4;
565
+ int32 profile_completion_percentage = 5;
566
+ }
567
+
568
+ // --- Company onboarding step requests ---
569
+
570
+ message SubmitAccountSetupRequest {
571
+ string user_id = 1;
572
+ string company_name = 2;
573
+ string company_slug = 3;
574
+ string department = 4; // "hr" or "tech_lead"
575
+ string role = 5; // "hr", "founder", "tech_lead"
576
+ }
577
+
578
+ message GetCompanyOnboardingStatusRequest {
579
+ string user_id = 1;
580
+ }
581
+
582
+ message SubmitCompanyInfoRequest {
583
+ string user_id = 1;
584
+ string industry = 2;
585
+ string company_size = 3;
586
+ string description = 4;
587
+ }
588
+
589
+ message SubmitCompanyDetailsRequest {
590
+ string user_id = 1;
591
+ string city = 2;
592
+ string country = 3;
593
+ string website = 4;
594
+ int32 founded_year = 5;
595
+ }
596
+
597
+ message SubmitCompanyBrandingRequest {
598
+ string user_id = 1;
599
+ string logo_url = 2;
600
+ string linkedin_url = 3;
601
+ string twitter_url = 4;
602
+ }
603
+
604
+ message SubmitCompanyInviteTeamRequest {
605
+ string user_id = 1;
606
+ repeated string emails = 2;
607
+ string hierarchy_level = 3;
608
+ string department = 4;
609
+ }
610
+
611
+ // --- Candidate onboarding step requests ---
612
+
613
+ message GetCandidateOnboardingStatusRequest {
614
+ string user_id = 1;
615
+ }
616
+
617
+ message SubmitCandidateBasicProfileRequest {
618
+ string user_id = 1;
619
+ string professional_headline = 2;
620
+ string phone = 3;
621
+ string location_city = 4;
622
+ string location_country = 5;
623
+ }
624
+
625
+ message SubmitCandidateResumeRequest {
626
+ string user_id = 1;
627
+ string resume_url = 2;
628
+ string resume_filename = 3;
629
+ }
630
+
631
+ message SubmitCandidateSkillsRequest {
632
+ string user_id = 1;
633
+ repeated CandidateSkillInput skills = 2;
634
+ }
635
+
636
+ message SubmitCandidateExperienceRequest {
637
+ string user_id = 1;
638
+ string job_title = 2;
639
+ string company_name = 3;
640
+ optional string location = 4;
641
+ string start_date = 5;
642
+ optional string end_date = 6;
643
+ bool is_current = 7;
644
+ optional string description = 8;
645
+ }
646
+
647
+ message SubmitCandidatePreferencesRequest {
648
+ string user_id = 1;
649
+ repeated string preferred_job_types = 2;
650
+ optional string preferred_work_mode = 3;
651
+ optional string availability = 4;
652
+ optional int32 expected_salary_min = 5;
653
+ optional int32 expected_salary_max = 6;
654
+ optional string expected_salary_currency = 7;
655
+ }
656
+
657
+ // --- Shared onboarding requests ---
658
+
659
+ message SkipOnboardingStepRequest {
660
+ string user_id = 1;
661
+ string step = 2;
662
+ }
663
+
664
+ message CompleteOnboardingRequest {
665
+ string user_id = 1;
666
+ }
667
+
668
+ // --- Company profile (for /companies/me endpoints) ---
669
+
670
+ message GetCompanyProfileRequest {
671
+ string user_id = 1;
672
+ }
673
+
674
+ message CompanyProfileResponse {
675
+ string id = 1;
676
+ string name = 2;
677
+ string slug = 3;
678
+ optional string industry = 4;
679
+ optional string company_size = 5;
680
+ optional string description = 6;
681
+ optional string city = 7;
682
+ optional string country = 8;
683
+ optional string website = 9;
684
+ optional string logo_url = 10;
685
+ optional string linkedin_url = 11;
686
+ optional string twitter_url = 12;
687
+ optional int32 founded_year = 13;
688
+ int32 profile_completion_percentage = 14;
689
+ string status = 15;
690
+ }
691
+
692
+ message UpdateCompanyProfileRequest {
693
+ string user_id = 1;
694
+ optional string name = 2;
695
+ optional string industry = 3;
696
+ optional string company_size = 4;
697
+ optional string description = 5;
698
+ optional string city = 6;
699
+ optional string country = 7;
700
+ optional string website = 8;
701
+ optional string logo_url = 9;
702
+ optional string linkedin_url = 10;
703
+ optional string twitter_url = 11;
704
+ optional int32 founded_year = 12;
705
+ }
706
+
707
+ // --- Candidate profile operations ---
708
+
709
+ message GetCandidateProfileRequest {
710
+ string user_id = 1;
711
+ }
712
+
713
+ message CandidateProfileResponse {
714
+ string id = 1;
715
+ string user_id = 2;
716
+ string professional_headline = 3;
717
+ optional string phone = 4;
718
+ optional string location_city = 5;
719
+ optional string location_country = 6;
720
+ optional string linkedin_url = 7;
721
+ optional string resume_url = 8;
722
+ optional int32 years_of_experience = 9;
723
+ repeated CandidateSkill skills = 10;
724
+ repeated CandidateExperience experience = 11;
725
+ CandidatePreferences preferences = 12;
726
+ int32 profile_completion_percentage = 13;
727
+ bool can_apply_to_jobs = 14;
728
+ }
729
+
730
+ message CandidateSkill {
731
+ string id = 1;
732
+ string skill_name = 2;
733
+ optional string proficiency_level = 3;
734
+ }
735
+
736
+ message CandidateExperience {
737
+ string id = 1;
738
+ string job_title = 2;
739
+ string company_name = 3;
740
+ optional string location = 4;
741
+ string start_date = 5;
742
+ optional string end_date = 6;
743
+ bool is_current = 7;
744
+ optional string description = 8;
745
+ }
746
+
747
+ message CandidatePreferences {
748
+ repeated string preferred_job_types = 1;
749
+ repeated string preferred_industries = 2;
750
+ optional int32 expected_salary_min = 3;
751
+ optional int32 expected_salary_max = 4;
752
+ optional string expected_salary_currency = 5;
753
+ optional string preferred_work_mode = 6;
754
+ optional string availability = 7;
755
+ }
756
+
757
+ message UpdateCandidateProfileRequest {
758
+ string user_id = 1;
759
+ optional string professional_headline = 2;
760
+ optional string phone = 3;
761
+ optional string location_city = 4;
762
+ optional string location_country = 5;
763
+ optional string linkedin_url = 6;
764
+ optional int32 years_of_experience = 7;
765
+ }
766
+
767
+ message UpdateCandidateSkillsRequest {
768
+ string user_id = 1;
769
+ repeated CandidateSkillInput skills = 2;
770
+ }
771
+
772
+ message CandidateSkillInput {
773
+ string skill_name = 1;
774
+ optional string proficiency_level = 2;
775
+ }
776
+
777
+ message AddCandidateExperienceRequest {
778
+ string user_id = 1;
779
+ string job_title = 2;
780
+ string company_name = 3;
781
+ optional string location = 4;
782
+ string start_date = 5;
783
+ optional string end_date = 6;
784
+ bool is_current = 7;
785
+ optional string description = 8;
786
+ }
787
+
788
+ message UpdateCandidateExperienceRequest {
789
+ string user_id = 1;
790
+ string experience_id = 2;
791
+ optional string job_title = 3;
792
+ optional string company_name = 4;
793
+ optional string location = 5;
794
+ optional string start_date = 6;
795
+ optional string end_date = 7;
796
+ optional bool is_current = 8;
797
+ optional string description = 9;
798
+ }
799
+
800
+ message DeleteCandidateExperienceRequest {
801
+ string user_id = 1;
802
+ string experience_id = 2;
803
+ }
804
+
805
+ message UpdateCandidatePreferencesRequest {
806
+ string user_id = 1;
807
+ repeated string preferred_job_types = 2;
808
+ repeated string preferred_industries = 3;
809
+ optional int32 expected_salary_min = 4;
810
+ optional int32 expected_salary_max = 5;
811
+ optional string expected_salary_currency = 6;
812
+ optional string preferred_work_mode = 7;
813
+ optional string availability = 8;
814
+ }
815
+
816
+ message CheckApplicationReadyRequest {
817
+ string user_id = 1;
818
+ }
819
+
820
+ message CheckApplicationReadyResponse {
821
+ bool can_apply = 1;
822
+ repeated string missing_fields = 2;
823
+ int32 completion_percentage = 3;
824
+ }