From f17a3cc19f1b5520ec53b177e9a9e01bd8253597 Mon Sep 17 00:00:00 2001 From: btkcodedev Date: Wed, 12 Jun 2024 01:06:07 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BSource=20Square:=20Add=20error=20ha?= =?UTF-8?q?ndlers,=20migrate=20to=20inline=20schema=20and=20move=20spec=20?= =?UTF-8?q?(#39377)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connectors/source-square/metadata.yaml | 2 +- .../connectors/source-square/pyproject.toml | 2 +- .../source-square/source_square/manifest.yaml | 2760 ++++++++++++++++- .../source_square/schemas/TODO.md | 19 - .../source_square/schemas/bank_accounts.json | 46 - .../source_square/schemas/cash_drawers.json | 59 - .../source_square/schemas/categories.json | 31 - .../source_square/schemas/customers.json | 115 - .../source_square/schemas/discounts.json | 63 - .../source_square/schemas/inventory.json | 26 - .../source_square/schemas/items.json | 192 -- .../source_square/schemas/locations.json | 91 - .../source_square/schemas/loyalty.json | 43 - .../source_square/schemas/modifier_list.json | 88 - .../source_square/schemas/orders.json | 874 ------ .../source_square/schemas/payments.json | 202 -- .../source_square/schemas/refunds.json | 66 - .../source_square/schemas/shifts.json | 86 - .../source_square/schemas/taxes.json | 58 - .../schemas/team_member_wages.json | 25 - .../source_square/schemas/team_members.json | 43 - .../source-square/source_square/spec.yaml | 115 - docs/integrations/sources/square.md | 1 + 23 files changed, 2756 insertions(+), 2251 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/TODO.md delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/bank_accounts.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/cash_drawers.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/categories.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/customers.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/discounts.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/inventory.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/items.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/locations.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/loyalty.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/modifier_list.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/orders.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/payments.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/refunds.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/shifts.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/taxes.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/team_member_wages.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/schemas/team_members.json delete mode 100644 airbyte-integrations/connectors/source-square/source_square/spec.yaml diff --git a/airbyte-integrations/connectors/source-square/metadata.yaml b/airbyte-integrations/connectors/source-square/metadata.yaml index f3564bf99f92..7665210737f6 100644 --- a/airbyte-integrations/connectors/source-square/metadata.yaml +++ b/airbyte-integrations/connectors/source-square/metadata.yaml @@ -11,7 +11,7 @@ data: connectorSubtype: api connectorType: source definitionId: 77225a51-cd15-4a13-af02-65816bd0ecf4 - dockerImageTag: 1.6.2 + dockerImageTag: 1.6.3 dockerRepository: airbyte/source-square documentationUrl: https://docs.airbyte.com/integrations/sources/square githubIssueLabel: source-square diff --git a/airbyte-integrations/connectors/source-square/pyproject.toml b/airbyte-integrations/connectors/source-square/pyproject.toml index 368073a3e6b4..3464797c2edd 100644 --- a/airbyte-integrations/connectors/source-square/pyproject.toml +++ b/airbyte-integrations/connectors/source-square/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "1.6.2" +version = "1.6.3" name = "source-square" description = "Source implementation for Square." authors = [ "Airbyte ",] diff --git a/airbyte-integrations/connectors/source-square/source_square/manifest.yaml b/airbyte-integrations/connectors/source-square/source_square/manifest.yaml index f32c8ec2293c..f2c981c7915b 100644 --- a/airbyte-integrations/connectors/source-square/source_square/manifest.yaml +++ b/airbyte-integrations/connectors/source-square/source_square/manifest.yaml @@ -1,9 +1,6 @@ version: "0.81.4" definitions: - schema_loader: - type: JsonFileSchemaLoader - file_path: "./source_square/schemas/{{ parameters['name'] }}.json" oauth_authenticator: type: OAuthAuthenticator token_refresh_endpoint: https://connect.squareup.com/oauth2/token @@ -20,7 +17,9 @@ definitions: field_path: ["{{ parameters['name'] }}"] requester: - url_base: "{{ 'https://connect.squareupsandbox.com/v2' if config['is_sandbox'] else 'https://connect.squareup.com/v2' }}" + url_base: + "{{ 'https://connect.squareupsandbox.com/v2' if config['is_sandbox'] + else 'https://connect.squareup.com/v2' }}" http_method: "GET" authenticator: type: SelectiveAuthenticator @@ -31,6 +30,29 @@ definitions: request_headers: Square-Version: "2022-10-19" Content-Type: "application/json" + error_handler: + type: CompositeErrorHandler + error_handlers: + - type: DefaultErrorHandler + backoff_strategies: + - type: "ConstantBackoffStrategy" + backoff_time_in_seconds: 30 + response_filters: + - type: HttpResponseFilter + action: IGNORE + http_codes: + - 404 + - 403 + - type: HttpResponseFilter + action: FAIL + http_codes: + - 401 + error_message: Failed to authorize request. Please update your access token to continue using the source. + - type: HttpResponseFilter + action: RETRY + http_codes: + - 429 + retriever: record_selector: $ref: "#/definitions/selector" @@ -60,7 +82,9 @@ definitions: incremental_sync: type: DatetimeBasedCursor start_datetime: - datetime: "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') }}" + datetime: + "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') + }}" datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" end_datetime: datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%S.%fZ') }}" @@ -104,7 +128,9 @@ definitions: incremental_sync: type: DatetimeBasedCursor start_datetime: - datetime: "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') }}" + datetime: + "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') + }}" datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" end_datetime: datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%S.%fZ') }}" @@ -166,6 +192,149 @@ definitions: sort_order: ASC sort_field: CREATED_AT + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + cards: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + id: + type: + - "null" + - string + card_brand: + type: + - "null" + - string + last_4: + type: + - "null" + - string + exp_month: + type: + - "null" + - integer + exp_year: + type: + - "null" + - integer + cardholder_name: + type: + - "null" + - string + billing_address: + type: + - "null" + - object + properties: + postal_code: + type: + - "null" + - string + given_name: + type: + - "null" + - string + family_name: + type: + - "null" + - string + email_address: + type: + - "null" + - string + address: + type: + - "null" + - object + properties: + address_line_1: + type: + - "null" + - string + address_line_2: + type: + - "null" + - string + locality: + type: + - "null" + - string + administrative_district_level_1: + type: + - "null" + - string + postal_code: + type: + - "null" + - string + phone_number: + type: + - "null" + - string + reference_id: + type: + - "null" + - string + company_name: + type: + - "null" + - string + preferences: + type: + - "null" + - object + properties: + email_unsubscribed: + type: boolean + creation_source: + type: + - "null" + - string + birthday: + type: + - "null" + - string + segment_ids: + type: + - "null" + - array + items: + type: + - "null" + - string + group_ids: + type: + - "null" + - array + items: + type: + - "null" + - string + version: + type: + - "null" + - integer shifts_stream: $ref: "#/definitions/base_stream_page_json_limit" $parameters: @@ -181,6 +350,114 @@ definitions: inject_into: "body_json" field_name: "limit" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + employee_id: + type: + - "null" + - string + location_id: + type: + - "null" + - string + timezone: + type: + - "null" + - string + start_at: + type: + - "null" + - string + end_at: + type: + - "null" + - string + wage: + type: + - "null" + - object + properties: + title: + type: + - "null" + - string + hourly_rate: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + breaks: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + id: + type: + - "null" + - string + start_at: + type: + - "null" + - string + end_at: + type: + - "null" + - string + break_type_id: + type: + - "null" + - string + name: + type: + - "null" + - string + expected_duration: + type: + - "null" + - string + is_paid: + type: + - "null" + - boolean + status: + type: + - "null" + - string + version: + type: + - "null" + - integer + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + team_member_id: + type: + - "null" + - string team_members_stream: $ref: "#/definitions/base_stream_page_json_limit" $parameters: @@ -188,6 +465,60 @@ definitions: primary_key: "id" path: "/team-members/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + is_owner: + type: + - "null" + - boolean + status: + type: + - "null" + - string + given_name: + type: + - "null" + - string + family_name: + type: + - "null" + - string + email_address: + type: + - "null" + - string + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + assigned_locations: + type: + - "null" + - object + properties: + assignment_type: + type: + - "null" + - string + reference_id: + type: + - "null" + - string + phone_number: + type: + - "null" + - string inventory_stream: $ref: "#/definitions/base_stream" $parameters: @@ -205,6 +536,38 @@ definitions: $ref: "#/definitions/selector" extractor: field_path: ["counts"] + schema_loader: + type: InlineSchemaLoader + schema: + $schema: http://json-schema.org/draft-07/schema# + title: Inventory Schema + additionalProperties: true + type: object + properties: + catalog_object_id: + type: + - string + - "null" + catalog_object_type: + type: + - string + - "null" + state: + type: + - string + - "null" + location_id: + type: + - string + - "null" + quantity: + type: + - string + - "null" + calculated_at: + type: + - string + - "null" team_member_wages_stream: $ref: "#/definitions/base_stream" @@ -222,6 +585,36 @@ definitions: paginator: pagination_strategy: page_size: 200 + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + team_member_id: + type: + - "null" + - string + title: + type: + - "null" + - string + hourly_rate: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string locations_stream: $ref: "#/definitions/base_stream" $parameters: @@ -229,6 +622,124 @@ definitions: primary_key: "id" path: "/locations" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + name: + type: + - "null" + - string + address: + type: + - "null" + - object + properties: + address_line_1: + type: + - "null" + - string + locality: + type: + - "null" + - string + administrative_district_level_1: + type: + - "null" + - string + postal_code: + type: + - "null" + - string + country: + type: + - "null" + - string + timezone: + type: + - "null" + - string + capabilities: + type: + - "null" + - array + items: + type: + - "null" + - string + status: + type: + - "null" + - string + created_at: + type: + - "null" + - string + merchant_id: + type: + - "null" + - string + country: + type: + - "null" + - string + language_code: + type: + - "null" + - string + currency: + type: + - "null" + - string + phone_number: + type: + - "null" + - string + business_name: + type: + - "null" + - string + type: + type: + - "null" + - string + website_url: + type: + - "null" + - string + business_hours: + type: + - "null" + - object + business_email: + type: + - "null" + - string + description: + type: + - "null" + - string + twitter_username: + type: + - "null" + - string + instagram_username: + type: + - "null" + - string + facebook_url: + type: + - "null" + - string + mcc: + type: + - "null" + - string locations_partition_router: type: SubstreamPartitionRouter parent_stream_configs: @@ -254,6 +765,77 @@ definitions: $ref: "#/definitions/selector" extractor: field_path: ["cash_drawer_shifts"] + schema_loader: + type: InlineSchemaLoader + schema: + $schema: http://json-schema.org/draft-07/schema# + title: Cash Drawer Shifts Schema + additionalProperties: true + type: object + properties: + id: + type: + - string + - "null" + state: + type: + - string + - "null" + opened_at: + type: + - string + - "null" + ended_at: + type: + - string + - "null" + closed_at: + type: + - string + - "null" + description: + type: + - string + - "null" + opened_cash_money: + type: + - object + - "null" + properties: + amount: + type: + - number + - "null" + currency: + type: + - string + - "null" + expected_cash_money: + type: + - object + - "null" + properties: + amount: + type: + - number + - "null" + currency: + type: + - string + - "null" + closed_cash_money: + type: + - object + - "null" + properties: + amount: + type: + - number + - "null" + currency: + type: + - string + - "null" categories_stream: $ref: "#/definitions/base_catalog_objects_stream" @@ -262,6 +844,44 @@ definitions: object_type: "CATEGORY" path: "/catalog/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + category_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string items_stream: $ref: "#/definitions/base_catalog_objects_stream" $parameters: @@ -269,6 +889,247 @@ definitions: object_type: "ITEM" path: "/catalog/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + custom_attribute_values: + type: + - "null" + - object + present_at_all_locations: + type: + - "null" + - boolean + item_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + description: + type: + - "null" + - string + visibility: + type: + - "null" + - string + category_id: + type: + - "null" + - string + modifier_list_info: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + modifier_list_id: + type: + - "null" + - string + visibility: + type: + - "null" + - string + min_selected_modifiers: + type: + - "null" + - integer + max_selected_modifiers: + type: + - "null" + - integer + enabled: + type: + - "null" + - boolean + variations: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + item_variation_data: + type: + - "null" + - object + properties: + item_id: + type: + - "null" + - string + name: + type: + - "null" + - string + sku: + type: + - "null" + - string + ordinal: + type: + - "null" + - integer + pricing_type: + type: + - "null" + - string + price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + location_overrides: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + location_id: + type: + - "null" + - string + track_inventory: + type: + - "null" + - boolean + item_option_values: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + item_option_id: + type: + - "null" + - string + item_option_value_id: + type: + - "null" + - string + present_at_location_ids: + type: + - "null" + - array + items: + type: + - "null" + - string + product_type: + type: + - "null" + - string + skip_modifier_screen: + type: + - "null" + - boolean + item_options: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + item_option_id: + type: + - "null" + - string + ecom_visibility: + type: + - "null" + - string + tax_ids: + type: + - "null" + - array + items: + type: + - "null" + - string + image_id: + type: + - "null" + - string + present_at_location_ids: + type: + - "null" + - array + items: + type: + - "null" + - string discounts_stream: $ref: "#/definitions/base_catalog_objects_stream" $parameters: @@ -276,6 +1137,85 @@ definitions: object_type: "DISCOUNT" path: "/catalog/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + present_at_location_ids: + type: + - "null" + - array + items: + type: + - "null" + - string + discount_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + discount_type: + type: + - "null" + - string + percentage: + type: + - "null" + - string + application_method: + type: + - "null" + - string + modify_tax_basis: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + pin_required: + type: + - "null" + - boolean taxes_stream: $ref: "#/definitions/base_catalog_objects_stream" $parameters: @@ -283,6 +1223,80 @@ definitions: object_type: "TAX" path: "/catalog/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + tax_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + calculation_phase: + type: + - "null" + - string + inclusion_type: + type: + - "null" + - string + percentage: + type: + - "null" + - string + applies_to_custom_amounts: + type: + - "null" + - boolean + enabled: + type: + - "null" + - boolean + tax_type_id: + type: + - "null" + - string + tax_type_name: + type: + - "null" + - string + absent_at_location_ids: + type: + - "null" + - array + items: + type: + - "null" + - string modifier_list_stream: $ref: "#/definitions/base_catalog_objects_stream" $parameters: @@ -290,6 +1304,115 @@ definitions: object_type: "MODIFIER_LIST" path: "/catalog/search" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + modifier_list_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + selection_type: + type: + - "null" + - string + modifiers: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + type: + type: + - "null" + - string + id: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + version: + type: + - "null" + - integer + is_deleted: + type: + - "null" + - boolean + present_at_all_locations: + type: + - "null" + - boolean + modifier_data: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + on_by_default: + type: + - "null" + - boolean + ordinal: + type: + - "null" + - integer + modifier_list_id: + type: + - "null" + - string refunds_stream: $ref: "#/definitions/base_incremental_stream" $parameters: @@ -299,6 +1422,89 @@ definitions: retriever: $ref: "#/definitions/base_incremental_stream/retriever" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + status: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + required: + - amount + - currency + payment_id: + type: + - "null" + - string + order_id: + type: + - "null" + - string + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + location_id: + type: + - "null" + - string + reason: + type: + - "null" + - string + processing_fee: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + effective_at: + type: + - "null" + - string + type: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string payments_stream: $ref: "#/definitions/base_incremental_stream" $parameters: @@ -308,6 +1514,257 @@ definitions: retriever: $ref: "#/definitions/base_incremental_stream/retriever" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + customer_id: + type: + - "null" + - string + status: + type: + - "null" + - string + delay_duration: + type: + - "null" + - string + source_type: + type: + - "null" + - string + card_details: + type: + - "null" + - object + properties: + status: + type: + - "null" + - string + card: + type: + - "null" + - object + properties: + card_brand: + type: + - "null" + - string + last_4: + type: + - "null" + - string + exp_month: + type: + - "null" + - integer + exp_year: + type: + - "null" + - integer + fingerprint: + type: + - "null" + - string + card_type: + type: + - "null" + - string + prepaid_type: + type: + - "null" + - string + bin: + type: + - "null" + - string + entry_method: + type: + - "null" + - string + cvv_status: + type: + - "null" + - string + avs_status: + type: + - "null" + - string + statement_description: + type: + - "null" + - string + card_payment_timeline: + type: + - "null" + - object + properties: + authorized_at: + type: + - "null" + - string + captured_at: + type: + - "null" + - string + voided_at: + type: + - "null" + - string + location_id: + type: + - "null" + - string + order_id: + type: + - "null" + - string + risk_evaluation: + type: + - "null" + - object + properties: + created_at: + type: + - "null" + - string + risk_level: + type: + - "null" + - string + processing_fee: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + effective_at: + type: + - "null" + - string + type: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + approved_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + receipt_number: + type: + - "null" + - string + receipt_url: + type: + - "null" + - string + delay_action: + type: + - "null" + - string + delayed_until: + type: + - "null" + - string + version_token: + type: + - "null" + - string + note: + type: + - "null" + - string + employee_id: + type: + - "null" + - string + refunded_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + refund_ids: + type: + - "null" + - array + items: + type: + - "null" + - string loyalty_stream: $ref: "#/definitions/base_stream" $parameters: @@ -325,6 +1782,59 @@ definitions: $ref: "#/definitions/selector" extractor: field_path: ["loyalty_accounts"] + schema_loader: + type: InlineSchemaLoader + schema: + $schema: http://json-schema.org/draft-07/schema# + title: Loyalty schema + type: object + additionalProperties: true + properties: + id: + type: + - string + - "null" + mapping: + type: + - object + - "null" + properties: + id: + type: + - string + - "null" + phone_number: + type: + - string + - "null" + created_at: + type: + - string + - "null" + program_id: + type: + - string + - "null" + balance: + type: + - number + - "null" + lifetime_points: + type: + - number + - "null" + customer_id: + type: + - string + - "null" + created_at: + type: + - string + - "null" + updated_at: + type: + - string + - "null" orders_stream: # ToDo: Improve the efficiency of this stream by grouping location IDs into batches of 10. @@ -336,7 +1846,9 @@ definitions: incremental_sync: type: DatetimeBasedCursor start_datetime: - datetime: "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') }}" + datetime: + "{{ format_datetime(config['start_date'], '%Y-%m-%dT%H:%M:%S.%fZ') + }}" datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" step: P30D datetime_format: "%Y-%m-%dT%H:%M:%S.%fZ" @@ -364,6 +1876,1063 @@ definitions: parent_key: "id" partition_field: "location_ids" + schema_loader: + type: InlineSchemaLoader + schema: + type: object + properties: + id: + type: + - "null" + - string + location_id: + type: + - "null" + - string + customer_id: + type: + - "null" + - string + line_items: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + catalog_object_id: + type: + - "null" + - string + quantity: + type: + - "null" + - string + name: + type: + - "null" + - string + variation_name: + type: + - "null" + - string + base_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + gross_sales_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_discount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + variation_total_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + item_type: + type: + - "null" + - string + modifiers: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + base_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + name: + type: + - "null" + - string + catalog_object_id: + type: + - "null" + - string + applied_discounts: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + discount_uid: + type: + - "null" + - string + applied_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + applied_taxes: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + tax_uid: + type: + - "null" + - string + applied_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + note: + type: + - "null" + - string + fulfillments: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + type: + type: + - "null" + - string + state: + type: + - "null" + - string + pickup_details: + type: + - "null" + - object + properties: + expires_at: + type: + - "null" + - string + pickup_at: + type: + - "null" + - string + note: + type: + - "null" + - string + placed_at: + type: + - "null" + - string + accepted_at: + type: + - "null" + - string + ready_at: + type: + - "null" + - string + schedule_type: + type: + - "null" + - string + recipient: + type: + - "null" + - object + properties: + display_name: + type: + - "null" + - string + phone_number: + type: + - "null" + - string + auto_complete_duration: + type: + - "null" + - string + picked_up_at: + type: + - "null" + - string + shipment_details: + type: + - "null" + - object + properties: + recipient: + type: + - "null" + - object + properties: + display_name: + type: + - "null" + - string + phone_number: + type: + - "null" + - string + address: + type: + - "null" + - object + properties: + address_line_1: + type: + - "null" + - string + locality: + type: + - "null" + - string + administrative_district_level_1: + type: + - "null" + - string + postal_code: + type: + - "null" + - string + carrier: + type: + - "null" + - string + tracking_number: + type: + - "null" + - string + placed_at: + type: + - "null" + - string + packaged_at: + type: + - "null" + - string + shipped_at: + type: + - "null" + - string + expected_shipped_at: + type: + - "null" + - string + in_progress_at: + type: + - "null" + - string + created_at: + type: + - "null" + - string + updated_at: + type: + - "null" + - string + state: + type: + - "null" + - string + version: + type: + - "null" + - integer + total_tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_discount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_tip_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + closed_at: + type: + - "null" + - string + tenders: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + id: + type: + - "null" + - string + location_id: + type: + - "null" + - string + transaction_id: + type: + - "null" + - string + created_at: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + type: + type: + - "null" + - string + card_details: + type: + - "null" + - object + properties: + status: + type: + - "null" + - string + card: + type: + - "null" + - object + properties: + card_brand: + type: + - "null" + - string + last_4: + type: + - "null" + - string + fingerprint: + type: + - "null" + - string + entry_method: + type: + - "null" + - string + payment_id: + type: + - "null" + - string + cash_details: + type: + - "null" + - object + properties: + buyer_tendered_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + change_back_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + note: + type: + - "null" + - string + total_service_charge_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + net_amounts: + type: + - "null" + - object + properties: + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + discount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + tip_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + service_charge_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + source: + type: + - "null" + - object + properties: + name: + type: + - "null" + - string + returns: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + source_order_id: + type: + - "null" + - string + return_line_items: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + quantity: + type: + - "null" + - string + item_type: + type: + - "null" + - string + base_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + variation_total_price_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + gross_return_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_discount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + return_amounts: + type: + - "null" + - object + properties: + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + discount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + tip_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + service_charge_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + refunds: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + id: + type: + - "null" + - string + location_id: + type: + - "null" + - string + transaction_id: + type: + - "null" + - string + tender_id: + type: + - "null" + - string + created_at: + type: + - "null" + - string + reason: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + status: + type: + - "null" + - string + service_charges: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + name: + type: + - "null" + - string + amount_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + applied_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + calculation_phase: + type: + - "null" + - string + taxable: + type: + - "null" + - boolean + total_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + total_tax_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + discounts: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + name: + type: + - "null" + - string + percentage: + type: + - "null" + - string + applied_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + type: + type: + - "null" + - string + scope: + type: + - "null" + - string + taxes: + type: + - "null" + - array + items: + type: + - "null" + - object + properties: + uid: + type: + - "null" + - string + catalog_object_id: + type: + - "null" + - string + name: + type: + - "null" + - string + percentage: + type: + - "null" + - string + type: + type: + - "null" + - string + applied_money: + type: + - "null" + - object + properties: + amount: + type: + - "null" + - integer + currency: + type: + - "null" + - string + scope: + type: + - "null" + - string bank_accounts_stream: $ref: "#/definitions/base_stream" $parameters: @@ -371,6 +2940,65 @@ definitions: primary_key: "id" path: "/bank-accounts" + schema_loader: + type: InlineSchemaLoader + schema: + $schema: http://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + id: + type: + - "null" + - string + account_number_suffix: + type: + - "null" + - string + country: + type: + - "null" + - string + currency: + type: + - "null" + - string + account_type: + type: + - "null" + - string + holder_name: + type: + - "null" + - string + primary_bank_identification_number: + type: + - "null" + - string + location_id: + type: + - "null" + - string + status: + type: + - "null" + - string + creditable: + type: + - "null" + - boolean + debitable: + type: + - "null" + - boolean + version: + type: + - "null" + - integer + bank_name: + type: + - "null" + - string streams: - "#/definitions/customers_stream" - "#/definitions/locations_stream" @@ -393,3 +3021,121 @@ streams: check: stream_names: - "locations" + +spec: + type: Spec + documentation_url: https://docs.airbyte.com/integrations/sources/square + connection_specification: + $schema: http://json-schema.org/draft-07/schema# + title: Square Spec + type: object + required: + - is_sandbox + additionalProperties: true + properties: + credentials: + title: Authentication + description: Choose how to authenticate to Square. + type: object + order: 0 + oneOf: + - title: Oauth authentication + type: object + required: + - auth_type + - client_id + - client_secret + - refresh_token + properties: + auth_type: + type: string + const: OAuth + order: 0 + client_id: + type: string + title: Client ID + description: The Square-issued ID of your application + airbyte_secret: true + client_secret: + type: string + title: Client Secret + description: The Square-issued application secret for your application + airbyte_secret: true + refresh_token: + title: Refresh Token + type: string + description: A refresh token generated using the above client ID and secret + airbyte_secret: true + - title: API key + type: object + required: + - auth_type + - api_key + properties: + auth_type: + type: string + const: API Key + order: 1 + api_key: + type: string + title: API key token + description: The API key for a Square application + airbyte_secret: true + is_sandbox: + type: boolean + description: Determines whether to use the sandbox or production environment. + title: Sandbox + default: false + order: 1 + start_date: + type: string + description: UTC date in the format YYYY-MM-DD. Any data before this date will not be replicated. If not set, all data will be replicated. + title: Start Date + default: "2021-01-01" + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ + order: 2 + format: date + include_deleted_objects: + type: boolean + description: In some streams there is an option to include deleted objects (Items, Categories, Discounts, Taxes) + title: Include Deleted Objects + default: false + order: 3 + advanced_auth: + auth_flow_type: oauth2.0 + predicate_key: + - credentials + - auth_type + predicate_value: OAuth + oauth_config_specification: + complete_oauth_output_specification: + type: object + additionalProperties: false + properties: + refresh_token: + type: string + path_in_connector_config: + - credentials + - refresh_token + complete_oauth_server_input_specification: + type: object + additionalProperties: false + properties: + client_id: + type: string + client_secret: + type: string + complete_oauth_server_output_specification: + type: object + additionalProperties: false + properties: + client_id: + type: string + path_in_connector_config: + - credentials + - client_id + client_secret: + type: string + path_in_connector_config: + - credentials + - client_secret diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/TODO.md b/airbyte-integrations/connectors/source-square/source_square/schemas/TODO.md deleted file mode 100644 index 3bd4a64deb45..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/TODO.md +++ /dev/null @@ -1,19 +0,0 @@ -# TODO: Define your stream schemas - -Your connector must describe the schema of each stream it can output using [JSONSchema](https://json-schema.org). - -You can describe the schema of your streams using one `.json` file per stream. - -## Static schemas - -From the `square.yaml` configuration file, you read the `.json` files in the `schemas/` directory. You can refer to a schema in your configuration file using the `schema_loader` component's `file_path` field. For example: - -``` -schema_loader: - type: JsonSchema - file_path: "./source_square/schemas/customers.json" -``` - -Every stream specified in the configuration file should have a corresponding `.json` schema file. - -Delete this file once you're done. Or don't. Up to you :) diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/bank_accounts.json b/airbyte-integrations/connectors/source-square/source_square/schemas/bank_accounts.json deleted file mode 100644 index a8e1d1c8006e..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/bank_accounts.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "id": { - "type": ["null", "string"] - }, - "account_number_suffix": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "currency": { - "type": ["null", "string"] - }, - "account_type": { - "type": ["null", "string"] - }, - "holder_name": { - "type": ["null", "string"] - }, - "primary_bank_identification_number": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "creditable": { - "type": ["null", "boolean"] - }, - "debitable": { - "type": ["null", "boolean"] - }, - "version": { - "type": ["null", "integer"] - }, - "bank_name": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/cash_drawers.json b/airbyte-integrations/connectors/source-square/source_square/schemas/cash_drawers.json deleted file mode 100644 index 2881cd872572..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/cash_drawers.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Cash Drawer Shifts Schema", - "additionalProperties": true, - "type": ["object", "null"], - "properties": { - "id": { - "type": ["string", "null"] - }, - "state": { - "type": ["string", "null"] - }, - "opened_at": { - "type": ["string", "null"] - }, - "ended_at": { - "type": ["string", "null"] - }, - "closed_at": { - "type": ["string", "null"] - }, - "description": { - "type": ["string", "null"] - }, - "opened_cash_money": { - "type": ["object", "null"], - "properties": { - "amount": { - "type": ["number", "null"] - }, - "currency": { - "type": ["string", "null"] - } - } - }, - "expected_cash_money": { - "type": ["object", "null"], - "properties": { - "amount": { - "type": ["number", "null"] - }, - "currency": { - "type": ["string", "null"] - } - } - }, - "closed_cash_money": { - "type": ["object", "null"], - "properties": { - "amount": { - "type": ["number", "null"] - }, - "currency": { - "type": ["string", "null"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/categories.json b/airbyte-integrations/connectors/source-square/source_square/schemas/categories.json deleted file mode 100644 index 0af06a07948b..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/categories.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "category_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/customers.json b/airbyte-integrations/connectors/source-square/source_square/schemas/customers.json deleted file mode 100644 index f4ed4d047424..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/customers.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "cards": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "card_brand": { - "type": ["null", "string"] - }, - "last_4": { - "type": ["null", "string"] - }, - "exp_month": { - "type": ["null", "integer"] - }, - "exp_year": { - "type": ["null", "integer"] - }, - "cardholder_name": { - "type": ["null", "string"] - }, - "billing_address": { - "type": ["null", "object"], - "properties": { - "postal_code": { - "type": ["null", "string"] - } - } - } - } - } - }, - "given_name": { - "type": ["null", "string"] - }, - "family_name": { - "type": ["null", "string"] - }, - "email_address": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": { - "type": ["null", "string"] - }, - "address_line_2": { - "type": ["null", "string"] - }, - "locality": { - "type": ["null", "string"] - }, - "administrative_district_level_1": { - "type": ["null", "string"] - }, - "postal_code": { - "type": ["null", "string"] - } - } - }, - "phone_number": { - "type": ["null", "string"] - }, - "reference_id": { - "type": ["null", "string"] - }, - "company_name": { - "type": ["null", "string"] - }, - "preferences": { - "type": ["null", "object"], - "properties": { - "email_unsubscribed": { - "type": "boolean" - } - } - }, - "creation_source": { - "type": ["null", "string"] - }, - "birthday": { - "type": ["null", "string"] - }, - "segment_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "group_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "version": { - "type": ["null", "integer"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/discounts.json b/airbyte-integrations/connectors/source-square/source_square/schemas/discounts.json deleted file mode 100644 index d44e55aa8314..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/discounts.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "present_at_location_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "discount_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "discount_type": { - "type": ["null", "string"] - }, - "percentage": { - "type": ["null", "string"] - }, - "application_method": { - "type": ["null", "string"] - }, - "modify_tax_basis": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "pin_required": { - "type": ["null", "boolean"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/inventory.json b/airbyte-integrations/connectors/source-square/source_square/schemas/inventory.json deleted file mode 100644 index 275a6eace961..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/inventory.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Inventory Schema", - "additionalProperties": true, - "type": ["object", "null"], - "properties": { - "catalog_object_id": { - "type": ["string", "null"] - }, - "catalog_object_type": { - "type": ["string", "null"] - }, - "state": { - "type": ["string", "null"] - }, - "location_id": { - "type": ["string", "null"] - }, - "quantity": { - "type": ["string", "null"] - }, - "calculated_at": { - "type": ["string", "null"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/items.json b/airbyte-integrations/connectors/source-square/source_square/schemas/items.json deleted file mode 100644 index f1246c084604..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/items.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "custom_attribute_values": { - "type": ["null", "object"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "item_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "visibility": { - "type": ["null", "string"] - }, - "category_id": { - "type": ["null", "string"] - }, - "modifier_list_info": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "modifier_list_id": { - "type": ["null", "string"] - }, - "visibility": { - "type": ["null", "string"] - }, - "min_selected_modifiers": { - "type": ["null", "integer"] - }, - "max_selected_modifiers": { - "type": ["null", "integer"] - }, - "enabled": { - "type": ["null", "boolean"] - } - } - } - }, - "variations": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "item_variation_data": { - "type": ["null", "object"], - "properties": { - "item_id": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "sku": { - "type": ["null", "string"] - }, - "ordinal": { - "type": ["null", "integer"] - }, - "pricing_type": { - "type": ["null", "string"] - }, - "price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "location_overrides": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "location_id": { - "type": ["null", "string"] - }, - "track_inventory": { - "type": ["null", "boolean"] - } - } - } - }, - "item_option_values": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "item_option_id": { - "type": ["null", "string"] - }, - "item_option_value_id": { - "type": ["null", "string"] - } - } - } - } - } - }, - "present_at_location_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } - } - }, - "product_type": { - "type": ["null", "string"] - }, - "skip_modifier_screen": { - "type": ["null", "boolean"] - }, - "item_options": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "item_option_id": { - "type": ["null", "string"] - } - } - } - }, - "ecom_visibility": { - "type": ["null", "string"] - }, - "tax_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } - }, - "image_id": { - "type": ["null", "string"] - }, - "present_at_location_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/locations.json b/airbyte-integrations/connectors/source-square/source_square/schemas/locations.json deleted file mode 100644 index f7a3a7b742d9..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/locations.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": { - "type": ["null", "string"] - }, - "locality": { - "type": ["null", "string"] - }, - "administrative_district_level_1": { - "type": ["null", "string"] - }, - "postal_code": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - } - } - }, - "timezone": { - "type": ["null", "string"] - }, - "capabilities": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "status": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "merchant_id": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "language_code": { - "type": ["null", "string"] - }, - "currency": { - "type": ["null", "string"] - }, - "phone_number": { - "type": ["null", "string"] - }, - "business_name": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "website_url": { - "type": ["null", "string"] - }, - "business_hours": { - "type": ["null", "object"] - }, - "business_email": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "twitter_username": { - "type": ["null", "string"] - }, - "instagram_username": { - "type": ["null", "string"] - }, - "facebook_url": { - "type": ["null", "string"] - }, - "mcc": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/loyalty.json b/airbyte-integrations/connectors/source-square/source_square/schemas/loyalty.json deleted file mode 100644 index d2c748842236..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/loyalty.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Loyalty schema", - "type": ["object", "null"], - "additionalProperties": true, - "properties": { - "id": { - "type": ["string", "null"] - }, - "mapping": { - "type": ["object", "null"], - "properties": { - "id": { - "type": ["string", "null"] - }, - "phone_number": { - "type": ["string", "null"] - }, - "created_at": { - "type": ["string", "null"] - } - } - }, - "program_id": { - "type": ["string", "null"] - }, - "balance": { - "type": ["number", "null"] - }, - "lifetime_points": { - "type": ["number", "null"] - }, - "customer_id": { - "type": ["string", "null"] - }, - "created_at": { - "type": ["string", "null"] - }, - "updated_at": { - "type": ["string", "null"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/modifier_list.json b/airbyte-integrations/connectors/source-square/source_square/schemas/modifier_list.json deleted file mode 100644 index d3b77200d5ae..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/modifier_list.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "modifier_list_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "selection_type": { - "type": ["null", "string"] - }, - "modifiers": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "modifier_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "on_by_default": { - "type": ["null", "boolean"] - }, - "ordinal": { - "type": ["null", "integer"] - }, - "modifier_list_id": { - "type": ["null", "string"] - } - } - } - } - } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/orders.json b/airbyte-integrations/connectors/source-square/source_square/schemas/orders.json deleted file mode 100644 index 2cb7b1c6d895..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/orders.json +++ /dev/null @@ -1,874 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "customer_id": { - "type": ["null", "string"] - }, - "line_items": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "catalog_object_id": { - "type": ["null", "string"] - }, - "quantity": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "variation_name": { - "type": ["null", "string"] - }, - "base_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "gross_sales_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_discount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "variation_total_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "item_type": { - "type": ["null", "string"] - }, - "modifiers": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "base_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "name": { - "type": ["null", "string"] - }, - "catalog_object_id": { - "type": ["null", "string"] - } - } - } - }, - "applied_discounts": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "discount_uid": { - "type": ["null", "string"] - }, - "applied_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - }, - "applied_taxes": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "tax_uid": { - "type": ["null", "string"] - }, - "applied_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - }, - "note": { - "type": ["null", "string"] - } - } - } - }, - "fulfillments": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "pickup_details": { - "type": ["null", "object"], - "properties": { - "expires_at": { - "type": ["null", "string"] - }, - "pickup_at": { - "type": ["null", "string"] - }, - "note": { - "type": ["null", "string"] - }, - "placed_at": { - "type": ["null", "string"] - }, - "accepted_at": { - "type": ["null", "string"] - }, - "ready_at": { - "type": ["null", "string"] - }, - "schedule_type": { - "type": ["null", "string"] - }, - "recipient": { - "type": ["null", "object"], - "properties": { - "display_name": { - "type": ["null", "string"] - }, - "phone_number": { - "type": ["null", "string"] - } - } - }, - "auto_complete_duration": { - "type": ["null", "string"] - }, - "picked_up_at": { - "type": ["null", "string"] - } - } - }, - "shipment_details": { - "type": ["null", "object"], - "properties": { - "recipient": { - "type": ["null", "object"], - "properties": { - "display_name": { - "type": ["null", "string"] - }, - "phone_number": { - "type": ["null", "string"] - }, - "address": { - "type": ["null", "object"], - "properties": { - "address_line_1": { - "type": ["null", "string"] - }, - "locality": { - "type": ["null", "string"] - }, - "administrative_district_level_1": { - "type": ["null", "string"] - }, - "postal_code": { - "type": ["null", "string"] - } - } - } - } - }, - "carrier": { - "type": ["null", "string"] - }, - "tracking_number": { - "type": ["null", "string"] - }, - "placed_at": { - "type": ["null", "string"] - }, - "packaged_at": { - "type": ["null", "string"] - }, - "shipped_at": { - "type": ["null", "string"] - }, - "expected_shipped_at": { - "type": ["null", "string"] - }, - "in_progress_at": { - "type": ["null", "string"] - } - } - } - } - } - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "state": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "total_tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_discount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_tip_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "closed_at": { - "type": ["null", "string"] - }, - "tenders": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "transaction_id": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "type": { - "type": ["null", "string"] - }, - "card_details": { - "type": ["null", "object"], - "properties": { - "status": { - "type": ["null", "string"] - }, - "card": { - "type": ["null", "object"], - "properties": { - "card_brand": { - "type": ["null", "string"] - }, - "last_4": { - "type": ["null", "string"] - }, - "fingerprint": { - "type": ["null", "string"] - } - } - }, - "entry_method": { - "type": ["null", "string"] - } - } - }, - "payment_id": { - "type": ["null", "string"] - }, - "cash_details": { - "type": ["null", "object"], - "properties": { - "buyer_tendered_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "change_back_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - }, - "note": { - "type": ["null", "string"] - } - } - } - }, - "total_service_charge_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "net_amounts": { - "type": ["null", "object"], - "properties": { - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "discount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "tip_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "service_charge_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - }, - "source": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - } - } - }, - "returns": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "source_order_id": { - "type": ["null", "string"] - }, - "return_line_items": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "quantity": { - "type": ["null", "string"] - }, - "item_type": { - "type": ["null", "string"] - }, - "base_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "variation_total_price_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "gross_return_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_discount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - } - } - } - }, - "return_amounts": { - "type": ["null", "object"], - "properties": { - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "discount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "tip_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "service_charge_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - }, - "refunds": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "transaction_id": { - "type": ["null", "string"] - }, - "tender_id": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "reason": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "status": { - "type": ["null", "string"] - } - } - } - }, - "service_charges": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "applied_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "calculation_phase": { - "type": ["null", "string"] - }, - "taxable": { - "type": ["null", "boolean"] - }, - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "total_tax_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - }, - "discounts": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "percentage": { - "type": ["null", "string"] - }, - "applied_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "type": { - "type": ["null", "string"] - }, - "scope": { - "type": ["null", "string"] - } - } - } - }, - "taxes": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "uid": { - "type": ["null", "string"] - }, - "catalog_object_id": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "percentage": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "applied_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "scope": { - "type": ["null", "string"] - } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/payments.json b/airbyte-integrations/connectors/source-square/source_square/schemas/payments.json deleted file mode 100644 index ea3686e855e1..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/payments.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "customer_id": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "delay_duration": { - "type": ["null", "string"] - }, - "source_type": { - "type": ["null", "string"] - }, - "card_details": { - "type": ["null", "object"], - "properties": { - "status": { - "type": ["null", "string"] - }, - "card": { - "type": ["null", "object"], - "properties": { - "card_brand": { - "type": ["null", "string"] - }, - "last_4": { - "type": ["null", "string"] - }, - "exp_month": { - "type": ["null", "integer"] - }, - "exp_year": { - "type": ["null", "integer"] - }, - "fingerprint": { - "type": ["null", "string"] - }, - "card_type": { - "type": ["null", "string"] - }, - "prepaid_type": { - "type": ["null", "string"] - }, - "bin": { - "type": ["null", "string"] - } - } - }, - "entry_method": { - "type": ["null", "string"] - }, - "cvv_status": { - "type": ["null", "string"] - }, - "avs_status": { - "type": ["null", "string"] - }, - "statement_description": { - "type": ["null", "string"] - }, - "card_payment_timeline": { - "type": ["null", "object"], - "properties": { - "authorized_at": { - "type": ["null", "string"] - }, - "captured_at": { - "type": ["null", "string"] - }, - "voided_at": { - "type": ["null", "string"] - } - } - } - } - }, - "location_id": { - "type": ["null", "string"] - }, - "order_id": { - "type": ["null", "string"] - }, - "risk_evaluation": { - "type": ["null", "object"], - "properties": { - "created_at": { - "type": ["null", "string"] - }, - "risk_level": { - "type": ["null", "string"] - } - } - }, - "processing_fee": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "effective_at": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - }, - "total_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "approved_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "receipt_number": { - "type": ["null", "string"] - }, - "receipt_url": { - "type": ["null", "string"] - }, - "delay_action": { - "type": ["null", "string"] - }, - "delayed_until": { - "type": ["null", "string"] - }, - "version_token": { - "type": ["null", "string"] - }, - "note": { - "type": ["null", "string"] - }, - "employee_id": { - "type": ["null", "string"] - }, - "refunded_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - }, - "refund_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/refunds.json b/airbyte-integrations/connectors/source-square/source_square/schemas/refunds.json deleted file mode 100644 index 18b2c97819ff..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/refunds.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "status": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - }, - "required": ["amount", "currency"] - }, - "payment_id": { - "type": ["null", "string"] - }, - "order_id": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "reason": { - "type": ["null", "string"] - }, - "processing_fee": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "effective_at": { - "type": ["null", "string"] - }, - "type": { - "type": ["null", "string"] - }, - "amount_money": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/shifts.json b/airbyte-integrations/connectors/source-square/source_square/schemas/shifts.json deleted file mode 100644 index 66f0c3af29cd..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/shifts.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "employee_id": { - "type": ["null", "string"] - }, - "location_id": { - "type": ["null", "string"] - }, - "timezone": { - "type": ["null", "string"] - }, - "start_at": { - "type": ["null", "string"] - }, - "end_at": { - "type": ["null", "string"] - }, - "wage": { - "type": ["null", "object"], - "properties": { - "title": { - "type": ["null", "string"] - }, - "hourly_rate": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } - }, - "breaks": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "start_at": { - "type": ["null", "string"] - }, - "end_at": { - "type": ["null", "string"] - }, - "break_type_id": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "expected_duration": { - "type": ["null", "string"] - }, - "is_paid": { - "type": ["null", "boolean"] - } - } - } - }, - "status": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "team_member_id": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/taxes.json b/airbyte-integrations/connectors/source-square/source_square/schemas/taxes.json deleted file mode 100644 index 93ae1b32c29a..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/taxes.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "type": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "version": { - "type": ["null", "integer"] - }, - "is_deleted": { - "type": ["null", "boolean"] - }, - "present_at_all_locations": { - "type": ["null", "boolean"] - }, - "tax_data": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "calculation_phase": { - "type": ["null", "string"] - }, - "inclusion_type": { - "type": ["null", "string"] - }, - "percentage": { - "type": ["null", "string"] - }, - "applies_to_custom_amounts": { - "type": ["null", "boolean"] - }, - "enabled": { - "type": ["null", "boolean"] - }, - "tax_type_id": { - "type": ["null", "string"] - }, - "tax_type_name": { - "type": ["null", "string"] - } - } - }, - "absent_at_location_ids": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/team_member_wages.json b/airbyte-integrations/connectors/source-square/source_square/schemas/team_member_wages.json deleted file mode 100644 index 300e5e81fae9..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/team_member_wages.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "team_member_id": { - "type": ["null", "string"] - }, - "title": { - "type": ["null", "string"] - }, - "hourly_rate": { - "type": ["null", "object"], - "properties": { - "amount": { - "type": ["null", "integer"] - }, - "currency": { - "type": ["null", "string"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/schemas/team_members.json b/airbyte-integrations/connectors/source-square/source_square/schemas/team_members.json deleted file mode 100644 index df47fbbd7776..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/schemas/team_members.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "type": ["null", "object"], - "properties": { - "id": { - "type": ["null", "string"] - }, - "is_owner": { - "type": ["null", "boolean"] - }, - "status": { - "type": ["null", "string"] - }, - "given_name": { - "type": ["null", "string"] - }, - "family_name": { - "type": ["null", "string"] - }, - "email_address": { - "type": ["null", "string"] - }, - "created_at": { - "type": ["null", "string"] - }, - "updated_at": { - "type": ["null", "string"] - }, - "assigned_locations": { - "type": ["null", "object"], - "properties": { - "assignment_type": { - "type": ["null", "string"] - } - } - }, - "reference_id": { - "type": ["null", "string"] - }, - "phone_number": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-square/source_square/spec.yaml b/airbyte-integrations/connectors/source-square/source_square/spec.yaml deleted file mode 100644 index afd0e28e7a82..000000000000 --- a/airbyte-integrations/connectors/source-square/source_square/spec.yaml +++ /dev/null @@ -1,115 +0,0 @@ -documentationUrl: https://docs.airbyte.com/integrations/sources/square -connectionSpecification: - $schema: http://json-schema.org/draft-07/schema# - title: Square Spec - type: object - required: - - is_sandbox - additionalProperties: true - properties: - credentials: - title: Authentication - description: Choose how to authenticate to Square. - type: object - order: 0 - oneOf: - - title: Oauth authentication - type: object - required: - - auth_type - - client_id - - client_secret - - refresh_token - properties: - auth_type: - type: string - const: OAuth - order: 0 - client_id: - type: string - title: Client ID - description: The Square-issued ID of your application - airbyte_secret: true - client_secret: - type: string - title: Client Secret - description: The Square-issued application secret for your application - airbyte_secret: true - refresh_token: - title: Refresh Token - type: string - description: A refresh token generated using the above client ID and secret - airbyte_secret: true - - title: API key - type: object - required: - - auth_type - - api_key - properties: - auth_type: - type: string - const: API Key - order: 1 - api_key: - type: string - title: API key token - description: The API key for a Square application - airbyte_secret: true - is_sandbox: - type: boolean - description: Determines whether to use the sandbox or production environment. - title: Sandbox - default: false - order: 1 - start_date: - type: string - description: UTC date in the format YYYY-MM-DD. Any data before this date will not be replicated. If not set, all data will be replicated. - title: Start Date - default: "2021-01-01" - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ - order: 2 - format: date - include_deleted_objects: - type: boolean - description: In some streams there is an option to include deleted objects (Items, Categories, Discounts, Taxes) - title: Include Deleted Objects - default: false - order: 3 -advanced_auth: - auth_flow_type: oauth2.0 - predicate_key: - - credentials - - auth_type - predicate_value: OAuth - oauth_config_specification: - complete_oauth_output_specification: - type: object - additionalProperties: false - properties: - refresh_token: - type: string - path_in_connector_config: - - credentials - - refresh_token - complete_oauth_server_input_specification: - type: object - additionalProperties: false - properties: - client_id: - type: string - client_secret: - type: string - complete_oauth_server_output_specification: - type: object - additionalProperties: false - properties: - client_id: - type: string - path_in_connector_config: - - credentials - - client_id - client_secret: - type: string - path_in_connector_config: - - credentials - - client_secret diff --git a/docs/integrations/sources/square.md b/docs/integrations/sources/square.md index 151d57ef3b07..7305a535a60e 100644 --- a/docs/integrations/sources/square.md +++ b/docs/integrations/sources/square.md @@ -103,6 +103,7 @@ Exponential [Backoff](https://developer.squareup.com/forums/t/current-square-api | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------ | +| 1.6.3 | 2024-06-14 | [39377](https://github.com/airbytehq/airbyte/pull/39377) | Add error handlers, migrate to inline schemas, move spec to manifest | | 1.6.2 | 2024-05-03 | [37800](https://github.com/airbytehq/airbyte/pull/37800) | Migrate to Poetry. Replace custom components with default classes | | 1.6.1 | 2023-11-07 | [31481](https://github.com/airbytehq/airbyte/pull/31481) | Fix duplicate records for `Payments` and `Refunds` stream | | 1.6.0 | 2023-10-18 | [31115](https://github.com/airbytehq/airbyte/pull/31115) | Add `customer_id` field to `Payments` and `Orders` streams |