Skip to content

Commit

Permalink
Source Zendesk Support: Convert ticket_audits.previous_value values…
Browse files Browse the repository at this point in the history
… to string (#15036)

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr committed Jul 27, 2022
1 parent a93ea5c commit ead062c
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@
- name: Zendesk Support
sourceDefinitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
dockerRepository: airbyte/source-zendesk-support
dockerImageTag: 0.2.13
dockerImageTag: 0.2.14
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-support
icon: zendesk.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10298,7 +10298,7 @@
path_in_connector_config:
- "credentials"
- "client_secret"
- dockerImage: "airbyte/source-zendesk-support:0.2.13"
- dockerImage: "airbyte/source-zendesk-support:0.2.14"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/zendesk-support"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ COPY source_zendesk_support ./source_zendesk_support
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.13
LABEL io.airbyte.version=0.2.14
LABEL io.airbyte.name=airbyte/source-zendesk-support
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"organization_fields": {
"type": ["null", "object"],
"properties": {},
"additionalProperties": true
},
"notes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"type": ["null", "object"],
"properties": {
"custom": {
"type": ["null", "object"]
"type": ["null", "object"],
"properties": {},
"additionalProperties": true
},
"trusted": {
"type": ["null", "boolean"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,20 @@
"type": ["null", "integer"]
},
"value": {
"type": ["null", "string", "array"],
"items": {
"type": ["null", "string"]
}
"oneOf": [
{
"type": "array",
"items": {
"type": ["null", "string"]
}
},
{
"type": "string"
},
{
"type": "null"
}
]
},
"author_id": {
"type": ["null", "integer"]
Expand Down Expand Up @@ -260,7 +270,9 @@
"type": ["null", "object"],
"properties": {
"custom": {
"type": ["null", "object"]
"type": ["null", "object"],
"properties": {},
"additionalProperties": true
},
"trusted": {
"type": ["null", "boolean"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
},
"user_fields": {
"type": ["null", "object"],
"properties": {},
"additionalProperties": true
},
"last_login_at": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ class TicketAudits(SourceZendeskSupportCursorPaginationStream):
# Root of response is 'audits'. As rule as an endpoint name is equal a response list name
response_list_name = "audits"

transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)

# This endpoint uses a variant of cursor pagination with some differences from cursor pagination used in other endpoints.
def request_params(self, next_page_token: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:
params = {"sort_by": self.cursor_field, "sort_order": "desc", "limit": self.page_size}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_token_authenticator():
# we expect base64 from creds input
expected = "dGVzdEBhaXJieXRlLmlvL3Rva2VuOmFwaV90b2tlbg=="
result = BasicApiTokenAuthenticator("test@airbyte.io", "api_token")
assert result._tokens[0] == expected
assert result._token == expected


@pytest.mark.parametrize(
Expand All @@ -113,7 +113,7 @@ def test_convert_config2stream_args(config):
def test_get_authenticator(config, expected):
# we expect base64 from creds input
result = SourceZendeskSupport().get_authenticator(config=config)
assert result._tokens[0] == expected
assert result._token == expected


@pytest.mark.parametrize(
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/zendesk-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The Zendesk connector ideally should not run into Zendesk API limitations under

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `0.2.14` | 2022-07-27 | [15036](https://github.com/airbytehq/airbyte/pull/15036) | Convert `ticket_audits.previous_value` values to string |
| `0.2.13` | 2022-07-21 | [14829](https://github.com/airbytehq/airbyte/pull/14829) | Convert `tickets.custom_fields` values to string |
| `0.2.12` | 2022-06-30 | [14304](https://github.com/airbytehq/airbyte/pull/14304) | Fixed Pagination for Group Membership stream |
| `0.2.11` | 2022-06-24 | [14112](https://github.com/airbytehq/airbyte/pull/14112) | Fixed "Retry-After" non integer value |
Expand Down

0 comments on commit ead062c

Please sign in to comment.