diff --git a/airbyte-integrations/connectors/source-uppromote/README.md b/airbyte-integrations/connectors/source-uppromote/README.md new file mode 100644 index 000000000000..212c4cdf335c --- /dev/null +++ b/airbyte-integrations/connectors/source-uppromote/README.md @@ -0,0 +1,33 @@ +# UpPromote +This directory contains the manifest-only connector for `source-uppromote`. + +The Uppromote Connector for Airbyte enables seamless data integration between Uppromote, an affiliate and influencer marketing platform, and your data warehouses or analytics tools. + +## Usage +There are multiple ways to use this connector: +- You can use this connector as any other connector in Airbyte Marketplace. +- You can load this connector in `pyairbyte` using `get_source`! +- You can open this connector in Connector Builder, edit it, and publish to your workspaces. + +Please refer to the manifest-only connector documentation for more details. + +## Local Development +We recommend you use the Connector Builder to edit this connector. + +But, if you want to develop this connector locally, you can use the following steps. + +### Environment Setup +You will need `airbyte-ci` installed. You can find the documentation [here](airbyte-ci). + +### Build +This will create a dev image (`source-uppromote:dev`) that you can use to test the connector locally. +```bash +airbyte-ci connectors --name=source-uppromote build +``` + +### Test +This will run the acceptance tests for the connector. +```bash +airbyte-ci connectors --name=source-uppromote test +``` + diff --git a/airbyte-integrations/connectors/source-uppromote/acceptance-test-config.yml b/airbyte-integrations/connectors/source-uppromote/acceptance-test-config.yml new file mode 100644 index 000000000000..7e021cfd0244 --- /dev/null +++ b/airbyte-integrations/connectors/source-uppromote/acceptance-test-config.yml @@ -0,0 +1,17 @@ +# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) +# for more information about how to configure these tests +connector_image: airbyte/source-uppromote:dev +acceptance_tests: + spec: + tests: + - spec_path: "manifest.yaml" + connection: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + discovery: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + basic_read: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + incremental: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + full_refresh: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" diff --git a/airbyte-integrations/connectors/source-uppromote/icon.svg b/airbyte-integrations/connectors/source-uppromote/icon.svg new file mode 100644 index 000000000000..e750b293482f --- /dev/null +++ b/airbyte-integrations/connectors/source-uppromote/icon.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/airbyte-integrations/connectors/source-uppromote/manifest.yaml b/airbyte-integrations/connectors/source-uppromote/manifest.yaml new file mode 100644 index 000000000000..673b2390814e --- /dev/null +++ b/airbyte-integrations/connectors/source-uppromote/manifest.yaml @@ -0,0 +1,338 @@ +version: 5.12.0 + +type: DeclarativeSource + +description: >- + The Uppromote Connector for Airbyte enables seamless data integration between + Uppromote, an affiliate and influencer marketing platform, and your data + warehouses or analytics tools. + +check: + type: CheckStream + stream_names: + - affiliates + +definitions: + streams: + affiliates: + type: DeclarativeStream + name: affiliates + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: affiliates + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - data + paginator: + type: DefaultPaginator + page_token_option: + type: RequestPath + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.get(\"links\", {}).get(\"next\", {}) }}" + stop_condition: "{{ not response.get(\"links\", {}).get(\"next\", {}) }}" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/affiliates" + coupons: + type: DeclarativeStream + name: coupons + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: coupons + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - data + paginator: + type: DefaultPaginator + page_token_option: + type: RequestPath + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.get(\"links\", {}).get(\"next\", {}) }}" + stop_condition: "{{ not response.get(\"links\", {}).get(\"next\", {}) }}" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/coupons" + referrals: + type: DeclarativeStream + name: referrals + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: referrals + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - data + paginator: + type: DefaultPaginator + page_token_option: + type: RequestPath + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.get(\"links\", {}).get(\"next\", {}) }}" + stop_condition: "{{ not response.get(\"links\", {}).get(\"next\", {}) }}" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: created_at + cursor_datetime_formats: + - "%s" + datetime_format: "%Y-%m-%d" + start_datetime: + type: MinMaxDatetime + datetime: "{{ config[\"start_date\"] }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + start_time_option: + type: RequestOption + field_name: from_date + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: to_date + inject_into: request_parameter + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/referrals" + base_requester: + type: HttpRequester + url_base: https://aff-api.uppromote.com/api/v1/ + authenticator: + type: BearerAuthenticator + api_token: "{{ config[\"api_key\"] }}" + +streams: + - $ref: "#/definitions/streams/affiliates" + - $ref: "#/definitions/streams/coupons" + - $ref: "#/definitions/streams/referrals" + +spec: + type: Spec + connection_specification: + type: object + $schema: http://json-schema.org/draft-07/schema# + required: + - api_key + - start_date + properties: + api_key: + type: string + description: >- + For developing your own custom integration with UpPromote, you can + create an API key. This is available from Professional plan. Simply + go to Settings > Integration > API > Create API Key. + order: 0 + title: API Key + airbyte_secret: true + start_date: + type: string + description: Data before this date will not be fetched. + order: 1 + title: Start date + format: date-time + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$ + additionalProperties: true + +metadata: + autoImportSchema: + affiliates: true + coupons: true + referrals: true + testedStreams: + affiliates: + hasRecords: true + streamHash: b73f2aace3f852d8b10efa62f7aaea2aafac737d + hasResponse: true + primaryKeysAreUnique: true + primaryKeysArePresent: true + responsesAreSuccessful: true + coupons: + hasRecords: true + streamHash: 4b330869ddba310b9b0e054176dea819d9dab7f6 + hasResponse: true + primaryKeysAreUnique: true + primaryKeysArePresent: true + responsesAreSuccessful: true + referrals: + hasRecords: true + streamHash: 2044e4e30bda35382092aac486ead90556ccbd3a + hasResponse: true + primaryKeysAreUnique: true + primaryKeysArePresent: true + responsesAreSuccessful: true + assist: {} + +schemas: + affiliates: + type: object + $schema: http://json-schema.org/schema# + additionalProperties: true + properties: + affiliate_link: + type: + - string + - "null" + affiliate_setting: + type: + - object + - "null" + properties: {} + coupons: + type: + - array + - "null" + created_at_timestamp: + type: + - number + - "null" + email: + type: + - string + - "null" + email_verified: + type: + - number + - "null" + first_name: + type: + - string + - "null" + id: + type: number + last_name: + type: + - string + - "null" + parent_email: + type: + - string + - "null" + parent_id: + type: + - number + - "null" + program_id: + type: + - number + - "null" + program_name: + type: + - string + - "null" + status: + type: + - number + - "null" + required: + - id + coupons: + type: object + $schema: http://json-schema.org/schema# + additionalProperties: true + properties: + description: + type: + - string + - "null" + affiliate_id: + type: + - number + - "null" + coupon: + type: + - string + - "null" + created_timestamp: + type: + - number + - "null" + id: + type: number + required: + - id + referrals: + type: object + $schema: http://json-schema.org/schema# + additionalProperties: true + properties: + affiliate: + type: + - object + - "null" + properties: + email: + type: + - string + - "null" + first_name: + type: + - string + - "null" + id: + type: + - number + - "null" + last_name: + type: + - string + - "null" + affiliate_id: + type: + - number + - "null" + commission: + type: + - string + - "null" + commission_adjustment: + type: + - string + - "null" + created_at: + type: number + id: + type: number + status: + type: + - string + - "null" + total_sales: + type: + - string + - "null" + tracking_type: + type: + - string + - "null" + required: + - id + - created_at diff --git a/airbyte-integrations/connectors/source-uppromote/metadata.yaml b/airbyte-integrations/connectors/source-uppromote/metadata.yaml new file mode 100644 index 000000000000..8936982e2510 --- /dev/null +++ b/airbyte-integrations/connectors/source-uppromote/metadata.yaml @@ -0,0 +1,35 @@ +metadataSpecVersion: "1.0" +data: + allowedHosts: + hosts: + - "aff-api.uppromote.com" + registryOverrides: + oss: + enabled: true + cloud: + enabled: true + remoteRegistries: + pypi: + enabled: false + packageName: airbyte-source-uppromote + connectorBuildOptions: + baseImage: docker.io/airbyte/source-declarative-manifest:5.13.0@sha256:ffc5977f59e1f38bf3f5dd70b6fa0520c2450ebf85153c5a8df315b8c918d5c3 + connectorSubtype: api + connectorType: source + definitionId: d75a7792-e5db-4645-93c3-b4a16ad62ab0 + dockerImageTag: 0.0.1 + dockerRepository: airbyte/source-uppromote + githubIssueLabel: source-uppromote + icon: icon.svg + license: MIT + name: UpPromote + releaseDate: 2024-10-10 + releaseStage: alpha + supportLevel: community + documentationUrl: https://docs.airbyte.com/integrations/sources/uppromote + tags: + - language:manifest-only + - cdk:low-code + ab_internal: + ql: 100 + sl: 100 diff --git a/docs/integrations/sources/uppromote.md b/docs/integrations/sources/uppromote.md new file mode 100644 index 000000000000..a4366b02b63d --- /dev/null +++ b/docs/integrations/sources/uppromote.md @@ -0,0 +1,26 @@ +# UpPromote +The Uppromote Connector for Airbyte enables seamless data integration between Uppromote, an affiliate and influencer marketing platform, and your data warehouses or analytics tools. + +## Configuration + +| Input | Type | Description | Default Value | +|-------|------|-------------|---------------| +| `api_key` | `string` | API Key. For developing your own custom integration with UpPromote, you can create an API key. This is available from Professional plan. Simply go to Settings > Integration > API > Create API Key. | | + +## Streams +| Stream Name | Primary Key | Pagination | Supports Full Sync | Supports Incremental | +|-------------|-------------|------------|---------------------|----------------------| +| affiliates | id | DefaultPaginator | ✅ | ❌ | +| coupons | id | DefaultPaginator | ✅ | ❌ | +| referrals | id | DefaultPaginator | ✅ | ✅ | + +## Changelog + +
+ Expand to review + +| Version | Date | Pull Request | Subject | +|------------------|-------------------|--------------|----------------| +| 0.0.1 | 2024-10-10 | | Initial release by [@avirajsingh7](https://github.com/avirajsingh7) via Connector Builder | + +