From afb7ae5fb0afb4d5ada5049b662ce8f4f4c03bae Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 9 Feb 2023 14:06:57 +0100 Subject: [PATCH 1/3] AHA.IO new fields --- .../integration_tests/configured_catalog.json | 19 +++- .../source-aha/source_aha/manifest.yaml | 88 ++++++++------- .../source_aha/schemas/idea_categories.json | 18 +++ .../source_aha/schemas/idea_comments.json | 104 ++++++++++++++++++ .../source_aha/schemas/idea_endorsements.json | 81 ++++++++++++++ 5 files changed, 268 insertions(+), 42 deletions(-) create mode 100644 airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json create mode 100644 airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json create mode 100644 airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json diff --git a/airbyte-integrations/connectors/source-aha/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-aha/integration_tests/configured_catalog.json index 5e433039fa1de..537d6e74565b5 100644 --- a/airbyte-integrations/connectors/source-aha/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-aha/integration_tests/configured_catalog.json @@ -2,7 +2,7 @@ "streams": [ { "stream": { - "name": "features", + "name": "products", "json_schema": {}, "supported_sync_modes": ["full_refresh"] }, @@ -11,7 +11,7 @@ }, { "stream": { - "name": "products", + "name": "ideas", "json_schema": {}, "supported_sync_modes": ["full_refresh"] }, @@ -20,7 +20,7 @@ }, { "stream": { - "name": "ideas", + "name": "users", "json_schema": {}, "supported_sync_modes": ["full_refresh"] }, @@ -29,7 +29,16 @@ }, { "stream": { - "name": "users", + "name": "idea_categories", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "idea_endorsements", "json_schema": {}, "supported_sync_modes": ["full_refresh"] }, @@ -38,7 +47,7 @@ }, { "stream": { - "name": "goals", + "name": "idea_comments", "json_schema": {}, "supported_sync_modes": ["full_refresh"] }, diff --git a/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml b/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml index 854788c2a54cd..cdd964ba35c0f 100644 --- a/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml +++ b/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml @@ -1,24 +1,9 @@ -version: "0.1.0" +version: "0.1.1" definitions: selector: extractor: - field_path: [] - selector_features: - extractor: - field_path: ["features"] - selector_products: - extractor: - field_path: ["products"] - selector_ideas: - extractor: - field_path: ["ideas"] - selector_users: - extractor: - field_path: ["users"] - selector_goals: - extractor: - field_path: ["goals"] + field_path: ["{{ parameters['name'] }}"] requester: url_base: "{{ config['url'] }}/api/v1" http_method: "GET" @@ -49,46 +34,71 @@ definitions: $ref: "#/definitions/retriever" features_stream: $ref: "#/definitions/base_stream" - retriever: - $ref: "#/definitions/retriever" - record_selector: - $ref: "#/definitions/selector_features" $parameters: name: "features" path: "/features" products_stream: $ref: "#/definitions/base_stream" - retriever: - $ref: "#/definitions/retriever" - record_selector: - $ref: "#/definitions/selector_products" $parameters: name: "products" path: "/products" - ideas_stream: + idea_categories_stream: $ref: "#/definitions/base_stream" + $parameters: + name: "idea_categories" retriever: $ref: "#/definitions/retriever" - record_selector: - $ref: "#/definitions/selector_ideas" + requester: + $ref: "#/definitions/requester" + path: "/products/{{ stream_slice.id }}/idea_categories" + partition_router: + type: "SubstreamPartitionRouter" + parent_stream_configs: + - stream: "#/definitions/products_stream" + parent_key: "id" + partition_field: "id" + ideas_stream: + $ref: "#/definitions/base_stream" $parameters: name: "ideas" path: "/ideas" - users_stream: + idea_endorsements_stream: $ref: "#/definitions/base_stream" + $parameters: + name: "idea_endorsements" retriever: $ref: "#/definitions/retriever" - record_selector: - $ref: "#/definitions/selector_users" + requester: + $ref: "#/definitions/requester" + path: "/ideas/{{ stream_slice.id }}/endorsements" + partition_router: + type: "SubstreamPartitionRouter" + parent_stream_configs: + - stream: "#/definitions/ideas_stream" + parent_key: "id" + partition_field: "id" + idea_comments_stream: + $ref: "#/definitions/base_stream" + $parameters: + name: "idea_comments" + retriever: + $ref: "#/definitions/retriever" + requester: + $ref: "#/definitions/requester" + path: "/ideas/{{ stream_slice.id }}/idea_comments" + partition_router: + type: "SubstreamPartitionRouter" + parent_stream_configs: + - stream: "#/definitions/ideas_stream" + parent_key: "id" + partition_field: "id" + users_stream: + $ref: "#/definitions/base_stream" $parameters: name: "users" path: "/users" goals_stream: $ref: "#/definitions/base_stream" - retriever: - $ref: "#/definitions/retriever" - record_selector: - $ref: "#/definitions/selector_goals" $parameters: name: "goals" path: "/goals" @@ -99,11 +109,15 @@ streams: - "#/definitions/ideas_stream" - "#/definitions/users_stream" - "#/definitions/goals_stream" + - "#/definitions/idea_categories_stream" + - "#/definitions/idea_endorsements_stream" + - "#/definitions/idea_comments_stream" check: stream_names: - - "features" - "products" - "ideas" - "users" - - "goals" + - "idea_categories" + - "idea_endorsements" + - "idea_comments" diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json new file mode 100644 index 0000000000000..4456a73e32178 --- /dev/null +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "id": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "parent_id": { + "type": ["null", "integer"] + }, + "created_at": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json new file mode 100644 index 0000000000000..bad520d658a83 --- /dev/null +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json @@ -0,0 +1,104 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "id": { + "type": ["null", "string"] + }, + "idea_id": { + "type": ["null", "string"] + }, + "body": { + "type": ["null", "string"] + }, + "created_at": { + "type": ["null", "string"] + }, + "idea_comment_user": { + "type" : "object", + "properties" : { + "id": { + "type": ["null", "string"] + }, + "name_id": { + "type": ["null", "string"] + }, + "email": { + "type": ["null", "string"] + }, + "created_at": { + "type": ["null", "string"] + }, + "updated_at": { + "type": ["null", "string"] + } + } + }, + "idea": { + "type" : "object", + "properties" : { + "id": { + "type": ["null", "string"] + }, + "reference_num": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "created_at": { + "type": ["null", "string"] + }, + "updated_at": { + "type": ["null", "string"] + }, + "workflow_status": { + "type" : "object", + "properties" : { + "id": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "position": { + "type": ["null", "integer"] + }, + "complete": { + "type": ["null", "boolean"] + }, + "color": { + "type": ["null", "string"] + } + } + }, + "description": { + "type" : "object", + "properties" : { + "id": { + "type": ["null", "string"] + }, + "body": { + "type": ["null", "string"] + }, + "created_at": { + "type": ["null", "string"] + }, + "attachments": { + "type": ["null", "array"] + } + }, + "url": { + "type": ["null", "string"] + }, + "resource": { + "type": ["null", "string"] + } + } + }, + "attachments": { + "type": ["null", "array"] + } + } + } +} diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json new file mode 100644 index 0000000000000..38f762797fb2b --- /dev/null +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json @@ -0,0 +1,81 @@ +{ + "$schema" : "http://json-schema.org/draft-07/schema#", + "type" : "object", + "properties" : { + "id" : { + "type" : ["null", "string"] + }, + "idea_id" : { + "type" : ["null", "string"] + }, + "created_at" : { + "type" : ["null", "string"] + }, + "updated_at" : { + "type" : ["null", "string"] + }, + "value" : { + "type" : ["null", "string"] + }, + "link" : { + "type" : ["null", "string"] + }, + "weight" : { + "type" : ["null", "integer"] + }, + "endorsed_by_portal_user" : { + "type" : "object", + "properties" : { + "id" : { + "type" : ["null", "string"] + }, + "name" : { + "type" : ["null", "string"] + }, + "email" : { + "type" : ["null", "string"] + }, + "created_at" : { + "type" : ["null", "string"] + } + } + }, + "endorsed_by_idea_user" : { + "type" : "object", + "properties" : { + "id" : { + "type" : ["null", "string"] + }, + "name" : { + "type" : ["null", "string"] + }, + "email" : { + "type" : ["null", "string"] + }, + "created_at" : { + "type" : ["null", "string"] + } + } + }, + "endorsed_by_idea_organization" : { + "type" : "object", + "properties" : { + "id" : { + "type" : ["null", "string"] + }, + "name" : { + "type" : ["null", "string"] + }, + "created_at" : { + "type" : ["null", "string"] + }, + "url" : { + "type" : ["null", "string"] + }, + "resource" : { + "type" : ["null", "string"] + } + } + } + } +} From 0e7e50e5c1236287565d0c7950e0b2289117636d Mon Sep 17 00:00:00 2001 From: Mal Hancock Date: Tue, 30 May 2023 14:11:01 -0700 Subject: [PATCH 2/3] fix schemas --- .../source_aha/schemas/idea_categories.json | 2 +- .../source_aha/schemas/idea_comments.json | 11 +++++++++- .../source_aha/schemas/idea_endorsements.json | 20 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json index 4456a73e32178..97caddd6de6a5 100644 --- a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_categories.json @@ -9,7 +9,7 @@ "type": ["null", "string"] }, "parent_id": { - "type": ["null", "integer"] + "type": ["null", "string"] }, "created_at": { "type": ["null", "string"] diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json index bad520d658a83..e28a9c8935d09 100644 --- a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json @@ -14,7 +14,13 @@ "created_at": { "type": ["null", "string"] }, - "idea_comment_user": { + "visibility": { + "type": ["null", "string"] + }, + "parent_idea_comment_id": { + "type": ["null", "string"] + }, + "idea_commenter_user": { "type" : "object", "properties" : { "id": { @@ -99,6 +105,9 @@ "attachments": { "type": ["null", "array"] } + }, + "attachments": { + "type": ["null", "array"] } } } diff --git a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json index 38f762797fb2b..bb1b210f18665 100644 --- a/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json @@ -76,6 +76,26 @@ "type" : ["null", "string"] } } + }, + "endorsed_by_user": { + "type": "object", + "properties": { + "id" : { + "type" : ["null", "string"] + }, + "name" : { + "type" : ["null", "string"] + }, + "email" : { + "type" : ["null", "string"] + }, + "created_at" : { + "type" : ["null", "string"] + }, + "updated_at": { + "type": ["null", "string"] + } + } } } } From 6b2e5b9b4015c4ddd3e92850623a73c61673e3b3 Mon Sep 17 00:00:00 2001 From: Mal Hancock Date: Tue, 30 May 2023 14:37:45 -0700 Subject: [PATCH 3/3] bump version --- airbyte-integrations/connectors/source-aha/Dockerfile | 2 +- airbyte-integrations/connectors/source-aha/metadata.yaml | 2 +- docs/integrations/sources/aha.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-aha/Dockerfile b/airbyte-integrations/connectors/source-aha/Dockerfile index c63d854c31429..8620e0d110006 100644 --- a/airbyte-integrations/connectors/source-aha/Dockerfile +++ b/airbyte-integrations/connectors/source-aha/Dockerfile @@ -34,5 +34,5 @@ COPY source_aha ./source_aha ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.0 +LABEL io.airbyte.version=0.3.0 LABEL io.airbyte.name=airbyte/source-aha diff --git a/airbyte-integrations/connectors/source-aha/metadata.yaml b/airbyte-integrations/connectors/source-aha/metadata.yaml index 9d59fa5c97789..fcc246842a9a8 100644 --- a/airbyte-integrations/connectors/source-aha/metadata.yaml +++ b/airbyte-integrations/connectors/source-aha/metadata.yaml @@ -2,7 +2,7 @@ data: connectorSubtype: api connectorType: source definitionId: 81ca39dc-4534-4dd2-b848-b0cfd2c11fce - dockerImageTag: 0.2.0 + dockerImageTag: 0.3.0 dockerRepository: airbyte/source-aha githubIssueLabel: source-aha icon: aha.svg diff --git a/docs/integrations/sources/aha.md b/docs/integrations/sources/aha.md index 205f37c982136..7535cf0ab3111 100644 --- a/docs/integrations/sources/aha.md +++ b/docs/integrations/sources/aha.md @@ -37,5 +37,6 @@ Rate Limiting information is updated [here](https://www.aha.io/api#rate-limiting | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:------------------------------------------------| +| 0.3.0 | 2023-05-30 | [22642](https://github.com/airbytehq/airbyte/pull/22642) | Add `idea_comments`, `idea_endorsements`, and `idea_categories` streams | | 0.2.0 | 2023-05-26 | [26666](https://github.com/airbytehq/airbyte/pull/26666) | Fix integration test and schemas | -| 0.1.0 | 2022-11-02 | [18883](https://github.com/airbytehq/airbyte/pull/18893) | 🎉 New Source: Aha | \ No newline at end of file +| 0.1.0 | 2022-11-02 | [18883](https://github.com/airbytehq/airbyte/pull/18893) | 🎉 New Source: Aha |