From c99335ff8baf7642dbe06595308455b0206f7ef3 Mon Sep 17 00:00:00 2001 From: Hai To Date: Tue, 16 Nov 2021 00:18:12 +0100 Subject: [PATCH] Include requester and stats fields in tickets stream (#7486) * Include requester and stats in tickets stream * Update documentation, rebase to lastest master state and bump version * run format * format files * correct other file * correct files Co-authored-by: Marcos Marx --- .../ec4b9503-13cb-48ab-a4ab-6ade4be46567.json | 2 +- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- .../init/src/main/resources/seed/source_specs.yaml | 2 +- .../connectors/source-freshdesk/CHANGELOG.md | 3 +++ airbyte-integrations/connectors/source-freshdesk/Dockerfile | 2 +- .../source-freshdesk/sample_files/configured_catalog.json | 6 ++++++ .../connectors/source-freshdesk/source_freshdesk/api.py | 3 ++- .../source-freshdesk/source_freshdesk/schemas/tickets.json | 6 ++++++ docs/integrations/sources/freshdesk.md | 1 + 9 files changed, 22 insertions(+), 5 deletions(-) diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json index b58513a5abcf..e79b48be69e0 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/ec4b9503-13cb-48ab-a4ab-6ade4be46567.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "ec4b9503-13cb-48ab-a4ab-6ade4be46567", "name": "Freshdesk", "dockerRepository": "airbyte/source-freshdesk", - "dockerImageTag": "0.2.7", + "dockerImageTag": "0.2.8", "documentationUrl": "https://docs.airbyte.io/integrations/sources/freshdesk", "icon": "freshdesk.svg" } 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 848418e1dfff..1550055efb21 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -158,7 +158,7 @@ - name: Freshdesk sourceDefinitionId: ec4b9503-13cb-48ab-a4ab-6ade4be46567 dockerRepository: airbyte/source-freshdesk - dockerImageTag: 0.2.7 + dockerImageTag: 0.2.8 documentationUrl: https://docs.airbyte.io/integrations/sources/freshdesk icon: freshdesk.svg sourceType: api 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 2a3913aa4e84..60cdfb7046c8 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -1507,7 +1507,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-freshdesk:0.2.7" +- dockerImage: "airbyte/source-freshdesk:0.2.8" spec: documentationUrl: "https://docs.airbyte.io/integrations/sources/freshdesk" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-freshdesk/CHANGELOG.md b/airbyte-integrations/connectors/source-freshdesk/CHANGELOG.md index 56afe5e9c941..5b2bc611b712 100644 --- a/airbyte-integrations/connectors/source-freshdesk/CHANGELOG.md +++ b/airbyte-integrations/connectors/source-freshdesk/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.2.8 +Include `requester` and `stats` fields in `tickets` stream + ## 0.2.7 Add start_date parameter to specification from which to start pulling data. diff --git a/airbyte-integrations/connectors/source-freshdesk/Dockerfile b/airbyte-integrations/connectors/source-freshdesk/Dockerfile index f4822e7c6622..5765f86e1e7e 100644 --- a/airbyte-integrations/connectors/source-freshdesk/Dockerfile +++ b/airbyte-integrations/connectors/source-freshdesk/Dockerfile @@ -14,5 +14,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" -LABEL io.airbyte.version=0.2.7 +LABEL io.airbyte.version=0.2.8 LABEL io.airbyte.name=airbyte/source-freshdesk diff --git a/airbyte-integrations/connectors/source-freshdesk/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-freshdesk/sample_files/configured_catalog.json index 6b3d9084958d..959d3cc5ab5d 100644 --- a/airbyte-integrations/connectors/source-freshdesk/sample_files/configured_catalog.json +++ b/airbyte-integrations/connectors/source-freshdesk/sample_files/configured_catalog.json @@ -647,6 +647,12 @@ }, "description_text": { "type": "string" + }, + "requester": { + "type": "object" + }, + "stats": { + "type": "object" } } }, diff --git a/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/api.py b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/api.py index 0c0f5fae90b5..1b29f414e499 100644 --- a/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/api.py +++ b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/api.py @@ -264,7 +264,8 @@ class TicketsAPI(IncrementalStreamAPI): def list(self, fields: Sequence[str] = None) -> Iterator[dict]: """Iterate over entities""" - params = {"include": "description"} + includes = ["description", "requester", "stats"] + params = {"include": ",".join(includes)} yield from self.read(partial(self._api_get, url="tickets"), params=params) @staticmethod diff --git a/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/schemas/tickets.json b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/schemas/tickets.json index a338b796e81d..c23283526765 100644 --- a/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/schemas/tickets.json +++ b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/schemas/tickets.json @@ -100,6 +100,12 @@ }, "description_text": { "type": "string" + }, + "requester": { + "type": "object" + }, + "stats": { + "type": "object" } } } diff --git a/docs/integrations/sources/freshdesk.md b/docs/integrations/sources/freshdesk.md index 555bb133c829..4a003ede7d23 100644 --- a/docs/integrations/sources/freshdesk.md +++ b/docs/integrations/sources/freshdesk.md @@ -53,5 +53,6 @@ Please read [How to find your API key](https://support.freshdesk.com/support/sol | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| 0.2.8 | 2021-10-28 | [7486](https://github.com/airbytehq/airbyte/pull/7486) | Include "requester" and "stats" fields in "tickets" stream | | 0.2.7 | 2021-10-13 | [6442](https://github.com/airbytehq/airbyte/pull/6442) | Add start_date parameter to specification from which to start pulling data. |