From 114a695a38c697f430b1b0b420f83b08ecc9f52c Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 8 Nov 2022 20:41:19 -0500 Subject: [PATCH 01/14] initial commit --- .../connectors/source-everhour/.dockerignore | 6 ++ .../connectors/source-everhour/Dockerfile | 38 +++++++ .../connectors/source-everhour/README.md | 79 ++++++++++++++ .../connectors/source-everhour/__init__.py | 3 + .../acceptance-test-config.yml | 27 +++++ .../source-everhour/acceptance-test-docker.sh | 16 +++ .../connectors/source-everhour/build.gradle | 9 ++ .../integration_tests/__init__.py | 3 + .../integration_tests/abnormal_state.json | 5 + .../integration_tests/acceptance.py | 16 +++ .../integration_tests/catalog.json | 39 +++++++ .../integration_tests/configured_catalog.json | 48 +++++++++ .../integration_tests/invalid_config.json | 3 + .../integration_tests/sample_config.json | 3 + .../integration_tests/sample_state.json | 5 + .../connectors/source-everhour/main.py | 13 +++ .../source-everhour/requirements.txt | 2 + .../connectors/source-everhour/setup.py | 29 +++++ .../source_everhour/__init__.py | 8 ++ .../source_everhour/everhour.yaml | 57 ++++++++++ .../source_everhour/schemas/clients.json | 47 ++++++++ .../source_everhour/schemas/projects.json | 69 ++++++++++++ .../source_everhour/schemas/time.json | 98 +++++++++++++++++ .../source_everhour/schemas/users.json | 102 ++++++++++++++++++ .../source-everhour/source_everhour/source.py | 18 ++++ .../source-everhour/source_everhour/spec.yaml | 13 +++ 26 files changed, 756 insertions(+) create mode 100644 airbyte-integrations/connectors/source-everhour/.dockerignore create mode 100644 airbyte-integrations/connectors/source-everhour/Dockerfile create mode 100644 airbyte-integrations/connectors/source-everhour/README.md create mode 100644 airbyte-integrations/connectors/source-everhour/__init__.py create mode 100644 airbyte-integrations/connectors/source-everhour/acceptance-test-config.yml create mode 100644 airbyte-integrations/connectors/source-everhour/acceptance-test-docker.sh create mode 100644 airbyte-integrations/connectors/source-everhour/build.gradle create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/__init__.py create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/abnormal_state.json create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/catalog.json create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/invalid_config.json create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json create mode 100644 airbyte-integrations/connectors/source-everhour/integration_tests/sample_state.json create mode 100644 airbyte-integrations/connectors/source-everhour/main.py create mode 100644 airbyte-integrations/connectors/source-everhour/requirements.txt create mode 100644 airbyte-integrations/connectors/source-everhour/setup.py create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/__init__.py create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/source.py create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml diff --git a/airbyte-integrations/connectors/source-everhour/.dockerignore b/airbyte-integrations/connectors/source-everhour/.dockerignore new file mode 100644 index 000000000000..97e5496eb23b --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/.dockerignore @@ -0,0 +1,6 @@ +* +!Dockerfile +!main.py +!source_everhour +!setup.py +!secrets diff --git a/airbyte-integrations/connectors/source-everhour/Dockerfile b/airbyte-integrations/connectors/source-everhour/Dockerfile new file mode 100644 index 000000000000..63279a56c257 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/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_everhour ./source_everhour + +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-everhour diff --git a/airbyte-integrations/connectors/source-everhour/README.md b/airbyte-integrations/connectors/source-everhour/README.md new file mode 100644 index 000000000000..2a03a5f160a0 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/README.md @@ -0,0 +1,79 @@ +# Everhour Source + +This is the repository for the Everhour configuration based source connector. +For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/everhour). + +## 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-everhour:build +``` + +#### Create credentials +**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/everhour) +to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_everhour/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 everhour 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-everhour:dev +``` + +You can also build the connector image via Gradle: +``` +./gradlew :airbyte-integrations:connectors:source-everhour: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-everhour:dev spec +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-everhour:dev check --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-everhour:dev discover --config /secrets/config.json +docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-everhour: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-everhour:unitTest +``` +To run acceptance and custom integration tests: +``` +./gradlew :airbyte-integrations:connectors:source-everhour: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-everhour/__init__.py b/airbyte-integrations/connectors/source-everhour/__init__.py new file mode 100644 index 000000000000..1100c1c58cf5 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/__init__.py @@ -0,0 +1,3 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# diff --git a/airbyte-integrations/connectors/source-everhour/acceptance-test-config.yml b/airbyte-integrations/connectors/source-everhour/acceptance-test-config.yml new file mode 100644 index 000000000000..aa77e3c2697c --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/acceptance-test-config.yml @@ -0,0 +1,27 @@ +# 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-everhour:dev +acceptance_tests: + spec: + tests: + - spec_path: "source_everhour/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: [] + incremental: + bypass_reason: "This connector does not implement incremental sync" + full_refresh: + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-everhour/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-everhour/acceptance-test-docker.sh new file mode 100644 index 000000000000..c51577d10690 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/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-everhour/build.gradle b/airbyte-integrations/connectors/source-everhour/build.gradle new file mode 100644 index 000000000000..27cbd4d5325c --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/build.gradle @@ -0,0 +1,9 @@ +plugins { + id 'airbyte-python' + id 'airbyte-docker' + id 'airbyte-source-acceptance-test' +} + +airbytePython { + moduleDirectory 'source_everhour' +} diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/__init__.py b/airbyte-integrations/connectors/source-everhour/integration_tests/__init__.py new file mode 100644 index 000000000000..1100c1c58cf5 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/__init__.py @@ -0,0 +1,3 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-everhour/integration_tests/abnormal_state.json new file mode 100644 index 000000000000..52b0f2c2118f --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/abnormal_state.json @@ -0,0 +1,5 @@ +{ + "todo-stream-name": { + "todo-field-name": "todo-abnormal-value" + } +} diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py new file mode 100644 index 000000000000..1302b2f57e10 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py @@ -0,0 +1,16 @@ +# +# 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.""" + # TODO: setup test dependencies if needed. otherwise remove the TODO comments + yield + # TODO: clean up test dependencies diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/catalog.json b/airbyte-integrations/connectors/source-everhour/integration_tests/catalog.json new file mode 100644 index 000000000000..6799946a6851 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/catalog.json @@ -0,0 +1,39 @@ +{ + "streams": [ + { + "name": "TODO fix this file", + "supported_sync_modes": ["full_refresh", "incremental"], + "source_defined_cursor": true, + "default_cursor_field": "column1", + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "column1": { + "type": "string" + }, + "column2": { + "type": "number" + } + } + } + }, + { + "name": "table1", + "supported_sync_modes": ["full_refresh", "incremental"], + "source_defined_cursor": false, + "json_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "column1": { + "type": "string" + }, + "column2": { + "type": "number" + } + } + } + } + ] +} diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json new file mode 100644 index 000000000000..44047a0753c2 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json @@ -0,0 +1,48 @@ +{ + "streams": [ + { + "stream": { + "name": "projects", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh" + ] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "clients", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh" + ] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "time", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh" + ] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "users", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh" + ] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-everhour/integration_tests/invalid_config.json new file mode 100644 index 000000000000..f3732995784f --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/invalid_config.json @@ -0,0 +1,3 @@ +{ + "todo-wrong-field": "this should be an incomplete config file, used in standard tests" +} diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json new file mode 100644 index 000000000000..ecc4913b84c7 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json @@ -0,0 +1,3 @@ +{ + "fix-me": "TODO" +} diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/sample_state.json b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_state.json new file mode 100644 index 000000000000..3587e579822d --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_state.json @@ -0,0 +1,5 @@ +{ + "todo-stream-name": { + "todo-field-name": "value" + } +} diff --git a/airbyte-integrations/connectors/source-everhour/main.py b/airbyte-integrations/connectors/source-everhour/main.py new file mode 100644 index 000000000000..f0d8e1670c6e --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/main.py @@ -0,0 +1,13 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +import sys + +from airbyte_cdk.entrypoint import launch +from source_everhour import SourceEverhour + +if __name__ == "__main__": + source = SourceEverhour() + launch(source, sys.argv[1:]) diff --git a/airbyte-integrations/connectors/source-everhour/requirements.txt b/airbyte-integrations/connectors/source-everhour/requirements.txt new file mode 100644 index 000000000000..0411042aa091 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/requirements.txt @@ -0,0 +1,2 @@ +-e ../../bases/source-acceptance-test +-e . diff --git a/airbyte-integrations/connectors/source-everhour/setup.py b/airbyte-integrations/connectors/source-everhour/setup.py new file mode 100644 index 000000000000..b32cc12d0d7a --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/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_everhour", + description="Source implementation for Everhour.", + 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-everhour/source_everhour/__init__.py b/airbyte-integrations/connectors/source-everhour/source_everhour/__init__.py new file mode 100644 index 000000000000..6cfb804a491c --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/__init__.py @@ -0,0 +1,8 @@ +# +# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# + + +from .source import SourceEverhour + +__all__ = ["SourceEverhour"] diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml new file mode 100644 index 000000000000..dcef1fa9071c --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml @@ -0,0 +1,57 @@ +version: "0.1.0" + +definitions: + selector: + extractor: + field_pointer: [] + requester: + url_base: "https://api.everhour.com" + http_method: "GET" + authenticator: + type: ApiKeyAuthenticator + header: "X-Api-Key" + api_token: "{{ config['api_key'] }}" + retriever: + record_selector: + $ref: "*ref(definitions.selector)" + paginator: + type: NoPagination + requester: + $ref: "*ref(definitions.requester)" + base_stream: + retriever: + $ref: "*ref(definitions.retriever)" + projects_stream: + $ref: "*ref(definitions.base_stream)" + $options: + name: "projects" + primary_key: "id" + path: "/projects" + clients_stream: + $ref: "*ref(definitions.base_stream)" + $options: + name: "clients" + primary_key: "id" + path: "/clients" + time_stream: + $ref: "*ref(definitions.base_stream)" + $options: + name: "time" + primary_key: "id" + path: "/team/time" + users_stream: + $ref: "*ref(definitions.base_stream)" + $options: + name: "users" + primary_key: "id" + path: "/team/users" + +streams: + - "*ref(definitions.projects_stream)" + - "*ref(definitions.clients_stream)" + - "*ref(definitions.time_stream)" + - "*ref(definitions.users_stream)" + +check: + stream_names: + - "users" diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json new file mode 100644 index 000000000000..2d51d39a2ba2 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "projects": { + "type": ["null", "array"], + "items": {} + }, + "id": { + "type": ["null", "integer"] + }, + "name": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "lineItemMask": { + "type": ["null", "string"] + }, + "paymentDueDays": { + "type": ["null", "integer"] + }, + "reference": { + "type": ["null", "string"] + }, + "businessDetails": { + "type": ["null", "string"] + }, + "invoicePublicNotes": { + "type": ["null", "string"] + }, + "excludedLabels": { + "type": ["null", "array"], + "items": {} + }, + "status": { + "type": ["null", "string"] + }, + "enableResourcePlanner": { + "type": ["null", "boolean"] + }, + "favorite": { + "type": ["null", "boolean"] + } + } + } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json new file mode 100644 index 000000000000..0b6f8d3e50e3 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "canSyncTasks": { + "type": ["null", "boolean"] + }, + "users": { + "type": ["null", "array"], + "items": {} + }, + "attributes": { + "type": ["null", "object"], + "properties": { + "Project Due On": { + "type": ["null", "string"] + }, + "Project Start On": { + "type": ["null", "string"] + } + } + }, + "id": { + "type": ["null", "string"] + }, + "platform": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "workspaceId": { + "type": ["null", "string"] + }, + "workspaceName": { + "type": ["null", "string"] + }, + "foreign": { + "type": ["null", "boolean"] + }, + "favorite": { + "type": ["null", "boolean"] + }, + "hasWebhook": { + "type": ["null", "boolean"] + }, + "status": { + "type": ["null", "string"] + }, + "estimatesType": { + "type": ["null", "string"] + }, + "isTemplate": { + "type": ["null", "boolean"] + }, + "privacy": { + "type": ["null", "string"] + }, + "connectionStatus": { + "type": ["null", "string"] + }, + "unarchiveDisabledBy": { + "type": ["null", "string"] + } + } +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json new file mode 100644 index 000000000000..a53a69bdc892 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json @@ -0,0 +1,98 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "id": { + "type": ["null", "integer"] + }, + "date": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "user": { + "type": ["null", "integer"] + }, + "time": { + "type": ["null", "integer"] + }, + "task": { + "type": ["null", "object"], + "properties": { + "id": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "type": { + "type": ["null", "string"] + }, + "status": { + "type": ["null", "string"] + }, + "url": { + "type": ["null", "string"] + }, + "iteration": { + "type": ["null", "string"] + }, + "projects": { + "type": ["null", "array"], + "items": {} + }, + "createdAt": { + "type": ["null", "string"] + }, + "labels": { + "type": ["null", "array"], + "items": {} + }, + "time": { + "type": ["null", "object"], + "properties": { + "total": { + "type": ["null", "integer"] + }, + "users": { + "type": ["null", "object"], + "properties": { + "1029023": { + "type": ["null", "integer"] + } + } + }, + "timerTime": { + "type": ["null", "integer"] + } + } + }, + "completed": { + "type": ["null", "boolean"] + }, + "assignees": { + "type": ["null", "array"], + "items": {} + } + } + }, + "history": { + "type": ["null", "array"], + "items": {} + }, + "lockReasons": { + "type": ["null", "array"], + "items": {} + }, + "isLocked": { + "type": ["null", "boolean"] + }, + "cost": { + "type": ["null", "integer"] + }, + "costRate": { + "type": ["null", "integer"] + } + } + } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json new file mode 100644 index 000000000000..31b2ef6516d9 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json @@ -0,0 +1,102 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "isEmailVerified": { + "type": ["null", "boolean"] + }, + "resourcePlannerAccess": { + "type": ["null", "object"], + "properties": { + "viewMine": { + "type": ["null", "boolean"] + }, + "editMine": { + "type": ["null", "boolean"] + }, + "viewAll": { + "type": ["null", "boolean"] + }, + "editAll": { + "type": ["null", "boolean"] + } + } + }, + "timeTrackingPolicy": { + "type": ["null", "object"], + "properties": { + "allowTimeWithoutTask": { + "type": ["null", "boolean"] + }, + "allowManualTimeInput": { + "type": ["null", "boolean"] + }, + "allowFutureTime": { + "type": ["null", "boolean"] + }, + "allowTimeWithoutEstimate": { + "type": ["null", "boolean"] + }, + "allowExceedEstimate": { + "type": ["null", "boolean"] + }, + "allowManageEstimates": { + "type": ["null", "boolean"] + } + } + }, + "avatarUrl": { + "type": ["null", "string"] + }, + "avatarUrlLarge": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "integer"] + }, + "email": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "headline": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "groups": { + "type": ["null", "array"], + "items": {} + }, + "status": { + "type": ["null", "string"] + }, + "role": { + "type": ["null", "string"] + }, + "type": { + "type": ["null", "string"] + }, + "costHistory": { + "type": ["null", "array"], + "items": {} + }, + "rate": { + "type": ["null", "integer"] + }, + "cost": { + "type": ["null", "integer"] + }, + "budget": { + "type": ["null", "object"] + }, + "enableResourcePlanner": { + "type": ["null", "boolean"] + }, + "capacity": { + "type": ["null", "integer"] + } + } + } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/source.py b/airbyte-integrations/connectors/source-everhour/source_everhour/source.py new file mode 100644 index 000000000000..739966a0ed83 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/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 SourceEverhour(YamlDeclarativeSource): + def __init__(self): + super().__init__(**{"path_to_yaml": "everhour.yaml"}) diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml new file mode 100644 index 000000000000..7db8ece701cd --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml @@ -0,0 +1,13 @@ +documentationUrl: https://docs.airbyte.io/integrations/sources/everhour +connectionSpecification: + title: Everhour Spec + type: object + required: + - api_key + additionalProperties: true + properties: + api_key: + type: string + description: API Key + airbyte_secret: true + \ No newline at end of file From 89123b87196ed546e822957044e2cfdc23477ffc Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 8 Nov 2022 21:00:31 -0500 Subject: [PATCH 02/14] fix schema --- .../source-everhour/source_everhour/schemas/projects.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json index 0b6f8d3e50e3..53da65db6f08 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json @@ -10,7 +10,7 @@ "items": {} }, "attributes": { - "type": ["null", "object"], + "type": ["null", "object", "array"], "properties": { "Project Due On": { "type": ["null", "string"] From 24a8121ac4f0aebeabbee5204912f22f5d8b1ff7 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 8 Nov 2022 21:09:52 -0500 Subject: [PATCH 03/14] fix schema --- .../source_everhour/schemas/projects.json | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json index 53da65db6f08..a8453e288093 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json @@ -9,17 +9,6 @@ "type": ["null", "array"], "items": {} }, - "attributes": { - "type": ["null", "object", "array"], - "properties": { - "Project Due On": { - "type": ["null", "string"] - }, - "Project Start On": { - "type": ["null", "string"] - } - } - }, "id": { "type": ["null", "string"] }, From 3fb52f69d536ffd382812057d060f22bf028e60a Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 8 Nov 2022 23:00:48 -0500 Subject: [PATCH 04/14] ass tasks stream --- .../integration_tests/configured_catalog.json | 11 +++ .../source_everhour/everhour.yaml | 17 +++++ .../source_everhour/schemas/tasks.json | 67 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json index 44047a0753c2..51756471720f 100644 --- a/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json @@ -43,6 +43,17 @@ }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "tasks", + "json_schema": {}, + "supported_sync_modes": [ + "full_refresh" + ] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" } ] } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml index dcef1fa9071c..f7ccddf589af 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml @@ -27,6 +27,22 @@ definitions: name: "projects" primary_key: "id" path: "/projects" + tasks_stream: + $options: + name: "tasks" + primary_key: "id" + retriever: + $ref: "*ref(definitions.retriever)" + requester: + $ref: "*ref(definitions.requester)" + path: "projects/{{ stream_slice.parent_id }}/tasks" + stream_slicer: + type: SubstreamSlicer + parent_stream_configs: + - stream: "*ref(definitions.projects_stream)" + parent_key: "id" + stream_slice_field: "parent_id" + clients_stream: $ref: "*ref(definitions.base_stream)" $options: @@ -51,6 +67,7 @@ streams: - "*ref(definitions.clients_stream)" - "*ref(definitions.time_stream)" - "*ref(definitions.users_stream)" + - "*ref(definitions.tasks_stream)" check: stream_names: diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json new file mode 100644 index 000000000000..2e1728593128 --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json @@ -0,0 +1,67 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "iteration": { + "type": "string" + }, + "projects": { + "type": "array", + "items": {} + }, + "createdAt": { + "type": "string" + }, + "dueOn": { + "type": "string" + }, + "labels": { + "type": "array", + "items": {} + }, + "time": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "users": { + "type": "object", + "properties": { + "1016297": { + "type": "integer" + } + } + }, + "timerTime": { + "type": "integer" + } + } + }, + "completed": { + "type": "boolean" + }, + "completedAt": { + "type": "string" + }, + "assignees": { + "type": "array", + "items": {} + } + } + } \ No newline at end of file From 265321e0d94ad7492a1b95757a21a69875212f6d Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Wed, 9 Nov 2022 13:07:44 -0500 Subject: [PATCH 05/14] update schema --- .../source_everhour/schemas/clients.json | 90 ++++---- .../source_everhour/schemas/projects.json | 4 +- .../source_everhour/schemas/tasks.json | 14 +- .../source_everhour/schemas/time.json | 180 ++++++++-------- .../source_everhour/schemas/users.json | 194 +++++++++--------- .../source-everhour/source_everhour/spec.yaml | 6 +- 6 files changed, 244 insertions(+), 244 deletions(-) diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json index 2d51d39a2ba2..c1df86283ad7 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json @@ -1,47 +1,47 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "projects": { - "type": ["null", "array"], - "items": {} - }, - "id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "createdAt": { - "type": ["null", "string"] - }, - "lineItemMask": { - "type": ["null", "string"] - }, - "paymentDueDays": { - "type": ["null", "integer"] - }, - "reference": { - "type": ["null", "string"] - }, - "businessDetails": { - "type": ["null", "string"] - }, - "invoicePublicNotes": { - "type": ["null", "string"] - }, - "excludedLabels": { - "type": ["null", "array"], - "items": {} - }, - "status": { - "type": ["null", "string"] - }, - "enableResourcePlanner": { - "type": ["null", "boolean"] - }, - "favorite": { - "type": ["null", "boolean"] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "projects": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "id": { + "type": ["null", "integer"] + }, + "name": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "lineItemMask": { + "type": ["null", "string"] + }, + "paymentDueDays": { + "type": ["null", "integer"] + }, + "reference": { + "type": ["null", "string"] + }, + "businessDetails": { + "type": ["null", "string"] + }, + "invoicePublicNotes": { + "type": ["null", "string"] + }, + "excludedLabels": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "status": { + "type": ["null", "string"] + }, + "enableResourcePlanner": { + "type": ["null", "boolean"] + }, + "favorite": { + "type": ["null", "boolean"] } - } \ No newline at end of file + } +} diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json index a8453e288093..02dd6df981f9 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json @@ -7,7 +7,7 @@ }, "users": { "type": ["null", "array"], - "items": {} + "items": { "type": "string" } }, "id": { "type": ["null", "string"] @@ -55,4 +55,4 @@ "type": ["null", "string"] } } -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json index 2e1728593128..735e31f44e6b 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json @@ -22,7 +22,7 @@ }, "projects": { "type": "array", - "items": {} + "items": {"type": "string"} }, "createdAt": { "type": "string" @@ -32,7 +32,7 @@ }, "labels": { "type": "array", - "items": {} + "items": {"type": "string"} }, "time": { "type": "object", @@ -41,12 +41,8 @@ "type": "integer" }, "users": { - "type": "object", - "properties": { - "1016297": { - "type": "integer" - } - } + "type": "array", + "items": {"type": "string"} }, "timerTime": { "type": "integer" @@ -61,7 +57,7 @@ }, "assignees": { "type": "array", - "items": {} + "items": {"type": "string"} } } } \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json index a53a69bdc892..766256919b8a 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json @@ -1,98 +1,98 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "date": { - "type": ["null", "string"] - }, - "createdAt": { - "type": ["null", "string"] - }, - "user": { - "type": ["null", "integer"] - }, - "time": { - "type": ["null", "integer"] - }, - "task": { - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - }, - "iteration": { - "type": ["null", "string"] - }, - "projects": { - "type": ["null", "array"], - "items": {} - }, - "createdAt": { - "type": ["null", "string"] - }, - "labels": { - "type": ["null", "array"], - "items": {} - }, - "time": { - "type": ["null", "object"], - "properties": { - "total": { - "type": ["null", "integer"] - }, - "users": { - "type": ["null", "object"], - "properties": { - "1029023": { - "type": ["null", "integer"] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "id": { + "type": ["null", "integer"] + }, + "date": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "user": { + "type": ["null", "integer"] + }, + "time": { + "type": ["null", "integer"] + }, + "task": { + "type": ["null", "object"], + "properties": { + "id": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "type": { + "type": ["null", "string"] + }, + "status": { + "type": ["null", "string"] + }, + "url": { + "type": ["null", "string"] + }, + "iteration": { + "type": ["null", "string"] + }, + "projects": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "createdAt": { + "type": ["null", "string"] + }, + "labels": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "time": { + "type": ["null", "object"], + "properties": { + "total": { + "type": ["null", "integer"] + }, + "users": { + "type": ["null", "object"], + "properties": { + "1029023": { + "type": ["null", "integer"] } - }, - "timerTime": { - "type": ["null", "integer"] } + }, + "timerTime": { + "type": ["null", "integer"] } - }, - "completed": { - "type": ["null", "boolean"] - }, - "assignees": { - "type": ["null", "array"], - "items": {} } + }, + "completed": { + "type": ["null", "boolean"] + }, + "assignees": { + "type": ["null", "array"], + "items": { "type": "string" } } - }, - "history": { - "type": ["null", "array"], - "items": {} - }, - "lockReasons": { - "type": ["null", "array"], - "items": {} - }, - "isLocked": { - "type": ["null", "boolean"] - }, - "cost": { - "type": ["null", "integer"] - }, - "costRate": { - "type": ["null", "integer"] } + }, + "history": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "lockReasons": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "isLocked": { + "type": ["null", "boolean"] + }, + "cost": { + "type": ["null", "integer"] + }, + "costRate": { + "type": ["null", "integer"] } - } \ No newline at end of file + } +} diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json index 31b2ef6516d9..4d724e2319df 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json @@ -1,102 +1,102 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "isEmailVerified": { - "type": ["null", "boolean"] - }, - "resourcePlannerAccess": { - "type": ["null", "object"], - "properties": { - "viewMine": { - "type": ["null", "boolean"] - }, - "editMine": { - "type": ["null", "boolean"] - }, - "viewAll": { - "type": ["null", "boolean"] - }, - "editAll": { - "type": ["null", "boolean"] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "isEmailVerified": { + "type": ["null", "boolean"] + }, + "resourcePlannerAccess": { + "type": ["null", "object"], + "properties": { + "viewMine": { + "type": ["null", "boolean"] + }, + "editMine": { + "type": ["null", "boolean"] + }, + "viewAll": { + "type": ["null", "boolean"] + }, + "editAll": { + "type": ["null", "boolean"] } - }, - "timeTrackingPolicy": { - "type": ["null", "object"], - "properties": { - "allowTimeWithoutTask": { - "type": ["null", "boolean"] - }, - "allowManualTimeInput": { - "type": ["null", "boolean"] - }, - "allowFutureTime": { - "type": ["null", "boolean"] - }, - "allowTimeWithoutEstimate": { - "type": ["null", "boolean"] - }, - "allowExceedEstimate": { - "type": ["null", "boolean"] - }, - "allowManageEstimates": { - "type": ["null", "boolean"] - } + } + }, + "timeTrackingPolicy": { + "type": ["null", "object"], + "properties": { + "allowTimeWithoutTask": { + "type": ["null", "boolean"] + }, + "allowManualTimeInput": { + "type": ["null", "boolean"] + }, + "allowFutureTime": { + "type": ["null", "boolean"] + }, + "allowTimeWithoutEstimate": { + "type": ["null", "boolean"] + }, + "allowExceedEstimate": { + "type": ["null", "boolean"] + }, + "allowManageEstimates": { + "type": ["null", "boolean"] } - }, - "avatarUrl": { - "type": ["null", "string"] - }, - "avatarUrlLarge": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "integer"] - }, - "email": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "headline": { - "type": ["null", "string"] - }, - "createdAt": { - "type": ["null", "string"] - }, - "groups": { - "type": ["null", "array"], - "items": {} - }, - "status": { - "type": ["null", "string"] - }, - "role": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "costHistory": { - "type": ["null", "array"], - "items": {} - }, - "rate": { - "type": ["null", "integer"] - }, - "cost": { - "type": ["null", "integer"] - }, - "budget": { - "type": ["null", "object"] - }, - "enableResourcePlanner": { - "type": ["null", "boolean"] - }, - "capacity": { - "type": ["null", "integer"] } + }, + "avatarUrl": { + "type": ["null", "string"] + }, + "avatarUrlLarge": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "integer"] + }, + "email": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "headline": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "groups": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "status": { + "type": ["null", "string"] + }, + "role": { + "type": ["null", "string"] + }, + "type": { + "type": ["null", "string"] + }, + "costHistory": { + "type": ["null", "array"], + "items": { "type": "string" } + }, + "rate": { + "type": ["null", "integer"] + }, + "cost": { + "type": ["null", "integer"] + }, + "budget": { + "type": ["null", "object"] + }, + "enableResourcePlanner": { + "type": ["null", "boolean"] + }, + "capacity": { + "type": ["null", "integer"] } - } \ No newline at end of file + } +} diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml index 7db8ece701cd..26dfcb153460 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml @@ -8,6 +8,10 @@ connectionSpecification: properties: api_key: type: string - description: API Key + title: API Key + description: >- + Everhour API Key. See the docs + for information on how to generate this key. airbyte_secret: true \ No newline at end of file From 29cffe5f3f4b32dccc340ee81a3ae1c5cbb7e82a Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Wed, 9 Nov 2022 14:15:21 -0500 Subject: [PATCH 06/14] fix sample config --- .../source-everhour/integration_tests/sample_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json index ecc4913b84c7..c6bf4f5bca97 100644 --- a/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/sample_config.json @@ -1,3 +1,3 @@ { - "fix-me": "TODO" + "api_key": "API_key" } From 805dd3e025eeb3ed074b1d242862380522380f14 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Fri, 11 Nov 2022 13:50:13 -0500 Subject: [PATCH 07/14] add time records --- .../integration_tests/configured_catalog.json | 31 ++++--- .../source_everhour/everhour.yaml | 17 +++- .../source_everhour/schemas/time_records.json | 84 +++++++++++++++++++ 3 files changed, 115 insertions(+), 17 deletions(-) create mode 100644 airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json index 51756471720f..efa74cfa1168 100644 --- a/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/configured_catalog.json @@ -4,9 +4,7 @@ "stream": { "name": "projects", "json_schema": {}, - "supported_sync_modes": [ - "full_refresh" - ] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" @@ -15,9 +13,7 @@ "stream": { "name": "clients", "json_schema": {}, - "supported_sync_modes": [ - "full_refresh" - ] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" @@ -26,9 +22,7 @@ "stream": { "name": "time", "json_schema": {}, - "supported_sync_modes": [ - "full_refresh" - ] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" @@ -37,9 +31,7 @@ "stream": { "name": "users", "json_schema": {}, - "supported_sync_modes": [ - "full_refresh" - ] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" @@ -48,12 +40,19 @@ "stream": { "name": "tasks", "json_schema": {}, - "supported_sync_modes": [ - "full_refresh" - ] + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "time_records", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", "destination_sync_mode": "overwrite" } ] -} \ No newline at end of file +} diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml index f7ccddf589af..8ecd5c6daf1a 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml @@ -42,7 +42,21 @@ definitions: - stream: "*ref(definitions.projects_stream)" parent_key: "id" stream_slice_field: "parent_id" - + time_records_stream: + $options: + name: "time_records" + primary_key: "id" + retriever: + $ref: "*ref(definitions.retriever)" + requester: + $ref: "*ref(definitions.requester)" + path: "projects/{{ stream_slice.parent_id }}/time" + stream_slicer: + type: SubstreamSlicer + parent_stream_configs: + - stream: "*ref(definitions.projects_stream)" + parent_key: "id" + stream_slice_field: "parent_id" clients_stream: $ref: "*ref(definitions.base_stream)" $options: @@ -68,6 +82,7 @@ streams: - "*ref(definitions.time_stream)" - "*ref(definitions.users_stream)" - "*ref(definitions.tasks_stream)" + - "*ref(definitions.time_records_stream)" check: stream_names: diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json new file mode 100644 index 000000000000..fc47ac76d52e --- /dev/null +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "id": { + "type": ["null", "integer"] + }, + "date": { + "type": ["null", "string"] + }, + "createdAt": { + "type": ["null", "string"] + }, + "user": { + "type": ["null", "integer"] + }, + "time": { + "type": ["null", "integer"] + }, + "task": { + "type": ["null", "object"], + "properties": { + "id": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "type": { + "type": ["null", "string"] + }, + "status": { + "type": ["null", "string"] + }, + "url": { + "type": ["null", "string"] + }, + "iteration": { + "type": ["null", "string"] + }, + "projects": { + "type": ["null", "array"], + "items": {} + }, + "createdAt": { + "type": ["null", "string"] + }, + "labels": { + "type": ["null", "array"], + "items": {} + }, + "time": { + "type": ["null", "object"], + "properties": { + "total": { + "type": ["null", "integer"] + }, + "users": { + "type": ["null", "object"], + "properties": { + "1029023": { + "type": ["null", "integer"] + }, + "1163985": { + "type": ["null", "integer"] + } + } + }, + "timerTime": { + "type": ["null", "integer"] + } + } + }, + "completed": { + "type": ["null", "boolean"] + }, + "assignees": { + "type": ["null", "array"], + "items": {} + } + } + } + } +} From 3e5659a4042dc103d55876e0f9bd9d1a0cf520f7 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 28 Feb 2023 15:37:40 -0500 Subject: [PATCH 08/14] add docs --- .../src/main/resources/icons/everhour.svg | 37 +++++++++++++++++++ .../resources/seed/source_definitions.yaml | 8 ++++ docs/integrations/sources/everhour.md | 29 +++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 airbyte-config/init/src/main/resources/icons/everhour.svg create mode 100644 docs/integrations/sources/everhour.md diff --git a/airbyte-config/init/src/main/resources/icons/everhour.svg b/airbyte-config/init/src/main/resources/icons/everhour.svg new file mode 100644 index 000000000000..f3ecad7f052f --- /dev/null +++ b/airbyte-config/init/src/main/resources/icons/everhour.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + 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 2d906156cfbf..7b2fe3a3f723 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -354,6 +354,14 @@ icon: exchangeratesapi.svg sourceType: api releaseStage: alpha +- name: Everhour + sourceDefinitionId: 6babfc42-c734-4ef6-a817-6eca15f0f9b7 + dockerRepository: airbyte/everhour + dockerImageTag: 0.1.0 + documentationUrl: https://docs.airbyte.com/integrations/sources/everhour + icon: everhour.svg + sourceType: api + releaseStage: alpha - name: Facebook Marketing sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c dockerRepository: airbyte/source-facebook-marketing diff --git a/docs/integrations/sources/everhour.md b/docs/integrations/sources/everhour.md new file mode 100644 index 000000000000..50e823890b59 --- /dev/null +++ b/docs/integrations/sources/everhour.md @@ -0,0 +1,29 @@ +# Everhour + +This page contains the setup guide and reference information for the Everhour source connector. + +## Prerequisites + +- API Key from Everhour. You can follow instructions [here](https://everhour.docs.apiary.io/#) to get one. + +## Supported sync modes + +Currently, this project only supports full sync mode. + +## Supported Streams + +This project supports the following streams: + +- Projects Stream +- Tasks Stream +- Time Records Stream +- Clients Stream +- Time Stream +- Users Stream + +## Changelog + +| Version | Date | Pull Request | Subject | +|:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------| + +| 0.1.0 | 2023-02-28 | []() | Initial Release | From 8489e050e7b2cc156db3a25b978921a3b1373c0f Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Tue, 28 Feb 2023 15:44:33 -0500 Subject: [PATCH 09/14] update docs --- airbyte-integrations/builds.md | 1 + docs/integrations/sources/everhour.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/builds.md b/airbyte-integrations/builds.md index 79a9e3958f73..4fde4222d42d 100644 --- a/airbyte-integrations/builds.md +++ b/airbyte-integrations/builds.md @@ -34,6 +34,7 @@ | Drift | [![source-drift](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-drift%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-drift) | | End-to-End Testing | [![source-e2e-test](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-e2e-test%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-e2e-test) | | Exchange Rates API | [![source-exchange-rates](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-exchange-rates%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-exchange-rates) | +| Everhour | [![source-everhour](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-everhour%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-everhour) | | Facebook Marketing | [![source-facebook-marketing](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-facebook-marketing%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-facebook-marketing) | | Fastbill | [![source-fastbill](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-fastbill%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-fastbill) | | Fauna | [![source-fauna](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-fauna%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-fauna) | diff --git a/docs/integrations/sources/everhour.md b/docs/integrations/sources/everhour.md index 50e823890b59..3475806ec1f0 100644 --- a/docs/integrations/sources/everhour.md +++ b/docs/integrations/sources/everhour.md @@ -26,4 +26,4 @@ This project supports the following streams: | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------| -| 0.1.0 | 2023-02-28 | []() | Initial Release | +| 0.1.0 | 2023-02-28 | [23593](https://github.com/airbytehq/airbyte/pull/23593) | Initial Release | From 4867f60ccc094eb96e6b91c5c97bc83aac182643 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Thu, 9 Mar 2023 11:57:05 -0500 Subject: [PATCH 10/14] Update source_definitions.yaml --- .../init/src/main/resources/seed/source_definitions.yaml | 4 ++++ 1 file changed, 4 insertions(+) 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 67ed233355ae..8ba940cde079 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -503,6 +503,10 @@ icon: exchangeratesapi.svg sourceType: api releaseStage: alpha + allowedHosts: + hosts: + - "${subdomain}.apilayer.com" + - apilayer.com - name: Everhour sourceDefinitionId: 6babfc42-c734-4ef6-a817-6eca15f0f9b7 dockerRepository: airbyte/everhour From ec36811761c7b130ab996690ae44e4417e5fed9b Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Fri, 17 Mar 2023 15:00:42 -0400 Subject: [PATCH 11/14] Update source_definitions.yaml --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8ba940cde079..29319e88a45b 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -509,7 +509,7 @@ - apilayer.com - name: Everhour sourceDefinitionId: 6babfc42-c734-4ef6-a817-6eca15f0f9b7 - dockerRepository: airbyte/everhour + dockerRepository: airbyte/source-everhour dockerImageTag: 0.1.0 documentationUrl: https://docs.airbyte.com/integrations/sources/everhour icon: everhour.svg From da3fdadf387b9392e5b2d24e54b89062a261b90f Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Fri, 17 Mar 2023 15:05:23 -0400 Subject: [PATCH 12/14] Update spec.yaml --- .../connectors/source-everhour/source_everhour/spec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml index 26dfcb153460..fa9af9ba6019 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/spec.yaml @@ -14,4 +14,3 @@ connectionSpecification: href="https://everhour.docs.apiary.io/#introduction/authentication">docs for information on how to generate this key. airbyte_secret: true - \ No newline at end of file From 9fc079500ba563fa2d1c49777b3336a9af27cf6c Mon Sep 17 00:00:00 2001 From: marcosmarxm Date: Thu, 23 Mar 2023 15:36:08 -0300 Subject: [PATCH 13/14] update low-code to latest format --- .../connectors/source-everhour/build.gradle | 2 +- .../integration_tests/acceptance.py | 4 +- .../connectors/source-everhour/main.py | 2 +- .../source-everhour/requirements.txt | 2 +- .../connectors/source-everhour/setup.py | 8 +-- .../source_everhour/everhour.yaml | 68 ++++++++++--------- .../source_everhour/schemas/clients.json | 1 + .../source_everhour/schemas/projects.json | 3 +- .../source_everhour/schemas/tasks.json | 4 +- .../source_everhour/schemas/time.json | 6 +- .../source_everhour/schemas/time_records.json | 1 + .../source_everhour/schemas/users.json | 3 +- .../source-everhour/source_everhour/source.py | 2 +- 13 files changed, 56 insertions(+), 50 deletions(-) diff --git a/airbyte-integrations/connectors/source-everhour/build.gradle b/airbyte-integrations/connectors/source-everhour/build.gradle index 27cbd4d5325c..2698346a9377 100644 --- a/airbyte-integrations/connectors/source-everhour/build.gradle +++ b/airbyte-integrations/connectors/source-everhour/build.gradle @@ -1,7 +1,7 @@ plugins { id 'airbyte-python' id 'airbyte-docker' - id 'airbyte-source-acceptance-test' + id 'airbyte-connector-acceptance-test' } airbytePython { diff --git a/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py index 1302b2f57e10..9e6409236281 100644 --- a/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py +++ b/airbyte-integrations/connectors/source-everhour/integration_tests/acceptance.py @@ -1,11 +1,11 @@ # -# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import pytest -pytest_plugins = ("source_acceptance_test.plugin",) +pytest_plugins = ("connector_acceptance_test.plugin",) @pytest.fixture(scope="session", autouse=True) diff --git a/airbyte-integrations/connectors/source-everhour/main.py b/airbyte-integrations/connectors/source-everhour/main.py index f0d8e1670c6e..8c44913d9ddf 100644 --- a/airbyte-integrations/connectors/source-everhour/main.py +++ b/airbyte-integrations/connectors/source-everhour/main.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-everhour/requirements.txt b/airbyte-integrations/connectors/source-everhour/requirements.txt index 0411042aa091..cc57334ef619 100644 --- a/airbyte-integrations/connectors/source-everhour/requirements.txt +++ b/airbyte-integrations/connectors/source-everhour/requirements.txt @@ -1,2 +1,2 @@ --e ../../bases/source-acceptance-test +-e ../../bases/connector-acceptance-test -e . diff --git a/airbyte-integrations/connectors/source-everhour/setup.py b/airbyte-integrations/connectors/source-everhour/setup.py index b32cc12d0d7a..da7860e6ac55 100644 --- a/airbyte-integrations/connectors/source-everhour/setup.py +++ b/airbyte-integrations/connectors/source-everhour/setup.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. # @@ -9,11 +9,7 @@ "airbyte-cdk~=0.1", ] -TEST_REQUIREMENTS = [ - "pytest~=6.1", - "pytest-mock~=3.6.1", - "source-acceptance-test", -] +TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock~=3.6.1"] setup( name="source_everhour", diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml index 8ecd5c6daf1a..068bc7daf58a 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/everhour.yaml @@ -1,9 +1,11 @@ -version: "0.1.0" +version: "0.30.0" definitions: selector: + type: RecordSelector extractor: - field_pointer: [] + type: DpathExtractor + field_path: [] requester: url_base: "https://api.everhour.com" http_method: "GET" @@ -13,76 +15,76 @@ definitions: api_token: "{{ config['api_key'] }}" retriever: record_selector: - $ref: "*ref(definitions.selector)" + $ref: "#/definitions/selector" paginator: type: NoPagination requester: - $ref: "*ref(definitions.requester)" + $ref: "#/definitions/requester" base_stream: retriever: - $ref: "*ref(definitions.retriever)" + $ref: "#/definitions/retriever" projects_stream: - $ref: "*ref(definitions.base_stream)" - $options: + $ref: "#/definitions/base_stream" + $parameters: name: "projects" primary_key: "id" path: "/projects" tasks_stream: - $options: + $parameters: name: "tasks" primary_key: "id" retriever: - $ref: "*ref(definitions.retriever)" + $ref: "#/definitions/retriever" requester: - $ref: "*ref(definitions.requester)" + $ref: "#/definitions/requester" path: "projects/{{ stream_slice.parent_id }}/tasks" - stream_slicer: - type: SubstreamSlicer + partition_router: + type: SubstreamPartitionRouter parent_stream_configs: - - stream: "*ref(definitions.projects_stream)" + - stream: "#/definitions/projects_stream" parent_key: "id" - stream_slice_field: "parent_id" + partition_field: "parent_id" time_records_stream: - $options: + $parameters: name: "time_records" primary_key: "id" retriever: - $ref: "*ref(definitions.retriever)" + $ref: "#/definitions/retriever" requester: - $ref: "*ref(definitions.requester)" + $ref: "#/definitions/requester" path: "projects/{{ stream_slice.parent_id }}/time" - stream_slicer: - type: SubstreamSlicer + partition_router: + type: SubstreamPartitionRouter parent_stream_configs: - - stream: "*ref(definitions.projects_stream)" + - stream: "#/definitions/projects_stream" parent_key: "id" - stream_slice_field: "parent_id" + partition_field: "parent_id" clients_stream: - $ref: "*ref(definitions.base_stream)" - $options: + $ref: "#/definitions/base_stream" + $parameters: name: "clients" primary_key: "id" path: "/clients" time_stream: - $ref: "*ref(definitions.base_stream)" - $options: + $ref: "#/definitions/base_stream" + $parameters: name: "time" primary_key: "id" path: "/team/time" users_stream: - $ref: "*ref(definitions.base_stream)" - $options: + $ref: "#/definitions/base_stream" + $parameters: name: "users" primary_key: "id" path: "/team/users" streams: - - "*ref(definitions.projects_stream)" - - "*ref(definitions.clients_stream)" - - "*ref(definitions.time_stream)" - - "*ref(definitions.users_stream)" - - "*ref(definitions.tasks_stream)" - - "*ref(definitions.time_records_stream)" + - "#/definitions/projects_stream" + - "#/definitions/clients_stream" + - "#/definitions/time_stream" + - "#/definitions/users_stream" + - "#/definitions/tasks_stream" + - "#/definitions/time_records_stream" check: stream_names: diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json index c1df86283ad7..e905f0138d7c 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/clients.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "projects": { "type": ["null", "array"], diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json index 02dd6df981f9..c34b10ae2e85 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/projects.json @@ -1,13 +1,14 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "canSyncTasks": { "type": ["null", "boolean"] }, "users": { "type": ["null", "array"], - "items": { "type": "string" } + "items": { "type": "integer" } }, "id": { "type": ["null", "string"] diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json index 735e31f44e6b..2d74aaf95067 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/tasks.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "id": { "type": "string" @@ -41,8 +42,7 @@ "type": "integer" }, "users": { - "type": "array", - "items": {"type": "string"} + "type": ["null", "object"] }, "timerTime": { "type": "integer" diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json index 766256919b8a..4dff2f42bb8f 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "id": { "type": ["null", "integer"] @@ -79,7 +80,10 @@ }, "history": { "type": ["null", "array"], - "items": { "type": "string" } + "items": { + "type": ["null", "object"], + "additionalProperties": true + } }, "lockReasons": { "type": ["null", "array"], diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json index fc47ac76d52e..231f10a75164 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/time_records.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "id": { "type": ["null", "integer"] diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json index 4d724e2319df..b078ec8c169a 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/schemas/users.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", + "additionalProperties": true, "properties": { "isEmailVerified": { "type": ["null", "boolean"] @@ -81,7 +82,7 @@ }, "costHistory": { "type": ["null", "array"], - "items": { "type": "string" } + "items": { "type": "object" } }, "rate": { "type": ["null", "integer"] diff --git a/airbyte-integrations/connectors/source-everhour/source_everhour/source.py b/airbyte-integrations/connectors/source-everhour/source_everhour/source.py index 739966a0ed83..6a3e77d5abe3 100644 --- a/airbyte-integrations/connectors/source-everhour/source_everhour/source.py +++ b/airbyte-integrations/connectors/source-everhour/source_everhour/source.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Airbyte, Inc., all rights reserved. +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource From 9513c750703c5fa944225b52ffe42a91a579683f Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Thu, 23 Mar 2023 19:11:50 +0000 Subject: [PATCH 14/14] auto-bump connector version --- .../src/main/resources/seed/source_specs.yaml | 19 +++++++++++++++++++ connectors.md | 1 + 2 files changed, 20 insertions(+) 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 cca5cc592a01..ad8dd71805a7 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -3789,6 +3789,25 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] +- dockerImage: "airbyte/source-everhour:0.1.0" + spec: + documentationUrl: "https://docs.airbyte.io/integrations/sources/everhour" + connectionSpecification: + title: "Everhour Spec" + type: "object" + required: + - "api_key" + additionalProperties: true + properties: + api_key: + type: "string" + title: "API Key" + description: "Everhour API Key. See the docs for information on how to generate this key." + airbyte_secret: true + supportsNormalization: false + supportsDBT: false + supported_destination_sync_modes: [] - dockerImage: "airbyte/source-facebook-marketing:0.3.0" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/facebook-marketing" diff --git a/connectors.md b/connectors.md index c33daf44d90d..689f0e3b4173 100644 --- a/connectors.md +++ b/connectors.md @@ -66,6 +66,7 @@ | **E2E Testing** | E2E Testing icon | Source | airbyte/source-e2e-test:2.1.4 | alpha | [link](https://docs.airbyte.com/integrations/sources/e2e-test) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-e2e-test) | `d53f9084-fa6b-4a5a-976c-5b8392f4ad8a` | | **Elasticsearch** | Elasticsearch icon | Source | airbyte/source-elasticsearch:0.1.1 | alpha | [link](https://docs.airbyte.com/integrations/sources/elasticsearch) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-elasticsearch) | `7cf88806-25f5-4e1a-b422-b2fa9e1b0090` | | **EmailOctopus** | EmailOctopus icon | Source | airbyte/source-emailoctopus:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/emailoctopus) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-emailoctopus) | `46b25e70-c980-4590-a811-8deaf50ee09f` | +| **Everhour** | Everhour icon | Source | airbyte/source-everhour:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/everhour) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-everhour) | `6babfc42-c734-4ef6-a817-6eca15f0f9b7` | | **Exchange Rates Api** | Exchange Rates Api icon | Source | airbyte/source-exchange-rates:1.2.8 | alpha | [link](https://docs.airbyte.com/integrations/sources/exchangeratesapi) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-exchange-rates) | `e2b40e36-aa0e-4bed-b41b-bcea6fa348b1` | | **Facebook Marketing** | Facebook Marketing icon | Source | airbyte/source-facebook-marketing:0.3.0 | generally_available | [link](https://docs.airbyte.com/integrations/sources/facebook-marketing) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-facebook-marketing) | `e7778cfc-e97c-4458-9ecb-b4f2bba8946c` | | **Facebook Pages** | Facebook Pages icon | Source | airbyte/source-facebook-pages:0.2.3 | beta | [link](https://docs.airbyte.com/integrations/sources/facebook-pages) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-facebook-pages) | `010eb12f-837b-4685-892d-0a39f76a98f5` |