🌟 Source Freshservice: add requested_items stream (#34272)
This commit is contained in:
@@ -34,5 +34,5 @@ COPY source_freshservice ./source_freshservice
|
||||
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
|
||||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
|
||||
|
||||
LABEL io.airbyte.version=1.2.0
|
||||
LABEL io.airbyte.version=1.3.0
|
||||
LABEL io.airbyte.name=airbyte/source-freshservice
|
||||
|
||||
@@ -14,26 +14,35 @@
|
||||
},
|
||||
{
|
||||
"stream": {
|
||||
"name": "problems",
|
||||
"name": "requested_items",
|
||||
"json_schema": {},
|
||||
"supported_sync_modes": ["full_refresh", "incremental"],
|
||||
"supported_sync_modes": ["full_refresh"],
|
||||
"source_defined_cursor": true,
|
||||
"default_cursor_field": ["updated_at"],
|
||||
"source_defined_primary_key": [["id"]]
|
||||
},
|
||||
"sync_mode": "incremental",
|
||||
"sync_mode": "full_refresh",
|
||||
"destination_sync_mode": "overwrite"
|
||||
},
|
||||
{
|
||||
"stream": {
|
||||
"name": "problems",
|
||||
"json_schema": {},
|
||||
"supported_sync_modes": ["full_refresh"],
|
||||
"source_defined_cursor": true,
|
||||
"source_defined_primary_key": [["id"]]
|
||||
},
|
||||
"sync_mode": "full_refresh",
|
||||
"destination_sync_mode": "overwrite"
|
||||
},
|
||||
{
|
||||
"stream": {
|
||||
"name": "changes",
|
||||
"json_schema": {},
|
||||
"supported_sync_modes": ["full_refresh", "incremental"],
|
||||
"supported_sync_modes": ["full_refresh"],
|
||||
"source_defined_cursor": true,
|
||||
"default_cursor_field": ["updated_at"],
|
||||
"source_defined_primary_key": [["id"]]
|
||||
},
|
||||
"sync_mode": "incremental",
|
||||
"sync_mode": "full_refresh",
|
||||
"destination_sync_mode": "overwrite"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
data:
|
||||
allowedHosts:
|
||||
hosts:
|
||||
- TODO # Please change to the hostname of the source.
|
||||
- ${domain_name}/api/v2
|
||||
registries:
|
||||
oss:
|
||||
enabled: false
|
||||
enabled: true
|
||||
cloud:
|
||||
enabled: false
|
||||
connectorSubtype: api
|
||||
connectorType: source
|
||||
definitionId: 9bb85338-ea95-4c93-b267-6be89125b267
|
||||
dockerImageTag: 1.2.0
|
||||
dockerImageTag: 1.3.0
|
||||
dockerRepository: airbyte/source-freshservice
|
||||
githubIssueLabel: source-freshservice
|
||||
icon: freshservice.svg
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
MAIN_REQUIREMENTS = [
|
||||
"airbyte-cdk~=0.1",
|
||||
"airbyte-cdk~=0.55.2",
|
||||
]
|
||||
|
||||
TEST_REQUIREMENTS = [
|
||||
"pytest~=6.2",
|
||||
"pytest-mock~=3.6.1",
|
||||
"connector-acceptance-test",
|
||||
]
|
||||
TEST_REQUIREMENTS = ["pytest~=6.2", "pytest-mock~=3.6.1"]
|
||||
|
||||
setup(
|
||||
name="source_freshservice",
|
||||
|
||||
@@ -78,12 +78,33 @@ definitions:
|
||||
parent_key: "id"
|
||||
partition_field: "parent_id"
|
||||
|
||||
requested_items_stream:
|
||||
name: "requested_items"
|
||||
primary_key: "id"
|
||||
$parameters:
|
||||
path_extractor: "requested_items"
|
||||
retriever:
|
||||
$ref: "#/definitions/retriever"
|
||||
requester:
|
||||
$ref: "#/definitions/requester"
|
||||
path: "tickets/{{ stream_slice.parent_id }}/requested_items"
|
||||
error_handler:
|
||||
type: DefaultErrorHandler
|
||||
response_filters:
|
||||
- http_codes: [404]
|
||||
action: IGNORE
|
||||
error_message: No data collected
|
||||
partition_router:
|
||||
type: SubstreamPartitionRouter
|
||||
parent_stream_configs:
|
||||
- stream: "#/definitions/tickets_stream"
|
||||
parent_key: "id"
|
||||
partition_field: "parent_id"
|
||||
|
||||
problems_stream:
|
||||
$ref: "#/definitions/base_stream"
|
||||
name: "problems"
|
||||
primary_key: "id"
|
||||
incremental_sync:
|
||||
$ref: "#/definitions/incremental_base"
|
||||
$parameters:
|
||||
path_extractor: "problems"
|
||||
path: "/problems"
|
||||
@@ -92,8 +113,6 @@ definitions:
|
||||
$ref: "#/definitions/base_stream"
|
||||
name: "changes"
|
||||
primary_key: "id"
|
||||
incremental_sync:
|
||||
$ref: "#/definitions/incremental_base"
|
||||
$parameters:
|
||||
path_extractor: "changes"
|
||||
path: "/changes"
|
||||
@@ -186,6 +205,7 @@ streams:
|
||||
- "#/definitions/assets_stream"
|
||||
- "#/definitions/purchase_orders_stream"
|
||||
- "#/definitions/software_stream"
|
||||
- "#/definitions/requested_items_stream"
|
||||
|
||||
check:
|
||||
type: CheckStream
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
"mobile_phone_number": {
|
||||
"type": ["null", "string"]
|
||||
},
|
||||
"member_of_pending_approval": {
|
||||
"type": ["null", "array"]
|
||||
},
|
||||
"observer_of_pending_approval": {
|
||||
"type": ["null", "array"]
|
||||
},
|
||||
"department_ids": {
|
||||
"type": ["null", "array"]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": ["null", "integer"]
|
||||
},
|
||||
"created_at": {
|
||||
"type": ["null", "string"]
|
||||
},
|
||||
"updated_at": {
|
||||
"type": ["null", "string"]
|
||||
},
|
||||
"quantity": {
|
||||
"type": ["null", "integer"]
|
||||
},
|
||||
"stage": {
|
||||
"type": ["null", "integer"]
|
||||
},
|
||||
"loaned": {
|
||||
"type": ["null", "boolean"]
|
||||
},
|
||||
"cost_per_request": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"remarks": {
|
||||
"type": ["null", "string"]
|
||||
},
|
||||
"delivery_time": {
|
||||
"type": ["null", "number"]
|
||||
},
|
||||
"is_parent": {
|
||||
"type": ["null", "boolean"]
|
||||
},
|
||||
"service_item_id": {
|
||||
"type": ["null", "integer"]
|
||||
},
|
||||
"service_item_name": {
|
||||
"type": ["null", "string"]
|
||||
},
|
||||
"custom_fields": {
|
||||
"type": ["null", "object"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,7 @@ Please read [How to find your API key](https://api.freshservice.com/#authenticat
|
||||
|
||||
| Version | Date | Pull Request | Subject |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 1.3.0 | 2024-01-15 | [29126](https://github.com/airbytehq/airbyte/pull/29126) | Add `Requested Items` stream |
|
||||
| 1.2.0 | 2023-08-06 | [29126](https://github.com/airbytehq/airbyte/pull/29126) | Migrated to Low-Code CDK |
|
||||
| 1.1.0 | 2023-05-09 | [25929](https://github.com/airbytehq/airbyte/pull/25929) | Add stream for customer satisfaction survey responses endpoint |
|
||||
| 1.0.0 | 2023-05-02 | [25743](https://github.com/airbytehq/airbyte/pull/25743) | Correct data types in tickets, agents and requesters schemas to match Freshservice API |
|
||||
|
||||
Reference in New Issue
Block a user