@rawdash/connector-greenhouse 0.0.1

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,635 @@
1
+ import { BaseConnector, ConnectorCost, ConnectorContext, SyncOptions, StorageHandle, SyncResult, ConnectorDoc } from '@rawdash/core';
2
+ import { z } from 'zod';
3
+
4
+ declare const configFields: z.ZodObject<{
5
+ apiKey: z.ZodObject<{
6
+ $secret: z.ZodString;
7
+ }, z.core.$strip>;
8
+ resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9
+ jobs: "jobs";
10
+ candidates: "candidates";
11
+ applications: "applications";
12
+ application_events: "application_events";
13
+ offers: "offers";
14
+ }>>>;
15
+ }, z.core.$strip>;
16
+ declare const doc: ConnectorDoc;
17
+ declare const cost: ConnectorCost;
18
+ interface GreenhouseSettings {
19
+ resources?: readonly GreenhouseResource[];
20
+ }
21
+ declare const greenhouseCredentials: {
22
+ apiKey: {
23
+ description: string;
24
+ auth: "required";
25
+ };
26
+ };
27
+ type GreenhouseCredentials = typeof greenhouseCredentials;
28
+ declare const PHASE_ORDER: readonly ["jobs", "candidates", "applications", "application_events", "offers"];
29
+ type GreenhousePhase = (typeof PHASE_ORDER)[number];
30
+ type GreenhouseResource = GreenhousePhase;
31
+ declare const greenhouseResources: {
32
+ readonly greenhouse_job: {
33
+ readonly shape: "entity";
34
+ readonly description: "Open, draft, and closed requisitions with department, office, and timestamps for opened / closed transitions.";
35
+ readonly endpoint: "GET /v1/jobs";
36
+ readonly fields: [{
37
+ readonly name: "name";
38
+ readonly description: "Job title.";
39
+ }, {
40
+ readonly name: "status";
41
+ readonly description: "Greenhouse job status (open / closed / draft).";
42
+ }, {
43
+ readonly name: "requisitionId";
44
+ readonly description: "External requisition id.";
45
+ }, {
46
+ readonly name: "departments";
47
+ readonly description: "Flat list of department names attached to the job.";
48
+ }, {
49
+ readonly name: "offices";
50
+ readonly description: "Flat list of office names attached to the job.";
51
+ }, {
52
+ readonly name: "openedAt";
53
+ readonly description: "When the job was opened (Unix ms).";
54
+ }, {
55
+ readonly name: "closedAt";
56
+ readonly description: "When the job was closed (Unix ms).";
57
+ }, {
58
+ readonly name: "confidential";
59
+ readonly description: "Whether the job is confidential.";
60
+ }];
61
+ readonly responses: {
62
+ readonly jobs: z.ZodArray<z.ZodObject<{
63
+ id: z.ZodNumber;
64
+ name: z.ZodString;
65
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ requisition_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ confidential: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
69
+ is_template: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
70
+ copied_from_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
71
+ departments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
72
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
73
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ }, z.core.$strip>>>>;
75
+ offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
76
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
77
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ }, z.core.$strip>>>>;
79
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ }, z.core.$strip>>;
84
+ };
85
+ };
86
+ readonly greenhouse_candidate: {
87
+ readonly shape: "entity";
88
+ readonly description: "Candidate records with name, title, company, and the count of attached applications.";
89
+ readonly endpoint: "GET /v1/candidates";
90
+ readonly fields: [{
91
+ readonly name: "firstName";
92
+ readonly description: "Candidate first name.";
93
+ }, {
94
+ readonly name: "lastName";
95
+ readonly description: "Candidate last name.";
96
+ }, {
97
+ readonly name: "title";
98
+ readonly description: "Candidate current job title.";
99
+ }, {
100
+ readonly name: "company";
101
+ readonly description: "Candidate current company.";
102
+ }, {
103
+ readonly name: "applicationCount";
104
+ readonly description: "Number of applications attached to the candidate. Useful for spotting repeat applicants.";
105
+ }, {
106
+ readonly name: "isPrivate";
107
+ readonly description: "Whether the candidate is marked private.";
108
+ }, {
109
+ readonly name: "createdAt";
110
+ readonly description: "When the candidate was created (Unix ms).";
111
+ }, {
112
+ readonly name: "lastActivityAt";
113
+ readonly description: "Last activity timestamp on the candidate (Unix ms).";
114
+ }];
115
+ readonly responses: {
116
+ readonly candidates: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodNumber;
118
+ first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ is_private: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
123
+ application_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
124
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ last_activity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ }, z.core.$strip>>;
128
+ };
129
+ };
130
+ readonly greenhouse_application: {
131
+ readonly shape: "entity";
132
+ readonly description: "Applications with status (active / hired / rejected), current stage, source, and the linked candidate / job.";
133
+ readonly endpoint: "GET /v1/applications";
134
+ readonly fields: [{
135
+ readonly name: "candidateId";
136
+ readonly description: "Candidate the application belongs to.";
137
+ }, {
138
+ readonly name: "jobId";
139
+ readonly description: "Primary job the application is attached to.";
140
+ }, {
141
+ readonly name: "jobName";
142
+ readonly description: "Primary job name at sync time.";
143
+ }, {
144
+ readonly name: "status";
145
+ readonly description: "Application status (active / hired / rejected).";
146
+ }, {
147
+ readonly name: "currentStage";
148
+ readonly description: "Name of the current stage (e.g. \"Phone Screen\").";
149
+ }, {
150
+ readonly name: "source";
151
+ readonly description: "Public source name where the application originated (e.g. \"LinkedIn\").";
152
+ }, {
153
+ readonly name: "appliedAt";
154
+ readonly description: "When the application was submitted.";
155
+ }, {
156
+ readonly name: "rejectedAt";
157
+ readonly description: "When the application was rejected (null if not).";
158
+ }, {
159
+ readonly name: "hiredAt";
160
+ readonly description: "When the application was hired (derived from last_activity_at when status=hired).";
161
+ }, {
162
+ readonly name: "lastActivityAt";
163
+ readonly description: "Last activity timestamp on the application (Unix ms).";
164
+ }];
165
+ readonly responses: {
166
+ readonly applications: z.ZodArray<z.ZodObject<{
167
+ id: z.ZodNumber;
168
+ candidate_id: z.ZodNumber;
169
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
171
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
172
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ }, z.core.$strip>>>;
174
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
178
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
179
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ }, z.core.$strip>>>;
181
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
182
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
183
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ }, z.core.$strip>>>>;
185
+ }, z.core.$strip>>;
186
+ };
187
+ };
188
+ readonly greenhouse_application_event: {
189
+ readonly shape: "event";
190
+ readonly description: "Application lifecycle events (applied / hired / rejected) derived from each application timestamps. The scope is cleared and rewritten on every sync (including incremental runs).";
191
+ readonly endpoint: "GET /v1/applications";
192
+ readonly notes: "Derived from each application's applied_at / rejected_at / last_activity_at fields, not from a separate API call.";
193
+ readonly fields: [{
194
+ readonly name: "applicationId";
195
+ readonly description: "Application the event belongs to.";
196
+ }, {
197
+ readonly name: "candidateId";
198
+ readonly description: "Candidate id, denormalised.";
199
+ }, {
200
+ readonly name: "jobId";
201
+ readonly description: "Job id, denormalised.";
202
+ }, {
203
+ readonly name: "transition";
204
+ readonly description: "\"applied\", \"hired\", or \"rejected\".";
205
+ }, {
206
+ readonly name: "source";
207
+ readonly description: "Application source name at the time of the event.";
208
+ }];
209
+ readonly responses: {
210
+ readonly application_events: z.ZodArray<z.ZodObject<{
211
+ id: z.ZodNumber;
212
+ candidate_id: z.ZodNumber;
213
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
215
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
216
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ }, z.core.$strip>>>;
218
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
222
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
223
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ }, z.core.$strip>>>;
225
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
226
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
227
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
228
+ }, z.core.$strip>>>>;
229
+ }, z.core.$strip>>;
230
+ };
231
+ };
232
+ readonly greenhouse_offer: {
233
+ readonly shape: "entity";
234
+ readonly description: "Offers with status (pending / accepted / rejected), linked to their application, candidate, and job.";
235
+ readonly endpoint: "GET /v1/offers";
236
+ readonly fields: [{
237
+ readonly name: "applicationId";
238
+ readonly description: "Linked application.";
239
+ }, {
240
+ readonly name: "candidateId";
241
+ readonly description: "Linked candidate.";
242
+ }, {
243
+ readonly name: "jobId";
244
+ readonly description: "Linked job.";
245
+ }, {
246
+ readonly name: "status";
247
+ readonly description: "Offer status (pending / accepted / rejected).";
248
+ }, {
249
+ readonly name: "sentAt";
250
+ readonly description: "When the offer was sent (Unix ms).";
251
+ }, {
252
+ readonly name: "resolvedAt";
253
+ readonly description: "When the offer was accepted or rejected (Unix ms; null while pending).";
254
+ }, {
255
+ readonly name: "startsAt";
256
+ readonly description: "Proposed start date on the offer (Unix ms).";
257
+ }];
258
+ readonly responses: {
259
+ readonly offers: z.ZodArray<z.ZodObject<{
260
+ id: z.ZodNumber;
261
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
262
+ candidate_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
263
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
264
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
266
+ sent_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
267
+ resolved_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
+ starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
+ }, z.core.$strip>>;
270
+ };
271
+ };
272
+ };
273
+ declare const id = "greenhouse";
274
+ declare class GreenhouseConnector extends BaseConnector<GreenhouseSettings, GreenhouseCredentials> {
275
+ static readonly id = "greenhouse";
276
+ static readonly resources: {
277
+ readonly greenhouse_job: {
278
+ readonly shape: "entity";
279
+ readonly description: "Open, draft, and closed requisitions with department, office, and timestamps for opened / closed transitions.";
280
+ readonly endpoint: "GET /v1/jobs";
281
+ readonly fields: [{
282
+ readonly name: "name";
283
+ readonly description: "Job title.";
284
+ }, {
285
+ readonly name: "status";
286
+ readonly description: "Greenhouse job status (open / closed / draft).";
287
+ }, {
288
+ readonly name: "requisitionId";
289
+ readonly description: "External requisition id.";
290
+ }, {
291
+ readonly name: "departments";
292
+ readonly description: "Flat list of department names attached to the job.";
293
+ }, {
294
+ readonly name: "offices";
295
+ readonly description: "Flat list of office names attached to the job.";
296
+ }, {
297
+ readonly name: "openedAt";
298
+ readonly description: "When the job was opened (Unix ms).";
299
+ }, {
300
+ readonly name: "closedAt";
301
+ readonly description: "When the job was closed (Unix ms).";
302
+ }, {
303
+ readonly name: "confidential";
304
+ readonly description: "Whether the job is confidential.";
305
+ }];
306
+ readonly responses: {
307
+ readonly jobs: z.ZodArray<z.ZodObject<{
308
+ id: z.ZodNumber;
309
+ name: z.ZodString;
310
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
+ requisition_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
312
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ confidential: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
314
+ is_template: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
315
+ copied_from_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
316
+ departments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
317
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
318
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
319
+ }, z.core.$strip>>>>;
320
+ offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
321
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
322
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
+ }, z.core.$strip>>>>;
324
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
328
+ }, z.core.$strip>>;
329
+ };
330
+ };
331
+ readonly greenhouse_candidate: {
332
+ readonly shape: "entity";
333
+ readonly description: "Candidate records with name, title, company, and the count of attached applications.";
334
+ readonly endpoint: "GET /v1/candidates";
335
+ readonly fields: [{
336
+ readonly name: "firstName";
337
+ readonly description: "Candidate first name.";
338
+ }, {
339
+ readonly name: "lastName";
340
+ readonly description: "Candidate last name.";
341
+ }, {
342
+ readonly name: "title";
343
+ readonly description: "Candidate current job title.";
344
+ }, {
345
+ readonly name: "company";
346
+ readonly description: "Candidate current company.";
347
+ }, {
348
+ readonly name: "applicationCount";
349
+ readonly description: "Number of applications attached to the candidate. Useful for spotting repeat applicants.";
350
+ }, {
351
+ readonly name: "isPrivate";
352
+ readonly description: "Whether the candidate is marked private.";
353
+ }, {
354
+ readonly name: "createdAt";
355
+ readonly description: "When the candidate was created (Unix ms).";
356
+ }, {
357
+ readonly name: "lastActivityAt";
358
+ readonly description: "Last activity timestamp on the candidate (Unix ms).";
359
+ }];
360
+ readonly responses: {
361
+ readonly candidates: z.ZodArray<z.ZodObject<{
362
+ id: z.ZodNumber;
363
+ first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
366
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
+ is_private: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
368
+ application_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
369
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
+ last_activity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
+ }, z.core.$strip>>;
373
+ };
374
+ };
375
+ readonly greenhouse_application: {
376
+ readonly shape: "entity";
377
+ readonly description: "Applications with status (active / hired / rejected), current stage, source, and the linked candidate / job.";
378
+ readonly endpoint: "GET /v1/applications";
379
+ readonly fields: [{
380
+ readonly name: "candidateId";
381
+ readonly description: "Candidate the application belongs to.";
382
+ }, {
383
+ readonly name: "jobId";
384
+ readonly description: "Primary job the application is attached to.";
385
+ }, {
386
+ readonly name: "jobName";
387
+ readonly description: "Primary job name at sync time.";
388
+ }, {
389
+ readonly name: "status";
390
+ readonly description: "Application status (active / hired / rejected).";
391
+ }, {
392
+ readonly name: "currentStage";
393
+ readonly description: "Name of the current stage (e.g. \"Phone Screen\").";
394
+ }, {
395
+ readonly name: "source";
396
+ readonly description: "Public source name where the application originated (e.g. \"LinkedIn\").";
397
+ }, {
398
+ readonly name: "appliedAt";
399
+ readonly description: "When the application was submitted.";
400
+ }, {
401
+ readonly name: "rejectedAt";
402
+ readonly description: "When the application was rejected (null if not).";
403
+ }, {
404
+ readonly name: "hiredAt";
405
+ readonly description: "When the application was hired (derived from last_activity_at when status=hired).";
406
+ }, {
407
+ readonly name: "lastActivityAt";
408
+ readonly description: "Last activity timestamp on the application (Unix ms).";
409
+ }];
410
+ readonly responses: {
411
+ readonly applications: z.ZodArray<z.ZodObject<{
412
+ id: z.ZodNumber;
413
+ candidate_id: z.ZodNumber;
414
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
415
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
416
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
417
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
+ }, z.core.$strip>>>;
419
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
422
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
423
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
424
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
425
+ }, z.core.$strip>>>;
426
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
427
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
428
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
+ }, z.core.$strip>>>>;
430
+ }, z.core.$strip>>;
431
+ };
432
+ };
433
+ readonly greenhouse_application_event: {
434
+ readonly shape: "event";
435
+ readonly description: "Application lifecycle events (applied / hired / rejected) derived from each application timestamps. The scope is cleared and rewritten on every sync (including incremental runs).";
436
+ readonly endpoint: "GET /v1/applications";
437
+ readonly notes: "Derived from each application's applied_at / rejected_at / last_activity_at fields, not from a separate API call.";
438
+ readonly fields: [{
439
+ readonly name: "applicationId";
440
+ readonly description: "Application the event belongs to.";
441
+ }, {
442
+ readonly name: "candidateId";
443
+ readonly description: "Candidate id, denormalised.";
444
+ }, {
445
+ readonly name: "jobId";
446
+ readonly description: "Job id, denormalised.";
447
+ }, {
448
+ readonly name: "transition";
449
+ readonly description: "\"applied\", \"hired\", or \"rejected\".";
450
+ }, {
451
+ readonly name: "source";
452
+ readonly description: "Application source name at the time of the event.";
453
+ }];
454
+ readonly responses: {
455
+ readonly application_events: z.ZodArray<z.ZodObject<{
456
+ id: z.ZodNumber;
457
+ candidate_id: z.ZodNumber;
458
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
459
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
460
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
461
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
462
+ }, z.core.$strip>>>;
463
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
464
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
465
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
466
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
467
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
468
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
469
+ }, z.core.$strip>>>;
470
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
471
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
472
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
473
+ }, z.core.$strip>>>>;
474
+ }, z.core.$strip>>;
475
+ };
476
+ };
477
+ readonly greenhouse_offer: {
478
+ readonly shape: "entity";
479
+ readonly description: "Offers with status (pending / accepted / rejected), linked to their application, candidate, and job.";
480
+ readonly endpoint: "GET /v1/offers";
481
+ readonly fields: [{
482
+ readonly name: "applicationId";
483
+ readonly description: "Linked application.";
484
+ }, {
485
+ readonly name: "candidateId";
486
+ readonly description: "Linked candidate.";
487
+ }, {
488
+ readonly name: "jobId";
489
+ readonly description: "Linked job.";
490
+ }, {
491
+ readonly name: "status";
492
+ readonly description: "Offer status (pending / accepted / rejected).";
493
+ }, {
494
+ readonly name: "sentAt";
495
+ readonly description: "When the offer was sent (Unix ms).";
496
+ }, {
497
+ readonly name: "resolvedAt";
498
+ readonly description: "When the offer was accepted or rejected (Unix ms; null while pending).";
499
+ }, {
500
+ readonly name: "startsAt";
501
+ readonly description: "Proposed start date on the offer (Unix ms).";
502
+ }];
503
+ readonly responses: {
504
+ readonly offers: z.ZodArray<z.ZodObject<{
505
+ id: z.ZodNumber;
506
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
507
+ candidate_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
508
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
509
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
511
+ sent_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
+ resolved_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
513
+ starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
514
+ }, z.core.$strip>>;
515
+ };
516
+ };
517
+ };
518
+ static readonly schemas: {
519
+ readonly jobs: z.ZodArray<z.ZodObject<{
520
+ id: z.ZodNumber;
521
+ name: z.ZodString;
522
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
523
+ requisition_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
525
+ confidential: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
526
+ is_template: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
527
+ copied_from_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
528
+ departments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
529
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
530
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
+ }, z.core.$strip>>>>;
532
+ offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
533
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
534
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ }, z.core.$strip>>>>;
536
+ opened_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
+ }, z.core.$strip>>;
541
+ } & {
542
+ readonly candidates: z.ZodArray<z.ZodObject<{
543
+ id: z.ZodNumber;
544
+ first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
545
+ last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
546
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
547
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
548
+ is_private: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
549
+ application_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
550
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
551
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
552
+ last_activity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
553
+ }, z.core.$strip>>;
554
+ } & {
555
+ readonly applications: z.ZodArray<z.ZodObject<{
556
+ id: z.ZodNumber;
557
+ candidate_id: z.ZodNumber;
558
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
559
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
560
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
561
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
562
+ }, z.core.$strip>>>;
563
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
564
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
565
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
566
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
567
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
568
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
569
+ }, z.core.$strip>>>;
570
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
571
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
572
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
+ }, z.core.$strip>>>>;
574
+ }, z.core.$strip>>;
575
+ } & {
576
+ readonly application_events: z.ZodArray<z.ZodObject<{
577
+ id: z.ZodNumber;
578
+ candidate_id: z.ZodNumber;
579
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ current_stage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
581
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
582
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
583
+ }, z.core.$strip>>>;
584
+ applied_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
585
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
586
+ last_activity_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
587
+ source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
588
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
589
+ public_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
590
+ }, z.core.$strip>>>;
591
+ jobs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
592
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
593
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
594
+ }, z.core.$strip>>>>;
595
+ }, z.core.$strip>>;
596
+ } & {
597
+ readonly offers: z.ZodArray<z.ZodObject<{
598
+ id: z.ZodNumber;
599
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
600
+ candidate_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
601
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
602
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
604
+ sent_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
605
+ resolved_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
606
+ starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
607
+ }, z.core.$strip>>;
608
+ } & Readonly<Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
609
+ static readonly cost: ConnectorCost;
610
+ static create(input: unknown, ctx?: ConnectorContext): GreenhouseConnector;
611
+ readonly id = "greenhouse";
612
+ readonly credentials: {
613
+ apiKey: {
614
+ description: string;
615
+ auth: "required";
616
+ };
617
+ };
618
+ private buildHeaders;
619
+ private apiGet;
620
+ private allowedPagePath;
621
+ private sanitizePageUrl;
622
+ private resolveCursor;
623
+ private buildInitialUrl;
624
+ private fetchPhasePage;
625
+ private writeJobs;
626
+ private writeCandidates;
627
+ private writeApplications;
628
+ private writeApplicationEvents;
629
+ private writeOffers;
630
+ private clearScopeOnFirstPage;
631
+ private writePhase;
632
+ sync(options: SyncOptions, storage: StorageHandle, signal?: AbortSignal): Promise<SyncResult>;
633
+ }
634
+
635
+ export { GreenhouseConnector, type GreenhouseResource, type GreenhouseSettings, configFields, cost, GreenhouseConnector as default, doc, id, greenhouseResources as resources };