diff --git a/airbyte-integrations/connectors/source-bigcommerce/.dockerignore b/airbyte-integrations/connectors/source-bigcommerce/.dockerignore index bf8edc6e2599..628d2f05f6ef 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/.dockerignore +++ b/airbyte-integrations/connectors/source-bigcommerce/.dockerignore @@ -1,6 +1,5 @@ * !Dockerfile -!Dockerfile.test !main.py !source_bigcommerce !setup.py diff --git a/airbyte-integrations/connectors/source-bigcommerce/Dockerfile b/airbyte-integrations/connectors/source-bigcommerce/Dockerfile index 0c14c34d26cb..756f514ab945 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/Dockerfile +++ b/airbyte-integrations/connectors/source-bigcommerce/Dockerfile @@ -1,16 +1,38 @@ -FROM python:3.9-slim +FROM python:3.9.11-alpine3.15 as base + +# build and load all requirements +FROM base as builder +WORKDIR /airbyte/integration_code + +# upgrade pip to the latest version +RUN apk --no-cache upgrade \ + && pip install --upgrade pip \ + && apk --no-cache add tzdata build-base -# Bash is installed for more convenient debugging. -RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/* +COPY setup.py ./ +# install necessary packages to a temporary folder +RUN pip install --prefix=/install . + +# build a clean environment +FROM base WORKDIR /airbyte/integration_code -COPY source_bigcommerce ./source_bigcommerce + +# copy all loaded and built libraries to a pure basic image +COPY --from=builder /install /usr/local +# add default timezone settings +COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime +RUN echo "Etc/UTC" > /etc/timezone + +# bash is installed for more convenient debugging. +RUN apk --no-cache add bash + +# copy payload code only COPY main.py ./ -COPY setup.py ./ -RUN pip install . +COPY source_bigcommerce ./source_bigcommerce ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.10 +LABEL io.airbyte.version=0.2.0 LABEL io.airbyte.name=airbyte/source-bigcommerce diff --git a/airbyte-integrations/connectors/source-bigcommerce/README.md b/airbyte-integrations/connectors/source-bigcommerce/README.md index b7eb80c54ccf..b180b4797d49 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/README.md +++ b/airbyte-integrations/connectors/source-bigcommerce/README.md @@ -1,34 +1,10 @@ # Bigcommerce Source -This is the repository for the Bigcommerce source connector, written in Python. -For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/bigcommerce). +This is the repository for the Bigcommerce configuration based source connector. +For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/bigcommerce). ## Local development -### Prerequisites -**To iterate on this connector, make sure to complete this prerequisites section.** - -#### Minimum Python version required `= 3.9.0` - -#### Build & Activate Virtual Environment and install dependencies -From this connector directory, create a virtual environment: -``` -python -m venv .venv -``` - -This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your -development environment of choice. To activate it from the terminal, run: -``` -source .venv/bin/activate -pip install -r requirements.txt -``` -If you are in an IDE, follow your IDE's instructions to activate the virtualenv. - -Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is -used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`. -If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything -should work as you expect. - #### Building via Gradle You can also build the connector in Gradle. This is typically used in CI and not needed for your development workflow. @@ -38,22 +14,14 @@ To build using Gradle, from the Airbyte repository root, run: ``` #### Create credentials -**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/bigcommerce) -to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_bigcommerce/spec.json` file. +**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/bigcommerce) +to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_bigcommerce/spec.yaml` file. Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. See `integration_tests/sample_config.json` for a sample config file. **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source bigcommerce test creds` and place them into `secrets/config.json`. -### Locally running the connector -``` -python main.py spec -python main.py check --config secrets/config.json -python main.py discover --config secrets/config.json -python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json -``` - ### Locally running the connector docker image #### Build @@ -78,32 +46,15 @@ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-bigcommerce:dev discov docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-bigcommerce:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json ``` ## Testing -Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named. -First install test dependencies into your virtual environment: -``` -pip install .[tests] -``` -### Unit Tests -To run unit tests locally, from the connector directory run: -``` -python -m pytest unit_tests -``` -### Integration Tests -There are two types of integration tests: Acceptance Tests (Airbyte's test suite for all source connectors) and custom integration tests (which are specific to this connector). -#### Custom Integration tests -Place custom tests inside `integration_tests/` folder, then, from the connector root, run -``` -python -m pytest integration_tests -``` #### Acceptance Tests -Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. +Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. -To run your integration tests with acceptance tests, from the connector root, run + +To run your integration tests with Docker, run: ``` -python -m pytest integration_tests -p integration_tests.acceptance +./acceptance-test-docker.sh ``` -To run your integration tests with docker ### Using gradle to run tests All commands should be run from airbyte project root. diff --git a/airbyte-integrations/connectors/source-bigcommerce/unit_tests/unit_test.py b/airbyte-integrations/connectors/source-bigcommerce/__init__.py similarity index 57% rename from airbyte-integrations/connectors/source-bigcommerce/unit_tests/unit_test.py rename to airbyte-integrations/connectors/source-bigcommerce/__init__.py index 219ae0142c72..c941b3045795 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/unit_tests/unit_test.py +++ b/airbyte-integrations/connectors/source-bigcommerce/__init__.py @@ -1,7 +1,3 @@ # # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # - - -def test_example_method(): - assert True diff --git a/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-config.yml b/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-config.yml index 94d5f137867b..564a05cfa774 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-config.yml @@ -1,24 +1,47 @@ # 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-bigcommerce:dev -tests: +acceptance_tests: spec: - - spec_path: "source_bigcommerce/spec.json" + tests: + - spec_path: "source_bigcommerce/spec.yaml" connection: - - config_path: "secrets/config.json" - status: "succeed" - - config_path: "integration_tests/invalid_config.json" - status: "failed" + tests: + - config_path: "secrets/config.json" + status: "succeed" + - config_path: "integration_tests/invalid_config.json" + status: "failed" discovery: - - config_path: "secrets/config.json" + tests: + - config_path: "secrets/config.json" + backward_compatibility_tests_config: + disable_for_version: "0.1.10" basic_read: - - config_path: "secrets/config.json" - configured_catalog_path: "integration_tests/configured_catalog.json" - empty_streams: ["orders", "transactions", "products", "customers", "channels", "order_products"] + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + empty_streams: + - name: "orders" + bypass_reason: "sandbox account does not have records" + - name: "transactions" + bypass_reason: "sandbox account does not have records" + - name: "products" + bypass_reason: "sandbox account does not have records" + - name: "customers" + bypass_reason: "sandbox account does not have records" + - name: "channels" + bypass_reason: "sandbox account does not have records" + - name: "order_products" + bypass_reason: "sandbox account does not have records" + fail_on_extra_columns: false incremental: - - config_path: "secrets/config.json" - configured_catalog_path: "integration_tests/configured_catalog.json" - future_state_path: "integration_tests/abnormal_state.json" + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" + future_state: + future_state_path: "integration_tests/abnormal_state.json" + skip_comprehensive_incremental_tests: true full_refresh: - - config_path: "secrets/config.json" - configured_catalog_path: "integration_tests/configured_catalog.json" + tests: + - config_path: "secrets/config.json" + configured_catalog_path: "integration_tests/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-docker.sh b/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-docker.sh index 5797d20fe9a7..b6d65deeccb4 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-docker.sh +++ b/airbyte-integrations/connectors/source-bigcommerce/acceptance-test-docker.sh @@ -1,2 +1,3 @@ #!/usr/bin/env sh + source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" diff --git a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/__init__.py b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/__init__.py index e69de29bb2d1..c941b3045795 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/__init__.py +++ b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/__init__.py @@ -0,0 +1,3 @@ +# +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# diff --git a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/abnormal_state.json index 723a217dc775..eb1f5a064644 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/abnormal_state.json @@ -3,7 +3,7 @@ "type": "STREAM", "stream": { "stream_state": { - "date_modified": "2080-07-30T22:16:46" + "date_modified": "2080-07-30T22:16:46+00:00" }, "stream_descriptor": { "name": "customers" diff --git a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/catalog.json b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/catalog.json deleted file mode 100644 index ccb19696a04d..000000000000 --- a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/catalog.json +++ /dev/null @@ -1,1993 +0,0 @@ -{ - "streams": [ - { - "name": "customers", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "email": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "registration_ip_address": { - "type": ["null", "string"] - }, - "notes": { - "type": ["null", "string"] - }, - "tax_exempt_category": { - "type": ["null", "string"] - }, - "customer_group_id": { - "type": ["null", "number"] - }, - "id": { - "type": ["null", "number"] - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "address_count": { - "type": ["null", "number"] - }, - "attribute_count": { - "type": ["null", "number"] - }, - "authentication": { - "type": ["null", "object"], - "properties": { - "force_password_reset": { - "type": ["null", "boolean"] - } - } - }, - "addresses": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "address1": { - "type": ["null", "string"] - }, - "address2": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "state_or_province": { - "type": ["null", "string"] - }, - "postal_code": { - "type": ["null", "string"] - }, - "country_code": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "address_type": { - "type": ["null", "string"] - }, - "customer_id": { - "type": ["null", "number"] - }, - "id": { - "type": ["null", "number"] - }, - "country": { - "type": ["null", "string"] - }, - "form_fields": { - "type": ["null", "array"], - "oneOf": [ - { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["name", "string"] - }, - "value": { - "oneOf": [ - { - "type": ["null", "string"] - }, - { - "type": ["null", "number"] - }, - { - "type": ["null", "array"] - } - ] - }, - "customer_id": { - "type": ["null", "number"] - } - } - }, - { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["name", "string"] - }, - "value": { - "oneOf": [ - { - "type": ["null", "string"] - }, - { - "type": ["null", "number"] - }, - { - "type": ["null", "array"] - } - ] - }, - "address_id": { - "type": ["null", "number"] - } - } - } - ] - }, - "store_credit_amounts": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "number"] - } - } - } - }, - "accepts_product_review_abandoned_cart_emails": { - "type": ["null", "boolean"] - }, - "channel_ids": { - "type": ["null", "array"] - } - } - } - } - } - } - }, - { - "name": "orders", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "number"] - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_shipped": { - "type": ["null", "string"], - "format": "date-time" - }, - "cart_id": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "subtotal_tax": { - "type": ["null", "string"] - }, - "shipping_cost_tax": { - "type": ["null", "string"] - }, - "shipping_cost_tax_class_id": { - "type": ["null", "number"] - }, - "handling_cost_tax": { - "type": ["null", "string"] - }, - "handling_cost_tax_class_id": { - "type": ["null", "number"] - }, - "wrapping_cost_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_tax_class_id": { - "type": ["null", "number"] - }, - "payment_status": { - "type": ["null", "string"] - }, - "store_credit_amount": { - "type": ["null", "string"] - }, - "gift_certificate_amount": { - "type": ["null", "string"] - }, - "currency_id": { - "type": ["null", "number"] - }, - "currency_code": { - "type": ["null", "string"] - }, - "currency_exchange_rate": { - "type": ["null", "string"] - }, - "default_currency_id": { - "type": ["null", "number"] - }, - "coupon_discount": { - "type": ["null", "string"] - }, - "shipping_address_count": { - "type": ["null", "number"] - }, - "is_email_opt_in": { - "type": ["null", "boolean"] - }, - "order_source": { - "type": ["null", "string"] - }, - "products": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "shipping_addresses": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "coupons": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "status_id": { - "type": ["null", "number"] - }, - "base_handling_cost": { - "type": ["null", "string"] - }, - "base_shipping_cost": { - "type": ["null", "string"] - }, - "base_wrapping_cost": { - "oneOf": [ - { - "type": ["null", "number"] - }, - { - "type": ["null", "string"] - } - ] - }, - "billing_address": { - "type": ["null", "object"], - "properties": { - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "street_1": { - "type": ["null", "string"] - }, - "street_2": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "zip": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "country_iso2": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "form_fields": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - } - } - } - } - }, - "channel_id": { - "type": ["null", "number"] - }, - "customer_id": { - "type": ["null", "number"] - }, - "customer_message": { - "type": ["null", "string"] - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "default_currency_code": { - "type": ["null", "string"] - }, - "discount_amount": { - "type": ["null", "string"] - }, - "ebay_order_id": { - "type": ["null", "string"] - }, - "external_id": { - "type": ["null", "string"] - }, - "external_source": { - "type": ["null", "string"] - }, - "geoip_country": { - "type": ["null", "string"] - }, - "geoip_country_iso2": { - "type": ["null", "string"] - }, - "handling_cost_ex_tax": { - "type": ["null", "string"] - }, - "handling_cost_inc_tax": { - "type": ["null", "string"] - }, - "ip_address": { - "type": ["null", "string"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "items_shipped": { - "type": ["null", "number"] - }, - "items_total": { - "type": ["null", "number"] - }, - "order_is_digital": { - "type": ["null", "boolean"] - }, - "payment_method": { - "type": ["null", "string"] - }, - "refunded_amount": { - "type": ["null", "string"] - }, - "shipping_cost_ex_tax": { - "type": ["null", "string"] - }, - "shipping_cost_inc_tax": { - "type": ["null", "string"] - }, - "staff_notes": { - "type": ["null", "string"] - }, - "subtotal_ex_tax": { - "type": ["null", "string"] - }, - "subtotal_inc_tax": { - "type": ["null", "string"] - }, - "tax_provider_id": { - "type": ["null", "string"] - }, - "customer_locale": { - "type": ["null", "string"] - }, - "total_ex_tax": { - "type": ["null", "string"] - }, - "total_inc_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_ex_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_inc_tax": { - "type": ["null", "string"] - } - } - } - }, - { - "name": "transactions", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "event": { - "type": ["null", "string"] - }, - "method": { - "type": ["null", "string"] - }, - "amount": { - "type": ["null", "number"] - }, - "currency": { - "type": ["null", "string"] - }, - "gateway": { - "type": ["null", "string"] - }, - "gateway_transaction_id": { - "type": ["null", "string"] - }, - "date_created": { - "type": ["null", "string"] - }, - "test": { - "type": ["null", "boolean"] - }, - "status": { - "type": ["null", "string"] - }, - "fraud_review": { - "type": ["null", "boolean"] - }, - "reference_transaction_id": { - "type": ["null", "number"] - }, - "offline": { - "type": ["null", "object"], - "properties": { - "display_name": { - "type": ["null", "string"] - } - } - }, - "custom": { - "type": ["null", "object"], - "properties": { - "payment_method": { - "type": ["null", "string"] - } - } - }, - "payment_method_id": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "order_id": { - "type": ["null", "string"] - }, - "payment_instrument_token": { - "type": ["null", "string"] - }, - "avs_result": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "message": { - "type": ["null", "string"] - }, - "street_match": { - "type": ["null", "string"] - }, - "postal_match": { - "type": ["null", "string"] - } - } - }, - "cvv_result": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "message": { - "type": ["null", "string"] - } - } - }, - "credit_card": { - "type": ["null", "object"], - "properties": { - "card_type": { - "type": ["null", "string"] - }, - "card_iin": { - "type": ["null", "string"] - }, - "card_last4": { - "type": ["null", "string"] - }, - "card_expiry_month": { - "type": ["null", "number"] - }, - "card_expiry_year": { - "type": ["null", "number"] - } - } - }, - "gift_certificate": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "original_balance": { - "type": ["null", "number"] - }, - "starting_balance": { - "type": ["null", "number"] - }, - "remaining_balance": { - "type": ["null", "number"] - }, - "status": { - "type": ["null", "string"] - } - } - }, - "store_credit": { - "type": ["null", "object"], - "properties": { - "remaining_balance": { - "type": ["null", "number"] - } - } - } - } - } - }, - { - "name": "order_products", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "order_id": { - "type": ["null", "integer"] - }, - "product_id": { - "type": ["null", "integer"] - }, - "variant_id": { - "type": ["null", "integer"] - }, - "order_address_id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "name_customer": { - "type": ["null", "string"] - }, - "name_merchant": { - "type": ["null", "string"] - }, - "sku": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "base_price": { - "type": ["null", "string"] - }, - "price_ex_tax": { - "type": ["null", "string"] - }, - "price_inc_tax": { - "type": ["null", "string"] - }, - "price_tax": { - "type": ["null", "string"] - }, - "base_total": { - "type": ["null", "string"] - }, - "total_ex_tax": { - "type": ["null", "string"] - }, - "total_inc_tax": { - "type": ["null", "string"] - }, - "total_tax": { - "type": ["null", "string"] - }, - "weight": { - "type": ["null", "string"] - }, - "width": { - "type": ["null", "string"] - }, - "height": { - "type": ["null", "string"] - }, - "depth": { - "type": ["null", "string"] - }, - "quantity": { - "type": ["null", "number"] - }, - "base_cost_price": { - "type": ["null", "string"] - }, - "cost_price_inc_tax": { - "type": ["null", "string"] - }, - "cost_price_ex_tax": { - "type": ["null", "string"] - }, - "cost_price_tax": { - "type": ["null", "string"] - }, - "is_refunded": { - "type": ["null", "boolean"] - }, - "quantity_refunded": { - "type": ["null", "number"] - }, - "refund_amount": { - "type": ["null", "string"] - }, - "return_id": { - "type": ["null", "number"] - }, - "wrapping_id": { - "type": ["null", "string"] - }, - "wrapping_name": { - "type": ["null", "string"] - }, - "base_wrapping_cost": { - "type": ["null", "string"] - }, - "wrapping_cost_ex_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_inc_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_tax": { - "type": ["null", "string"] - }, - "wrapping_message": { - "type": ["null", "string"] - }, - "quantity_shipped": { - "type": ["null", "number"] - }, - "event_name": { - "type": ["null", "string"] - }, - "event_date": { - "type": ["null", "string"] - }, - "fixed_shipping_cost": { - "type": ["null", "string"] - }, - "ebay_item_id": { - "type": ["null", "string"] - }, - "ebay_transaction_id": { - "type": ["null", "string"] - }, - "option_set_id": { - "type": ["null", "integer"] - }, - "parent_order_product_id": { - "type": ["null", "integer"] - }, - "is_bundled_product": { - "type": ["null", "boolean"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "external_id": { - "type": ["null", "string"] - }, - "fulfillment_source": { - "type": ["null", "string"] - }, - "brand": { - "type": ["null", "string"] - }, - "gift_certificate_id": { - "type": ["null", "integer"] - }, - "applied_discounts": { - "type": ["null", "array"] - }, - "applied_discounts": { - "type": ["null", "array"] - }, - "product_options": { - "type": ["null", "array"] - }, - "configurable_fields": { - "type": ["null", "array"] - } - } - } - }, - { - "name": "pages", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "email": { - "type": ["null", "string"] - }, - "meta_title": { - "type": ["null", "string"] - }, - "body": { - "type": ["null", "string"] - }, - "feed": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "contact_fields": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "string"] - }, - "meta_description": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - }, - "channel_id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "parent_id": { - "type": ["null", "number"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "is_homepage": { - "type": ["null", "boolean"] - }, - "is_customers_only": { - "type": ["null", "boolean"] - }, - "id": { - "type": ["null", "number"] - } - } - } - }, - { - "name": "brands", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "custom_url": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - } - } - } - }, - { - "name": "categories", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "parent_id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "views": { - "type": ["null", "integer"] - }, - "sort_order": { - "type": ["null", "integer"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "layout_file": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "default_product_sort": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "object"], - "properties": { - "path": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - } - } - } - }, - { - "name": "products", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "sku": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "weight": { - "type": ["null", "number"], - "format": "float" - }, - "width": { - "type": ["null", "number"], - "format": "float" - }, - "depth": { - "type": ["null", "number"], - "format": "float" - }, - "height": { - "type": ["null", "number"], - "format": "float" - }, - "price": { - "type": ["null", "number"], - "format": "float" - }, - "cost_price": { - "type": ["null", "number"], - "format": "float" - }, - "retail_price": { - "type": ["null", "number"], - "format": "float" - }, - "sale_price": { - "type": ["null", "number"], - "format": "float" - }, - "map_price": { - "type": ["null", "number"] - }, - "tax_class_id": { - "type": ["null", "number"] - }, - "product_tax_code": { - "type": ["null", "string"] - }, - "categories": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "brand_id": { - "type": ["null", "number"] - }, - "inventory_level": { - "type": ["null", "number"] - }, - "inventory_warning_level": { - "type": ["null", "number"] - }, - "inventory_tracking": { - "type": ["null", "string"] - }, - "fixed_cost_shipping_price": { - "type": ["null", "number"], - "format": "float" - }, - "is_free_shipping": { - "type": ["null", "boolean"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "is_featured": { - "type": ["null", "boolean"] - }, - "related_products": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "warranty": { - "type": ["null", "string"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "layout_file": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "availability": { - "type": ["null", "string"] - }, - "availability_description": { - "type": ["null", "string"] - }, - "gift_wrapping_options_type": { - "type": ["null", "string"] - }, - "gift_wrapping_options_list": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "sort_order": { - "type": ["null", "number"] - }, - "condition": { - "type": ["null", "string"] - }, - "is_condition_shown": { - "type": ["null", "boolean"] - }, - "order_quantity_minimum": { - "type": ["null", "number"] - }, - "order_quantity_maximum": { - "type": ["null", "number"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "view_count": { - "type": ["null", "number"] - }, - "preorder_release_date": { - "type": ["null", "string"], - "format": "date-time" - }, - "preorder_message": { - "type": ["null", "string"] - }, - "is_preorder_only": { - "type": ["null", "boolean"] - }, - "is_price_hidden": { - "type": ["null", "boolean"] - }, - "price_hidden_label": { - "type": ["null", "string"] - }, - "custom_url": { - "type": ["null", "object"], - "title": "customUrl_Full", - "properties": { - "url": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - }, - "open_graph_type": { - "type": ["null", "string"] - }, - "open_graph_title": { - "type": ["null", "string"] - }, - "open_graph_description": { - "type": ["null", "string"] - }, - "open_graph_use_meta_description": { - "type": ["null", "boolean"] - }, - "open_graph_use_product_name": { - "type": ["null", "boolean"] - }, - "open_graph_use_image": { - "type": ["null", "boolean"] - }, - "brand_name or brand_id": { - "type": ["null", "string"] - }, - "gtin": { - "type": ["null", "string"] - }, - "mpn": { - "type": ["null", "string"] - }, - "reviews_rating_sum": { - "type": ["null", "number"] - }, - "reviews_count": { - "type": ["null", "number"] - }, - "total_sold": { - "type": ["null", "number"] - }, - "custom_fields": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "productCustomField_Put", - "required": ["name", "value"], - "properties": { - "id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - } - } - }, - "bulk_pricing_rules": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "bulkPricingRule_Full", - "required": ["quantity_min", "quantity_max", "type", "amount"], - "properties": { - "id": { - "type": ["null", "number"] - }, - "quantity_min": { - "type": ["null", "number"] - }, - "quantity_max": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "amount": { - "type": ["null", "number"] - } - } - } - }, - "images": { - "type": ["null", "array"], - "items": { - "title": "productImage_Full", - "type": ["null", "object"], - "properties": { - "image_file": { - "type": ["null", "string"] - }, - "is_thumbnail": { - "type": ["null", "boolean"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "description": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "url_zoom": { - "type": ["null", "string"] - }, - "url_standard": { - "type": ["null", "string"] - }, - "url_thumbnail": { - "type": ["null", "string"] - }, - "url_tiny": { - "type": ["null", "string"] - }, - "date_modified": { - "format": "date-time", - "type": ["null", "string"] - } - } - } - }, - "videos": { - "type": ["null", "array"], - "items": { - "title": "productVideo_Full", - "type": ["null", "object"], - "properties": { - "title": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "video_id": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "length": { - "type": ["null", "string"] - } - } - } - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "id": { - "type": ["null", "number"] - }, - "base_variant_id": { - "type": ["null", "number"] - }, - "calculated_price": { - "type": ["null", "number"], - "format": "float" - }, - "options": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "productOption_Base", - "properties": { - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "display_name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "config": { - "type": ["null", "object"], - "title": "productOptionConfig_Full", - "properties": { - "default_value": { - "type": ["null", "string"] - }, - "checked_by_default": { - "type": ["null", "boolean"] - }, - "checkbox_label": { - "type": ["null", "string"] - }, - "date_limited": { - "type": ["null", "boolean"] - }, - "date_limit_mode": { - "type": ["null", "string"] - }, - "date_earliest_value": { - "type": ["null", "string"], - "format": "date" - }, - "date_latest_value": { - "type": ["null", "string"], - "format": "date" - }, - "file_types_mode": { - "type": ["null", "string"] - }, - "file_types_supported": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_types_other": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_max_size": { - "type": ["null", "number"] - }, - "text_characters_limited": { - "type": ["null", "boolean"] - }, - "text_min_length": { - "type": ["null", "number"] - }, - "text_max_length": { - "type": ["null", "number"] - }, - "text_lines_limited": { - "type": ["null", "boolean"] - }, - "text_max_lines": { - "type": ["null", "number"] - }, - "number_limited": { - "type": ["null", "boolean"] - }, - "number_limit_mode": { - "type": ["null", "string"] - }, - "number_lowest_value": { - "type": ["null", "number"] - }, - "number_highest_value": { - "type": ["null", "number"] - }, - "number_numbers_only": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_inventory": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_pricing": { - "type": ["null", "boolean"] - }, - "product_list_shipping_calc": { - "type": ["null", "string"] - } - } - }, - "sort_order": { - "type": ["null", "number"] - }, - "option_values": { - "title": "productOptionOptionValue_Full", - "type": ["null", "object"], - "required": ["label", "sort_order"], - "properties": { - "is_default": { - "type": ["null", "boolean"] - }, - "label": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "value_data": { - "type": ["object", "null"] - }, - "id": { - "type": ["null", "number"] - } - } - } - } - } - }, - "modifiers": { - "type": ["null", "array"], - "items": { - "title": "productModifier_Full", - "type": ["null", "object"], - "required": ["type", "required"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "required": { - "type": ["null", "boolean"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "config": { - "type": ["null", "object"], - "title": "config_Full", - "properties": { - "default_value": { - "type": ["null", "string"] - }, - "checked_by_default": { - "type": ["null", "boolean"] - }, - "checkbox_label": { - "type": ["null", "string"] - }, - "date_limited": { - "type": ["null", "boolean"] - }, - "date_limit_mode": { - "type": ["null", "string"] - }, - "date_earliest_value": { - "type": ["null", "string"], - "format": "date" - }, - "date_latest_value": { - "type": ["null", "string"], - "format": "date" - }, - "file_types_mode": { - "type": ["null", "string"] - }, - "file_types_supported": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_types_other": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_max_size": { - "type": ["null", "number"] - }, - "text_characters_limited": { - "type": ["null", "boolean"] - }, - "text_min_length": { - "type": ["null", "number"] - }, - "text_max_length": { - "type": ["null", "number"] - }, - "text_lines_limited": { - "type": ["null", "boolean"] - }, - "text_max_lines": { - "type": ["null", "number"] - }, - "number_limited": { - "type": ["null", "boolean"] - }, - "number_limit_mode": { - "type": ["null", "string"] - }, - "number_lowest_value": { - "type": ["null", "number"] - }, - "number_highest_value": { - "type": ["null", "number"] - }, - "number_numbers_only": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_inventory": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_pricing": { - "type": ["null", "boolean"] - }, - "product_list_shipping_calc": { - "type": ["null", "string"] - } - } - }, - "display_name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "option_values": { - "type": ["null", "array"], - "items": { - "title": "productModifierOptionValue_Full", - "type": ["null", "object"], - "required": ["label", "sort_order"], - "properties": { - "is_default": { - "type": ["null", "boolean"] - }, - "label": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "value_data": { - "type": ["object", "null"] - }, - "adjusters": { - "type": ["null", "object"], - "title": "adjusters_Full", - "properties": { - "price": { - "type": ["null", "object"], - "title": "adjuster_Full", - "properties": { - "adjuster": { - "type": ["null", "string"] - }, - "adjuster_value": { - "type": ["null", "number"] - } - } - }, - "weight": { - "type": ["null", "object"], - "title": "adjuster_Full", - "properties": { - "adjuster": { - "type": ["null", "string"] - }, - "adjuster_value": { - "type": ["null", "number"] - } - } - }, - "image_url": { - "type": ["null", "string"] - }, - "purchasing_disabled": { - "type": ["null", "object"], - "properties": { - "status": { - "type": ["null", "boolean"] - }, - "message": { - "type": ["null", "string"] - } - } - } - } - }, - "id": { - "type": ["null", "number"] - }, - "option_id": { - "type": ["null", "number"] - } - } - } - } - } - } - }, - "option_set_id": { - "type": ["null", "number"] - }, - "option_set_display": { - "type": ["null", "string"] - }, - "variants": { - "type": ["null", "array"], - "items": { - "title": "productVariant_Full", - "type": ["null", "object"], - "properties": { - "cost_price": { - "type": ["null", "number"], - "format": "double" - }, - "price": { - "type": ["null", "number"], - "format": "double" - }, - "sale_price": { - "type": ["null", "number"], - "format": "double" - }, - "retail_price": { - "type": ["null", "number"], - "format": "double" - }, - "weight": { - "type": ["null", "number"], - "format": "double" - }, - "width": { - "type": ["null", "number"], - "format": "double" - }, - "height": { - "type": ["null", "number"], - "format": "double" - }, - "depth": { - "type": ["null", "number"], - "format": "double" - }, - "is_free_shipping": { - "type": ["null", "boolean"] - }, - "fixed_cost_shipping_price": { - "type": ["null", "number"], - "format": "double" - }, - "purchasing_disabled": { - "type": ["null", "boolean"] - }, - "purchasing_disabled_message": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "inventory_level": { - "type": ["null", "number"] - }, - "inventory_warning_level": { - "type": ["null", "number"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "mpn": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "sku": { - "type": ["null", "string"] - }, - "sku_id": { - "type": ["null", "number"] - }, - "option_values": { - "type": ["null", "array"], - "items": { - "title": "productVariantOptionValue_Full", - "type": ["null", "object"], - "properties": { - "option_display_name": { - "type": ["null", "string"] - }, - "label": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "option_id": { - "type": ["null", "number"] - } - } - } - }, - "calculated_price": { - "type": ["null", "number"], - "format": "double" - }, - "calculated_weight": { - "type": "number" - } - } - } - } - } - } - }, - { - "name": "channels", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "number"] - }, - "external_id": { - "type": ["null", "string"] - }, - "is_listable_from_ui": { - "type": ["null", "boolean"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "status": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "platform": { - "type": ["null", "boolean"] - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "icon_url": { - "type": ["null", "string"] - } - } - } - }, - { - "name": "store", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "string"] - }, - "account_uuid": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "secure_url": { - "type": ["null", "string"] - }, - "control_panel_base_url": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "admin_email": { - "type": ["null", "string"] - }, - "order_email": { - "type": ["null", "string"] - }, - "favicon_url": { - "type": ["null", "string"] - }, - "timezone": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "raw_offset": { - "type": ["null", "number"] - }, - "dst_offset": { - "type": ["null", "number"] - }, - "date_format": { - "type": ["null", "object"], - "properties": { - "display": { - "type": ["null", "string"] - }, - "export": { - "type": ["null", "string"] - }, - "extended_display": { - "type": ["null", "string"] - } - } - } - } - }, - "language": { - "type": ["null", "string"] - }, - "currency": { - "type": ["null", "string"] - }, - "currency_symbol": { - "type": ["null", "string"] - }, - "decimal_separator": { - "type": ["null", "string"] - }, - "thousands_separator": { - "type": ["null", "string"] - }, - "decimal_places": { - "type": ["null", "string"] - }, - "currency_symbol_location": { - "type": ["null", "string"] - }, - "weight_units": { - "type": ["null", "string"] - }, - "dimension_units": { - "type": ["null", "string"] - }, - "dimension_decimal_places": { - "type": ["null", "string"] - }, - "dimension_decimal_token": { - "type": ["null", "string"] - }, - "dimension_thousands_token": { - "type": ["null", "string"] - }, - "plan_name": { - "type": ["null", "string"] - }, - "plan_level": { - "type": ["null", "string"] - }, - "industry": { - "type": ["null", "string"] - }, - "logo": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - } - } - } - }, - "is_price_entered_with_tax": { - "type": ["null", "boolean"] - }, - "store_id": { - "type": ["null", "number"] - }, - "default_site_id": { - "type": ["null", "number"] - }, - "default_channel_id": { - "type": ["null", "number"] - }, - "active_comparison_modules": { - "type": ["null", "array"] - }, - "features": { - "type": ["null", "object"], - "properties": { - "stencil_enabled": { - "type": ["null", "boolean"] - }, - "sitewidehttps_enabled": { - "type": ["null", "boolean"] - }, - "facebook_catalog_id": { - "type": ["null", "string"] - }, - "checkout_type": { - "type": ["null", "string"] - }, - "wishlists_enabled": { - "type": ["null", "boolean"] - }, - "graphql_storefront_api_enabled": { - "type": ["null", "boolean"] - }, - "shopper_consent_tracking_enabled": { - "type": ["null", "boolean"] - }, - "multi_storefront_enabled": { - "type": ["null", "boolean"] - } - } - } - } - } - } - ] -} diff --git a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/configured_catalog.json index 2c227e937328..9eb524b550d7 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-bigcommerce/integration_tests/configured_catalog.json @@ -3,2068 +3,192 @@ { "stream": { "name": "customers", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "email": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "registration_ip_address": { - "type": ["null", "string"] - }, - "notes": { - "type": ["null", "string"] - }, - "tax_exempt_category": { - "type": ["null", "string"] - }, - "customer_group_id": { - "type": ["null", "number"] - }, - "id": { - "type": ["null", "number"] - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "address_count": { - "type": ["null", "number"] - }, - "attribute_count": { - "type": ["null", "number"] - }, - "authentication": { - "type": ["null", "object"], - "properties": { - "force_password_reset": { - "type": ["null", "boolean"] - } - } - }, - "addresses": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "address1": { - "type": ["null", "string"] - }, - "address2": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "state_or_province": { - "type": ["null", "string"] - }, - "postal_code": { - "type": ["null", "string"] - }, - "country_code": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "address_type": { - "type": ["null", "string"] - }, - "customer_id": { - "type": ["null", "number"] - }, - "id": { - "type": ["null", "number"] - }, - "country": { - "type": ["null", "string"] - }, - "form_fields": { - "type": ["null", "array"], - "oneOf": [ - { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["name", "string"] - }, - "value": { - "oneOf": [ - { - "type": ["null", "string"] - }, - { - "type": ["null", "number"] - }, - { - "type": ["null", "array"] - } - ] - }, - "customer_id": { - "type": ["null", "number"] - } - } - }, - { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["name", "string"] - }, - "value": { - "oneOf": [ - { - "type": ["null", "string"] - }, - { - "type": ["null", "number"] - }, - { - "type": ["null", "array"] - } - ] - }, - "address_id": { - "type": ["null", "number"] - } - } - } - ] - }, - "store_credit_amounts": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "number"] - } - } - } - }, - "accepts_product_review_abandoned_cart_emails": { - "type": ["null", "boolean"] - }, - "channel_ids": { - "type": ["null", "array"] - } - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["date_modified"] + "default_cursor_field": [ + "date_modified" + ] }, "sync_mode": "incremental", - "cursor_field": ["date_modified"], + "cursor_field": [ + "date_modified" + ], "destination_sync_mode": "append" }, { "stream": { "name": "orders", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "number"] - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_shipped": { - "type": ["null", "string"], - "format": "date-time" - }, - "cart_id": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "subtotal_tax": { - "type": ["null", "string"] - }, - "shipping_cost_tax": { - "type": ["null", "string"] - }, - "shipping_cost_tax_class_id": { - "type": ["null", "number"] - }, - "handling_cost_tax": { - "type": ["null", "string"] - }, - "handling_cost_tax_class_id": { - "type": ["null", "number"] - }, - "wrapping_cost_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_tax_class_id": { - "type": ["null", "number"] - }, - "payment_status": { - "type": ["null", "string"] - }, - "store_credit_amount": { - "type": ["null", "string"] - }, - "gift_certificate_amount": { - "type": ["null", "string"] - }, - "currency_id": { - "type": ["null", "number"] - }, - "currency_code": { - "type": ["null", "string"] - }, - "currency_exchange_rate": { - "type": ["null", "string"] - }, - "default_currency_id": { - "type": ["null", "number"] - }, - "coupon_discount": { - "type": ["null", "string"] - }, - "shipping_address_count": { - "type": ["null", "number"] - }, - "is_email_opt_in": { - "type": ["null", "boolean"] - }, - "order_source": { - "type": ["null", "string"] - }, - "products": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "shipping_addresses": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "coupons": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "resource": { - "type": ["null", "string"] - } - } - }, - "status_id": { - "type": ["null", "number"] - }, - "base_handling_cost": { - "type": ["null", "string"] - }, - "base_shipping_cost": { - "type": ["null", "string"] - }, - "base_wrapping_cost": { - "oneOf": [ - { - "type": ["null", "number"] - }, - { - "type": ["null", "string"] - } - ] - }, - "billing_address": { - "type": ["null", "object"], - "properties": { - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "company": { - "type": ["null", "string"] - }, - "street_1": { - "type": ["null", "string"] - }, - "street_2": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "zip": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "country_iso2": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "form_fields": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - } - } - } - } - }, - "channel_id": { - "type": ["null", "number"] - }, - "customer_id": { - "type": ["null", "number"] - }, - "customer_message": { - "type": ["null", "string"] - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "default_currency_code": { - "type": ["null", "string"] - }, - "discount_amount": { - "type": ["null", "string"] - }, - "ebay_order_id": { - "type": ["null", "string"] - }, - "external_id": { - "type": ["null", "string"] - }, - "external_source": { - "type": ["null", "string"] - }, - "geoip_country": { - "type": ["null", "string"] - }, - "geoip_country_iso2": { - "type": ["null", "string"] - }, - "handling_cost_ex_tax": { - "type": ["null", "string"] - }, - "handling_cost_inc_tax": { - "type": ["null", "string"] - }, - "ip_address": { - "type": ["null", "string"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "items_shipped": { - "type": ["null", "number"] - }, - "items_total": { - "type": ["null", "number"] - }, - "order_is_digital": { - "type": ["null", "boolean"] - }, - "payment_method": { - "type": ["null", "string"] - }, - "refunded_amount": { - "type": ["null", "string"] - }, - "shipping_cost_ex_tax": { - "type": ["null", "string"] - }, - "shipping_cost_inc_tax": { - "type": ["null", "string"] - }, - "staff_notes": { - "type": ["null", "string"] - }, - "subtotal_ex_tax": { - "type": ["null", "string"] - }, - "subtotal_inc_tax": { - "type": ["null", "string"] - }, - "tax_provider_id": { - "type": ["null", "string"] - }, - "customer_locale": { - "type": ["null", "string"] - }, - "total_ex_tax": { - "type": ["null", "string"] - }, - "total_inc_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_ex_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_inc_tax": { - "type": ["null", "string"] - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["date_modified"] + "default_cursor_field": [ + "date_modified" + ] }, "sync_mode": "incremental", - "cursor_field": ["date_modified"], + "cursor_field": [ + "date_modified" + ], "destination_sync_mode": "append" }, { "stream": { "name": "transactions", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "event": { - "type": ["null", "string"] - }, - "method": { - "type": ["null", "string"] - }, - "amount": { - "type": ["null", "number"] - }, - "currency": { - "type": ["null", "string"] - }, - "gateway": { - "type": ["null", "string"] - }, - "gateway_transaction_id": { - "type": ["null", "string"] - }, - "date_created": { - "type": ["null", "string"] - }, - "test": { - "type": ["null", "boolean"] - }, - "status": { - "type": ["null", "string"] - }, - "fraud_review": { - "type": ["null", "boolean"] - }, - "reference_transaction_id": { - "type": ["null", "number"] - }, - "offline": { - "type": ["null", "object"], - "properties": { - "display_name": { - "type": ["null", "string"] - } - } - }, - "custom": { - "type": ["null", "object"], - "properties": { - "payment_method": { - "type": ["null", "string"] - } - } - }, - "payment_method_id": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "order_id": { - "type": ["null", "string"] - }, - "payment_instrument_token": { - "type": ["null", "string"] - }, - "avs_result": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "message": { - "type": ["null", "string"] - }, - "street_match": { - "type": ["null", "string"] - }, - "postal_match": { - "type": ["null", "string"] - } - } - }, - "cvv_result": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "message": { - "type": ["null", "string"] - } - } - }, - "credit_card": { - "type": ["null", "object"], - "properties": { - "card_type": { - "type": ["null", "string"] - }, - "card_iin": { - "type": ["null", "string"] - }, - "card_last4": { - "type": ["null", "string"] - }, - "card_expiry_month": { - "type": ["null", "number"] - }, - "card_expiry_year": { - "type": ["null", "number"] - } - } - }, - "gift_certificate": { - "type": ["null", "object"], - "properties": { - "code": { - "type": ["null", "string"] - }, - "original_balance": { - "type": ["null", "number"] - }, - "starting_balance": { - "type": ["null", "number"] - }, - "remaining_balance": { - "type": ["null", "number"] - }, - "status": { - "type": ["null", "string"] - } - } - }, - "store_credit": { - "type": ["null", "object"], - "properties": { - "remaining_balance": { - "type": ["null", "number"] - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["id"] + "default_cursor_field": [ + "id" + ] }, "sync_mode": "incremental", - "cursor_field": ["id"], + "cursor_field": [ + "id" + ], "destination_sync_mode": "append" }, { "stream": { "name": "pages", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "email": { - "type": ["null", "string"] - }, - "meta_title": { - "type": ["null", "string"] - }, - "body": { - "type": ["null", "string"] - }, - "feed": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "contact_fields": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "string"] - }, - "meta_description": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - }, - "channel_id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "parent_id": { - "type": ["null", "number"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "is_homepage": { - "type": ["null", "boolean"] - }, - "is_customers_only": { - "type": ["null", "boolean"] - }, - "id": { - "type": ["null", "number"] - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["id"] + "default_cursor_field": [ + "id" + ] }, "sync_mode": "incremental", - "cursor_field": ["id"], + "cursor_field": [ + "id" + ], "destination_sync_mode": "append" }, { "stream": { "name": "brands", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "custom_url": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["id"] + "default_cursor_field": [ + "id" + ] }, "sync_mode": "incremental", - "cursor_field": ["id"], + "cursor_field": [ + "id" + ], "destination_sync_mode": "append" }, { "stream": { "name": "categories", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "parent_id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "views": { - "type": ["null", "integer"] - }, - "sort_order": { - "type": ["null", "integer"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "layout_file": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "default_product_sort": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "object"], - "properties": { - "path": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["id"] + "default_cursor_field": [ + "id" + ] }, "sync_mode": "incremental", - "cursor_field": ["id"], + "cursor_field": [ + "id" + ], "destination_sync_mode": "append" }, { "stream": { "name": "products", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "sku": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "weight": { - "type": ["null", "number"], - "format": "float" - }, - "width": { - "type": ["null", "number"], - "format": "float" - }, - "depth": { - "type": ["null", "number"], - "format": "float" - }, - "height": { - "type": ["null", "number"], - "format": "float" - }, - "price": { - "type": ["null", "number"], - "format": "float" - }, - "cost_price": { - "type": ["null", "number"], - "format": "float" - }, - "retail_price": { - "type": ["null", "number"], - "format": "float" - }, - "sale_price": { - "type": ["null", "number"], - "format": "float" - }, - "map_price": { - "type": ["null", "number"] - }, - "tax_class_id": { - "type": ["null", "number"] - }, - "product_tax_code": { - "type": ["null", "string"] - }, - "categories": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "brand_id": { - "type": ["null", "number"] - }, - "inventory_level": { - "type": ["null", "number"] - }, - "inventory_warning_level": { - "type": ["null", "number"] - }, - "inventory_tracking": { - "type": ["null", "string"] - }, - "fixed_cost_shipping_price": { - "type": ["null", "number"], - "format": "float" - }, - "is_free_shipping": { - "type": ["null", "boolean"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "is_featured": { - "type": ["null", "boolean"] - }, - "related_products": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "warranty": { - "type": ["null", "string"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "layout_file": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "search_keywords": { - "type": ["null", "string"] - }, - "availability": { - "type": ["null", "string"] - }, - "availability_description": { - "type": ["null", "string"] - }, - "gift_wrapping_options_type": { - "type": ["null", "string"] - }, - "gift_wrapping_options_list": { - "type": ["null", "array"], - "items": { - "type": ["null", "number"] - } - }, - "sort_order": { - "type": ["null", "number"] - }, - "condition": { - "type": ["null", "string"] - }, - "is_condition_shown": { - "type": ["null", "boolean"] - }, - "order_quantity_minimum": { - "type": ["null", "number"] - }, - "order_quantity_maximum": { - "type": ["null", "number"] - }, - "page_title": { - "type": ["null", "string"] - }, - "meta_keywords": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "meta_description": { - "type": ["null", "string"] - }, - "view_count": { - "type": ["null", "number"] - }, - "preorder_release_date": { - "type": ["null", "string"], - "format": "date-time" - }, - "preorder_message": { - "type": ["null", "string"] - }, - "is_preorder_only": { - "type": ["null", "boolean"] - }, - "is_price_hidden": { - "type": ["null", "boolean"] - }, - "price_hidden_label": { - "type": ["null", "string"] - }, - "custom_url": { - "type": ["null", "object"], - "title": "customUrl_Full", - "properties": { - "url": { - "type": ["null", "string"] - }, - "is_customized": { - "type": ["null", "boolean"] - } - } - }, - "open_graph_type": { - "type": ["null", "string"] - }, - "open_graph_title": { - "type": ["null", "string"] - }, - "open_graph_description": { - "type": ["null", "string"] - }, - "open_graph_use_meta_description": { - "type": ["null", "boolean"] - }, - "open_graph_use_product_name": { - "type": ["null", "boolean"] - }, - "open_graph_use_image": { - "type": ["null", "boolean"] - }, - "brand_name or brand_id": { - "type": ["null", "string"] - }, - "gtin": { - "type": ["null", "string"] - }, - "mpn": { - "type": ["null", "string"] - }, - "reviews_rating_sum": { - "type": ["null", "number"] - }, - "reviews_count": { - "type": ["null", "number"] - }, - "total_sold": { - "type": ["null", "number"] - }, - "custom_fields": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "productCustomField_Put", - "required": ["name", "value"], - "properties": { - "id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "value": { - "type": ["null", "string"] - } - } - } - }, - "bulk_pricing_rules": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "bulkPricingRule_Full", - "required": ["quantity_min", "quantity_max", "type", "amount"], - "properties": { - "id": { - "type": ["null", "number"] - }, - "quantity_min": { - "type": ["null", "number"] - }, - "quantity_max": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "amount": { - "type": ["null", "number"] - } - } - } - }, - "images": { - "type": ["null", "array"], - "items": { - "title": "productImage_Full", - "type": ["null", "object"], - "properties": { - "image_file": { - "type": ["null", "string"] - }, - "is_thumbnail": { - "type": ["null", "boolean"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "description": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "url_zoom": { - "type": ["null", "string"] - }, - "url_standard": { - "type": ["null", "string"] - }, - "url_thumbnail": { - "type": ["null", "string"] - }, - "url_tiny": { - "type": ["null", "string"] - }, - "date_modified": { - "format": "date-time", - "type": ["null", "string"] - } - } - } - }, - "videos": { - "type": ["null", "array"], - "items": { - "title": "productVideo_Full", - "type": ["null", "object"], - "properties": { - "title": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "type": { - "type": ["null", "string"] - }, - "video_id": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "length": { - "type": ["null", "string"] - } - } - } - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "id": { - "type": ["null", "number"] - }, - "base_variant_id": { - "type": ["null", "number"] - }, - "calculated_price": { - "type": ["null", "number"], - "format": "float" - }, - "options": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "title": "productOption_Base", - "properties": { - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "display_name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "config": { - "type": ["null", "object"], - "title": "productOptionConfig_Full", - "properties": { - "default_value": { - "type": ["null", "string"] - }, - "checked_by_default": { - "type": ["null", "boolean"] - }, - "checkbox_label": { - "type": ["null", "string"] - }, - "date_limited": { - "type": ["null", "boolean"] - }, - "date_limit_mode": { - "type": ["null", "string"] - }, - "date_earliest_value": { - "type": ["null", "string"], - "format": "date" - }, - "date_latest_value": { - "type": ["null", "string"], - "format": "date" - }, - "file_types_mode": { - "type": ["null", "string"] - }, - "file_types_supported": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_types_other": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_max_size": { - "type": ["null", "number"] - }, - "text_characters_limited": { - "type": ["null", "boolean"] - }, - "text_min_length": { - "type": ["null", "number"] - }, - "text_max_length": { - "type": ["null", "number"] - }, - "text_lines_limited": { - "type": ["null", "boolean"] - }, - "text_max_lines": { - "type": ["null", "number"] - }, - "number_limited": { - "type": ["null", "boolean"] - }, - "number_limit_mode": { - "type": ["null", "string"] - }, - "number_lowest_value": { - "type": ["null", "number"] - }, - "number_highest_value": { - "type": ["null", "number"] - }, - "number_numbers_only": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_inventory": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_pricing": { - "type": ["null", "boolean"] - }, - "product_list_shipping_calc": { - "type": ["null", "string"] - } - } - }, - "sort_order": { - "type": ["null", "number"] - }, - "option_values": { - "title": "productOptionOptionValue_Full", - "type": ["null", "object"], - "required": ["label", "sort_order"], - "properties": { - "is_default": { - "type": ["null", "boolean"] - }, - "label": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "value_data": { - "type": ["object", "null"] - }, - "id": { - "type": ["null", "number"] - } - } - } - } - } - }, - "modifiers": { - "type": ["null", "array"], - "items": { - "title": "productModifier_Full", - "type": ["null", "object"], - "required": ["type", "required"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "required": { - "type": ["null", "boolean"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "config": { - "type": ["null", "object"], - "title": "config_Full", - "properties": { - "default_value": { - "type": ["null", "string"] - }, - "checked_by_default": { - "type": ["null", "boolean"] - }, - "checkbox_label": { - "type": ["null", "string"] - }, - "date_limited": { - "type": ["null", "boolean"] - }, - "date_limit_mode": { - "type": ["null", "string"] - }, - "date_earliest_value": { - "type": ["null", "string"], - "format": "date" - }, - "date_latest_value": { - "type": ["null", "string"], - "format": "date" - }, - "file_types_mode": { - "type": ["null", "string"] - }, - "file_types_supported": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_types_other": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "file_max_size": { - "type": ["null", "number"] - }, - "text_characters_limited": { - "type": ["null", "boolean"] - }, - "text_min_length": { - "type": ["null", "number"] - }, - "text_max_length": { - "type": ["null", "number"] - }, - "text_lines_limited": { - "type": ["null", "boolean"] - }, - "text_max_lines": { - "type": ["null", "number"] - }, - "number_limited": { - "type": ["null", "boolean"] - }, - "number_limit_mode": { - "type": ["null", "string"] - }, - "number_lowest_value": { - "type": ["null", "number"] - }, - "number_highest_value": { - "type": ["null", "number"] - }, - "number_numbers_only": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_inventory": { - "type": ["null", "boolean"] - }, - "product_list_adjusts_pricing": { - "type": ["null", "boolean"] - }, - "product_list_shipping_calc": { - "type": ["null", "string"] - } - } - }, - "display_name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "option_values": { - "type": ["null", "array"], - "items": { - "title": "productModifierOptionValue_Full", - "type": ["null", "object"], - "required": ["label", "sort_order"], - "properties": { - "is_default": { - "type": ["null", "boolean"] - }, - "label": { - "type": ["null", "string"] - }, - "sort_order": { - "type": ["null", "number"] - }, - "value_data": { - "type": ["object", "null"] - }, - "adjusters": { - "type": ["null", "object"], - "title": "adjusters_Full", - "properties": { - "price": { - "type": ["null", "object"], - "title": "adjuster_Full", - "properties": { - "adjuster": { - "type": ["null", "string"] - }, - "adjuster_value": { - "type": ["null", "number"] - } - } - }, - "weight": { - "type": ["null", "object"], - "title": "adjuster_Full", - "properties": { - "adjuster": { - "type": ["null", "string"] - }, - "adjuster_value": { - "type": ["null", "number"] - } - } - }, - "image_url": { - "type": ["null", "string"] - }, - "purchasing_disabled": { - "type": ["null", "object"], - "properties": { - "status": { - "type": ["null", "boolean"] - }, - "message": { - "type": ["null", "string"] - } - } - } - } - }, - "id": { - "type": ["null", "number"] - }, - "option_id": { - "type": ["null", "number"] - } - } - } - } - } - } - }, - "option_set_id": { - "type": ["null", "number"] - }, - "option_set_display": { - "type": ["null", "string"] - }, - "variants": { - "type": ["null", "array"], - "items": { - "title": "productVariant_Full", - "type": ["null", "object"], - "properties": { - "cost_price": { - "type": ["null", "number"], - "format": "double" - }, - "price": { - "type": ["null", "number"], - "format": "double" - }, - "sale_price": { - "type": ["null", "number"], - "format": "double" - }, - "retail_price": { - "type": ["null", "number"], - "format": "double" - }, - "weight": { - "type": ["null", "number"], - "format": "double" - }, - "width": { - "type": ["null", "number"], - "format": "double" - }, - "height": { - "type": ["null", "number"], - "format": "double" - }, - "depth": { - "type": ["null", "number"], - "format": "double" - }, - "is_free_shipping": { - "type": ["null", "boolean"] - }, - "fixed_cost_shipping_price": { - "type": ["null", "number"], - "format": "double" - }, - "purchasing_disabled": { - "type": ["null", "boolean"] - }, - "purchasing_disabled_message": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "inventory_level": { - "type": ["null", "number"] - }, - "inventory_warning_level": { - "type": ["null", "number"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "mpn": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "product_id": { - "type": ["null", "number"] - }, - "sku": { - "type": ["null", "string"] - }, - "sku_id": { - "type": ["null", "number"] - }, - "option_values": { - "type": ["null", "array"], - "items": { - "title": "productVariantOptionValue_Full", - "type": ["null", "object"], - "properties": { - "option_display_name": { - "type": ["null", "string"] - }, - "label": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "number"] - }, - "option_id": { - "type": ["null", "number"] - } - } - } - }, - "calculated_price": { - "type": ["null", "number"], - "format": "double" - }, - "calculated_weight": { - "type": "number" - } - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["date_modified"] + "default_cursor_field": [ + "date_modified" + ] }, "sync_mode": "incremental", - "cursor_field": ["date_modified"], + "cursor_field": [ + "date_modified" + ], "destination_sync_mode": "append" }, { "stream": { "name": "channels", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "number"] - }, - "external_id": { - "type": ["null", "string"] - }, - "is_listable_from_ui": { - "type": ["null", "boolean"] - }, - "is_visible": { - "type": ["null", "boolean"] - }, - "status": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "platform": { - "type": ["null", "boolean"] - }, - "date_created": { - "type": ["null", "string"], - "format": "date-time" - }, - "date_modified": { - "type": ["null", "string"], - "format": "date-time" - }, - "icon_url": { - "type": ["null", "string"] - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["date_modified"] + "default_cursor_field": [ + "date_modified" + ] }, "sync_mode": "incremental", - "cursor_field": ["date_modified"], + "cursor_field": [ + "date_modified" + ], "destination_sync_mode": "append" }, { "stream": { "name": "store", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "string"] - }, - "account_uuid": { - "type": ["null", "string"] - }, - "domain": { - "type": ["null", "string"] - }, - "secure_url": { - "type": ["null", "string"] - }, - "control_panel_base_url": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "first_name": { - "type": ["null", "string"] - }, - "last_name": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "phone": { - "type": ["null", "string"] - }, - "admin_email": { - "type": ["null", "string"] - }, - "order_email": { - "type": ["null", "string"] - }, - "favicon_url": { - "type": ["null", "string"] - }, - "timezone": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "raw_offset": { - "type": ["null", "number"] - }, - "dst_offset": { - "type": ["null", "number"] - }, - "date_format": { - "type": ["null", "object"], - "properties": { - "display": { - "type": ["null", "string"] - }, - "export": { - "type": ["null", "string"] - }, - "extended_display": { - "type": ["null", "string"] - } - } - } - } - }, - "language": { - "type": ["null", "string"] - }, - "currency": { - "type": ["null", "string"] - }, - "currency_symbol": { - "type": ["null", "string"] - }, - "decimal_separator": { - "type": ["null", "string"] - }, - "thousands_separator": { - "type": ["null", "string"] - }, - "decimal_places": { - "type": ["null", "string"] - }, - "currency_symbol_location": { - "type": ["null", "string"] - }, - "weight_units": { - "type": ["null", "string"] - }, - "dimension_units": { - "type": ["null", "string"] - }, - "dimension_decimal_places": { - "type": ["null", "string"] - }, - "dimension_decimal_token": { - "type": ["null", "string"] - }, - "dimension_thousands_token": { - "type": ["null", "string"] - }, - "plan_name": { - "type": ["null", "string"] - }, - "plan_level": { - "type": ["null", "string"] - }, - "industry": { - "type": ["null", "string"] - }, - "logo": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "url": { - "type": ["null", "string"] - } - } - } - }, - "is_price_entered_with_tax": { - "type": ["null", "boolean"] - }, - "store_id": { - "type": ["null", "number"] - }, - "default_site_id": { - "type": ["null", "number"] - }, - "default_channel_id": { - "type": ["null", "number"] - }, - "active_comparison_modules": { - "type": ["null", "array"] - }, - "features": { - "type": ["null", "object"], - "properties": { - "stencil_enabled": { - "type": ["null", "boolean"] - }, - "sitewidehttps_enabled": { - "type": ["null", "boolean"] - }, - "facebook_catalog_id": { - "type": ["null", "string"] - }, - "checkout_type": { - "type": ["null", "string"] - }, - "wishlists_enabled": { - "type": ["null", "boolean"] - }, - "graphql_storefront_api_enabled": { - "type": ["null", "boolean"] - }, - "shopper_consent_tracking_enabled": { - "type": ["null", "boolean"] - }, - "multi_storefront_enabled": { - "type": ["null", "boolean"] - } - } - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["store_id"] + "default_cursor_field": [ + "store_id" + ] }, "sync_mode": "incremental", - "cursor_field": ["store_id"], + "cursor_field": [ + "store_id" + ], "destination_sync_mode": "overwrite" }, { "stream": { "name": "order_products", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "type": ["null", "integer"] - }, - "order_id": { - "type": ["null", "integer"] - }, - "product_id": { - "type": ["null", "integer"] - }, - "variant_id": { - "type": ["null", "integer"] - }, - "order_address_id": { - "type": ["null", "integer"] - }, - "name": { - "type": ["null", "string"] - }, - "name_customer": { - "type": ["null", "string"] - }, - "name_merchant": { - "type": ["null", "string"] - }, - "sku": { - "type": ["null", "string"] - }, - "upc": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "base_price": { - "type": ["null", "string"] - }, - "price_ex_tax": { - "type": ["null", "string"] - }, - "price_inc_tax": { - "type": ["null", "string"] - }, - "price_tax": { - "type": ["null", "string"] - }, - "base_total": { - "type": ["null", "string"] - }, - "total_ex_tax": { - "type": ["null", "string"] - }, - "total_inc_tax": { - "type": ["null", "string"] - }, - "total_tax": { - "type": ["null", "string"] - }, - "weight": { - "type": ["null", "string"] - }, - "width": { - "type": ["null", "string"] - }, - "height": { - "type": ["null", "string"] - }, - "depth": { - "type": ["null", "string"] - }, - "quantity": { - "type": ["null", "number"] - }, - "base_cost_price": { - "type": ["null", "string"] - }, - "cost_price_inc_tax": { - "type": ["null", "string"] - }, - "cost_price_ex_tax": { - "type": ["null", "string"] - }, - "cost_price_tax": { - "type": ["null", "string"] - }, - "is_refunded": { - "type": ["null", "boolean"] - }, - "quantity_refunded": { - "type": ["null", "number"] - }, - "refund_amount": { - "type": ["null", "string"] - }, - "return_id": { - "type": ["null", "number"] - }, - "wrapping_id": { - "type": ["null", "string"] - }, - "wrapping_name": { - "type": ["null", "string"] - }, - "base_wrapping_cost": { - "type": ["null", "string"] - }, - "wrapping_cost_ex_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_inc_tax": { - "type": ["null", "string"] - }, - "wrapping_cost_tax": { - "type": ["null", "string"] - }, - "wrapping_message": { - "type": ["null", "string"] - }, - "quantity_shipped": { - "type": ["null", "number"] - }, - "event_name": { - "type": ["null", "string"] - }, - "event_date": { - "type": ["null", "string"] - }, - "fixed_shipping_cost": { - "type": ["null", "string"] - }, - "ebay_item_id": { - "type": ["null", "string"] - }, - "ebay_transaction_id": { - "type": ["null", "string"] - }, - "option_set_id": { - "type": ["null", "integer"] - }, - "parent_order_product_id": { - "type": ["null", "integer"] - }, - "is_bundled_product": { - "type": ["null", "boolean"] - }, - "bin_picking_number": { - "type": ["null", "string"] - }, - "external_id": { - "type": ["null", "string"] - }, - "fulfillment_source": { - "type": ["null", "string"] - }, - "brand": { - "type": ["null", "string"] - }, - "gift_certificate_id": { - "type": ["null", "integer"] - }, - "applied_discounts": { - "type": ["null", "array"] - }, - "product_options": { - "type": ["null", "array"] - }, - "configurable_fields": { - "type": ["null", "array"] - } - } - }, - "supported_sync_modes": ["incremental", "full_refresh"], + "json_schema": {}, + "supported_sync_modes": [ + "incremental", + "full_refresh" + ], "source_defined_cursor": true, - "default_cursor_field": ["id"] + "default_cursor_field": [ + "id" + ] }, "sync_mode": "incremental", - "cursor_field": ["id"], + "cursor_field": [ + "id" + ], "destination_sync_mode": "append" } ] -} +} \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-bigcommerce/metadata.yaml b/airbyte-integrations/connectors/source-bigcommerce/metadata.yaml index 0ac3c370391c..fd54e9032d49 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/metadata.yaml +++ b/airbyte-integrations/connectors/source-bigcommerce/metadata.yaml @@ -1,24 +1,28 @@ data: - ab_internal: - ql: 200 - sl: 100 + allowedHosts: + hosts: + - api.bigcommerce.com + registries: + oss: + enabled: false + cloud: + enabled: false connectorSubtype: api connectorType: source definitionId: 59c5501b-9f95-411e-9269-7143c939adbd - dockerImageTag: 0.1.10 + dockerImageTag: 0.2.0 dockerRepository: airbyte/source-bigcommerce documentationUrl: https://docs.airbyte.com/integrations/sources/bigcommerce githubIssueLabel: source-bigcommerce icon: bigcommerce.svg license: MIT - name: BigCommerce - registries: - cloud: - enabled: true - oss: - enabled: true + name: Bigcommerce + releaseDate: 2021-08-19 releaseStage: alpha supportLevel: community tags: - - language:python + - language:low-code + ab_internal: + sl: 100 + ql: 200 metadataSpecVersion: "1.0" diff --git a/airbyte-integrations/connectors/source-bigcommerce/setup.py b/airbyte-integrations/connectors/source-bigcommerce/setup.py index 7b6eed1b049c..7189d313888f 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/setup.py +++ b/airbyte-integrations/connectors/source-bigcommerce/setup.py @@ -6,13 +6,13 @@ from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ - "airbyte-cdk~=0.2", + "airbyte-cdk~=0.1", ] TEST_REQUIREMENTS = [ "requests-mock~=1.9.3", + "pytest~=6.2", "pytest-mock~=3.6.1", - "pytest~=6.1", ] setup( @@ -22,7 +22,7 @@ author_email="contact@airbyte.io", packages=find_packages(), install_requires=MAIN_REQUIREMENTS, - package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]}, + package_data={"": ["*.json", "*.yaml", "schemas/*.json", "schemas/shared/*.json"]}, extras_require={ "tests": TEST_REQUIREMENTS, }, diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/__init__.py b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/__init__.py index 7b9287ea4c26..2a85736c808d 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/__init__.py +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/__init__.py @@ -1,25 +1,5 @@ # -# MIT License -# -# Copyright (c) 2020 Airbyte -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/components.py b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/components.py new file mode 100644 index 000000000000..d9cdab67a57d --- /dev/null +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/components.py @@ -0,0 +1,29 @@ +# +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# + +from dataclasses import dataclass +from typing import Optional + +import dpath.util +import pendulum +from airbyte_cdk.sources.declarative.transformations.add_fields import AddFields +from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, StreamState + + +@dataclass +class DateTimeTransformer(AddFields): + def transform( + self, + record: Record, + config: Optional[Config] = None, + stream_state: Optional[StreamState] = None, + stream_slice: Optional[StreamSlice] = None, + ) -> Record: + + kwargs = {"record": record, "stream_state": stream_state, "stream_slice": stream_slice} + for parsed_field in self._parsed_fields: + date_time = parsed_field.value.eval(config, **kwargs) + new_date_time = str(pendulum.from_format(date_time, "ddd, D MMM YYYY HH:mm:ss ZZ")) + dpath.util.new(record, parsed_field.path, new_date_time) + return record diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/manifest.yaml b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/manifest.yaml new file mode 100644 index 000000000000..4b06dd2f882f --- /dev/null +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/manifest.yaml @@ -0,0 +1,338 @@ +version: 0.50.2 +type: DeclarativeSource + +check: + type: CheckStream + stream_names: + - customers + +definitions: + selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - data + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: page + page_size_option: + inject_into: request_parameter + field_name: limit + type: RequestOption + pagination_strategy: + type: PageIncrement + start_from_page: 1 + page_size: 250 + date_modified_incremental_sync: + type: DatetimeBasedCursor + cursor_field: date_modified + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + - "%Y-%m-%dT%H:%M:%S+00:00" + datetime_format: "%Y-%m-%d" + start_datetime: + type: MinMaxDatetime + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%d" + start_time_option: + inject_into: request_parameter + field_name: date_modified:min + type: RequestOption + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + base_id_incremental_sync: + type: DatetimeBasedCursor + cursor_field: id + cursor_datetime_formats: + - "%s" + datetime_format: "%Y-%m-%d" + start_datetime: + type: MinMaxDatetime + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%d" + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + id_incremental_sync: + $ref: "#/definitions/base_id_incremental_sync" + start_time_option: + type: RequestOption + field_name: date_modified:min + inject_into: request_parameter + order_id_partition_router: + - type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: id + partition_field: order_id + stream: + $ref: "#/definitions/orders_stream" + requester: + type: HttpRequester + url_base: https://api.bigcommerce.com/stores/{{ config["store_hash"] }}/ + http_method: GET + request_headers: + Accept: application/json + Content-Type: application/json + authenticator: + type: ApiKeyAuthenticator + api_token: '{{ config["access_token"] }}' + inject_into: + type: RequestOption + inject_into: header + field_name: X-Auth-Token + request_body_json: {} + customers_stream: + type: DeclarativeStream + name: customers + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v3/customers + request_parameters: + sort: date_modified:asc + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/date_modified_incremental_sync" + orders_stream: + type: DeclarativeStream + name: orders + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v2/orders + request_parameters: + sort: date_modified:asc + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: date_modified + cursor_datetime_formats: + - "%Y-%m-%dT%H:%M:%SZ" + - "%Y-%m-%dT%H:%M:%S+00:00" + datetime_format: "%Y-%m-%d" + start_datetime: + type: MinMaxDatetime + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%d" + start_time_option: + inject_into: request_parameter + field_name: min_date_modified + type: RequestOption + end_datetime: + type: MinMaxDatetime + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}" + datetime_format: "%Y-%m-%dT%H:%M:%SZ" + transformations: + - type: CustomTransformation + class_name: source_bigcommerce.components.DateTimeTransformer + fields: + - path: + - date_modified + value: "{{ record.date_modified }}" + transactions_stream: + type: DeclarativeStream + name: transactions + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v2/orders/{{ stream_partition.order_id }}/transactions + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + partition_router: + $ref: "#/definitions/order_id_partition_router" + incremental_sync: + $ref: "#/definitions/id_incremental_sync" + pages_stream: + type: DeclarativeStream + name: pages + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v3/content/pages + request_parameters: + sort: date_modified:asc + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/id_incremental_sync" + products_stream: + type: DeclarativeStream + name: products + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v3/catalog/products + request_parameters: + sort: date_modified + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/date_modified_incremental_sync" + channels_stream: + type: DeclarativeStream + name: channels + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: /v3/channels + request_parameters: + sort: date_modified + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/date_modified_incremental_sync" + store_stream: + type: DeclarativeStream + name: store + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v2/store + request_parameters: + sort: date_modified:asc + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + paginator: + $ref: "#/definitions/paginator" + order_products_stream: + type: DeclarativeStream + name: order_products + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v2/orders/{{ stream_partition.order_id }}/products + request_parameters: + sort: date_modified:asc + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + paginator: + $ref: "#/definitions/paginator" + partition_router: + $ref: "#/definitions/order_id_partition_router" + incremental_sync: + $ref: "#/definitions/base_id_incremental_sync" + brands_stream: + type: DeclarativeStream + name: brands + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v3/catalog/brands + request_parameters: + sort: id + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/base_id_incremental_sync" + categories_stream: + type: DeclarativeStream + name: categories + primary_key: "id" + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/requester" + path: v3/catalog/categories + request_parameters: + sort: id + record_selector: + $ref: "#/definitions/selector" + paginator: + $ref: "#/definitions/paginator" + incremental_sync: + $ref: "#/definitions/base_id_incremental_sync" + +streams: + - "#/definitions/customers_stream" + - "#/definitions/orders_stream" + - "#/definitions/transactions_stream" + - "#/definitions/pages_stream" + - "#/definitions/products_stream" + - "#/definitions/channels_stream" + - "#/definitions/store_stream" + - "#/definitions/order_products_stream" + - "#/definitions/brands_stream" + - "#/definitions/categories_stream" + +spec: + documentation_url: https://docs.airbyte.com/integrations/sources/bigcommerce + type: Spec + connection_specification: + additionalProperties: true + $schema: http://json-schema.org/draft-07/schema# + type: object + required: + - start_date + - access_token + - store_hash + properties: + start_date: + type: string + title: Start date + description: "The date you would like to replicate data. Format: YYYY-MM-DD." + examples: ["2021-01-01"] + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ + order: 0 + access_token: + type: string + title: Access Token + description: "Access Token for making authenticated requests." + airbyte_secret: true + order: 1 + store_hash: + title: Store Hash + description: >- + The hash code of the store. For https://api.bigcommerce.com/stores/HASH_CODE/v3/, The store's hash code is 'HASH_CODE'. + type: string + order: 2 diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/categories.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/categories.json index 83db91ea3cca..6b26ee372e55 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/categories.json +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/categories.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "additionalProperties": true, "properties": { "id": { "type": ["null", "integer"] @@ -47,7 +48,7 @@ "default_product_sort": { "type": ["null", "string"] }, - "url": { + "custom_url": { "type": ["null", "object"], "properties": { "path": { diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/channels.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/channels.json index 1cc51924ea59..6e6e1d09f59c 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/channels.json +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/channels.json @@ -36,6 +36,9 @@ }, "icon_url": { "type": ["null", "string"] + }, + "is_enabled": { + "type": ["null", "boolean"] } } } diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/customers.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/customers.json index c5b367d15997..e00906cff851 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/customers.json +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/customers.json @@ -1,6 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "additionalProperties": true, "properties": { "email": { "type": ["null", "string"] @@ -58,6 +59,7 @@ "type": ["null", "array"], "items": { "type": ["null", "object"], + "additionalProperties": true, "properties": { "first_name": { "type": ["null", "string"] @@ -108,7 +110,7 @@ "type": ["null", "object"], "properties": { "name": { - "type": ["name", "string"] + "type": ["null", "string"] }, "value": { "oneOf": [ @@ -126,7 +128,7 @@ "type": ["null", "object"], "properties": { "name": { - "type": ["name", "string"] + "type": ["null", "string"] }, "value": { "oneOf": [ @@ -158,6 +160,9 @@ }, "channel_ids": { "type": ["null", "array"] + }, + "origin_channel_id": { + "type": ["null", "integer"] } } } diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/pages.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/pages.json index 003984b52eea..00fded5a8333 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/pages.json +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/pages.json @@ -58,6 +58,6 @@ }, "id": { "type": ["null", "integer"] - } + } } } diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/store.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/store.json index 66955e00e224..22a6188fa281 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/store.json +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/schemas/store.json @@ -35,6 +35,9 @@ "country": { "type": ["null", "string"] }, + "country_code": { + "type": ["null", "string"] + }, "phone": { "type": ["null", "string"] }, @@ -91,7 +94,7 @@ "type": ["null", "string"] }, "decimal_places": { - "type": ["null", "string"] + "type": ["null", "integer"] }, "currency_symbol_location": { "type": ["null", "string"] @@ -103,7 +106,7 @@ "type": ["null", "string"] }, "dimension_decimal_places": { - "type": ["null", "string"] + "type": ["null", "integer"] }, "dimension_decimal_token": { "type": ["null", "string"] @@ -117,6 +120,9 @@ "plan_level": { "type": ["null", "string"] }, + "plan_is_trial": { + "type": ["null", "boolean"] + }, "industry": { "type": ["null", "string"] }, diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/source.py b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/source.py index a31e25e705ca..997d0eb20418 100644 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/source.py +++ b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/source.py @@ -2,361 +2,17 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # +from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource -from abc import ABC -from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional, Tuple +""" +This file provides the necessary constructs to interpret a provided declarative YAML configuration file into +source connector. -import pendulum -import requests -from airbyte_cdk.models import SyncMode -from airbyte_cdk.sources import AbstractSource -from airbyte_cdk.sources.streams import Stream -from airbyte_cdk.sources.streams.http import HttpStream -from airbyte_cdk.sources.streams.http.auth import HttpAuthenticator -from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer +WARNING: Do not modify this file. +""" -class BigcommerceStream(HttpStream, ABC): - # Latest Stable Release - api_version = "v3" - # Page size - limit = 250 - # Define primary key as sort key for full_refresh, or very first sync for incremental_refresh - primary_key = "id" - order_field = "date_modified:asc" - filter_field = "date_modified:min" - data = "data" - - transformer: TypeTransformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization | TransformConfig.CustomSchemaNormalization) - - def __init__(self, start_date: str, store_hash: str, access_token: str, **kwargs): - super().__init__(**kwargs) - self.start_date = start_date - self.store_hash = store_hash - self.access_token = access_token - - @transformer.registerCustomTransform - def transform_function(original_value: Any, field_schema: Dict[str, Any]) -> Any: - """ - This functions tries to handle the various date-time formats BigCommerce API returns and normalize the values to isoformat. - """ - if "format" in field_schema and field_schema["format"] == "date-time": - if not original_value: # Some dates are empty strings: "". - return None - transformed_value = None - supported_formats = ["YYYY-MM-DD", "YYYY-MM-DDTHH:mm:ssZZ", "YYYY-MM-DDTHH:mm:ss[Z]", "ddd, D MMM YYYY HH:mm:ss ZZ"] - for format in supported_formats: - try: - transformed_value = str(pendulum.from_format(original_value, format)) # str() returns isoformat - except ValueError: - continue - if not transformed_value: - raise ValueError(f"Unsupported date-time format for {original_value}") - return transformed_value - return original_value - - @property - def url_base(self) -> str: - return f"https://api.bigcommerce.com/stores/{self.store_hash}/{self.api_version}/" - - def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]: - json_response = response.json() - meta = json_response.get("meta", None) - if meta: - pagination = meta.get("pagination", None) - if pagination and pagination.get("current_page") < pagination.get("total_pages"): - return dict(page=pagination.get("current_page") + 1) - else: - return None - - def request_params( - self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None - ) -> MutableMapping[str, Any]: - params = {"limit": self.limit} - params.update({"sort": self.order_field}) - if next_page_token: - params.update(**next_page_token) - else: - params[self.filter_field] = self.start_date - return params - - def request_headers( - self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None - ) -> Mapping[str, Any]: - headers = super().request_headers(stream_state=stream_state, stream_slice=stream_slice, next_page_token=next_page_token) - headers.update({"Accept": "application/json", "Content-Type": "application/json"}) - return headers - - def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]: - json_response = response.json() - records = json_response.get(self.data, []) if self.data is not None else json_response - yield from records - - -class IncrementalBigcommerceStream(BigcommerceStream, ABC): - # Getting page size as 'limit' from parent class - @property - def limit(self): - return super().limit - - # Setting the check point interval to the limit of the records output - state_checkpoint_interval = limit - # Setting the default cursor field for all streams - cursor_field = "date_modified" - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, ""), current_stream_state.get(self.cursor_field, ""))} - - def request_params(self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs): - params = super().request_params(stream_state=stream_state, next_page_token=next_page_token, **kwargs) - # If there is a next page token then we should only send pagination-related parameters. - if stream_state: - params[self.filter_field] = stream_state.get(self.cursor_field) - else: - params[self.filter_field] = self.start_date - return params - - def filter_records_newer_than_state(self, stream_state: Mapping[str, Any] = None, records_slice: Mapping[str, Any] = None) -> Iterable: - if stream_state: - for record in records_slice: - if record[self.cursor_field] >= stream_state.get(self.cursor_field): - yield record - else: - yield from records_slice - - -class OrderSubstream(IncrementalBigcommerceStream): - def read_records( - self, stream_state: Mapping[str, Any] = None, stream_slice: Optional[Mapping[str, Any]] = None, **kwargs - ) -> Iterable[Mapping[str, Any]]: - orders_stream = Orders( - authenticator=self.authenticator, start_date=self.start_date, store_hash=self.store_hash, access_token=self.access_token - ) - for data in orders_stream.read_records(sync_mode=SyncMode.full_refresh): - slice = super().read_records(stream_slice={"order_id": data["id"]}, **kwargs) - yield from self.filter_records_newer_than_state(stream_state=stream_state, records_slice=slice) - - -class Customers(IncrementalBigcommerceStream): - data_field = "customers" - - def path(self, **kwargs) -> str: - return f"{self.data_field}" - - -class Products(IncrementalBigcommerceStream): - data_field = "products" - # Override `order_field` because Products API does not accept `asc` value - order_field = "date_modified" - - def path(self, **kwargs) -> str: - return f"catalog/{self.data_field}" - - -class Orders(IncrementalBigcommerceStream): - data_field = "orders" - api_version = "v2" - order_field = "date_modified:asc" - filter_field = "min_date_modified" - page = 1 - - def path(self, **kwargs) -> str: - return f"{self.data_field}" - - def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]: - return response.json() if len(response.content) > 0 else [] - - def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]: - if len(response.content) > 0 and len(response.json()) == self.limit: - self.page = self.page + 1 - return dict(page=self.page) - else: - return None - - -class Pages(IncrementalBigcommerceStream): - data_field = "pages" - cursor_field = "id" - - def path(self, **kwargs) -> str: - return f"content/{self.data_field}" - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, 0), current_stream_state.get(self.cursor_field, 0))} - - def read_records( - self, stream_state: Mapping[str, Any] = None, stream_slice: Optional[Mapping[str, Any]] = None, **kwargs - ) -> Iterable[Mapping[str, Any]]: - slice = super().read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice, stream_state=stream_state) - yield from self.filter_records_newer_than_state(stream_state=stream_state, records_slice=slice) - - -class Brands(IncrementalBigcommerceStream): - data_field = "brands" - cursor_field = "id" - order_field = "id" - - def path(self, **kwargs) -> str: - return f"catalog/{self.data_field}" - - def request_params( - self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None - ) -> MutableMapping[str, Any]: - params = {"limit": self.limit} - params.update({"sort": self.order_field}) - if next_page_token: - params.update(**next_page_token) - return params - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, 0), current_stream_state.get(self.cursor_field, 0))} - - def read_records( - self, stream_state: Mapping[str, Any] = None, stream_slice: Optional[Mapping[str, Any]] = None, **kwargs - ) -> Iterable[Mapping[str, Any]]: - slice = super().read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice, stream_state=stream_state) - yield from self.filter_records_newer_than_state(stream_state=stream_state, records_slice=slice) - - -class Categories(IncrementalBigcommerceStream): - data_field = "categories" - cursor_field = "id" - order_field = "id" - - def path(self, **kwargs) -> str: - return f"catalog/{self.data_field}" - - def request_params( - self, stream_state: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_page_token: Mapping[str, Any] = None - ) -> MutableMapping[str, Any]: - params = {"limit": self.limit} - params.update({"sort": self.order_field}) - if next_page_token: - params.update(**next_page_token) - return params - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, 0), current_stream_state.get(self.cursor_field, 0))} - - def read_records( - self, stream_state: Mapping[str, Any] = None, stream_slice: Optional[Mapping[str, Any]] = None, **kwargs - ) -> Iterable[Mapping[str, Any]]: - slice = super().read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice, stream_state=stream_state) - yield from self.filter_records_newer_than_state(stream_state=stream_state, records_slice=slice) - - -class Transactions(OrderSubstream): - data_field = "transactions" - cursor_field = "id" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - order_id = stream_slice["order_id"] - return f"orders/{order_id}/{self.data_field}" - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, 0), current_stream_state.get(self.cursor_field, 0))} - - def request_params( - self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs - ) -> MutableMapping[str, Any]: - params = {"limit": self.limit} - return params - - -class OrderProducts(OrderSubstream): - api_version = "v2" - data_field = "products" - cursor_field = "id" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - order_id = stream_slice["order_id"] - return f"orders/{order_id}/{self.data_field}" - - def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: - return {self.cursor_field: max(latest_record.get(self.cursor_field, 0), current_stream_state.get(self.cursor_field, 0))} - - def request_params( - self, stream_state: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs - ) -> MutableMapping[str, Any]: - params = {"limit": self.limit} - return params - - def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]: - return response.json() if len(response.content) > 0 else [] - - def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]: - if len(response.content) > 0 and len(response.json()) == self.limit: - self.page = self.page + 1 - return dict(page=self.page) - else: - return None - - -class Channels(IncrementalBigcommerceStream): - data_field = "channels" - # Override `order_field` bacause Channels API do not acept `asc` value - order_field = "date_modified" - - def path(self, **kwargs) -> str: - return f"{self.data_field}" - - -class Store(BigcommerceStream): - data_field = "store" - cursor_field = "store_id" - api_version = "v2" - data = None - - def path(self, **kwargs) -> str: - return f"{self.data_field}" - - def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]: - json_response = response.json() - yield from [json_response] - - -class BigcommerceAuthenticator(HttpAuthenticator): - def __init__(self, token: str): - self.token = token - - def get_auth_header(self) -> Mapping[str, Any]: - return {"X-Auth-Token": f"{self.token}"} - - -class SourceBigcommerce(AbstractSource): - def check_connection(self, logger, config) -> Tuple[bool, any]: - store_hash = config["store_hash"] - access_token = config["access_token"] - api_version = "v3" - - headers = {"X-Auth-Token": access_token, "Accept": "application/json", "Content-Type": "application/json"} - url = f"https://api.bigcommerce.com/stores/{store_hash}/{api_version}/channels" - - try: - session = requests.get(url, headers=headers) - session.raise_for_status() - return True, None - except requests.exceptions.RequestException as e: - return False, e - - def streams(self, config: Mapping[str, Any]) -> List[Stream]: - - auth = BigcommerceAuthenticator(token=config["access_token"]) - args = { - "authenticator": auth, - "start_date": config["start_date"], - "store_hash": config["store_hash"], - "access_token": config["access_token"], - } - return [ - Customers(**args), - Pages(**args), - Orders(**args), - Transactions(**args), - Products(**args), - Channels(**args), - Store(**args), - OrderProducts(**args), - Brands(**args), - Categories(**args), - ] +# Declarative Source +class SourceBigcommerce(YamlDeclarativeSource): + def __init__(self): + super().__init__(**{"path_to_yaml": "manifest.yaml"}) diff --git a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/spec.json b/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/spec.json deleted file mode 100644 index 02b6ddf1f69f..000000000000 --- a/airbyte-integrations/connectors/source-bigcommerce/source_bigcommerce/spec.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "documentationUrl": "https://docs.airbyte.com/integrations/sources/bigcommerce", - "connectionSpecification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "BigCommerce Source CDK Specifications", - "type": "object", - "required": ["start_date", "store_hash", "access_token"], - "additionalProperties": true, - "properties": { - "start_date": { - "type": "string", - "title": "Start Date", - "description": "The date you would like to replicate data. Format: YYYY-MM-DD.", - "examples": ["2021-01-01"], - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "store_hash": { - "type": "string", - "title": "Store Hash", - "description": "The hash code of the store. For https://api.bigcommerce.com/stores/HASH_CODE/v3/, The store's hash code is 'HASH_CODE'." - }, - "access_token": { - "type": "string", - "title": "Access Token", - "description": "Access Token for making authenticated requests.", - "airbyte_secret": true - } - } - } -} diff --git a/docs/integrations/sources/bigcommerce.md b/docs/integrations/sources/bigcommerce.md index 968597242761..251d0e4376eb 100644 --- a/docs/integrations/sources/bigcommerce.md +++ b/docs/integrations/sources/bigcommerce.md @@ -55,6 +55,7 @@ BigCommerce has some [rate limit restrictions](https://developer.bigcommerce.com | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:------------------------------------------------------------| +| 0.2.0 | 2023-08-16 | [29469](https://github.com/airbytehq/airbyte/pull/29469) | Migrate Python CDK to Low Code | | 0.1.10 | 2022-12-16 | [20518](https://github.com/airbytehq/airbyte/pull/20518) | Add brands and categories streams | | 0.1.9 | 2022-12-15 | [20540](https://github.com/airbytehq/airbyte/pull/20540) | Rebuild on CDK 0.15.0 | | 0.1.8 | 2022-12-15 | [20090](https://github.com/airbytehq/airbyte/pull/20090) | Add order_products stream |