diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 29942546f303..d274cc1c6ca8 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1065,6 +1065,13 @@ icon: recharge.svg sourceType: api releaseStage: generally_available +- name: Recruitee + sourceDefinitionId: 3b046ac7-d8d3-4eb3-b122-f96b2a16d8a8 + dockerRepository: airbyte/source-recruitee + dockerImageTag: 0.1.0 + documentationUrl: https://docs.airbyte.com/integrations/sources/recruitee + sourceType: api + releaseStage: alpha - name: Recurly sourceDefinitionId: cd42861b-01fc-4658-a8ab-5d11d0510f01 dockerRepository: airbyte/source-recurly diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 389b9a6b2d09..1f74672f03ca 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -10341,6 +10341,33 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] +- dockerImage: "airbyte/source-recruitee:0.1.0" + spec: + documentationUrl: "https://docs.airbyte.com/integrations/sources/recruitee" + connectionSpecification: + $schema: "http://json-schema.org/draft-07/schema#" + title: "Recruitee Spec" + type: "object" + required: + - "api_key" + - "company_id" + additionalProperties: true + properties: + api_key: + title: "API Key" + type: "string" + description: "Recruitee API Key. See here." + airbyte_secret: true + company_id: + title: "Company ID" + type: "integer" + description: "Recruitee Company ID. You can also find this ID on the Recruitee API\ + \ tokens page." + supportsNormalization: false + supportsDBT: false + supported_destination_sync_modes: [] - dockerImage: "airbyte/source-recurly:0.4.1" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/recurly" diff --git a/airbyte-integrations/connectors/source-recruitee/.dockerignore b/airbyte-integrations/connectors/source-recruitee/.dockerignore new file mode 100644 index 000000000000..0d96d4b0be98 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/.dockerignore @@ -0,0 +1,6 @@ +* +!Dockerfile +!main.py +!source_recruitee +!setup.py +!secrets diff --git a/airbyte-integrations/connectors/source-recruitee/Dockerfile b/airbyte-integrations/connectors/source-recruitee/Dockerfile new file mode 100644 index 000000000000..212677e681b0 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/Dockerfile @@ -0,0 +1,38 @@ +FROM python:3.9.11-alpine3.15 as base + +# build and load all requirements +FROM base as builder +WORKDIR /airbyte/integration_code + +# upgrade pip to the latest version +RUN apk --no-cache upgrade \ + && pip install --upgrade pip \ + && apk --no-cache add tzdata build-base + + +COPY setup.py ./ +# install necessary packages to a temporary folder +RUN pip install --prefix=/install . + +# build a clean environment +FROM base +WORKDIR /airbyte/integration_code + +# copy all loaded and built libraries to a pure basic image +COPY --from=builder /install /usr/local +# add default timezone settings +COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime +RUN echo "Etc/UTC" > /etc/timezone + +# bash is installed for more convenient debugging. +RUN apk --no-cache add bash + +# copy payload code only +COPY main.py ./ +COPY source_recruitee ./source_recruitee + +ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" +ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] + +LABEL io.airbyte.version=0.1.0 +LABEL io.airbyte.name=airbyte/source-recruitee diff --git a/airbyte-integrations/connectors/source-recruitee/README.md b/airbyte-integrations/connectors/source-recruitee/README.md new file mode 100644 index 000000000000..d5528ee0dd1b --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/README.md @@ -0,0 +1,79 @@ +# Recruitee Source + +This is the repository for the Recruitee configuration based source connector. +For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/recruitee). + +## Local development + +#### Building via Gradle +You can also build the connector in Gradle. This is typically used in CI and not needed for your development workflow. + +To build using Gradle, from the Airbyte repository root, run: +``` +./gradlew :airbyte-integrations:connectors:source-recruitee:build +``` + +#### Create credentials +**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/recruitee) +to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_recruitee/spec.yaml` file. +Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. +See `integration_tests/sample_config.json` for a sample config file. + +**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source recruitee test creds` +and place them into `secrets/config.json`. + +### Locally running the connector docker image + +#### Build +First, make sure you build the latest Docker image: +``` +docker build . -t airbyte/source-recruitee:dev +``` + +You can also build the connector image via Gradle: +``` +./gradlew :airbyte-integrations:connectors:source-recruitee:airbyteDocker +``` +When building via Gradle, the docker image name and tag, respectively, are the values of the `io.airbyte.name` and `io.airbyte.version` `LABEL`s in +the Dockerfile. + +#### Run +Then run any of the connector commands as follows: +``` +docker run --rm airbyte/source-recruitee:dev spec +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-recruitee:dev check --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-recruitee:dev discover --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-recruitee:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json +``` +## Testing + +#### Acceptance Tests +Customize `acceptance-test-config.yml` file to configure tests. See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) for more information. +If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. + +To run your integration tests with docker + +### Using gradle to run tests +All commands should be run from airbyte project root. +To run unit tests: +``` +./gradlew :airbyte-integrations:connectors:source-recruitee:unitTest +``` +To run acceptance and custom integration tests: +``` +./gradlew :airbyte-integrations:connectors:source-recruitee:integrationTest +``` + +## Dependency Management +All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development. +We split dependencies between two groups, dependencies that are: +* required for your connector to work need to go to `MAIN_REQUIREMENTS` list. +* required for the testing need to go to `TEST_REQUIREMENTS` list + +### Publishing a new version of the connector +You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what? +1. Make sure your changes are passing unit and integration tests. +1. Bump the connector version in `Dockerfile` -- just increment the value of the `LABEL io.airbyte.version` appropriately (we use [SemVer](https://semver.org/)). +1. Create a Pull Request. +1. Pat yourself on the back for being an awesome contributor. +1. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master. diff --git a/airbyte-integrations/connectors/source-recruitee/__init__.py b/airbyte-integrations/connectors/source-recruitee/__init__.py new file mode 100644 index 000000000000..1100c1c58cf5 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/__init__.py @@ -0,0 +1,3 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# diff --git a/airbyte-integrations/connectors/source-recruitee/acceptance-test-config.yml b/airbyte-integrations/connectors/source-recruitee/acceptance-test-config.yml new file mode 100644 index 000000000000..8a709b59b3ff --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/acceptance-test-config.yml @@ -0,0 +1,38 @@ +# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/source-acceptance-tests-reference) +# for more information about how to configure these tests +connector_image: airbyte/source-recruitee:dev +acceptance_tests: + spec: + tests: + - spec_path: "source_recruitee/spec.yaml" + connection: + tests: + - config_path: "secrets/config.json" + status: "succeed" + - config_path: "integration_tests/invalid_config.json" + status: "failed" + discovery: + tests: + - config_path: "secrets/config.json" + basic_read: + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + empty_streams: [] +# TODO uncomment this block to specify that the tests should assert the connector outputs the records provided in the input file a file +# expect_records: +# path: "integration_tests/expected_records.txt" +# extra_fields: no +# exact_order: no +# extra_records: yes + incremental: + bypass_reason: "This connector does not implement incremental sync" +# TODO uncomment this block this block if your connector implements incremental sync: +# tests: +# - config_path: "secrets/config.json" +# configured_catalog_path: "integration_tests/configured_catalog.json" +# future_state_path: "integration_tests/abnormal_state.json" + full_refresh: + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-recruitee/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-recruitee/acceptance-test-docker.sh new file mode 100644 index 000000000000..c51577d10690 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/acceptance-test-docker.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +# Build latest connector image +docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2-) + +# Pull latest acctest image +docker pull airbyte/source-acceptance-test:latest + +# Run +docker run --rm -it \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v /tmp:/tmp \ + -v $(pwd):/test_input \ + airbyte/source-acceptance-test \ + --acceptance-test-config /test_input + diff --git a/airbyte-integrations/connectors/source-recruitee/build.gradle b/airbyte-integrations/connectors/source-recruitee/build.gradle new file mode 100644 index 000000000000..3912692e1723 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/build.gradle @@ -0,0 +1,9 @@ +plugins { + id 'airbyte-python' + id 'airbyte-docker' + id 'airbyte-source-acceptance-test' +} + +airbytePython { + moduleDirectory 'source_recruitee' +} diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/__init__.py b/airbyte-integrations/connectors/source-recruitee/integration_tests/__init__.py new file mode 100644 index 000000000000..1100c1c58cf5 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/__init__.py @@ -0,0 +1,3 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-recruitee/integration_tests/abnormal_state.json new file mode 100644 index 000000000000..9fa2adfa4be6 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/abnormal_state.json @@ -0,0 +1,5 @@ +{ + "candidates": { + "id": "invalid-integer-id" + } +} diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-recruitee/integration_tests/acceptance.py new file mode 100644 index 000000000000..950b53b59d41 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/acceptance.py @@ -0,0 +1,14 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +import pytest + +pytest_plugins = ("source_acceptance_test.plugin",) + + +@pytest.fixture(scope="session", autouse=True) +def connector_setup(): + """This fixture is a placeholder for external resources that acceptance test might require.""" + yield diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-recruitee/integration_tests/configured_catalog.json new file mode 100644 index 000000000000..a6354d9400b6 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/configured_catalog.json @@ -0,0 +1,31 @@ +{ + "streams": [ + { + "stream": { + "name": "candidates", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "offers", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "departments", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-recruitee/integration_tests/invalid_config.json new file mode 100644 index 000000000000..ec875b1d5e66 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/invalid_config.json @@ -0,0 +1,3 @@ +{ + "api_key": "invalid key" +} diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_config.json new file mode 100644 index 000000000000..2e9b9bf580b6 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_config.json @@ -0,0 +1,4 @@ +{ + "api_key": "", + "company_id": 123 +} diff --git a/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_state.json b/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_state.json new file mode 100644 index 000000000000..31ba86922263 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/integration_tests/sample_state.json @@ -0,0 +1,13 @@ +{ + "departments": { + "grouped_translations": { + "en": { + "name": "Sales" + } + }, + "id": 123, + "name": "Sales", + "offers_count": 0, + "status": null + } +} diff --git a/airbyte-integrations/connectors/source-recruitee/main.py b/airbyte-integrations/connectors/source-recruitee/main.py new file mode 100644 index 000000000000..4d8c9929f74e --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/main.py @@ -0,0 +1,13 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +import sys + +from airbyte_cdk.entrypoint import launch +from source_recruitee import SourceRecruitee + +if __name__ == "__main__": + source = SourceRecruitee() + launch(source, sys.argv[1:]) diff --git a/airbyte-integrations/connectors/source-recruitee/requirements.txt b/airbyte-integrations/connectors/source-recruitee/requirements.txt new file mode 100644 index 000000000000..0411042aa091 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/requirements.txt @@ -0,0 +1,2 @@ +-e ../../bases/source-acceptance-test +-e . diff --git a/airbyte-integrations/connectors/source-recruitee/setup.py b/airbyte-integrations/connectors/source-recruitee/setup.py new file mode 100644 index 000000000000..0ee9b4beb003 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/setup.py @@ -0,0 +1,29 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +from setuptools import find_packages, setup + +MAIN_REQUIREMENTS = [ + "airbyte-cdk~=0.1", +] + +TEST_REQUIREMENTS = [ + "pytest~=6.1", + "pytest-mock~=3.6.1", + "source-acceptance-test", +] + +setup( + name="source_recruitee", + description="Source implementation for Recruitee.", + author="Airbyte", + author_email="contact@airbyte.io", + packages=find_packages(), + install_requires=MAIN_REQUIREMENTS, + package_data={"": ["*.json", "*.yaml", "schemas/*.json", "schemas/shared/*.json"]}, + extras_require={ + "tests": TEST_REQUIREMENTS, + }, +) diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/__init__.py b/airbyte-integrations/connectors/source-recruitee/source_recruitee/__init__.py new file mode 100644 index 000000000000..d35ace2fc200 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/__init__.py @@ -0,0 +1,8 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +from .source import SourceRecruitee + +__all__ = ["SourceRecruitee"] diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/recruitee.yaml b/airbyte-integrations/connectors/source-recruitee/source_recruitee/recruitee.yaml new file mode 100644 index 000000000000..4e6f02e79abd --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/recruitee.yaml @@ -0,0 +1,56 @@ +version: "0.1.0" + +definitions: + schema_loader: + type: JsonSchema + file_path: "./source_sentry/schemas/{{ options.name }}.json" + selector: + extractor: + field_pointer: + - "{{ options['name'] }}" + requester: + url_base: "https://api.recruitee.com/c/{{ config.company_id }}" + http_method: "GET" + authenticator: + type: BearerAuthenticator + api_token: "{{ config['api_key'] }}" + retriever: + record_selector: + $ref: "*ref(definitions.selector)" + paginator: + type: NoPagination + requester: + $ref: "*ref(definitions.requester)" + primary_key: "id" + base_stream: + retriever: + $ref: "*ref(definitions.retriever)" + candidates_stream: + # Docs: https://docs.recruitee.com/reference/candidates-get + $ref: "*ref(definitions.base_stream)" + $options: + name: "candidates" + path: "/candidates" + offers_stream: + # Docs: https://docs.recruitee.com/reference/offers-get + $ref: "*ref(definitions.base_stream)" + $options: + name: "offers" + path: "/offers" + departments_stream: + # Docs: https://docs.recruitee.com/reference/departments-get + $ref: "*ref(definitions.base_stream)" + $options: + name: "departments" + path: "/departments" + +streams: + - "*ref(definitions.candidates_stream)" + - "*ref(definitions.offers_stream)" + - "*ref(definitions.departments_stream)" + +check: + stream_names: + - "candidates" + - "offers" + - "departments" diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/candidates.json b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/candidates.json new file mode 100644 index 000000000000..c1a6c3aab864 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/candidates.json @@ -0,0 +1,154 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "rating": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "phones": { + "type": "array", + "items": { + "type": "string" + } + }, + "placements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stage_id": { + "type": ["null", "integer"] + }, + "job_starts_at": { + "type": ["null", "string"] + }, + "created_at": { + "type": "string" + }, + "language": { + "type": ["null", "string"] + }, + "hired_at": { + "type": ["null", "string"] + }, + "offer_id": { + "type": "integer" + }, + "candidate_id": { + "type": ["null", "integer"] + }, + "overdue_diff": { + "type": ["null", "string"] + }, + "updated_at": { + "type": "string" + }, + "ratings": { + "type": "object" + }, + "overdue_at": { + "type": ["null", "string"] + }, + "positive_ratings": { + "type": ["null", "integer"] + }, + "id": { + "type": "integer" + }, + "position": { + "type": ["null", "integer"] + } + } + } + }, + "source": { + "type": ["null", "string"] + }, + "adminapp_url": { + "type": ["null", "string"] + }, + "example": { + "type": "boolean" + }, + "emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "pending_result_request": { + "type": "boolean" + }, + "has_avatar": { + "type": "boolean" + }, + "updated_at": { + "type": "string" + }, + "ratings": { + "type": "object", + "properties": { + "yes": { + "type": "integer" + } + } + }, + "viewed": { + "type": "boolean" + }, + "positive_ratings": { + "type": ["null", "integer"] + }, + "id": { + "type": "integer" + }, + "ratings_count": { + "type": "integer" + }, + "tasks_count": { + "type": "integer" + }, + "upcoming_event": { + "type": "boolean" + }, + "unread_notifications": { + "type": "boolean" + }, + "photo_thumb_url": { + "type": ["null", "string"] + }, + "initials": { + "type": ["null", "string"] + }, + "followed": { + "type": "boolean" + }, + "my_upcoming_event": { + "type": "boolean" + }, + "referrer": { + "type": ["null", "string"] + }, + "my_pending_result_request": { + "type": "boolean" + }, + "admin_id": { + "type": ["null", "integer"] + }, + "my_last_rating": { + "type": ["null", "string"] + }, + "notes_count": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "last_message_at": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/departments.json b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/departments.json new file mode 100644 index 000000000000..5dad6879caed --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/departments.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "offers_count": { + "type": "integer" + }, + "grouped_translations": { + "type": "object", + "properties": { + "en": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + }, + "id": { + "type": "integer" + }, + "status": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/offers.json b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/offers.json new file mode 100644 index 000000000000..b7400d1b9a5b --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/schemas/offers.json @@ -0,0 +1,149 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "has_active_campaign": { + "type": "boolean" + }, + "employment_type": { + "type": ["null", "string"] + }, + "eeo_settings": { + "type": ["null", "string"] + }, + "city": { + "type": ["null", "string"] + }, + "created_at": { + "type": "string" + }, + "title": { + "type": "string" + }, + "adminapp_url": { + "type": ["null", "string"] + }, + "example": { + "type": "boolean" + }, + "mailbox_email": { + "type": ["null", "string"] + }, + "pipeline_template": { + "type": ["null", "object"] + }, + "careers_url": { + "type": "string" + }, + "disqualified_candidates_count": { + "type": "integer" + }, + "updated_at": { + "type": "string" + }, + "state_name": { + "type": ["null", "string"] + }, + "street": { + "type": ["null", "string"] + }, + "id": { + "type": "integer" + }, + "hiring_manager_id": { + "type": ["null", "integer"] + }, + "department": { + "type": ["null", "string"] + }, + "published_at": { + "type": ["null", "string"] + }, + "slug": { + "type": "string" + }, + "closed_at": { + "type": ["null", "string"] + }, + "department_id": { + "type": "integer" + }, + "qualified_candidates_count": { + "type": "integer" + }, + "kind": { + "type": "string" + }, + "recruiter_id": { + "type": ["null", "integer"] + }, + "enabled_languages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "name": { + "type": "string" + }, + "native_name": { + "type": "string" + } + } + } + }, + "followed": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "pipeline": { + "type": "boolean" + }, + "country_code": { + "type": ["null", "string"] + }, + "followers": { + "type": "array" + }, + "number_of_openings": { + "type": ["null", "integer"] + }, + "candidates_count": { + "type": "integer" + }, + "hired_candidates_count": { + "type": "integer" + }, + "job_scheduler": { + "type": ["null", "string"] + }, + "guid": { + "type": "string" + }, + "enabled_for_referrals": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "position": { + "type": ["null", "integer"] + }, + "postal_code": { + "type": ["null", "string"] + }, + "state_code": { + "type": ["null", "string"] + }, + "offer_tags": { + "type": "array" + }, + "status": { + "type": "string" + } + } +} diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/source.py b/airbyte-integrations/connectors/source-recruitee/source_recruitee/source.py new file mode 100644 index 000000000000..b5bde6d0ffe5 --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/source.py @@ -0,0 +1,18 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + +from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource + +""" +This file provides the necessary constructs to interpret a provided declarative YAML configuration file into +source connector. + +WARNING: Do not modify this file. +""" + + +# Declarative Source +class SourceRecruitee(YamlDeclarativeSource): + def __init__(self): + super().__init__(**{"path_to_yaml": "recruitee.yaml"}) diff --git a/airbyte-integrations/connectors/source-recruitee/source_recruitee/spec.yaml b/airbyte-integrations/connectors/source-recruitee/source_recruitee/spec.yaml new file mode 100644 index 000000000000..ad328d15781d --- /dev/null +++ b/airbyte-integrations/connectors/source-recruitee/source_recruitee/spec.yaml @@ -0,0 +1,19 @@ +documentationUrl: https://docs.airbyte.com/integrations/sources/recruitee +connectionSpecification: + $schema: http://json-schema.org/draft-07/schema# + title: Recruitee Spec + type: object + required: + - api_key + - company_id + additionalProperties: true + properties: + api_key: + title: API Key + type: string + description: Recruitee API Key. See here. + airbyte_secret: true + company_id: + title: Company ID + type: integer + description: Recruitee Company ID. You can also find this ID on the Recruitee API tokens page. diff --git a/docs/integrations/sources/recruitee.md b/docs/integrations/sources/recruitee.md new file mode 100644 index 000000000000..2a93125a4317 --- /dev/null +++ b/docs/integrations/sources/recruitee.md @@ -0,0 +1,53 @@ +# Recruitee + +This page contains the setup guide and reference information for the [Recruitee](https://recruitee.com/) source connector. + +You can find more information about the Recruitee REST API [here](https://docs.recruitee.com/reference/getting-started). + +## Prerequisites + +You can find your Company ID and find or create an API key within [Recruitee](https://docs.recruitee.com/reference/getting-started). + +## Setup guide + +## Step 1: Set up the Recruitee connector in Airbyte + +### For Airbyte Cloud: + +1. [Log into your Airbyte Cloud](https://cloud.airbyte.io/workspaces) account. +2. In the left navigation bar, click **Sources**. In the top-right corner, click **+new source**. +3. On the Set up the source page, enter the name for the Recruitee connector and select **Recruitee** from the Source type dropdown. +4. Enter your `company_id` - Recruitee Company ID. +5. Enter your `api_key` - Recruitee API key. +6. Click **Set up source**. + +### For Airbyte OSS: + +1. Navigate to the Airbyte Open Source dashboard. +2. Set the name for your source. +4. Enter your `company_id` - Recruitee Company ID. +5. Enter your `api_key` - Recruitee API key. +5. Click **Set up source**. + +## Supported sync modes + +The Recruitee source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes): + +| Feature | Supported? | +| :---------------- | :--------- | +| Full Refresh Sync | Yes | +| Incremental Sync | No | +| SSL connection | Yes | +| Namespaces | No | + +## Supported Streams + +* [Candidates](https://docs.recruitee.com/reference/candidates-get) +* [Offers](https://docs.recruitee.com/reference/offers-get) +* [Departments](https://docs.recruitee.com/reference/departments-get) + +## Changelog + +| Version | Date | Pull Request | Subject | +|:--------|:-----------|:---------------------------------------------------------|:--------------------------------------------------| +| 0.1.0 | 2022-10-30 | [18671](https://github.com/airbytehq/airbyte/pull/18671) | New Source: Recruitee |