Skip to content

Commit

Permalink
fix(lever-ashby) yaml cleanup (#131)
Browse files Browse the repository at this point in the history
## Describe your changes
Improve endpoints and clean up groups

## Issue ticket number and link

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)

-   [ ] I added tests, otherwise the reason is:
-   [ ] External API requests have `retries`
-   [ ] Pagination is used where appropriate
- [ ] The built in `nango.paginate` call is used instead of a `while
(true)` loop
- [ ] Third party requests are NOT parallelized (this can cause issues
with rate limits)
- [ ] If a sync requires metadata the `nango.yaml` has `auto_start:
false`
-   [ ] If the sync is a `full` sync then `track_deletes: true` is set
- [ ] I followed the best practices and guidelines from the [Writing
Integration
Scripts](/NangoHQ/integration-templates/blob/main/WRITING_INTEGRATION_SCRIPTS.md)
doc
  • Loading branch information
khaliqgant authored Dec 3, 2024
1 parent a20d56a commit cd7fcfb
Show file tree
Hide file tree
Showing 18 changed files with 321 additions and 166 deletions.
383 changes: 252 additions & 131 deletions flows.yaml

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions integrations/ashby/nango.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ integrations:
endpoint:
method: GET
path: /candidates
group: Candidates
jobs:
runs: every hour
output: AshbyJob
Expand All @@ -21,6 +22,7 @@ integrations:
endpoint:
method: GET
path: /jobs
group: Jobs
actions:
create-application:
output: AshbyCreateApplicationResponse
Expand All @@ -30,6 +32,7 @@ integrations:
endpoint:
method: POST
path: /applications
group: Applications
create-note:
output: AshbyCreateNoteResponse
input: AshbyCreateNoteInput
Expand All @@ -38,6 +41,7 @@ integrations:
endpoint:
method: POST
path: /notes
group: Notes
application-change-source:
output: AshbyResponse
input: ChangeSource
Expand All @@ -64,13 +68,14 @@ integrations:
output: AshbyResponse
input: ChangeSource | ChangeStage | UpdateHistory
description: |
Action to update an application stage.
Action to update an application.
endpoint:
method: PATCH
path: /applications/update
path: /applications
group: Applications
scopes:
- candidatesWrite
version: 1.0.0
application-update-history:
output: AshbyResponse
input: UpdateHistory
Expand All @@ -86,7 +91,7 @@ integrations:
output: AshbyResponse
input: CreateCandidate
description: |
Action to update history an application stage.
Action to create a candidate.
endpoint:
method: POST
path: /candidates
Expand Down
File renamed without changes.
91 changes: 60 additions & 31 deletions integrations/lever/nango.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ integrations:
input: LeverCreateNoteInput
endpoint:
method: POST
path: /lever/create-note
path: /notes
group: Notes
scopes:
- notes:write:admin
version: 1.0.0
create-opportunity:
description: |
Action to create candidates and opportunities in Lever
Expand All @@ -28,90 +30,102 @@ integrations:
version: 1.0.0
get-stages:
description: |
Action to get lists all pipeline stages in your Lever account.
Action to get lists all pipeline stages. Note that this does
not paginate the response so it is possible that not all stages
are returned.
output: GetStages
endpoint:
method: GET
path: /stages
group: Opportunities
path: /stages/limited
group: Stages
version: 1.0.0
users:
description: |
Lists all the users in your Lever account. Only active users are included by default..
Lists all the users in your Lever account. Only active users are included by default.
output: SuccessResponse
endpoint:
method: GET
path: /users
group: Users
get-postings:
description: |
Get all Posts for your account in Lever
Get all posts for your account. Note that this does
not paginate the response so it is possible that not all postings
are returned.
output: SuccessResponse
endpoint:
method: GET
path: /posts/single
path: /posts/limited
group: Posts
version: 1.0.0
get-archive-reasons:
description: |
Get all Posts for your account in Lever
Get all archived reasons
output: SuccessResponse
endpoint:
method: GET
path: /archived/reasons
group: Opportunities
posting:
group: Archived
get-posting:
description: |
Get single posts for your account in Lever
Get single post for your account in Lever
output: SuccessResponse
input: SinglePost
endpoint:
method: GET
path: /posts
path: /posts/single
group: Posts
version: 1.0.0
update-opportunity-links:
description: |
Update the links in an opportunity
output: SuccessResponse
input: UpdateLinks
endpoint:
method: POST
path: /links
path: /opportunities/links
group: Opportunities
version: 1.0.0
update-opportunity-sources:
description: |
Update the sources in an opportunity
output: SuccessResponse
input: UpdateSources
endpoint:
method: POST
path: /sources
path: /opportunities/sources
group: Opportunities
version: 1.0.0
update-opportunity-stage:
description: |
Update the stage in an opportunity
output: SuccessResponse
input: UpdateOpportunityStage
endpoint:
method: POST
path: /stages
path: /opportunities/stages
group: Opportunities
version: 1.0.0
update-opportunity-tags:
description: |
Update the tags in an opportunity
output: SuccessResponse
input: UpdateTags
endpoint:
method: POST
path: /tags
path: /opportunities/tags
group: Opportunities
version: 1.0.0
update-opportunity-archived:
description: |
Update the tags in an opportunity
output: SuccessResponse
input: ArchiveOpportunity
endpoint:
method: PUT
path: /archived
path: /opportunities/archived
group: Opportunities
version: 1.0.0
apply-posting:
description: |
Submit an application on behalf of a candidate. This endpoint can only be used to submit applications to published or unlisted postings.
Expand Down Expand Up @@ -152,53 +166,62 @@ integrations:
sync_type: full
endpoint:
method: GET
path: /lever/opportunities-applications
path: /applications
group: Applications
scopes:
- applications:read:admin
version: 1.0.0
opportunities-feedbacks:
runs: every 6 hours
description: |
Fetches a list of all feedback forms for a candidate for a specific Opportunity in lever
Fetches a list of all feedback forms for a candidate for every single opportunity
output: LeverOpportunityFeedback
sync_type: full
endpoint:
method: GET
path: /lever/opportunities-feedbacks
path: /opportunities/feedback
group: Opportunities
scopes:
- feedback:read:admin
opportunities-interviews:
runs: every 6 hours
description: |
Fetches a list of all interviewers for a specific Opportunity in lever
Fetches a list of all interviews for every single opportunity
output: LeverOpportunityInterview
sync_type: full
endpoint:
method: GET
path: /lever/opportunities-interviews
path: /opportunities/interviewers
group: Opportunities
scopes:
- interviews:read:admin
version: 1.0.0
opportunities-notes:
runs: every 6 hours
description: |
Fetches a list of all notes for a specific candidate in lever
Fetches a list of all notes for every single opportunity
output: LeverOpportunityNote
sync_type: full
endpoint:
method: GET
path: /lever/opportunities-notes
path: /opportunities-notes
group: Notes
scopes:
- notes:read:admin
version: 1.0.0
opportunities-offers:
runs: every 6 hours
description: |
Fetches a list of all offers for a specific candidate in lever.
Fetches a list of all offers for every single opportunity
output: LeverOpportunityOffer
sync_type: full
endpoint:
method: GET
path: /lever/opportunities-offers
path: /opportunities/offers
group: Offers
scopes:
- offers:write:admin
version: 1.0.0
postings:
runs: every 6 hours
description: |
Expand All @@ -207,31 +230,37 @@ integrations:
sync_type: full
endpoint:
method: GET
path: /lever/postings
path: /postings
group: Postings
scopes:
- postings:read:admin
postings-apply:
version: 1.0.0
postings-questions:
runs: every 6 hours
description: |
Fetches a list of all questions included in a posting’s application form in Lever
output: LeverPostingApply
sync_type: full
endpoint:
method: GET
path: /lever/postings-apply
path: /postings/questions
group: Postings
scopes:
- postings:read:admin
stage:
version: 1.0.0
stages:
runs: every 6 hours
description: |
Fetches a list of all pipeline stages in Lever
output: LeverStage
sync_type: full
endpoint:
method: GET
path: /lever/stage
path: /stages
group: Stages
scopes:
- stages:read:admin
version: 1.0.0
models:
LeverOpportunity:
id: string
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { vi, expect, it, describe } from 'vitest';

import runAction from '../actions/posting.js';
import runAction from '../actions/get-posting.js';

describe('lever-basic posting tests', () => {
const nangoMock = new global.vitest.NangoActionMock({
Expand Down

0 comments on commit cd7fcfb

Please # to comment.