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/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/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/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml b/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml index 886861a57d536..a21717e4cc13b 100644 --- a/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml +++ b/airbyte-integrations/connectors/source-aha/source_aha/manifest.yaml @@ -3,22 +3,7 @@ version: "0.29.0" 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,6 +109,9 @@ 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: 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..97caddd6de6a5 --- /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", "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 new file mode 100644 index 0000000000000..e28a9c8935d09 --- /dev/null +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_comments.json @@ -0,0 +1,113 @@ +{ + "$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"] + }, + "visibility": { + "type": ["null", "string"] + }, + "parent_idea_comment_id": { + "type": ["null", "string"] + }, + "idea_commenter_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"] + } + }, + "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..bb1b210f18665 --- /dev/null +++ b/airbyte-integrations/connectors/source-aha/source_aha/schemas/idea_endorsements.json @@ -0,0 +1,101 @@ +{ + "$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"] + } + } + }, + "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"] + } + } + } + } +} 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 |