Skip to content

Commit ead062c

Browse files
authored
Source Zendesk Support: Convert ticket_audits.previous_value values to string (#15036)
Signed-off-by: Sergey Chvalyuk <[email protected]>
1 parent a93ea5c commit ead062c

File tree

10 files changed

+30
-11
lines changed

10 files changed

+30
-11
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@
10651065
- name: Zendesk Support
10661066
sourceDefinitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
10671067
dockerRepository: airbyte/source-zendesk-support
1068-
dockerImageTag: 0.2.13
1068+
dockerImageTag: 0.2.14
10691069
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-support
10701070
icon: zendesk.svg
10711071
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10298,7 +10298,7 @@
1029810298
path_in_connector_config:
1029910299
- "credentials"
1030010300
- "client_secret"
10301-
- dockerImage: "airbyte/source-zendesk-support:0.2.13"
10301+
- dockerImage: "airbyte/source-zendesk-support:0.2.14"
1030210302
spec:
1030310303
documentationUrl: "https://docs.airbyte.io/integrations/sources/zendesk-support"
1030410304
connectionSpecification:

airbyte-integrations/connectors/source-zendesk-support/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ COPY source_zendesk_support ./source_zendesk_support
2525
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
2626
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
2727

28-
LABEL io.airbyte.version=0.2.13
28+
LABEL io.airbyte.version=0.2.14
2929
LABEL io.airbyte.name=airbyte/source-zendesk-support

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/schemas/organizations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"organization_fields": {
2121
"type": ["null", "object"],
22+
"properties": {},
2223
"additionalProperties": true
2324
},
2425
"notes": {

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/schemas/shared/metadata.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"type": ["null", "object"],
33
"properties": {
44
"custom": {
5-
"type": ["null", "object"]
5+
"type": ["null", "object"],
6+
"properties": {},
7+
"additionalProperties": true
68
},
79
"trusted": {
810
"type": ["null", "boolean"]

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/schemas/ticket_audits.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,20 @@
144144
"type": ["null", "integer"]
145145
},
146146
"value": {
147-
"type": ["null", "string", "array"],
148-
"items": {
149-
"type": ["null", "string"]
150-
}
147+
"oneOf": [
148+
{
149+
"type": "array",
150+
"items": {
151+
"type": ["null", "string"]
152+
}
153+
},
154+
{
155+
"type": "string"
156+
},
157+
{
158+
"type": "null"
159+
}
160+
]
151161
},
152162
"author_id": {
153163
"type": ["null", "integer"]
@@ -260,7 +270,9 @@
260270
"type": ["null", "object"],
261271
"properties": {
262272
"custom": {
263-
"type": ["null", "object"]
273+
"type": ["null", "object"],
274+
"properties": {},
275+
"additionalProperties": true
264276
},
265277
"trusted": {
266278
"type": ["null", "boolean"]

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/schemas/users.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
},
151151
"user_fields": {
152152
"type": ["null", "object"],
153+
"properties": {},
153154
"additionalProperties": true
154155
},
155156
"last_login_at": {

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/streams.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ class TicketAudits(SourceZendeskSupportCursorPaginationStream):
583583
# Root of response is 'audits'. As rule as an endpoint name is equal a response list name
584584
response_list_name = "audits"
585585

586+
transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)
587+
586588
# This endpoint uses a variant of cursor pagination with some differences from cursor pagination used in other endpoints.
587589
def request_params(self, next_page_token: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:
588590
params = {"sort_by": self.cursor_field, "sort_order": "desc", "limit": self.page_size}

airbyte-integrations/connectors/source-zendesk-support/unit_tests/unit_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_token_authenticator():
9292
# we expect base64 from creds input
9393
expected = "dGVzdEBhaXJieXRlLmlvL3Rva2VuOmFwaV90b2tlbg=="
9494
result = BasicApiTokenAuthenticator("[email protected]", "api_token")
95-
assert result._tokens[0] == expected
95+
assert result._token == expected
9696

9797

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

118118

119119
@pytest.mark.parametrize(

docs/integrations/sources/zendesk-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ The Zendesk connector ideally should not run into Zendesk API limitations under
6060

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

0 commit comments

Comments
 (0)