@in-human-resources/backend-proto 0.1.4 → 0.1.5

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/api/v1/README.md CHANGED
@@ -88,6 +88,13 @@ Manages candidate profiles and job applications:
88
88
  - Application readiness checks
89
89
  - Candidate onboarding flow
90
90
 
91
+ ### HiringService (`hiring.proto` + `pipeline.proto`)
92
+ Jobs, applications, pipeline stages, and **M2.5 pipeline configuration**:
93
+ - Job CRUD, publish/close, search; `CreateJob` / `UpdateJob` accept optional `pipeline_definition_id` (else company default or platform `standard_full`).
94
+ - Apply, list applications, stage transitions, screening/interview/assessment/offer records, audit events.
95
+ - **Pipeline settings (company):** `ListPlatformPipelineTemplates`, `ClonePipelineFromTemplate`, draft CRUD, `PublishPipelineDefinition`, `SetCompanyDefaultPipeline`, `SetJobPipelineDefinition`, `GetApplicationPipelineSnapshot`.
96
+ - Messages live in `pipeline.proto` (`PipelineDefinition`, `PipelineBlock`, `PipelineSnapshot`, `ManualFieldSpec`). Regenerate clients with `make proto-gen`.
97
+
91
98
  ## Client Integration
92
99
 
93
100
  ### Mobile (Kotlin)
@@ -4,6 +4,8 @@ package api.v1;
4
4
 
5
5
  option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/api/v1;apiv1";
6
6
 
7
+ import "api/v1/pipeline.proto";
8
+
7
9
  // =============================================================================
8
10
  // api.v1 public contract — versioning and evolution (HiringService)
9
11
  // =============================================================================
@@ -74,6 +76,18 @@ service HiringService {
74
76
 
75
77
  // Audit/history timeline for one application (candidate or owning company).
76
78
  rpc ListApplicationEvents(ListApplicationEventsRequest) returns (ListApplicationEventsResponse);
79
+
80
+ // Pipeline configuration (M2.5)
81
+ rpc ListPlatformPipelineTemplates(ListPlatformPipelineTemplatesRequest) returns (ListPlatformPipelineTemplatesResponse);
82
+ rpc GetPipelineDefinition(GetPipelineDefinitionRequest) returns (PipelineDefinition);
83
+ rpc ListPipelineDefinitions(ListPipelineDefinitionsRequest) returns (ListPipelineDefinitionsResponse);
84
+ rpc CreatePipelineDefinition(CreatePipelineDefinitionRequest) returns (CreatePipelineDefinitionResponse);
85
+ rpc UpdatePipelineDefinition(UpdatePipelineDefinitionRequest) returns (PipelineDefinition);
86
+ rpc PublishPipelineDefinition(PublishPipelineDefinitionRequest) returns (PublishPipelineDefinitionResponse);
87
+ rpc ClonePipelineFromTemplate(ClonePipelineFromTemplateRequest) returns (ClonePipelineFromTemplateResponse);
88
+ rpc SetCompanyDefaultPipeline(SetCompanyDefaultPipelineRequest) returns (SetCompanyDefaultPipelineResponse);
89
+ rpc SetJobPipelineDefinition(SetJobPipelineDefinitionRequest) returns (Job);
90
+ rpc GetApplicationPipelineSnapshot(GetApplicationPipelineSnapshotRequest) returns (GetApplicationPipelineSnapshotResponse);
77
91
  }
78
92
 
79
93
  message PageRequest {
@@ -89,6 +103,7 @@ message CreateJobRequest {
89
103
  string title = 1;
90
104
  string description = 2;
91
105
  string public_slug = 3;
106
+ string pipeline_definition_id = 4;
92
107
  }
93
108
 
94
109
  message CreateJobResponse {
@@ -126,6 +141,7 @@ message Job {
126
141
  string team_metadata_json = 8;
127
142
  string created_at = 9;
128
143
  string updated_at = 10;
144
+ string pipeline_definition_id = 11;
129
145
  }
130
146
 
131
147
  message GetJobResponse {
@@ -139,6 +155,7 @@ message GetJobResponse {
139
155
  string team_metadata_json = 8;
140
156
  string created_at = 9;
141
157
  string updated_at = 10;
158
+ string pipeline_definition_id = 11;
142
159
  }
143
160
 
144
161
  message ListJobsRequest {
@@ -168,6 +185,7 @@ message UpdateJobRequest {
168
185
  string public_slug = 4;
169
186
  string requirements = 5;
170
187
  string team_metadata_json = 6;
188
+ string pipeline_definition_id = 7;
171
189
  }
172
190
 
173
191
  message UpdateJobResponse {
@@ -251,6 +269,7 @@ message RecordRecruiterDecisionRequest {
251
269
  string stage_context = 2;
252
270
  string outcome = 3;
253
271
  string reasoning = 4;
272
+ map<string, string> manual_inputs = 5;
254
273
  }
255
274
 
256
275
  message RecordRecruiterDecisionResponse {
@@ -0,0 +1,156 @@
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
+ // Pipeline capability aligns with business hiring automation areas.
8
+ enum PipelineCapability {
9
+ PIPELINE_CAPABILITY_UNSPECIFIED = 0;
10
+ PIPELINE_CAPABILITY_SCREENING = 1;
11
+ PIPELINE_CAPABILITY_RECRUITER_REVIEW = 2;
12
+ PIPELINE_CAPABILITY_ASSESSMENT = 3;
13
+ PIPELINE_CAPABILITY_INTERVIEW = 4;
14
+ PIPELINE_CAPABILITY_OFFER = 5;
15
+ PIPELINE_CAPABILITY_COMMUNICATION = 6;
16
+ }
17
+
18
+ enum PipelineStepType {
19
+ PIPELINE_STEP_TYPE_UNSPECIFIED = 0;
20
+ PIPELINE_STEP_TYPE_AUTOMATED = 1;
21
+ PIPELINE_STEP_TYPE_HUMAN_GATE = 2;
22
+ PIPELINE_STEP_TYPE_ASSESSMENT = 3;
23
+ PIPELINE_STEP_TYPE_INTERVIEW = 4;
24
+ PIPELINE_STEP_TYPE_OFFER = 5;
25
+ }
26
+
27
+ message BlockSLA {
28
+ int32 reminder_after_days = 1;
29
+ int32 escalate_after_days = 2;
30
+ int32 auto_reject_after_days = 3;
31
+ }
32
+
33
+ message ManualFieldSpec {
34
+ string id = 1;
35
+ string label = 2;
36
+ string type = 3;
37
+ bool required = 4;
38
+ }
39
+
40
+ message ManualFieldsConfig {
41
+ repeated ManualFieldSpec fields = 1;
42
+ }
43
+
44
+ message PipelineBlock {
45
+ string block_id = 1;
46
+ int32 sort_order = 2;
47
+ PipelineCapability capability = 3;
48
+ bool enabled = 4;
49
+ string display_name = 5;
50
+ string candidate_status_label = 6;
51
+ PipelineStepType step_type = 7;
52
+ BlockSLA sla = 8;
53
+ ManualFieldsConfig manual_fields = 9;
54
+ string config_json = 10;
55
+ }
56
+
57
+ message PipelineDefinition {
58
+ string definition_id = 1;
59
+ string company_id = 2;
60
+ string name = 3;
61
+ string description = 4;
62
+ string slug = 5;
63
+ int32 version = 6;
64
+ string status = 7;
65
+ bool is_platform = 8;
66
+ string source_template_id = 9;
67
+ int32 schema_version = 10;
68
+ repeated PipelineBlock blocks = 11;
69
+ }
70
+
71
+ message ExecutionStep {
72
+ string stage_id = 1;
73
+ PipelineStepType step_type = 2;
74
+ string block_id = 3;
75
+ PipelineCapability capability = 4;
76
+ BlockSLA sla = 5;
77
+ string config_json = 6;
78
+ string manual_fields_json = 7;
79
+ }
80
+
81
+ message PipelineSnapshot {
82
+ string definition_id = 1;
83
+ int32 definition_version = 2;
84
+ int32 schema_version = 3;
85
+ string definition_name = 4;
86
+ repeated ExecutionStep steps = 5;
87
+ }
88
+
89
+ message ListPlatformPipelineTemplatesRequest {}
90
+
91
+ message ListPlatformPipelineTemplatesResponse {
92
+ repeated PipelineDefinition templates = 1;
93
+ }
94
+
95
+ message GetPipelineDefinitionRequest {
96
+ string definition_id = 1;
97
+ }
98
+
99
+ message ListPipelineDefinitionsRequest {}
100
+
101
+ message ListPipelineDefinitionsResponse {
102
+ repeated PipelineDefinition definitions = 1;
103
+ }
104
+
105
+ message CreatePipelineDefinitionRequest {
106
+ string name = 1;
107
+ string description = 2;
108
+ repeated PipelineBlock blocks = 3;
109
+ }
110
+
111
+ message CreatePipelineDefinitionResponse {
112
+ string definition_id = 1;
113
+ }
114
+
115
+ message UpdatePipelineDefinitionRequest {
116
+ string definition_id = 1;
117
+ string name = 2;
118
+ string description = 3;
119
+ repeated PipelineBlock blocks = 4;
120
+ }
121
+
122
+ message PublishPipelineDefinitionRequest {
123
+ string definition_id = 1;
124
+ }
125
+
126
+ message PublishPipelineDefinitionResponse {
127
+ int32 version = 1;
128
+ }
129
+
130
+ message ClonePipelineFromTemplateRequest {
131
+ string template_id = 1;
132
+ string name = 2;
133
+ }
134
+
135
+ message ClonePipelineFromTemplateResponse {
136
+ string definition_id = 1;
137
+ }
138
+
139
+ message SetCompanyDefaultPipelineRequest {
140
+ string definition_id = 1;
141
+ }
142
+
143
+ message SetCompanyDefaultPipelineResponse {}
144
+
145
+ message SetJobPipelineDefinitionRequest {
146
+ string job_id = 1;
147
+ string definition_id = 2;
148
+ }
149
+
150
+ message GetApplicationPipelineSnapshotRequest {
151
+ string application_id = 1;
152
+ }
153
+
154
+ message GetApplicationPipelineSnapshotResponse {
155
+ PipelineSnapshot snapshot = 1;
156
+ }
@@ -0,0 +1,87 @@
1
+ // @generated by protoc-gen-connect-es v1.7.0 with parameter "target=ts,import_extension=none"
2
+ // @generated from file workflow/v1/service.proto (package workflow.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import { CancelWorkflowRequest, CancelWorkflowResponse, GetWorkflowStatusRequest, GetWorkflowStatusResponse, SignalAssessmentCompletedRequest, SignalAssessmentCompletedResponse, SignalInterviewBookedRequest, SignalInterviewBookedResponse, SignalOfferDecisionRequest, SignalOfferDecisionResponse, SignalRecruiterDecisionRequest, SignalRecruiterDecisionResponse, StartApplicationLifecycleRequest, StartApplicationLifecycleResponse } from "./service_pb";
7
+ import { MethodKind } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * WorkflowService is private: API gateway and approved internal callers only.
11
+ * Drives Temporal application lifecycle; product clients use api.v1.HiringService.
12
+ *
13
+ * @generated from service workflow.v1.WorkflowService
14
+ */
15
+ export const WorkflowService = {
16
+ typeName: "workflow.v1.WorkflowService",
17
+ methods: {
18
+ /**
19
+ * StartApplicationLifecycle starts (or idempotently re-attaches to) the root workflow for one application.
20
+ *
21
+ * @generated from rpc workflow.v1.WorkflowService.StartApplicationLifecycle
22
+ */
23
+ startApplicationLifecycle: {
24
+ name: "StartApplicationLifecycle",
25
+ I: StartApplicationLifecycleRequest,
26
+ O: StartApplicationLifecycleResponse,
27
+ kind: MethodKind.Unary,
28
+ },
29
+ /**
30
+ * @generated from rpc workflow.v1.WorkflowService.CancelWorkflow
31
+ */
32
+ cancelWorkflow: {
33
+ name: "CancelWorkflow",
34
+ I: CancelWorkflowRequest,
35
+ O: CancelWorkflowResponse,
36
+ kind: MethodKind.Unary,
37
+ },
38
+ /**
39
+ * Human / domain signals (Temporal signal names match RPC suffixes where applicable).
40
+ *
41
+ * @generated from rpc workflow.v1.WorkflowService.SignalRecruiterDecision
42
+ */
43
+ signalRecruiterDecision: {
44
+ name: "SignalRecruiterDecision",
45
+ I: SignalRecruiterDecisionRequest,
46
+ O: SignalRecruiterDecisionResponse,
47
+ kind: MethodKind.Unary,
48
+ },
49
+ /**
50
+ * @generated from rpc workflow.v1.WorkflowService.SignalAssessmentCompleted
51
+ */
52
+ signalAssessmentCompleted: {
53
+ name: "SignalAssessmentCompleted",
54
+ I: SignalAssessmentCompletedRequest,
55
+ O: SignalAssessmentCompletedResponse,
56
+ kind: MethodKind.Unary,
57
+ },
58
+ /**
59
+ * @generated from rpc workflow.v1.WorkflowService.SignalInterviewBooked
60
+ */
61
+ signalInterviewBooked: {
62
+ name: "SignalInterviewBooked",
63
+ I: SignalInterviewBookedRequest,
64
+ O: SignalInterviewBookedResponse,
65
+ kind: MethodKind.Unary,
66
+ },
67
+ /**
68
+ * @generated from rpc workflow.v1.WorkflowService.SignalOfferDecision
69
+ */
70
+ signalOfferDecision: {
71
+ name: "SignalOfferDecision",
72
+ I: SignalOfferDecisionRequest,
73
+ O: SignalOfferDecisionResponse,
74
+ kind: MethodKind.Unary,
75
+ },
76
+ /**
77
+ * @generated from rpc workflow.v1.WorkflowService.GetWorkflowStatus
78
+ */
79
+ getWorkflowStatus: {
80
+ name: "GetWorkflowStatus",
81
+ I: GetWorkflowStatusRequest,
82
+ O: GetWorkflowStatusResponse,
83
+ kind: MethodKind.Unary,
84
+ },
85
+ }
86
+ } as const;
87
+
@@ -0,0 +1,580 @@
1
+ // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
2
+ // @generated from file workflow/v1/service.proto (package workflow.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7
+ import { Message, proto3 } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * @generated from message workflow.v1.StartApplicationLifecycleRequest
11
+ */
12
+ export class StartApplicationLifecycleRequest extends Message<StartApplicationLifecycleRequest> {
13
+ /**
14
+ * @generated from field: string application_id = 1;
15
+ */
16
+ applicationId = "";
17
+
18
+ /**
19
+ * @generated from field: string job_id = 2;
20
+ */
21
+ jobId = "";
22
+
23
+ /**
24
+ * @generated from field: string candidate_user_id = 3;
25
+ */
26
+ candidateUserId = "";
27
+
28
+ /**
29
+ * @generated from field: string company_id = 4;
30
+ */
31
+ companyId = "";
32
+
33
+ constructor(data?: PartialMessage<StartApplicationLifecycleRequest>) {
34
+ super();
35
+ proto3.util.initPartial(data, this);
36
+ }
37
+
38
+ static readonly runtime: typeof proto3 = proto3;
39
+ static readonly typeName = "workflow.v1.StartApplicationLifecycleRequest";
40
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
41
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
42
+ { no: 2, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
43
+ { no: 3, name: "candidate_user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
44
+ { no: 4, name: "company_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
45
+ ]);
46
+
47
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StartApplicationLifecycleRequest {
48
+ return new StartApplicationLifecycleRequest().fromBinary(bytes, options);
49
+ }
50
+
51
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StartApplicationLifecycleRequest {
52
+ return new StartApplicationLifecycleRequest().fromJson(jsonValue, options);
53
+ }
54
+
55
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StartApplicationLifecycleRequest {
56
+ return new StartApplicationLifecycleRequest().fromJsonString(jsonString, options);
57
+ }
58
+
59
+ static equals(a: StartApplicationLifecycleRequest | PlainMessage<StartApplicationLifecycleRequest> | undefined, b: StartApplicationLifecycleRequest | PlainMessage<StartApplicationLifecycleRequest> | undefined): boolean {
60
+ return proto3.util.equals(StartApplicationLifecycleRequest, a, b);
61
+ }
62
+ }
63
+
64
+ /**
65
+ * @generated from message workflow.v1.StartApplicationLifecycleResponse
66
+ */
67
+ export class StartApplicationLifecycleResponse extends Message<StartApplicationLifecycleResponse> {
68
+ /**
69
+ * @generated from field: string workflow_id = 1;
70
+ */
71
+ workflowId = "";
72
+
73
+ /**
74
+ * @generated from field: string run_id = 2;
75
+ */
76
+ runId = "";
77
+
78
+ constructor(data?: PartialMessage<StartApplicationLifecycleResponse>) {
79
+ super();
80
+ proto3.util.initPartial(data, this);
81
+ }
82
+
83
+ static readonly runtime: typeof proto3 = proto3;
84
+ static readonly typeName = "workflow.v1.StartApplicationLifecycleResponse";
85
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
86
+ { no: 1, name: "workflow_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
87
+ { no: 2, name: "run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
88
+ ]);
89
+
90
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StartApplicationLifecycleResponse {
91
+ return new StartApplicationLifecycleResponse().fromBinary(bytes, options);
92
+ }
93
+
94
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StartApplicationLifecycleResponse {
95
+ return new StartApplicationLifecycleResponse().fromJson(jsonValue, options);
96
+ }
97
+
98
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StartApplicationLifecycleResponse {
99
+ return new StartApplicationLifecycleResponse().fromJsonString(jsonString, options);
100
+ }
101
+
102
+ static equals(a: StartApplicationLifecycleResponse | PlainMessage<StartApplicationLifecycleResponse> | undefined, b: StartApplicationLifecycleResponse | PlainMessage<StartApplicationLifecycleResponse> | undefined): boolean {
103
+ return proto3.util.equals(StartApplicationLifecycleResponse, a, b);
104
+ }
105
+ }
106
+
107
+ /**
108
+ * @generated from message workflow.v1.CancelWorkflowRequest
109
+ */
110
+ export class CancelWorkflowRequest extends Message<CancelWorkflowRequest> {
111
+ /**
112
+ * @generated from field: string application_id = 1;
113
+ */
114
+ applicationId = "";
115
+
116
+ constructor(data?: PartialMessage<CancelWorkflowRequest>) {
117
+ super();
118
+ proto3.util.initPartial(data, this);
119
+ }
120
+
121
+ static readonly runtime: typeof proto3 = proto3;
122
+ static readonly typeName = "workflow.v1.CancelWorkflowRequest";
123
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
124
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
125
+ ]);
126
+
127
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CancelWorkflowRequest {
128
+ return new CancelWorkflowRequest().fromBinary(bytes, options);
129
+ }
130
+
131
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CancelWorkflowRequest {
132
+ return new CancelWorkflowRequest().fromJson(jsonValue, options);
133
+ }
134
+
135
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CancelWorkflowRequest {
136
+ return new CancelWorkflowRequest().fromJsonString(jsonString, options);
137
+ }
138
+
139
+ static equals(a: CancelWorkflowRequest | PlainMessage<CancelWorkflowRequest> | undefined, b: CancelWorkflowRequest | PlainMessage<CancelWorkflowRequest> | undefined): boolean {
140
+ return proto3.util.equals(CancelWorkflowRequest, a, b);
141
+ }
142
+ }
143
+
144
+ /**
145
+ * @generated from message workflow.v1.CancelWorkflowResponse
146
+ */
147
+ export class CancelWorkflowResponse extends Message<CancelWorkflowResponse> {
148
+ constructor(data?: PartialMessage<CancelWorkflowResponse>) {
149
+ super();
150
+ proto3.util.initPartial(data, this);
151
+ }
152
+
153
+ static readonly runtime: typeof proto3 = proto3;
154
+ static readonly typeName = "workflow.v1.CancelWorkflowResponse";
155
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
156
+ ]);
157
+
158
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CancelWorkflowResponse {
159
+ return new CancelWorkflowResponse().fromBinary(bytes, options);
160
+ }
161
+
162
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CancelWorkflowResponse {
163
+ return new CancelWorkflowResponse().fromJson(jsonValue, options);
164
+ }
165
+
166
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CancelWorkflowResponse {
167
+ return new CancelWorkflowResponse().fromJsonString(jsonString, options);
168
+ }
169
+
170
+ static equals(a: CancelWorkflowResponse | PlainMessage<CancelWorkflowResponse> | undefined, b: CancelWorkflowResponse | PlainMessage<CancelWorkflowResponse> | undefined): boolean {
171
+ return proto3.util.equals(CancelWorkflowResponse, a, b);
172
+ }
173
+ }
174
+
175
+ /**
176
+ * @generated from message workflow.v1.SignalRecruiterDecisionRequest
177
+ */
178
+ export class SignalRecruiterDecisionRequest extends Message<SignalRecruiterDecisionRequest> {
179
+ /**
180
+ * @generated from field: string application_id = 1;
181
+ */
182
+ applicationId = "";
183
+
184
+ /**
185
+ * approve advances pipeline; reject moves to rejected.
186
+ *
187
+ * @generated from field: bool approve = 2;
188
+ */
189
+ approve = false;
190
+
191
+ /**
192
+ * @generated from field: string reason = 3;
193
+ */
194
+ reason = "";
195
+
196
+ constructor(data?: PartialMessage<SignalRecruiterDecisionRequest>) {
197
+ super();
198
+ proto3.util.initPartial(data, this);
199
+ }
200
+
201
+ static readonly runtime: typeof proto3 = proto3;
202
+ static readonly typeName = "workflow.v1.SignalRecruiterDecisionRequest";
203
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
204
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
205
+ { no: 2, name: "approve", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
206
+ { no: 3, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
207
+ ]);
208
+
209
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalRecruiterDecisionRequest {
210
+ return new SignalRecruiterDecisionRequest().fromBinary(bytes, options);
211
+ }
212
+
213
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalRecruiterDecisionRequest {
214
+ return new SignalRecruiterDecisionRequest().fromJson(jsonValue, options);
215
+ }
216
+
217
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalRecruiterDecisionRequest {
218
+ return new SignalRecruiterDecisionRequest().fromJsonString(jsonString, options);
219
+ }
220
+
221
+ static equals(a: SignalRecruiterDecisionRequest | PlainMessage<SignalRecruiterDecisionRequest> | undefined, b: SignalRecruiterDecisionRequest | PlainMessage<SignalRecruiterDecisionRequest> | undefined): boolean {
222
+ return proto3.util.equals(SignalRecruiterDecisionRequest, a, b);
223
+ }
224
+ }
225
+
226
+ /**
227
+ * @generated from message workflow.v1.SignalRecruiterDecisionResponse
228
+ */
229
+ export class SignalRecruiterDecisionResponse extends Message<SignalRecruiterDecisionResponse> {
230
+ constructor(data?: PartialMessage<SignalRecruiterDecisionResponse>) {
231
+ super();
232
+ proto3.util.initPartial(data, this);
233
+ }
234
+
235
+ static readonly runtime: typeof proto3 = proto3;
236
+ static readonly typeName = "workflow.v1.SignalRecruiterDecisionResponse";
237
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
238
+ ]);
239
+
240
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalRecruiterDecisionResponse {
241
+ return new SignalRecruiterDecisionResponse().fromBinary(bytes, options);
242
+ }
243
+
244
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalRecruiterDecisionResponse {
245
+ return new SignalRecruiterDecisionResponse().fromJson(jsonValue, options);
246
+ }
247
+
248
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalRecruiterDecisionResponse {
249
+ return new SignalRecruiterDecisionResponse().fromJsonString(jsonString, options);
250
+ }
251
+
252
+ static equals(a: SignalRecruiterDecisionResponse | PlainMessage<SignalRecruiterDecisionResponse> | undefined, b: SignalRecruiterDecisionResponse | PlainMessage<SignalRecruiterDecisionResponse> | undefined): boolean {
253
+ return proto3.util.equals(SignalRecruiterDecisionResponse, a, b);
254
+ }
255
+ }
256
+
257
+ /**
258
+ * @generated from message workflow.v1.SignalAssessmentCompletedRequest
259
+ */
260
+ export class SignalAssessmentCompletedRequest extends Message<SignalAssessmentCompletedRequest> {
261
+ /**
262
+ * @generated from field: string application_id = 1;
263
+ */
264
+ applicationId = "";
265
+
266
+ /**
267
+ * @generated from field: string external_assessment_id = 2;
268
+ */
269
+ externalAssessmentId = "";
270
+
271
+ constructor(data?: PartialMessage<SignalAssessmentCompletedRequest>) {
272
+ super();
273
+ proto3.util.initPartial(data, this);
274
+ }
275
+
276
+ static readonly runtime: typeof proto3 = proto3;
277
+ static readonly typeName = "workflow.v1.SignalAssessmentCompletedRequest";
278
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
279
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
280
+ { no: 2, name: "external_assessment_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
281
+ ]);
282
+
283
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalAssessmentCompletedRequest {
284
+ return new SignalAssessmentCompletedRequest().fromBinary(bytes, options);
285
+ }
286
+
287
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalAssessmentCompletedRequest {
288
+ return new SignalAssessmentCompletedRequest().fromJson(jsonValue, options);
289
+ }
290
+
291
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalAssessmentCompletedRequest {
292
+ return new SignalAssessmentCompletedRequest().fromJsonString(jsonString, options);
293
+ }
294
+
295
+ static equals(a: SignalAssessmentCompletedRequest | PlainMessage<SignalAssessmentCompletedRequest> | undefined, b: SignalAssessmentCompletedRequest | PlainMessage<SignalAssessmentCompletedRequest> | undefined): boolean {
296
+ return proto3.util.equals(SignalAssessmentCompletedRequest, a, b);
297
+ }
298
+ }
299
+
300
+ /**
301
+ * @generated from message workflow.v1.SignalAssessmentCompletedResponse
302
+ */
303
+ export class SignalAssessmentCompletedResponse extends Message<SignalAssessmentCompletedResponse> {
304
+ constructor(data?: PartialMessage<SignalAssessmentCompletedResponse>) {
305
+ super();
306
+ proto3.util.initPartial(data, this);
307
+ }
308
+
309
+ static readonly runtime: typeof proto3 = proto3;
310
+ static readonly typeName = "workflow.v1.SignalAssessmentCompletedResponse";
311
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
312
+ ]);
313
+
314
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalAssessmentCompletedResponse {
315
+ return new SignalAssessmentCompletedResponse().fromBinary(bytes, options);
316
+ }
317
+
318
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalAssessmentCompletedResponse {
319
+ return new SignalAssessmentCompletedResponse().fromJson(jsonValue, options);
320
+ }
321
+
322
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalAssessmentCompletedResponse {
323
+ return new SignalAssessmentCompletedResponse().fromJsonString(jsonString, options);
324
+ }
325
+
326
+ static equals(a: SignalAssessmentCompletedResponse | PlainMessage<SignalAssessmentCompletedResponse> | undefined, b: SignalAssessmentCompletedResponse | PlainMessage<SignalAssessmentCompletedResponse> | undefined): boolean {
327
+ return proto3.util.equals(SignalAssessmentCompletedResponse, a, b);
328
+ }
329
+ }
330
+
331
+ /**
332
+ * @generated from message workflow.v1.SignalInterviewBookedRequest
333
+ */
334
+ export class SignalInterviewBookedRequest extends Message<SignalInterviewBookedRequest> {
335
+ /**
336
+ * @generated from field: string application_id = 1;
337
+ */
338
+ applicationId = "";
339
+
340
+ /**
341
+ * @generated from field: string scheduled_at_rfc3339 = 2;
342
+ */
343
+ scheduledAtRfc3339 = "";
344
+
345
+ constructor(data?: PartialMessage<SignalInterviewBookedRequest>) {
346
+ super();
347
+ proto3.util.initPartial(data, this);
348
+ }
349
+
350
+ static readonly runtime: typeof proto3 = proto3;
351
+ static readonly typeName = "workflow.v1.SignalInterviewBookedRequest";
352
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
353
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
354
+ { no: 2, name: "scheduled_at_rfc3339", kind: "scalar", T: 9 /* ScalarType.STRING */ },
355
+ ]);
356
+
357
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalInterviewBookedRequest {
358
+ return new SignalInterviewBookedRequest().fromBinary(bytes, options);
359
+ }
360
+
361
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalInterviewBookedRequest {
362
+ return new SignalInterviewBookedRequest().fromJson(jsonValue, options);
363
+ }
364
+
365
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalInterviewBookedRequest {
366
+ return new SignalInterviewBookedRequest().fromJsonString(jsonString, options);
367
+ }
368
+
369
+ static equals(a: SignalInterviewBookedRequest | PlainMessage<SignalInterviewBookedRequest> | undefined, b: SignalInterviewBookedRequest | PlainMessage<SignalInterviewBookedRequest> | undefined): boolean {
370
+ return proto3.util.equals(SignalInterviewBookedRequest, a, b);
371
+ }
372
+ }
373
+
374
+ /**
375
+ * @generated from message workflow.v1.SignalInterviewBookedResponse
376
+ */
377
+ export class SignalInterviewBookedResponse extends Message<SignalInterviewBookedResponse> {
378
+ constructor(data?: PartialMessage<SignalInterviewBookedResponse>) {
379
+ super();
380
+ proto3.util.initPartial(data, this);
381
+ }
382
+
383
+ static readonly runtime: typeof proto3 = proto3;
384
+ static readonly typeName = "workflow.v1.SignalInterviewBookedResponse";
385
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
386
+ ]);
387
+
388
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalInterviewBookedResponse {
389
+ return new SignalInterviewBookedResponse().fromBinary(bytes, options);
390
+ }
391
+
392
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalInterviewBookedResponse {
393
+ return new SignalInterviewBookedResponse().fromJson(jsonValue, options);
394
+ }
395
+
396
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalInterviewBookedResponse {
397
+ return new SignalInterviewBookedResponse().fromJsonString(jsonString, options);
398
+ }
399
+
400
+ static equals(a: SignalInterviewBookedResponse | PlainMessage<SignalInterviewBookedResponse> | undefined, b: SignalInterviewBookedResponse | PlainMessage<SignalInterviewBookedResponse> | undefined): boolean {
401
+ return proto3.util.equals(SignalInterviewBookedResponse, a, b);
402
+ }
403
+ }
404
+
405
+ /**
406
+ * @generated from message workflow.v1.SignalOfferDecisionRequest
407
+ */
408
+ export class SignalOfferDecisionRequest extends Message<SignalOfferDecisionRequest> {
409
+ /**
410
+ * @generated from field: string application_id = 1;
411
+ */
412
+ applicationId = "";
413
+
414
+ /**
415
+ * @generated from field: bool accepted = 2;
416
+ */
417
+ accepted = false;
418
+
419
+ /**
420
+ * @generated from field: string reason = 3;
421
+ */
422
+ reason = "";
423
+
424
+ constructor(data?: PartialMessage<SignalOfferDecisionRequest>) {
425
+ super();
426
+ proto3.util.initPartial(data, this);
427
+ }
428
+
429
+ static readonly runtime: typeof proto3 = proto3;
430
+ static readonly typeName = "workflow.v1.SignalOfferDecisionRequest";
431
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
432
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
433
+ { no: 2, name: "accepted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
434
+ { no: 3, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
435
+ ]);
436
+
437
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalOfferDecisionRequest {
438
+ return new SignalOfferDecisionRequest().fromBinary(bytes, options);
439
+ }
440
+
441
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalOfferDecisionRequest {
442
+ return new SignalOfferDecisionRequest().fromJson(jsonValue, options);
443
+ }
444
+
445
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalOfferDecisionRequest {
446
+ return new SignalOfferDecisionRequest().fromJsonString(jsonString, options);
447
+ }
448
+
449
+ static equals(a: SignalOfferDecisionRequest | PlainMessage<SignalOfferDecisionRequest> | undefined, b: SignalOfferDecisionRequest | PlainMessage<SignalOfferDecisionRequest> | undefined): boolean {
450
+ return proto3.util.equals(SignalOfferDecisionRequest, a, b);
451
+ }
452
+ }
453
+
454
+ /**
455
+ * @generated from message workflow.v1.SignalOfferDecisionResponse
456
+ */
457
+ export class SignalOfferDecisionResponse extends Message<SignalOfferDecisionResponse> {
458
+ constructor(data?: PartialMessage<SignalOfferDecisionResponse>) {
459
+ super();
460
+ proto3.util.initPartial(data, this);
461
+ }
462
+
463
+ static readonly runtime: typeof proto3 = proto3;
464
+ static readonly typeName = "workflow.v1.SignalOfferDecisionResponse";
465
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
466
+ ]);
467
+
468
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SignalOfferDecisionResponse {
469
+ return new SignalOfferDecisionResponse().fromBinary(bytes, options);
470
+ }
471
+
472
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SignalOfferDecisionResponse {
473
+ return new SignalOfferDecisionResponse().fromJson(jsonValue, options);
474
+ }
475
+
476
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SignalOfferDecisionResponse {
477
+ return new SignalOfferDecisionResponse().fromJsonString(jsonString, options);
478
+ }
479
+
480
+ static equals(a: SignalOfferDecisionResponse | PlainMessage<SignalOfferDecisionResponse> | undefined, b: SignalOfferDecisionResponse | PlainMessage<SignalOfferDecisionResponse> | undefined): boolean {
481
+ return proto3.util.equals(SignalOfferDecisionResponse, a, b);
482
+ }
483
+ }
484
+
485
+ /**
486
+ * @generated from message workflow.v1.GetWorkflowStatusRequest
487
+ */
488
+ export class GetWorkflowStatusRequest extends Message<GetWorkflowStatusRequest> {
489
+ /**
490
+ * @generated from field: string application_id = 1;
491
+ */
492
+ applicationId = "";
493
+
494
+ constructor(data?: PartialMessage<GetWorkflowStatusRequest>) {
495
+ super();
496
+ proto3.util.initPartial(data, this);
497
+ }
498
+
499
+ static readonly runtime: typeof proto3 = proto3;
500
+ static readonly typeName = "workflow.v1.GetWorkflowStatusRequest";
501
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
502
+ { no: 1, name: "application_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
503
+ ]);
504
+
505
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkflowStatusRequest {
506
+ return new GetWorkflowStatusRequest().fromBinary(bytes, options);
507
+ }
508
+
509
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkflowStatusRequest {
510
+ return new GetWorkflowStatusRequest().fromJson(jsonValue, options);
511
+ }
512
+
513
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkflowStatusRequest {
514
+ return new GetWorkflowStatusRequest().fromJsonString(jsonString, options);
515
+ }
516
+
517
+ static equals(a: GetWorkflowStatusRequest | PlainMessage<GetWorkflowStatusRequest> | undefined, b: GetWorkflowStatusRequest | PlainMessage<GetWorkflowStatusRequest> | undefined): boolean {
518
+ return proto3.util.equals(GetWorkflowStatusRequest, a, b);
519
+ }
520
+ }
521
+
522
+ /**
523
+ * @generated from message workflow.v1.GetWorkflowStatusResponse
524
+ */
525
+ export class GetWorkflowStatusResponse extends Message<GetWorkflowStatusResponse> {
526
+ /**
527
+ * @generated from field: string workflow_id = 1;
528
+ */
529
+ workflowId = "";
530
+
531
+ /**
532
+ * @generated from field: string run_id = 2;
533
+ */
534
+ runId = "";
535
+
536
+ /**
537
+ * Temporal workflow status name, e.g. RUNNING, COMPLETED.
538
+ *
539
+ * @generated from field: string status = 3;
540
+ */
541
+ status = "";
542
+
543
+ /**
544
+ * Best-effort last known stage from workflow (may be empty if not yet started).
545
+ *
546
+ * @generated from field: string last_known_stage = 4;
547
+ */
548
+ lastKnownStage = "";
549
+
550
+ constructor(data?: PartialMessage<GetWorkflowStatusResponse>) {
551
+ super();
552
+ proto3.util.initPartial(data, this);
553
+ }
554
+
555
+ static readonly runtime: typeof proto3 = proto3;
556
+ static readonly typeName = "workflow.v1.GetWorkflowStatusResponse";
557
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
558
+ { no: 1, name: "workflow_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
559
+ { no: 2, name: "run_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
560
+ { no: 3, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
561
+ { no: 4, name: "last_known_stage", kind: "scalar", T: 9 /* ScalarType.STRING */ },
562
+ ]);
563
+
564
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkflowStatusResponse {
565
+ return new GetWorkflowStatusResponse().fromBinary(bytes, options);
566
+ }
567
+
568
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkflowStatusResponse {
569
+ return new GetWorkflowStatusResponse().fromJson(jsonValue, options);
570
+ }
571
+
572
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkflowStatusResponse {
573
+ return new GetWorkflowStatusResponse().fromJsonString(jsonString, options);
574
+ }
575
+
576
+ static equals(a: GetWorkflowStatusResponse | PlainMessage<GetWorkflowStatusResponse> | undefined, b: GetWorkflowStatusResponse | PlainMessage<GetWorkflowStatusResponse> | undefined): boolean {
577
+ return proto3.util.equals(GetWorkflowStatusResponse, a, b);
578
+ }
579
+ }
580
+
@@ -0,0 +1,156 @@
1
+ syntax = "proto3";
2
+
3
+ package hiring.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/hiring/v1;hiringv1";
6
+
7
+ // Pipeline capability aligns with business hiring automation areas.
8
+ enum PipelineCapability {
9
+ PIPELINE_CAPABILITY_UNSPECIFIED = 0;
10
+ PIPELINE_CAPABILITY_SCREENING = 1;
11
+ PIPELINE_CAPABILITY_RECRUITER_REVIEW = 2;
12
+ PIPELINE_CAPABILITY_ASSESSMENT = 3;
13
+ PIPELINE_CAPABILITY_INTERVIEW = 4;
14
+ PIPELINE_CAPABILITY_OFFER = 5;
15
+ PIPELINE_CAPABILITY_COMMUNICATION = 6;
16
+ }
17
+
18
+ enum PipelineStepType {
19
+ PIPELINE_STEP_TYPE_UNSPECIFIED = 0;
20
+ PIPELINE_STEP_TYPE_AUTOMATED = 1;
21
+ PIPELINE_STEP_TYPE_HUMAN_GATE = 2;
22
+ PIPELINE_STEP_TYPE_ASSESSMENT = 3;
23
+ PIPELINE_STEP_TYPE_INTERVIEW = 4;
24
+ PIPELINE_STEP_TYPE_OFFER = 5;
25
+ }
26
+
27
+ message BlockSLA {
28
+ int32 reminder_after_days = 1;
29
+ int32 escalate_after_days = 2;
30
+ int32 auto_reject_after_days = 3;
31
+ }
32
+
33
+ message ManualFieldSpec {
34
+ string id = 1;
35
+ string label = 2;
36
+ string type = 3;
37
+ bool required = 4;
38
+ }
39
+
40
+ message ManualFieldsConfig {
41
+ repeated ManualFieldSpec fields = 1;
42
+ }
43
+
44
+ message PipelineBlock {
45
+ string block_id = 1;
46
+ int32 sort_order = 2;
47
+ PipelineCapability capability = 3;
48
+ bool enabled = 4;
49
+ string display_name = 5;
50
+ string candidate_status_label = 6;
51
+ PipelineStepType step_type = 7;
52
+ BlockSLA sla = 8;
53
+ ManualFieldsConfig manual_fields = 9;
54
+ string config_json = 10;
55
+ }
56
+
57
+ message PipelineDefinition {
58
+ string definition_id = 1;
59
+ string company_id = 2;
60
+ string name = 3;
61
+ string description = 4;
62
+ string slug = 5;
63
+ int32 version = 6;
64
+ string status = 7;
65
+ bool is_platform = 8;
66
+ string source_template_id = 9;
67
+ int32 schema_version = 10;
68
+ repeated PipelineBlock blocks = 11;
69
+ }
70
+
71
+ message ExecutionStep {
72
+ string stage_id = 1;
73
+ PipelineStepType step_type = 2;
74
+ string block_id = 3;
75
+ PipelineCapability capability = 4;
76
+ BlockSLA sla = 5;
77
+ string config_json = 6;
78
+ string manual_fields_json = 7;
79
+ }
80
+
81
+ message PipelineSnapshot {
82
+ string definition_id = 1;
83
+ int32 definition_version = 2;
84
+ int32 schema_version = 3;
85
+ string definition_name = 4;
86
+ repeated ExecutionStep steps = 5;
87
+ }
88
+
89
+ message ListPlatformPipelineTemplatesRequest {}
90
+
91
+ message ListPlatformPipelineTemplatesResponse {
92
+ repeated PipelineDefinition templates = 1;
93
+ }
94
+
95
+ message GetPipelineDefinitionRequest {
96
+ string definition_id = 1;
97
+ }
98
+
99
+ message ListPipelineDefinitionsRequest {}
100
+
101
+ message ListPipelineDefinitionsResponse {
102
+ repeated PipelineDefinition definitions = 1;
103
+ }
104
+
105
+ message CreatePipelineDefinitionRequest {
106
+ string name = 1;
107
+ string description = 2;
108
+ repeated PipelineBlock blocks = 3;
109
+ }
110
+
111
+ message CreatePipelineDefinitionResponse {
112
+ string definition_id = 1;
113
+ }
114
+
115
+ message UpdatePipelineDefinitionRequest {
116
+ string definition_id = 1;
117
+ string name = 2;
118
+ string description = 3;
119
+ repeated PipelineBlock blocks = 4;
120
+ }
121
+
122
+ message PublishPipelineDefinitionRequest {
123
+ string definition_id = 1;
124
+ }
125
+
126
+ message PublishPipelineDefinitionResponse {
127
+ int32 version = 1;
128
+ }
129
+
130
+ message ClonePipelineFromTemplateRequest {
131
+ string template_id = 1;
132
+ string name = 2;
133
+ }
134
+
135
+ message ClonePipelineFromTemplateResponse {
136
+ string definition_id = 1;
137
+ }
138
+
139
+ message SetCompanyDefaultPipelineRequest {
140
+ string definition_id = 1;
141
+ }
142
+
143
+ message SetCompanyDefaultPipelineResponse {}
144
+
145
+ message SetJobPipelineDefinitionRequest {
146
+ string job_id = 1;
147
+ string definition_id = 2;
148
+ }
149
+
150
+ message GetApplicationPipelineSnapshotRequest {
151
+ string application_id = 1;
152
+ }
153
+
154
+ message GetApplicationPipelineSnapshotResponse {
155
+ PipelineSnapshot snapshot = 1;
156
+ }
@@ -4,6 +4,8 @@ package hiring.v1;
4
4
 
5
5
  option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/hiring/v1;hiringv1";
6
6
 
7
+ import "hiring/v1/pipeline.proto";
8
+
7
9
  // HiringService is the private hiring API for the API gateway and approved internal callers
8
10
  // (e.g. workflow in M2). Product clients must use api.v1.HiringService on the gateway.
9
11
  service HiringService {
@@ -29,6 +31,18 @@ service HiringService {
29
31
  rpc LinkAssessment(LinkAssessmentRequest) returns (LinkAssessmentResponse);
30
32
  rpc RecordOffer(RecordOfferRequest) returns (RecordOfferResponse);
31
33
  rpc ListApplicationEvents(ListApplicationEventsRequest) returns (ListApplicationEventsResponse);
34
+
35
+ // Pipeline configuration (M2.5)
36
+ rpc ListPlatformPipelineTemplates(ListPlatformPipelineTemplatesRequest) returns (ListPlatformPipelineTemplatesResponse);
37
+ rpc GetPipelineDefinition(GetPipelineDefinitionRequest) returns (PipelineDefinition);
38
+ rpc ListPipelineDefinitions(ListPipelineDefinitionsRequest) returns (ListPipelineDefinitionsResponse);
39
+ rpc CreatePipelineDefinition(CreatePipelineDefinitionRequest) returns (CreatePipelineDefinitionResponse);
40
+ rpc UpdatePipelineDefinition(UpdatePipelineDefinitionRequest) returns (PipelineDefinition);
41
+ rpc PublishPipelineDefinition(PublishPipelineDefinitionRequest) returns (PublishPipelineDefinitionResponse);
42
+ rpc ClonePipelineFromTemplate(ClonePipelineFromTemplateRequest) returns (ClonePipelineFromTemplateResponse);
43
+ rpc SetCompanyDefaultPipeline(SetCompanyDefaultPipelineRequest) returns (SetCompanyDefaultPipelineResponse);
44
+ rpc SetJobPipelineDefinition(SetJobPipelineDefinitionRequest) returns (Job);
45
+ rpc GetApplicationPipelineSnapshot(GetApplicationPipelineSnapshotRequest) returns (GetApplicationPipelineSnapshotResponse);
32
46
  }
33
47
 
34
48
  // --- Pagination ---
@@ -48,6 +62,7 @@ message CreateJobRequest {
48
62
  string title = 1;
49
63
  string description = 2;
50
64
  string public_slug = 3;
65
+ string pipeline_definition_id = 4;
51
66
  }
52
67
 
53
68
  message CreateJobResponse {
@@ -77,6 +92,7 @@ message Job {
77
92
  string team_metadata_json = 8;
78
93
  string created_at = 9;
79
94
  string updated_at = 10;
95
+ string pipeline_definition_id = 11;
80
96
  }
81
97
 
82
98
  message GetJobResponse {
@@ -90,6 +106,7 @@ message GetJobResponse {
90
106
  string team_metadata_json = 8;
91
107
  string created_at = 9;
92
108
  string updated_at = 10;
109
+ string pipeline_definition_id = 11;
93
110
  }
94
111
 
95
112
  message ListJobsRequest {
@@ -119,6 +136,7 @@ message UpdateJobRequest {
119
136
  string public_slug = 4;
120
137
  string requirements = 5;
121
138
  string team_metadata_json = 6;
139
+ string pipeline_definition_id = 7;
122
140
  }
123
141
 
124
142
  message UpdateJobResponse {
@@ -216,6 +234,7 @@ message RecordRecruiterDecisionRequest {
216
234
  string stage_context = 2;
217
235
  string outcome = 3;
218
236
  string reasoning = 4;
237
+ map<string, string> manual_inputs = 5;
219
238
  }
220
239
 
221
240
  message RecordRecruiterDecisionResponse {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@in-human-resources/backend-proto",
3
- "version": "0.1.4",
4
- "description": "Protobuf-ES and Connect-ES generated clients for api.v1, auth.v1, hiring.v1, and common.v1",
3
+ "version": "0.1.5",
4
+ "description": "Protobuf-ES and Connect-ES generated clients for api.v1, auth.v1, hiring.v1, workflow.v1, and common.v1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -10,6 +10,7 @@
10
10
  "api",
11
11
  "auth",
12
12
  "hiring",
13
+ "workflow",
13
14
  "common",
14
15
  "buf.yaml",
15
16
  "buf.gen.yaml"
@@ -0,0 +1,87 @@
1
+ syntax = "proto3";
2
+
3
+ package workflow.v1;
4
+
5
+ option go_package = "github.com/InHuman-Resources/Backend/Go/proto/gen/workflow/v1;workflowv1";
6
+
7
+ // WorkflowService is private: API gateway and approved internal callers only.
8
+ // Drives Temporal application lifecycle; product clients use api.v1.HiringService.
9
+ service WorkflowService {
10
+ // StartApplicationLifecycle starts (or idempotently re-attaches to) the root workflow for one application.
11
+ rpc StartApplicationLifecycle(StartApplicationLifecycleRequest) returns (StartApplicationLifecycleResponse);
12
+
13
+ rpc CancelWorkflow(CancelWorkflowRequest) returns (CancelWorkflowResponse);
14
+
15
+ // Human / domain signals (Temporal signal names match RPC suffixes where applicable).
16
+ rpc SignalRecruiterDecision(SignalRecruiterDecisionRequest) returns (SignalRecruiterDecisionResponse);
17
+ rpc SignalAssessmentCompleted(SignalAssessmentCompletedRequest) returns (SignalAssessmentCompletedResponse);
18
+ rpc SignalInterviewBooked(SignalInterviewBookedRequest) returns (SignalInterviewBookedResponse);
19
+ rpc SignalOfferDecision(SignalOfferDecisionRequest) returns (SignalOfferDecisionResponse);
20
+
21
+ rpc GetWorkflowStatus(GetWorkflowStatusRequest) returns (GetWorkflowStatusResponse);
22
+ }
23
+
24
+ message StartApplicationLifecycleRequest {
25
+ string application_id = 1;
26
+ string job_id = 2;
27
+ string candidate_user_id = 3;
28
+ string company_id = 4;
29
+ // JSON-encoded hiring PipelineSnapshot; when set, workflow interprets steps from snapshot.
30
+ string pipeline_snapshot_json = 5;
31
+ }
32
+
33
+ message StartApplicationLifecycleResponse {
34
+ string workflow_id = 1;
35
+ string run_id = 2;
36
+ }
37
+
38
+ message CancelWorkflowRequest {
39
+ string application_id = 1;
40
+ }
41
+
42
+ message CancelWorkflowResponse {}
43
+
44
+ message SignalRecruiterDecisionRequest {
45
+ string application_id = 1;
46
+ // approve advances pipeline; reject moves to rejected.
47
+ bool approve = 2;
48
+ string reason = 3;
49
+ map<string, string> manual_inputs = 4;
50
+ }
51
+
52
+ message SignalRecruiterDecisionResponse {}
53
+
54
+ message SignalAssessmentCompletedRequest {
55
+ string application_id = 1;
56
+ string external_assessment_id = 2;
57
+ }
58
+
59
+ message SignalAssessmentCompletedResponse {}
60
+
61
+ message SignalInterviewBookedRequest {
62
+ string application_id = 1;
63
+ string scheduled_at_rfc3339 = 2;
64
+ }
65
+
66
+ message SignalInterviewBookedResponse {}
67
+
68
+ message SignalOfferDecisionRequest {
69
+ string application_id = 1;
70
+ bool accepted = 2;
71
+ string reason = 3;
72
+ }
73
+
74
+ message SignalOfferDecisionResponse {}
75
+
76
+ message GetWorkflowStatusRequest {
77
+ string application_id = 1;
78
+ }
79
+
80
+ message GetWorkflowStatusResponse {
81
+ string workflow_id = 1;
82
+ string run_id = 2;
83
+ // Temporal workflow status name, e.g. RUNNING, COMPLETED.
84
+ string status = 3;
85
+ // Best-effort last known stage from workflow (may be empty if not yet started).
86
+ string last_known_stage = 4;
87
+ }