@superdurable/connector-ashby 0.1.0 → 0.2.0

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/dist/index.js CHANGED
@@ -1,8 +1,119 @@
1
1
  import {
2
+ AddCandidateProjectBranch,
3
+ AddCandidateProjectBranchAdded,
4
+ AddCandidateProjectBranchDefect,
5
+ AddCandidateProjectBranchInvalidResponse,
6
+ AddCandidateProjectBranchProviderRejected,
7
+ AddCandidateProjectDefinition,
8
+ AddCandidateProjectMetadata,
9
+ AddCandidateTagBranch,
10
+ AddCandidateTagBranchAdded,
11
+ AddCandidateTagBranchDefect,
12
+ AddCandidateTagBranchInvalidResponse,
13
+ AddCandidateTagBranchProviderRejected,
14
+ AddCandidateTagDefinition,
15
+ AddCandidateTagMetadata,
16
+ ApplicationFeedbackPageSchema,
17
+ ApplicationFeedbackSummarySchema,
18
+ ApplicationPageSchema,
19
+ ApplicationSummarySchema,
20
+ CancelInterviewEventBranch,
21
+ CancelInterviewEventBranchCancelled,
22
+ CancelInterviewEventBranchDefect,
23
+ CancelInterviewEventBranchInvalidResponse,
24
+ CancelInterviewEventBranchProviderRejected,
25
+ CancelInterviewEventDefinition,
26
+ CancelInterviewEventInputSchema,
27
+ CancelInterviewEventMetadata,
28
+ CancelInterviewScheduleBranch,
29
+ CancelInterviewScheduleBranchCancelled,
30
+ CancelInterviewScheduleBranchDefect,
31
+ CancelInterviewScheduleBranchInvalidResponse,
32
+ CancelInterviewScheduleBranchProviderRejected,
33
+ CancelInterviewScheduleDefinition,
34
+ CancelInterviewScheduleInputSchema,
35
+ CancelInterviewScheduleMetadata,
36
+ CandidateNotePageSchema,
37
+ CandidateNoteSummarySchema,
38
+ CandidatePageSchema,
2
39
  CandidateProfileSchema,
40
+ CandidateProjectInputSchema,
41
+ CandidateProjectPageSchema,
42
+ CandidateProjectSummarySchema,
43
+ CandidateSearchResultsSchema,
44
+ CandidateTagInputSchema,
45
+ ChangeApplicationStageBranch,
46
+ ChangeApplicationStageBranchChanged,
47
+ ChangeApplicationStageBranchDefect,
48
+ ChangeApplicationStageBranchProviderRejected,
49
+ ChangeApplicationStageBranchUncertain,
50
+ ChangeApplicationStageDefinition,
51
+ ChangeApplicationStageInputSchema,
52
+ ChangeApplicationStageMetadata,
3
53
  ConfigSchema,
4
54
  Connection,
5
55
  ConnectorID,
56
+ CreateApplicationBranch,
57
+ CreateApplicationBranchCreated,
58
+ CreateApplicationBranchDefect,
59
+ CreateApplicationBranchProviderRejected,
60
+ CreateApplicationBranchUncertain,
61
+ CreateApplicationDefinition,
62
+ CreateApplicationInputSchema,
63
+ CreateApplicationMetadata,
64
+ CreateCandidateBranch,
65
+ CreateCandidateBranchCreated,
66
+ CreateCandidateBranchDefect,
67
+ CreateCandidateBranchProviderRejected,
68
+ CreateCandidateBranchUncertain,
69
+ CreateCandidateDefinition,
70
+ CreateCandidateInputSchema,
71
+ CreateCandidateMetadata,
72
+ CreateCandidateNoteBranch,
73
+ CreateCandidateNoteBranchCreated,
74
+ CreateCandidateNoteBranchDefect,
75
+ CreateCandidateNoteBranchProviderRejected,
76
+ CreateCandidateNoteBranchUncertain,
77
+ CreateCandidateNoteDefinition,
78
+ CreateCandidateNoteInputSchema,
79
+ CreateCandidateNoteMetadata,
80
+ CreateInterviewScheduleBranch,
81
+ CreateInterviewScheduleBranchCreated,
82
+ CreateInterviewScheduleBranchDefect,
83
+ CreateInterviewScheduleBranchProviderRejected,
84
+ CreateInterviewScheduleBranchUncertain,
85
+ CreateInterviewScheduleDefinition,
86
+ CreateInterviewScheduleInputSchema,
87
+ CreateInterviewScheduleMetadata,
88
+ CreateJobBranch,
89
+ CreateJobBranchCreated,
90
+ CreateJobBranchDefect,
91
+ CreateJobBranchProviderRejected,
92
+ CreateJobBranchUncertain,
93
+ CreateJobDefinition,
94
+ CreateJobInputSchema,
95
+ CreateJobMetadata,
96
+ CredentialMaterialError,
97
+ DeleteApplicationBranch,
98
+ DeleteApplicationBranchDefect,
99
+ DeleteApplicationBranchDeleted,
100
+ DeleteApplicationBranchInvalidResponse,
101
+ DeleteApplicationBranchProviderRejected,
102
+ DeleteApplicationDefinition,
103
+ DeleteApplicationInputSchema,
104
+ DeleteApplicationMetadata,
105
+ DeletedApplicationSchema,
106
+ FeedbackFieldSubmissionSchema,
107
+ FeedbackRequestReceiptSchema,
108
+ FeedbackSubmissionReceiptSchema,
109
+ GetApplicationBranch,
110
+ GetApplicationBranchDefect,
111
+ GetApplicationBranchFound,
112
+ GetApplicationBranchInvalidResponse,
113
+ GetApplicationBranchProviderRejected,
114
+ GetApplicationDefinition,
115
+ GetApplicationInputSchema,
116
+ GetApplicationMetadata,
6
117
  GetCandidateBranch,
7
118
  GetCandidateBranchDefect,
8
119
  GetCandidateBranchFound,
@@ -12,15 +123,541 @@ import {
12
123
  GetCandidateDefinition,
13
124
  GetCandidateInputSchema,
14
125
  GetCandidateMetadata,
126
+ GetInterviewBranch,
127
+ GetInterviewBranchDefect,
128
+ GetInterviewBranchFound,
129
+ GetInterviewBranchInvalidResponse,
130
+ GetInterviewBranchProviderRejected,
131
+ GetInterviewDefinition,
132
+ GetInterviewInputSchema,
133
+ GetInterviewMetadata,
134
+ GetInterviewScheduleBranch,
135
+ GetInterviewScheduleBranchDefect,
136
+ GetInterviewScheduleBranchFound,
137
+ GetInterviewScheduleBranchInvalidResponse,
138
+ GetInterviewScheduleBranchProviderRejected,
139
+ GetInterviewScheduleDefinition,
140
+ GetInterviewScheduleInputSchema,
141
+ GetInterviewScheduleMetadata,
142
+ GetJobBranch,
143
+ GetJobBranchDefect,
144
+ GetJobBranchFound,
145
+ GetJobBranchInvalidResponse,
146
+ GetJobBranchProviderRejected,
147
+ GetJobDefinition,
148
+ GetJobInputSchema,
149
+ GetJobMetadata,
150
+ InterviewPageSchema,
151
+ InterviewScheduleEventSchema,
152
+ InterviewScheduleInterviewerSchema,
153
+ InterviewSchedulePageSchema,
154
+ InterviewScheduleSummarySchema,
155
+ InterviewSummarySchema,
156
+ JobPageSchema,
157
+ JobSearchResultsSchema,
158
+ JobSummarySchema,
159
+ ListApplicationFeedbackBranch,
160
+ ListApplicationFeedbackBranchDefect,
161
+ ListApplicationFeedbackBranchInvalidResponse,
162
+ ListApplicationFeedbackBranchListed,
163
+ ListApplicationFeedbackBranchProviderRejected,
164
+ ListApplicationFeedbackDefinition,
165
+ ListApplicationFeedbackInputSchema,
166
+ ListApplicationFeedbackMetadata,
167
+ ListApplicationsBranch,
168
+ ListApplicationsBranchDefect,
169
+ ListApplicationsBranchInvalidResponse,
170
+ ListApplicationsBranchListed,
171
+ ListApplicationsBranchProviderRejected,
172
+ ListApplicationsDefinition,
173
+ ListApplicationsInputSchema,
174
+ ListApplicationsMetadata,
175
+ ListCandidateNotesBranch,
176
+ ListCandidateNotesBranchDefect,
177
+ ListCandidateNotesBranchInvalidResponse,
178
+ ListCandidateNotesBranchListed,
179
+ ListCandidateNotesBranchProviderRejected,
180
+ ListCandidateNotesDefinition,
181
+ ListCandidateNotesInputSchema,
182
+ ListCandidateNotesMetadata,
183
+ ListCandidateProjectsBranch,
184
+ ListCandidateProjectsBranchDefect,
185
+ ListCandidateProjectsBranchInvalidResponse,
186
+ ListCandidateProjectsBranchListed,
187
+ ListCandidateProjectsBranchProviderRejected,
188
+ ListCandidateProjectsDefinition,
189
+ ListCandidateProjectsInputSchema,
190
+ ListCandidateProjectsMetadata,
191
+ ListCandidatesBranch,
192
+ ListCandidatesBranchDefect,
193
+ ListCandidatesBranchInvalidResponse,
194
+ ListCandidatesBranchListed,
195
+ ListCandidatesBranchProviderRejected,
196
+ ListCandidatesDefinition,
197
+ ListCandidatesInputSchema,
198
+ ListCandidatesMetadata,
199
+ ListInterviewSchedulesBranch,
200
+ ListInterviewSchedulesBranchDefect,
201
+ ListInterviewSchedulesBranchInvalidResponse,
202
+ ListInterviewSchedulesBranchListed,
203
+ ListInterviewSchedulesBranchProviderRejected,
204
+ ListInterviewSchedulesDefinition,
205
+ ListInterviewSchedulesInputSchema,
206
+ ListInterviewSchedulesMetadata,
207
+ ListInterviewsBranch,
208
+ ListInterviewsBranchDefect,
209
+ ListInterviewsBranchInvalidResponse,
210
+ ListInterviewsBranchListed,
211
+ ListInterviewsBranchProviderRejected,
212
+ ListInterviewsDefinition,
213
+ ListInterviewsInputSchema,
214
+ ListInterviewsMetadata,
215
+ ListJobsBranch,
216
+ ListJobsBranchDefect,
217
+ ListJobsBranchInvalidResponse,
218
+ ListJobsBranchListed,
219
+ ListJobsBranchProviderRejected,
220
+ ListJobsDefinition,
221
+ ListJobsInputSchema,
222
+ ListJobsMetadata,
15
223
  ProviderID,
224
+ RemoveCandidateProjectBranch,
225
+ RemoveCandidateProjectBranchDefect,
226
+ RemoveCandidateProjectBranchInvalidResponse,
227
+ RemoveCandidateProjectBranchProviderRejected,
228
+ RemoveCandidateProjectBranchRemoved,
229
+ RemoveCandidateProjectDefinition,
230
+ RemoveCandidateProjectMetadata,
231
+ RemoveCandidateTagBranch,
232
+ RemoveCandidateTagBranchDefect,
233
+ RemoveCandidateTagBranchInvalidResponse,
234
+ RemoveCandidateTagBranchProviderRejected,
235
+ RemoveCandidateTagBranchRemoved,
236
+ RemoveCandidateTagDefinition,
237
+ RemoveCandidateTagMetadata,
238
+ RequestApplicationFeedbackBranch,
239
+ RequestApplicationFeedbackBranchDefect,
240
+ RequestApplicationFeedbackBranchProviderRejected,
241
+ RequestApplicationFeedbackBranchRequested,
242
+ RequestApplicationFeedbackBranchUncertain,
243
+ RequestApplicationFeedbackDefinition,
244
+ RequestApplicationFeedbackInputSchema,
245
+ RequestApplicationFeedbackMetadata,
246
+ SearchCandidatesBranch,
247
+ SearchCandidatesBranchDefect,
248
+ SearchCandidatesBranchFound,
249
+ SearchCandidatesBranchInvalidResponse,
250
+ SearchCandidatesBranchProviderRejected,
251
+ SearchCandidatesDefinition,
252
+ SearchCandidatesInputSchema,
253
+ SearchCandidatesMetadata,
254
+ SearchJobsBranch,
255
+ SearchJobsBranchDefect,
256
+ SearchJobsBranchFound,
257
+ SearchJobsBranchInvalidResponse,
258
+ SearchJobsBranchProviderRejected,
259
+ SearchJobsDefinition,
260
+ SearchJobsInputSchema,
261
+ SearchJobsMetadata,
262
+ SetApplicationSourceBranch,
263
+ SetApplicationSourceBranchDefect,
264
+ SetApplicationSourceBranchInvalidResponse,
265
+ SetApplicationSourceBranchProviderRejected,
266
+ SetApplicationSourceBranchSet,
267
+ SetApplicationSourceDefinition,
268
+ SetApplicationSourceInputSchema,
269
+ SetApplicationSourceMetadata,
270
+ SetJobStatusBranch,
271
+ SetJobStatusBranchDefect,
272
+ SetJobStatusBranchInvalidResponse,
273
+ SetJobStatusBranchProviderRejected,
274
+ SetJobStatusBranchSet,
275
+ SetJobStatusDefinition,
276
+ SetJobStatusInputSchema,
277
+ SetJobStatusMetadata,
278
+ SubmitApplicationFeedbackBranch,
279
+ SubmitApplicationFeedbackBranchDefect,
280
+ SubmitApplicationFeedbackBranchInvalidResponse,
281
+ SubmitApplicationFeedbackBranchProviderRejected,
282
+ SubmitApplicationFeedbackBranchSubmitted,
283
+ SubmitApplicationFeedbackDefinition,
284
+ SubmitApplicationFeedbackInputSchema,
285
+ SubmitApplicationFeedbackMetadata,
286
+ TransferApplicationBranch,
287
+ TransferApplicationBranchDefect,
288
+ TransferApplicationBranchInvalidResponse,
289
+ TransferApplicationBranchProviderRejected,
290
+ TransferApplicationBranchTransferred,
291
+ TransferApplicationDefinition,
292
+ TransferApplicationInputSchema,
293
+ TransferApplicationMetadata,
294
+ UpdateCandidateBranch,
295
+ UpdateCandidateBranchDefect,
296
+ UpdateCandidateBranchInvalidResponse,
297
+ UpdateCandidateBranchNotFound,
298
+ UpdateCandidateBranchProviderRejected,
299
+ UpdateCandidateBranchUpdated,
300
+ UpdateCandidateDefinition,
301
+ UpdateCandidateInputSchema,
302
+ UpdateCandidateMetadata,
303
+ UpdateJobTitleBranch,
304
+ UpdateJobTitleBranchDefect,
305
+ UpdateJobTitleBranchInvalidResponse,
306
+ UpdateJobTitleBranchProviderRejected,
307
+ UpdateJobTitleBranchUpdated,
308
+ UpdateJobTitleDefinition,
309
+ UpdateJobTitleInputSchema,
310
+ UpdateJobTitleMetadata,
16
311
  decodeCredentials,
312
+ isCredentialMaterialError,
17
313
  newConnection,
18
314
  newConnectionWithOperations,
19
315
  newProjectConnection
20
- } from "./chunk-6O5ADW6S.js";
316
+ } from "./chunk-ARSIHHSF.js";
21
317
 
22
318
  // src/generated/steps.ts
23
- import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
319
+ import { goToBranch, newMutationStep, newQueryStep } from "@superdurable/connectors-sdk";
320
+ function newListApplicationFeedbackStep(configuration) {
321
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
322
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
323
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listApplicationFeedback(), connection: connection.reference, branches: [
324
+ goToBranch("listed", listed),
325
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
326
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
327
+ ...defect ? [goToBranch("defect", defect)] : []
328
+ ] });
329
+ }
330
+ function newRequestApplicationFeedbackStep(configuration) {
331
+ const { connection, connectionName, requested, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
332
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
333
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.requestApplicationFeedback(), connection: connection.reference, branches: [
334
+ goToBranch("requested", requested),
335
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
336
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
337
+ ...defect ? [goToBranch("defect", defect)] : []
338
+ ] });
339
+ }
340
+ function newSubmitApplicationFeedbackStep(configuration) {
341
+ const { connection, connectionName, submitted, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
342
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
343
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.submitApplicationFeedback(), connection: connection.reference, branches: [
344
+ goToBranch("submitted", submitted),
345
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
346
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
347
+ ...defect ? [goToBranch("defect", defect)] : []
348
+ ] });
349
+ }
350
+ function newListInterviewsStep(configuration) {
351
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
352
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
353
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listInterviews(), connection: connection.reference, branches: [
354
+ goToBranch("listed", listed),
355
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
356
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
357
+ ...defect ? [goToBranch("defect", defect)] : []
358
+ ] });
359
+ }
360
+ function newGetInterviewStep(configuration) {
361
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
362
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
363
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getInterview(), connection: connection.reference, branches: [
364
+ goToBranch("found", found),
365
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
366
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
367
+ ...defect ? [goToBranch("defect", defect)] : []
368
+ ] });
369
+ }
370
+ function newListInterviewSchedulesStep(configuration) {
371
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
372
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
373
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listInterviewSchedules(), connection: connection.reference, branches: [
374
+ goToBranch("listed", listed),
375
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
376
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
377
+ ...defect ? [goToBranch("defect", defect)] : []
378
+ ] });
379
+ }
380
+ function newGetInterviewScheduleStep(configuration) {
381
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
382
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
383
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getInterviewSchedule(), connection: connection.reference, branches: [
384
+ goToBranch("found", found),
385
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
386
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
387
+ ...defect ? [goToBranch("defect", defect)] : []
388
+ ] });
389
+ }
390
+ function newCreateInterviewScheduleStep(configuration) {
391
+ const { connection, connectionName, created, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
392
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
393
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createInterviewSchedule(), connection: connection.reference, branches: [
394
+ goToBranch("created", created),
395
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
396
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
397
+ ...defect ? [goToBranch("defect", defect)] : []
398
+ ] });
399
+ }
400
+ function newCancelInterviewScheduleStep(configuration) {
401
+ const { connection, connectionName, cancelled, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
402
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
403
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.cancelInterviewSchedule(), connection: connection.reference, branches: [
404
+ goToBranch("cancelled", cancelled),
405
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
406
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
407
+ ...defect ? [goToBranch("defect", defect)] : []
408
+ ] });
409
+ }
410
+ function newCancelInterviewEventStep(configuration) {
411
+ const { connection, connectionName, cancelled, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
412
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
413
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.cancelInterviewEvent(), connection: connection.reference, branches: [
414
+ goToBranch("cancelled", cancelled),
415
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
416
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
417
+ ...defect ? [goToBranch("defect", defect)] : []
418
+ ] });
419
+ }
420
+ function newListApplicationsStep(configuration) {
421
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
422
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
423
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listApplications(), connection: connection.reference, branches: [
424
+ goToBranch("listed", listed),
425
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
426
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
427
+ ...defect ? [goToBranch("defect", defect)] : []
428
+ ] });
429
+ }
430
+ function newGetApplicationStep(configuration) {
431
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
432
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
433
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getApplication(), connection: connection.reference, branches: [
434
+ goToBranch("found", found),
435
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
436
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
437
+ ...defect ? [goToBranch("defect", defect)] : []
438
+ ] });
439
+ }
440
+ function newCreateApplicationStep(configuration) {
441
+ const { connection, connectionName, created, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
442
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
443
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createApplication(), connection: connection.reference, branches: [
444
+ goToBranch("created", created),
445
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
446
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
447
+ ...defect ? [goToBranch("defect", defect)] : []
448
+ ] });
449
+ }
450
+ function newChangeApplicationStageStep(configuration) {
451
+ const { connection, connectionName, changed, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
452
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
453
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.changeApplicationStage(), connection: connection.reference, branches: [
454
+ goToBranch("changed", changed),
455
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
456
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
457
+ ...defect ? [goToBranch("defect", defect)] : []
458
+ ] });
459
+ }
460
+ function newTransferApplicationStep(configuration) {
461
+ const { connection, connectionName, transferred, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
462
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
463
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.transferApplication(), connection: connection.reference, branches: [
464
+ goToBranch("transferred", transferred),
465
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
466
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
467
+ ...defect ? [goToBranch("defect", defect)] : []
468
+ ] });
469
+ }
470
+ function newSetApplicationSourceStep(configuration) {
471
+ const { connection, connectionName, set, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
472
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
473
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.setApplicationSource(), connection: connection.reference, branches: [
474
+ goToBranch("set", set),
475
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
476
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
477
+ ...defect ? [goToBranch("defect", defect)] : []
478
+ ] });
479
+ }
480
+ function newDeleteApplicationStep(configuration) {
481
+ const { connection, connectionName, deleted, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
482
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
483
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteApplication(), connection: connection.reference, branches: [
484
+ goToBranch("deleted", deleted),
485
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
486
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
487
+ ...defect ? [goToBranch("defect", defect)] : []
488
+ ] });
489
+ }
490
+ function newListJobsStep(configuration) {
491
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
492
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
493
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listJobs(), connection: connection.reference, branches: [
494
+ goToBranch("listed", listed),
495
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
496
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
497
+ ...defect ? [goToBranch("defect", defect)] : []
498
+ ] });
499
+ }
500
+ function newGetJobStep(configuration) {
501
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
502
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
503
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getJob(), connection: connection.reference, branches: [
504
+ goToBranch("found", found),
505
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
506
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
507
+ ...defect ? [goToBranch("defect", defect)] : []
508
+ ] });
509
+ }
510
+ function newSearchJobsStep(configuration) {
511
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
512
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
513
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.searchJobs(), connection: connection.reference, branches: [
514
+ goToBranch("found", found),
515
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
516
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
517
+ ...defect ? [goToBranch("defect", defect)] : []
518
+ ] });
519
+ }
520
+ function newCreateJobStep(configuration) {
521
+ const { connection, connectionName, created, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
522
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
523
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createJob(), connection: connection.reference, branches: [
524
+ goToBranch("created", created),
525
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
526
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
527
+ ...defect ? [goToBranch("defect", defect)] : []
528
+ ] });
529
+ }
530
+ function newUpdateJobTitleStep(configuration) {
531
+ const { connection, connectionName, updated, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
532
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
533
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.updateJobTitle(), connection: connection.reference, branches: [
534
+ goToBranch("updated", updated),
535
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
536
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
537
+ ...defect ? [goToBranch("defect", defect)] : []
538
+ ] });
539
+ }
540
+ function newSetJobStatusStep(configuration) {
541
+ const { connection, connectionName, set, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
542
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
543
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.setJobStatus(), connection: connection.reference, branches: [
544
+ goToBranch("set", set),
545
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
546
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
547
+ ...defect ? [goToBranch("defect", defect)] : []
548
+ ] });
549
+ }
550
+ function newListCandidateNotesStep(configuration) {
551
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
552
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
553
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listCandidateNotes(), connection: connection.reference, branches: [
554
+ goToBranch("listed", listed),
555
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
556
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
557
+ ...defect ? [goToBranch("defect", defect)] : []
558
+ ] });
559
+ }
560
+ function newCreateCandidateNoteStep(configuration) {
561
+ const { connection, connectionName, created, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
562
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
563
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createCandidateNote(), connection: connection.reference, branches: [
564
+ goToBranch("created", created),
565
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
566
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
567
+ ...defect ? [goToBranch("defect", defect)] : []
568
+ ] });
569
+ }
570
+ function newListCandidateProjectsStep(configuration) {
571
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
572
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
573
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listCandidateProjects(), connection: connection.reference, branches: [
574
+ goToBranch("listed", listed),
575
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
576
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
577
+ ...defect ? [goToBranch("defect", defect)] : []
578
+ ] });
579
+ }
580
+ function newAddCandidateProjectStep(configuration) {
581
+ const { connection, connectionName, added, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
582
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
583
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.addCandidateProject(), connection: connection.reference, branches: [
584
+ goToBranch("added", added),
585
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
586
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
587
+ ...defect ? [goToBranch("defect", defect)] : []
588
+ ] });
589
+ }
590
+ function newRemoveCandidateProjectStep(configuration) {
591
+ const { connection, connectionName, removed, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
592
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
593
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.removeCandidateProject(), connection: connection.reference, branches: [
594
+ goToBranch("removed", removed),
595
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
596
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
597
+ ...defect ? [goToBranch("defect", defect)] : []
598
+ ] });
599
+ }
600
+ function newSearchCandidatesStep(configuration) {
601
+ const { connection, connectionName, found, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
602
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
603
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.searchCandidates(), connection: connection.reference, branches: [
604
+ goToBranch("found", found),
605
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
606
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
607
+ ...defect ? [goToBranch("defect", defect)] : []
608
+ ] });
609
+ }
610
+ function newCreateCandidateStep(configuration) {
611
+ const { connection, connectionName, created, providerRejected, uncertain, defect, ...stepConfiguration } = configuration;
612
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
613
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createCandidate(), connection: connection.reference, branches: [
614
+ goToBranch("created", created),
615
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
616
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
617
+ ...defect ? [goToBranch("defect", defect)] : []
618
+ ] });
619
+ }
620
+ function newAddCandidateTagStep(configuration) {
621
+ const { connection, connectionName, added, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
622
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
623
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.addCandidateTag(), connection: connection.reference, branches: [
624
+ goToBranch("added", added),
625
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
626
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
627
+ ...defect ? [goToBranch("defect", defect)] : []
628
+ ] });
629
+ }
630
+ function newRemoveCandidateTagStep(configuration) {
631
+ const { connection, connectionName, removed, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
632
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
633
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.removeCandidateTag(), connection: connection.reference, branches: [
634
+ goToBranch("removed", removed),
635
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
636
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
637
+ ...defect ? [goToBranch("defect", defect)] : []
638
+ ] });
639
+ }
640
+ function newListCandidatesStep(configuration) {
641
+ const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
642
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
643
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listCandidates(), connection: connection.reference, branches: [
644
+ goToBranch("listed", listed),
645
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
646
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
647
+ ...defect ? [goToBranch("defect", defect)] : []
648
+ ] });
649
+ }
650
+ function newUpdateCandidateStep(configuration) {
651
+ const { connection, connectionName, updated, notFound, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
652
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
653
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.updateCandidate(), connection: connection.reference, branches: [
654
+ goToBranch("updated", updated),
655
+ ...notFound ? [goToBranch("notFound", notFound)] : [],
656
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
657
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
658
+ ...defect ? [goToBranch("defect", defect)] : []
659
+ ] });
660
+ }
24
661
  function newGetCandidateStep(configuration) {
25
662
  const { connection, connectionName, found, notFound, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
26
663
  if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
@@ -33,13 +670,1057 @@ function newGetCandidateStep(configuration) {
33
670
  ] });
34
671
  }
35
672
 
36
- // src/project.ts
37
- import { SecretString as SecretString2 } from "@superdurable/connectors-sdk";
38
- import { z } from "zod";
673
+ // src/project.ts
674
+ import { SecretString as SecretString2 } from "@superdurable/connectors-sdk";
675
+ import { z as z2 } from "zod";
676
+
677
+ // src/client.ts
678
+ import { SecretString, newQueryBranch as newQueryBranch2, newQueryRetry as newQueryRetry2 } from "@superdurable/connectors-sdk";
679
+ import { BodyTooLargeError, ProviderTransportError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
680
+
681
+ // src/limited.ts
682
+ import { definitionMaxSends, newMutationBranch as newMutationBranch2, newMutationUncertain } from "@superdurable/connectors-sdk";
683
+ import { newFence } from "@superdurable/connectors-sdk/singledispatch";
684
+
685
+ // src/mutations.ts
686
+ import { newMutationBranch, newMutationRetry } from "@superdurable/connectors-sdk";
687
+ import { z } from "zod";
688
+
689
+ // src/queries.ts
690
+ import { isIP } from "net";
691
+ import { newQueryBranch, newQueryRetry } from "@superdurable/connectors-sdk";
692
+ var trimErrorCode = /* @__PURE__ */ new Set(["listCandidateNotes", "listCandidateProjects", "searchCandidates", "listCandidates"]);
693
+ var addressSpecials = '()<>[]:;@\\,"';
694
+ var AshbyQuery = class {
695
+ constructor(client, contract, path, empty, request, decode, branch) {
696
+ this.client = client;
697
+ this.contract = contract;
698
+ this.path = path;
699
+ this.empty = empty;
700
+ this.request = request;
701
+ this.decode = decode;
702
+ this.branch = branch;
703
+ }
704
+ client;
705
+ contract;
706
+ path;
707
+ empty;
708
+ request;
709
+ decode;
710
+ branch;
711
+ /** Return the generated Query contract. */
712
+ definition() {
713
+ return this.contract;
714
+ }
715
+ /** Validate inputs and classify the response without returning private fields. */
716
+ async invoke(call, input) {
717
+ let request;
718
+ try {
719
+ request = this.request(input);
720
+ } catch {
721
+ return this.terminal("defect", "VALIDATION", "Ashby query input is invalid");
722
+ }
723
+ const response = await this.client.post(call, this.path, request);
724
+ if (response.error === "credential") return this.terminal("defect", "AUTHENTICATION", "Ashby credentials are unavailable");
725
+ if (response.error === "request") return newQueryRetry(this.failure("TRANSPORT", "Ashby query failed"));
726
+ if (response.status === 429) return newQueryRetry(this.failure("RATE_LIMIT", "Ashby rate limited the query"), response.retryAfterMs);
727
+ if (response.status === 408 || response.status >= 500)
728
+ return newQueryRetry(this.failure("AVAILABILITY", "Ashby query unavailable"), response.retryAfterMs);
729
+ if (response.status !== 200) return this.terminal("providerRejected", "PROVIDER_REJECTION", "Ashby rejected the query");
730
+ if (response.error === "tooLarge") return this.terminal("invalidResponse", "RESPONSE_TOO_LARGE", "Ashby response exceeded its limit");
731
+ if (response.error) return newQueryRetry(this.failure("TRANSPORT", "Ashby response interrupted"));
732
+ try {
733
+ const document = object(JSON.parse(Buffer.from(response.body).toString("utf8")));
734
+ if (document.success === false) {
735
+ const code = text(object(document.errorInfo), "code");
736
+ if (!(trimErrorCode.has(this.contract.operation.operationId) ? code.trim() : code))
737
+ throw new TypeError("Ashby error code missing");
738
+ return this.terminal("providerRejected", "PROVIDER_REJECTION", "Ashby rejected the query");
739
+ }
740
+ if (document.success !== true) throw new TypeError("Ashby confirmation missing");
741
+ return newQueryBranch(this.branch, this.decode(document));
742
+ } catch {
743
+ return this.terminal("invalidResponse", "PROTOCOL", "Ashby query response is invalid");
744
+ }
745
+ }
746
+ terminal(branch, kind, message) {
747
+ return newQueryBranch(branch, this.empty(), {}, this.failure(kind, message));
748
+ }
749
+ failure(kind, message) {
750
+ return { provider: "ashby", operation: this.contract.operation.operationId, kind, message };
751
+ }
752
+ };
753
+ function idRequest(field, identity) {
754
+ if (!isValidCandidateID(identity)) throw new TypeError("Ashby identity is not a UUID");
755
+ return { [field]: identity };
756
+ }
757
+ function pageRequest(cursor = "", limit = 0, defaultLimit = 0) {
758
+ validateLimit(limit);
759
+ if (Buffer.byteLength(cursor) > 1024) throw new TypeError("Ashby cursor is too long");
760
+ return { ...cursor ? { cursor } : {}, ...limit || defaultLimit ? { limit: limit || defaultLimit } : {} };
761
+ }
762
+ function validateLimit(limit) {
763
+ if (!Number.isInteger(limit) || limit < 0 || limit > 100) throw new TypeError("Ashby limit is invalid");
764
+ }
765
+ function jobSearchRequest(input) {
766
+ const title = input.title ?? "", requisitionId = input.requisitionId ?? "";
767
+ if (!title.trim() && !requisitionId.trim() || Buffer.byteLength(title) > 512 || Buffer.byteLength(requisitionId) > 256)
768
+ throw new TypeError("Ashby job search is invalid");
769
+ return searchRequest({ title, requisitionId }, input.limit);
770
+ }
771
+ function candidateSearchRequest(input) {
772
+ const name = input.name ?? "", email = input.email ?? "";
773
+ if (!name.trim() && !email.trim() || Buffer.byteLength(name) > 512 || Buffer.byteLength(email) > 320 || email && !isValidEmail(email))
774
+ throw new TypeError("Ashby candidate search is invalid");
775
+ return searchRequest({ name, email }, input.limit);
776
+ }
777
+ function searchRequest(fields, limit = 0) {
778
+ validateLimit(limit);
779
+ return { ...Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== "")), ...limit ? { limit } : {} };
780
+ }
781
+ function isValidEmail(value) {
782
+ const at = value.indexOf("@");
783
+ if (at < 1 || !dotAtom(value.slice(0, at))) return false;
784
+ const domain = value.slice(at + 1);
785
+ if (domain.startsWith("[") && domain.endsWith("]")) {
786
+ const literal = domain.slice(1, -1);
787
+ return !literal.includes("%") && isIP(literal) !== 0;
788
+ }
789
+ return dotAtom(domain);
790
+ }
791
+ function dotAtom(value) {
792
+ return value.split(".").every((part) => part.length > 0 && Array.from(part).every((character) => character.charCodeAt(0) >= 128 || character >= "!" && character <= "~" && !addressSpecials.includes(character)));
793
+ }
794
+ function object(value) {
795
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new TypeError("Ashby JSON object missing");
796
+ return value;
797
+ }
798
+ function text(row, key, required = false) {
799
+ const value = row[key];
800
+ if (value == null && !required) return "";
801
+ if (typeof value !== "string" || value === "" && required) throw new TypeError("Ashby text field invalid");
802
+ return value;
803
+ }
804
+ function uuid(row, key, optional = false) {
805
+ const value = text(row, key);
806
+ if (optional && value === "") return value;
807
+ if (isValidCandidateID(value)) return value;
808
+ throw new TypeError("Ashby UUID field invalid");
809
+ }
810
+ function boolean(row, key) {
811
+ const value = row[key];
812
+ if (value == null) return false;
813
+ if (typeof value !== "boolean") throw new TypeError("Ashby boolean field invalid");
814
+ return value;
815
+ }
816
+ function records(document, decode) {
817
+ if (!Array.isArray(document.results)) throw new TypeError("Ashby result list missing");
818
+ return document.results.map((value) => decode(value));
819
+ }
820
+ function page(document, decode) {
821
+ const nextCursor = text(document, "nextCursor");
822
+ const moreDataAvailable = boolean(document, "moreDataAvailable");
823
+ if (moreDataAvailable && !nextCursor) throw new TypeError("Ashby continuation cursor missing");
824
+ return { items: records(document, decode), fields: { ...nextCursor ? { nextCursor } : {}, moreDataAvailable } };
825
+ }
826
+ function application(raw) {
827
+ const row = object(raw);
828
+ const status = text(row, "status");
829
+ if (!["Lead", "Active", "Archived", "Hired"].includes(status)) throw new TypeError("Ashby application status invalid");
830
+ return {
831
+ id: uuid(row, "id"),
832
+ candidateId: uuid(object(row.candidate), "id"),
833
+ jobId: uuid(object(row.job), "id"),
834
+ interviewStageId: uuid(object(row.currentInterviewStage), "id"),
835
+ status,
836
+ createdAt: text(row, "createdAt", true),
837
+ updatedAt: text(row, "updatedAt", true)
838
+ };
839
+ }
840
+ function feedback(raw) {
841
+ const row = object(raw);
842
+ return {
843
+ id: uuid(row, "id"),
844
+ applicationId: uuid(row, "applicationId"),
845
+ interviewId: uuid(row, "interviewId", true),
846
+ interviewEventId: uuid(row, "interviewEventId", true),
847
+ submittedAt: text(row, "submittedAt", true)
848
+ };
849
+ }
850
+ function interview(raw) {
851
+ const row = object(raw);
852
+ const type = text(row, "type");
853
+ if (!["Assessment", "Interview", "InterviewWithoutSchedule", "TakeHome", "Debrief"].includes(type)) throw new TypeError("Ashby interview type invalid");
854
+ const jobId = uuid(row, "jobId", true);
855
+ return {
856
+ id: uuid(row, "id"),
857
+ title: text(row, "title", true),
858
+ type,
859
+ ...jobId ? { jobId } : {}
860
+ };
861
+ }
862
+ function schedule(raw) {
863
+ const row = object(raw);
864
+ return {
865
+ id: uuid(row, "id"),
866
+ applicationId: uuid(row, "applicationId"),
867
+ interviewStageId: uuid(row, "interviewStageId"),
868
+ status: text(row, "status", true),
869
+ createdAt: text(row, "createdAt", true),
870
+ updatedAt: text(row, "updatedAt", true)
871
+ };
872
+ }
873
+ function job(raw) {
874
+ const row = object(raw);
875
+ const status = text(row, "status");
876
+ if (!["Draft", "Open", "Closed", "Archived"].includes(status)) throw new TypeError("Ashby job status invalid");
877
+ const title = text(row, "title");
878
+ if (!title.trim()) throw new TypeError("Ashby job title missing");
879
+ return {
880
+ id: uuid(row, "id"),
881
+ title,
882
+ status,
883
+ createdAt: text(row, "createdAt", true),
884
+ updatedAt: text(row, "updatedAt", true)
885
+ };
886
+ }
887
+ function note(raw) {
888
+ const row = object(raw);
889
+ return {
890
+ id: uuid(row, "id"),
891
+ createdAt: text(row, "createdAt", true),
892
+ isPrivate: boolean(row, "isPrivate")
893
+ };
894
+ }
895
+ function project(raw) {
896
+ const row = object(raw);
897
+ const title = text(row, "title");
898
+ if (!title.trim()) throw new TypeError("Ashby project title missing");
899
+ return {
900
+ id: uuid(row, "id"),
901
+ title,
902
+ createdAt: text(row, "createdAt", true),
903
+ isArchived: boolean(row, "isArchived")
904
+ };
905
+ }
906
+ function candidate(raw, requireTimestamps = false) {
907
+ const row = object(raw);
908
+ const name = text(row, "name");
909
+ if (!name.trim()) throw new TypeError("Ashby candidate name missing");
910
+ return {
911
+ id: uuid(row, "id"),
912
+ name,
913
+ createdAt: text(row, "createdAt", requireTimestamps),
914
+ updatedAt: text(row, "updatedAt", requireTimestamps)
915
+ };
916
+ }
917
+ var ListApplicationFeedbackOperation = class extends AshbyQuery {
918
+ /** Bind the provider client. */
919
+ constructor(client) {
920
+ super(
921
+ client,
922
+ ListApplicationFeedbackDefinition,
923
+ "/applicationFeedback.list",
924
+ () => ({ feedback: [], moreDataAvailable: false }),
925
+ (input) => ({ ...idRequest("applicationId", input.applicationId), ...pageRequest(input.cursor, input.limit) }),
926
+ (document) => {
927
+ const result = page(document, feedback);
928
+ return { feedback: result.items, ...result.fields };
929
+ },
930
+ "listed"
931
+ );
932
+ }
933
+ };
934
+ var ListInterviewsOperation = class extends AshbyQuery {
935
+ /** Bind the provider client. */
936
+ constructor(client) {
937
+ super(
938
+ client,
939
+ ListInterviewsDefinition,
940
+ "/interview.list",
941
+ () => ({ interviews: [], moreDataAvailable: false }),
942
+ (input) => pageRequest(input.cursor, input.limit),
943
+ (document) => {
944
+ const result = page(document, interview);
945
+ return { interviews: result.items, ...result.fields };
946
+ },
947
+ "listed"
948
+ );
949
+ }
950
+ };
951
+ var GetInterviewOperation = class extends AshbyQuery {
952
+ /** Bind the provider client. */
953
+ constructor(client) {
954
+ super(
955
+ client,
956
+ GetInterviewDefinition,
957
+ "/interview.info",
958
+ () => ({ id: "", title: "", type: "" }),
959
+ (input) => idRequest("id", input.interviewId),
960
+ (document) => interview(document.results),
961
+ "found"
962
+ );
963
+ }
964
+ };
965
+ var ListInterviewSchedulesOperation = class extends AshbyQuery {
966
+ /** Bind the provider client. */
967
+ constructor(client) {
968
+ super(
969
+ client,
970
+ ListInterviewSchedulesDefinition,
971
+ "/interviewSchedule.list",
972
+ () => ({ schedules: [], moreDataAvailable: false }),
973
+ (input) => ({ ...idRequest("applicationId", input.applicationId), ...pageRequest(input.cursor, input.limit) }),
974
+ (document) => {
975
+ const result = page(document, schedule);
976
+ return { schedules: result.items, ...result.fields };
977
+ },
978
+ "listed"
979
+ );
980
+ }
981
+ };
982
+ var GetInterviewScheduleOperation = class extends AshbyQuery {
983
+ /** Bind the provider client. */
984
+ constructor(client) {
985
+ super(
986
+ client,
987
+ GetInterviewScheduleDefinition,
988
+ "/interviewSchedule.info",
989
+ () => ({ id: "", applicationId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }),
990
+ (input) => idRequest("id", input.interviewScheduleId),
991
+ (document) => schedule(document.results),
992
+ "found"
993
+ );
994
+ }
995
+ };
996
+ var ListApplicationsOperation = class extends AshbyQuery {
997
+ /** Bind the provider client. */
998
+ constructor(client) {
999
+ super(
1000
+ client,
1001
+ ListApplicationsDefinition,
1002
+ "/application.list",
1003
+ () => ({ applications: [], moreDataAvailable: false }),
1004
+ (input) => pageRequest(input.cursor, input.limit),
1005
+ (document) => {
1006
+ const result = page(document, application);
1007
+ return { applications: result.items, ...result.fields };
1008
+ },
1009
+ "listed"
1010
+ );
1011
+ }
1012
+ };
1013
+ var GetApplicationOperation = class extends AshbyQuery {
1014
+ /** Bind the provider client. */
1015
+ constructor(client) {
1016
+ super(
1017
+ client,
1018
+ GetApplicationDefinition,
1019
+ "/application.info",
1020
+ () => ({ id: "", candidateId: "", jobId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }),
1021
+ (input) => idRequest("applicationId", input.applicationId),
1022
+ (document) => application(document.results),
1023
+ "found"
1024
+ );
1025
+ }
1026
+ };
1027
+ var ListJobsOperation = class extends AshbyQuery {
1028
+ /** Bind the provider client. */
1029
+ constructor(client) {
1030
+ super(
1031
+ client,
1032
+ ListJobsDefinition,
1033
+ "/job.list",
1034
+ () => ({ jobs: [], moreDataAvailable: false }),
1035
+ (input) => pageRequest(input.cursor, input.limit),
1036
+ (document) => {
1037
+ const result = page(document, job);
1038
+ return { jobs: result.items, ...result.fields };
1039
+ },
1040
+ "listed"
1041
+ );
1042
+ }
1043
+ };
1044
+ var GetJobOperation = class extends AshbyQuery {
1045
+ /** Bind the provider client. */
1046
+ constructor(client) {
1047
+ super(
1048
+ client,
1049
+ GetJobDefinition,
1050
+ "/job.info",
1051
+ () => ({ id: "", title: "", status: "", createdAt: "", updatedAt: "" }),
1052
+ (input) => idRequest("id", input.jobId),
1053
+ (document) => job(document.results),
1054
+ "found"
1055
+ );
1056
+ }
1057
+ };
1058
+ var SearchJobsOperation = class extends AshbyQuery {
1059
+ /** Bind the provider client. */
1060
+ constructor(client) {
1061
+ super(
1062
+ client,
1063
+ SearchJobsDefinition,
1064
+ "/job.search",
1065
+ () => ({ jobs: [] }),
1066
+ jobSearchRequest,
1067
+ (document) => ({ jobs: page(document, job).items }),
1068
+ "found"
1069
+ );
1070
+ }
1071
+ };
1072
+ var ListCandidateNotesOperation = class extends AshbyQuery {
1073
+ /** Bind the provider client. */
1074
+ constructor(client) {
1075
+ super(
1076
+ client,
1077
+ ListCandidateNotesDefinition,
1078
+ "/candidate.listNotes",
1079
+ () => ({ notes: [], moreDataAvailable: false }),
1080
+ (input) => ({ ...idRequest("candidateId", input.candidateId), ...pageRequest(input.cursor, input.limit, 100) }),
1081
+ (document) => {
1082
+ const result = page(document, note);
1083
+ return { notes: result.items, ...result.fields };
1084
+ },
1085
+ "listed"
1086
+ );
1087
+ }
1088
+ };
1089
+ var ListCandidateProjectsOperation = class extends AshbyQuery {
1090
+ /** Bind the provider client. */
1091
+ constructor(client) {
1092
+ super(
1093
+ client,
1094
+ ListCandidateProjectsDefinition,
1095
+ "/candidate.listProjects",
1096
+ () => ({ projects: [], moreDataAvailable: false }),
1097
+ (input) => ({ ...idRequest("candidateId", input.candidateId), ...pageRequest(input.cursor, input.limit) }),
1098
+ (document) => {
1099
+ const result = page(document, project);
1100
+ return { projects: result.items, ...result.fields };
1101
+ },
1102
+ "listed"
1103
+ );
1104
+ }
1105
+ };
1106
+ var SearchCandidatesOperation = class extends AshbyQuery {
1107
+ /** Bind the provider client. */
1108
+ constructor(client) {
1109
+ super(
1110
+ client,
1111
+ SearchCandidatesDefinition,
1112
+ "/candidate.search",
1113
+ () => ({ candidates: [] }),
1114
+ candidateSearchRequest,
1115
+ (document) => ({ candidates: records(document, (raw) => candidate(raw, true)) }),
1116
+ "found"
1117
+ );
1118
+ }
1119
+ };
1120
+ var ListCandidatesOperation = class extends AshbyQuery {
1121
+ /** Bind the provider client. */
1122
+ constructor(client) {
1123
+ super(
1124
+ client,
1125
+ ListCandidatesDefinition,
1126
+ "/candidate.list",
1127
+ () => ({ candidates: [], moreDataAvailable: false }),
1128
+ (input) => pageRequest(input.cursor, input.limit),
1129
+ (document) => {
1130
+ const result = page(document, candidate);
1131
+ const syncToken = text(document, "syncToken");
1132
+ return { candidates: result.items, ...result.fields, ...syncToken ? { syncToken } : {} };
1133
+ },
1134
+ "listed"
1135
+ );
1136
+ }
1137
+ };
1138
+
1139
+ // src/mutations.ts
1140
+ var refusalStatuses = /* @__PURE__ */ new Set([400, 401, 403, 404, 411, 413, 414, 415, 422]);
1141
+ var AshbyMutation = class {
1142
+ constructor(client, contract, empty, branch) {
1143
+ this.client = client;
1144
+ this.contract = contract;
1145
+ this.empty = empty;
1146
+ this.branch = branch;
1147
+ }
1148
+ client;
1149
+ contract;
1150
+ empty;
1151
+ branch;
1152
+ /** Return the generated Mutation contract. */
1153
+ definition() {
1154
+ return this.contract;
1155
+ }
1156
+ /** Use the stable Dex call identity without sending an unsupported provider key. */
1157
+ idempotencyKey(callID, input) {
1158
+ void input;
1159
+ return callID;
1160
+ }
1161
+ async write(call, path, payload, decode, options = {}) {
1162
+ const response = await this.client.post(call, path, payload);
1163
+ const isRetry = call.context.attempt > 1;
1164
+ if (response.error === "credential") {
1165
+ if (isRetry) return this.retry("TRANSPORT", "Earlier Ashby write remains unconfirmed");
1166
+ return this.terminal("defect", "AUTHENTICATION", "Ashby credentials are unavailable");
1167
+ }
1168
+ if (response.error === "request") return this.retry("TRANSPORT", "Ashby write request failed");
1169
+ if (response.status === 429) return this.retry("RATE_LIMIT", "Ashby rate limited the write", response.retryAfterMs);
1170
+ if (response.status === 408 || response.status >= 500)
1171
+ return this.retry("AVAILABILITY", "Ashby is temporarily unavailable", response.retryAfterMs);
1172
+ if (response.status !== 200) {
1173
+ if (response.error || isRetry || !isHTTPRefusal(response.status, response.body))
1174
+ return this.retry("TRANSPORT", "Ashby write outcome is unknown", options.candidate ? 0 : response.retryAfterMs);
1175
+ return this.rejection(options.notFoundBranch === true && response.status === 404);
1176
+ }
1177
+ if (response.error === "tooLarge") return this.retry("RESPONSE_TOO_LARGE", "Ashby write response exceeded its limit");
1178
+ if (response.error) return this.retry("TRANSPORT", "Ashby write response was interrupted");
1179
+ try {
1180
+ const document = object(JSON.parse(Buffer.from(response.body).toString("utf8")));
1181
+ if (document.success === false) {
1182
+ if (document.results != null) object(document.results);
1183
+ const code = text(object(document.errorInfo), "code");
1184
+ if (!(options.candidate ? code.trim() : code)) throw new TypeError("Ashby write error code is missing");
1185
+ if (isRetry || !isBusinessRefusal(document, code)) return this.retry("TRANSPORT", "Earlier Ashby write remains unconfirmed");
1186
+ return this.rejection(options.notFoundBranch === true && code === "candidate_not_found");
1187
+ }
1188
+ if (document.success !== true) throw new TypeError("Ashby write confirmation is missing");
1189
+ return newMutationBranch(this.branch, decode(document.results));
1190
+ } catch {
1191
+ return this.retry("PROTOCOL", "Ashby write result cannot be confirmed");
1192
+ }
1193
+ }
1194
+ rejection(notFound) {
1195
+ if (notFound) return this.terminal("notFound", "NOT_FOUND", "Ashby did not find the candidate");
1196
+ return this.terminal("providerRejected", "PROVIDER_REJECTION", "Ashby rejected the write");
1197
+ }
1198
+ invalid() {
1199
+ return this.terminal("defect", "VALIDATION", "Ashby write input is invalid");
1200
+ }
1201
+ terminal(branch, kind, message) {
1202
+ return newMutationBranch(branch, this.empty(), {}, this.failure(kind, message));
1203
+ }
1204
+ retry(kind, message, delay = 0) {
1205
+ return newMutationRetry(this.failure(kind, message), delay);
1206
+ }
1207
+ failure(kind, message) {
1208
+ return { provider: "ashby", operation: this.contract.operation.operationId, kind, message };
1209
+ }
1210
+ };
1211
+ function isEmptyResponseField(value, allowEmptyString = false) {
1212
+ return value == null || typeof value === "object" && Object.keys(value).length === 0 || allowEmptyString && value === "";
1213
+ }
1214
+ function isHTTPRefusal(status, body) {
1215
+ if (!refusalStatuses.has(status)) return false;
1216
+ try {
1217
+ const response = object(JSON.parse(Buffer.from(body).toString("utf8")));
1218
+ return response.success !== true && ["data", "result", "results"].every((field) => isEmptyResponseField(response[field])) && ["code", "message", "error", "errors", "errorInfo"].some((field) => !isEmptyResponseField(response[field], true));
1219
+ } catch {
1220
+ return false;
1221
+ }
1222
+ }
1223
+ function isBusinessRefusal(document, code) {
1224
+ return Boolean(code.trim()) && isEmptyResponseField(document.data) && isEmptyResponseField(document.results);
1225
+ }
1226
+ function validIDs(...values) {
1227
+ return values.every(isValidCandidateID);
1228
+ }
1229
+ function confirmed(value, matches) {
1230
+ if (!matches(value)) throw new TypeError("Ashby returned a different resource or outcome");
1231
+ return value;
1232
+ }
1233
+ function candidateWrite(raw, candidateID, name) {
1234
+ const profile = candidate(raw, true);
1235
+ if (profile.id.toLowerCase() !== candidateID.toLowerCase() || !profile.createdAt.trim() || !profile.updatedAt.trim() || name !== void 0 && profile.name !== name) throw new TypeError("Ashby did not confirm the candidate change");
1236
+ return profile;
1237
+ }
1238
+ function scheduleWithoutEvent(raw, eventID, scheduleID) {
1239
+ const { interviewEvents: interviewEvents2 } = object(raw);
1240
+ if (!Array.isArray(interviewEvents2) || interviewEvents2.some((event) => event != null && text(object(event), "id") === eventID))
1241
+ throw new TypeError("Ashby did not confirm the event removal");
1242
+ return confirmed(schedule(raw), (value) => value.id === scheduleID);
1243
+ }
1244
+ var jsonValue = z.json();
1245
+ function feedbackFields(fields) {
1246
+ if (!fields || fields.length === 0 || fields.length > 100) throw new TypeError("Ashby feedback field count is invalid");
1247
+ return fields.map(({ path, value }) => {
1248
+ if (!path.trim() || Buffer.byteLength(path) > 256 || !jsonValue.safeParse(value).success || Buffer.byteLength(JSON.stringify(value)) > 8192)
1249
+ throw new TypeError("Ashby feedback field is invalid");
1250
+ return { path, value };
1251
+ });
1252
+ }
1253
+ function feedbackSubmission(raw) {
1254
+ return { submissionId: uuid(object(object(raw).submittedFormInstance), "id") };
1255
+ }
1256
+ function deletedApplication(raw) {
1257
+ return { applicationId: uuid(object(raw), "applicationId") };
1258
+ }
1259
+ var SubmitApplicationFeedbackOperation = class extends AshbyMutation {
1260
+ /** Bind the provider client. */
1261
+ constructor(client) {
1262
+ super(client, SubmitApplicationFeedbackDefinition, () => ({ submissionId: "" }), "submitted");
1263
+ }
1264
+ /** Validate inputs and send the Ashby write. */
1265
+ async invoke(call, input) {
1266
+ if (!validIDs(input.applicationId, input.formDefinitionId, input.userId, input.interviewEventId)) return this.invalid();
1267
+ let fields;
1268
+ try {
1269
+ fields = feedbackFields(input.fieldSubmissions);
1270
+ } catch {
1271
+ return this.invalid();
1272
+ }
1273
+ return this.write(
1274
+ call,
1275
+ "/applicationFeedback.submit",
1276
+ { applicationId: input.applicationId, formDefinitionId: input.formDefinitionId, userId: input.userId, interviewEventId: input.interviewEventId, feedbackForm: { fieldSubmissions: fields } },
1277
+ feedbackSubmission
1278
+ );
1279
+ }
1280
+ };
1281
+ var CancelInterviewScheduleOperation = class extends AshbyMutation {
1282
+ /** Bind the provider client. */
1283
+ constructor(client) {
1284
+ super(client, CancelInterviewScheduleDefinition, () => ({ id: "", applicationId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "cancelled");
1285
+ }
1286
+ /** Validate inputs and send the Ashby write. */
1287
+ async invoke(call, input) {
1288
+ if (!validIDs(input.interviewScheduleId)) return this.invalid();
1289
+ return this.write(
1290
+ call,
1291
+ "/interviewSchedule.cancel",
1292
+ { id: input.interviewScheduleId, allowReschedule: false },
1293
+ (raw) => confirmed(schedule(raw), (value) => value.id === input.interviewScheduleId && value.status === "Cancelled")
1294
+ );
1295
+ }
1296
+ };
1297
+ var CancelInterviewEventOperation = class extends AshbyMutation {
1298
+ /** Bind the provider client. */
1299
+ constructor(client) {
1300
+ super(client, CancelInterviewEventDefinition, () => ({ id: "", applicationId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "cancelled");
1301
+ }
1302
+ /** Validate inputs and send the Ashby write. */
1303
+ async invoke(call, input) {
1304
+ if (!validIDs(input.interviewScheduleId, input.interviewEventId)) return this.invalid();
1305
+ return this.write(
1306
+ call,
1307
+ "/interviewSchedule.update",
1308
+ { interviewScheduleId: input.interviewScheduleId, interviewEventIdToCancel: input.interviewEventId, allowFeedbackDeletion: false },
1309
+ (raw) => scheduleWithoutEvent(raw, input.interviewEventId, input.interviewScheduleId)
1310
+ );
1311
+ }
1312
+ };
1313
+ var TransferApplicationOperation = class extends AshbyMutation {
1314
+ /** Bind the provider client. */
1315
+ constructor(client) {
1316
+ super(client, TransferApplicationDefinition, () => ({ id: "", candidateId: "", jobId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "transferred");
1317
+ }
1318
+ /** Validate inputs and send the Ashby write. */
1319
+ async invoke(call, input) {
1320
+ if (!validIDs(input.applicationId, input.jobId, input.interviewPlanId, input.interviewStageId)) return this.invalid();
1321
+ return this.write(
1322
+ call,
1323
+ "/application.transfer",
1324
+ { applicationId: input.applicationId, jobId: input.jobId, interviewPlanId: input.interviewPlanId, interviewStageId: input.interviewStageId, startAutomaticActivities: false },
1325
+ (raw) => confirmed(application(raw), (value) => value.id === input.applicationId && value.jobId === input.jobId && value.interviewStageId === input.interviewStageId)
1326
+ );
1327
+ }
1328
+ };
1329
+ var SetApplicationSourceOperation = class extends AshbyMutation {
1330
+ /** Bind the provider client. */
1331
+ constructor(client) {
1332
+ super(client, SetApplicationSourceDefinition, () => ({ id: "", candidateId: "", jobId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "set");
1333
+ }
1334
+ /** Validate inputs and send the Ashby write. */
1335
+ async invoke(call, input) {
1336
+ if (!validIDs(input.applicationId, input.sourceId)) return this.invalid();
1337
+ return this.write(
1338
+ call,
1339
+ "/application.changeSource",
1340
+ { applicationId: input.applicationId, sourceId: input.sourceId },
1341
+ (raw) => confirmed(application(raw), (value) => value.id === input.applicationId)
1342
+ );
1343
+ }
1344
+ };
1345
+ var DeleteApplicationOperation = class extends AshbyMutation {
1346
+ /** Bind the provider client. */
1347
+ constructor(client) {
1348
+ super(client, DeleteApplicationDefinition, () => ({ applicationId: "" }), "deleted");
1349
+ }
1350
+ /** Validate inputs and send the Ashby write. */
1351
+ async invoke(call, input) {
1352
+ if (!validIDs(input.applicationId)) return this.invalid();
1353
+ return this.write(
1354
+ call,
1355
+ "/application.delete",
1356
+ { applicationId: input.applicationId },
1357
+ (raw) => confirmed(deletedApplication(raw), (value) => value.applicationId === input.applicationId)
1358
+ );
1359
+ }
1360
+ };
1361
+ var UpdateJobTitleOperation = class extends AshbyMutation {
1362
+ /** Bind the provider client. */
1363
+ constructor(client) {
1364
+ super(client, UpdateJobTitleDefinition, () => ({ id: "", title: "", status: "", createdAt: "", updatedAt: "" }), "updated");
1365
+ }
1366
+ /** Validate inputs and send the Ashby write. */
1367
+ async invoke(call, input) {
1368
+ if (!validIDs(input.jobId) || !input.title.trim() || Buffer.byteLength(input.title) > 512) return this.invalid();
1369
+ return this.write(
1370
+ call,
1371
+ "/job.update",
1372
+ { jobId: input.jobId, title: input.title },
1373
+ (raw) => confirmed(job(raw), (value) => value.id.toLowerCase() === input.jobId.toLowerCase() && value.title === input.title)
1374
+ );
1375
+ }
1376
+ };
1377
+ var SetJobStatusOperation = class extends AshbyMutation {
1378
+ /** Bind the provider client. */
1379
+ constructor(client) {
1380
+ super(client, SetJobStatusDefinition, () => ({ id: "", title: "", status: "", createdAt: "", updatedAt: "" }), "set");
1381
+ }
1382
+ /** Validate inputs and send the Ashby write. */
1383
+ async invoke(call, input) {
1384
+ if (!validIDs(input.jobId) || !["Draft", "Open", "Closed", "Archived"].includes(input.status) || input.closeReasonId && (input.status !== "Closed" || !validIDs(input.closeReasonId))) return this.invalid();
1385
+ return this.write(
1386
+ call,
1387
+ "/job.setStatus",
1388
+ { jobId: input.jobId, status: input.status, ...input.closeReasonId ? { closeReasonId: input.closeReasonId } : {} },
1389
+ (raw) => confirmed(job(raw), (value) => value.id.toLowerCase() === input.jobId.toLowerCase() && value.status === input.status)
1390
+ );
1391
+ }
1392
+ };
1393
+ var AddCandidateProjectOperation = class extends AshbyMutation {
1394
+ /** Bind the provider client. */
1395
+ constructor(client) {
1396
+ super(client, AddCandidateProjectDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "added");
1397
+ }
1398
+ /** Validate inputs and send the Ashby write. */
1399
+ async invoke(call, input) {
1400
+ if (!validIDs(input.candidateId, input.projectId)) return this.invalid();
1401
+ return this.write(
1402
+ call,
1403
+ "/candidate.addProject",
1404
+ { candidateId: input.candidateId, projectId: input.projectId },
1405
+ (raw) => candidateWrite(raw, input.candidateId),
1406
+ { candidate: true }
1407
+ );
1408
+ }
1409
+ };
1410
+ var RemoveCandidateProjectOperation = class extends AshbyMutation {
1411
+ /** Bind the provider client. */
1412
+ constructor(client) {
1413
+ super(client, RemoveCandidateProjectDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "removed");
1414
+ }
1415
+ /** Validate inputs and send the Ashby write. */
1416
+ async invoke(call, input) {
1417
+ if (!validIDs(input.candidateId, input.projectId)) return this.invalid();
1418
+ return this.write(
1419
+ call,
1420
+ "/candidate.removeProject",
1421
+ { candidateId: input.candidateId, projectId: input.projectId },
1422
+ (raw) => candidateWrite(raw, input.candidateId),
1423
+ { candidate: true }
1424
+ );
1425
+ }
1426
+ };
1427
+ var AddCandidateTagOperation = class extends AshbyMutation {
1428
+ /** Bind the provider client. */
1429
+ constructor(client) {
1430
+ super(client, AddCandidateTagDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "added");
1431
+ }
1432
+ /** Validate inputs and send the Ashby write. */
1433
+ async invoke(call, input) {
1434
+ if (!validIDs(input.candidateId, input.tagId)) return this.invalid();
1435
+ return this.write(
1436
+ call,
1437
+ "/candidate.addTag",
1438
+ { candidateId: input.candidateId, tagId: input.tagId },
1439
+ (raw) => candidateWrite(raw, input.candidateId),
1440
+ { candidate: true }
1441
+ );
1442
+ }
1443
+ };
1444
+ var RemoveCandidateTagOperation = class extends AshbyMutation {
1445
+ /** Bind the provider client. */
1446
+ constructor(client) {
1447
+ super(client, RemoveCandidateTagDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "removed");
1448
+ }
1449
+ /** Validate inputs and send the Ashby write. */
1450
+ async invoke(call, input) {
1451
+ if (!validIDs(input.candidateId, input.tagId)) return this.invalid();
1452
+ return this.write(
1453
+ call,
1454
+ "/candidate.removeTag",
1455
+ { candidateId: input.candidateId, tagId: input.tagId },
1456
+ (raw) => candidateWrite(raw, input.candidateId),
1457
+ { candidate: true }
1458
+ );
1459
+ }
1460
+ };
1461
+ var UpdateCandidateOperation = class extends AshbyMutation {
1462
+ /** Bind the provider client. */
1463
+ constructor(client) {
1464
+ super(client, UpdateCandidateDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "updated");
1465
+ }
1466
+ /** Validate inputs and send the Ashby write. */
1467
+ async invoke(call, input) {
1468
+ if (!validIDs(input.candidateId) || !input.name.trim() || Buffer.byteLength(input.name) > 512) return this.invalid();
1469
+ return this.write(
1470
+ call,
1471
+ "/candidate.update",
1472
+ { candidateId: input.candidateId, name: input.name },
1473
+ (raw) => candidateWrite(raw, input.candidateId, input.name),
1474
+ { candidate: true, notFoundBranch: true }
1475
+ );
1476
+ }
1477
+ };
1478
+
1479
+ // src/limited.ts
1480
+ var timestampPattern = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{1,2}):([0-9]{2}):([0-9]{2})(?:[.,]([0-9]+))?(Z|([+-])([0-9]{2}):([0-9]{2}))$/;
1481
+ var LimitedWrite = class extends AshbyMutation {
1482
+ async sendLimited(call, path, payload, decode, options = {}) {
1483
+ const { applicationWrite = false, readBackID } = options;
1484
+ const maxSends = call.maxSendsOverride ?? definitionMaxSends(this.contract);
1485
+ let fence;
1486
+ try {
1487
+ fence = newFence(call, this.contract.stepDefaults.executeMethodTimeoutMs ?? 3e4, { maxSends });
1488
+ } catch {
1489
+ return this.terminal("defect", "LOCAL_DEFECT", "Ashby dispatch fence unavailable");
1490
+ }
1491
+ const decision = await fence.decide();
1492
+ if (decision.kind === "failClosed") return this.retry("TRANSPORT", "Ashby dispatch checkpoint is unreadable");
1493
+ const prior = decision.priorSendUpperBound ?? 0;
1494
+ if (prior && readBackID) {
1495
+ const existing = await this.readApplication(call, readBackID, decode);
1496
+ if (existing !== void 0) return newMutationBranch2(this.branch, existing);
1497
+ }
1498
+ if (decision.kind === "readBackRequired")
1499
+ return newMutationUncertain(this.empty(), this.failure("TRANSPORT", "Ashby write could not be confirmed"));
1500
+ let response;
1501
+ try {
1502
+ response = await fence.dispatch((signal) => this.client.post(call, path, payload, signal));
1503
+ } catch {
1504
+ return this.retry("AVAILABILITY", "Ashby request was not dispatched");
1505
+ }
1506
+ if (response.error === "credential") {
1507
+ if (prior) return this.retry(applicationWrite ? "TRANSPORT" : "AUTHENTICATION", "Earlier Ashby write remains unconfirmed");
1508
+ return this.terminal("defect", "AUTHENTICATION", "Ashby credentials are unavailable");
1509
+ }
1510
+ if (response.status === 429 || response.status === 503) {
1511
+ try {
1512
+ await fence.recordCanResend();
1513
+ } catch {
1514
+ return this.retry("AVAILABILITY", "Ashby resend checkpoint unavailable");
1515
+ }
1516
+ return this.retry(response.status === 429 ? "RATE_LIMIT" : "AVAILABILITY", "Ashby temporarily rejected the write", response.retryAfterMs);
1517
+ }
1518
+ if (response.error || response.status === 408 || response.status >= 500)
1519
+ return this.retry("TRANSPORT", "Ashby write outcome is unknown", response.retryAfterMs);
1520
+ if (response.status !== 200) {
1521
+ if (!isHTTPRefusal(response.status, response.body)) return this.retry("TRANSPORT", "Ashby write outcome is unknown");
1522
+ return this.refused(fence, prior > 0, applicationWrite, true);
1523
+ }
1524
+ try {
1525
+ const document = object(JSON.parse(Buffer.from(response.body).toString("utf8")));
1526
+ if (document.success === false) {
1527
+ if (document.results != null) object(document.results);
1528
+ const code = text(object(document.errorInfo), "code", true);
1529
+ if (!isBusinessRefusal(document, code)) return this.retry("TRANSPORT", "Ashby response does not prove refusal");
1530
+ return this.refused(fence, prior > 0, applicationWrite, !applicationWrite);
1531
+ }
1532
+ if (document.success !== true) throw new TypeError("Ashby confirmation missing");
1533
+ return newMutationBranch2(this.branch, decode(document.results));
1534
+ } catch {
1535
+ return this.retry("PROTOCOL", "Ashby write confirmation is invalid");
1536
+ }
1537
+ }
1538
+ async readApplication(call, applicationID, decode) {
1539
+ const response = await this.client.post(call, "/application.info", { applicationId: applicationID });
1540
+ if (response.error || response.status !== 200) return void 0;
1541
+ try {
1542
+ const document = object(JSON.parse(Buffer.from(response.body).toString("utf8")));
1543
+ return document.success === true ? decode(document.results) : void 0;
1544
+ } catch {
1545
+ return void 0;
1546
+ }
1547
+ }
1548
+ async refused(fence, hasPriorSend, applicationWrite, recordResend) {
1549
+ if (hasPriorSend) return this.retry(applicationWrite ? "TRANSPORT" : "PROVIDER_REJECTION", "Earlier Ashby write remains unconfirmed");
1550
+ if (recordResend) {
1551
+ try {
1552
+ await fence.recordCanResend();
1553
+ } catch {
1554
+ return this.retry("TRANSPORT", "Ashby refusal checkpoint unavailable");
1555
+ }
1556
+ }
1557
+ return this.terminal("providerRejected", "PROVIDER_REJECTION", "Ashby rejected the write");
1558
+ }
1559
+ };
1560
+ function feedbackRequest(raw) {
1561
+ const row = object(raw);
1562
+ return { applicationId: uuid(row, "applicationId"), interviewEventId: uuid(row, "interviewEventId"), interviewerUserId: uuid(row, "interviewerUserId") };
1563
+ }
1564
+ function interviewEvents(events) {
1565
+ if (!events || events.length === 0 || events.length > 10) throw new TypeError("Ashby schedule event count is invalid");
1566
+ return events.map((event) => {
1567
+ const start = instant(event.startTime), end = instant(event.endTime);
1568
+ if (start === void 0 || end === void 0 || start >= end || !event.interviewers || event.interviewers.length === 0 || event.interviewers.length > 20 || event.interviewId && !validIDs(event.interviewId)) throw new TypeError("Ashby schedule event is invalid");
1569
+ const interviewers = event.interviewers.map((interviewer) => {
1570
+ if (Buffer.byteLength(interviewer.email) > 254 || !isValidEmail(interviewer.email))
1571
+ throw new TypeError("Ashby interviewer email is invalid");
1572
+ return {
1573
+ email: interviewer.email,
1574
+ ...interviewer.feedbackRequired !== void 0 ? { feedbackRequired: interviewer.feedbackRequired } : {}
1575
+ };
1576
+ });
1577
+ return {
1578
+ startTime: event.startTime,
1579
+ endTime: event.endTime,
1580
+ interviewers,
1581
+ ...event.interviewId ? { interviewId: event.interviewId } : {}
1582
+ };
1583
+ });
1584
+ }
1585
+ function instant(value) {
1586
+ const parts = timestampPattern.exec(value);
1587
+ if (!parts || parts[0] !== value) return void 0;
1588
+ const [year, month, day, hour, minute, second] = parts.slice(1, 7).map(Number);
1589
+ if (hour > 23 || minute > 59 || second > 59) return void 0;
1590
+ const date = /* @__PURE__ */ new Date(0);
1591
+ date.setUTCFullYear(year, month - 1, day);
1592
+ if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) return void 0;
1593
+ let offset = 0;
1594
+ if (parts[8] !== "Z") {
1595
+ const offsetHours = Number(parts[10]), offsetMinutes = Number(parts[11]);
1596
+ if (offsetHours > 24 || offsetMinutes > 60) return void 0;
1597
+ offset = (offsetHours * 60 + offsetMinutes) * (parts[9] === "-" ? -1 : 1);
1598
+ }
1599
+ const seconds = date.getTime() / 1e3 + (hour * 60 + minute - offset) * 60 + second;
1600
+ return BigInt(seconds) * 1000000000n + BigInt((parts[7] ?? "").padEnd(9, "0").slice(0, 9));
1601
+ }
1602
+ var RequestApplicationFeedbackOperation = class extends LimitedWrite {
1603
+ /** Bind the provider client. */
1604
+ constructor(client) {
1605
+ super(client, RequestApplicationFeedbackDefinition, () => ({ applicationId: "", interviewEventId: "", interviewerUserId: "" }), "requested");
1606
+ }
1607
+ /** Validate inputs and send the bounded Ashby write. */
1608
+ async invoke(call, input) {
1609
+ if (!validIDs(input.applicationId, input.interviewId, input.interviewerUserId)) return this.invalid();
1610
+ return this.sendLimited(
1611
+ call,
1612
+ "/applicationFeedbackRequest.create",
1613
+ { applicationId: input.applicationId, interviewId: input.interviewId, interviewerUserId: input.interviewerUserId },
1614
+ (raw) => confirmed(feedbackRequest(raw), (value) => value.applicationId === input.applicationId && value.interviewerUserId === input.interviewerUserId)
1615
+ );
1616
+ }
1617
+ };
1618
+ var CreateInterviewScheduleOperation = class extends LimitedWrite {
1619
+ /** Bind the provider client. */
1620
+ constructor(client) {
1621
+ super(client, CreateInterviewScheduleDefinition, () => ({ id: "", applicationId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "created");
1622
+ }
1623
+ /** Validate inputs and send the bounded Ashby write. */
1624
+ async invoke(call, input) {
1625
+ if (!validIDs(input.applicationId)) return this.invalid();
1626
+ let events;
1627
+ try {
1628
+ events = interviewEvents(input.interviewEvents);
1629
+ } catch {
1630
+ return this.invalid();
1631
+ }
1632
+ return this.sendLimited(
1633
+ call,
1634
+ "/interviewSchedule.create",
1635
+ { applicationId: input.applicationId, interviewEvents: events },
1636
+ (raw) => confirmed(schedule(raw), (value) => value.applicationId === input.applicationId)
1637
+ );
1638
+ }
1639
+ };
1640
+ var CreateApplicationOperation = class extends LimitedWrite {
1641
+ /** Bind the provider client. */
1642
+ constructor(client) {
1643
+ super(client, CreateApplicationDefinition, () => ({ id: "", candidateId: "", jobId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "created");
1644
+ }
1645
+ /** Validate inputs and send the bounded Ashby write. */
1646
+ async invoke(call, input) {
1647
+ if (!validIDs(input.candidateId, input.jobId)) return this.invalid();
1648
+ return this.sendLimited(
1649
+ call,
1650
+ "/application.create",
1651
+ { candidateId: input.candidateId, jobId: input.jobId },
1652
+ (raw) => confirmed(application(raw), (value) => value.candidateId === input.candidateId && value.jobId === input.jobId),
1653
+ { applicationWrite: true }
1654
+ );
1655
+ }
1656
+ };
1657
+ var ChangeApplicationStageOperation = class extends LimitedWrite {
1658
+ /** Bind the provider client. */
1659
+ constructor(client) {
1660
+ super(client, ChangeApplicationStageDefinition, () => ({ id: "", candidateId: "", jobId: "", interviewStageId: "", status: "", createdAt: "", updatedAt: "" }), "changed");
1661
+ }
1662
+ /** Validate inputs and send the bounded Ashby write. */
1663
+ async invoke(call, input) {
1664
+ if (!validIDs(input.applicationId, input.interviewStageId) || input.archiveReasonId && !validIDs(input.archiveReasonId)) return this.invalid();
1665
+ return this.sendLimited(
1666
+ call,
1667
+ "/application.changeStage",
1668
+ { applicationId: input.applicationId, interviewStageId: input.interviewStageId, ...input.archiveReasonId ? { archiveReasonId: input.archiveReasonId } : {} },
1669
+ (raw) => confirmed(application(raw), (value) => value.id === input.applicationId && value.interviewStageId === input.interviewStageId),
1670
+ { applicationWrite: true, readBackID: input.applicationId }
1671
+ );
1672
+ }
1673
+ };
1674
+ var CreateJobOperation = class extends LimitedWrite {
1675
+ /** Bind the provider client. */
1676
+ constructor(client) {
1677
+ super(client, CreateJobDefinition, () => ({ id: "", title: "", status: "", createdAt: "", updatedAt: "" }), "created");
1678
+ }
1679
+ /** Validate inputs and send the bounded Ashby write. */
1680
+ async invoke(call, input) {
1681
+ if (!validIDs(input.teamId, input.locationId) || !input.title.trim() || Buffer.byteLength(input.title) > 512) return this.invalid();
1682
+ return this.sendLimited(
1683
+ call,
1684
+ "/job.create",
1685
+ { teamId: input.teamId, locationId: input.locationId, title: input.title },
1686
+ (raw) => confirmed(job(raw), (value) => value.title === input.title)
1687
+ );
1688
+ }
1689
+ };
1690
+ var CreateCandidateNoteOperation = class extends LimitedWrite {
1691
+ /** Bind the provider client. */
1692
+ constructor(client) {
1693
+ super(client, CreateCandidateNoteDefinition, () => ({ id: "", createdAt: "", isPrivate: false }), "created");
1694
+ }
1695
+ /** Validate inputs and send the bounded Ashby write. */
1696
+ async invoke(call, input) {
1697
+ if (!validIDs(input.candidateId) || !input.note.trim() || Buffer.byteLength(input.note) > 8192) return this.invalid();
1698
+ return this.sendLimited(
1699
+ call,
1700
+ "/candidate.createNote",
1701
+ { candidateId: input.candidateId, note: input.note },
1702
+ note
1703
+ );
1704
+ }
1705
+ };
1706
+ var CreateCandidateOperation = class extends LimitedWrite {
1707
+ /** Bind the provider client. */
1708
+ constructor(client) {
1709
+ super(client, CreateCandidateDefinition, () => ({ id: "", name: "", createdAt: "", updatedAt: "" }), "created");
1710
+ }
1711
+ /** Validate inputs and send the bounded Ashby write. */
1712
+ async invoke(call, input) {
1713
+ if (!input.name.trim() || Buffer.byteLength(input.name) > 512) return this.invalid();
1714
+ return this.sendLimited(
1715
+ call,
1716
+ "/candidate.create",
1717
+ { name: input.name },
1718
+ (raw) => confirmed(candidate(raw, true), (value) => value.name === input.name)
1719
+ );
1720
+ }
1721
+ };
39
1722
 
40
1723
  // src/client.ts
41
- import { SecretString, newQueryBranch, newQueryRetry } from "@superdurable/connectors-sdk";
42
- import { BodyTooLargeError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
43
1724
  var defaultBaseURL = "https://api.ashbyhq.com";
44
1725
  var emptyCandidate = () => ({ id: "", name: "", createdAt: "", updatedAt: "" });
45
1726
  var AshbyClient = class {
@@ -63,25 +1744,165 @@ var AshbyClient = class {
63
1744
  getCandidate() {
64
1745
  return new GetCandidateOperation(this);
65
1746
  }
1747
+ /** Bind the listApplicationFeedback Query. */
1748
+ listApplicationFeedback() {
1749
+ return new ListApplicationFeedbackOperation(this);
1750
+ }
1751
+ /** Bind the listInterviews Query. */
1752
+ listInterviews() {
1753
+ return new ListInterviewsOperation(this);
1754
+ }
1755
+ /** Bind the getInterview Query. */
1756
+ getInterview() {
1757
+ return new GetInterviewOperation(this);
1758
+ }
1759
+ /** Bind the listInterviewSchedules Query. */
1760
+ listInterviewSchedules() {
1761
+ return new ListInterviewSchedulesOperation(this);
1762
+ }
1763
+ /** Bind the getInterviewSchedule Query. */
1764
+ getInterviewSchedule() {
1765
+ return new GetInterviewScheduleOperation(this);
1766
+ }
1767
+ /** Bind the listApplications Query. */
1768
+ listApplications() {
1769
+ return new ListApplicationsOperation(this);
1770
+ }
1771
+ /** Bind the getApplication Query. */
1772
+ getApplication() {
1773
+ return new GetApplicationOperation(this);
1774
+ }
1775
+ /** Bind the listJobs Query. */
1776
+ listJobs() {
1777
+ return new ListJobsOperation(this);
1778
+ }
1779
+ /** Bind the getJob Query. */
1780
+ getJob() {
1781
+ return new GetJobOperation(this);
1782
+ }
1783
+ /** Bind the searchJobs Query. */
1784
+ searchJobs() {
1785
+ return new SearchJobsOperation(this);
1786
+ }
1787
+ /** Bind the listCandidateNotes Query. */
1788
+ listCandidateNotes() {
1789
+ return new ListCandidateNotesOperation(this);
1790
+ }
1791
+ /** Bind the listCandidateProjects Query. */
1792
+ listCandidateProjects() {
1793
+ return new ListCandidateProjectsOperation(this);
1794
+ }
1795
+ /** Bind the searchCandidates Query. */
1796
+ searchCandidates() {
1797
+ return new SearchCandidatesOperation(this);
1798
+ }
1799
+ /** Bind the listCandidates Query. */
1800
+ listCandidates() {
1801
+ return new ListCandidatesOperation(this);
1802
+ }
1803
+ /** Bind the submitApplicationFeedback Mutation. */
1804
+ submitApplicationFeedback() {
1805
+ return new SubmitApplicationFeedbackOperation(this);
1806
+ }
1807
+ /** Bind the cancelInterviewSchedule Mutation. */
1808
+ cancelInterviewSchedule() {
1809
+ return new CancelInterviewScheduleOperation(this);
1810
+ }
1811
+ /** Bind the cancelInterviewEvent Mutation. */
1812
+ cancelInterviewEvent() {
1813
+ return new CancelInterviewEventOperation(this);
1814
+ }
1815
+ /** Bind the transferApplication Mutation. */
1816
+ transferApplication() {
1817
+ return new TransferApplicationOperation(this);
1818
+ }
1819
+ /** Bind the setApplicationSource Mutation. */
1820
+ setApplicationSource() {
1821
+ return new SetApplicationSourceOperation(this);
1822
+ }
1823
+ /** Bind the deleteApplication Mutation. */
1824
+ deleteApplication() {
1825
+ return new DeleteApplicationOperation(this);
1826
+ }
1827
+ /** Bind the updateJobTitle Mutation. */
1828
+ updateJobTitle() {
1829
+ return new UpdateJobTitleOperation(this);
1830
+ }
1831
+ /** Bind the setJobStatus Mutation. */
1832
+ setJobStatus() {
1833
+ return new SetJobStatusOperation(this);
1834
+ }
1835
+ /** Bind the addCandidateProject Mutation. */
1836
+ addCandidateProject() {
1837
+ return new AddCandidateProjectOperation(this);
1838
+ }
1839
+ /** Bind the removeCandidateProject Mutation. */
1840
+ removeCandidateProject() {
1841
+ return new RemoveCandidateProjectOperation(this);
1842
+ }
1843
+ /** Bind the addCandidateTag Mutation. */
1844
+ addCandidateTag() {
1845
+ return new AddCandidateTagOperation(this);
1846
+ }
1847
+ /** Bind the removeCandidateTag Mutation. */
1848
+ removeCandidateTag() {
1849
+ return new RemoveCandidateTagOperation(this);
1850
+ }
1851
+ /** Bind the updateCandidate Mutation. */
1852
+ updateCandidate() {
1853
+ return new UpdateCandidateOperation(this);
1854
+ }
1855
+ /** Bind the requestApplicationFeedback Mutation. */
1856
+ requestApplicationFeedback() {
1857
+ return new RequestApplicationFeedbackOperation(this);
1858
+ }
1859
+ /** Bind the createInterviewSchedule Mutation. */
1860
+ createInterviewSchedule() {
1861
+ return new CreateInterviewScheduleOperation(this);
1862
+ }
1863
+ /** Bind the createApplication Mutation. */
1864
+ createApplication() {
1865
+ return new CreateApplicationOperation(this);
1866
+ }
1867
+ /** Bind the changeApplicationStage Mutation. */
1868
+ changeApplicationStage() {
1869
+ return new ChangeApplicationStageOperation(this);
1870
+ }
1871
+ /** Bind the createJob Mutation. */
1872
+ createJob() {
1873
+ return new CreateJobOperation(this);
1874
+ }
1875
+ /** Bind the createCandidateNote Mutation. */
1876
+ createCandidateNote() {
1877
+ return new CreateCandidateNoteOperation(this);
1878
+ }
1879
+ /** Bind the createCandidate Mutation. */
1880
+ createCandidate() {
1881
+ return new CreateCandidateOperation(this);
1882
+ }
66
1883
  /** Resolve the API key and send one bounded candidate lookup. */
67
1884
  async get(call, candidateID) {
1885
+ return this.post(call, "/candidate.info", { id: candidateID });
1886
+ }
1887
+ /** Resolve the API key and send one bounded provider POST. */
1888
+ async post(call, path, payload, signal = call.context.cancellationSignal) {
68
1889
  let apiKey;
69
1890
  try {
70
- const credentials = await this.credentials.resolve(call, call.context.cancellationSignal);
1891
+ const credentials = await this.credentials.resolve(call, signal);
71
1892
  apiKey = credentials.apiKey instanceof SecretString ? credentials.apiKey.reveal() : "";
72
1893
  } catch {
73
1894
  return emptyExchange("credential");
74
1895
  }
75
1896
  if (!apiKey || !isHeaderSafeCredential(apiKey) || apiKey.includes(":")) return emptyExchange("credential");
76
1897
  const request = {
77
- url: `${this.baseURL}/candidate.info`,
1898
+ url: `${this.baseURL}${path}`,
78
1899
  method: "POST",
79
- body: Buffer.from(JSON.stringify({ id: candidateID }), "utf8"),
1900
+ body: Buffer.from(JSON.stringify(payload), "utf8"),
80
1901
  headers: { Accept: "application/json; version=1", "Content-Type": "application/json", Authorization: `Basic ${Buffer.from(apiKey + ":").toString("base64")}` },
81
1902
  maxResponseBytes: this.maxResponseBytes,
82
1903
  timeoutMs: this.timeoutMs,
83
1904
  addressPolicy: this.baseURL.startsWith("https://") ? "publicHTTPS" : "privateNetworkHTTP",
84
- signal: call.context.cancellationSignal
1905
+ signal
85
1906
  };
86
1907
  let response;
87
1908
  let isTooLarge = false;
@@ -91,6 +1912,8 @@ var AshbyClient = class {
91
1912
  if (error instanceof BodyTooLargeError && error.status !== void 0) {
92
1913
  response = { status: error.status, headers: error.headers ?? {}, body: new Uint8Array() };
93
1914
  isTooLarge = true;
1915
+ } else if (error instanceof ProviderTransportError && error.status !== void 0) {
1916
+ return { status: error.status, body: new Uint8Array(), retryAfterMs: parseRetryAfter(header(error.headers ?? {}, "retry-after")), error: "interrupted" };
94
1917
  } else return emptyExchange("request");
95
1918
  }
96
1919
  const retryAfterMs = parseRetryAfter(header(response.headers, "retry-after"));
@@ -121,14 +1944,15 @@ var GetCandidateOperation = class {
121
1944
  if (exchange.status === 404) return terminal("notFound", "NOT_FOUND", "Ashby did not expose the candidate");
122
1945
  if (exchange.status !== 200) return terminal("providerRejected", "PROVIDER_REJECTION", `Ashby rejected HTTP ${exchange.status}`);
123
1946
  if (exchange.error === "tooLarge") return terminal("invalidResponse", "RESPONSE_TOO_LARGE", "Ashby response exceeded the configured limit");
1947
+ if (exchange.error) return retry("TRANSPORT", "Ashby response interrupted");
124
1948
  const decoded = decodeCandidate(exchange.body, input.candidateId);
125
1949
  if (!decoded) return terminal("invalidResponse", "PROTOCOL", "Ashby returned invalid candidate JSON");
126
1950
  if ("errorCode" in decoded) return decoded.errorCode === "candidate_not_found" ? terminal("notFound", "NOT_FOUND", "Ashby did not expose the candidate") : terminal("providerRejected", "PROVIDER_REJECTION", "Ashby rejected the candidate lookup");
127
- return newQueryBranch("found", decoded);
1951
+ return newQueryBranch2("found", decoded);
128
1952
  }
129
1953
  };
130
1954
  function isValidCandidateID(value) {
131
- return typeof value === "string" && /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(value);
1955
+ return typeof value === "string" && value.length === 36 && /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(value);
132
1956
  }
133
1957
  function emptyExchange(error) {
134
1958
  return { status: 0, body: new Uint8Array(), retryAfterMs: 0, error };
@@ -137,10 +1961,10 @@ function failure(kind, message) {
137
1961
  return { provider: "ashby", operation: "getCandidate", kind, message };
138
1962
  }
139
1963
  function terminal(branch, kind, message) {
140
- return newQueryBranch(branch, emptyCandidate(), {}, failure(kind, message));
1964
+ return newQueryBranch2(branch, emptyCandidate(), {}, failure(kind, message));
141
1965
  }
142
1966
  function retry(kind, message, delay = 0) {
143
- return newQueryRetry(failure(kind, message), delay);
1967
+ return newQueryRetry2(failure(kind, message), delay);
144
1968
  }
145
1969
  function header(headers, name) {
146
1970
  const entry = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];
@@ -165,11 +1989,11 @@ function decodeCandidate(body, candidateID) {
165
1989
  }
166
1990
 
167
1991
  // src/project.ts
168
- function newProjectConnection2(project, connectionName) {
169
- return newProjectConnection(project, connectionName, (loadedProject, name) => {
1992
+ function newProjectConnection2(project2, connectionName) {
1993
+ return newProjectConnection(project2, connectionName, (loadedProject, name) => {
170
1994
  const selected = loadedProject.configuration.connections.find((entry) => entry.connectorId === "ashby" && entry.connectionName === name);
171
1995
  if (!selected) throw new TypeError("Ashby project connection is not configured");
172
- const fields = z.strictObject({ baseUrl: z.string().optional(), timeout: z.union([z.string(), z.number().int()]).optional(), maxResponseBytes: z.number().int().optional() }).parse(selected.configuration);
1996
+ const fields = z2.strictObject({ baseUrl: z2.string().optional(), timeout: z2.union([z2.string(), z2.number().int()]).optional(), maxResponseBytes: z2.number().int().optional() }).parse(selected.configuration);
173
1997
  const timeoutMs = typeof fields.timeout === "number" ? Math.ceil(fields.timeout / 1e6) : fields.timeout ? parseDurationMilliseconds(fields.timeout) : void 0;
174
1998
  const config = {
175
1999
  ...fields.baseUrl ? { baseUrl: fields.baseUrl } : {},
@@ -200,11 +2024,134 @@ function parseDurationMilliseconds(value) {
200
2024
  return milliseconds;
201
2025
  }
202
2026
  export {
2027
+ AddCandidateProjectBranch,
2028
+ AddCandidateProjectBranchAdded,
2029
+ AddCandidateProjectBranchDefect,
2030
+ AddCandidateProjectBranchInvalidResponse,
2031
+ AddCandidateProjectBranchProviderRejected,
2032
+ AddCandidateProjectDefinition,
2033
+ AddCandidateProjectMetadata,
2034
+ AddCandidateProjectOperation,
2035
+ AddCandidateTagBranch,
2036
+ AddCandidateTagBranchAdded,
2037
+ AddCandidateTagBranchDefect,
2038
+ AddCandidateTagBranchInvalidResponse,
2039
+ AddCandidateTagBranchProviderRejected,
2040
+ AddCandidateTagDefinition,
2041
+ AddCandidateTagMetadata,
2042
+ AddCandidateTagOperation,
2043
+ ApplicationFeedbackPageSchema,
2044
+ ApplicationFeedbackSummarySchema,
2045
+ ApplicationPageSchema,
2046
+ ApplicationSummarySchema,
203
2047
  AshbyClient,
2048
+ CancelInterviewEventBranch,
2049
+ CancelInterviewEventBranchCancelled,
2050
+ CancelInterviewEventBranchDefect,
2051
+ CancelInterviewEventBranchInvalidResponse,
2052
+ CancelInterviewEventBranchProviderRejected,
2053
+ CancelInterviewEventDefinition,
2054
+ CancelInterviewEventInputSchema,
2055
+ CancelInterviewEventMetadata,
2056
+ CancelInterviewEventOperation,
2057
+ CancelInterviewScheduleBranch,
2058
+ CancelInterviewScheduleBranchCancelled,
2059
+ CancelInterviewScheduleBranchDefect,
2060
+ CancelInterviewScheduleBranchInvalidResponse,
2061
+ CancelInterviewScheduleBranchProviderRejected,
2062
+ CancelInterviewScheduleDefinition,
2063
+ CancelInterviewScheduleInputSchema,
2064
+ CancelInterviewScheduleMetadata,
2065
+ CancelInterviewScheduleOperation,
2066
+ CandidateNotePageSchema,
2067
+ CandidateNoteSummarySchema,
2068
+ CandidatePageSchema,
204
2069
  CandidateProfileSchema,
2070
+ CandidateProjectInputSchema,
2071
+ CandidateProjectPageSchema,
2072
+ CandidateProjectSummarySchema,
2073
+ CandidateSearchResultsSchema,
2074
+ CandidateTagInputSchema,
2075
+ ChangeApplicationStageBranch,
2076
+ ChangeApplicationStageBranchChanged,
2077
+ ChangeApplicationStageBranchDefect,
2078
+ ChangeApplicationStageBranchProviderRejected,
2079
+ ChangeApplicationStageBranchUncertain,
2080
+ ChangeApplicationStageDefinition,
2081
+ ChangeApplicationStageInputSchema,
2082
+ ChangeApplicationStageMetadata,
2083
+ ChangeApplicationStageOperation,
205
2084
  ConfigSchema,
206
2085
  Connection,
207
2086
  ConnectorID,
2087
+ CreateApplicationBranch,
2088
+ CreateApplicationBranchCreated,
2089
+ CreateApplicationBranchDefect,
2090
+ CreateApplicationBranchProviderRejected,
2091
+ CreateApplicationBranchUncertain,
2092
+ CreateApplicationDefinition,
2093
+ CreateApplicationInputSchema,
2094
+ CreateApplicationMetadata,
2095
+ CreateApplicationOperation,
2096
+ CreateCandidateBranch,
2097
+ CreateCandidateBranchCreated,
2098
+ CreateCandidateBranchDefect,
2099
+ CreateCandidateBranchProviderRejected,
2100
+ CreateCandidateBranchUncertain,
2101
+ CreateCandidateDefinition,
2102
+ CreateCandidateInputSchema,
2103
+ CreateCandidateMetadata,
2104
+ CreateCandidateNoteBranch,
2105
+ CreateCandidateNoteBranchCreated,
2106
+ CreateCandidateNoteBranchDefect,
2107
+ CreateCandidateNoteBranchProviderRejected,
2108
+ CreateCandidateNoteBranchUncertain,
2109
+ CreateCandidateNoteDefinition,
2110
+ CreateCandidateNoteInputSchema,
2111
+ CreateCandidateNoteMetadata,
2112
+ CreateCandidateNoteOperation,
2113
+ CreateCandidateOperation,
2114
+ CreateInterviewScheduleBranch,
2115
+ CreateInterviewScheduleBranchCreated,
2116
+ CreateInterviewScheduleBranchDefect,
2117
+ CreateInterviewScheduleBranchProviderRejected,
2118
+ CreateInterviewScheduleBranchUncertain,
2119
+ CreateInterviewScheduleDefinition,
2120
+ CreateInterviewScheduleInputSchema,
2121
+ CreateInterviewScheduleMetadata,
2122
+ CreateInterviewScheduleOperation,
2123
+ CreateJobBranch,
2124
+ CreateJobBranchCreated,
2125
+ CreateJobBranchDefect,
2126
+ CreateJobBranchProviderRejected,
2127
+ CreateJobBranchUncertain,
2128
+ CreateJobDefinition,
2129
+ CreateJobInputSchema,
2130
+ CreateJobMetadata,
2131
+ CreateJobOperation,
2132
+ CredentialMaterialError,
2133
+ DeleteApplicationBranch,
2134
+ DeleteApplicationBranchDefect,
2135
+ DeleteApplicationBranchDeleted,
2136
+ DeleteApplicationBranchInvalidResponse,
2137
+ DeleteApplicationBranchProviderRejected,
2138
+ DeleteApplicationDefinition,
2139
+ DeleteApplicationInputSchema,
2140
+ DeleteApplicationMetadata,
2141
+ DeleteApplicationOperation,
2142
+ DeletedApplicationSchema,
2143
+ FeedbackFieldSubmissionSchema,
2144
+ FeedbackRequestReceiptSchema,
2145
+ FeedbackSubmissionReceiptSchema,
2146
+ GetApplicationBranch,
2147
+ GetApplicationBranchDefect,
2148
+ GetApplicationBranchFound,
2149
+ GetApplicationBranchInvalidResponse,
2150
+ GetApplicationBranchProviderRejected,
2151
+ GetApplicationDefinition,
2152
+ GetApplicationInputSchema,
2153
+ GetApplicationMetadata,
2154
+ GetApplicationOperation,
208
2155
  GetCandidateBranch,
209
2156
  GetCandidateBranchDefect,
210
2157
  GetCandidateBranchFound,
@@ -215,10 +2162,251 @@ export {
215
2162
  GetCandidateInputSchema,
216
2163
  GetCandidateMetadata,
217
2164
  GetCandidateOperation,
2165
+ GetInterviewBranch,
2166
+ GetInterviewBranchDefect,
2167
+ GetInterviewBranchFound,
2168
+ GetInterviewBranchInvalidResponse,
2169
+ GetInterviewBranchProviderRejected,
2170
+ GetInterviewDefinition,
2171
+ GetInterviewInputSchema,
2172
+ GetInterviewMetadata,
2173
+ GetInterviewOperation,
2174
+ GetInterviewScheduleBranch,
2175
+ GetInterviewScheduleBranchDefect,
2176
+ GetInterviewScheduleBranchFound,
2177
+ GetInterviewScheduleBranchInvalidResponse,
2178
+ GetInterviewScheduleBranchProviderRejected,
2179
+ GetInterviewScheduleDefinition,
2180
+ GetInterviewScheduleInputSchema,
2181
+ GetInterviewScheduleMetadata,
2182
+ GetInterviewScheduleOperation,
2183
+ GetJobBranch,
2184
+ GetJobBranchDefect,
2185
+ GetJobBranchFound,
2186
+ GetJobBranchInvalidResponse,
2187
+ GetJobBranchProviderRejected,
2188
+ GetJobDefinition,
2189
+ GetJobInputSchema,
2190
+ GetJobMetadata,
2191
+ GetJobOperation,
2192
+ InterviewPageSchema,
2193
+ InterviewScheduleEventSchema,
2194
+ InterviewScheduleInterviewerSchema,
2195
+ InterviewSchedulePageSchema,
2196
+ InterviewScheduleSummarySchema,
2197
+ InterviewSummarySchema,
2198
+ JobPageSchema,
2199
+ JobSearchResultsSchema,
2200
+ JobSummarySchema,
2201
+ ListApplicationFeedbackBranch,
2202
+ ListApplicationFeedbackBranchDefect,
2203
+ ListApplicationFeedbackBranchInvalidResponse,
2204
+ ListApplicationFeedbackBranchListed,
2205
+ ListApplicationFeedbackBranchProviderRejected,
2206
+ ListApplicationFeedbackDefinition,
2207
+ ListApplicationFeedbackInputSchema,
2208
+ ListApplicationFeedbackMetadata,
2209
+ ListApplicationFeedbackOperation,
2210
+ ListApplicationsBranch,
2211
+ ListApplicationsBranchDefect,
2212
+ ListApplicationsBranchInvalidResponse,
2213
+ ListApplicationsBranchListed,
2214
+ ListApplicationsBranchProviderRejected,
2215
+ ListApplicationsDefinition,
2216
+ ListApplicationsInputSchema,
2217
+ ListApplicationsMetadata,
2218
+ ListApplicationsOperation,
2219
+ ListCandidateNotesBranch,
2220
+ ListCandidateNotesBranchDefect,
2221
+ ListCandidateNotesBranchInvalidResponse,
2222
+ ListCandidateNotesBranchListed,
2223
+ ListCandidateNotesBranchProviderRejected,
2224
+ ListCandidateNotesDefinition,
2225
+ ListCandidateNotesInputSchema,
2226
+ ListCandidateNotesMetadata,
2227
+ ListCandidateNotesOperation,
2228
+ ListCandidateProjectsBranch,
2229
+ ListCandidateProjectsBranchDefect,
2230
+ ListCandidateProjectsBranchInvalidResponse,
2231
+ ListCandidateProjectsBranchListed,
2232
+ ListCandidateProjectsBranchProviderRejected,
2233
+ ListCandidateProjectsDefinition,
2234
+ ListCandidateProjectsInputSchema,
2235
+ ListCandidateProjectsMetadata,
2236
+ ListCandidateProjectsOperation,
2237
+ ListCandidatesBranch,
2238
+ ListCandidatesBranchDefect,
2239
+ ListCandidatesBranchInvalidResponse,
2240
+ ListCandidatesBranchListed,
2241
+ ListCandidatesBranchProviderRejected,
2242
+ ListCandidatesDefinition,
2243
+ ListCandidatesInputSchema,
2244
+ ListCandidatesMetadata,
2245
+ ListCandidatesOperation,
2246
+ ListInterviewSchedulesBranch,
2247
+ ListInterviewSchedulesBranchDefect,
2248
+ ListInterviewSchedulesBranchInvalidResponse,
2249
+ ListInterviewSchedulesBranchListed,
2250
+ ListInterviewSchedulesBranchProviderRejected,
2251
+ ListInterviewSchedulesDefinition,
2252
+ ListInterviewSchedulesInputSchema,
2253
+ ListInterviewSchedulesMetadata,
2254
+ ListInterviewSchedulesOperation,
2255
+ ListInterviewsBranch,
2256
+ ListInterviewsBranchDefect,
2257
+ ListInterviewsBranchInvalidResponse,
2258
+ ListInterviewsBranchListed,
2259
+ ListInterviewsBranchProviderRejected,
2260
+ ListInterviewsDefinition,
2261
+ ListInterviewsInputSchema,
2262
+ ListInterviewsMetadata,
2263
+ ListInterviewsOperation,
2264
+ ListJobsBranch,
2265
+ ListJobsBranchDefect,
2266
+ ListJobsBranchInvalidResponse,
2267
+ ListJobsBranchListed,
2268
+ ListJobsBranchProviderRejected,
2269
+ ListJobsDefinition,
2270
+ ListJobsInputSchema,
2271
+ ListJobsMetadata,
2272
+ ListJobsOperation,
218
2273
  ProviderID,
2274
+ RemoveCandidateProjectBranch,
2275
+ RemoveCandidateProjectBranchDefect,
2276
+ RemoveCandidateProjectBranchInvalidResponse,
2277
+ RemoveCandidateProjectBranchProviderRejected,
2278
+ RemoveCandidateProjectBranchRemoved,
2279
+ RemoveCandidateProjectDefinition,
2280
+ RemoveCandidateProjectMetadata,
2281
+ RemoveCandidateProjectOperation,
2282
+ RemoveCandidateTagBranch,
2283
+ RemoveCandidateTagBranchDefect,
2284
+ RemoveCandidateTagBranchInvalidResponse,
2285
+ RemoveCandidateTagBranchProviderRejected,
2286
+ RemoveCandidateTagBranchRemoved,
2287
+ RemoveCandidateTagDefinition,
2288
+ RemoveCandidateTagMetadata,
2289
+ RemoveCandidateTagOperation,
2290
+ RequestApplicationFeedbackBranch,
2291
+ RequestApplicationFeedbackBranchDefect,
2292
+ RequestApplicationFeedbackBranchProviderRejected,
2293
+ RequestApplicationFeedbackBranchRequested,
2294
+ RequestApplicationFeedbackBranchUncertain,
2295
+ RequestApplicationFeedbackDefinition,
2296
+ RequestApplicationFeedbackInputSchema,
2297
+ RequestApplicationFeedbackMetadata,
2298
+ RequestApplicationFeedbackOperation,
2299
+ SearchCandidatesBranch,
2300
+ SearchCandidatesBranchDefect,
2301
+ SearchCandidatesBranchFound,
2302
+ SearchCandidatesBranchInvalidResponse,
2303
+ SearchCandidatesBranchProviderRejected,
2304
+ SearchCandidatesDefinition,
2305
+ SearchCandidatesInputSchema,
2306
+ SearchCandidatesMetadata,
2307
+ SearchCandidatesOperation,
2308
+ SearchJobsBranch,
2309
+ SearchJobsBranchDefect,
2310
+ SearchJobsBranchFound,
2311
+ SearchJobsBranchInvalidResponse,
2312
+ SearchJobsBranchProviderRejected,
2313
+ SearchJobsDefinition,
2314
+ SearchJobsInputSchema,
2315
+ SearchJobsMetadata,
2316
+ SearchJobsOperation,
2317
+ SetApplicationSourceBranch,
2318
+ SetApplicationSourceBranchDefect,
2319
+ SetApplicationSourceBranchInvalidResponse,
2320
+ SetApplicationSourceBranchProviderRejected,
2321
+ SetApplicationSourceBranchSet,
2322
+ SetApplicationSourceDefinition,
2323
+ SetApplicationSourceInputSchema,
2324
+ SetApplicationSourceMetadata,
2325
+ SetApplicationSourceOperation,
2326
+ SetJobStatusBranch,
2327
+ SetJobStatusBranchDefect,
2328
+ SetJobStatusBranchInvalidResponse,
2329
+ SetJobStatusBranchProviderRejected,
2330
+ SetJobStatusBranchSet,
2331
+ SetJobStatusDefinition,
2332
+ SetJobStatusInputSchema,
2333
+ SetJobStatusMetadata,
2334
+ SetJobStatusOperation,
2335
+ SubmitApplicationFeedbackBranch,
2336
+ SubmitApplicationFeedbackBranchDefect,
2337
+ SubmitApplicationFeedbackBranchInvalidResponse,
2338
+ SubmitApplicationFeedbackBranchProviderRejected,
2339
+ SubmitApplicationFeedbackBranchSubmitted,
2340
+ SubmitApplicationFeedbackDefinition,
2341
+ SubmitApplicationFeedbackInputSchema,
2342
+ SubmitApplicationFeedbackMetadata,
2343
+ SubmitApplicationFeedbackOperation,
2344
+ TransferApplicationBranch,
2345
+ TransferApplicationBranchDefect,
2346
+ TransferApplicationBranchInvalidResponse,
2347
+ TransferApplicationBranchProviderRejected,
2348
+ TransferApplicationBranchTransferred,
2349
+ TransferApplicationDefinition,
2350
+ TransferApplicationInputSchema,
2351
+ TransferApplicationMetadata,
2352
+ TransferApplicationOperation,
2353
+ UpdateCandidateBranch,
2354
+ UpdateCandidateBranchDefect,
2355
+ UpdateCandidateBranchInvalidResponse,
2356
+ UpdateCandidateBranchNotFound,
2357
+ UpdateCandidateBranchProviderRejected,
2358
+ UpdateCandidateBranchUpdated,
2359
+ UpdateCandidateDefinition,
2360
+ UpdateCandidateInputSchema,
2361
+ UpdateCandidateMetadata,
2362
+ UpdateCandidateOperation,
2363
+ UpdateJobTitleBranch,
2364
+ UpdateJobTitleBranchDefect,
2365
+ UpdateJobTitleBranchInvalidResponse,
2366
+ UpdateJobTitleBranchProviderRejected,
2367
+ UpdateJobTitleBranchUpdated,
2368
+ UpdateJobTitleDefinition,
2369
+ UpdateJobTitleInputSchema,
2370
+ UpdateJobTitleMetadata,
2371
+ UpdateJobTitleOperation,
219
2372
  decodeCredentials,
2373
+ isCredentialMaterialError,
2374
+ newAddCandidateProjectStep,
2375
+ newAddCandidateTagStep,
2376
+ newCancelInterviewEventStep,
2377
+ newCancelInterviewScheduleStep,
2378
+ newChangeApplicationStageStep,
220
2379
  newConnection,
221
2380
  newConnectionWithOperations,
2381
+ newCreateApplicationStep,
2382
+ newCreateCandidateNoteStep,
2383
+ newCreateCandidateStep,
2384
+ newCreateInterviewScheduleStep,
2385
+ newCreateJobStep,
2386
+ newDeleteApplicationStep,
2387
+ newGetApplicationStep,
222
2388
  newGetCandidateStep,
223
- newProjectConnection2 as newProjectConnection
2389
+ newGetInterviewScheduleStep,
2390
+ newGetInterviewStep,
2391
+ newGetJobStep,
2392
+ newListApplicationFeedbackStep,
2393
+ newListApplicationsStep,
2394
+ newListCandidateNotesStep,
2395
+ newListCandidateProjectsStep,
2396
+ newListCandidatesStep,
2397
+ newListInterviewSchedulesStep,
2398
+ newListInterviewsStep,
2399
+ newListJobsStep,
2400
+ newProjectConnection2 as newProjectConnection,
2401
+ newRemoveCandidateProjectStep,
2402
+ newRemoveCandidateTagStep,
2403
+ newRequestApplicationFeedbackStep,
2404
+ newSearchCandidatesStep,
2405
+ newSearchJobsStep,
2406
+ newSetApplicationSourceStep,
2407
+ newSetJobStatusStep,
2408
+ newSubmitApplicationFeedbackStep,
2409
+ newTransferApplicationStep,
2410
+ newUpdateCandidateStep,
2411
+ newUpdateJobTitleStep
224
2412
  };