Skip to content

Commit 71da9fe

Browse files
committed
feat(ashby): expand hiring operations and webhooks
1 parent dcaaf8e commit 71da9fe

78 files changed

Lines changed: 4291 additions & 629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/integrations/ashby.mdx

Lines changed: 885 additions & 84 deletions
Large diffs are not rendered by default.

apps/sim/blocks/blocks/ashby.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,31 @@ describe('AshbyBlock', () => {
324324
const condition = syncToken?.condition as { value: string[] }
325325
expect(condition.value).toContain('list_jobs')
326326
})
327+
328+
it('maps the shared draft-posting switch to the endpoint-specific parameter', () => {
329+
const listParams = AshbyBlock.tools.config.params!(
330+
buildParams('list_jobs', { includeUnpublishedJobPostingIds: true })
331+
)
332+
expect(listParams.includeUnpublishedJobPostingsIds).toBe(true)
333+
expect(listParams.includeUnpublishedJobPostingIds).toBeUndefined()
334+
335+
const infoParams = AshbyBlock.tools.config.params!(
336+
buildParams('get_job', { includeUnpublishedJobPostingIds: true })
337+
)
338+
expect(infoParams.includeUnpublishedJobPostingIds).toBe(true)
339+
expect(infoParams.includeUnpublishedJobPostingsIds).toBeUndefined()
340+
})
341+
})
342+
343+
describe('alternate lookup identifiers', () => {
344+
it('does not require the Ashby UUID when an alternate lookup is supported', () => {
345+
const candidateId = AshbyBlock.subBlocks.find((s) => s.id === 'candidateId')
346+
const applicationId = AshbyBlock.subBlocks.find((s) => s.id === 'applicationId')
347+
const candidateRequired = candidateId?.required as { value?: string[] }
348+
const applicationRequired = applicationId?.required as { value?: string[] }
349+
expect(candidateRequired.value).not.toContain('get_candidate')
350+
expect(applicationRequired.value).not.toContain('get_application')
351+
})
327352
})
328353

329354
describe('list_applications candidateId filter', () => {

0 commit comments

Comments
 (0)