Skip to content

Commit

Permalink
🐛 Source Zendesk Chat: fix CI problem + corrected public docs (#15879)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov authored Aug 23, 2022
1 parent 3aefd33 commit 9967af9
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@
- name: Zendesk Chat
sourceDefinitionId: 40d24d0f-b8f9-4fe0-9e6c-b06c0f3f45e4
dockerRepository: airbyte/source-zendesk-chat
dockerImageTag: 0.1.8
dockerImageTag: 0.1.9
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-chat
icon: zendesk.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10594,7 +10594,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-zendesk-chat:0.1.8"
- dockerImage: "airbyte/source-zendesk-chat:0.1.9"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/zendesk-chat"
connectionSpecification:
Expand Down Expand Up @@ -10680,15 +10680,13 @@
oauth_config_specification:
oauth_user_input_from_connector_config_specification:
type: "object"
additionalProperties: false
properties:
subdomain:
type: "string"
path_in_connector_config:
- "subdomain"
complete_oauth_output_specification:
type: "object"
additionalProperties: false
properties:
access_token:
type: "string"
Expand All @@ -10702,15 +10700,13 @@
- "refresh_token"
complete_oauth_server_input_specification:
type: "object"
additionalProperties: false
properties:
client_id:
type: "string"
client_secret:
type: "string"
complete_oauth_server_output_specification:
type: "object"
additionalProperties: false
properties:
client_id:
type: "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ RUN pip install .

ENTRYPOINT ["python", "/airbyte/integration_code/main_dev.py"]

LABEL io.airbyte.version=0.1.8
LABEL io.airbyte.version=0.1.9
LABEL io.airbyte.name=airbyte/source-zendesk-chat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"requests==2.25.1",
]

TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock"]
TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock", "requests_mock"]

setup(
name="source_zendesk_chat",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
},
"type": ["null", "object"],
"additionalProperties": false
"additionalProperties": true
},
"department_id": {
"type": ["null", "integer"]
Expand Down Expand Up @@ -204,7 +204,7 @@
}
},
"type": ["null", "object"],
"additionalProperties": false
"additionalProperties": true
},
"session": {
"properties": {
Expand Down Expand Up @@ -293,7 +293,7 @@
}
},
"type": ["null", "object"],
"additionalProperties": false
"additionalProperties": true
},
"webpath": {
"items": {
Expand All @@ -313,7 +313,7 @@
}
},
"type": ["null", "object"],
"additionalProperties": false
"additionalProperties": true
},
"type": ["null", "array"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
"oauth_config_specification": {
"complete_oauth_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string",
Expand All @@ -103,7 +102,6 @@
},
"complete_oauth_server_input_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string"
Expand All @@ -115,7 +113,6 @@
},
"complete_oauth_server_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string",
Expand All @@ -129,7 +126,6 @@
},
"oauth_user_input_from_connector_config_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"subdomain": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Stream(HttpStream, ABC):
url_base = "https://www.zopim.com/api/v2/"
primary_key = "id"

primary_key = None
data_field = None

limit = 100
Expand Down Expand Up @@ -104,6 +103,7 @@ def _field_to_datetime(value: Union[int, str]) -> pendulum.datetime:


class TimeIncrementalStream(BaseIncrementalStream, ABC):

state_checkpoint_interval = 1000

def __init__(self, start_date, **kwargs):
Expand Down Expand Up @@ -185,6 +185,7 @@ class AgentTimelines(TimeIncrementalStream):
Agent Timelines Stream: https://developer.zendesk.com/rest_api/docs/chat/incremental_export#incremental-agent-timeline-export
"""

primary_key = None
cursor_field = "start_time"
data_field = "agent_timeline"
name = "agent_timeline"
Expand Down
14 changes: 10 additions & 4 deletions docs/integrations/sources/zendesk-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

This page contains the setup guide and reference information for the Zendesk Chat source connector.

## Prerequisites

- Zendesk Account with permission to access data from accounts you want to sync
- Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth). We recommend creating a restricted, read-only key specifically for Airbyte access. This will allow you to control which resources Airbyte should be able to access.

## Setup guide
### Step 1: Set up Zendesk Chat
### Airbyte Open Source additional setup steps
>Generate an Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth)
We recommend creating a restricted, read-only key specifically for Airbyte access. This will allow you to control which resources Airbyte should be able to access.

## Step 1: Set up Zendesk Chat

Generate an Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth)


## Step 2: Set up the Zendesk Chat connector in Airbyte
Expand Down Expand Up @@ -73,6 +78,7 @@ The connector is restricted by normal Zendesk [requests limitation](https://deve

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- |
| 0.1.9 | 2022-08-23 | [15879](https://github.com/airbytehq/airbyte/pull/15879) | Corrected specification and stream schemas to support backward capability |
| 0.1.8 | 2022-06-28 | [13387](https://github.com/airbytehq/airbyte/pull/13387) | Add state checkpoint to allow long runs |
| 0.1.7 | 2022-05-25 | [12883](https://github.com/airbytehq/airbyte/pull/12883) | Pass timeout in request to prevent a stuck connection |
| 0.1.6 | 2021-12-15 | [7313](https://github.com/airbytehq/airbyte/pull/7313) | Add support of `OAuth 2.0` authentication. Fixed the issue with `created_at` can now be `null` for `bans` stream |
Expand Down

0 comments on commit 9967af9

Please sign in to comment.