From 8dc6c7c23411042e4c7f94913f834fd55e88e7f8 Mon Sep 17 00:00:00 2001 From: "Sherif A. Nada" Date: Mon, 15 Feb 2021 01:23:34 -0800 Subject: [PATCH] Source Facebook Marketing: support insights streams via async queries (#1990) --- .../e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json | 2 +- .../resources/seed/source_definitions.yaml | 2 +- .../bases/base-python/base_python/source.py | 2 +- .../source-facebook-marketing/Dockerfile | 2 +- .../source-facebook-marketing/Dockerfile.test | 22 - .../source-facebook-marketing/build.gradle | 15 +- .../integration_tests/__init__.py | 27 - .../integration_tests/integration_test.py | 58 + .../integration_tests/standard_source_test.py | 29 - .../sample_files/configured_catalog.json | 6276 ++++++++++------- .../configured_catalog_adcreatives.json | 5105 ++++++++++++++ .../configured_catalog_adsinsights.json | 1088 +++ .../source_facebook_marketing/client/api.py | 193 +- .../client/client.py | 18 +- .../schemas/ads_insights.json | 179 + .../schemas/ads_insights_age_and_gender.json | 186 + .../schemas/ads_insights_country.json | 185 + .../schemas/ads_insights_dma.json | 185 + .../ads_insights_platform_and_device.json | 214 + .../schemas/ads_insights_region.json | 185 + 20 files changed, 11090 insertions(+), 2883 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-facebook-marketing/Dockerfile.test delete mode 100644 airbyte-integrations/connectors/source-facebook-marketing/integration_tests/__init__.py create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/integration_tests/integration_test.py delete mode 100644 airbyte-integrations/connectors/source-facebook-marketing/integration_tests/standard_source_test.py create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adcreatives.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_age_and_gender.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_country.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_dma.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_platform_and_device.json create mode 100644 airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_region.json diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json index 8ddb2649bde16..ba0dc120dc4e9 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/e7778cfc-e97c-4458-9ecb-b4f2bba8946c.json @@ -2,6 +2,6 @@ "sourceDefinitionId": "e7778cfc-e97c-4458-9ecb-b4f2bba8946c", "name": "Facebook Marketing", "dockerRepository": "airbyte/source-facebook-marketing", - "dockerImageTag": "0.1.2", + "dockerImageTag": "0.1.3", "documentationUrl": "https://hub.docker.com/r/airbyte/source-facebook-marketing" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 6eca46e5cdf55..85f645b69cf0a 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -76,7 +76,7 @@ - sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c name: Facebook Marketing dockerRepository: airbyte/source-facebook-marketing - dockerImageTag: 0.1.2 + dockerImageTag: 0.1.3 documentationUrl: https://hub.docker.com/r/airbyte/source-facebook-marketing - sourceDefinitionId: 57eb1576-8f52-463d-beb6-2e107cdf571d name: Hubspot diff --git a/airbyte-integrations/bases/base-python/base_python/source.py b/airbyte-integrations/bases/base-python/base_python/source.py index 5426bb85270c9..ce0f8d959d671 100644 --- a/airbyte-integrations/bases/base-python/base_python/source.py +++ b/airbyte-integrations/bases/base-python/base_python/source.py @@ -69,7 +69,7 @@ def check(self, logger: AirbyteLogger, config: json) -> AirbyteConnectionStatus: return AirbyteConnectionStatus(status=Status.SUCCEEDED) def read( - self, logger: AirbyteLogger, config: json, catalog: ConfiguredAirbyteCatalog, state: Dict[str, any] + self, logger: AirbyteLogger, config: json, catalog: ConfiguredAirbyteCatalog, state: Dict[str, any] = {} ) -> Generator[AirbyteMessage, None, None]: client = self._get_client(config) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile index b62f7a04602bb..896814a0dc1e5 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile +++ b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile @@ -12,5 +12,5 @@ COPY $CODE_PATH ./$CODE_PATH COPY setup.py ./ RUN pip install . -LABEL io.airbyte.version=0.1.2 +LABEL io.airbyte.version=0.1.3 LABEL io.airbyte.name=airbyte/source-facebook-marketing diff --git a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile.test b/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile.test deleted file mode 100644 index 46ee9983ff97d..0000000000000 --- a/airbyte-integrations/connectors/source-facebook-marketing/Dockerfile.test +++ /dev/null @@ -1,22 +0,0 @@ -FROM airbyte/base-python-test:dev - -RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/* - -ENV CODE_PATH="integration_tests" -ENV AIRBYTE_TEST_MODULE="integration_tests" -ENV AIRBYTE_TEST_PATH="SourceFacebookMarketingStandardTest" - -LABEL io.airbyte.version=0.1.0 -LABEL io.airbyte.name=airbyte/source-facebook-marketing-standard-test - -WORKDIR /airbyte/integration_code -COPY source_facebook_marketing source_facebook_marketing -COPY $CODE_PATH $CODE_PATH -COPY sample_files/*.json $CODE_PATH/ -COPY secrets/* $CODE_PATH -COPY source_facebook_marketing/*.json $CODE_PATH -COPY setup.py ./ - -RUN pip install ".[tests]" - -WORKDIR /airbyte diff --git a/airbyte-integrations/connectors/source-facebook-marketing/build.gradle b/airbyte-integrations/connectors/source-facebook-marketing/build.gradle index ed74b5faa2cd1..ec2d61d66f670 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/build.gradle +++ b/airbyte-integrations/connectors/source-facebook-marketing/build.gradle @@ -1,13 +1,26 @@ plugins { id 'airbyte-python' id 'airbyte-docker' - id 'airbyte-source-test' + id 'airbyte-standard-source-test-file' } airbytePython { moduleDirectory 'source_facebook_marketing' } +airbyteStandardSourceTestFile { + specPath = "source_facebook_marketing/spec.json" + configPath = "secrets/config.json" + configuredCatalogPath = "sample_files/configured_catalog.json" +} + +task("pythonIntegrationTests", type: PythonTask, dependsOn: installTestReqs) { + module = "pytest" + command = "-s integration_tests" +} + +integrationTest.dependsOn("pythonIntegrationTests") + dependencies { implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs) } diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/__init__.py b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/__init__.py deleted file mode 100644 index a5d70f66da6f9..0000000000000 --- a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -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. -""" - -from .standard_source_test import SourceFacebookMarketingStandardTest - -__all__ = ["SourceFacebookMarketingStandardTest"] diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/integration_test.py b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/integration_test.py new file mode 100644 index 0000000000000..64cc46bd30635 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/integration_test.py @@ -0,0 +1,58 @@ +""" +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. +""" + +import json + +from airbyte_protocol import ConfiguredAirbyteCatalog, Type +from base_python import AirbyteLogger +from source_facebook_marketing.source import SourceFacebookMarketing + +config = json.loads(open("secrets/config.json", "r").read()) + + +class TestFacebookMarketingSource: + def test_ad_insights_streams_outputs_records(self): + catalog = self._read_catalog("sample_files/configured_catalog_adsinsights.json") + self._run_sync_test(config, catalog) + + def test_ad_creatives_stream_outputs_records(self): + catalog = self._read_catalog("sample_files/configured_catalog_adcreatives.json") + self._run_sync_test(config, catalog) + + @staticmethod + def _read_catalog(path): + return ConfiguredAirbyteCatalog.parse_raw(open(path, "r").read()) + + @staticmethod + def _run_sync_test(conf, catalog): + records = [] + state = [] + for message in SourceFacebookMarketing().read(AirbyteLogger(), conf, catalog): + if message.type == Type.RECORD: + records.append(message) + elif message.type == Type.STATE: + state.append(message) + + assert len(records) > 0 + assert len(state) > 0 diff --git a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/standard_source_test.py b/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/standard_source_test.py deleted file mode 100644 index 0236ae0544ebe..0000000000000 --- a/airbyte-integrations/connectors/source-facebook-marketing/integration_tests/standard_source_test.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -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. -""" - -from base_python_test import DefaultStandardSourceTest - - -class SourceFacebookMarketingStandardTest(DefaultStandardSourceTest): - pass diff --git a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog.json index 6d9d639f09645..901fe5719922a 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog.json +++ b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog.json @@ -4,7 +4,6 @@ "stream": { "name": "campaigns", "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "name": { "type": ["null", "string"] @@ -77,17 +76,14 @@ "type": ["null", "object"] }, "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["updated_time"] + "source_defined_cursor": true }, - "sync_mode": "incremental", - "cursor_field": ["updated_time"] + "sync_mode": "incremental" }, { "stream": { "name": "adsets", "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", "type": ["null", "object"], "properties": { "name": { @@ -138,17 +134,17 @@ }, "daily_budget": { "type": ["null", "number"], - "maximum": 100000000000000000000000000000000, - "minimum": -100000000000000000000000000000000, - "multipleOf": 0.000001, + "maximum": 1e32, + "minimum": -1e32, + "multipleOf": 1e-6, "exclusiveMaximum": true, "exclusiveMinimum": true }, "budget_remaining": { "type": ["null", "number"], - "maximum": 100000000000000000000000000000000, - "minimum": -100000000000000000000000000000000, - "multipleOf": 0.000001, + "maximum": 1e32, + "minimum": -1e32, + "multipleOf": 1e-6, "exclusiveMaximum": true, "exclusiveMinimum": true }, @@ -168,2856 +164,3714 @@ }, "lifetime_budget": { "type": ["null", "number"], - "maximum": 100000000000000000000000000000000, - "minimum": -100000000000000000000000000000000, - "multipleOf": 0.000001, + "maximum": 1e32, + "minimum": -1e32, + "multipleOf": 1e-6, "exclusiveMaximum": true, "exclusiveMinimum": true }, "targeting": { - "$ref": "targeting.json" - }, - "bid_info": { - "type": ["null", "object"], - "properties": { - "CLICKS": { - "type": ["null", "integer"] - }, - "ACTIONS": { - "type": ["null", "integer"] - }, - "IMPRESSIONS": { - "type": ["null", "integer"] - }, - "REACH": { - "type": ["null", "integer"] - } - } - }, - "adlabels": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "created_time": { - "type": "string", - "format": "date-time" - }, - "updated_time": { - "type": "string", - "format": "date-time" - } - } - } - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["updated_time"] - }, - "sync_mode": "incremental", - "cursor_field": ["updated_time"] - }, - { - "stream": { - "name": "adcreatives", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "body": { - "type": ["null", "string"] - }, - "object_story_id": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - }, - "account_id": { - "type": ["null", "string"] - }, - "actor_id": { - "type": ["null", "string"] - }, - "adlabels": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "created_time": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "updated_time": { - "type": "string", - "format": "date-time" - } - } - } - }, - "applink_treatment": { - "type": ["null", "string"] - }, - "call_to_action_type": { - "type": ["null", "string"] - }, - "effective_instagram_story_id": { - "type": ["null", "string"] - }, - "effective_object_story_id": { - "type": ["null", "string"] - }, - "title": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "image_crops": { - "properties": { - "100x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "100x72": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "191x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x150": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x500": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "600x360": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "90x160": { + "definitions": { + "id_name_pairs": { "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } }, "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, - "instagram_actor_id": { - "type": ["null", "string"] - }, - "instagram_permalink_url": { - "type": ["null", "string"] - }, - "instagram_story_id": { - "type": ["null", "string"] - }, - "link_og_id": { - "type": ["null", "string"] - }, - "object_id": { - "type": ["null", "string"] - }, - "object_story_spec": { - "properties": { - "page_id": { - "type": ["null", "string"] }, - "instagram_actor_id": { - "type": ["null", "string"] - }, - "link_data": { + "targeting_fields": { + "type": ["null", "object"], "properties": { - "additional_image_index": { - "type": ["null", "integer"] - }, - "app_link_spec": { - "type": ["null", "object"], - "properties": { - "android": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "class": { - "type": "string" - }, - "package": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "ios": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "ipad": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "iphone": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } } - } - }, - "attachment_style": { - "type": ["null", "string"] - }, - "branded_content_sponsor_page_id": { - "type": ["null", "string"] + }, + "type": ["null", "array"] }, - "branded_content_sponsor_relationship": { - "type": ["null", "string"] + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" }, - "call_to_action": { - "properties": { - "value": { - "properties": { - "app_destination": { - "type": ["null", "string"] - }, - "app_link": { - "type": ["null", "string"] - }, - "application": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "lead_gen_form_id": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "link_caption": { - "type": ["null", "string"] - }, - "link_format": { - "type": ["null", "string"] - }, - "page": { - "type": ["null", "string"] - }, - "product_link": { - "type": ["null", "string"] - } + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "object"] - }, - "type": { - "type": ["null", "string"] + "id": { + "type": ["null", "string"] + } } }, - "type": ["null", "object"] - }, - "caption": { - "type": ["null", "string"] + "type": ["null", "array"] }, - "child_attachments": { - "items": { - "properties": { - "image_hash": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "call_to_action": { - "properties": { - "value": { - "properties": { - "app_destination": { - "type": ["null", "string"] - }, - "app_link": { - "type": ["null", "string"] - }, - "application": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "lead_gen_form_id": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "link_caption": { - "type": ["null", "string"] - }, - "link_format": { - "type": ["null", "string"] - }, - "page": { - "type": ["null", "string"] - }, - "product_link": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "caption": { - "type": ["null", "string"] - }, - "picture": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "image_crops": { - "properties": { - "100x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "100x72": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "191x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x150": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x500": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "600x360": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "90x160": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { "name": { "type": ["null", "string"] }, - "static_card": { - "type": ["null", "boolean"] - }, - "video_id": { + "id": { "type": ["null", "string"] } - }, - "type": ["null", "object"] + } }, "type": ["null", "array"] }, - "multi_share_optimized": { - "type": ["null", "boolean"] - }, - "link": { - "type": ["null", "string"] - }, - "image_crops": { - "properties": { - "100x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "100x72": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "191x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x150": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x500": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "600x360": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "90x160": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] + "id": { + "type": ["null", "string"] + } } }, - "type": ["null", "object"] - }, - "description": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "force_single_link": { - "type": ["null", "boolean"] - }, - "multi_share_end_card": { - "type": ["null", "boolean"] - }, - "message": { - "type": ["null", "string"] - }, - "image_hash": { - "type": ["null", "string"] - }, - "picture": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "offer_id": { - "type": ["null", "string"] - }, - "page_welcome_message": { - "type": ["null", "string"] + "type": ["null", "array"] }, - "retailer_item_ids": { - "type": ["null", "array"], + "life_events": { "items": { - "type": "string" - } - }, - "show_multiple_images": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "photo_data": { - "type": ["null", "object"], - "properties": { - "branded_content_sponsor_page_id": { - "type": ["null", "string"] - }, - "branded_content_sponsor_relationship": { - "type": ["null", "string"] - }, - "caption": { - "type": "string" - }, - "image_hash": { - "type": ["null", "string"] - }, - "page_welcome_message": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - } - } - }, - "template_data": { - "properties": { - "additional_image_index": { - "type": ["null", "integer"] - }, - "app_link_spec": { - "type": ["null", "object"], - "properties": { - "android": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "class": { - "type": "string" - }, - "package": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "ios": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "ipad": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "iphone": { - "type": ["null", "array"], - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "app_store_id": { - "type": "string" - }, - "url": { - "type": "string" - } - } + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } } - } - }, - "attachment_style": { - "type": ["null", "string"] - }, - "branded_content_sponsor_page_id": { - "type": ["null", "string"] - }, - "branded_content_sponsor_relationship": { - "type": ["null", "string"] + }, + "type": ["null", "array"] }, - "call_to_action": { - "properties": { - "value": { - "properties": { - "app_destination": { - "type": ["null", "string"] - }, - "app_link": { - "type": ["null", "string"] - }, - "application": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "lead_gen_form_id": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "link_caption": { - "type": ["null", "string"] - }, - "link_format": { - "type": ["null", "string"] - }, - "page": { - "type": ["null", "string"] - }, - "product_link": { - "type": ["null", "string"] - } + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "object"] - }, - "type": { - "type": ["null", "string"] + "id": { + "type": ["null", "string"] + } } }, - "type": ["null", "object"] - }, - "caption": { - "type": ["null", "string"] + "type": ["null", "array"] }, - "child_attachments": { - "items": { - "properties": { - "image_hash": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "call_to_action": { - "properties": { - "value": { - "properties": { - "app_destination": { - "type": ["null", "string"] - }, - "app_link": { - "type": ["null", "string"] - }, - "application": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "lead_gen_form_id": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "link_caption": { - "type": ["null", "string"] - }, - "link_format": { - "type": ["null", "string"] - }, - "page": { - "type": ["null", "string"] - }, - "product_link": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "type": { - "type": ["null", "string"] - } - }, - "type": ["null", "object"] - }, - "caption": { - "type": ["null", "string"] - }, - "picture": { - "type": ["null", "string"] - }, - "description": { - "type": ["null", "string"] - }, - "image_crops": { - "properties": { - "100x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "100x72": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "191x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x150": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x500": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "600x360": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "90x160": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - } - }, - "type": ["null", "object"] - }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { "name": { "type": ["null", "string"] }, - "static_card": { - "type": ["null", "boolean"] - }, - "video_id": { + "id": { "type": ["null", "string"] } - }, - "type": ["null", "object"] + } }, "type": ["null", "array"] }, - "multi_share_optimized": { - "type": ["null", "boolean"] - }, - "link": { - "type": ["null", "string"] - }, - "image_crops": { - "properties": { - "100x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "100x72": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "191x100": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x150": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "400x500": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "600x360": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "type": ["null", "array"] - }, - "90x160": { - "items": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "array"] + "id": { + "type": ["null", "string"] + } } }, - "type": ["null", "object"] - }, - "description": { - "type": ["null", "string"] + "type": ["null", "array"] }, - "event_id": { - "type": ["null", "string"] + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "force_single_link": { - "type": ["null", "boolean"] + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "multi_share_end_card": { - "type": ["null", "boolean"] + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "message": { - "type": ["null", "string"] + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "image_hash": { - "type": ["null", "string"] + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "picture": { - "type": ["null", "string"] + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "name": { - "type": ["null", "string"] + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "offer_id": { - "type": ["null", "string"] + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "page_welcome_message": { - "type": ["null", "string"] + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] }, - "retailer_item_ids": { + "relationship_statuses": { "type": ["null", "array"], "items": { - "type": "string" + "type": ["null", "integer"] } }, - "show_multiple_images": { - "type": ["null", "boolean"] - } - }, - "type": ["null", "object"] - }, - "text_data": { - "type": ["null", "object"], - "properties": { - "message": { - "type": "string" - } - } - }, - "video_data": { - "type": ["null", "object"], - "properties": { - "additional_image_index": { - "type": ["null", "integer"] - }, - "branded_content_sponsor_page_id": { - "type": ["null", "string"] - }, - "branded_content_sponsor_relationship": { - "type": ["null", "string"] - }, - "call_to_action": { - "properties": { - "value": { - "properties": { - "app_destination": { - "type": ["null", "string"] - }, - "app_link": { - "type": ["null", "string"] - }, - "application": { - "type": ["null", "string"] - }, - "event_id": { - "type": ["null", "string"] - }, - "lead_gen_form_id": { - "type": ["null", "string"] - }, - "link": { - "type": ["null", "string"] - }, - "link_caption": { - "type": ["null", "string"] - }, - "link_format": { - "type": ["null", "string"] - }, - "page": { - "type": ["null", "string"] - }, - "product_link": { - "type": ["null", "string"] - } + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "object"] - }, - "type": { - "type": ["null", "string"] + "id": { + "type": ["null", "string"] + } } }, - "type": ["null", "object"] - }, - "image_hash": { - "type": ["null", "string"] - }, - "image_url": { - "type": ["null", "string"] - }, - "link_description": { - "type": ["null", "string"] - }, - "message": { - "type": ["null", "string"] - }, - "offer_id": { - "type": ["null", "string"] - }, - "page_welcome_message": { - "type": ["null", "string"] + "type": ["null", "array"] }, - "retailer_item_ids": { - "type": ["null", "array"], + "home_ownership": { "items": { - "type": "string" - } - }, - "targeting": { - "definitions": { - "id_name_pairs": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "targeting_fields": { - "type": ["null", "object"], - "properties": { - "household_composition": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_type": { - "$ref$": "targeting.json#/definitions/id_name_pairs" - }, - "friends_of_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "family_statuses": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_positions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "education_majors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "life_events": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "moms": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "interests": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "behaviors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "user_adclusters": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "income": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_employers": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "industries": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "net_worth": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "relationship_statuses": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] - } - }, - "generation": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_ownership": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "politics": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - } + "id": { + "type": ["null", "string"] } } }, - "type": ["null", "object"], - "properties": { - "messenger_positions": { - "type": ["null", "array"], - "items": { + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { "type": ["null", "string"] - } - }, - "locales": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } }, - "type": ["null", "array"] - }, - "instagram_positions": { - "items": { + "id": { "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "audience_network_positions": { - "items": { + } + } + }, + "type": ["null", "array"] + } + } + } + }, + "type": ["null", "object"], + "properties": { + "messenger_positions": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "locales": { + "items": { + "type": ["null", "integer"] + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "instagram_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "audience_network_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "exclusions": { + "type": ["null", "object"], + "properties": { + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "exclusions": { - "type": ["null", "object"], - "properties": { - "household_composition": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_type": { - "$ref$": "targeting.json#/definitions/id_name_pairs" - }, - "friends_of_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "family_statuses": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_positions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "education_majors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "life_events": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "moms": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "interests": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "behaviors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "user_adclusters": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "income": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_employers": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "industries": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "net_worth": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "relationship_statuses": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] - } - }, - "generation": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_ownership": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "politics": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - } + "id": { + "type": ["null", "string"] } - }, - "interests": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "geo_locations": { - "type": ["null", "object"], - "properties": { - "regions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "key": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "countries": { - "items": { - "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "cities": { - "items": { - "type": ["null", "object"], - "properties": { - "key": { - "type": ["null", "string"] - }, - "distance_unit": { - "type": ["null", "string"] - }, - "region": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "region_id": { - "type": ["null", "string"] - }, - "radius": { - "type": ["null", "integer"] - } - } - }, - "type": ["null", "array"] - }, - "location_types": { - "items": { - "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "zips": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "country": { - "type": ["null", "string"] - }, - "key": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "primary_city_id": { - "type": ["null", "integer"] - }, - "region_id": { - "type": ["null", "integer"] - } - } - } - }, - "custom_locations": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "address_string": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "distance_unit": { - "type": ["null", "string"] - }, - "latitude": { - "type": ["null", "number"] - }, - "longitude": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "primary_city_id": { - "type": ["null", "integer"] - }, - "radius": { - "type": ["null", "integer"] - }, - "region_id": { - "type": ["null", "integer"] - } - } - } - }, - "country_groups": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "geo-markets": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "key": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - } - } - } - } - }, - "excluded_geo_locations": { - "type": ["null", "object"], - "properties": { - "regions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "key": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "countries": { - "items": { - "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "cities": { - "items": { - "type": ["null", "object"], - "properties": { - "key": { - "type": ["null", "string"] - }, - "distance_unit": { - "type": ["null", "string"] - }, - "region": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "region_id": { - "type": ["null", "string"] - }, - "radius": { - "type": ["null", "integer"] - } - } - }, - "type": ["null", "array"] - }, - "location_types": { - "items": { - "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "zips": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "country": { - "type": ["null", "string"] - }, - "key": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - }, - "primary_city_id": { - "type": ["null", "integer"] - }, - "region_id": { - "type": ["null", "integer"] - } - } - } - }, - "custom_locations": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "address_string": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "distance_unit": { - "type": ["null", "string"] - }, - "latitude": { - "type": ["null", "number"] - }, - "longitude": { - "type": ["null", "number"] - }, - "name": { - "type": ["null", "string"] - }, - "primary_city_id": { - "type": ["null", "integer"] - }, - "radius": { - "type": ["null", "integer"] - }, - "region_id": { - "type": ["null", "integer"] - } - } - } - }, - "country_groups": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "geo-markets": { - "type": ["null", "array"], - "items": { - "type": ["null", "object"], - "properties": { - "key": { - "type": ["null", "string"] - }, - "name": { - "type": ["null", "string"] - } - } - } - } + "id": { + "type": ["null", "string"] } - }, - "work_positions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "education_statuses": { - "items": { - "type": ["null", "integer"] - }, - "type": ["null", "array"] - }, - "publisher_platforms": { - "items": { + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "age_max": { - "type": ["null", "integer"] - }, - "custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "device_platforms": { - "items": { + "id": { "type": ["null", "string"] - }, - "type": ["null", "array"] - }, - "age_min": { - "type": ["null", "integer"] - }, - "facebook_positions": { - "items": { + } + } + }, + "type": ["null", "array"] + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { "type": ["null", "string"] }, - "type": ["null", "array"] - }, - "excluded_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "flexible_spec": { - "items": { - "type": ["null", "object"], - "properties": { - "household_composition": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_type": { - "$ref$": "targeting.json#/definitions/id_name_pairs" - }, - "friends_of_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "family_statuses": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_positions": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "education_majors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "life_events": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "moms": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "interests": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "behaviors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "user_adclusters": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "income": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "excluded_custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "work_employers": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "industries": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "net_worth": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "relationship_statuses": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] - } - }, - "generation": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "home_ownership": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "politics": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - } - } - }, - "type": ["null", "array"] - }, - "friends_of_connections": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } - }, - "type": ["null", "array"] - }, - "user_os": { - "type": ["null", "array"], - "items": { + "id": { "type": ["null", "string"] } - }, - "user_device": { - "type": ["null", "array"], - "items": { + } + }, + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { "type": ["null", "string"] - } - }, - "excluded_custom_audiences": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } - } }, - "type": ["null", "array"] - }, - "excluded_publisher_categories": { - "type": ["null", "array"], - "items": { + "id": { "type": ["null", "string"] } + } + }, + "type": ["null", "array"] + }, + "life_events": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + } + } + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "geo_locations": { + "type": ["null", "object"], + "properties": { + "regions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "countries": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "cities": { + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "region": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "region_id": { + "type": ["null", "string"] + }, + "radius": { + "type": ["null", "integer"] + } + } + }, + "type": ["null", "array"] + }, + "location_types": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "zips": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "custom_locations": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "address_string": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "latitude": { + "type": ["null", "number"] + }, + "longitude": { + "type": ["null", "number"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "radius": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "country_groups": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "geo-markets": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + } + } + } + } + } + }, + "excluded_geo_locations": { + "type": ["null", "object"], + "properties": { + "regions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "countries": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "cities": { + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "region": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "region_id": { + "type": ["null", "string"] + }, + "radius": { + "type": ["null", "integer"] + } + } + }, + "type": ["null", "array"] + }, + "location_types": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "zips": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "custom_locations": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "address_string": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "latitude": { + "type": ["null", "number"] + }, + "longitude": { + "type": ["null", "number"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "radius": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "country_groups": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "geo-markets": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + } + } + } + } + } + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_statuses": { + "items": { + "type": ["null", "integer"] + }, + "type": ["null", "array"] + }, + "publisher_platforms": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "age_max": { + "type": ["null", "integer"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "device_platforms": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "age_min": { + "type": ["null", "integer"] + }, + "facebook_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "flexible_spec": { + "items": { + "type": ["null", "object"], + "properties": { + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "life_events": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + } + } + }, + "type": ["null", "array"] + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_os": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "user_device": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_publisher_categories": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "genders": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "targeting_optimization": { + "type": ["null", "string"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "office_type": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "app_install_state": { + "type": ["null", "string"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interested_in": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "excluded_user_device": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + } + } + }, + "bid_info": { + "type": ["null", "object"], + "properties": { + "CLICKS": { + "type": ["null", "integer"] + }, + "ACTIONS": { + "type": ["null", "integer"] + }, + "IMPRESSIONS": { + "type": ["null", "integer"] + }, + "REACH": { + "type": ["null", "integer"] + } + } + }, + "adlabels": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time" + }, + "updated_time": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true + }, + "sync_mode": "incremental" + }, + { + "stream": { + "name": "ads", + "json_schema": { + "type": ["null", "object"], + "properties": { + "bid_type": { + "type": ["null", "string"] + }, + "account_id": { + "type": ["null", "string"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "adlabels": { + "type": ["null", "array"], + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "updated_time": { + "type": "string", + "format": "date-time" + } + } + } + }, + "bid_amount": { + "type": ["null", "integer"] + }, + "bid_info": { + "type": ["null", "object"], + "properties": { + "CLICKS": { + "type": ["null", "integer"] + }, + "ACTIONS": { + "type": ["null", "integer"] + }, + "REACH": { + "type": ["null", "integer"] + }, + "IMPRESSIONS": { + "type": ["null", "integer"] + }, + "SOCIAL": { + "type": ["null", "integer"] + } + } + }, + "status": { + "type": ["null", "string"] + }, + "creative": { + "type": ["null", "object"], + "properties": { + "creative_id": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "id": { + "type": ["null", "string"] + }, + "updated_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "created_time": { + "type": ["null", "string"], + "format": "date-time" + }, + "name": { + "type": ["null", "string"] + }, + "targeting": { + "definitions": { + "id_name_pairs": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "targeting_fields": { + "type": ["null", "object"], + "properties": { + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "life_events": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + } + } + } + }, + "type": ["null", "object"], + "properties": { + "messenger_positions": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "locales": { + "items": { + "type": ["null", "integer"] + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "instagram_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "audience_network_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "exclusions": { + "type": ["null", "object"], + "properties": { + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "life_events": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + } + } + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "geo_locations": { + "type": ["null", "object"], + "properties": { + "regions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "countries": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "cities": { + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "region": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "region_id": { + "type": ["null", "string"] + }, + "radius": { + "type": ["null", "integer"] + } + } + }, + "type": ["null", "array"] + }, + "location_types": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "zips": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "custom_locations": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "address_string": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "latitude": { + "type": ["null", "number"] + }, + "longitude": { + "type": ["null", "number"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "radius": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "country_groups": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "geo-markets": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + } + } + } + } + } + }, + "excluded_geo_locations": { + "type": ["null", "object"], + "properties": { + "regions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "countries": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "cities": { + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "region": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "region_id": { + "type": ["null", "string"] + }, + "radius": { + "type": ["null", "integer"] + } + } + }, + "type": ["null", "array"] + }, + "location_types": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "zips": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "country": { + "type": ["null", "string"] + }, + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "custom_locations": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "address_string": { + "type": ["null", "string"] + }, + "country": { + "type": ["null", "string"] + }, + "distance_unit": { + "type": ["null", "string"] + }, + "latitude": { + "type": ["null", "number"] + }, + "longitude": { + "type": ["null", "number"] + }, + "name": { + "type": ["null", "string"] + }, + "primary_city_id": { + "type": ["null", "integer"] + }, + "radius": { + "type": ["null", "integer"] + }, + "region_id": { + "type": ["null", "integer"] + } + } + } + }, + "country_groups": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "geo-markets": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "key": { + "type": ["null", "string"] + }, + "name": { + "type": ["null", "string"] + } + } + } + } + } + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "education_statuses": { + "items": { + "type": ["null", "integer"] + }, + "type": ["null", "array"] + }, + "publisher_platforms": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "age_max": { + "type": ["null", "integer"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "device_platforms": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "age_min": { + "type": ["null", "integer"] + }, + "facebook_positions": { + "items": { + "type": ["null", "string"] + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "flexible_spec": { + "items": { + "type": ["null", "object"], + "properties": { + "household_composition": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } }, - "genders": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] - } - }, - "targeting_optimization": { - "type": ["null", "string"] - }, - "user_adclusters": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "generation": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "behaviors": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "work_positions": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "moms": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "education_majors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "home_ownership": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "life_events": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "office_type": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "home_type": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } + }, + "type": ["null", "array"] + }, + "interests": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } }, - "family_statuses": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "work_employers": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] - }, - "relationship_statuses": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] } }, - "industries": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "income": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] - }, - "app_install_state": { - "type": ["null", "string"] + } }, - "net_worth": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] + } }, - "politics": { - "items": { - "type": ["null", "object"], - "properties": { - "name": { - "type": ["null", "string"] - }, - "id": { - "type": ["null", "string"] - } + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "type": ["null", "array"] - }, - "interested_in": { - "type": ["null", "array"], - "items": { - "type": ["null", "integer"] } }, - "excluded_user_device": { - "type": ["null", "array"], - "items": { - "type": ["null", "string"] + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } } - } + }, + "type": ["null", "array"] + } + } + }, + "type": ["null", "array"] + }, + "friends_of_connections": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "user_os": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "user_device": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "excluded_custom_audiences": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "excluded_publisher_categories": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "genders": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "targeting_optimization": { + "type": ["null", "string"] + }, + "user_adclusters": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "generation": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "behaviors": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "moms": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_ownership": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "office_type": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "home_type": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "family_statuses": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "relationship_statuses": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "industries": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] } - }, - "title": { - "type": ["null", "string"] - }, - "video_id": { - "type": ["null", "string"] } + }, + "type": ["null", "array"] + }, + "income": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "app_install_state": { + "type": ["null", "string"] + }, + "net_worth": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "politics": { + "items": { + "type": ["null", "object"], + "properties": { + "name": { + "type": ["null", "string"] + }, + "id": { + "type": ["null", "string"] + } + } + }, + "type": ["null", "array"] + }, + "interested_in": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + }, + "excluded_user_device": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } } - }, - "type": ["null", "object"] - }, - "object_type": { - "type": ["null", "string"] + } }, - "object_url": { + "effective_status": { "type": ["null", "string"] }, - "product_set_id": { + "last_updated_by_app_id": { "type": ["null", "string"] }, - "status": { - "type": ["null", "string"] + "recommendations": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "blame_field": { + "type": ["null", "string"] + }, + "code": { + "type": "integer" + }, + "confidence": { + "type": "string" + }, + "importance": { + "type": "string" + }, + "message": { + "type": "string" + }, + "title": { + "type": "string" + } + } + } }, - "template_url": { + "source_ad_id": { "type": ["null", "string"] }, - "template_url_spec": { - "type": ["null", "object"], - "properties": { - "android": { - "type": ["null", "object"], - "properties": { - "app_name": { - "type": "string" + "tracking_specs": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "application": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post": { + "items": { + "type": ["null", "string"] }, - "package": { - "type": "string" + "type": ["null", "array"] + }, + "conversion_id": { + "items": { + "type": ["null", "string"] }, - "url": { - "type": "string" - } - } - }, - "config": { - "type": ["null", "object"], - "properties": { - "app_id": { - "type": "string" + "type": ["null", "array"] + }, + "action.type": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } - } - }, - "ios": { - "type": ["null", "object"], - "properties": { - "app_name": { - "type": "string" + }, + "post.wall": { + "items": { + "type": ["null", "string"] }, - "app_store_id": { - "type": "string" + "type": ["null", "array"] + }, + "page": { + "items": { + "type": ["null", "string"] }, - "url": { - "type": "string" + "type": ["null", "array"] + }, + "creative": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "dataset": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "event": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "event.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "event_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "fb_pixel": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "fb_pixel_event": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "leadgen": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "object": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "object.domain": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offer": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offer.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offsite_pixel": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "page.parent": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post.object": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post.object.wall": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "question": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "question.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "response": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "subtype": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } } - }, - "ipad": { - "type": ["null", "object"], - "properties": { - "app_name": { - "type": "string" + } + } + }, + "conversion_specs": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "application": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post": { + "items": { + "type": ["null", "string"] }, - "app_store_id": { - "type": "string" + "type": ["null", "array"] + }, + "conversion_id": { + "items": { + "type": ["null", "string"] }, - "url": { - "type": "string" + "type": ["null", "array"] + }, + "action.type": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } - } - }, - "iphone": { - "type": ["null", "object"], - "properties": { - "app_name": { - "type": "string" + }, + "post.wall": { + "items": { + "type": ["null", "string"] }, - "app_store_id": { - "type": "string" + "type": ["null", "array"] + }, + "page": { + "items": { + "type": ["null", "string"] }, - "url": { - "type": "string" + "type": ["null", "array"] + }, + "creative": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } - } - }, - "web": { - "type": ["null", "object"], - "properties": { - "should_fallback": { - "type": "string" - }, - "url": { - "type": "string" + }, + "dataset": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } - } - }, - "windows_phone": { - "type": ["null", "object"], - "properties": { - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "url": { - "type": "string" + }, + "event": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "event.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "event_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "fb_pixel": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "fb_pixel_event": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "leadgen": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "object": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "object.domain": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offer": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offer.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "offsite_pixel": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "page.parent": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post.object": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "post.object.wall": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "question": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "question.creator": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "response": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + }, + "subtype": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] } } } } - }, - "thumbnail_url": { - "type": ["null", "string"] - }, - "image_hash": { - "type": ["null", "string"] - }, - "url_tags": { - "type": ["null", "string"] - }, - "video_id": { - "type": ["null", "string"] - }, - "link_url": { - "type": ["null", "string"] } - }, - "type": ["null", "object"] + } }, - "supported_sync_modes": ["full_refresh"] - } + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true + }, + "sync_mode": "incremental" } ] } diff --git a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adcreatives.json b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adcreatives.json new file mode 100644 index 0000000000000..245dd120ba857 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adcreatives.json @@ -0,0 +1,5105 @@ +{ + "streams": [ + { + "stream": { + "name": "adcreatives", + "json_schema": { + "properties": { + "body": { + "type": [ + "null", + "string" + ] + }, + "object_story_id": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + }, + "account_id": { + "type": [ + "null", + "string" + ] + }, + "actor_id": { + "type": [ + "null", + "string" + ] + }, + "adlabels": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "updated_time": { + "type": "string", + "format": "date-time" + } + } + } + }, + "applink_treatment": { + "type": [ + "null", + "string" + ] + }, + "call_to_action_type": { + "type": [ + "null", + "string" + ] + }, + "effective_instagram_story_id": { + "type": [ + "null", + "string" + ] + }, + "effective_object_story_id": { + "type": [ + "null", + "string" + ] + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "image_crops": { + "properties": { + "100x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "100x72": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "191x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x150": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x500": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "600x360": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "90x160": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "instagram_actor_id": { + "type": [ + "null", + "string" + ] + }, + "instagram_permalink_url": { + "type": [ + "null", + "string" + ] + }, + "instagram_story_id": { + "type": [ + "null", + "string" + ] + }, + "link_og_id": { + "type": [ + "null", + "string" + ] + }, + "object_id": { + "type": [ + "null", + "string" + ] + }, + "object_story_spec": { + "properties": { + "page_id": { + "type": [ + "null", + "string" + ] + }, + "instagram_actor_id": { + "type": [ + "null", + "string" + ] + }, + "link_data": { + "properties": { + "additional_image_index": { + "type": [ + "null", + "integer" + ] + }, + "app_link_spec": { + "type": [ + "null", + "object" + ], + "properties": { + "android": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "class": { + "type": "string" + }, + "package": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "ios": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "ipad": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "iphone": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "attachment_style": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_page_id": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_relationship": { + "type": [ + "null", + "string" + ] + }, + "call_to_action": { + "properties": { + "value": { + "properties": { + "app_destination": { + "type": [ + "null", + "string" + ] + }, + "app_link": { + "type": [ + "null", + "string" + ] + }, + "application": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "lead_gen_form_id": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "link_caption": { + "type": [ + "null", + "string" + ] + }, + "link_format": { + "type": [ + "null", + "string" + ] + }, + "page": { + "type": [ + "null", + "string" + ] + }, + "product_link": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "caption": { + "type": [ + "null", + "string" + ] + }, + "child_attachments": { + "items": { + "properties": { + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "call_to_action": { + "properties": { + "value": { + "properties": { + "app_destination": { + "type": [ + "null", + "string" + ] + }, + "app_link": { + "type": [ + "null", + "string" + ] + }, + "application": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "lead_gen_form_id": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "link_caption": { + "type": [ + "null", + "string" + ] + }, + "link_format": { + "type": [ + "null", + "string" + ] + }, + "page": { + "type": [ + "null", + "string" + ] + }, + "product_link": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "caption": { + "type": [ + "null", + "string" + ] + }, + "picture": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "image_crops": { + "properties": { + "100x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "100x72": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "191x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x150": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x500": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "600x360": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "90x160": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "static_card": { + "type": [ + "null", + "boolean" + ] + }, + "video_id": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": [ + "null", + "array" + ] + }, + "multi_share_optimized": { + "type": [ + "null", + "boolean" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "image_crops": { + "properties": { + "100x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "100x72": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "191x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x150": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x500": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "600x360": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "90x160": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "force_single_link": { + "type": [ + "null", + "boolean" + ] + }, + "multi_share_end_card": { + "type": [ + "null", + "boolean" + ] + }, + "message": { + "type": [ + "null", + "string" + ] + }, + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "picture": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "offer_id": { + "type": [ + "null", + "string" + ] + }, + "page_welcome_message": { + "type": [ + "null", + "string" + ] + }, + "retailer_item_ids": { + "type": [ + "null", + "array" + ], + "items": { + "type": "string" + } + }, + "show_multiple_images": { + "type": [ + "null", + "boolean" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "photo_data": { + "type": [ + "null", + "object" + ], + "properties": { + "branded_content_sponsor_page_id": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_relationship": { + "type": [ + "null", + "string" + ] + }, + "caption": { + "type": "string" + }, + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "page_welcome_message": { + "type": [ + "null", + "string" + ] + }, + "url": { + "type": [ + "null", + "string" + ] + } + } + }, + "template_data": { + "properties": { + "additional_image_index": { + "type": [ + "null", + "integer" + ] + }, + "app_link_spec": { + "type": [ + "null", + "object" + ], + "properties": { + "android": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "class": { + "type": "string" + }, + "package": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "ios": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "ipad": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + }, + "iphone": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + }, + "attachment_style": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_page_id": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_relationship": { + "type": [ + "null", + "string" + ] + }, + "call_to_action": { + "properties": { + "value": { + "properties": { + "app_destination": { + "type": [ + "null", + "string" + ] + }, + "app_link": { + "type": [ + "null", + "string" + ] + }, + "application": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "lead_gen_form_id": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "link_caption": { + "type": [ + "null", + "string" + ] + }, + "link_format": { + "type": [ + "null", + "string" + ] + }, + "page": { + "type": [ + "null", + "string" + ] + }, + "product_link": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "caption": { + "type": [ + "null", + "string" + ] + }, + "child_attachments": { + "items": { + "properties": { + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "call_to_action": { + "properties": { + "value": { + "properties": { + "app_destination": { + "type": [ + "null", + "string" + ] + }, + "app_link": { + "type": [ + "null", + "string" + ] + }, + "application": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "lead_gen_form_id": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "link_caption": { + "type": [ + "null", + "string" + ] + }, + "link_format": { + "type": [ + "null", + "string" + ] + }, + "page": { + "type": [ + "null", + "string" + ] + }, + "product_link": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "caption": { + "type": [ + "null", + "string" + ] + }, + "picture": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "image_crops": { + "properties": { + "100x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "100x72": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "191x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x150": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x500": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "600x360": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "90x160": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "static_card": { + "type": [ + "null", + "boolean" + ] + }, + "video_id": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": [ + "null", + "array" + ] + }, + "multi_share_optimized": { + "type": [ + "null", + "boolean" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "image_crops": { + "properties": { + "100x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "100x72": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "191x100": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x150": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "400x500": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "600x360": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + }, + "90x160": { + "items": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "type": [ + "null", + "array" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "force_single_link": { + "type": [ + "null", + "boolean" + ] + }, + "multi_share_end_card": { + "type": [ + "null", + "boolean" + ] + }, + "message": { + "type": [ + "null", + "string" + ] + }, + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "picture": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "offer_id": { + "type": [ + "null", + "string" + ] + }, + "page_welcome_message": { + "type": [ + "null", + "string" + ] + }, + "retailer_item_ids": { + "type": [ + "null", + "array" + ], + "items": { + "type": "string" + } + }, + "show_multiple_images": { + "type": [ + "null", + "boolean" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "text_data": { + "type": [ + "null", + "object" + ], + "properties": { + "message": { + "type": "string" + } + } + }, + "video_data": { + "type": [ + "null", + "object" + ], + "properties": { + "additional_image_index": { + "type": [ + "null", + "integer" + ] + }, + "branded_content_sponsor_page_id": { + "type": [ + "null", + "string" + ] + }, + "branded_content_sponsor_relationship": { + "type": [ + "null", + "string" + ] + }, + "call_to_action": { + "properties": { + "value": { + "properties": { + "app_destination": { + "type": [ + "null", + "string" + ] + }, + "app_link": { + "type": [ + "null", + "string" + ] + }, + "application": { + "type": [ + "null", + "string" + ] + }, + "event_id": { + "type": [ + "null", + "string" + ] + }, + "lead_gen_form_id": { + "type": [ + "null", + "string" + ] + }, + "link": { + "type": [ + "null", + "string" + ] + }, + "link_caption": { + "type": [ + "null", + "string" + ] + }, + "link_format": { + "type": [ + "null", + "string" + ] + }, + "page": { + "type": [ + "null", + "string" + ] + }, + "product_link": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "type": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "image_url": { + "type": [ + "null", + "string" + ] + }, + "link_description": { + "type": [ + "null", + "string" + ] + }, + "message": { + "type": [ + "null", + "string" + ] + }, + "offer_id": { + "type": [ + "null", + "string" + ] + }, + "page_welcome_message": { + "type": [ + "null", + "string" + ] + }, + "retailer_item_ids": { + "type": [ + "null", + "array" + ], + "items": { + "type": "string" + } + }, + "targeting": { + "definitions": { + "id_name_pairs": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "targeting_fields": { + "type": [ + "null", + "object" + ], + "properties": { + "household_composition": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "family_statuses": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_positions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "education_majors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "life_events": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "moms": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "interests": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "behaviors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "user_adclusters": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "income": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_employers": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "industries": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "net_worth": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "relationship_statuses": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "generation": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_ownership": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "politics": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + } + } + } + }, + "type": [ + "null", + "object" + ], + "properties": { + "messenger_positions": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "locales": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "instagram_positions": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "audience_network_positions": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "exclusions": { + "type": [ + "null", + "object" + ], + "properties": { + "household_composition": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "family_statuses": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_positions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "education_majors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "life_events": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "moms": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "interests": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "behaviors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "user_adclusters": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "income": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_employers": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "industries": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "net_worth": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "relationship_statuses": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "generation": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_ownership": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "politics": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + } + } + }, + "interests": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "geo_locations": { + "type": [ + "null", + "object" + ], + "properties": { + "regions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "key": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "countries": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "cities": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "key": { + "type": [ + "null", + "string" + ] + }, + "distance_unit": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "region_id": { + "type": [ + "null", + "string" + ] + }, + "radius": { + "type": [ + "null", + "integer" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "location_types": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "zips": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "country": { + "type": [ + "null", + "string" + ] + }, + "key": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "primary_city_id": { + "type": [ + "null", + "integer" + ] + }, + "region_id": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "custom_locations": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "address_string": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "distance_unit": { + "type": [ + "null", + "string" + ] + }, + "latitude": { + "type": [ + "null", + "number" + ] + }, + "longitude": { + "type": [ + "null", + "number" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "primary_city_id": { + "type": [ + "null", + "integer" + ] + }, + "radius": { + "type": [ + "null", + "integer" + ] + }, + "region_id": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "country_groups": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "geo-markets": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "key": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + }, + "excluded_geo_locations": { + "type": [ + "null", + "object" + ], + "properties": { + "regions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "key": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "countries": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "cities": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "key": { + "type": [ + "null", + "string" + ] + }, + "distance_unit": { + "type": [ + "null", + "string" + ] + }, + "region": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "region_id": { + "type": [ + "null", + "string" + ] + }, + "radius": { + "type": [ + "null", + "integer" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "location_types": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "zips": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "country": { + "type": [ + "null", + "string" + ] + }, + "key": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "primary_city_id": { + "type": [ + "null", + "integer" + ] + }, + "region_id": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "custom_locations": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "address_string": { + "type": [ + "null", + "string" + ] + }, + "country": { + "type": [ + "null", + "string" + ] + }, + "distance_unit": { + "type": [ + "null", + "string" + ] + }, + "latitude": { + "type": [ + "null", + "number" + ] + }, + "longitude": { + "type": [ + "null", + "number" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "primary_city_id": { + "type": [ + "null", + "integer" + ] + }, + "radius": { + "type": [ + "null", + "integer" + ] + }, + "region_id": { + "type": [ + "null", + "integer" + ] + } + } + } + }, + "country_groups": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "geo-markets": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "key": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + } + } + } + } + } + }, + "work_positions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "education_statuses": { + "items": { + "type": [ + "null", + "integer" + ] + }, + "type": [ + "null", + "array" + ] + }, + "publisher_platforms": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "age_max": { + "type": [ + "null", + "integer" + ] + }, + "custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "device_platforms": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "age_min": { + "type": [ + "null", + "integer" + ] + }, + "facebook_positions": { + "items": { + "type": [ + "null", + "string" + ] + }, + "type": [ + "null", + "array" + ] + }, + "excluded_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "flexible_spec": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "household_composition": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_type": { + "$ref$": "targeting.json#/definitions/id_name_pairs" + }, + "friends_of_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "family_statuses": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_positions": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "education_majors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "life_events": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "moms": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "interests": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "behaviors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "user_adclusters": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "income": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "work_employers": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "industries": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "net_worth": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "relationship_statuses": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "generation": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_ownership": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "politics": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "friends_of_connections": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "user_os": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "user_device": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "excluded_custom_audiences": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "excluded_publisher_categories": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + }, + "genders": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "targeting_optimization": { + "type": [ + "null", + "string" + ] + }, + "user_adclusters": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "generation": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "behaviors": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "moms": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_ownership": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "office_type": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "home_type": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "family_statuses": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "relationship_statuses": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "industries": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "income": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "app_install_state": { + "type": [ + "null", + "string" + ] + }, + "net_worth": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "politics": { + "items": { + "type": [ + "null", + "object" + ], + "properties": { + "name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": [ + "null", + "string" + ] + } + } + }, + "type": [ + "null", + "array" + ] + }, + "interested_in": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "integer" + ] + } + }, + "excluded_user_device": { + "type": [ + "null", + "array" + ], + "items": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "video_id": { + "type": [ + "null", + "string" + ] + } + } + } + }, + "type": [ + "null", + "object" + ] + }, + "object_type": { + "type": [ + "null", + "string" + ] + }, + "object_url": { + "type": [ + "null", + "string" + ] + }, + "product_set_id": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "template_url": { + "type": [ + "null", + "string" + ] + }, + "template_url_spec": { + "type": [ + "null", + "object" + ], + "properties": { + "android": { + "type": [ + "null", + "object" + ], + "properties": { + "app_name": { + "type": "string" + }, + "package": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "config": { + "type": [ + "null", + "object" + ], + "properties": { + "app_id": { + "type": "string" + } + } + }, + "ios": { + "type": [ + "null", + "object" + ], + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "ipad": { + "type": [ + "null", + "object" + ], + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "iphone": { + "type": [ + "null", + "object" + ], + "properties": { + "app_name": { + "type": "string" + }, + "app_store_id": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "web": { + "type": [ + "null", + "object" + ], + "properties": { + "should_fallback": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "windows_phone": { + "type": [ + "null", + "object" + ], + "properties": { + "app_id": { + "type": "string" + }, + "app_name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + }, + "thumbnail_url": { + "type": [ + "null", + "string" + ] + }, + "image_hash": { + "type": [ + "null", + "string" + ] + }, + "url_tags": { + "type": [ + "null", + "string" + ] + }, + "video_id": { + "type": [ + "null", + "string" + ] + }, + "link_url": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "null", + "object" + ] + }, + "supported_sync_modes": [ + "full_refresh" + ], + "source_defined_cursor": false + }, + "sync_mode": "incremental" + } + ] +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json new file mode 100644 index 0000000000000..f0a85ecc08e12 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/sample_files/configured_catalog_adsinsights.json @@ -0,0 +1,1088 @@ +{ + "streams": [ + { + "stream": { + "name": "ads_insights", + "json_schema": { + "type": ["null", "object"], + "properties": { + "unique_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "action_values": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "outbound_clicks": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_30_sec_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p25_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p50_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p75_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p100_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_play_curve_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + } + } + } + }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true + }, + "sync_mode": "incremental" + }, + { + "stream": { + "name": "ads_insights_platform_and_device", + "json_schema": { + "type": ["null", "object"], + "properties": { + "unique_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "action_values": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "outbound_clicks": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_30_sec_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p25_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p50_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p75_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_p100_watched_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "1d_click": { + "type": ["null", "number"] + }, + "7d_click": { + "type": ["null", "number"] + }, + "28d_click": { + "type": ["null", "number"] + }, + "1d_view": { + "type": ["null", "number"] + }, + "7d_view": { + "type": ["null", "number"] + }, + "28d_view": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "number"] + } + } + } + }, + "video_play_curve_actions": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "action_type": { + "type": ["null", "string"] + }, + "value": { + "type": ["null", "array"], + "items": { + "type": ["null", "integer"] + } + } + } + } + }, + "impression_device": { + "type": ["null", "string"] + }, + "platform_position": { + "type": ["null", "string"] + }, + "publisher_platform": { + "type": ["null", "string"] + }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "placement": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true + }, + "sync_mode": "incremental" + } + ] +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/api.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/api.py index 77bbfa944150b..8a318f98abcfb 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/api.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/api.py @@ -22,13 +22,15 @@ SOFTWARE. """ +import time from abc import ABC, abstractmethod from typing import Any, Iterator, Sequence import backoff import pendulum as pendulum from base_python.entrypoint import logger # FIXME (Eugene K): register logger as standard python logger -from facebook_business.exceptions import FacebookRequestError +from facebook_business.adobjects.adreportrun import AdReportRun +from facebook_business.exceptions import FacebookBadObjectError, FacebookRequestError from .common import retry_pattern @@ -225,82 +227,113 @@ def _get_campaigns(self, params): return self._api.account.get_campaigns(params={**params, **self._state_filter()}, fields=[self.state_pk]) -# -# FIXME: Disabled until we populate test account with AdsInsights data to test -# https://github.com/airbytehq/airbyte/issues/1709 -# -# class AdsInsightAPI(IncrementalStreamAPI): -# entity_prefix = "" -# state_pk = "date_start" -# -# ALL_ACTION_ATTRIBUTION_WINDOWS = [ -# "1d_click", -# "7d_click", -# "28d_click", -# "1d_view", -# "7d_view", -# "28d_view", -# ] -# -# ALL_ACTION_BREAKDOWNS = [ -# "action_type", -# "action_target_id", -# "action_destination", -# ] -# -# # Some automatic fields (primary-keys) cannot be used as 'fields' query params. -# INVALID_INSIGHT_FIELDS = [ -# "impression_device", -# "publisher_platform", -# "platform_position", -# "age", -# "gender", -# "country", -# "placement", -# "region", -# "dma", -# ] -# -# MAX_WAIT_TO_START_SECONDS = 2 * 60 -# MAX_WAIT_TO_FINISH_SECONDS = 30 * 60 -# MAX_ASYNC_SLEEP_SECONDS = 5 * 60 -# -# action_breakdowns = ALL_ACTION_BREAKDOWNS -# level = "ad" -# action_attribution_windows = ALL_ACTION_ATTRIBUTION_WINDOWS -# time_increment = 1 -# buffer_days = 28 -# -# def __init__(self, api, start_date, breakdowns=None): -# super().__init__(api=api) -# self.start_date = start_date -# self._state = start_date -# self.breakdowns = breakdowns -# -# def list(self, fields: Sequence[str] = None) -> Iterator[dict]: -# for params in self._params(fields=fields): -# for rec in self.state_filter(obj.export_all_data() for obj in self._get_insights(params)): -# yield rec -# -# def _params(self, fields: Sequence[str] = None) -> Iterator[dict]: -# buffered_start_date = self._state.subtract(days=self.buffer_days) -# end_date = pendulum.now() -# -# fields = list(set(fields) - set(self.INVALID_INSIGHT_FIELDS)) -# -# while buffered_start_date <= end_date: -# yield { -# "level": self.level, -# "action_breakdowns": self.action_breakdowns, -# "breakdowns": self.breakdowns, -# "limit": self.result_return_limit, -# "fields": fields, -# "time_increment": self.time_increment, -# "action_attribution_windows": self.action_attribution_windows, -# "time_ranges": [{"since": buffered_start_date.to_date_string(), "until": buffered_start_date.to_date_string()}], -# } -# buffered_start_date = buffered_start_date.add(days=1) -# -# @backoff_policy -# def _get_insights(self, params): -# return self._api.account.get_insights(params=params) +class JobTimeoutException(Exception): + pass + + +class AdsInsightAPI(IncrementalStreamAPI): + entity_prefix = "" + state_pk = "date_start" + + ALL_ACTION_ATTRIBUTION_WINDOWS = [ + "1d_click", + "7d_click", + "28d_click", + "1d_view", + "7d_view", + "28d_view", + ] + + ALL_ACTION_BREAKDOWNS = [ + "action_type", + "action_target_id", + "action_destination", + ] + + # Some automatic fields (primary-keys) cannot be used as 'fields' query params. + INVALID_INSIGHT_FIELDS = [ + "impression_device", + "publisher_platform", + "platform_position", + "age", + "gender", + "country", + "placement", + "region", + "dma", + ] + + MAX_WAIT_TO_START_SECONDS = 2 * 60 + MAX_WAIT_TO_FINISH_SECONDS = 30 * 60 + MAX_ASYNC_SLEEP_SECONDS = 5 * 60 + + action_breakdowns = ALL_ACTION_BREAKDOWNS + level = "ad" + action_attribution_windows = ALL_ACTION_ATTRIBUTION_WINDOWS + time_increment = 1 + buffer_days = 28 + + def __init__(self, api, start_date, breakdowns=None): + super().__init__(api=api) + self.start_date = start_date + self._state = start_date + self.breakdowns = breakdowns + + def list(self, fields: Sequence[str] = None) -> Iterator[dict]: + for params in self._params(fields=fields): + job = self._run_job_until_completion(params) + yield from self.state_filter(obj.export_all_data() for obj in job.get_result()) + + @retry_pattern(backoff.expo, (FacebookRequestError, JobTimeoutException, FacebookBadObjectError), max_tries=5, factor=4) + def _run_job_until_completion(self, params) -> AdReportRun: + # TODO parallelize running these jobs + job = self._get_insights(params) + logger.info(f"Created AdReportRun: {job} to sync insights with breakdown {self.breakdowns}") + start_time = pendulum.now() + sleep_seconds = 2 + while True: + job = job.api_get() + job_progress_pct = job["async_percent_completion"] + logger.info(f"ReportRunId {job['report_run_id']} is {job_progress_pct}% complete") + + if job["async_status"] == "Job Completed": + return job + + runtime_seconds = (pendulum.now() - start_time).in_seconds() + if runtime_seconds > self.MAX_WAIT_TO_START_SECONDS and job_progress_pct == 0: + raise JobTimeoutException( + f"AdReportRun {job} did not start after {runtime_seconds} seconds. This is an intermittent error which may be fixed by retrying the job. Aborting." + ) + elif runtime_seconds > self.MAX_WAIT_TO_FINISH_SECONDS: + raise JobTimeoutException( + f"AdReportRun {job} did not finish after {runtime_seconds} seconds. This is an intermittent error which may be fixed by retrying the job. Aborting." + ) + logger.info(f"Sleeping {sleep_seconds} seconds while waiting for AdReportRun: {job} to complete") + time.sleep(sleep_seconds) + if sleep_seconds < self.MAX_ASYNC_SLEEP_SECONDS: + sleep_seconds *= 2 + + def _params(self, fields: Sequence[str] = None) -> Iterator[dict]: + # Facebook freezes insight data 28 days after it was generated, which means that all data + # from the past 28 days may have changed since we last emitted it, so we retrieve it again. + buffered_start_date = self._state.subtract(days=self.buffer_days) + end_date = pendulum.now() + + fields = list(set(fields) - set(self.INVALID_INSIGHT_FIELDS)) + + while buffered_start_date <= end_date: + yield { + "level": self.level, + "action_breakdowns": self.action_breakdowns, + "breakdowns": self.breakdowns, + "limit": self.result_return_limit, + "fields": fields, + "time_increment": self.time_increment, + "action_attribution_windows": self.action_attribution_windows, + "time_ranges": [{"since": buffered_start_date.to_date_string(), "until": buffered_start_date.to_date_string()}], + } + buffered_start_date = buffered_start_date.add(days=1) + + @backoff_policy + def _get_insights(self, params) -> AdReportRun: + return self._api.account.get_insights(params=params, is_async=True) diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/client.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/client.py index 09adcdacdbb47..78015842f0b88 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/client.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/client/client.py @@ -32,7 +32,7 @@ from facebook_business.adobjects import user as fb_user from facebook_business.exceptions import FacebookRequestError -from .api import AdCreativeAPI, AdsAPI, AdSetsAPI, CampaignAPI +from .api import AdCreativeAPI, AdsAPI, AdSetsAPI, AdsInsightAPI, CampaignAPI from .common import FacebookAPIException @@ -47,14 +47,14 @@ def __init__(self, account_id: str, access_token: str, start_date: str): "adsets": AdSetsAPI(self), "ads": AdsAPI(self), "adcreatives": AdCreativeAPI(self), - # "ads_insights": AdsInsightAPI(self, start_date=self._start_date), - # "ads_insights_age_and_gender": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["age", "gender"]), - # "ads_insights_country": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["country"]), - # "ads_insights_region": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["region"]), - # "ads_insights_dma": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["dma"]), - # "ads_insights_platform_and_device": AdsInsightAPI( - # self, start_date=self._start_date, breakdowns=["publisher_platform", "platform_position", "impression_device"] - # ), + "ads_insights": AdsInsightAPI(self, start_date=self._start_date), + "ads_insights_age_and_gender": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["age", "gender"]), + "ads_insights_country": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["country"]), + "ads_insights_region": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["region"]), + "ads_insights_dma": AdsInsightAPI(self, start_date=self._start_date, breakdowns=["dma"]), + "ads_insights_platform_and_device": AdsInsightAPI( + self, start_date=self._start_date, breakdowns=["publisher_platform", "platform_position", "impression_device"] + ), } super().__init__() diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights.json new file mode 100644 index 0000000000000..9e5ea7186e90f --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights.json @@ -0,0 +1,179 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { "$ref": "ads_action_stats.json" }, + "actions": { "$ref": "ads_action_stats.json" }, + "action_values": { "$ref": "ads_action_stats.json" }, + "outbound_clicks": { "$ref": "ads_action_stats.json" }, + "video_30_sec_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p25_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p50_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p75_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p100_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_play_curve_actions": { "$ref": "ads_histogram_stats.json" }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + } + } +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_age_and_gender.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_age_and_gender.json new file mode 100644 index 0000000000000..0de28798b28bd --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_age_and_gender.json @@ -0,0 +1,186 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { "$ref": "ads_action_stats.json" }, + "actions": { "$ref": "ads_action_stats.json" }, + "action_values": { "$ref": "ads_action_stats.json" }, + "outbound_clicks": { "$ref": "ads_action_stats.json" }, + "video_30_sec_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p25_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p50_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p75_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p100_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_play_curve_actions": { "$ref": "ads_histogram_stats.json" }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"] + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"] + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "age": { + "type": ["null", "integer", "string"] + }, + "gender": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_country.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_country.json new file mode 100644 index 0000000000000..40614ab2a32b7 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_country.json @@ -0,0 +1,185 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { "$ref": "ads_action_stats.json" }, + "actions": { "$ref": "ads_action_stats.json" }, + "action_values": { "$ref": "ads_action_stats.json" }, + "outbound_clicks": { "$ref": "ads_action_stats.json" }, + "video_30_sec_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p25_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p50_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p75_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p100_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_play_curve_actions": { "$ref": "ads_histogram_stats.json" }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "country": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_dma.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_dma.json new file mode 100644 index 0000000000000..f6a59632004f9 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_dma.json @@ -0,0 +1,185 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { "$ref": "ads_action_stats.json" }, + "actions": { "$ref": "ads_action_stats.json" }, + "action_values": { "$ref": "ads_action_stats.json" }, + "outbound_clicks": { "$ref": "ads_action_stats.json" }, + "video_30_sec_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p25_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p50_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p75_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p100_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_play_curve_actions": { "$ref": "ads_histogram_stats.json" }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "dma": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_platform_and_device.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_platform_and_device.json new file mode 100644 index 0000000000000..fa68b1a1d0f91 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_platform_and_device.json @@ -0,0 +1,214 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { + "$ref": "ads_action_stats.json" + }, + "actions": { + "$ref": "ads_action_stats.json" + }, + "action_values": { + "$ref": "ads_action_stats.json" + }, + "outbound_clicks": { + "$ref": "ads_action_stats.json" + }, + "video_30_sec_watched_actions": { + "$ref": "ads_action_stats.json" + }, + "video_p25_watched_actions": { + "$ref": "ads_action_stats.json" + }, + "video_p50_watched_actions": { + "$ref": "ads_action_stats.json" + }, + "video_p75_watched_actions": { + "$ref": "ads_action_stats.json" + }, + "video_p100_watched_actions": { + "$ref": "ads_action_stats.json" + }, + "video_play_curve_actions": { + "$ref": "ads_histogram_stats.json" + }, + "impression_device": { + "type": ["null", "string"] + }, + "platform_position": { + "type": ["null", "string"] + }, + "publisher_platform": { + "type": ["null", "string"] + }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "placement": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } +} diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_region.json b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_region.json new file mode 100644 index 0000000000000..ec841bde28473 --- /dev/null +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/schemas/ads_insights_region.json @@ -0,0 +1,185 @@ +{ + "type": ["null", "object"], + "properties": { + "unique_actions": { "$ref": "ads_action_stats.json" }, + "actions": { "$ref": "ads_action_stats.json" }, + "action_values": { "$ref": "ads_action_stats.json" }, + "outbound_clicks": { "$ref": "ads_action_stats.json" }, + "video_30_sec_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p25_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p50_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p75_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_p100_watched_actions": { "$ref": "ads_action_stats.json" }, + "video_play_curve_actions": { "$ref": "ads_histogram_stats.json" }, + "clicks": { + "type": ["null", "integer"] + }, + "date_stop": { + "type": ["null", "string"], + "format": "date-time" + }, + "ad_id": { + "type": ["null", "string"] + }, + "website_ctr": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "number"] + }, + "action_destination": { + "type": ["null", "string"] + }, + "action_target_id": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_inline_link_click_ctr": { + "type": ["null", "number"] + }, + "adset_id": { + "type": ["null", "string"] + }, + "frequency": { + "type": ["null", "number"] + }, + "account_name": { + "type": ["null", "string"] + }, + "canvas_avg_view_time": { + "type": ["null", "number"] + }, + "unique_inline_link_clicks": { + "type": ["null", "integer"] + }, + "cost_per_unique_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "inline_post_engagement": { + "type": ["null", "integer"] + }, + "campaign_name": { + "type": ["null", "string"] + }, + "inline_link_clicks": { + "type": ["null", "integer"] + }, + "campaign_id": { + "type": ["null", "string"] + }, + "cpc": { + "type": ["null", "number"] + }, + "ad_name": { + "type": ["null", "string"] + }, + "cost_per_unique_inline_link_click": { + "type": ["null", "number"] + }, + "cpm": { + "type": ["null", "number"] + }, + "cost_per_inline_post_engagement": { + "type": ["null", "number"] + }, + "inline_link_click_ctr": { + "type": ["null", "number"] + }, + "cpp": { + "type": ["null", "number"] + }, + "cost_per_action_type": { + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "value": { + "type": ["null", "string"] + }, + "action_type": { + "type": ["null", "string"] + } + } + } + }, + "unique_link_clicks_ctr": { + "type": ["null", "number"] + }, + "spend": { + "type": ["null", "number"] + }, + "cost_per_unique_click": { + "type": ["null", "number"] + }, + "adset_name": { + "type": ["null", "string"] + }, + "unique_clicks": { + "type": ["null", "integer"] + }, + "social_spend": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "canvas_avg_view_percent": { + "type": ["null", "number"] + }, + "account_id": { + "type": ["null", "string"] + }, + "date_start": { + "type": ["null", "string"], + "format": "date-time" + }, + "objective": { + "type": ["null", "string"] + }, + "impressions": { + "type": ["null", "integer"] + }, + "unique_ctr": { + "type": ["null", "number"] + }, + "cost_per_inline_link_click": { + "type": ["null", "number"] + }, + "ctr": { + "type": ["null", "number"] + }, + "reach": { + "type": ["null", "integer"] + }, + "region": { + "type": ["null", "string"] + }, + "quality_ranking": { + "type": ["null", "string"] + }, + "engagement_rate_ranking": { + "type": ["null", "string"] + }, + "conversion_rate_ranking": { + "type": ["null", "string"] + } + } +}