diff --git a/airbyte-integrations/connectors/source-pinterest/README.md b/airbyte-integrations/connectors/source-pinterest/README.md index cf49110cb77d..f79a80196c1a 100644 --- a/airbyte-integrations/connectors/source-pinterest/README.md +++ b/airbyte-integrations/connectors/source-pinterest/README.md @@ -31,7 +31,7 @@ See `sample_files/sample_config.json` for a sample config file. poetry run source-pinterest spec poetry run source-pinterest check --config secrets/config.json poetry run source-pinterest discover --config secrets/config.json -poetry run source-pinterest read --config secrets/config.json --catalog sample_files/configured_catalog.json +poetry run source-pinterest read --config secrets/config.json --catalog integration_tests/configured_catalog.json ``` ### Running unit tests diff --git a/airbyte-integrations/connectors/source-pinterest/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-pinterest/integration_tests/abnormal_state.json index f545fe4f24ba..e44bbde70c12 100644 --- a/airbyte-integrations/connectors/source-pinterest/integration_tests/abnormal_state.json +++ b/airbyte-integrations/connectors/source-pinterest/integration_tests/abnormal_state.json @@ -14,7 +14,12 @@ "type": "STREAM", "stream": { "stream_state": { - "DATE": "3021-06-09" + "states": [ + { + "partition": { "id": "549761668032", "parent_slice": {} }, + "cursor": { "date": "3021-06-09" } + } + ] }, "stream_descriptor": { "name": "ad_account_analytics" @@ -25,7 +30,12 @@ "type": "STREAM", "stream": { "stream_state": { - "updated_time": 9628867244 + "states": [ + { + "partition": { "id": "549761668032", "parent_slice": {} }, + "cursor": { "updated_time": 9628867244 } + } + ] }, "stream_descriptor": { "name": "campaigns" @@ -36,7 +46,12 @@ "type": "STREAM", "stream": { "stream_state": { - "updated_time": 9628867244 + "states": [ + { + "partition": { "id": "549761668032", "parent_slice": {} }, + "cursor": { "updated_time": 9628867244 } + } + ] }, "stream_descriptor": { "name": "ad_groups" @@ -47,7 +62,12 @@ "type": "STREAM", "stream": { "stream_state": { - "updated_time": 9628867244 + "states": [ + { + "partition": { "id": "549761668032", "parent_slice": {} }, + "cursor": { "updated_time": 9628867244 } + } + ] }, "stream_descriptor": { "name": "ads" @@ -58,7 +78,36 @@ "type": "STREAM", "stream": { "stream_state": { - "DATE": "3021-06-09" + "states": [ + { + "partition": { + "id": "626744128956", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "626744128962", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "626744128966", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "626744128982", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + } + ] }, "stream_descriptor": { "name": "campaign_analytics" @@ -69,7 +118,36 @@ "type": "STREAM", "stream": { "stream_state": { - "DATE": "3021-06-09" + "states": [ + { + "partition": { + "id": "2680068678965", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "2680068678971", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "2680068678975", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "2680068678993", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + } + ] }, "stream_descriptor": { "name": "ad_group_analytics" @@ -80,7 +158,36 @@ "type": "STREAM", "stream": { "stream_state": { - "DATE": "3021-06-09" + "states": [ + { + "partition": { + "id": "687218400118", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "687218400125", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "687218400132", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + }, + { + "partition": { + "id": "687218400210", + "parent_slice": { "id": "549761668032" } + }, + "cursor": { "DATE": "3021-06-09" } + } + ] }, "stream_descriptor": { "name": "ad_analytics" diff --git a/airbyte-integrations/connectors/source-pinterest/metadata.yaml b/airbyte-integrations/connectors/source-pinterest/metadata.yaml index ff26f9e9a044..5d5a4239867f 100644 --- a/airbyte-integrations/connectors/source-pinterest/metadata.yaml +++ b/airbyte-integrations/connectors/source-pinterest/metadata.yaml @@ -5,7 +5,7 @@ data: connectorSubtype: api connectorType: source definitionId: 5cb7e5fe-38c2-11ec-8d3d-0242ac130003 - dockerImageTag: 1.3.3 + dockerImageTag: 2.0.0 dockerRepository: airbyte/source-pinterest connectorBuildOptions: baseImage: docker.io/airbyte/python-connector-base:1.1.0@sha256:bd98f6505c6764b1b5f99d3aedc23dfc9e9af631a62533f60eb32b1d3dbab20c @@ -26,6 +26,19 @@ data: releaseStage: generally_available releases: breakingChanges: + 2.0.0: + message: "This release introduces updated format of state for incremental streams. Users will need to reset affected streams after upgrading. Please see migration guide for more details." + upgradeDeadline: "2024-06-03" + scopedImpact: + - scopeType: stream + impactedScopes: + - ad_account_analytics + - ad_analytics + - ad_group_analytics + - ad_groups + - ads + - campaign_analytics + - campaigns 1.0.0: message: "This release updates the date-time fields to use the Airbyte format `timestamp_without_timezone`. This change affects all streams where date-time fields are present, ensuring more accurate and standardized time representations: BoardPins, BoardSectionPins, Boards, Catalogs, and CatalogFeeds. Additionally, the stream names AdvertizerReport and AdvertizerTargetingReport have been renamed to AdvertiserReport and AdvertiserTargetingReport, respectively. Users will need to refresh the source schema and reset affected streams after upgrading." upgradeDeadline: "2023-12-14" @@ -43,7 +56,7 @@ data: documentationUrl: https://docs.airbyte.com/integrations/sources/pinterest tags: - language:python - - cdk:python + - cdk:low-code ab_internal: sl: 200 ql: 400 diff --git a/airbyte-integrations/connectors/source-pinterest/poetry.lock b/airbyte-integrations/connectors/source-pinterest/poetry.lock index 703eb314365d..6ee4460695b7 100644 --- a/airbyte-integrations/connectors/source-pinterest/poetry.lock +++ b/airbyte-integrations/connectors/source-pinterest/poetry.lock @@ -1,20 +1,21 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "airbyte-cdk" -version = "0.80.0" +version = "0.86.3" description = "A framework for writing Airbyte Connectors." optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "airbyte_cdk-0.80.0-py3-none-any.whl", hash = "sha256:060e92323a73674fa4e9e2e4a1eb312b9b9d072c9bbe5fa28f54ef21cb4974f3"}, - {file = "airbyte_cdk-0.80.0.tar.gz", hash = "sha256:1383512a83917fecca5b24cea4c72aa5c561cf96dd464485fbcefda48fe574c5"}, + {file = "airbyte_cdk-0.86.3-py3-none-any.whl", hash = "sha256:2616946d1b9f762d627bbbd34a4fdc5ff7d63c97a9a0eef68b32c3b6992a9721"}, + {file = "airbyte_cdk-0.86.3.tar.gz", hash = "sha256:0f0239f41f4b20654448e179fb5a1e89f56c6794e5c4ff27d3c2fda77cd29bfa"}, ] [package.dependencies] -airbyte-protocol-models = "0.5.1" +airbyte-protocol-models = ">=0.9.0,<1.0" backoff = "*" cachetools = "*" +cryptography = ">=42.0.5,<43.0.0" Deprecated = ">=1.2,<1.3" dpath = ">=2.0.1,<2.1.0" genson = "1.2.2" @@ -22,8 +23,10 @@ isodate = ">=0.6.1,<0.7.0" Jinja2 = ">=3.1.2,<3.2.0" jsonref = ">=0.2,<0.3" jsonschema = ">=3.2.0,<3.3.0" +langchain_core = "0.1.42" pendulum = "<3.0.0" pydantic = ">=1.10.8,<2.0.0" +pyjwt = ">=2.8.0,<3.0.0" pyrate-limiter = ">=3.1.0,<3.2.0" python-dateutil = "*" PyYAML = ">=6.0.1,<7.0.0" @@ -34,17 +37,17 @@ wcmatch = "8.4" [package.extras] file-based = ["avro (>=1.11.2,<1.12.0)", "fastavro (>=1.8.0,<1.9.0)", "markdown", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (>=15.0.0,<15.1.0)", "pytesseract (==0.3.10)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] sphinx-docs = ["Sphinx (>=4.2,<4.3)", "sphinx-rtd-theme (>=1.0,<1.1)"] -vector-db-based = ["cohere (==4.21)", "langchain (==0.0.271)", "openai[embeddings] (==0.27.9)", "tiktoken (==0.4.0)"] +vector-db-based = ["cohere (==4.21)", "langchain (==0.1.16)", "openai[embeddings] (==0.27.9)", "tiktoken (==0.4.0)"] [[package]] name = "airbyte-protocol-models" -version = "0.5.1" +version = "0.9.0" description = "Declares the Airbyte Protocol." optional = false python-versions = ">=3.8" files = [ - {file = "airbyte_protocol_models-0.5.1-py3-none-any.whl", hash = "sha256:dfe84e130e51ce2ae81a06d5aa36f6c5ce3152b9e36e6f0195fad6c3dab0927e"}, - {file = "airbyte_protocol_models-0.5.1.tar.gz", hash = "sha256:7c8b16c7c1c7956b1996052e40585a3a93b1e44cb509c4e97c1ee4fe507ea086"}, + {file = "airbyte_protocol_models-0.9.0-py3-none-any.whl", hash = "sha256:e972e140b5efd1edad5a338bcae8fdee9fc12545caf2c321e0f61b151c163a9b"}, + {file = "airbyte_protocol_models-0.9.0.tar.gz", hash = "sha256:40b69c33df23fe82d7078e84beb123bd604480e4d73cb277a890fcc92aedc8d2"}, ] [package.dependencies] @@ -148,6 +151,70 @@ files = [ {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, ] +[[package]] +name = "cffi" +version = "1.16.0" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, + {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7"}, + {file = "cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743"}, + {file = "cffi-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d"}, + {file = "cffi-1.16.0-cp310-cp310-win32.whl", hash = "sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a"}, + {file = "cffi-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404"}, + {file = "cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56"}, + {file = "cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc"}, + {file = "cffi-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb"}, + {file = "cffi-1.16.0-cp311-cp311-win32.whl", hash = "sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab"}, + {file = "cffi-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956"}, + {file = "cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6"}, + {file = "cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969"}, + {file = "cffi-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520"}, + {file = "cffi-1.16.0-cp312-cp312-win32.whl", hash = "sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b"}, + {file = "cffi-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235"}, + {file = "cffi-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b"}, + {file = "cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324"}, + {file = "cffi-1.16.0-cp38-cp38-win32.whl", hash = "sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a"}, + {file = "cffi-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed"}, + {file = "cffi-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4"}, + {file = "cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000"}, + {file = "cffi-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe"}, + {file = "cffi-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4"}, + {file = "cffi-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8"}, + {file = "cffi-1.16.0.tar.gz", hash = "sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"}, +] + +[package.dependencies] +pycparser = "*" + [[package]] name = "charset-normalizer" version = "3.3.2" @@ -258,6 +325,60 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "cryptography" +version = "42.0.7" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +optional = false +python-versions = ">=3.7" +files = [ + {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:a987f840718078212fdf4504d0fd4c6effe34a7e4740378e59d47696e8dfb477"}, + {file = "cryptography-42.0.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bd13b5e9b543532453de08bcdc3cc7cebec6f9883e886fd20a92f26940fd3e7a"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a79165431551042cc9d1d90e6145d5d0d3ab0f2d66326c201d9b0e7f5bf43604"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a47787a5e3649008a1102d3df55424e86606c9bae6fb77ac59afe06d234605f8"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:02c0eee2d7133bdbbc5e24441258d5d2244beb31da5ed19fbb80315f4bbbff55"}, + {file = "cryptography-42.0.7-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5e44507bf8d14b36b8389b226665d597bc0f18ea035d75b4e53c7b1ea84583cc"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7f8b25fa616d8b846aef64b15c606bb0828dbc35faf90566eb139aa9cff67af2"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:93a3209f6bb2b33e725ed08ee0991b92976dfdcf4e8b38646540674fc7508e13"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e6b8f1881dac458c34778d0a424ae5769de30544fc678eac51c1c8bb2183e9da"}, + {file = "cryptography-42.0.7-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3de9a45d3b2b7d8088c3fbf1ed4395dfeff79d07842217b38df14ef09ce1d8d7"}, + {file = "cryptography-42.0.7-cp37-abi3-win32.whl", hash = "sha256:789caea816c6704f63f6241a519bfa347f72fbd67ba28d04636b7c6b7da94b0b"}, + {file = "cryptography-42.0.7-cp37-abi3-win_amd64.whl", hash = "sha256:8cb8ce7c3347fcf9446f201dc30e2d5a3c898d009126010cbd1f443f28b52678"}, + {file = "cryptography-42.0.7-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:a3a5ac8b56fe37f3125e5b72b61dcde43283e5370827f5233893d461b7360cd4"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:779245e13b9a6638df14641d029add5dc17edbef6ec915688f3acb9e720a5858"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d563795db98b4cd57742a78a288cdbdc9daedac29f2239793071fe114f13785"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:31adb7d06fe4383226c3e963471f6837742889b3c4caa55aac20ad951bc8ffda"}, + {file = "cryptography-42.0.7-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:efd0bf5205240182e0f13bcaea41be4fdf5c22c5129fc7ced4a0282ac86998c9"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a9bc127cdc4ecf87a5ea22a2556cab6c7eda2923f84e4f3cc588e8470ce4e42e"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:3577d029bc3f4827dd5bf8bf7710cac13527b470bbf1820a3f394adb38ed7d5f"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2e47577f9b18723fa294b0ea9a17d5e53a227867a0a4904a1a076d1646d45ca1"}, + {file = "cryptography-42.0.7-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1a58839984d9cb34c855197043eaae2c187d930ca6d644612843b4fe8513c886"}, + {file = "cryptography-42.0.7-cp39-abi3-win32.whl", hash = "sha256:e6b79d0adb01aae87e8a44c2b64bc3f3fe59515280e00fb6d57a7267a2583cda"}, + {file = "cryptography-42.0.7-cp39-abi3-win_amd64.whl", hash = "sha256:16268d46086bb8ad5bf0a2b5544d8a9ed87a0e33f5e77dd3c3301e63d941a83b"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2954fccea107026512b15afb4aa664a5640cd0af630e2ee3962f2602693f0c82"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:362e7197754c231797ec45ee081f3088a27a47c6c01eff2ac83f60f85a50fe60"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4f698edacf9c9e0371112792558d2f705b5645076cc0aaae02f816a0171770fd"}, + {file = "cryptography-42.0.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5482e789294854c28237bba77c4c83be698be740e31a3ae5e879ee5444166582"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e9b2a6309f14c0497f348d08a065d52f3020656f675819fc405fb63bbcd26562"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d8e3098721b84392ee45af2dd554c947c32cc52f862b6a3ae982dbb90f577f14"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c65f96dad14f8528a447414125e1fc8feb2ad5a272b8f68477abbcc1ea7d94b9"}, + {file = "cryptography-42.0.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:36017400817987670037fbb0324d71489b6ead6231c9604f8fc1f7d008087c68"}, + {file = "cryptography-42.0.7.tar.gz", hash = "sha256:ecbfbc00bf55888edda9868a4cf927205de8499e7fabe6c050322298382953f2"}, +] + +[package.dependencies] +cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] +docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] +nox = ["nox"] +pep8test = ["check-sdist", "click", "mypy", "ruff"] +sdist = ["build"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test-randomorder = ["pytest-randomly"] + [[package]] name = "deprecated" version = "1.2.14" @@ -288,13 +409,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -312,13 +433,13 @@ files = [ [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -348,13 +469,13 @@ six = "*" [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -363,6 +484,31 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jsonpatch" +version = "1.33" +description = "Apply JSON-Patches (RFC 6902)" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" +files = [ + {file = "jsonpatch-1.33-py2.py3-none-any.whl", hash = "sha256:0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade"}, + {file = "jsonpatch-1.33.tar.gz", hash = "sha256:9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c"}, +] + +[package.dependencies] +jsonpointer = ">=1.9" + +[[package]] +name = "jsonpointer" +version = "2.4" +description = "Identify specific nodes in a JSON document (RFC 6901)" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" +files = [ + {file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"}, + {file = "jsonpointer-2.4.tar.gz", hash = "sha256:585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"}, +] + [[package]] name = "jsonref" version = "0.2" @@ -395,6 +541,44 @@ six = ">=1.11.0" format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] format-nongpl = ["idna", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "webcolors"] +[[package]] +name = "langchain-core" +version = "0.1.42" +description = "Building applications with LLMs through composability" +optional = false +python-versions = "<4.0,>=3.8.1" +files = [ + {file = "langchain_core-0.1.42-py3-none-any.whl", hash = "sha256:c5653ffa08a44f740295c157a24c0def4a753333f6a2c41f76bf431cd00be8b5"}, + {file = "langchain_core-0.1.42.tar.gz", hash = "sha256:40751bf60ea5d8e2b2efe65290db434717ee3834870c002e40e2811f09d814e6"}, +] + +[package.dependencies] +jsonpatch = ">=1.33,<2.0" +langsmith = ">=0.1.0,<0.2.0" +packaging = ">=23.2,<24.0" +pydantic = ">=1,<3" +PyYAML = ">=5.3" +tenacity = ">=8.1.0,<9.0.0" + +[package.extras] +extended-testing = ["jinja2 (>=3,<4)"] + +[[package]] +name = "langsmith" +version = "0.1.54" +description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." +optional = false +python-versions = "<4.0,>=3.8.1" +files = [ + {file = "langsmith-0.1.54-py3-none-any.whl", hash = "sha256:e8ba2758dbdff0fccb35337c28a5ab641dd980b22e178d390b72a15c9ae9caff"}, + {file = "langsmith-0.1.54.tar.gz", hash = "sha256:86f5a90e48303de897f37a893f8bb635eabdaf23e674099e8bc0f2e9ca2f8faf"}, +] + +[package.dependencies] +orjson = ">=3.9.14,<4.0.0" +pydantic = ">=1,<3" +requests = ">=2,<3" + [[package]] name = "markupsafe" version = "2.1.5" @@ -464,15 +648,70 @@ files = [ {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, ] +[[package]] +name = "orjson" +version = "3.10.3" +description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +optional = false +python-versions = ">=3.8" +files = [ + {file = "orjson-3.10.3-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9fb6c3f9f5490a3eb4ddd46fc1b6eadb0d6fc16fb3f07320149c3286a1409dd8"}, + {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:252124b198662eee80428f1af8c63f7ff077c88723fe206a25df8dc57a57b1fa"}, + {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9f3e87733823089a338ef9bbf363ef4de45e5c599a9bf50a7a9b82e86d0228da"}, + {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8334c0d87103bb9fbbe59b78129f1f40d1d1e8355bbed2ca71853af15fa4ed3"}, + {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1952c03439e4dce23482ac846e7961f9d4ec62086eb98ae76d97bd41d72644d7"}, + {file = "orjson-3.10.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c0403ed9c706dcd2809f1600ed18f4aae50be263bd7112e54b50e2c2bc3ebd6d"}, + {file = "orjson-3.10.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:382e52aa4270a037d41f325e7d1dfa395b7de0c367800b6f337d8157367bf3a7"}, + {file = "orjson-3.10.3-cp310-none-win32.whl", hash = "sha256:be2aab54313752c04f2cbaab4515291ef5af8c2256ce22abc007f89f42f49109"}, + {file = "orjson-3.10.3-cp310-none-win_amd64.whl", hash = "sha256:416b195f78ae461601893f482287cee1e3059ec49b4f99479aedf22a20b1098b"}, + {file = "orjson-3.10.3-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:73100d9abbbe730331f2242c1fc0bcb46a3ea3b4ae3348847e5a141265479700"}, + {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:544a12eee96e3ab828dbfcb4d5a0023aa971b27143a1d35dc214c176fdfb29b3"}, + {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:520de5e2ef0b4ae546bea25129d6c7c74edb43fc6cf5213f511a927f2b28148b"}, + {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ccaa0a401fc02e8828a5bedfd80f8cd389d24f65e5ca3954d72c6582495b4bcf"}, + {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7bc9e8bc11bac40f905640acd41cbeaa87209e7e1f57ade386da658092dc16"}, + {file = "orjson-3.10.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3582b34b70543a1ed6944aca75e219e1192661a63da4d039d088a09c67543b08"}, + {file = "orjson-3.10.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c23dfa91481de880890d17aa7b91d586a4746a4c2aa9a145bebdbaf233768d5"}, + {file = "orjson-3.10.3-cp311-none-win32.whl", hash = "sha256:1770e2a0eae728b050705206d84eda8b074b65ee835e7f85c919f5705b006c9b"}, + {file = "orjson-3.10.3-cp311-none-win_amd64.whl", hash = "sha256:93433b3c1f852660eb5abdc1f4dd0ced2be031ba30900433223b28ee0140cde5"}, + {file = "orjson-3.10.3-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a39aa73e53bec8d410875683bfa3a8edf61e5a1c7bb4014f65f81d36467ea098"}, + {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0943a96b3fa09bee1afdfccc2cb236c9c64715afa375b2af296c73d91c23eab2"}, + {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e852baafceff8da3c9defae29414cc8513a1586ad93e45f27b89a639c68e8176"}, + {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18566beb5acd76f3769c1d1a7ec06cdb81edc4d55d2765fb677e3eaa10fa99e0"}, + {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bd2218d5a3aa43060efe649ec564ebedec8ce6ae0a43654b81376216d5ebd42"}, + {file = "orjson-3.10.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cf20465e74c6e17a104ecf01bf8cd3b7b252565b4ccee4548f18b012ff2f8069"}, + {file = "orjson-3.10.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ba7f67aa7f983c4345eeda16054a4677289011a478ca947cd69c0a86ea45e534"}, + {file = "orjson-3.10.3-cp312-none-win32.whl", hash = "sha256:17e0713fc159abc261eea0f4feda611d32eabc35708b74bef6ad44f6c78d5ea0"}, + {file = "orjson-3.10.3-cp312-none-win_amd64.whl", hash = "sha256:4c895383b1ec42b017dd2c75ae8a5b862fc489006afde06f14afbdd0309b2af0"}, + {file = "orjson-3.10.3-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:be2719e5041e9fb76c8c2c06b9600fe8e8584e6980061ff88dcbc2691a16d20d"}, + {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0175a5798bdc878956099f5c54b9837cb62cfbf5d0b86ba6d77e43861bcec2"}, + {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:978be58a68ade24f1af7758626806e13cff7748a677faf95fbb298359aa1e20d"}, + {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16bda83b5c61586f6f788333d3cf3ed19015e3b9019188c56983b5a299210eb5"}, + {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ad1f26bea425041e0a1adad34630c4825a9e3adec49079b1fb6ac8d36f8b754"}, + {file = "orjson-3.10.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:9e253498bee561fe85d6325ba55ff2ff08fb5e7184cd6a4d7754133bd19c9195"}, + {file = "orjson-3.10.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0a62f9968bab8a676a164263e485f30a0b748255ee2f4ae49a0224be95f4532b"}, + {file = "orjson-3.10.3-cp38-none-win32.whl", hash = "sha256:8d0b84403d287d4bfa9bf7d1dc298d5c1c5d9f444f3737929a66f2fe4fb8f134"}, + {file = "orjson-3.10.3-cp38-none-win_amd64.whl", hash = "sha256:8bc7a4df90da5d535e18157220d7915780d07198b54f4de0110eca6b6c11e290"}, + {file = "orjson-3.10.3-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9059d15c30e675a58fdcd6f95465c1522b8426e092de9fff20edebfdc15e1cb0"}, + {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d40c7f7938c9c2b934b297412c067936d0b54e4b8ab916fd1a9eb8f54c02294"}, + {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d4a654ec1de8fdaae1d80d55cee65893cb06494e124681ab335218be6a0691e7"}, + {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:831c6ef73f9aa53c5f40ae8f949ff7681b38eaddb6904aab89dca4d85099cb78"}, + {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99b880d7e34542db89f48d14ddecbd26f06838b12427d5a25d71baceb5ba119d"}, + {file = "orjson-3.10.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2e5e176c994ce4bd434d7aafb9ecc893c15f347d3d2bbd8e7ce0b63071c52e25"}, + {file = "orjson-3.10.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b69a58a37dab856491bf2d3bbf259775fdce262b727f96aafbda359cb1d114d8"}, + {file = "orjson-3.10.3-cp39-none-win32.whl", hash = "sha256:b8d4d1a6868cde356f1402c8faeb50d62cee765a1f7ffcfd6de732ab0581e063"}, + {file = "orjson-3.10.3-cp39-none-win_amd64.whl", hash = "sha256:5102f50c5fc46d94f2033fe00d392588564378260d64377aec702f21a7a22912"}, + {file = "orjson-3.10.3.tar.gz", hash = "sha256:2b166507acae7ba2f7c315dcf185a9111ad5e992ac81f2d507aac39193c2c818"}, +] + [[package]] name = "packaging" -version = "24.0" +version = "23.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, - {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] [[package]] @@ -511,28 +750,29 @@ pytzdata = ">=2020.1" [[package]] name = "platformdirs" -version = "4.2.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.2.1" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, + {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, + {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -550,6 +790,17 @@ files = [ {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] +[[package]] +name = "pycparser" +version = "2.22" +description = "C parser in Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, +] + [[package]] name = "pydantic" version = "1.10.15" @@ -602,6 +853,23 @@ typing-extensions = ">=4.2.0" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] +[[package]] +name = "pyjwt" +version = "2.8.0" +description = "JSON Web Token implementation in Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "PyJWT-2.8.0-py3-none-any.whl", hash = "sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320"}, + {file = "PyJWT-2.8.0.tar.gz", hash = "sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de"}, +] + +[package.extras] +crypto = ["cryptography (>=3.4.0)"] +dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] +docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] +tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] + [[package]] name = "pyrate-limiter" version = "3.1.1" @@ -873,18 +1141,18 @@ tests = ["coverage (>=3.7.1,<6.0.0)", "flake8", "mypy", "pytest (>=4.6)", "pytes [[package]] name = "setuptools" -version = "69.2.0" +version = "69.5.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, - {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, + {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, + {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -898,6 +1166,21 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "tenacity" +version = "8.3.0" +description = "Retry code until it succeeds" +optional = false +python-versions = ">=3.8" +files = [ + {file = "tenacity-8.3.0-py3-none-any.whl", hash = "sha256:3649f6443dbc0d9b01b9d8020a9c4ec7a1ff5f6f3c6c8a036ef371f573fe9185"}, + {file = "tenacity-8.3.0.tar.gz", hash = "sha256:953d4e6ad24357bceffbc9707bc74349aca9d245f68eb65419cf0c249a1949a2"}, +] + +[package.extras] +doc = ["reno", "sphinx"] +test = ["pytest", "tornado (>=4.5)", "typeguard"] + [[package]] name = "toml" version = "0.10.2" @@ -911,13 +1194,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.10.0" +version = "4.11.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, - {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [[package]] @@ -1047,4 +1330,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9,<3.12" -content-hash = "0470b2fd426eecbc6ae855eb5113286811ecedf84a99fe42d8d9463dec5f71bc" +content-hash = "b3f3217827dec6b4b426b81f343b76870eb759e0657d8f6428815c08f004abb1" diff --git a/airbyte-integrations/connectors/source-pinterest/pyproject.toml b/airbyte-integrations/connectors/source-pinterest/pyproject.toml index f4be5014be11..fe750c290a5e 100644 --- a/airbyte-integrations/connectors/source-pinterest/pyproject.toml +++ b/airbyte-integrations/connectors/source-pinterest/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "1.3.3" +version = "2.0.0" name = "source-pinterest" description = "Source implementation for Pinterest." authors = [ "Airbyte ",] @@ -18,7 +18,7 @@ include = "source_pinterest" [tool.poetry.dependencies] python = "^3.9,<3.12" pendulum = "==2.1.2" -airbyte-cdk = "0.80.0" +airbyte-cdk = "0.86.3" [tool.poetry.scripts] source-pinterest = "source_pinterest.run:run" diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/components/auth.py b/airbyte-integrations/connectors/source-pinterest/source_pinterest/components/auth.py new file mode 100644 index 000000000000..f31a115c09a9 --- /dev/null +++ b/airbyte-integrations/connectors/source-pinterest/source_pinterest/components/auth.py @@ -0,0 +1,72 @@ +# +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. +# + +import logging +from base64 import standard_b64encode +from dataclasses import dataclass +from typing import Any, Mapping + +import backoff +import requests +from airbyte_cdk.models import FailureType +from airbyte_cdk.sources.declarative.auth import DeclarativeOauth2Authenticator +from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException +from airbyte_cdk.utils import AirbyteTracedException +from airbyte_cdk.utils.airbyte_secrets_utils import add_to_secrets + +logger = logging.getLogger("airbyte") + + +@dataclass +class PinterestOauthAuthenticator(DeclarativeOauth2Authenticator): + """ + This class extends the DeclarativeOauth2Authenticator functionality + and allows to pass custom headers to the refresh access token requests + """ + + def get_refresh_access_token_headers(self) -> Mapping[str, Any]: + creds_encoded = standard_b64encode(f"{self.get_client_id()}:{self.get_client_secret()}".encode("ascii")).decode("ascii") + return {"Authorization": f"Basic {creds_encoded}"} + + @backoff.on_exception( + backoff.expo, + DefaultBackoffException, + on_backoff=lambda details: logger.info( + f"Caught retryable error after {details['tries']} tries. Waiting {details['wait']} seconds then retrying..." + ), + max_time=300, + ) + def _get_refresh_access_token_response(self) -> Any: + try: + response = requests.request( + method="POST", + url=self.get_token_refresh_endpoint(), + headers=self.get_refresh_access_token_headers(), + data=self.build_refresh_request_body(), + ) + if response.ok: + response_json = response.json() + access_key = response_json.get(self.get_access_token_name()) + if not access_key: + message = ( + f"Token refresh API response was missing access token {self.get_access_token_name()}" + "Please re-authenticate from Sources/Pinterest/Settings." + ) + raise AirbyteTracedException(internal_message=message, message=message, failure_type=FailureType.config_error) + add_to_secrets(access_key) + self._log_response(response) + return response_json + else: + self._log_response(response) + response.raise_for_status() + except requests.exceptions.RequestException as e: + if e.response is not None: + if e.response.status_code == 429 or e.response.status_code >= 500: + raise DefaultBackoffException(request=e.response.request, response=e.response) + if self._wrap_refresh_token_exception(e): + message = "Refresh token is invalid or expired. Please re-authenticate from Sources/Pinterest/Settings." + raise AirbyteTracedException(internal_message=message, message=message, failure_type=FailureType.config_error) + raise + except Exception as e: + raise Exception(f"Error while refreshing access token: {e}") from e diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/manifest.yaml b/airbyte-integrations/connectors/source-pinterest/source_pinterest/manifest.yaml new file mode 100644 index 000000000000..aff3d5d8d956 --- /dev/null +++ b/airbyte-integrations/connectors/source-pinterest/source_pinterest/manifest.yaml @@ -0,0 +1,3169 @@ +version: 0.86.3 +type: DeclarativeSource + +definitions: + # Authenticator + authenticator: + type: CustomAuthenticator + class_name: source_pinterest.components.auth.PinterestOauthAuthenticator + client_id: "{{ config.get('credentials', {}).get('client_id', config['client_id']) }}" + client_secret: "{{ config.get('credentials', {}).get('client_secret', config['client_secret']) }}" + refresh_token: "{{ config.get('credentials', {}).get('refresh_token', config['refresh_token']) }}" + token_refresh_endpoint: "https://api.pinterest.com/v5/oauth/token" + + # Error handlers + base_error_handler: + type: DefaultErrorHandler + backoff_strategies: + - type: WaitTimeFromHeader + header: "X-RateLimit-Reset" + response_filters: + - type: HttpResponseFilter + action: IGNORE + error_message: "Max rate limit exceeded" + predicate: "{{ response.get('code') == 8 }}" + - type: HttpResponseFilter + action: IGNORE + error_message: "Can't access catalog product groups because there is no existing catalog." + http_codes: [409] + - type: HttpResponseFilter + action: FAIL + error_message: "Try to re-authenticate because current refresh token is not valid." + error_message_contains: "401 Client Error: Unauthorized for url" + http_codes: [401] + - type: HttpResponseFilter + action: RETRY + http_codes: [500] + + analytics_error_handler: + type: DefaultErrorHandler + backoff_strategies: + - type: ConstantBackoffStrategy + backoff_time_in_seconds: 1 + response_filters: + - type: HttpResponseFilter + action: RETRY + http_codes: [400] + + # Requester + requester: + type: HttpRequester + url_base: "https://api.pinterest.com/v5/" + http_method: GET + authenticator: "#/definitions/authenticator" + error_handler: "#/definitions/base_error_handler" + + # Selector + selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: ["items"] + + # Retrievers + retriever: + type: SimpleRetriever + record_selector: "#/definitions/selector" + requester: "#/definitions/requester" + paginator: + type: DefaultPaginator + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.get('bookmark') }}" + page_token_option: + type: RequestOption + field_name: bookmark + inject_into: request_parameter + + board_based_retriever: + $ref: "#/definitions/retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/boards_stream" + partition_field: "id" + + ad_account_based_retriever: + $ref: "#/definitions/retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/ad_accounts_stream" + partition_field: "id" + + analytics_retriever: + $ref: "#/definitions/ad_account_based_retriever" + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: NoPagination + requester: + $ref: "#/definitions/requester" + error_handler: + type: CompositeErrorHandler + error_handlers: + - "#/definitions/analytics_error_handler" + - "#/definitions/base_error_handler" + request_parameters: + granularity: "DAY" + columns: "ADVERTISER_ID,AD_ACCOUNT_ID,AD_GROUP_ENTITY_STATUS,AD_GROUP_ID,AD_ID,CAMPAIGN_DAILY_SPEND_CAP,CAMPAIGN_ENTITY_STATUS,CAMPAIGN_ID,CAMPAIGN_LIFETIME_SPEND_CAP,CAMPAIGN_NAME,CHECKOUT_ROAS,CLICKTHROUGH_1,CLICKTHROUGH_1_GROSS,CLICKTHROUGH_2,CPC_IN_MICRO_DOLLAR,CPM_IN_DOLLAR,CPM_IN_MICRO_DOLLAR,CTR,CTR_2,ECPCV_IN_DOLLAR,ECPCV_P95_IN_DOLLAR,ECPC_IN_DOLLAR,ECPC_IN_MICRO_DOLLAR,ECPE_IN_DOLLAR,ECPM_IN_MICRO_DOLLAR,ECPV_IN_DOLLAR,ECTR,EENGAGEMENT_RATE,ENGAGEMENT_1,ENGAGEMENT_2,ENGAGEMENT_RATE,IDEA_PIN_PRODUCT_TAG_VISIT_1,IDEA_PIN_PRODUCT_TAG_VISIT_2,IMPRESSION_1,IMPRESSION_1_GROSS,IMPRESSION_2,INAPP_CHECKOUT_COST_PER_ACTION,OUTBOUND_CLICK_1,OUTBOUND_CLICK_2,PAGE_VISIT_COST_PER_ACTION,PAGE_VISIT_ROAS,PAID_IMPRESSION,PIN_ID,PIN_PROMOTION_ID,REPIN_1,REPIN_2,REPIN_RATE,SPEND_IN_DOLLAR,SPEND_IN_MICRO_DOLLAR,TOTAL_CHECKOUT,TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_CLICKTHROUGH,TOTAL_CLICK_ADD_TO_CART,TOTAL_CLICK_CHECKOUT,TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_CLICK_LEAD,TOTAL_CLICK_SIGNUP,TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR,TOTAL_CONVERSIONS,TOTAL_CUSTOM,TOTAL_ENGAGEMENT,TOTAL_ENGAGEMENT_CHECKOUT,TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_ENGAGEMENT_LEAD,TOTAL_ENGAGEMENT_SIGNUP,TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR,TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT,TOTAL_IMPRESSION_FREQUENCY,TOTAL_IMPRESSION_USER,TOTAL_LEAD,TOTAL_OFFLINE_CHECKOUT,TOTAL_PAGE_VISIT,TOTAL_REPIN_RATE,TOTAL_SIGNUP,TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR,TOTAL_VIDEO_3SEC_VIEWS,TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND,TOTAL_VIDEO_MRC_VIEWS,TOTAL_VIDEO_P0_COMBINED,TOTAL_VIDEO_P100_COMPLETE,TOTAL_VIDEO_P25_COMBINED,TOTAL_VIDEO_P50_COMBINED,TOTAL_VIDEO_P75_COMBINED,TOTAL_VIDEO_P95_COMBINED,TOTAL_VIEW_ADD_TO_CART,TOTAL_VIEW_CHECKOUT,TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_VIEW_LEAD,TOTAL_VIEW_SIGNUP,TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR,TOTAL_WEB_CHECKOUT,TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_WEB_CLICK_CHECKOUT,TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_WEB_ENGAGEMENT_CHECKOUT,TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR,TOTAL_WEB_SESSIONS,TOTAL_WEB_VIEW_CHECKOUT,TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR,VIDEO_3SEC_VIEWS_2,VIDEO_LENGTH,VIDEO_MRC_VIEWS_2,VIDEO_P0_COMBINED_2,VIDEO_P100_COMPLETE_2,VIDEO_P25_COMBINED_2,VIDEO_P50_COMBINED_2,VIDEO_P75_COMBINED_2,VIDEO_P95_COMBINED_2,WEB_CHECKOUT_COST_PER_ACTION,WEB_CHECKOUT_ROAS,WEB_SESSIONS_1,WEB_SESSIONS_2" + + # Base stream + base_stream: + type: DeclarativeStream + retriever: + $ref: "#/definitions/retriever" + requester: + $ref: "#/definitions/requester" + use_cache: true + primary_key: "id" + + base_semi_incremental_stream: + $ref: "#/definitions/base_stream" + retriever: + $ref: "#/definitions/ad_account_based_retriever" + record_selector: + $ref: "#/definitions/selector" + record_filter: + type: RecordFilter + condition: "{{ record['updated_time'] >= stream_slice['start_time'] | int }}" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: "updated_time" + datetime_format: "%s" + start_datetime: "{{ format_datetime(config.get('start_date'), '%s') if config.get('start_date') else 0 }}" + + base_analytics_stream: + type: DeclarativeStream + primary_key: [] + retriever: "#/definitions/analytics_retriever" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: "{{ parameters.get('cursor_field', 'DATE') }}" + datetime_format: "%Y-%m-%d" + cursor_datetime_formats: + - "%s" + start_datetime: "{{ config.get('start_date') if config.get('start_date') and config.get('start_date') > day_delta(-89, format='%Y-%m-%d') else day_delta(-89, format='%Y-%m-%d') }}" + cursor_granularity: "P1D" + step: "P30D" + start_time_option: + type: RequestOption + field_name: "start_date" + inject_into: request_parameter + end_time_option: + type: RequestOption + field_name: "end_date" + inject_into: request_parameter + + # Full refresh streams + boards_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/boards/list + name: "boards" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/boards_schema" + $parameters: + path: "boards" + + catalogs_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/catalogs/list + name: "catalogs" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/catalogs_schema" + $parameters: + path: "catalogs" + + catalogs_feeds_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/feeds/list + name: "catalogs_feeds" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/catalogs_feeds_schema" + transformations: + - type: RemoveFields + field_pointers: + - ["credentials"] + $parameters: + path: "catalogs/feeds" + + catalogs_product_groups_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/catalogs_product_groups/list + name: "catalogs_product_groups" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/catalogs_product_groups_schema" + $parameters: + path: "catalogs/product_groups" + + ad_accounts_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ad_accounts/list + name: "ad_accounts" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ad_accounts_schema" + $parameters: + path: "ad_accounts" + + board_sections_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/board_sections/list + name: "board_sections" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/board_sections_schema" + retriever: "#/definitions/board_based_retriever" + $parameters: + path: "boards/{{ stream_slice.id }}/sections" + + board_pins_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/boards/list_pins + name: "board_pins" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/board_pins_schema" + retriever: "#/definitions/board_based_retriever" + $parameters: + path: "boards/{{ stream_slice.id }}/pins" + + board_section_pins_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/board_sections/list_pins + name: "board_section_pins" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/board_section_pins_schema" + retriever: + $ref: "#/definitions/retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/board_sections_stream" + partition_field: "id" + $parameters: + path: "boards/{{ stream_slice.parent_slice.id }}/sections/{{ stream_slice.id }}/pins" + + audiences_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/audiences/list + name: "audiences" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/audiences_schema" + retriever: "#/definitions/ad_account_based_retriever" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/audiences" + + keywords_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/keywords/get + name: "keywords" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/keywords_schema" + retriever: + $ref: "#/definitions/retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/ad_groups_stream" + partition_field: "id" + $parameters: + path: "ad_accounts/{{ stream_slice.parent_slice.id }}/keywords?ad_group_id={{ stream_slice.id }}" + + conversion_tags_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/conversion_tags/list + name: "conversion_tags" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/conversion_tags_schema" + retriever: "#/definitions/ad_account_based_retriever" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/conversion_tags" + + customer_lists_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#tag/customer_lists + name: "customer_lists" + $ref: "#/definitions/base_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/customer_lists_schema" + retriever: "#/definitions/ad_account_based_retriever" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/customer_lists" + + # Semi-Incremental streams + campaigns_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/campaigns/list + name: "campaigns" + $ref: "#/definitions/base_semi_incremental_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/campaigns_schema" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/campaigns{{ '?entity_statuses=' + ','.join(config.get('status')) if config.get('status') else '' }}" + + ad_groups_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ad_groups/list + name: "ad_groups" + $ref: "#/definitions/base_semi_incremental_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ad_groups_schema" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/ad_groups{{ '?entity_statuses=' + ','.join(config.get('status')) if config.get('status') else '' }}" + + ads_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ads/list + name: "ads" + $ref: "#/definitions/base_semi_incremental_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ads_schema" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/ads{{ '?entity_statuses=' + ','.join(config.get('status')) if config.get('status') else '' }}" + + # Analytics streams + user_account_analytics_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/user_account/analytics + name: "user_account_analytics" + $ref: "#/definitions/base_analytics_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/user_account_analytics_schema" + retriever: + $ref: "#/definitions/analytics_retriever" + partition_router: [] + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: ["all", "daily_metrics"] + $parameters: + path: "user_account/analytics" + cursor_field: "date" + + ad_account_analytics_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ad_account/analytics + name: "ad_account_analytics" + $ref: "#/definitions/base_analytics_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ad_account_analytics_schema" + $parameters: + path: "ad_accounts/{{ stream_slice.id }}/analytics" + + campaign_analytics_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/campaigns/analytics + name: "campaign_analytics" + $ref: "#/definitions/base_analytics_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/campaign_analytics_schema" + retriever: + $ref: "#/definitions/analytics_retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/campaigns_stream" + partition_field: "id" + $parameters: + path: "ad_accounts/{{ stream_slice.parent_slice.id }}/campaigns/analytics?campaign_ids={{ stream_slice.id }}" + + ad_group_analytics_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ad_groups/analytics + name: "ad_group_analytics" + $ref: "#/definitions/base_analytics_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ad_group_analytics_schema" + retriever: + $ref: "#/definitions/analytics_retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/ad_groups_stream" + partition_field: "id" + $parameters: + path: "ad_accounts/{{ stream_slice.parent_slice.id }}/ad_groups/analytics?ad_group_ids={{ stream_slice.id }}" + + ad_analytics_stream: + # Docs: https://developers.pinterest.com/docs/api/v5/#operation/ads/analytics + name: "ad_analytics" + $ref: "#/definitions/base_analytics_stream" + schema_loader: + type: InlineSchemaLoader + schema: "#/definitions/ad_analytics_schema" + retriever: + $ref: "#/definitions/analytics_retriever" + partition_router: + type: SubstreamPartitionRouter + parent_stream_configs: + - type: ParentStreamConfig + parent_key: "id" + stream: "#/definitions/ads_stream" + partition_field: "id" + $parameters: + path: "ad_accounts/{{ stream_slice.parent_slice.id }}/ads/analytics?ad_ids={{ stream_slice.id }}" + + # Schemas + ad_accounts_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + id: + description: Unique identifier for the ad account + type: ["null", string] + name: + description: The name of the ad account + type: ["null", string] + owner: + description: Details of the ad account owner + type: ["null", object] + properties: + id: + description: Unique identifier of the owner + type: ["null", string] + username: + description: Username of the owner + type: ["null", string] + country: + description: The country associated with the ad account + type: ["null", string] + currency: + description: The currency used for billing in the ad account + type: ["null", string] + updated_time: + description: The timestamp showing when the ad account was last updated + type: ["null", integer] + created_time: + description: The timestamp showing when the ad account was created + type: ["null", integer] + permissions: + description: Permissions assigned to the ad account + type: ["null", array] + items: + description: Individual permissions granted + type: ["null", string] + + ad_account_analytics_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + DATE: + description: Date of the data entry + type: ["null", string] + format: date + ADVERTISER_ID: + description: Unique identifier for the advertiser + type: [string] + AD_ACCOUNT_ID: + description: Unique identifier for the ad account + type: [string] + AD_ID: + description: Unique identifier for the ad + type: ["null", string] + AD_GROUP_ENTITY_STATUS: + description: Status of the ad group entity + type: ["null", string] + AD_GROUP_ID: + description: Unique identifier for the ad group + type: ["null", string] + CAMPAIGN_DAILY_SPEND_CAP: + description: Daily spend cap set for the campaign + type: ["null", number] + CAMPAIGN_ENTITY_STATUS: + description: Status of the campaign entity + type: ["null", number] + CAMPAIGN_ID: + description: Unique identifier for the campaign + type: ["null", number] + CAMPAIGN_LIFETIME_SPEND_CAP: + description: Lifetime spend cap set for the campaign + type: ["null", number] + CAMPAIGN_NAME: + description: Name of the campaign + type: ["null", string] + CHECKOUT_ROAS: + description: Return on ad spend for checkout actions + type: ["null", number] + CLICKTHROUGH_1: + description: Click-through rate related to specific actions + type: ["null", number] + CLICKTHROUGH_1_GROSS: + description: Gross click-through rate related to specific actions + type: ["null", number] + CLICKTHROUGH_2: + description: Secondary click-through rate related to specific actions + type: ["null", number] + CPC_IN_MICRO_DOLLAR: + description: Cost per click in micro dollars + type: ["null", number] + CPM_IN_DOLLAR: + description: Cost per mille in dollars + type: ["null", number] + CPM_IN_MICRO_DOLLAR: + description: Cost per mille in micro dollars + type: ["null", number] + CTR: + description: Click-through rate + type: ["null", number] + CTR_2: + description: Secondary click-through rate + type: ["null", number] + ECPCV_IN_DOLLAR: + description: Effective cost per completed view in dollars + type: ["null", number] + ECPCV_P95_IN_DOLLAR: + description: 95th percentile effective cost per completed view in dollars + type: ["null", number] + ECPC_IN_DOLLAR: + description: Effective cost per click in dollars + type: ["null", number] + ECPC_IN_MICRO_DOLLAR: + description: Effective cost per click in micro dollars + type: ["null", number] + ECPE_IN_DOLLAR: + description: Effective cost per engagement in dollars + type: ["null", number] + ECPM_IN_MICRO_DOLLAR: + description: Effective cost per mille in micro dollars + type: ["null", number] + ECPV_IN_DOLLAR: + description: Effective cost per view in dollars + type: ["null", number] + ECTR: + description: Effective click-through rate + type: ["null", number] + EENGAGEMENT_RATE: + description: Effective engagement rate + type: ["null", number] + ENGAGEMENT_1: + description: Engagement rate related to specific actions + type: ["null", number] + ENGAGEMENT_2: + description: Secondary engagement rate related to specific actions + type: ["null", number] + ENGAGEMENT_RATE: + description: Overall engagement rate + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_1: + description: Product tag visit rate related to specific actions + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_2: + description: Secondary product tag visit rate related to specific actions + type: ["null", number] + IMPRESSION_1: + description: Impression rate related to specific actions + type: ["null", number] + IMPRESSION_1_GROSS: + description: Gross impression rate related to specific actions + type: ["null", number] + IMPRESSION_2: + description: Secondary impression rate related to specific actions + type: ["null", number] + INAPP_CHECKOUT_COST_PER_ACTION: + description: Cost per in-app checkout action + type: ["null", number] + OUTBOUND_CLICK_1: + description: Outbound click rate related to specific actions + type: ["null", number] + OUTBOUND_CLICK_2: + description: Secondary outbound click rate related to specific actions + type: ["null", number] + PAGE_VISIT_COST_PER_ACTION: + description: Cost per page visit action + type: ["null", number] + PAGE_VISIT_ROAS: + description: Return on ad spend for page visit actions + type: ["null", number] + PAID_IMPRESSION: + description: Number of paid impressions + type: ["null", number] + PIN_ID: + description: Unique identifier for the pin + type: ["null", number] + PIN_PROMOTION_ID: + description: Unique identifier for the promoted pin + type: ["null", number] + REPIN_1: + description: Repinned rate related to specific actions + type: ["null", number] + REPIN_2: + description: Secondary repinned rate related to specific actions + type: ["null", number] + REPIN_RATE: + description: Overall repin rate + type: ["null", number] + SPEND_IN_DOLLAR: + description: Total spend in dollars + type: ["null", number] + SPEND_IN_MICRO_DOLLAR: + description: Total spend in micro dollars + type: ["null", number] + TOTAL_CHECKOUT: + description: Total number of checkout actions + type: ["null", number] + TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of checkout actions in micro dollars + type: ["null", number] + TOTAL_CLICKTHROUGH: + description: Total number of click-through actions + type: ["null", number] + TOTAL_CLICK_ADD_TO_CART: + description: Total number of click actions leading to adding to cart + type: ["null", number] + TOTAL_CLICK_CHECKOUT: + description: Total number of click actions leading to checkout + type: ["null", number] + TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of click actions leading to checkout in micro dollars + type: ["null", number] + TOTAL_CLICK_LEAD: + description: Total number of click actions leading to lead generation + type: ["null", number] + TOTAL_CLICK_SIGNUP: + description: Total number of click actions leading to signups + type: ["null", number] + TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of click actions leading to signups in micro dollars + type: ["null", number] + TOTAL_CONVERSIONS: + description: Total number of conversions + type: ["null", number] + TOTAL_CUSTOM: + description: Total number of custom actions + type: ["null", number] + TOTAL_ENGAGEMENT: + description: Total number of engagement actions + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT: + description: Total number of engagement actions leading to checkout + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of engagement actions leading to checkout in micro dollars + type: ["null", number] + TOTAL_ENGAGEMENT_LEAD: + description: Total number of engagement actions leading to lead generation + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP: + description: Total number of engagement actions leading to signups + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of engagement actions leading to signups in micro dollars + type: ["null", number] + TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT: + description: Total number of product tag visits + type: ["null", number] + TOTAL_IMPRESSION_FREQUENCY: + description: Total impression frequency + type: ["null", number] + TOTAL_IMPRESSION_USER: + description: Total number of users reached through impressions + type: ["null", number] + TOTAL_LEAD: + description: Total number of lead actions + type: ["null", number] + TOTAL_OFFLINE_CHECKOUT: + description: Total number of offline checkout actions + type: ["null", number] + TOTAL_PAGE_VISIT: + description: Total number of page visit actions + type: ["null", number] + TOTAL_REPIN_RATE: + description: Overall repin rate + type: ["null", number] + TOTAL_SIGNUP: + description: Total number of signup actions + type: ["null", number] + TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of signup actions in micro dollars + type: ["null", number] + TOTAL_VIDEO_3SEC_VIEWS: + description: Total number of 3-second video views + type: ["null", number] + TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND: + description: Average watch time for videos in seconds + type: ["null", number] + TOTAL_VIDEO_MRC_VIEWS: + description: Total number of MRC video views + type: ["null", number] + TOTAL_VIDEO_P0_COMBINED: + description: Total video play-through rate + type: ["null", number] + TOTAL_VIDEO_P100_COMPLETE: + description: Total completion rate for videos + type: ["null", number] + TOTAL_VIDEO_P25_COMBINED: + description: Total 25% completion rate for videos + type: ["null", number] + TOTAL_VIDEO_P50_COMBINED: + description: Total 50% completion rate for videos + type: ["null", number] + TOTAL_VIDEO_P75_COMBINED: + description: Total 75% completion rate for videos + type: ["null", number] + TOTAL_VIDEO_P95_COMBINED: + description: Total 95% completion rate for videos + type: ["null", number] + TOTAL_VIEW_ADD_TO_CART: + description: Total view actions leading to adding to cart + type: ["null", number] + TOTAL_VIEW_CHECKOUT: + description: Total view actions leading to checkout + type: ["null", number] + TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of view actions leading to checkout in micro dollars + type: ["null", number] + TOTAL_VIEW_LEAD: + description: Total view actions leading to lead generation + type: ["null", number] + TOTAL_VIEW_SIGNUP: + description: Total view actions leading to signups + type: ["null", number] + TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of view actions leading to signups in micro dollars + type: ["null", number] + TOTAL_WEB_CHECKOUT: + description: Total number of web checkout actions + type: ["null", number] + TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web checkout actions in micro dollars + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT: + description: Total number of web click actions leading to checkout + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web click actions leading to checkout in micro dollars + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT: + description: Total number of web engagement actions leading to checkout + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web engagement actions leading to checkout in micro dollars + type: ["null", number] + TOTAL_WEB_SESSIONS: + description: Total number of web sessions + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT: + description: Total number of web view actions leading to checkout + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web view actions leading to checkout in micro dollars + type: ["null", number] + VIDEO_3SEC_VIEWS_2: + description: Number of 3-second video views related to specific actions + type: ["null", number] + VIDEO_LENGTH: + description: Length of the video + type: ["null", number] + VIDEO_MRC_VIEWS_2: + description: Number of MRC video views related to specific actions + type: ["null", number] + VIDEO_P0_COMBINED_2: + description: Play-through rate of videos related to specific actions + type: ["null", number] + VIDEO_P100_COMPLETE_2: + description: Completion rate of videos related to specific actions + type: ["null", number] + VIDEO_P25_COMBINED_2: + description: 25% completion rate of videos related to specific actions + type: ["null", number] + VIDEO_P50_COMBINED_2: + description: 50% completion rate of videos related to specific actions + type: ["null", number] + VIDEO_P75_COMBINED_2: + description: 75% completion rate of videos related to specific actions + type: ["null", number] + VIDEO_P95_COMBINED_2: + description: 95% completion rate of videos related to specific actions + type: ["null", number] + WEB_CHECKOUT_COST_PER_ACTION: + description: Cost per web checkout action + type: ["null", number] + WEB_CHECKOUT_ROAS: + description: Return on ad spend for web checkout actions + type: ["null", number] + WEB_SESSIONS_1: + description: Number of web sessions related to specific actions + type: ["null", number] + WEB_SESSIONS_2: + description: Secondary number of web sessions related to specific actions + type: ["null", number] + + ads_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + ad_group_id: + description: The ID of the ad group to which the ad belongs. + type: ["null", string] + android_deep_link: + description: The deep link URL for Android devices. + type: ["null", string] + carousel_android_deep_links: + description: URLs that deep link Android users to specific content within the carousel ad. + type: ["null", array] + items: + description: The deep link URLs for individual carousel items on Android devices. + type: ["null", string] + carousel_destination_urls: + description: URLs that direct users to the landing pages of the advertised content. + type: ["null", array] + items: + description: The destination URLs for individual carousel items. + type: ["null", string] + carousel_ios_deep_links: + description: URLs that deep link iOS users to specific content within the carousel ad. + type: ["null", array] + items: + description: The deep link URLs for individual carousel items on iOS devices. + type: ["null", string] + click_tracking_url: + description: The URL for tracking clicks on the ad. + type: ["null", string] + creative_type: + description: The type of creative used in the ad. + type: ["null", string] + destination_url: + description: The main destination URL of the ad. + type: ["null", string] + ios_deep_link: + description: The deep link URL for iOS devices. + type: ["null", string] + is_pin_deleted: + description: A flag indicating if the ad is linked to a deleted pin. + type: ["null", boolean] + is_removable: + description: A flag indicating if the ad is removable. + type: ["null", boolean] + name: + description: The name or title of the ad. + type: ["null", string] + pin_id: + description: The ID of the pin associated with the ad. + type: ["null", string] + status: + description: The current status of the ad. + type: ["null", string] + tracking_urls: + description: Various tracking URLs used to monitor user interactions with the ad. + type: ["null", object] + properties: + impression: + description: URL to track impressions of the ad. + type: ["null", array] + items: + description: Tracking URLs for ad impressions. + type: ["null", string] + click: + description: URL to track clicks on the ad. + type: ["null", array] + items: + description: Tracking URLs for clicks on the ad. + type: ["null", string] + engagement: + description: URL to track user engagements with the ad. + type: ["null", array] + items: + description: Tracking URLs for ad engagement. + type: ["null", string] + buyable_button: + description: URL to track clicks on the buyable button in the ad. + type: ["null", array] + items: + description: Tracking URLs for buyable buttons. + type: ["null", string] + audience_verification: + description: URL to track audience verification events. + type: ["null", array] + items: + description: Tracking URLs for audience verification. + type: ["null", string] + view_tracking_url: + description: The URL for tracking views of the ad. + type: ["null", string] + lead_form_id: + description: The ID of the lead form associated with the ad. + type: ["null", string] + ad_account_id: + description: The ID of the ad account associated with the ad data. + type: ["null", string] + campaign_id: + description: The ID of the campaign associated with the ad. + type: ["null", string] + collection_items_destination_url_template: + description: The template URL for destination pages of collection items. + type: ["null", string] + created_time: + description: The timestamp when the ad was created. + type: ["null", integer] + id: + description: The unique ID of the ad. + type: ["null", string] + rejected_reasons: + description: Reasons for rejecting the ad. + type: ["null", array] + items: + description: Reasons for rejection of the ad. + type: ["null", string] + rejection_labels: + description: Labels applied to the ad when it is rejected. + type: ["null", array] + items: + description: Labels for the rejected ad. + type: ["null", string] + review_status: + description: The review status of the ad. + type: ["null", string] + type: + description: The type of the ad. + type: ["null", string] + updated_time: + description: The timestamp when the ad was last updated. + type: ["null", integer] + summary_status: + description: The summarized status of the ad. + type: ["null", string] + + ad_analytics_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + DATE: + description: The date for the data entry. + type: ["null", string] + format: date + ADVERTISER_ID: + description: The unique identifier of the advertiser. + type: [string] + AD_ACCOUNT_ID: + description: The unique identifier of the ad account. + type: [string] + AD_ID: + description: The unique identifier of the ad. + type: ["null", string] + AD_GROUP_ENTITY_STATUS: + description: The status of the ad group entity. + type: ["null", string] + AD_GROUP_ID: + description: The unique identifier of the ad group. + type: ["null", string] + CAMPAIGN_DAILY_SPEND_CAP: + description: The daily spend limit set for the campaign. + type: ["null", number] + CAMPAIGN_ENTITY_STATUS: + description: The status of the campaign entity. + type: ["null", number] + CAMPAIGN_ID: + description: The unique identifier of the campaign. + type: ["null", number] + CAMPAIGN_LIFETIME_SPEND_CAP: + description: The total spend limit set for the campaign. + type: ["null", number] + CAMPAIGN_NAME: + description: The name of the campaign. + type: ["null", string] + CHECKOUT_ROAS: + description: Return on ad spend for checkout conversions. + type: ["null", number] + CLICKTHROUGH_1: + description: Click-through conversions type 1. + type: ["null", number] + CLICKTHROUGH_1_GROSS: + description: Gross click-through conversions type 1. + type: ["null", number] + CLICKTHROUGH_2: + description: Click-through conversions type 2. + type: ["null", number] + CPC_IN_MICRO_DOLLAR: + description: Cost per click in micro dollars. + type: ["null", number] + CPM_IN_DOLLAR: + description: Cost per mille in dollars. + type: ["null", number] + CPM_IN_MICRO_DOLLAR: + description: Cost per mille in micro dollars. + type: ["null", number] + CTR: + description: Click-through rate. + type: ["null", number] + CTR_2: + description: Click-through rate 2. + type: ["null", number] + ECPCV_IN_DOLLAR: + description: Effective cost per click view in dollars. + type: ["null", number] + ECPCV_P95_IN_DOLLAR: + description: Effective cost per click view percentile 95 in dollars. + type: ["null", number] + ECPC_IN_DOLLAR: + description: Effective cost per click in dollars. + type: ["null", number] + ECPC_IN_MICRO_DOLLAR: + description: Effective cost per click in micro dollars. + type: ["null", number] + ECPE_IN_DOLLAR: + description: Effective cost per engagement in dollars. + type: ["null", number] + ECPM_IN_MICRO_DOLLAR: + description: Effective cost per mille in micro dollars. + type: ["null", number] + ECPV_IN_DOLLAR: + description: Effective cost per view in dollar. + type: ["null", number] + ECTR: + description: Effective click-through rate. + type: ["null", number] + EENGAGEMENT_RATE: + description: Effective engagement rate. + type: ["null", number] + ENGAGEMENT_1: + description: Engagement type 1. + type: ["null", number] + ENGAGEMENT_2: + description: Engagement type 2. + type: ["null", number] + ENGAGEMENT_RATE: + description: Engagement rate. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_1: + description: Idea pin product tag visit type 1. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_2: + description: Idea pin product tag visit type 2. + type: ["null", number] + IMPRESSION_1: + description: Impressions type 1. + type: ["null", number] + IMPRESSION_1_GROSS: + description: Gross impressions type 1. + type: ["null", number] + IMPRESSION_2: + description: Impressions type 2. + type: ["null", number] + INAPP_CHECKOUT_COST_PER_ACTION: + description: In-app checkout cost per action. + type: ["null", number] + OUTBOUND_CLICK_1: + description: Outbound clicks type 1. + type: ["null", number] + OUTBOUND_CLICK_2: + description: Outbound clicks type 2. + type: ["null", number] + PAGE_VISIT_COST_PER_ACTION: + description: Page visit cost per action. + type: ["null", number] + PAGE_VISIT_ROAS: + description: Return on ad spend for page visits. + type: ["null", number] + PAID_IMPRESSION: + description: Paid impressions. + type: ["null", number] + PIN_ID: + description: The unique identifier of the pin. + type: ["null", number] + PIN_PROMOTION_ID: + description: The unique identifier of the pin promotion. + type: ["null", number] + REPIN_1: + description: Repins type 1. + type: ["null", number] + REPIN_2: + description: Repins type 2. + type: ["null", number] + REPIN_RATE: + description: Repins rate. + type: ["null", number] + SPEND_IN_DOLLAR: + description: Total spend in dollars. + type: ["null", number] + SPEND_IN_MICRO_DOLLAR: + description: Total spend in micro dollars. + type: ["null", number] + TOTAL_CHECKOUT: + description: Total checkout conversions. + type: ["null", number] + TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total checkout value in micro dollars. + type: ["null", number] + TOTAL_CLICKTHROUGH: + description: Total click-through conversions. + type: ["null", number] + TOTAL_CLICK_ADD_TO_CART: + description: Total clicks add to cart. + type: ["null", number] + TOTAL_CLICK_CHECKOUT: + description: Total clicks checkout. + type: ["null", number] + TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total clicks checkout value in micro dollars. + type: ["null", number] + TOTAL_CLICK_LEAD: + description: Total clicks lead. + type: ["null", number] + TOTAL_CLICK_SIGNUP: + description: Total clicks sign up. + type: ["null", number] + TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total clicks sign up value in micro dollars. + type: ["null", number] + TOTAL_CONVERSIONS: + description: Total conversions. + type: ["null", number] + TOTAL_CUSTOM: + description: Total custom actions. + type: ["null", number] + TOTAL_ENGAGEMENT: + description: Total engagements. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT: + description: Total engagements checkout. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total engagements checkout value in micro dollars. + type: ["null", number] + TOTAL_ENGAGEMENT_LEAD: + description: Total engagements lead. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP: + description: Total engagements sign up. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total engagements sign up value in micro dollars. + type: ["null", number] + TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT: + description: Total idea pin product tag visits. + type: ["null", number] + TOTAL_IMPRESSION_FREQUENCY: + description: Total impressions frequency. + type: ["null", number] + TOTAL_IMPRESSION_USER: + description: Total impressions per user. + type: ["null", number] + TOTAL_LEAD: + description: Total leads. + type: ["null", number] + TOTAL_OFFLINE_CHECKOUT: + description: Total offline checkout conversions. + type: ["null", number] + TOTAL_PAGE_VISIT: + description: Total page visits. + type: ["null", number] + TOTAL_REPIN_RATE: + description: Total repin rate. + type: ["null", number] + TOTAL_SIGNUP: + description: Total signups. + type: ["null", number] + TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total sign up value in micro dollars. + type: ["null", number] + TOTAL_VIDEO_3SEC_VIEWS: + description: Total video 3-second views. + type: ["null", number] + TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND: + description: Total average watch time for videos in seconds. + type: ["null", number] + TOTAL_VIDEO_MRC_VIEWS: + description: Total video MRC views. + type: ["null", number] + TOTAL_VIDEO_P0_COMBINED: + description: Total video P0 combined. + type: ["null", number] + TOTAL_VIDEO_P100_COMPLETE: + description: Total video P100 complete views. + type: ["null", number] + TOTAL_VIDEO_P25_COMBINED: + description: Total video P25 combined. + type: ["null", number] + TOTAL_VIDEO_P50_COMBINED: + description: Total video P50 combined. + type: ["null", number] + TOTAL_VIDEO_P75_COMBINED: + description: Total video P75 combined. + type: ["null", number] + TOTAL_VIDEO_P95_COMBINED: + description: Total video P95 combined. + type: ["null", number] + TOTAL_VIEW_ADD_TO_CART: + description: Total view add to cart conversions. + type: ["null", number] + TOTAL_VIEW_CHECKOUT: + description: Total view checkouts. + type: ["null", number] + TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total view checkout value in micro dollars. + type: ["null", number] + TOTAL_VIEW_LEAD: + description: Total view leads. + type: ["null", number] + TOTAL_VIEW_SIGNUP: + description: Total view signups. + type: ["null", number] + TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total view signup value in micro dollars. + type: ["null", number] + TOTAL_WEB_CHECKOUT: + description: Total web checkouts. + type: ["null", number] + TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total web checkout value in micro dollars. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT: + description: Total web click checkouts. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total web click checkout value in micro dollars. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT: + description: Total web engagements checkout. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total web engagements checkout value in micro dollars. + type: ["null", number] + TOTAL_WEB_SESSIONS: + description: Total web sessions. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT: + description: Total web view checkouts. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total web view checkout value in micro dollars. + type: ["null", number] + VIDEO_3SEC_VIEWS_2: + description: Video 3-second views type 2. + type: ["null", number] + VIDEO_LENGTH: + description: Length of the video. + type: ["null", number] + VIDEO_MRC_VIEWS_2: + description: Video MRC views type 2. + type: ["null", number] + VIDEO_P0_COMBINED_2: + description: Video P0 combined type 2. + type: ["null", number] + VIDEO_P100_COMPLETE_2: + description: Video P100 complete views type 2. + type: ["null", number] + VIDEO_P25_COMBINED_2: + description: Video P25 combined type 2. + type: ["null", number] + VIDEO_P50_COMBINED_2: + description: Video P50 combined type 2. + type: ["null", number] + VIDEO_P75_COMBINED_2: + description: Video P75 combined type 2. + type: ["null", number] + VIDEO_P95_COMBINED_2: + description: Video P95 combined type 2. + type: ["null", number] + WEB_CHECKOUT_COST_PER_ACTION: + description: Web checkout cost per action. + type: ["null", number] + WEB_CHECKOUT_ROAS: + description: Return on ad spend for web checkouts. + type: ["null", number] + WEB_SESSIONS_1: + description: Web sessions type 1. + type: ["null", number] + WEB_SESSIONS_2: + description: Web sessions type 2. + type: ["null", number] + + ad_groups_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + name: + description: The name of the ad group. + type: ["null", string] + status: + description: The current status of the ad group. + type: ["null", string] + budget_in_micro_currency: + description: The budget amount in micro currency for the ad group. + type: ["null", number] + bid_in_micro_currency: + description: The bid amount in micro currency for the ad group. + type: ["null", number] + budget_type: + description: The type of budget set for the ad group. + type: ["null", string] + start_time: + description: The start time for the ad group to begin running. + type: ["null", number] + end_time: + description: The end time for the ad group to run. + type: ["null", number] + targeting_spec: + description: The targeting specifications for the ad group. + type: ["null", object] + properties: + property1: + description: Description of targeting property 1. + type: ["null", array] + items: + description: Description of item in property 1. + type: ["null", string] + property2: + description: Description of targeting property 2. + type: ["null", array] + items: + description: Description of item in property 2. + type: ["null", string] + lifetime_frequency_cap: + description: The maximum number of times a user can be shown the ad during its lifetime. + type: ["null", number] + tracking_urls: + description: URLs for tracking different types of events for the ad group. + type: ["null", object] + properties: + impression: + description: URLs for impression tracking. + type: ["null", array] + items: + description: Description of impression tracking item. + type: ["null", string] + click: + description: URLs for click tracking. + type: ["null", array] + items: + description: Description of click tracking item. + type: ["null", string] + engagement: + description: URLs for engagement tracking. + type: ["null", array] + items: + description: Description of engagement tracking item. + type: ["null", string] + buyable_button: + description: URLs for buyable button tracking. + type: ["null", array] + items: + description: Description of buyable button tracking item. + type: ["null", string] + audience_verification: + description: URLs for audience verification tracking. + type: ["null", array] + items: + description: Description of audience verification tracking item. + type: ["null", string] + auto_targeting_enabled: + description: Indicates if auto targeting is enabled for the ad group. + type: ["null", boolean] + placement_group: + description: The group of placements where the ad group is shown. + type: ["null", string] + placement_traffic_type: + description: The type of traffic the ad group targets. + type: ["null", string] + pacing_delivery_type: + description: The delivery type pacing for the ad group. + type: ["null", string] + conversion_learning_mode_type: + description: The learning mode type for conversion optimization. + type: ["null", string] + summary_status: + description: A summary status of the ad group. + type: ["null", string] + feed_profile_id: + description: The ID of the feed profile associated with the ad group. + type: ["null", string] + campaign_id: + description: The ID of the campaign to which the ad group belongs. + type: ["null", string] + billable_event: + description: The event for which the ad group is billed. + type: ["null", string] + id: + description: The unique identifier for the ad group. + type: ["null", string] + type: + description: The type of the ad group. + type: ["null", string] + ad_account_id: + description: The ID of the ad account associated with the ad group. + type: ["null", string] + created_time: + description: The timestamp when the ad group was created. + type: ["null", number] + updated_time: + description: The timestamp when the ad group was last updated. + type: ["null", number] + optimization_goal_metadata: + description: Metadata related to optimization goals for the ad group. + type: ["null", object] + properties: + conversion_tag_v3_goal_metadata: + description: Metadata specific to conversion optimization goals. + type: ["null", object] + properties: + attribution_windows: + description: Different attribution windows for conversion events. + type: ["null", object] + properties: + click_window_days: + description: Number of days for click attribution window. + type: ["null", integer] + engagement_window_days: + description: Number of days for engagement attribution window. + type: ["null", integer] + view_window_days: + description: Number of days for view attribution window. + type: ["null", integer] + conversion_event: + description: The conversion event being optimized for. + type: ["null", string] + conversion_tag_id: + description: The ID of the conversion tag used for optimization. + type: ["null", string] + cpa_goal_value_in_micro_currency: + description: The cost per action goal in micro currency. + type: ["null", string] + is_roas_optimized: + description: Indicates if return on ad spend (ROAS) is optimized for. + type: ["null", boolean] + learning_mode_type: + description: The learning mode type for conversion optimization. + type: ["null", string] + frequency_goal_metadata: + description: Metadata related to frequency optimization goals. + type: ["null", object] + properties: + frequency: + description: The desired frequency of ad views. + type: ["null", integer] + timerange: + description: The time range considered for frequency capping. + type: ["null", string] + scrollup_goal_metadata: + description: Metadata related to scroll-up optimization goals. + type: ["null", object] + properties: + scrollup_goal_value_in_micro_currency: + description: The scroll-up goal value in micro currency. + type: ["null", string] + bid_strategy_type: + description: The type of bid strategy used for the ad group. + type: ["null", string] + + ad_group_analytics_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + DATE: + description: The date the data was collected. + type: ["null", string] + format: date + ADVERTISER_ID: + description: The ID of the advertiser associated with the ad group analytics data. + type: [string] + AD_ACCOUNT_ID: + description: The ID of the ad account associated with the ad group analytics data. + type: [string] + AD_ID: + description: The ID of the ad. + type: ["null", string] + AD_GROUP_ENTITY_STATUS: + description: The status of the ad group entity. + type: ["null", string] + AD_GROUP_ID: + description: The ID of the ad group. + type: ["null", string] + CAMPAIGN_DAILY_SPEND_CAP: + description: The daily spend cap set for the campaign. + type: ["null", number] + CAMPAIGN_ENTITY_STATUS: + description: The status of the campaign entity. + type: ["null", number] + CAMPAIGN_ID: + description: The ID of the campaign. + type: ["null", number] + CAMPAIGN_LIFETIME_SPEND_CAP: + description: The lifetime spend cap set for the campaign. + type: ["null", number] + CAMPAIGN_NAME: + description: The name of the campaign. + type: ["null", string] + CHECKOUT_ROAS: + description: Return on ad spend for checkout actions. + type: ["null", number] + CLICKTHROUGH_1: + description: Number of click-throughs type 1. + type: ["null", number] + CLICKTHROUGH_1_GROSS: + description: Gross count of click-throughs type 1. + type: ["null", number] + CLICKTHROUGH_2: + description: Number of click-throughs type 2. + type: ["null", number] + CPC_IN_MICRO_DOLLAR: + description: Cost per click in micro dollar. + type: ["null", number] + CPM_IN_DOLLAR: + description: Cost per mille in dollar. + type: ["null", number] + CPM_IN_MICRO_DOLLAR: + description: Cost per mille in micro dollar. + type: ["null", number] + CTR: + description: Click-through rate. + type: ["null", number] + CTR_2: + description: Click-through rate type 2. + type: ["null", number] + ECPCV_IN_DOLLAR: + description: Effective cost per converted view in dollar. + type: ["null", number] + ECPCV_P95_IN_DOLLAR: + description: Effective cost per converted view at 95th percentile in dollar. + type: ["null", number] + ECPC_IN_DOLLAR: + description: Effective cost per click in dollar. + type: ["null", number] + ECPC_IN_MICRO_DOLLAR: + description: Effective cost per click in micro dollar. + type: ["null", number] + ECPE_IN_DOLLAR: + description: Effective cost per engagement in dollar. + type: ["null", number] + ECPM_IN_MICRO_DOLLAR: + description: Effective cost per mille in micro dollar. + type: ["null", number] + ECPV_IN_DOLLAR: + description: Effective cost per view in dollar. + type: ["null", number] + ECTR: + description: Effective click-through rate. + type: ["null", number] + EENGAGEMENT_RATE: + description: Effective engagement rate. + type: ["null", number] + ENGAGEMENT_1: + description: Number of engagements type 1. + type: ["null", number] + ENGAGEMENT_2: + description: Number of engagements type 2. + type: ["null", number] + ENGAGEMENT_RATE: + description: Engagement rate. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_1: + description: Number of visits to Idea Pin product tags type 1. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_2: + description: Number of visits to Idea Pin product tags type 2. + type: ["null", number] + IMPRESSION_1: + description: Number of impressions type 1. + type: ["null", number] + IMPRESSION_1_GROSS: + description: Gross count of impressions type 1. + type: ["null", number] + IMPRESSION_2: + description: Number of impressions type 2. + type: ["null", number] + INAPP_CHECKOUT_COST_PER_ACTION: + description: In-app checkout cost per action. + type: ["null", number] + OUTBOUND_CLICK_1: + description: Number of outbound clicks type 1. + type: ["null", number] + OUTBOUND_CLICK_2: + description: Number of outbound clicks type 2. + type: ["null", number] + PAGE_VISIT_COST_PER_ACTION: + description: Page visit cost per action. + type: ["null", number] + PAGE_VISIT_ROAS: + description: Return on ad spend for page visits. + type: ["null", number] + PAID_IMPRESSION: + description: Number of paid impressions. + type: ["null", number] + PIN_ID: + description: The ID of the pin. + type: ["null", number] + PIN_PROMOTION_ID: + description: The ID of the pin promotion. + type: ["null", number] + REPIN_1: + description: Number of repins type 1. + type: ["null", number] + REPIN_2: + description: Number of repins type 2. + type: ["null", number] + REPIN_RATE: + description: Repins rate. + type: ["null", number] + SPEND_IN_DOLLAR: + description: Total spend in dollar. + type: ["null", number] + SPEND_IN_MICRO_DOLLAR: + description: Total spend in micro dollar. + type: ["null", number] + TOTAL_CHECKOUT: + description: Total number of checkouts. + type: ["null", number] + TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of checkouts in micro dollar. + type: ["null", number] + TOTAL_CLICKTHROUGH: + description: Total number of click-throughs. + type: ["null", number] + TOTAL_CLICK_ADD_TO_CART: + description: Total number of clicks leading to add to cart action. + type: ["null", number] + TOTAL_CLICK_CHECKOUT: + description: Total number of clicks leading to checkout action. + type: ["null", number] + TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of clicks leading to checkout in micro dollar. + type: ["null", number] + TOTAL_CLICK_LEAD: + description: Total number of clicks leading to lead action. + type: ["null", number] + TOTAL_CLICK_SIGNUP: + description: Total number of clicks leading to signup action. + type: ["null", number] + TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of clicks leading to signup in micro dollar. + type: ["null", number] + TOTAL_CONVERSIONS: + description: Total number of conversions. + type: ["null", number] + TOTAL_CUSTOM: + description: Total number of custom actions. + type: ["null", number] + TOTAL_ENGAGEMENT: + description: Total number of engagements. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT: + description: Total number of engagements leading to checkout action. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of engagements leading to checkout in micro dollar. + type: ["null", number] + TOTAL_ENGAGEMENT_LEAD: + description: Total number of engagements leading to lead action. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP: + description: Total number of engagements leading to signup action. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of engagements leading to signup in micro dollar. + type: ["null", number] + TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT: + description: Total visits to Idea Pin product tags. + type: ["null", number] + TOTAL_IMPRESSION_FREQUENCY: + description: Total impression frequency. + type: ["null", number] + TOTAL_IMPRESSION_USER: + description: Total impressions by users. + type: ["null", number] + TOTAL_LEAD: + description: Total number of leads. + type: ["null", number] + TOTAL_OFFLINE_CHECKOUT: + description: Total offline checkouts. + type: ["null", number] + TOTAL_PAGE_VISIT: + description: Total page visits. + type: ["null", number] + TOTAL_REPIN_RATE: + description: Total repins rate. + type: ["null", number] + TOTAL_SIGNUP: + description: Total number of signups. + type: ["null", number] + TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of signups in micro dollar. + type: ["null", number] + TOTAL_VIDEO_3SEC_VIEWS: + description: Total number of video views at 3 seconds. + type: ["null", number] + TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND: + description: Average watch time of videos in seconds. + type: ["null", number] + TOTAL_VIDEO_MRC_VIEWS: + description: Total number of video MRC views. + type: ["null", number] + TOTAL_VIDEO_P0_COMBINED: + description: Total combined P0 video plays. + type: ["null", number] + TOTAL_VIDEO_P100_COMPLETE: + description: Total completion of videos to 100%. + type: ["null", number] + TOTAL_VIDEO_P25_COMBINED: + description: Total combined P25 video plays. + type: ["null", number] + TOTAL_VIDEO_P50_COMBINED: + description: Total combined P50 video plays. + type: ["null", number] + TOTAL_VIDEO_P75_COMBINED: + description: Total combined P75 video plays. + type: ["null", number] + TOTAL_VIDEO_P95_COMBINED: + description: Total combined P95 video plays. + type: ["null", number] + TOTAL_VIEW_ADD_TO_CART: + description: Total views leading to add to cart action. + type: ["null", number] + TOTAL_VIEW_CHECKOUT: + description: Total views leading to checkout action. + type: ["null", number] + TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of views leading to checkout in micro dollar. + type: ["null", number] + TOTAL_VIEW_LEAD: + description: Total views leading to lead action. + type: ["null", number] + TOTAL_VIEW_SIGNUP: + description: Total views leading to signup action. + type: ["null", number] + TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: Total value of views leading to signup in micro dollar. + type: ["null", number] + TOTAL_WEB_CHECKOUT: + description: Total web checkouts. + type: ["null", number] + TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web checkouts in micro dollar. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT: + description: Total web clicks leading to checkout action. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web clicks leading to checkout in micro dollar. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT: + description: Total web engagements leading to checkout action. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web engagements leading to checkout in micro dollar. + type: ["null", number] + TOTAL_WEB_SESSIONS: + description: Total number of web sessions. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT: + description: Total web views leading to checkout action. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: Total value of web views leading to checkout in micro dollar. + type: ["null", number] + VIDEO_3SEC_VIEWS_2: + description: Number of video views at 3 seconds type 2. + type: ["null", number] + VIDEO_LENGTH: + description: Length of the video. + type: ["null", number] + VIDEO_MRC_VIEWS_2: + description: Number of video MRC views type 2. + type: ["null", number] + VIDEO_P0_COMBINED_2: + description: Combined P0 video plays type 2. + type: ["null", number] + VIDEO_P100_COMPLETE_2: + description: Completion of videos to 100% type 2. + type: ["null", number] + VIDEO_P25_COMBINED_2: + description: Combined P25 video plays type 2. + type: ["null", number] + VIDEO_P50_COMBINED_2: + description: Combined P50 video plays type 2. + type: ["null", number] + VIDEO_P75_COMBINED_2: + description: Combined P75 video plays type 2. + type: ["null", number] + VIDEO_P95_COMBINED_2: + description: Combined P95 video plays type 2. + type: ["null", number] + WEB_CHECKOUT_COST_PER_ACTION: + description: Web checkout cost per action. + type: ["null", number] + WEB_CHECKOUT_ROAS: + description: Return on ad spend for web checkouts. + type: ["null", number] + WEB_SESSIONS_1: + description: Number of web sessions type 1. + type: ["null", number] + WEB_SESSIONS_2: + description: Number of web sessions type 2. + type: ["null", number] + + boards_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + owner: + description: Details of the owner of the board. + type: ["null", object] + additionalProperties: true + properties: + username: + description: The username of the board owner. + type: ["null", string] + name: + description: The name/title of the board. + type: ["null", string] + description: + description: A brief description or summary of the board. + type: ["null", string] + id: + description: The unique identifier for the board. + type: ["null", string] + privacy: + description: The privacy settings of the board. + type: ["null", string] + follower_count: + description: The count of followers the board has. + type: ["null", integer] + collaborator_count: + description: The number of collaborators involved in the board. + type: ["null", integer] + pin_count: + description: The total number of pins in the board. + type: ["null", integer] + media: + description: Represents media content associated with the boards. + type: ["null", object] + additionalProperties: true + properties: + media_type: + description: The type of media content associated with the board. + type: ["null", string] + created_at: + description: The date and time when the board was created. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + board_pins_modified_at: + description: The most recent date and time when the board's pins were modified. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + + board_pins_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + id: + description: The unique identifier of the pin. + type: ["null", string] + created_at: + description: The date and time when the pin was created. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + creative_type: + description: The type of creative content associated with the pin. + type: ["null", string] + is_standard: + description: Indicates if the pin is a standard pin or a promoted pin. + type: ["null", boolean] + is_owner: + description: Indicates if the current user is the owner of the pin. + type: ["null", boolean] + product_tags: + description: Information about any product tags associated with the pin. + type: ["null", array] + items: + description: Individual product tag details. + type: ["null", string] + dominant_color: + description: The dominant color extracted from the pin's image. + type: ["null", string] + parent_pin_id: + description: The unique identifier of the parent pin if this pin is a repin. + type: ["null", string] + link: + description: The URL link associated with the pin, if applicable. + type: ["null", string] + title: + description: The title or headline associated with the pin. + type: ["null", string] + description: + description: The textual description or caption associated with the pin. + type: ["null", string] + alt_text: + description: Alternate text for the pin image, used for accessibility and SEO purposes. + type: ["null", string] + note: + description: Any additional notes or comments added to the pin by users. + type: ["null", string] + board_id: + description: The unique identifier of the board to which the pin belongs. + type: ["null", string] + board_section_id: + description: The unique identifier of the section within the board where the pin is placed. + type: ["null", string] + board_owner: + description: Information about the owner of the board to which the pin belongs. + type: ["null", object] + additionalProperties: true + properties: + username: + description: The username of the board owner. + type: ["null", string] + media: + description: Information about the media content associated with the pin. + type: ["null", object] + additionalProperties: true + properties: + media_type: + description: The type of media content, e.g., image, video, or gif. + type: ["null", string] + pin_metrics: + description: Metrics data related to the pin, such as views, likes, and shares. + type: ["null", object] + has_been_promoted: + description: Indicates whether the pin has been promoted or sponsored. + type: ["null", boolean] + + board_sections_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + name: + description: The name of the board section. + type: ["null", string] + id: + description: The unique identifier for the board section. + type: ["null", string] + + board_section_pins_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + id: + description: Unique identifier for the pin. + type: ["null", string] + created_at: + description: Date and time when the pin was created. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + link: + description: URL link associated with the pin. + type: ["null", string] + title: + description: Title or caption associated with the pin. + type: ["null", string] + description: + description: Textual description of the pin content or context. + type: ["null", string] + alt_text: + description: Alternate text describing the pin for accessibility purposes. + type: ["null", string] + board_id: + description: Unique identifier for the board the pin belongs to. + type: ["null", string] + board_section_id: + description: Unique identifier for the section within the board where the pin is categorized. + type: ["null", string] + board_owner: + description: Details of the owner of the board the pins belong to + type: ["null", object] + properties: + username: + description: Username of the owner of the board. + type: ["null", string] + pin_metrics: + description: Metrics or statistics related to the pin, such as views or saves. + type: ["null", object] + media: + description: Media content associated with the pins + type: ["null", object] + properties: + media_type: + description: Type of media content associated with the pin. + type: ["null", string] + images: + description: Different image sizes available for the pin + type: ["null", object] + properties: + 150x150: + description: Square thumbnail image sized at 150x150 resolution + type: ["null", object] + properties: + width: + description: Width of the image in 150x150 resolution. + type: ["null", integer] + height: + description: Height of the image in 150x150 resolution. + type: ["null", integer] + url: + description: URL of the image in 150x150 resolution. + type: ["null", string] + 400x300: + description: Image sized at 400x300 resolution + type: ["null", object] + properties: + width: + description: Width of the image in 400x300 resolution. + type: ["null", integer] + height: + description: Height of the image in 400x300 resolution. + type: ["null", integer] + url: + description: URL of the image in 400x300 resolution. + type: ["null", string] + 600x: + description: Image sized at 600x resolution + type: ["null", object] + properties: + width: + description: Width of the image in 600x resolution. + type: ["null", integer] + height: + description: Height of the image in 600x resolution. + type: ["null", integer] + url: + description: URL of the image in 600x resolution. + type: ["null", string] + 1200x: + description: Image sized at 1200x resolution + type: ["null", object] + properties: + width: + description: Width of the image in the specified resolution. + type: ["null", integer] + height: + description: Height of the image in the specified resolution. + type: ["null", integer] + url: + description: URL of the image in the specified resolution. + type: ["null", string] + originals: + description: Original image file without any resizing + type: ["null", object] + properties: + width: + description: Width of the original image. + type: ["null", integer] + height: + description: Height of the original image. + type: ["null", integer] + url: + description: URL of the original image. + type: ["null", string] + + campaigns_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + id: + description: The unique identifier of the campaign. + type: ["null", string] + ad_account_id: + description: The unique identifier of the ad account associated with the campaign. + type: ["null", string] + name: + description: The name of the campaign. + type: ["null", string] + status: + description: The current status of the campaign. + type: ["null", string] + lifetime_spend_cap: + description: The maximum amount that can be spent for the lifetime of the campaign. + type: ["null", integer] + daily_spend_cap: + description: The maximum amount that can be spent daily on the campaign. + type: ["null", integer] + order_line_id: + description: The unique identifier of the order line associated with the campaign. + type: ["null", string] + tracking_urls: + description: List of tracking URLs associated with the campaign + type: ["null", object] + properties: + impression: + description: Tracking URLs for impression events. + type: ["null", array] + items: + type: ["null", string] + click: + description: Tracking URLs for click events. + type: ["null", array] + items: + type: ["null", string] + engagement: + description: Tracking URLs for engagement events. + type: ["null", array] + items: + type: ["null", string] + buyable_button: + description: Tracking URLs for buyable button events. + type: ["null", array] + items: + type: ["null", string] + audience_verification: + description: Tracking URLs for audience verification events. + type: ["null", array] + items: + type: ["null", string] + objective_type: + description: The type of the campaign objective. + type: ["null", string] + created_time: + description: The timestamp indicating when the campaign was created. + type: ["null", integer] + updated_time: + description: The timestamp indicating when the campaign was last updated. + type: ["null", integer] + type: + description: The type of the campaign. + type: ["null", string] + start_time: + description: The timestamp indicating the start time of the campaign. + type: ["null", integer] + end_time: + description: The timestamp indicating the end time of the campaign. + type: ["null", integer] + summary_status: + description: The summary status of the campaign. + type: ["null", string] + is_campaign_budget_optimization: + description: Indicates if campaign budget optimization is enabled. + type: ["null", boolean] + is_flexible_daily_budgets: + description: Indicates if flexible daily budgets are enabled for the campaign. + type: ["null", boolean] + + campaign_analytics_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + DATE: + description: The date for which the analytics data is recorded. + type: ["null", string] + format: date + ADVERTISER_ID: + description: The unique identifier of the advertiser involved in the campaign. + type: ["null", number] + AD_ACCOUNT_ID: + description: The unique identifier of the advertising account associated with the campaign. + type: [string] + AD_ID: + description: The unique identifier of the ad. + type: ["null", string] + AD_GROUP_ENTITY_STATUS: + description: The current status of the ad group within the campaign. + type: ["null", string] + AD_GROUP_ID: + description: The unique identifier of the ad group within the campaign. + type: ["null", string] + CAMPAIGN_DAILY_SPEND_CAP: + description: The daily spending limit set for the campaign. + type: ["null", number] + CAMPAIGN_ENTITY_STATUS: + description: The current status of the campaign. + type: ["null", number] + CAMPAIGN_ID: + description: The unique identifier of the campaign. + type: ["null", number] + CAMPAIGN_LIFETIME_SPEND_CAP: + description: The total spending limit set for the campaign. + type: ["null", number] + CAMPAIGN_NAME: + description: The name of the campaign. + type: ["null", string] + CHECKOUT_ROAS: + description: The return on ad spend (ROAS) related to checkout actions. + type: ["null", number] + CLICKTHROUGH_1: + description: The number of click-throughs for a specific action. + type: ["null", number] + CLICKTHROUGH_1_GROSS: + description: The gross number of click-throughs for a specific action, including duplicates. + type: ["null", number] + CLICKTHROUGH_2: + description: Another metric related to click-throughs. + type: ["null", number] + CPC_IN_MICRO_DOLLAR: + description: The cost per click (CPC) in micro dollars. + type: ["null", number] + CPM_IN_DOLLAR: + description: The cost per mille (CPM) in dollars. + type: ["null", number] + CPM_IN_MICRO_DOLLAR: + description: The cost per mille (CPM) in micro dollars. + type: ["null", number] + CTR: + description: The click-through rate (CTR) for the campaign. + type: ["null", number] + CTR_2: + description: Another metric related to click-through rates. + type: ["null", number] + ECPCV_IN_DOLLAR: + description: The effective cost per converted view in dollars. + type: ["null", number] + ECPCV_P95_IN_DOLLAR: + description: The 95th percentile effective cost per converted view in dollars. + type: ["null", number] + ECPC_IN_DOLLAR: + description: The effective cost per click in dollars. + type: ["null", number] + ECPC_IN_MICRO_DOLLAR: + description: The effective cost per click in micro dollars. + type: ["null", number] + ECPE_IN_DOLLAR: + description: The effective cost per engagement in dollars. + type: ["null", number] + ECPM_IN_MICRO_DOLLAR: + description: The effective cost per mille (ECPM) in micro dollars. + type: ["null", number] + ECPV_IN_DOLLAR: + description: The effective cost per view in dollars. + type: ["null", number] + ECTR: + description: The effective click-through rate (CTR) for the campaign. + type: ["null", number] + EENGAGEMENT_RATE: + description: The engagement rate for the campaign. + type: ["null", number] + ENGAGEMENT_1: + description: The number of engagements for a specific action. + type: ["null", number] + ENGAGEMENT_2: + description: Another metric related to engagements. + type: ["null", number] + ENGAGEMENT_RATE: + description: The engagement rate for the campaign. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_1: + description: The number of visits related to product tags in a pin for a specific action. + type: ["null", number] + IDEA_PIN_PRODUCT_TAG_VISIT_2: + description: Another metric related to visits related to product tags in pins. + type: ["null", number] + IMPRESSION_1: + description: The number of impressions for a specific action. + type: ["null", number] + IMPRESSION_1_GROSS: + description: The gross number of impressions for a specific action, including duplicates. + type: ["null", number] + IMPRESSION_2: + description: Another metric related to impressions. + type: ["null", number] + INAPP_CHECKOUT_COST_PER_ACTION: + description: The cost per action related to in-app checkouts. + type: ["null", number] + OUTBOUND_CLICK_1: + description: The number of outbound clicks for a specific action. + type: ["null", number] + OUTBOUND_CLICK_2: + description: Another metric related to outbound clicks. + type: ["null", number] + PAGE_VISIT_COST_PER_ACTION: + description: The cost per action related to page visits. + type: ["null", number] + PAGE_VISIT_ROAS: + description: The return on ad spend (ROAS) related to page visits. + type: ["null", number] + PAID_IMPRESSION: + description: The number of paid impressions. + type: ["null", number] + PIN_ID: + description: The unique identifier of the pin. + type: ["null", number] + PIN_PROMOTION_ID: + description: The unique identifier of the promoted pin, if applicable. + type: ["null", number] + REPIN_1: + description: The number of repins for a specific action. + type: ["null", number] + REPIN_2: + description: Another metric related to repins. + type: ["null", number] + REPIN_RATE: + description: The repin rate for the campaign. + type: ["null", number] + SPEND_IN_DOLLAR: + description: The total spending in dollars for the campaign. + type: ["null", number] + SPEND_IN_MICRO_DOLLAR: + description: The total spending in micro dollars for the campaign. + type: ["null", number] + TOTAL_CHECKOUT: + description: The total number of checkouts. + type: ["null", number] + TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of checkouts in micro dollars. + type: ["null", number] + TOTAL_CLICKTHROUGH: + description: The total number of click-throughs. + type: ["null", number] + TOTAL_CLICK_ADD_TO_CART: + description: The total number of clicks leading to adding items to the cart. + type: ["null", number] + TOTAL_CLICK_CHECKOUT: + description: The total number of clicks leading to the checkout page. + type: ["null", number] + TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of clicks leading to the checkout page in micro dollars. + type: ["null", number] + TOTAL_CLICK_LEAD: + description: The total number of clicks leading to generating leads. + type: ["null", number] + TOTAL_CLICK_SIGNUP: + description: The total number of clicks leading to signing up. + type: ["null", number] + TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: The total value of clicks leading to signing up in micro dollars. + type: ["null", number] + TOTAL_CONVERSIONS: + description: The total number of conversions. + type: ["null", number] + TOTAL_CUSTOM: + description: A custom metric or dimension that is tracked. + type: ["null", number] + TOTAL_ENGAGEMENT: + description: The total number of engagements across actions. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT: + description: The total number of engagements leading to checkout. + type: ["null", number] + TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of engagements leading to checkout in micro dollars. + type: ["null", number] + TOTAL_ENGAGEMENT_LEAD: + description: The total number of engagements leading to generating leads. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP: + description: The total number of engagements leading to signing up. + type: ["null", number] + TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: The total value of engagements leading to signing up in micro dollars. + type: ["null", number] + TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT: + description: The total number of visits related to product tags in pins across actions. + type: ["null", number] + TOTAL_IMPRESSION_FREQUENCY: + description: The frequency of impressions per user. + type: ["null", number] + TOTAL_IMPRESSION_USER: + description: The total number of unique users reached through impressions. + type: ["null", number] + TOTAL_LEAD: + description: The total number of leads generated. + type: ["null", number] + TOTAL_OFFLINE_CHECKOUT: + description: The total number of offline checkouts. + type: ["null", number] + TOTAL_PAGE_VISIT: + description: The total number of page visits. + type: ["null", number] + TOTAL_REPIN_RATE: + description: The overall repin rate across actions. + type: ["null", number] + TOTAL_SIGNUP: + description: The total number of signups. + type: ["null", number] + TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: The total value of signups in micro dollars. + type: ["null", number] + TOTAL_VIDEO_3SEC_VIEWS: + description: The total number of 3-second video views. + type: ["null", number] + TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND: + description: The average watch time of video views in seconds. + type: ["null", number] + TOTAL_VIDEO_MRC_VIEWS: + description: The total number of viewable video impressions. + type: ["null", number] + TOTAL_VIDEO_P0_COMBINED: + description: The percentage of videos that were played to completion. + type: ["null", number] + TOTAL_VIDEO_P100_COMPLETE: + description: The percentage of videos that were fully played to completion. + type: ["null", number] + TOTAL_VIDEO_P25_COMBINED: + description: The percentage of videos that were 25% viewed. + type: ["null", number] + TOTAL_VIDEO_P50_COMBINED: + description: The percentage of videos that were 50% viewed. + type: ["null", number] + TOTAL_VIDEO_P75_COMBINED: + description: The percentage of videos that were 75% viewed. + type: ["null", number] + TOTAL_VIDEO_P95_COMBINED: + description: The percentage of videos that were 95% viewed. + type: ["null", number] + TOTAL_VIEW_ADD_TO_CART: + description: The total number of views leading to adding items to the cart. + type: ["null", number] + TOTAL_VIEW_CHECKOUT: + description: The total number of views leading to the checkout page. + type: ["null", number] + TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of views leading to the checkout page in micro dollars. + type: ["null", number] + TOTAL_VIEW_LEAD: + description: The total number of views leading to generating leads. + type: ["null", number] + TOTAL_VIEW_SIGNUP: + description: The total number of views leading to signing up. + type: ["null", number] + TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR: + description: The total value of views leading to signing up in micro dollars. + type: ["null", number] + TOTAL_WEB_CHECKOUT: + description: The total number of web checkouts. + type: ["null", number] + TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of web checkouts in micro dollars. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT: + description: The total number of web clicks leading to the checkout page. + type: ["null", number] + TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of web clicks leading to the checkout page in micro dollars. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT: + description: The total number of web engagements leading to checkout. + type: ["null", number] + TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of web engagements leading to checkout in micro dollars. + type: ["null", number] + TOTAL_WEB_SESSIONS: + description: The total number of web sessions. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT: + description: The total number of web views leading to the checkout page. + type: ["null", number] + TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR: + description: The total value of web views leading to the checkout page in micro dollars. + type: ["null", number] + VIDEO_3SEC_VIEWS_2: + description: Another metric related to 3-second video views. + type: ["null", number] + VIDEO_LENGTH: + description: The length of the video in seconds. + type: ["null", number] + VIDEO_MRC_VIEWS_2: + description: Another metric related to viewable video impressions. + type: ["null", number] + VIDEO_P0_COMBINED_2: + description: Another metric related to the percentage of videos played to completion. + type: ["null", number] + VIDEO_P100_COMPLETE_2: + description: Another metric related to the percentage of videos fully played to completion. + type: ["null", number] + VIDEO_P25_COMBINED_2: + description: Another metric related to the percentage of videos that were 25% viewed. + type: ["null", number] + VIDEO_P50_COMBINED_2: + description: Another metric related to the percentage of videos that were 50% viewed. + type: ["null", number] + VIDEO_P75_COMBINED_2: + description: Another metric related to the percentage of videos that were 75% viewed. + type: ["null", number] + VIDEO_P95_COMBINED_2: + description: Another metric related to the percentage of videos that were 95% viewed. + type: ["null", number] + WEB_CHECKOUT_COST_PER_ACTION: + description: The cost per action related to web checkouts. + type: ["null", number] + WEB_CHECKOUT_ROAS: + description: The return on ad spend (ROAS) related to web checkouts. + type: ["null", number] + WEB_SESSIONS_1: + description: The number of web sessions for a specific action. + type: ["null", number] + WEB_SESSIONS_2: + description: Another metric related to web sessions. + type: ["null", number] + + user_account_analytics_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + data_status: + description: The status of the data being fetched, such as 'success' or 'error'. + type: ["null", string] + date: + description: The date corresponding to the analytics data. + type: ["null", string] + format: date + metrics: + description: Various metrics related to user account analytics. + type: ["null", object] + properties: + ENGAGEMENT: + description: The level of user interaction or engagement with content. + type: ["null", number] + CLICKTHROUGH_RATE: + description: The rate at which users clicked through to view content. + type: ["null", number] + CLICKTHROUGH: + description: The number of times users clicked through to view content. + type: ["null", number] + CLOSEUP: + description: The number of close-up views of content. + type: ["null", number] + CLOSEUP_RATE: + description: The rate at which close-up views of content occurred. + type: ["null", number] + ENGAGEMENT_RATE: + description: The rate at which user engagement with content occurred. + type: ["null", number] + SAVE: + description: The number of times users saved or pinned content. + type: ["null", number] + SAVE_RATE: + description: The rate at which content was saved or pinned by users. + type: ["null", number] + IMPRESSION: + description: The number of times content was displayed or viewed. + type: ["null", number] + + keywords_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + archived: + description: Indicates whether the keyword is archived or not. + type: ["null", boolean] + id: + description: The unique identifier for the keyword. + type: ["null", string] + parent_id: + description: The ID of the parent keyword if this is a child keyword. + type: ["null", string] + parent_type: + description: The type of the parent keyword if this is a child keyword (category, theme, etc). + type: ["null", string] + type: + description: The type of keyword (brand, generic, long-tail, etc). + type: ["null", string] + bid: + description: The bid value associated with the keyword for advertising purposes. + type: ["null", integer] + match_type: + description: The type of matching used for the keyword (exact, phrase, broad, etc). + type: ["null", string] + value: + description: The actual text value of the keyword. + type: ["null", string] + + audiences_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + ad_account_id: + description: The unique identifier for the advertising account associated with the audience. + type: ["null", string] + id: + description: Unique identifier for the audience. + type: ["null", string] + name: + description: The name given to the audience for identification. + type: ["null", string] + audience_type: + description: Type of audience data, such as website visitors, customer list, lookalike audience, etc. + type: ["null", string] + description: + description: Detailed information about the audience criteria and characteristics. + type: ["null", string] + rule: + description: Contains information about the rule/condition applied to filter audiences. + type: ["null", object] + properties: + country: + description: The country criteria set for the audience. + type: ["null", string] + customer_list_id: + description: Identifier for the customer list used as a criterion for the audience. + type: ["null", string] + engagement_domain: + description: The domain(s) used for engagement tracking purposes. + type: ["null", array] + items: {} + engagement_type: + description: The type of engagement tracked, such as clicks, likes, shares, etc. + type: ["null", string] + event: + description: Specific event triggering engagement tracking. + type: ["null", string] + percentage: + description: Percentage of similarity for lookalike audience criteria. + type: ["null", integer] + prefill: + description: Option to automatically fill in missing data for the audience. + type: ["null", boolean] + retention_days: + description: Number of days the audience data should be retained. + type: ["null", integer] + visitor_source_id: + description: Identifier for the visitor source used as a criterion for the audience. + type: ["null", string] + engager_type: + description: Type of audience engagement, like active engagers, passive viewers, etc. + type: ["null", integer] + ad_account_id: + description: The unique identifier for the advertising account linked to the audience criteria. + type: ["null", string] + size: + description: Estimated size of the audience based on the specified criteria. + type: ["null", integer] + status: + description: Current status of the audience, like active, paused, deleted, etc. + type: ["null", string] + type: + description: Type of audience data, such as saved audience, custom audience, etc. + type: ["null", string] + created_timestamp: + description: Timestamp indicating when the audience was created. + type: ["null", integer] + updated_timestamp: + description: Timestamp indicating when the audience data was last updated. + type: ["null", integer] + + conversion_tags_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + ad_account_id: + description: The ID of the advertising account associated with the conversion tag. + type: ["null", string] + code_snippet: + description: The JavaScript code snippet that needs to be placed on the website for tracking conversions. + type: ["null", string] + enhanced_match_status: + description: The status of enhanced match capabilities for the conversion tag. + type: ["null", string] + id: + description: The unique identifier of the conversion tag. + type: ["null", string] + last_fired_time_ms: + description: The timestamp of the last conversion event fired by the tag in milliseconds. + type: ["null", integer] + name: + description: The name or label assigned to the conversion tag. + type: ["null", string] + status: + description: The current status of the conversion tag (e.g., active, inactive). + type: ["null", string] + version: + description: The version number or revision of the conversion tag. + type: ["null", string] + configs: + description: Contains configurations related to conversion tags + type: ["null", object] + properties: + aem_enabled: + description: Indicates if Adobe Experience Manager integration is enabled for the conversion tag. + type: ["null", boolean] + md_frequency: + description: The frequency at which match data is processed for the conversion tag. + type: ["null", number] + aem_fnln_enabled: + description: Indicates if AEM Facebook Login integration is enabled for the conversion tag. + type: ["null", boolean] + aem_ph_enabled: + description: Indicates if AEM Phone integration is enabled for the conversion tag. + type: ["null", boolean] + aem_ge_enabled: + description: Indicates if AEM Google Events integration is enabled for the conversion tag. + type: ["null", boolean] + aem_db_enabled: + description: Indicates if AEM DoubleClick integration is enabled for the conversion tag. + type: ["null", boolean] + aem_loc_enabled: + description: Indicates if AEM Locations integration is enabled for the conversion tag. + type: ["null", boolean] + + customer_lists_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + ad_account_id: + description: The ID of the advertising account associated with the customer list. + type: ["null", string] + created_time: + description: The timestamp indicating when the customer list was created. + type: ["null", integer] + id: + description: The unique identifier of the customer list. + type: ["null", string] + name: + description: The name given to the customer list for identification. + type: ["null", string] + num_batches: + description: The number of batches used to upload user records for the customer list. + type: ["null", integer] + num_removed_user_records: + description: The count of user records removed from the customer list. + type: ["null", integer] + num_uploaded_user_records: + description: The total number of user records uploaded to the customer list. + type: ["null", integer] + status: + description: The current status of the customer list, such as active, inactive, etc. + type: ["null", string] + type: + description: The type of customer list, which can be standard, hashed, etc. + type: ["null", string] + updated_time: + description: The timestamp indicating when the customer list was last updated. + type: ["null", integer] + + catalogs_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + created_at: + description: The timestamp when the catalog was created. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + id: + description: Unique identifier of the catalog. + type: ["null", string] + updated_at: + description: The timestamp when the catalog was last updated. + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + name: + description: Name/title of the catalog. + type: ["null", string] + catalog_type: + description: The type of the catalog representing the content. + type: ["null", string] + + catalogs_feeds_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + created_at: + description: The date and time when the catalog was created + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + id: + description: The unique identifier for the catalog + type: ["null", string] + updated_at: + description: The date and time when the catalog was last updated + type: ["null", string] + format: date-time + airbyte_type: timestamp_without_timezone + name: + description: The name or title of the catalog + type: ["null", string] + format: + description: The format of the catalog data, e.g., JSON, XML + type: ["null", string] + catalog_type: + description: The type of catalog being fetched, e.g., product, service, event + type: ["null", string] + location: + description: The physical or digital location associated with the catalog + type: ["null", string] + preferred_processing_schedule: + description: Preferred processing schedule for items in the catalog + type: ["null", object] + properties: + time: + description: The preferred processing time for items + type: ["null", string] + timezone: + description: The timezone used for the processing schedule + type: ["null", string] + status: + description: The current status of the catalog, e.g., active, inactive + type: ["null", string] + default_currency: + description: The default currency used for pricing within the catalog + type: ["null", string] + default_locale: + description: The default locale for language and formatting within the catalog + type: ["null", string] + default_country: + description: The default country applicable to the catalog items + type: ["null", string] + default_availability: + description: The default availability status for items in the catalog + type: ["null", string] + + catalogs_product_groups_schema: + $schema: https://json-schema.org/draft-07/schema# + type: object + properties: + created_at: + description: The date and time when the catalog product group was created. + type: ["null", integer] + description: + description: The description of the catalog product group. + type: ["null", string] + feed_id: + description: The ID of the feed associated with the catalog product group. + type: ["null", string] + id: + description: The unique identifier of the catalog product group. + type: ["null", string] + is_featured: + description: Indicates whether the product group is featured or not. + type: ["null", boolean] + name: + description: The name of the catalog product group. + type: ["null", string] + status: + description: The status of the catalog product group. + type: ["null", string] + type: + description: The type of the catalog product group. + type: ["null", string] + updated_at: + description: The date and time when the catalog product group was last updated. + type: ["null", integer] + +spec: + documentation_url: "https://docs.airbyte.com/integrations/sources/pinterest" + connection_specification: + $schema: "https://json-schema.org/draft-07/schema#" + title: "Pinterest Spec" + type: object + additionalProperties: true + properties: + start_date: + type: string + title: "Start Date" + description: "A date in the format YYYY-MM-DD. If you have not set a date, it would be defaulted to latest allowed date by api (89 days from today)." + format: date + pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + pattern_descriptor: "YYYY-MM-DD" + examples: ["2022-07-28"] + status: + title: "Status" + description: "For the ads, ad_groups, and campaigns streams, specifying a status will filter out records that do not match the specified ones. If a status is not specified, the source will default to records with a status of either ACTIVE or PAUSED." + type: [array, "null"] + items: + type: string + enum: ["ACTIVE", "PAUSED", "ARCHIVED"] + uniqueItems: true + credentials: + title: "OAuth2.0" + type: object + required: ["auth_method", "refresh_token", "client_id", "client_secret"] + properties: + auth_method: + type: string + const: "oauth2.0" + order: 0 + client_id: + type: string + title: "Client ID" + description: "The Client ID of your OAuth application" + airbyte_secret: true + client_secret: + type: string + title: "Client Secret" + description: "The Client Secret of your OAuth application." + airbyte_secret: true + refresh_token: + type: string + title: "Refresh Token" + description: "Refresh Token to obtain new Access Token, when it's expired." + airbyte_secret: true + custom_reports: + title: "Custom Reports" + description: 'A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. Click on "add" to fill this field.' + type: array + items: + title: "ReportConfig" + description: "Config for custom report" + type: object + required: ["name", "level", "granularity", "columns"] + properties: + name: + title: "Name" + description: "The name value of report" + type: string + order: 0 + level: + title: "Level" + description: "Chosen level for API" + default: "ADVERTISER" + enum: + - "ADVERTISER" + - "ADVERTISER_TARGETING" + - "CAMPAIGN" + - "CAMPAIGN_TARGETING" + - "AD_GROUP" + - "AD_GROUP_TARGETING" + - "PIN_PROMOTION" + - "PIN_PROMOTION_TARGETING" + - "KEYWORD" + - "PRODUCT_GROUP" + - "PRODUCT_GROUP_TARGETING" + - "PRODUCT_ITEM" + type: string + order: 1 + granularity: + title: "Granularity" + description: "Chosen granularity for API" + default: "TOTAL" + enum: ["TOTAL", "DAY", "HOUR", "WEEK", "MONTH"] + type: string + order: 2 + columns: + title: "Columns" + description: "A list of chosen columns" + default: [] + type: array + order: 3 + items: + title: "ValidEnums" + description: "An enumeration." + enum: + - "ADVERTISER_ID" + - "AD_ACCOUNT_ID" + - "AD_GROUP_ENTITY_STATUS" + - "AD_GROUP_ID" + - "AD_ID" + - "CAMPAIGN_DAILY_SPEND_CAP" + - "CAMPAIGN_ENTITY_STATUS" + - "CAMPAIGN_ID" + - "CAMPAIGN_LIFETIME_SPEND_CAP" + - "CAMPAIGN_NAME" + - "CHECKOUT_ROAS" + - "CLICKTHROUGH_1" + - "CLICKTHROUGH_1_GROSS" + - "CLICKTHROUGH_2" + - "CPC_IN_MICRO_DOLLAR" + - "CPM_IN_DOLLAR" + - "CPM_IN_MICRO_DOLLAR" + - "CTR" + - "CTR_2" + - "ECPCV_IN_DOLLAR" + - "ECPCV_P95_IN_DOLLAR" + - "ECPC_IN_DOLLAR" + - "ECPC_IN_MICRO_DOLLAR" + - "ECPE_IN_DOLLAR" + - "ECPM_IN_MICRO_DOLLAR" + - "ECPV_IN_DOLLAR" + - "ECTR" + - "EENGAGEMENT_RATE" + - "ENGAGEMENT_1" + - "ENGAGEMENT_2" + - "ENGAGEMENT_RATE" + - "IDEA_PIN_PRODUCT_TAG_VISIT_1" + - "IDEA_PIN_PRODUCT_TAG_VISIT_2" + - "IMPRESSION_1" + - "IMPRESSION_1_GROSS" + - "IMPRESSION_2" + - "INAPP_CHECKOUT_COST_PER_ACTION" + - "OUTBOUND_CLICK_1" + - "OUTBOUND_CLICK_2" + - "PAGE_VISIT_COST_PER_ACTION" + - "PAGE_VISIT_ROAS" + - "PAID_IMPRESSION" + - "PIN_ID" + - "PIN_PROMOTION_ID" + - "REPIN_1" + - "REPIN_2" + - "REPIN_RATE" + - "SPEND_IN_DOLLAR" + - "SPEND_IN_MICRO_DOLLAR" + - "TOTAL_CHECKOUT" + - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_CLICKTHROUGH" + - "TOTAL_CLICK_ADD_TO_CART" + - "TOTAL_CLICK_CHECKOUT" + - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_CLICK_LEAD" + - "TOTAL_CLICK_SIGNUP" + - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_CONVERSIONS" + - "TOTAL_CUSTOM" + - "TOTAL_ENGAGEMENT" + - "TOTAL_ENGAGEMENT_CHECKOUT" + - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_ENGAGEMENT_LEAD" + - "TOTAL_ENGAGEMENT_SIGNUP" + - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT" + - "TOTAL_IMPRESSION_FREQUENCY" + - "TOTAL_IMPRESSION_USER" + - "TOTAL_LEAD" + - "TOTAL_OFFLINE_CHECKOUT" + - "TOTAL_PAGE_VISIT" + - "TOTAL_REPIN_RATE" + - "TOTAL_SIGNUP" + - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_VIDEO_3SEC_VIEWS" + - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND" + - "TOTAL_VIDEO_MRC_VIEWS" + - "TOTAL_VIDEO_P0_COMBINED" + - "TOTAL_VIDEO_P100_COMPLETE" + - "TOTAL_VIDEO_P25_COMBINED" + - "TOTAL_VIDEO_P50_COMBINED" + - "TOTAL_VIDEO_P75_COMBINED" + - "TOTAL_VIDEO_P95_COMBINED" + - "TOTAL_VIEW_ADD_TO_CART" + - "TOTAL_VIEW_CHECKOUT" + - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_VIEW_LEAD" + - "TOTAL_VIEW_SIGNUP" + - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_WEB_CHECKOUT" + - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_WEB_CLICK_CHECKOUT" + - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_WEB_ENGAGEMENT_CHECKOUT" + - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "TOTAL_WEB_SESSIONS" + - "TOTAL_WEB_VIEW_CHECKOUT" + - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR" + - "VIDEO_3SEC_VIEWS_2" + - "VIDEO_LENGTH" + - "VIDEO_MRC_VIEWS_2" + - "VIDEO_P0_COMBINED_2" + - "VIDEO_P100_COMPLETE_2" + - "VIDEO_P25_COMBINED_2" + - "VIDEO_P50_COMBINED_2" + - "VIDEO_P75_COMBINED_2" + - "VIDEO_P95_COMBINED_2" + - "WEB_CHECKOUT_COST_PER_ACTION" + - "WEB_CHECKOUT_ROAS" + - "WEB_SESSIONS_1" + - "WEB_SESSIONS_2" + click_window_days: + title: "Click window days" + description: "Number of days to use as the conversion attribution window for a pin click action." + default: 30 + enum: [0, 1, 7, 14, 30, 60] + type: integer + order: 4 + engagement_window_days: + title: "Engagement window days" + description: "Number of days to use as the conversion attribution window for an engagement action." + default: [30] + enum: [0, 1, 7, 14, 30, 60] + type: integer + order: 5 + view_window_days: + title: "View window days" + description: "Number of days to use as the conversion attribution window for a view action." + default: [30] + enum: [0, 1, 7, 14, 30, 60] + type: integer + order: 6 + conversion_report_time: + title: "Conversion report time" + description: "The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.." + default: "TIME_OF_AD_ACTION" + enum: ["TIME_OF_AD_ACTION", "TIME_OF_CONVERSION"] + type: string + order: 7 + attribution_types: + title: "Attribution types" + description: "List of types of attribution for the conversion report" + default: ["INDIVIDUAL", "HOUSEHOLD"] + type: array + items: + title: "ValidEnums" + description: "An enumeration." + enum: ["INDIVIDUAL", "HOUSEHOLD"] + order: 8 + start_date: + type: string + title: "Start Date" + description: "A date in the format YYYY-MM-DD. If you have not set a date, it would be defaulted to latest allowed date by report api (913 days from today)." + format: date + pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + pattern_descriptor: "YYYY-MM-DD" + examples: ["2022-07-28"] + order: 9 + advanced_auth: + auth_flow_type: "oauth2.0" + predicate_key: ["credentials", "auth_method"] + predicate_value: "oauth2.0" + oauth_config_specification: + complete_oauth_output_specification: + type: object + additionalProperties: false + properties: + refresh_token: + type: string + path_in_connector_config: ["credentials", "refresh_token"] + complete_oauth_server_input_specification: + type: object + additionalProperties: false + properties: + client_id: + type: string + client_secret: + type: string + complete_oauth_server_output_specification: + type: object + additionalProperties: false + properties: + client_id: + type: string + path_in_connector_config: ["credentials", "client_id"] + client_secret: + type: string + path_in_connector_config: ["credentials", "client_secret"] + +streams: + # Full refresh streams + - "#/definitions/boards_stream" + - "#/definitions/catalogs_stream" + - "#/definitions/catalogs_feeds_stream" + - "#/definitions/catalogs_product_groups_stream" + - "#/definitions/ad_accounts_stream" + - "#/definitions/board_sections_stream" + - "#/definitions/board_pins_stream" + - "#/definitions/board_section_pins_stream" + - "#/definitions/audiences_stream" + - "#/definitions/keywords_stream" + - "#/definitions/conversion_tags_stream" + - "#/definitions/customer_lists_stream" + + # Semi-Incremental streams + - "#/definitions/campaigns_stream" + - "#/definitions/ad_groups_stream" + - "#/definitions/ads_stream" + + # Analytics streams + - "#/definitions/user_account_analytics_stream" + - "#/definitions/ad_account_analytics_stream" + - "#/definitions/campaign_analytics_stream" + - "#/definitions/ad_group_analytics_stream" + - "#/definitions/ad_analytics_stream" + +check: + type: CheckStream + stream_names: + - boards diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_account_analytics.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_account_analytics.json deleted file mode 100644 index 835aced014d5..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_account_analytics.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "DATE": { - "description": "Date of the data entry", - "type": ["null", "string"], - "format": "date" - }, - "ADVERTISER_ID": { - "description": "Unique identifier for the advertiser", - "type": ["string"] - }, - "AD_ACCOUNT_ID": { - "description": "Unique identifier for the ad account", - "type": ["string"] - }, - "AD_ID": { - "description": "Unique identifier for the ad", - "type": ["null", "string"] - }, - "AD_GROUP_ENTITY_STATUS": { - "description": "Status of the ad group entity", - "type": ["null", "string"] - }, - "AD_GROUP_ID": { - "description": "Unique identifier for the ad group", - "type": ["null", "string"] - }, - "CAMPAIGN_DAILY_SPEND_CAP": { - "description": "Daily spend cap set for the campaign", - "type": ["null", "number"] - }, - "CAMPAIGN_ENTITY_STATUS": { - "description": "Status of the campaign entity", - "type": ["null", "number"] - }, - "CAMPAIGN_ID": { - "description": "Unique identifier for the campaign", - "type": ["null", "number"] - }, - "CAMPAIGN_LIFETIME_SPEND_CAP": { - "description": "Lifetime spend cap set for the campaign", - "type": ["null", "number"] - }, - "CAMPAIGN_NAME": { - "description": "Name of the campaign", - "type": ["null", "string"] - }, - "CHECKOUT_ROAS": { - "description": "Return on ad spend for checkout actions", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1": { - "description": "Click-through rate related to specific actions", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1_GROSS": { - "description": "Gross click-through rate related to specific actions", - "type": ["null", "number"] - }, - "CLICKTHROUGH_2": { - "description": "Secondary click-through rate related to specific actions", - "type": ["null", "number"] - }, - "CPC_IN_MICRO_DOLLAR": { - "description": "Cost per click in micro dollars", - "type": ["null", "number"] - }, - "CPM_IN_DOLLAR": { - "description": "Cost per mille in dollars", - "type": ["null", "number"] - }, - "CPM_IN_MICRO_DOLLAR": { - "description": "Cost per mille in micro dollars", - "type": ["null", "number"] - }, - "CTR": { - "description": "Click-through rate", - "type": ["null", "number"] - }, - "CTR_2": { - "description": "Secondary click-through rate", - "type": ["null", "number"] - }, - "ECPCV_IN_DOLLAR": { - "description": "Effective cost per completed view in dollars", - "type": ["null", "number"] - }, - "ECPCV_P95_IN_DOLLAR": { - "description": "95th percentile effective cost per completed view in dollars", - "type": ["null", "number"] - }, - "ECPC_IN_DOLLAR": { - "description": "Effective cost per click in dollars", - "type": ["null", "number"] - }, - "ECPC_IN_MICRO_DOLLAR": { - "description": "Effective cost per click in micro dollars", - "type": ["null", "number"] - }, - "ECPE_IN_DOLLAR": { - "description": "Effective cost per engagement in dollars", - "type": ["null", "number"] - }, - "ECPM_IN_MICRO_DOLLAR": { - "description": "Effective cost per mille in micro dollars", - "type": ["null", "number"] - }, - "ECPV_IN_DOLLAR": { - "description": "Effective cost per view in dollars", - "type": ["null", "number"] - }, - "ECTR": { - "description": "Effective click-through rate", - "type": ["null", "number"] - }, - "EENGAGEMENT_RATE": { - "description": "Effective engagement rate", - "type": ["null", "number"] - }, - "ENGAGEMENT_1": { - "description": "Engagement rate related to specific actions", - "type": ["null", "number"] - }, - "ENGAGEMENT_2": { - "description": "Secondary engagement rate related to specific actions", - "type": ["null", "number"] - }, - "ENGAGEMENT_RATE": { - "description": "Overall engagement rate", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_1": { - "description": "Product tag visit rate related to specific actions", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_2": { - "description": "Secondary product tag visit rate related to specific actions", - "type": ["null", "number"] - }, - "IMPRESSION_1": { - "description": "Impression rate related to specific actions", - "type": ["null", "number"] - }, - "IMPRESSION_1_GROSS": { - "description": "Gross impression rate related to specific actions", - "type": ["null", "number"] - }, - "IMPRESSION_2": { - "description": "Secondary impression rate related to specific actions", - "type": ["null", "number"] - }, - "INAPP_CHECKOUT_COST_PER_ACTION": { - "description": "Cost per in-app checkout action", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_1": { - "description": "Outbound click rate related to specific actions", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_2": { - "description": "Secondary outbound click rate related to specific actions", - "type": ["null", "number"] - }, - "PAGE_VISIT_COST_PER_ACTION": { - "description": "Cost per page visit action", - "type": ["null", "number"] - }, - "PAGE_VISIT_ROAS": { - "description": "Return on ad spend for page visit actions", - "type": ["null", "number"] - }, - "PAID_IMPRESSION": { - "description": "Number of paid impressions", - "type": ["null", "number"] - }, - "PIN_ID": { - "description": "Unique identifier for the pin", - "type": ["null", "number"] - }, - "PIN_PROMOTION_ID": { - "description": "Unique identifier for the promoted pin", - "type": ["null", "number"] - }, - "REPIN_1": { - "description": "Repinned rate related to specific actions", - "type": ["null", "number"] - }, - "REPIN_2": { - "description": "Secondary repinned rate related to specific actions", - "type": ["null", "number"] - }, - "REPIN_RATE": { - "description": "Overall repin rate", - "type": ["null", "number"] - }, - "SPEND_IN_DOLLAR": { - "description": "Total spend in dollars", - "type": ["null", "number"] - }, - "SPEND_IN_MICRO_DOLLAR": { - "description": "Total spend in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT": { - "description": "Total number of checkout actions", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of checkout actions in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_CLICKTHROUGH": { - "description": "Total number of click-through actions", - "type": ["null", "number"] - }, - "TOTAL_CLICK_ADD_TO_CART": { - "description": "Total number of click actions leading to adding to cart", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT": { - "description": "Total number of click actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of click actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_CLICK_LEAD": { - "description": "Total number of click actions leading to lead generation", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP": { - "description": "Total number of click actions leading to signups", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of click actions leading to signups in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_CONVERSIONS": { - "description": "Total number of conversions", - "type": ["null", "number"] - }, - "TOTAL_CUSTOM": { - "description": "Total number of custom actions", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT": { - "description": "Total number of engagement actions", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT": { - "description": "Total number of engagement actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of engagement actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_LEAD": { - "description": "Total number of engagement actions leading to lead generation", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP": { - "description": "Total number of engagement actions leading to signups", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of engagement actions leading to signups in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": { - "description": "Total number of product tag visits", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_FREQUENCY": { - "description": "Total impression frequency", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_USER": { - "description": "Total number of users reached through impressions", - "type": ["null", "number"] - }, - "TOTAL_LEAD": { - "description": "Total number of lead actions", - "type": ["null", "number"] - }, - "TOTAL_OFFLINE_CHECKOUT": { - "description": "Total number of offline checkout actions", - "type": ["null", "number"] - }, - "TOTAL_PAGE_VISIT": { - "description": "Total number of page visit actions", - "type": ["null", "number"] - }, - "TOTAL_REPIN_RATE": { - "description": "Overall repin rate", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP": { - "description": "Total number of signup actions", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of signup actions in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_3SEC_VIEWS": { - "description": "Total number of 3-second video views", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": { - "description": "Average watch time for videos in seconds", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_MRC_VIEWS": { - "description": "Total number of MRC video views", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P0_COMBINED": { - "description": "Total video play-through rate", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P100_COMPLETE": { - "description": "Total completion rate for videos", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P25_COMBINED": { - "description": "Total 25% completion rate for videos", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P50_COMBINED": { - "description": "Total 50% completion rate for videos", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P75_COMBINED": { - "description": "Total 75% completion rate for videos", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P95_COMBINED": { - "description": "Total 95% completion rate for videos", - "type": ["null", "number"] - }, - "TOTAL_VIEW_ADD_TO_CART": { - "description": "Total view actions leading to adding to cart", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT": { - "description": "Total view actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of view actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_VIEW_LEAD": { - "description": "Total view actions leading to lead generation", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP": { - "description": "Total view actions leading to signups", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of view actions leading to signups in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT": { - "description": "Total number of web checkout actions", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web checkout actions in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT": { - "description": "Total number of web click actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web click actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT": { - "description": "Total number of web engagement actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web engagement actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "TOTAL_WEB_SESSIONS": { - "description": "Total number of web sessions", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT": { - "description": "Total number of web view actions leading to checkout", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web view actions leading to checkout in micro dollars", - "type": ["null", "number"] - }, - "VIDEO_3SEC_VIEWS_2": { - "description": "Number of 3-second video views related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_LENGTH": { - "description": "Length of the video", - "type": ["null", "number"] - }, - "VIDEO_MRC_VIEWS_2": { - "description": "Number of MRC video views related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P0_COMBINED_2": { - "description": "Play-through rate of videos related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P100_COMPLETE_2": { - "description": "Completion rate of videos related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P25_COMBINED_2": { - "description": "25% completion rate of videos related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P50_COMBINED_2": { - "description": "50% completion rate of videos related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P75_COMBINED_2": { - "description": "75% completion rate of videos related to specific actions", - "type": ["null", "number"] - }, - "VIDEO_P95_COMBINED_2": { - "description": "95% completion rate of videos related to specific actions", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_COST_PER_ACTION": { - "description": "Cost per web checkout action", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_ROAS": { - "description": "Return on ad spend for web checkout actions", - "type": ["null", "number"] - }, - "WEB_SESSIONS_1": { - "description": "Number of web sessions related to specific actions", - "type": ["null", "number"] - }, - "WEB_SESSIONS_2": { - "description": "Secondary number of web sessions related to specific actions", - "type": ["null", "number"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_accounts.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_accounts.json deleted file mode 100644 index 652f6b5a2c15..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_accounts.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "id": { - "description": "Unique identifier for the ad account", - "type": ["null", "string"] - }, - "name": { - "description": "The name of the ad account", - "type": ["null", "string"] - }, - "owner": { - "description": "Details of the ad account owner", - "type": ["null", "object"], - "properties": { - "id": { - "description": "Unique identifier of the owner", - "type": ["null", "string"] - }, - "username": { - "description": "Username of the owner", - "type": ["null", "string"] - } - } - }, - "country": { - "description": "The country associated with the ad account", - "type": ["null", "string"] - }, - "currency": { - "description": "The currency used for billing in the ad account", - "type": ["null", "string"] - }, - "updated_time": { - "description": "The timestamp showing when the ad account was last updated", - "type": ["null", "integer"] - }, - "created_time": { - "description": "The timestamp showing when the ad account was created", - "type": ["null", "integer"] - }, - "permissions": { - "description": "Permissions assigned to the ad account", - "type": ["null", "array"], - "items": { - "description": "Individual permissions granted", - "type": ["null", "string"] - } - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_analytics.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_analytics.json deleted file mode 100644 index 5c26aa984b19..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_analytics.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "DATE": { - "description": "The date for the data entry.", - "type": ["null", "string"], - "format": "date" - }, - "ADVERTISER_ID": { - "description": "The unique identifier of the advertiser.", - "type": ["string"] - }, - "AD_ACCOUNT_ID": { - "description": "The unique identifier of the ad account.", - "type": ["string"] - }, - "AD_ID": { - "description": "The unique identifier of the ad.", - "type": ["null", "string"] - }, - "AD_GROUP_ENTITY_STATUS": { - "description": "The status of the ad group entity.", - "type": ["null", "string"] - }, - "AD_GROUP_ID": { - "description": "The unique identifier of the ad group.", - "type": ["null", "string"] - }, - "CAMPAIGN_DAILY_SPEND_CAP": { - "description": "The daily spend limit set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_ENTITY_STATUS": { - "description": "The status of the campaign entity.", - "type": ["null", "number"] - }, - "CAMPAIGN_ID": { - "description": "The unique identifier of the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_LIFETIME_SPEND_CAP": { - "description": "The total spend limit set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_NAME": { - "description": "The name of the campaign.", - "type": ["null", "string"] - }, - "CHECKOUT_ROAS": { - "description": "Return on ad spend for checkout conversions.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1": { - "description": "Click-through conversions type 1.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1_GROSS": { - "description": "Gross click-through conversions type 1.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_2": { - "description": "Click-through conversions type 2.", - "type": ["null", "number"] - }, - "CPC_IN_MICRO_DOLLAR": { - "description": "Cost per click in micro dollars.", - "type": ["null", "number"] - }, - "CPM_IN_DOLLAR": { - "description": "Cost per mille in dollars.", - "type": ["null", "number"] - }, - "CPM_IN_MICRO_DOLLAR": { - "description": "Cost per mille in micro dollars.", - "type": ["null", "number"] - }, - "CTR": { - "description": "Click-through rate.", - "type": ["null", "number"] - }, - "CTR_2": { - "description": "Click-through rate 2.", - "type": ["null", "number"] - }, - "ECPCV_IN_DOLLAR": { - "description": "Effective cost per click view in dollars.", - "type": ["null", "number"] - }, - "ECPCV_P95_IN_DOLLAR": { - "description": "Effective cost per click view percentile 95 in dollars.", - "type": ["null", "number"] - }, - "ECPC_IN_DOLLAR": { - "description": "Effective cost per click in dollars.", - "type": ["null", "number"] - }, - "ECPC_IN_MICRO_DOLLAR": { - "description": "Effective cost per click in micro dollars.", - "type": ["null", "number"] - }, - "ECPE_IN_DOLLAR": { - "description": "Effective cost per engagement in dollars.", - "type": ["null", "number"] - }, - "ECPM_IN_MICRO_DOLLAR": { - "description": "Effective cost per mille in micro dollars.", - "type": ["null", "number"] - }, - "ECPV_IN_DOLLAR": { - "description": "Effective cost per view in dollar.", - "type": ["null", "number"] - }, - "ECTR": { - "description": "Effective click-through rate.", - "type": ["null", "number"] - }, - "EENGAGEMENT_RATE": { - "description": "Effective engagement rate.", - "type": ["null", "number"] - }, - "ENGAGEMENT_1": { - "description": "Engagement type 1.", - "type": ["null", "number"] - }, - "ENGAGEMENT_2": { - "description": "Engagement type 2.", - "type": ["null", "number"] - }, - "ENGAGEMENT_RATE": { - "description": "Engagement rate.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_1": { - "description": "Idea pin product tag visit type 1.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_2": { - "description": "Idea pin product tag visit type 2.", - "type": ["null", "number"] - }, - "IMPRESSION_1": { - "description": "Impressions type 1.", - "type": ["null", "number"] - }, - "IMPRESSION_1_GROSS": { - "description": "Gross impressions type 1.", - "type": ["null", "number"] - }, - "IMPRESSION_2": { - "description": "Impressions type 2.", - "type": ["null", "number"] - }, - "INAPP_CHECKOUT_COST_PER_ACTION": { - "description": "In-app checkout cost per action.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_1": { - "description": "Outbound clicks type 1.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_2": { - "description": "Outbound clicks type 2.", - "type": ["null", "number"] - }, - "PAGE_VISIT_COST_PER_ACTION": { - "description": "Page visit cost per action.", - "type": ["null", "number"] - }, - "PAGE_VISIT_ROAS": { - "description": "Return on ad spend for page visits.", - "type": ["null", "number"] - }, - "PAID_IMPRESSION": { - "description": "Paid impressions.", - "type": ["null", "number"] - }, - "PIN_ID": { - "description": "The unique identifier of the pin.", - "type": ["null", "number"] - }, - "PIN_PROMOTION_ID": { - "description": "The unique identifier of the pin promotion.", - "type": ["null", "number"] - }, - "REPIN_1": { - "description": "Repins type 1.", - "type": ["null", "number"] - }, - "REPIN_2": { - "description": "Repins type 2.", - "type": ["null", "number"] - }, - "REPIN_RATE": { - "description": "Repins rate.", - "type": ["null", "number"] - }, - "SPEND_IN_DOLLAR": { - "description": "Total spend in dollars.", - "type": ["null", "number"] - }, - "SPEND_IN_MICRO_DOLLAR": { - "description": "Total spend in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT": { - "description": "Total checkout conversions.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CLICKTHROUGH": { - "description": "Total click-through conversions.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_ADD_TO_CART": { - "description": "Total clicks add to cart.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT": { - "description": "Total clicks checkout.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total clicks checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_LEAD": { - "description": "Total clicks lead.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP": { - "description": "Total clicks sign up.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total clicks sign up value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CONVERSIONS": { - "description": "Total conversions.", - "type": ["null", "number"] - }, - "TOTAL_CUSTOM": { - "description": "Total custom actions.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT": { - "description": "Total engagements.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT": { - "description": "Total engagements checkout.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total engagements checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_LEAD": { - "description": "Total engagements lead.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP": { - "description": "Total engagements sign up.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total engagements sign up value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": { - "description": "Total idea pin product tag visits.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_FREQUENCY": { - "description": "Total impressions frequency.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_USER": { - "description": "Total impressions per user.", - "type": ["null", "number"] - }, - "TOTAL_LEAD": { - "description": "Total leads.", - "type": ["null", "number"] - }, - "TOTAL_OFFLINE_CHECKOUT": { - "description": "Total offline checkout conversions.", - "type": ["null", "number"] - }, - "TOTAL_PAGE_VISIT": { - "description": "Total page visits.", - "type": ["null", "number"] - }, - "TOTAL_REPIN_RATE": { - "description": "Total repin rate.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP": { - "description": "Total signups.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total sign up value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_3SEC_VIEWS": { - "description": "Total video 3-second views.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": { - "description": "Total average watch time for videos in seconds.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_MRC_VIEWS": { - "description": "Total video MRC views.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P0_COMBINED": { - "description": "Total video P0 combined.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P100_COMPLETE": { - "description": "Total video P100 complete views.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P25_COMBINED": { - "description": "Total video P25 combined.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P50_COMBINED": { - "description": "Total video P50 combined.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P75_COMBINED": { - "description": "Total video P75 combined.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P95_COMBINED": { - "description": "Total video P95 combined.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_ADD_TO_CART": { - "description": "Total view add to cart conversions.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT": { - "description": "Total view checkouts.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total view checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_LEAD": { - "description": "Total view leads.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP": { - "description": "Total view signups.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total view signup value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT": { - "description": "Total web checkouts.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total web checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT": { - "description": "Total web click checkouts.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total web click checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT": { - "description": "Total web engagements checkout.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total web engagements checkout value in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_SESSIONS": { - "description": "Total web sessions.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT": { - "description": "Total web view checkouts.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total web view checkout value in micro dollars.", - "type": ["null", "number"] - }, - "VIDEO_3SEC_VIEWS_2": { - "description": "Video 3-second views type 2.", - "type": ["null", "number"] - }, - "VIDEO_LENGTH": { - "description": "Length of the video.", - "type": ["null", "number"] - }, - "VIDEO_MRC_VIEWS_2": { - "description": "Video MRC views type 2.", - "type": ["null", "number"] - }, - "VIDEO_P0_COMBINED_2": { - "description": "Video P0 combined type 2.", - "type": ["null", "number"] - }, - "VIDEO_P100_COMPLETE_2": { - "description": "Video P100 complete views type 2.", - "type": ["null", "number"] - }, - "VIDEO_P25_COMBINED_2": { - "description": "Video P25 combined type 2.", - "type": ["null", "number"] - }, - "VIDEO_P50_COMBINED_2": { - "description": "Video P50 combined type 2.", - "type": ["null", "number"] - }, - "VIDEO_P75_COMBINED_2": { - "description": "Video P75 combined type 2.", - "type": ["null", "number"] - }, - "VIDEO_P95_COMBINED_2": { - "description": "Video P95 combined type 2.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_COST_PER_ACTION": { - "description": "Web checkout cost per action.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_ROAS": { - "description": "Return on ad spend for web checkouts.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_1": { - "description": "Web sessions type 1.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_2": { - "description": "Web sessions type 2.", - "type": ["null", "number"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_group_analytics.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_group_analytics.json deleted file mode 100644 index ce938b25450c..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_group_analytics.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "DATE": { - "description": "The date the data was collected.", - "type": ["null", "string"], - "format": "date" - }, - "ADVERTISER_ID": { - "description": "The ID of the advertiser associated with the ad group analytics data.", - "type": ["string"] - }, - "AD_ACCOUNT_ID": { - "description": "The ID of the ad account associated with the ad group analytics data.", - "type": ["string"] - }, - "AD_ID": { - "description": "The ID of the ad.", - "type": ["null", "string"] - }, - "AD_GROUP_ENTITY_STATUS": { - "description": "The status of the ad group entity.", - "type": ["null", "string"] - }, - "AD_GROUP_ID": { - "description": "The ID of the ad group.", - "type": ["null", "string"] - }, - "CAMPAIGN_DAILY_SPEND_CAP": { - "description": "The daily spend cap set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_ENTITY_STATUS": { - "description": "The status of the campaign entity.", - "type": ["null", "number"] - }, - "CAMPAIGN_ID": { - "description": "The ID of the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_LIFETIME_SPEND_CAP": { - "description": "The lifetime spend cap set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_NAME": { - "description": "The name of the campaign.", - "type": ["null", "string"] - }, - "CHECKOUT_ROAS": { - "description": "Return on ad spend for checkout actions.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1": { - "description": "Number of click-throughs type 1.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1_GROSS": { - "description": "Gross count of click-throughs type 1.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_2": { - "description": "Number of click-throughs type 2.", - "type": ["null", "number"] - }, - "CPC_IN_MICRO_DOLLAR": { - "description": "Cost per click in micro dollar.", - "type": ["null", "number"] - }, - "CPM_IN_DOLLAR": { - "description": "Cost per mille in dollar.", - "type": ["null", "number"] - }, - "CPM_IN_MICRO_DOLLAR": { - "description": "Cost per mille in micro dollar.", - "type": ["null", "number"] - }, - "CTR": { - "description": "Click-through rate.", - "type": ["null", "number"] - }, - "CTR_2": { - "description": "Click-through rate type 2.", - "type": ["null", "number"] - }, - "ECPCV_IN_DOLLAR": { - "description": "Effective cost per converted view in dollar.", - "type": ["null", "number"] - }, - "ECPCV_P95_IN_DOLLAR": { - "description": "Effective cost per converted view at 95th percentile in dollar.", - "type": ["null", "number"] - }, - "ECPC_IN_DOLLAR": { - "description": "Effective cost per click in dollar.", - "type": ["null", "number"] - }, - "ECPC_IN_MICRO_DOLLAR": { - "description": "Effective cost per click in micro dollar.", - "type": ["null", "number"] - }, - "ECPE_IN_DOLLAR": { - "description": "Effective cost per engagement in dollar.", - "type": ["null", "number"] - }, - "ECPM_IN_MICRO_DOLLAR": { - "description": "Effective cost per mille in micro dollar.", - "type": ["null", "number"] - }, - "ECPV_IN_DOLLAR": { - "description": "Effective cost per view in dollar.", - "type": ["null", "number"] - }, - "ECTR": { - "description": "Effective click-through rate.", - "type": ["null", "number"] - }, - "EENGAGEMENT_RATE": { - "description": "Effective engagement rate.", - "type": ["null", "number"] - }, - "ENGAGEMENT_1": { - "description": "Number of engagements type 1.", - "type": ["null", "number"] - }, - "ENGAGEMENT_2": { - "description": "Number of engagements type 2.", - "type": ["null", "number"] - }, - "ENGAGEMENT_RATE": { - "description": "Engagement rate.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_1": { - "description": "Number of visits to Idea Pin product tags type 1.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_2": { - "description": "Number of visits to Idea Pin product tags type 2.", - "type": ["null", "number"] - }, - "IMPRESSION_1": { - "description": "Number of impressions type 1.", - "type": ["null", "number"] - }, - "IMPRESSION_1_GROSS": { - "description": "Gross count of impressions type 1.", - "type": ["null", "number"] - }, - "IMPRESSION_2": { - "description": "Number of impressions type 2.", - "type": ["null", "number"] - }, - "INAPP_CHECKOUT_COST_PER_ACTION": { - "description": "In-app checkout cost per action.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_1": { - "description": "Number of outbound clicks type 1.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_2": { - "description": "Number of outbound clicks type 2.", - "type": ["null", "number"] - }, - "PAGE_VISIT_COST_PER_ACTION": { - "description": "Page visit cost per action.", - "type": ["null", "number"] - }, - "PAGE_VISIT_ROAS": { - "description": "Return on ad spend for page visits.", - "type": ["null", "number"] - }, - "PAID_IMPRESSION": { - "description": "Number of paid impressions.", - "type": ["null", "number"] - }, - "PIN_ID": { - "description": "The ID of the pin.", - "type": ["null", "number"] - }, - "PIN_PROMOTION_ID": { - "description": "The ID of the pin promotion.", - "type": ["null", "number"] - }, - "REPIN_1": { - "description": "Number of repins type 1.", - "type": ["null", "number"] - }, - "REPIN_2": { - "description": "Number of repins type 2.", - "type": ["null", "number"] - }, - "REPIN_RATE": { - "description": "Repins rate.", - "type": ["null", "number"] - }, - "SPEND_IN_DOLLAR": { - "description": "Total spend in dollar.", - "type": ["null", "number"] - }, - "SPEND_IN_MICRO_DOLLAR": { - "description": "Total spend in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT": { - "description": "Total number of checkouts.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of checkouts in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_CLICKTHROUGH": { - "description": "Total number of click-throughs.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_ADD_TO_CART": { - "description": "Total number of clicks leading to add to cart action.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT": { - "description": "Total number of clicks leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of clicks leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_LEAD": { - "description": "Total number of clicks leading to lead action.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP": { - "description": "Total number of clicks leading to signup action.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of clicks leading to signup in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_CONVERSIONS": { - "description": "Total number of conversions.", - "type": ["null", "number"] - }, - "TOTAL_CUSTOM": { - "description": "Total number of custom actions.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT": { - "description": "Total number of engagements.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT": { - "description": "Total number of engagements leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of engagements leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_LEAD": { - "description": "Total number of engagements leading to lead action.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP": { - "description": "Total number of engagements leading to signup action.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of engagements leading to signup in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": { - "description": "Total visits to Idea Pin product tags.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_FREQUENCY": { - "description": "Total impression frequency.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_USER": { - "description": "Total impressions by users.", - "type": ["null", "number"] - }, - "TOTAL_LEAD": { - "description": "Total number of leads.", - "type": ["null", "number"] - }, - "TOTAL_OFFLINE_CHECKOUT": { - "description": "Total offline checkouts.", - "type": ["null", "number"] - }, - "TOTAL_PAGE_VISIT": { - "description": "Total page visits.", - "type": ["null", "number"] - }, - "TOTAL_REPIN_RATE": { - "description": "Total repins rate.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP": { - "description": "Total number of signups.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of signups in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_3SEC_VIEWS": { - "description": "Total number of video views at 3 seconds.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": { - "description": "Average watch time of videos in seconds.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_MRC_VIEWS": { - "description": "Total number of video MRC views.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P0_COMBINED": { - "description": "Total combined P0 video plays.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P100_COMPLETE": { - "description": "Total completion of videos to 100%.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P25_COMBINED": { - "description": "Total combined P25 video plays.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P50_COMBINED": { - "description": "Total combined P50 video plays.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P75_COMBINED": { - "description": "Total combined P75 video plays.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P95_COMBINED": { - "description": "Total combined P95 video plays.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_ADD_TO_CART": { - "description": "Total views leading to add to cart action.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT": { - "description": "Total views leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of views leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_LEAD": { - "description": "Total views leading to lead action.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP": { - "description": "Total views leading to signup action.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of views leading to signup in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT": { - "description": "Total web checkouts.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web checkouts in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT": { - "description": "Total web clicks leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web clicks leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT": { - "description": "Total web engagements leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web engagements leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "TOTAL_WEB_SESSIONS": { - "description": "Total number of web sessions.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT": { - "description": "Total web views leading to checkout action.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "Total value of web views leading to checkout in micro dollar.", - "type": ["null", "number"] - }, - "VIDEO_3SEC_VIEWS_2": { - "description": "Number of video views at 3 seconds type 2.", - "type": ["null", "number"] - }, - "VIDEO_LENGTH": { - "description": "Length of the video.", - "type": ["null", "number"] - }, - "VIDEO_MRC_VIEWS_2": { - "description": "Number of video MRC views type 2.", - "type": ["null", "number"] - }, - "VIDEO_P0_COMBINED_2": { - "description": "Combined P0 video plays type 2.", - "type": ["null", "number"] - }, - "VIDEO_P100_COMPLETE_2": { - "description": "Completion of videos to 100% type 2.", - "type": ["null", "number"] - }, - "VIDEO_P25_COMBINED_2": { - "description": "Combined P25 video plays type 2.", - "type": ["null", "number"] - }, - "VIDEO_P50_COMBINED_2": { - "description": "Combined P50 video plays type 2.", - "type": ["null", "number"] - }, - "VIDEO_P75_COMBINED_2": { - "description": "Combined P75 video plays type 2.", - "type": ["null", "number"] - }, - "VIDEO_P95_COMBINED_2": { - "description": "Combined P95 video plays type 2.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_COST_PER_ACTION": { - "description": "Web checkout cost per action.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_ROAS": { - "description": "Return on ad spend for web checkouts.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_1": { - "description": "Number of web sessions type 1.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_2": { - "description": "Number of web sessions type 2.", - "type": ["null", "number"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_groups.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_groups.json deleted file mode 100644 index b45fddce1be1..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ad_groups.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { - "description": "The name of the ad group.", - "type": ["null", "string"] - }, - "status": { - "description": "The current status of the ad group.", - "type": ["null", "string"] - }, - "budget_in_micro_currency": { - "description": "The budget amount in micro currency for the ad group.", - "type": ["null", "number"] - }, - "bid_in_micro_currency": { - "description": "The bid amount in micro currency for the ad group.", - "type": ["null", "number"] - }, - "budget_type": { - "description": "The type of budget set for the ad group.", - "type": ["null", "string"] - }, - "start_time": { - "description": "The start time for the ad group to begin running.", - "type": ["null", "number"] - }, - "end_time": { - "description": "The end time for the ad group to run.", - "type": ["null", "number"] - }, - "targeting_spec": { - "description": "The targeting specifications for the ad group.", - "type": ["null", "object"], - "properties": { - "property1": { - "description": "Description of targeting property 1.", - "type": ["null", "array"], - "items": { - "description": "Description of item in property 1.", - "type": ["null", "string"] - } - }, - "property2": { - "description": "Description of targeting property 2.", - "type": ["null", "array"], - "items": { - "description": "Description of item in property 2.", - "type": ["null", "string"] - } - } - } - }, - "lifetime_frequency_cap": { - "description": "The maximum number of times a user can be shown the ad during its lifetime.", - "type": ["null", "number"] - }, - "tracking_urls": { - "description": "URLs for tracking different types of events for the ad group.", - "type": ["null", "object"], - "properties": { - "impression": { - "description": "URLs for impression tracking.", - "type": ["null", "array"], - "items": { - "description": "Description of impression tracking item.", - "type": ["null", "string"] - } - }, - "click": { - "description": "URLs for click tracking.", - "type": ["null", "array"], - "items": { - "description": "Description of click tracking item.", - "type": ["null", "string"] - } - }, - "engagement": { - "description": "URLs for engagement tracking.", - "type": ["null", "array"], - "items": { - "description": "Description of engagement tracking item.", - "type": ["null", "string"] - } - }, - "buyable_button": { - "description": "URLs for buyable button tracking.", - "type": ["null", "array"], - "items": { - "description": "Description of buyable button tracking item.", - "type": ["null", "string"] - } - }, - "audience_verification": { - "description": "URLs for audience verification tracking.", - "type": ["null", "array"], - "items": { - "description": "Description of audience verification tracking item.", - "type": ["null", "string"] - } - } - } - }, - "auto_targeting_enabled": { - "description": "Indicates if auto targeting is enabled for the ad group.", - "type": ["null", "boolean"] - }, - "placement_group": { - "description": "The group of placements where the ad group is shown.", - "type": ["null", "string"] - }, - "placement_traffic_type": { - "description": "The type of traffic the ad group targets.", - "type": ["null", "string"] - }, - "pacing_delivery_type": { - "description": "The delivery type pacing for the ad group.", - "type": ["null", "string"] - }, - "conversion_learning_mode_type": { - "description": "The learning mode type for conversion optimization.", - "type": ["null", "string"] - }, - "summary_status": { - "description": "A summary status of the ad group.", - "type": ["null", "string"] - }, - "feed_profile_id": { - "description": "The ID of the feed profile associated with the ad group.", - "type": ["null", "string"] - }, - "campaign_id": { - "description": "The ID of the campaign to which the ad group belongs.", - "type": ["null", "string"] - }, - "billable_event": { - "description": "The event for which the ad group is billed.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for the ad group.", - "type": ["null", "string"] - }, - "type": { - "description": "The type of the ad group.", - "type": ["null", "string"] - }, - "ad_account_id": { - "description": "The ID of the ad account associated with the ad group.", - "type": ["null", "string"] - }, - "created_time": { - "description": "The timestamp when the ad group was created.", - "type": ["null", "number"] - }, - "updated_time": { - "description": "The timestamp when the ad group was last updated.", - "type": ["null", "number"] - }, - "optimization_goal_metadata": { - "description": "Metadata related to optimization goals for the ad group.", - "type": ["null", "object"], - "properties": { - "conversion_tag_v3_goal_metadata": { - "description": "Metadata specific to conversion optimization goals.", - "type": ["null", "object"], - "properties": { - "attribution_windows": { - "description": "Different attribution windows for conversion events.", - "type": ["null", "object"], - "properties": { - "click_window_days": { - "description": "Number of days for click attribution window.", - "type": ["null", "integer"] - }, - "engagement_window_days": { - "description": "Number of days for engagement attribution window.", - "type": ["null", "integer"] - }, - "view_window_days": { - "description": "Number of days for view attribution window.", - "type": ["null", "integer"] - } - } - }, - "conversion_event": { - "description": "The conversion event being optimized for.", - "type": ["null", "string"] - }, - "conversion_tag_id": { - "description": "The ID of the conversion tag used for optimization.", - "type": ["null", "string"] - }, - "cpa_goal_value_in_micro_currency": { - "description": "The cost per action goal in micro currency.", - "type": ["null", "string"] - }, - "is_roas_optimized": { - "description": "Indicates if return on ad spend (ROAS) is optimized for.", - "type": ["null", "boolean"] - }, - "learning_mode_type": { - "description": "The learning mode type for conversion optimization.", - "type": ["null", "string"] - } - } - }, - "frequency_goal_metadata": { - "description": "Metadata related to frequency optimization goals.", - "type": ["null", "object"], - "properties": { - "frequency": { - "description": "The desired frequency of ad views.", - "type": ["null", "integer"] - }, - "timerange": { - "description": "The time range considered for frequency capping.", - "type": ["null", "string"] - } - } - }, - "scrollup_goal_metadata": { - "description": "Metadata related to scroll-up optimization goals.", - "type": ["null", "object"], - "properties": { - "scrollup_goal_value_in_micro_currency": { - "description": "The scroll-up goal value in micro currency.", - "type": ["null", "string"] - } - } - } - } - }, - "bid_strategy_type": { - "description": "The type of bid strategy used for the ad group.", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ads.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ads.json deleted file mode 100644 index cb7122e50bd2..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/ads.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "ad_group_id": { - "description": "The ID of the ad group to which the ad belongs.", - "type": ["null", "string"] - }, - "android_deep_link": { - "description": "The deep link URL for Android devices.", - "type": ["null", "string"] - }, - "carousel_android_deep_links": { - "description": "URLs that deep link Android users to specific content within the carousel ad.", - "type": ["null", "array"], - "items": { - "description": "The deep link URLs for individual carousel items on Android devices.", - "type": ["null", "string"] - } - }, - "carousel_destination_urls": { - "description": "URLs that direct users to the landing pages of the advertised content.", - "type": ["null", "array"], - "items": { - "description": "The destination URLs for individual carousel items.", - "type": ["null", "string"] - } - }, - "carousel_ios_deep_links": { - "description": "URLs that deep link iOS users to specific content within the carousel ad.", - "type": ["null", "array"], - "items": { - "description": "The deep link URLs for individual carousel items on iOS devices.", - "type": ["null", "string"] - } - }, - "click_tracking_url": { - "description": "The URL for tracking clicks on the ad.", - "type": ["null", "string"] - }, - "creative_type": { - "description": "The type of creative used in the ad.", - "type": ["null", "string"] - }, - "destination_url": { - "description": "The main destination URL of the ad.", - "type": ["null", "string"] - }, - "ios_deep_link": { - "description": "The deep link URL for iOS devices.", - "type": ["null", "string"] - }, - "is_pin_deleted": { - "description": "A flag indicating if the ad is linked to a deleted pin.", - "type": ["null", "boolean"] - }, - "is_removable": { - "description": "A flag indicating if the ad is removable.", - "type": ["null", "boolean"] - }, - "name": { - "description": "The name or title of the ad.", - "type": ["null", "string"] - }, - "pin_id": { - "description": "The ID of the pin associated with the ad.", - "type": ["null", "string"] - }, - "status": { - "description": "The current status of the ad.", - "type": ["null", "string"] - }, - "tracking_urls": { - "description": "Various tracking URLs used to monitor user interactions with the ad.", - "type": ["null", "object"], - "properties": { - "impression": { - "description": "URL to track impressions of the ad.", - "type": ["null", "array"], - "items": { - "description": "Tracking URLs for ad impressions.", - "type": ["null", "string"] - } - }, - "click": { - "description": "URL to track clicks on the ad.", - "type": ["null", "array"], - "items": { - "description": "Tracking URLs for clicks on the ad.", - "type": ["null", "string"] - } - }, - "engagement": { - "description": "URL to track user engagements with the ad.", - "type": ["null", "array"], - "items": { - "description": "Tracking URLs for ad engagement.", - "type": ["null", "string"] - } - }, - "buyable_button": { - "description": "URL to track clicks on the buyable button in the ad.", - "type": ["null", "array"], - "items": { - "description": "Tracking URLs for buyable buttons.", - "type": ["null", "string"] - } - }, - "audience_verification": { - "description": "URL to track audience verification events.", - "type": ["null", "array"], - "items": { - "description": "Tracking URLs for audience verification.", - "type": ["null", "string"] - } - } - } - }, - "view_tracking_url": { - "description": "The URL for tracking views of the ad.", - "type": ["null", "string"] - }, - "lead_form_id": { - "description": "The ID of the lead form associated with the ad.", - "type": ["null", "string"] - }, - "ad_account_id": { - "description": "The ID of the ad account associated with the ad data.", - "type": ["null", "string"] - }, - "campaign_id": { - "description": "The ID of the campaign associated with the ad.", - "type": ["null", "string"] - }, - "collection_items_destination_url_template": { - "description": "The template URL for destination pages of collection items.", - "type": ["null", "string"] - }, - "created_time": { - "description": "The timestamp when the ad was created.", - "type": ["null", "integer"] - }, - "id": { - "description": "The unique ID of the ad.", - "type": ["null", "string"] - }, - "rejected_reasons": { - "description": "Reasons for rejecting the ad.", - "type": ["null", "array"], - "items": { - "description": "Reasons for rejection of the ad.", - "type": ["null", "string"] - } - }, - "rejection_labels": { - "description": "Labels applied to the ad when it is rejected.", - "type": ["null", "array"], - "items": { - "description": "Labels for the rejected ad.", - "type": ["null", "string"] - } - }, - "review_status": { - "description": "The review status of the ad.", - "type": ["null", "string"] - }, - "type": { - "description": "The type of the ad.", - "type": ["null", "string"] - }, - "updated_time": { - "description": "The timestamp when the ad was last updated.", - "type": ["null", "integer"] - }, - "summary_status": { - "description": "The summarized status of the ad.", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/audiences.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/audiences.json deleted file mode 100644 index 9f55df3859e7..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/audiences.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "ad_account_id": { - "description": "The unique identifier for the advertising account associated with the audience.", - "type": ["null", "string"] - }, - "id": { - "description": "Unique identifier for the audience.", - "type": ["null", "string"] - }, - "name": { - "description": "The name given to the audience for identification.", - "type": ["null", "string"] - }, - "audience_type": { - "description": "Type of audience data, such as website visitors, customer list, lookalike audience, etc.", - "type": ["null", "string"] - }, - "description": { - "description": "Detailed information about the audience criteria and characteristics.", - "type": ["null", "string"] - }, - "rule": { - "description": "Contains information about the rule/condition applied to filter audiences.", - "type": ["null", "object"], - "properties": { - "country": { - "description": "The country criteria set for the audience.", - "type": ["null", "string"] - }, - "customer_list_id": { - "description": "Identifier for the customer list used as a criterion for the audience.", - "type": ["null", "string"] - }, - "engagement_domain": { - "description": "The domain(s) used for engagement tracking purposes.", - "type": ["null", "array"], - "items": {} - }, - "engagement_type": { - "description": "The type of engagement tracked, such as clicks, likes, shares, etc.", - "type": ["null", "string"] - }, - "event": { - "description": "Specific event triggering engagement tracking.", - "type": ["null", "string"] - }, - "percentage": { - "description": "Percentage of similarity for lookalike audience criteria.", - "type": ["null", "integer"] - }, - "prefill": { - "description": "Option to automatically fill in missing data for the audience.", - "type": ["null", "boolean"] - }, - "retention_days": { - "description": "Number of days the audience data should be retained.", - "type": ["null", "integer"] - }, - "visitor_source_id": { - "description": "Identifier for the visitor source used as a criterion for the audience.", - "type": ["null", "string"] - }, - "engager_type": { - "description": "Type of audience engagement, like active engagers, passive viewers, etc.", - "type": ["null", "integer"] - }, - "ad_account_id": { - "description": "The unique identifier for the advertising account linked to the audience criteria.", - "type": ["null", "string"] - } - } - }, - "size": { - "description": "Estimated size of the audience based on the specified criteria.", - "type": ["null", "integer"] - }, - "status": { - "description": "Current status of the audience, like active, paused, deleted, etc.", - "type": ["null", "string"] - }, - "type": { - "description": "Type of audience data, such as saved audience, custom audience, etc.", - "type": ["null", "string"] - }, - "created_timestamp": { - "description": "Timestamp indicating when the audience was created.", - "type": ["null", "integer"] - }, - "updated_timestamp": { - "description": "Timestamp indicating when the audience data was last updated.", - "type": ["null", "integer"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_pins.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_pins.json deleted file mode 100644 index 6e6e021db26e..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_pins.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "id": { - "description": "The unique identifier of the pin.", - "type": ["null", "string"] - }, - "created_at": { - "description": "The date and time when the pin was created.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "creative_type": { - "description": "The type of creative content associated with the pin.", - "type": ["null", "string"] - }, - "is_standard": { - "description": "Indicates if the pin is a standard pin or a promoted pin.", - "type": ["null", "boolean"] - }, - "is_owner": { - "description": "Indicates if the current user is the owner of the pin.", - "type": ["null", "boolean"] - }, - "product_tags": { - "description": "Information about any product tags associated with the pin.", - "type": ["null", "array"], - "items": { - "description": "Individual product tag details.", - "type": ["null", "string"] - } - }, - "dominant_color": { - "description": "The dominant color extracted from the pin's image.", - "type": ["null", "string"] - }, - "parent_pin_id": { - "description": "The unique identifier of the parent pin if this pin is a repin.", - "type": ["null", "string"] - }, - "link": { - "description": "The URL link associated with the pin, if applicable.", - "type": ["null", "string"] - }, - "title": { - "description": "The title or headline associated with the pin.", - "type": ["null", "string"] - }, - "description": { - "description": "The textual description or caption associated with the pin.", - "type": ["null", "string"] - }, - "alt_text": { - "description": "Alternate text for the pin image, used for accessibility and SEO purposes.", - "type": ["null", "string"] - }, - "note": { - "description": "Any additional notes or comments added to the pin by users.", - "type": ["null", "string"] - }, - "board_id": { - "description": "The unique identifier of the board to which the pin belongs.", - "type": ["null", "string"] - }, - "board_section_id": { - "description": "The unique identifier of the section within the board where the pin is placed.", - "type": ["null", "string"] - }, - "board_owner": { - "description": "Information about the owner of the board to which the pin belongs.", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "username": { - "description": "The username of the board owner.", - "type": ["null", "string"] - } - } - }, - "media": { - "description": "Information about the media content associated with the pin.", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "media_type": { - "description": "The type of media content, e.g., image, video, or gif.", - "type": ["null", "string"] - } - } - }, - "pin_metrics": { - "description": "Metrics data related to the pin, such as views, likes, and shares.", - "type": ["null", "object"] - }, - "has_been_promoted": { - "description": "Indicates whether the pin has been promoted or sponsored.", - "type": ["null", "boolean"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_section_pins.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_section_pins.json deleted file mode 100644 index 2b6b47ee0b10..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_section_pins.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the pin.", - "type": ["null", "string"] - }, - "created_at": { - "description": "Date and time when the pin was created.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "link": { - "description": "URL link associated with the pin.", - "type": ["null", "string"] - }, - "title": { - "description": "Title or caption associated with the pin.", - "type": ["null", "string"] - }, - "description": { - "description": "Textual description of the pin content or context.", - "type": ["null", "string"] - }, - "alt_text": { - "description": "Alternate text describing the pin for accessibility purposes.", - "type": ["null", "string"] - }, - "board_id": { - "description": "Unique identifier for the board the pin belongs to.", - "type": ["null", "string"] - }, - "board_section_id": { - "description": "Unique identifier for the section within the board where the pin is categorized.", - "type": ["null", "string"] - }, - "board_owner": { - "description": "Details of the owner of the board the pins belong to", - "type": ["null", "object"], - "properties": { - "username": { - "description": "Username of the owner of the board.", - "type": ["null", "string"] - } - } - }, - "pin_metrics": { - "description": "Metrics or statistics related to the pin, such as views or saves.", - "type": ["null", "object"] - }, - "media": { - "description": "Media content associated with the pins", - "type": ["null", "object"], - "properties": { - "media_type": { - "description": "Type of media content associated with the pin.", - "type": ["null", "string"] - }, - "images": { - "description": "Different image sizes available for the pin", - "type": ["null", "object"], - "properties": { - "150x150": { - "description": "Square thumbnail image sized at 150x150 resolution", - "type": ["null", "object"], - "properties": { - "width": { - "description": "Width of the image in 150x150 resolution.", - "type": ["null", "integer"] - }, - "height": { - "description": "Height of the image in 150x150 resolution.", - "type": ["null", "integer"] - }, - "url": { - "description": "URL of the image in 150x150 resolution.", - "type": ["null", "string"] - } - } - }, - "400x300": { - "description": "Image sized at 400x300 resolution", - "type": ["null", "object"], - "properties": { - "width": { - "description": "Width of the image in 400x300 resolution.", - "type": ["null", "integer"] - }, - "height": { - "description": "Height of the image in 400x300 resolution.", - "type": ["null", "integer"] - }, - "url": { - "description": "URL of the image in 400x300 resolution.", - "type": ["null", "string"] - } - } - }, - "600x": { - "description": "Image sized at 600x resolution", - "type": ["null", "object"], - "properties": { - "width": { - "description": "Width of the image in 600x resolution.", - "type": ["null", "integer"] - }, - "height": { - "description": "Height of the image in 600x resolution.", - "type": ["null", "integer"] - }, - "url": { - "description": "URL of the image in 600x resolution.", - "type": ["null", "string"] - } - } - }, - "1200x": { - "description": "Image sized at 1200x resolution", - "type": ["null", "object"], - "properties": { - "width": { - "description": "Width of the image in the specified resolution.", - "type": ["null", "integer"] - }, - "height": { - "description": "Height of the image in the specified resolution.", - "type": ["null", "integer"] - }, - "url": { - "description": "URL of the image in the specified resolution.", - "type": ["null", "string"] - } - } - }, - "originals": { - "description": "Original image file without any resizing", - "type": ["null", "object"], - "properties": { - "width": { - "description": "Width of the original image.", - "type": ["null", "integer"] - }, - "height": { - "description": "Height of the original image.", - "type": ["null", "integer"] - }, - "url": { - "description": "URL of the original image.", - "type": ["null", "string"] - } - } - } - } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_sections.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_sections.json deleted file mode 100644 index e406a16ef5c5..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/board_sections.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { - "description": "The name of the board section.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for the board section.", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/boards.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/boards.json deleted file mode 100644 index 090b5b66dd95..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/boards.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "owner": { - "description": "Details of the owner of the board.", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "username": { - "description": "The username of the board owner.", - "type": ["null", "string"] - } - } - }, - "name": { - "description": "The name/title of the board.", - "type": ["null", "string"] - }, - "description": { - "description": "A brief description or summary of the board.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for the board.", - "type": ["null", "string"] - }, - "privacy": { - "description": "The privacy settings of the board.", - "type": ["null", "string"] - }, - "follower_count": { - "description": "The count of followers the board has.", - "type": ["null", "integer"] - }, - "collaborator_count": { - "description": "The number of collaborators involved in the board.", - "type": ["null", "integer"] - }, - "pin_count": { - "description": "The total number of pins in the board.", - "type": ["null", "integer"] - }, - "media": { - "description": "Represents media content associated with the boards.", - "type": ["null", "object"], - "additionalProperties": true, - "properties": { - "media_type": { - "description": "The type of media content associated with the board.", - "type": ["null", "string"] - } - } - }, - "created_at": { - "description": "The date and time when the board was created.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "board_pins_modified_at": { - "description": "The most recent date and time when the board's pins were modified.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaign_analytics.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaign_analytics.json deleted file mode 100644 index 75d9387ea17c..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaign_analytics.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "DATE": { - "description": "The date for which the analytics data is recorded.", - "type": ["null", "string"], - "format": "date" - }, - "ADVERTISER_ID": { - "description": "The unique identifier of the advertiser involved in the campaign.", - "type": ["null", "number"] - }, - "AD_ACCOUNT_ID": { - "description": "The unique identifier of the advertising account associated with the campaign.", - "type": ["string"] - }, - "AD_ID": { - "description": "The unique identifier of the ad.", - "type": ["null", "string"] - }, - "AD_GROUP_ENTITY_STATUS": { - "description": "The current status of the ad group within the campaign.", - "type": ["null", "string"] - }, - "AD_GROUP_ID": { - "description": "The unique identifier of the ad group within the campaign.", - "type": ["null", "string"] - }, - "CAMPAIGN_DAILY_SPEND_CAP": { - "description": "The daily spending limit set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_ENTITY_STATUS": { - "description": "The current status of the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_ID": { - "description": "The unique identifier of the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_LIFETIME_SPEND_CAP": { - "description": "The total spending limit set for the campaign.", - "type": ["null", "number"] - }, - "CAMPAIGN_NAME": { - "description": "The name of the campaign.", - "type": ["null", "string"] - }, - "CHECKOUT_ROAS": { - "description": "The return on ad spend (ROAS) related to checkout actions.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1": { - "description": "The number of click-throughs for a specific action.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_1_GROSS": { - "description": "The gross number of click-throughs for a specific action, including duplicates.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_2": { - "description": "Another metric related to click-throughs.", - "type": ["null", "number"] - }, - "CPC_IN_MICRO_DOLLAR": { - "description": "The cost per click (CPC) in micro dollars.", - "type": ["null", "number"] - }, - "CPM_IN_DOLLAR": { - "description": "The cost per mille (CPM) in dollars.", - "type": ["null", "number"] - }, - "CPM_IN_MICRO_DOLLAR": { - "description": "The cost per mille (CPM) in micro dollars.", - "type": ["null", "number"] - }, - "CTR": { - "description": "The click-through rate (CTR) for the campaign.", - "type": ["null", "number"] - }, - "CTR_2": { - "description": "Another metric related to click-through rates.", - "type": ["null", "number"] - }, - "ECPCV_IN_DOLLAR": { - "description": "The effective cost per converted view in dollars.", - "type": ["null", "number"] - }, - "ECPCV_P95_IN_DOLLAR": { - "description": "The 95th percentile effective cost per converted view in dollars.", - "type": ["null", "number"] - }, - "ECPC_IN_DOLLAR": { - "description": "The effective cost per click in dollars.", - "type": ["null", "number"] - }, - "ECPC_IN_MICRO_DOLLAR": { - "description": "The effective cost per click in micro dollars.", - "type": ["null", "number"] - }, - "ECPE_IN_DOLLAR": { - "description": "The effective cost per engagement in dollars.", - "type": ["null", "number"] - }, - "ECPM_IN_MICRO_DOLLAR": { - "description": "The effective cost per mille (ECPM) in micro dollars.", - "type": ["null", "number"] - }, - "ECPV_IN_DOLLAR": { - "description": "The effective cost per view in dollars.", - "type": ["null", "number"] - }, - "ECTR": { - "description": "The effective click-through rate (CTR) for the campaign.", - "type": ["null", "number"] - }, - "EENGAGEMENT_RATE": { - "description": "The engagement rate for the campaign.", - "type": ["null", "number"] - }, - "ENGAGEMENT_1": { - "description": "The number of engagements for a specific action.", - "type": ["null", "number"] - }, - "ENGAGEMENT_2": { - "description": "Another metric related to engagements.", - "type": ["null", "number"] - }, - "ENGAGEMENT_RATE": { - "description": "The engagement rate for the campaign.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_1": { - "description": "The number of visits related to product tags in a pin for a specific action.", - "type": ["null", "number"] - }, - "IDEA_PIN_PRODUCT_TAG_VISIT_2": { - "description": "Another metric related to visits related to product tags in pins.", - "type": ["null", "number"] - }, - "IMPRESSION_1": { - "description": "The number of impressions for a specific action.", - "type": ["null", "number"] - }, - "IMPRESSION_1_GROSS": { - "description": "The gross number of impressions for a specific action, including duplicates.", - "type": ["null", "number"] - }, - "IMPRESSION_2": { - "description": "Another metric related to impressions.", - "type": ["null", "number"] - }, - "INAPP_CHECKOUT_COST_PER_ACTION": { - "description": "The cost per action related to in-app checkouts.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_1": { - "description": "The number of outbound clicks for a specific action.", - "type": ["null", "number"] - }, - "OUTBOUND_CLICK_2": { - "description": "Another metric related to outbound clicks.", - "type": ["null", "number"] - }, - "PAGE_VISIT_COST_PER_ACTION": { - "description": "The cost per action related to page visits.", - "type": ["null", "number"] - }, - "PAGE_VISIT_ROAS": { - "description": "The return on ad spend (ROAS) related to page visits.", - "type": ["null", "number"] - }, - "PAID_IMPRESSION": { - "description": "The number of paid impressions.", - "type": ["null", "number"] - }, - "PIN_ID": { - "description": "The unique identifier of the pin.", - "type": ["null", "number"] - }, - "PIN_PROMOTION_ID": { - "description": "The unique identifier of the promoted pin, if applicable.", - "type": ["null", "number"] - }, - "REPIN_1": { - "description": "The number of repins for a specific action.", - "type": ["null", "number"] - }, - "REPIN_2": { - "description": "Another metric related to repins.", - "type": ["null", "number"] - }, - "REPIN_RATE": { - "description": "The repin rate for the campaign.", - "type": ["null", "number"] - }, - "SPEND_IN_DOLLAR": { - "description": "The total spending in dollars for the campaign.", - "type": ["null", "number"] - }, - "SPEND_IN_MICRO_DOLLAR": { - "description": "The total spending in micro dollars for the campaign.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT": { - "description": "The total number of checkouts.", - "type": ["null", "number"] - }, - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of checkouts in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CLICKTHROUGH": { - "description": "The total number of click-throughs.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_ADD_TO_CART": { - "description": "The total number of clicks leading to adding items to the cart.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT": { - "description": "The total number of clicks leading to the checkout page.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of clicks leading to the checkout page in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_LEAD": { - "description": "The total number of clicks leading to generating leads.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP": { - "description": "The total number of clicks leading to signing up.", - "type": ["null", "number"] - }, - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of clicks leading to signing up in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_CONVERSIONS": { - "description": "The total number of conversions.", - "type": ["null", "number"] - }, - "TOTAL_CUSTOM": { - "description": "A custom metric or dimension that is tracked.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT": { - "description": "The total number of engagements across actions.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT": { - "description": "The total number of engagements leading to checkout.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of engagements leading to checkout in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_LEAD": { - "description": "The total number of engagements leading to generating leads.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP": { - "description": "The total number of engagements leading to signing up.", - "type": ["null", "number"] - }, - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of engagements leading to signing up in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": { - "description": "The total number of visits related to product tags in pins across actions.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_FREQUENCY": { - "description": "The frequency of impressions per user.", - "type": ["null", "number"] - }, - "TOTAL_IMPRESSION_USER": { - "description": "The total number of unique users reached through impressions.", - "type": ["null", "number"] - }, - "TOTAL_LEAD": { - "description": "The total number of leads generated.", - "type": ["null", "number"] - }, - "TOTAL_OFFLINE_CHECKOUT": { - "description": "The total number of offline checkouts.", - "type": ["null", "number"] - }, - "TOTAL_PAGE_VISIT": { - "description": "The total number of page visits.", - "type": ["null", "number"] - }, - "TOTAL_REPIN_RATE": { - "description": "The overall repin rate across actions.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP": { - "description": "The total number of signups.", - "type": ["null", "number"] - }, - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of signups in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_3SEC_VIEWS": { - "description": "The total number of 3-second video views.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": { - "description": "The average watch time of video views in seconds.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_MRC_VIEWS": { - "description": "The total number of viewable video impressions.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P0_COMBINED": { - "description": "The percentage of videos that were played to completion.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P100_COMPLETE": { - "description": "The percentage of videos that were fully played to completion.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P25_COMBINED": { - "description": "The percentage of videos that were 25% viewed.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P50_COMBINED": { - "description": "The percentage of videos that were 50% viewed.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P75_COMBINED": { - "description": "The percentage of videos that were 75% viewed.", - "type": ["null", "number"] - }, - "TOTAL_VIDEO_P95_COMBINED": { - "description": "The percentage of videos that were 95% viewed.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_ADD_TO_CART": { - "description": "The total number of views leading to adding items to the cart.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT": { - "description": "The total number of views leading to the checkout page.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of views leading to the checkout page in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_LEAD": { - "description": "The total number of views leading to generating leads.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP": { - "description": "The total number of views leading to signing up.", - "type": ["null", "number"] - }, - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of views leading to signing up in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT": { - "description": "The total number of web checkouts.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of web checkouts in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT": { - "description": "The total number of web clicks leading to the checkout page.", - "type": ["null", "number"] - }, - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of web clicks leading to the checkout page in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT": { - "description": "The total number of web engagements leading to checkout.", - "type": ["null", "number"] - }, - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of web engagements leading to checkout in micro dollars.", - "type": ["null", "number"] - }, - "TOTAL_WEB_SESSIONS": { - "description": "The total number of web sessions.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT": { - "description": "The total number of web views leading to the checkout page.", - "type": ["null", "number"] - }, - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": { - "description": "The total value of web views leading to the checkout page in micro dollars.", - "type": ["null", "number"] - }, - "VIDEO_3SEC_VIEWS_2": { - "description": "Another metric related to 3-second video views.", - "type": ["null", "number"] - }, - "VIDEO_LENGTH": { - "description": "The length of the video in seconds.", - "type": ["null", "number"] - }, - "VIDEO_MRC_VIEWS_2": { - "description": "Another metric related to viewable video impressions.", - "type": ["null", "number"] - }, - "VIDEO_P0_COMBINED_2": { - "description": "Another metric related to the percentage of videos played to completion.", - "type": ["null", "number"] - }, - "VIDEO_P100_COMPLETE_2": { - "description": "Another metric related to the percentage of videos fully played to completion.", - "type": ["null", "number"] - }, - "VIDEO_P25_COMBINED_2": { - "description": "Another metric related to the percentage of videos that were 25% viewed.", - "type": ["null", "number"] - }, - "VIDEO_P50_COMBINED_2": { - "description": "Another metric related to the percentage of videos that were 50% viewed.", - "type": ["null", "number"] - }, - "VIDEO_P75_COMBINED_2": { - "description": "Another metric related to the percentage of videos that were 75% viewed.", - "type": ["null", "number"] - }, - "VIDEO_P95_COMBINED_2": { - "description": "Another metric related to the percentage of videos that were 95% viewed.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_COST_PER_ACTION": { - "description": "The cost per action related to web checkouts.", - "type": ["null", "number"] - }, - "WEB_CHECKOUT_ROAS": { - "description": "The return on ad spend (ROAS) related to web checkouts.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_1": { - "description": "The number of web sessions for a specific action.", - "type": ["null", "number"] - }, - "WEB_SESSIONS_2": { - "description": "Another metric related to web sessions.", - "type": ["null", "number"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaigns.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaigns.json deleted file mode 100644 index bc9176bc816f..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/campaigns.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "id": { - "description": "The unique identifier of the campaign.", - "type": ["null", "string"] - }, - "ad_account_id": { - "description": "The unique identifier of the ad account associated with the campaign.", - "type": ["null", "string"] - }, - "name": { - "description": "The name of the campaign.", - "type": ["null", "string"] - }, - "status": { - "description": "The current status of the campaign.", - "type": ["null", "string"] - }, - "lifetime_spend_cap": { - "description": "The maximum amount that can be spent for the lifetime of the campaign.", - "type": ["null", "integer"] - }, - "daily_spend_cap": { - "description": "The maximum amount that can be spent daily on the campaign.", - "type": ["null", "integer"] - }, - "order_line_id": { - "description": "The unique identifier of the order line associated with the campaign.", - "type": ["null", "string"] - }, - "tracking_urls": { - "description": "List of tracking URLs associated with the campaign", - "type": ["null", "object"], - "properties": { - "impression": { - "description": "Tracking URLs for impression events.", - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "click": { - "description": "Tracking URLs for click events.", - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "engagement": { - "description": "Tracking URLs for engagement events.", - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "buyable_button": { - "description": "Tracking URLs for buyable button events.", - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - }, - "audience_verification": { - "description": "Tracking URLs for audience verification events.", - "type": ["null", "array"], - "items": { - "type": ["null", "string"] - } - } - } - }, - "objective_type": { - "description": "The type of the campaign objective.", - "type": ["null", "string"] - }, - "created_time": { - "description": "The timestamp indicating when the campaign was created.", - "type": ["null", "integer"] - }, - "updated_time": { - "description": "The timestamp indicating when the campaign was last updated.", - "type": ["null", "integer"] - }, - "type": { - "description": "The type of the campaign.", - "type": ["null", "string"] - }, - "start_time": { - "description": "The timestamp indicating the start time of the campaign.", - "type": ["null", "integer"] - }, - "end_time": { - "description": "The timestamp indicating the end time of the campaign.", - "type": ["null", "integer"] - }, - "summary_status": { - "description": "The summary status of the campaign.", - "type": ["null", "string"] - }, - "is_campaign_budget_optimization": { - "description": "Indicates if campaign budget optimization is enabled.", - "type": ["null", "boolean"] - }, - "is_flexible_daily_budgets": { - "description": "Indicates if flexible daily budgets are enabled for the campaign.", - "type": ["null", "boolean"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs.json deleted file mode 100644 index 15c0cba1be4a..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "created_at": { - "description": "The timestamp when the catalog was created.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "id": { - "description": "Unique identifier of the catalog.", - "type": ["null", "string"] - }, - "updated_at": { - "description": "The timestamp when the catalog was last updated.", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "name": { - "description": "Name/title of the catalog.", - "type": ["null", "string"] - }, - "catalog_type": { - "description": "The type of the catalog representing the content.", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_feeds.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_feeds.json deleted file mode 100644 index 5c95603683f5..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_feeds.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "created_at": { - "description": "The date and time when the catalog was created", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "id": { - "description": "The unique identifier for the catalog", - "type": ["null", "string"] - }, - "updated_at": { - "description": "The date and time when the catalog was last updated", - "type": ["null", "string"], - "format": "date-time", - "airbyte_type": "timestamp_without_timezone" - }, - "name": { - "description": "The name or title of the catalog", - "type": ["null", "string"] - }, - "format": { - "description": "The format of the catalog data, e.g., JSON, XML", - "type": ["null", "string"] - }, - "catalog_type": { - "description": "The type of catalog being fetched, e.g., product, service, event", - "type": ["null", "string"] - }, - "location": { - "description": "The physical or digital location associated with the catalog", - "type": ["null", "string"] - }, - "preferred_processing_schedule": { - "description": "Preferred processing schedule for items in the catalog", - "type": ["null", "object"], - "properties": { - "time": { - "description": "The preferred processing time for items", - "type": ["null", "string"] - }, - "timezone": { - "description": "The timezone used for the processing schedule", - "type": ["null", "string"] - } - } - }, - "status": { - "description": "The current status of the catalog, e.g., active, inactive", - "type": ["null", "string"] - }, - "default_currency": { - "description": "The default currency used for pricing within the catalog", - "type": ["null", "string"] - }, - "default_locale": { - "description": "The default locale for language and formatting within the catalog", - "type": ["null", "string"] - }, - "default_country": { - "description": "The default country applicable to the catalog items", - "type": ["null", "string"] - }, - "default_availability": { - "description": "The default availability status for items in the catalog", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_product_groups.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_product_groups.json deleted file mode 100644 index 8a5588357364..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/catalogs_product_groups.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "created_at": { - "description": "The date and time when the catalog product group was created.", - "type": ["null", "integer"] - }, - "description": { - "description": "The description of the catalog product group.", - "type": ["null", "string"] - }, - "feed_id": { - "description": "The ID of the feed associated with the catalog product group.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier of the catalog product group.", - "type": ["null", "string"] - }, - "is_featured": { - "description": "Indicates whether the product group is featured or not.", - "type": ["null", "boolean"] - }, - "name": { - "description": "The name of the catalog product group.", - "type": ["null", "string"] - }, - "status": { - "description": "The status of the catalog product group.", - "type": ["null", "string"] - }, - "type": { - "description": "The type of the catalog product group.", - "type": ["null", "string"] - }, - "updated_at": { - "description": "The date and time when the catalog product group was last updated.", - "type": ["null", "integer"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/conversion_tags.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/conversion_tags.json deleted file mode 100644 index 34fa33c2edce..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/conversion_tags.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "ad_account_id": { - "description": "The ID of the advertising account associated with the conversion tag.", - "type": ["null", "string"] - }, - "code_snippet": { - "description": "The JavaScript code snippet that needs to be placed on the website for tracking conversions.", - "type": ["null", "string"] - }, - "enhanced_match_status": { - "description": "The status of enhanced match capabilities for the conversion tag.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier of the conversion tag.", - "type": ["null", "string"] - }, - "last_fired_time_ms": { - "description": "The timestamp of the last conversion event fired by the tag in milliseconds.", - "type": ["null", "integer"] - }, - "name": { - "description": "The name or label assigned to the conversion tag.", - "type": ["null", "string"] - }, - "status": { - "description": "The current status of the conversion tag (e.g., active, inactive).", - "type": ["null", "string"] - }, - "version": { - "description": "The version number or revision of the conversion tag.", - "type": ["null", "string"] - }, - "configs": { - "description": "Contains configurations related to conversion tags", - "type": ["null", "object"], - "properties": { - "aem_enabled": { - "description": "Indicates if Adobe Experience Manager integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - }, - "md_frequency": { - "description": "The frequency at which match data is processed for the conversion tag.", - "type": ["null", "number"] - }, - "aem_fnln_enabled": { - "description": "Indicates if AEM Facebook Login integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - }, - "aem_ph_enabled": { - "description": "Indicates if AEM Phone integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - }, - "aem_ge_enabled": { - "description": "Indicates if AEM Google Events integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - }, - "aem_db_enabled": { - "description": "Indicates if AEM DoubleClick integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - }, - "aem_loc_enabled": { - "description": "Indicates if AEM Locations integration is enabled for the conversion tag.", - "type": ["null", "boolean"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/customer_lists.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/customer_lists.json deleted file mode 100644 index 048d2b8b3593..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/customer_lists.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "ad_account_id": { - "description": "The ID of the advertising account associated with the customer list.", - "type": ["null", "string"] - }, - "created_time": { - "description": "The timestamp indicating when the customer list was created.", - "type": ["null", "integer"] - }, - "id": { - "description": "The unique identifier of the customer list.", - "type": ["null", "string"] - }, - "name": { - "description": "The name given to the customer list for identification.", - "type": ["null", "string"] - }, - "num_batches": { - "description": "The number of batches used to upload user records for the customer list.", - "type": ["null", "integer"] - }, - "num_removed_user_records": { - "description": "The count of user records removed from the customer list.", - "type": ["null", "integer"] - }, - "num_uploaded_user_records": { - "description": "The total number of user records uploaded to the customer list.", - "type": ["null", "integer"] - }, - "status": { - "description": "The current status of the customer list, such as active, inactive, etc.", - "type": ["null", "string"] - }, - "type": { - "description": "The type of customer list, which can be standard, hashed, etc.", - "type": ["null", "string"] - }, - "updated_time": { - "description": "The timestamp indicating when the customer list was last updated.", - "type": ["null", "integer"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/keywords.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/keywords.json deleted file mode 100644 index 18c687f2ec00..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/keywords.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "archived": { - "description": "Indicates whether the keyword is archived or not.", - "type": ["null", "boolean"] - }, - "id": { - "description": "The unique identifier for the keyword.", - "type": ["null", "string"] - }, - "parent_id": { - "description": "The ID of the parent keyword if this is a child keyword.", - "type": ["null", "string"] - }, - "parent_type": { - "description": "The type of the parent keyword if this is a child keyword (category, theme, etc).", - "type": ["null", "string"] - }, - "type": { - "description": "The type of keyword (brand, generic, long-tail, etc).", - "type": ["null", "string"] - }, - "bid": { - "description": "The bid value associated with the keyword for advertising purposes.", - "type": ["null", "integer"] - }, - "match_type": { - "description": "The type of matching used for the keyword (exact, phrase, broad, etc).", - "type": ["null", "string"] - }, - "value": { - "description": "The actual text value of the keyword.", - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/user_account_analytics.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/user_account_analytics.json deleted file mode 100644 index 214cdb2ca2c1..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/schemas/user_account_analytics.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "data_status": { - "description": "The status of the data being fetched, such as 'success' or 'error'.", - "type": ["null", "string"] - }, - "date": { - "description": "The date corresponding to the analytics data.", - "type": ["null", "string"], - "format": "date" - }, - "metrics": { - "description": "Various metrics related to user account analytics.", - "type": ["null", "object"], - "properties": { - "ENGAGEMENT": { - "description": "The level of user interaction or engagement with content.", - "type": ["null", "number"] - }, - "CLICKTHROUGH_RATE": { - "description": "The rate at which users clicked through to view content.", - "type": ["null", "number"] - }, - "CLICKTHROUGH": { - "description": "The number of times users clicked through to view content.", - "type": ["null", "number"] - }, - "CLOSEUP": { - "description": "The number of close-up views of content.", - "type": ["null", "number"] - }, - "CLOSEUP_RATE": { - "description": "The rate at which close-up views of content occurred.", - "type": ["null", "number"] - }, - "ENGAGEMENT_RATE": { - "description": "The rate at which user engagement with content occurred.", - "type": ["null", "number"] - }, - "SAVE": { - "description": "The number of times users saved or pinned content.", - "type": ["null", "number"] - }, - "SAVE_RATE": { - "description": "The rate at which content was saved or pinned by users.", - "type": ["null", "number"] - }, - "IMPRESSION": { - "description": "The number of times content was displayed or viewed.", - "type": ["null", "number"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/source.py b/airbyte-integrations/connectors/source-pinterest/source_pinterest/source.py index 9d36d1451323..a7412a23f32d 100644 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/source.py +++ b/airbyte-integrations/connectors/source-pinterest/source_pinterest/source.py @@ -5,12 +5,11 @@ import copy import logging from base64 import standard_b64encode -from typing import Any, List, Mapping, Tuple, Type +from typing import Any, List, Mapping import pendulum -import requests from airbyte_cdk.models import FailureType -from airbyte_cdk.sources import AbstractSource +from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource from airbyte_cdk.sources.streams import Stream from airbyte_cdk.sources.streams.http.auth import Oauth2Authenticator from airbyte_cdk.utils import AirbyteTracedException @@ -30,35 +29,17 @@ ProductGroupTargetingReport, ProductItemReport, ) -from .streams import ( - AdAccountAnalytics, - AdAccounts, - AdAnalytics, - AdGroupAnalytics, - AdGroups, - Ads, - Audiences, - BoardPins, - Boards, - BoardSectionPins, - BoardSections, - CampaignAnalytics, - Campaigns, - Catalogs, - CatalogsFeeds, - CatalogsProductGroups, - ConversionTags, - CustomerLists, - Keywords, - PinterestStream, - UserAccountAnalytics, -) +from .streams import PinterestStream logger = logging.getLogger("airbyte") -class SourcePinterest(AbstractSource): - def _validate_and_transform(self, config: Mapping[str, Any], amount_of_days_allowed_for_lookup: int = 89): +class SourcePinterest(YamlDeclarativeSource): + def __init__(self) -> None: + super().__init__(**{"path_to_yaml": "manifest.yaml"}) + + @staticmethod + def _validate_and_transform(config: Mapping[str, Any], amount_of_days_allowed_for_lookup: int = 89) -> Mapping[str, Any]: config = copy.deepcopy(config) today = pendulum.today() latest_date_allowed_by_api = today.subtract(days=amount_of_days_allowed_for_lookup) @@ -79,14 +60,15 @@ def _validate_and_transform(self, config: Mapping[str, Any], amount_of_days_allo if not start_date or config["start_date"] < latest_date_allowed_by_api: logger.info( - f"Current start_date: {start_date} does not meet API report requirements. Resetting start_date to: {latest_date_allowed_by_api}" + f"Current start_date: {start_date} does not meet API report requirements. " + f"Resetting start_date to: {latest_date_allowed_by_api}" ) - config["start_date"] = latest_date_allowed_by_api + config["start_date"] = latest_date_allowed_by_api.strftime("%Y-%m-%d") return config @staticmethod - def get_authenticator(config): + def get_authenticator(config) -> Oauth2Authenticator: config = config.get("credentials") or config credentials_base64_encoded = standard_b64encode( (config.get("client_id") + ":" + config.get("client_secret")).encode("ascii") @@ -101,58 +83,17 @@ def get_authenticator(config): refresh_token=config.get("refresh_token"), ) - def check_connection(self, logger, config) -> Tuple[bool, any]: - config = self._validate_and_transform(config) - authenticator = self.get_authenticator(config) - url = f"{PinterestStream.url_base}user_account" - try: - auth_headers = {"Accept": "application/json", **authenticator.get_auth_header()} - session = requests.get(url, headers=auth_headers) - session.raise_for_status() - return True, None - except requests.exceptions.HTTPError as e: - if "401 Client Error: Unauthorized for url" in str(e): - return False, f"Try to re-authenticate because current refresh token is not valid. {e}" - else: - return False, e - except requests.exceptions.RequestException as e: - return False, e - def streams(self, config: Mapping[str, Any]) -> List[Stream]: config["authenticator"] = self.get_authenticator(config) report_config = self._validate_and_transform(config, amount_of_days_allowed_for_lookup=913) - config = self._validate_and_transform(config) - status = ",".join(config.get("status")) if config.get("status") else None - - ad_accounts = AdAccounts(config) - ads = Ads(ad_accounts, config=config, status_filter=status) - ad_groups = AdGroups(ad_accounts, config=config, status_filter=status) - campaigns = Campaigns(ad_accounts, config=config, status_filter=status) - boards = Boards(config) - board_sections = BoardSections(boards, config=config) - return [ - ad_accounts, - AdAccountAnalytics(ad_accounts, config=config), - ads, - AdAnalytics(ads, config=config), - ad_groups, - AdGroupAnalytics(ad_groups, config=config), - boards, - BoardPins(boards, config=config), - board_sections, - BoardSectionPins(board_sections, config=config), - campaigns, - CampaignAnalytics(campaigns, config=config), + + declarative_streams = super().streams(config) + ad_accounts = [stream for stream in declarative_streams if stream.name == "ad_accounts"][0] + + # Report streams involve async data fetch, which is currently not supported in low-code + report_streams = [ CampaignAnalyticsReport(ad_accounts, config=report_config), CampaignTargetingReport(ad_accounts, config=report_config), - UserAccountAnalytics(None, config=config), - Keywords(ad_groups, config=config), - Audiences(ad_accounts, config=config), - ConversionTags(ad_accounts, config=config), - CustomerLists(ad_accounts, config=config), - Catalogs(config=config), - CatalogsFeeds(config=config), - CatalogsProductGroups(config=config), AdvertiserReport(ad_accounts, config=report_config), AdvertiserTargetingReport(ad_accounts, config=report_config), AdGroupReport(ad_accounts, config=report_config), @@ -165,7 +106,9 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]: ProductItemReport(ad_accounts, config=report_config), ] + self.get_custom_report_streams(ad_accounts, config=report_config) - def get_custom_report_streams(self, parent, config: dict) -> List[Type[Stream]]: + return declarative_streams + report_streams + + def get_custom_report_streams(self, parent, config: Mapping[str, Any]) -> List[Stream]: """return custom report streams""" custom_streams = [] for report_config in config.get("custom_reports", []): @@ -186,9 +129,6 @@ def get_custom_report_streams(self, parent, config: dict) -> List[Type[Stream]]: report_config = self._validate_and_transform(report_config, amount_of_days_allowed_for_lookup) - stream = CustomReport( - parent=parent, - config=report_config, - ) + stream = CustomReport(parent=parent, config=report_config) custom_streams.append(stream) return custom_streams diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/spec.json b/airbyte-integrations/connectors/source-pinterest/source_pinterest/spec.json deleted file mode 100644 index eb03421a4585..000000000000 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/spec.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "documentationUrl": "https://docs.airbyte.com/integrations/sources/pinterest", - "connectionSpecification": { - "$schema": "https://json-schema.org/draft-07/schema#", - "title": "Pinterest Spec", - "type": "object", - "additionalProperties": true, - "properties": { - "start_date": { - "type": "string", - "title": "Start Date", - "description": "A date in the format YYYY-MM-DD. If you have not set a date, it would be defaulted to latest allowed date by api (89 days from today).", - "format": "date", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", - "pattern_descriptor": "YYYY-MM-DD", - "examples": ["2022-07-28"] - }, - "status": { - "title": "Status", - "description": "For the ads, ad_groups, and campaigns streams, specifying a status will filter out records that do not match the specified ones. If a status is not specified, the source will default to records with a status of either ACTIVE or PAUSED.", - "type": ["array", "null"], - "items": { - "type": "string", - "enum": ["ACTIVE", "PAUSED", "ARCHIVED"] - }, - "uniqueItems": true - }, - "credentials": { - "title": "OAuth2.0", - "type": "object", - "required": [ - "auth_method", - "refresh_token", - "client_id", - "client_secret" - ], - "properties": { - "auth_method": { - "type": "string", - "const": "oauth2.0", - "order": 0 - }, - "client_id": { - "type": "string", - "title": "Client ID", - "description": "The Client ID of your OAuth application", - "airbyte_secret": true - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "The Client Secret of your OAuth application.", - "airbyte_secret": true - }, - "refresh_token": { - "type": "string", - "title": "Refresh Token", - "description": "Refresh Token to obtain new Access Token, when it's expired.", - "airbyte_secret": true - } - } - }, - "custom_reports": { - "title": "Custom Reports", - "description": "A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. Click on \"add\" to fill this field.", - "type": "array", - "items": { - "title": "ReportConfig", - "description": "Config for custom report", - "type": "object", - "required": ["name", "level", "granularity", "columns"], - "properties": { - "name": { - "title": "Name", - "description": "The name value of report", - "type": "string", - "order": 0 - }, - "level": { - "title": "Level", - "description": "Chosen level for API", - "default": "ADVERTISER", - "enum": [ - "ADVERTISER", - "ADVERTISER_TARGETING", - "CAMPAIGN", - "CAMPAIGN_TARGETING", - "AD_GROUP", - "AD_GROUP_TARGETING", - "PIN_PROMOTION", - "PIN_PROMOTION_TARGETING", - "KEYWORD", - "PRODUCT_GROUP", - "PRODUCT_GROUP_TARGETING", - "PRODUCT_ITEM" - ], - "type": "string", - "order": 1 - }, - "granularity": { - "title": "Granularity", - "description": "Chosen granularity for API", - "default": "TOTAL", - "enum": ["TOTAL", "DAY", "HOUR", "WEEK", "MONTH"], - "type": "string", - "order": 2 - }, - "columns": { - "title": "Columns", - "description": "A list of chosen columns", - "default": [], - "type": "array", - "order": 3, - "items": { - "title": "ValidEnums", - "description": "An enumeration.", - "enum": [ - "ADVERTISER_ID", - "AD_ACCOUNT_ID", - "AD_GROUP_ENTITY_STATUS", - "AD_GROUP_ID", - "AD_ID", - "CAMPAIGN_DAILY_SPEND_CAP", - "CAMPAIGN_ENTITY_STATUS", - "CAMPAIGN_ID", - "CAMPAIGN_LIFETIME_SPEND_CAP", - "CAMPAIGN_NAME", - "CHECKOUT_ROAS", - "CLICKTHROUGH_1", - "CLICKTHROUGH_1_GROSS", - "CLICKTHROUGH_2", - "CPC_IN_MICRO_DOLLAR", - "CPM_IN_DOLLAR", - "CPM_IN_MICRO_DOLLAR", - "CTR", - "CTR_2", - "ECPCV_IN_DOLLAR", - "ECPCV_P95_IN_DOLLAR", - "ECPC_IN_DOLLAR", - "ECPC_IN_MICRO_DOLLAR", - "ECPE_IN_DOLLAR", - "ECPM_IN_MICRO_DOLLAR", - "ECPV_IN_DOLLAR", - "ECTR", - "EENGAGEMENT_RATE", - "ENGAGEMENT_1", - "ENGAGEMENT_2", - "ENGAGEMENT_RATE", - "IDEA_PIN_PRODUCT_TAG_VISIT_1", - "IDEA_PIN_PRODUCT_TAG_VISIT_2", - "IMPRESSION_1", - "IMPRESSION_1_GROSS", - "IMPRESSION_2", - "INAPP_CHECKOUT_COST_PER_ACTION", - "OUTBOUND_CLICK_1", - "OUTBOUND_CLICK_2", - "PAGE_VISIT_COST_PER_ACTION", - "PAGE_VISIT_ROAS", - "PAID_IMPRESSION", - "PIN_ID", - "PIN_PROMOTION_ID", - "REPIN_1", - "REPIN_2", - "REPIN_RATE", - "SPEND_IN_DOLLAR", - "SPEND_IN_MICRO_DOLLAR", - "TOTAL_CHECKOUT", - "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_CLICKTHROUGH", - "TOTAL_CLICK_ADD_TO_CART", - "TOTAL_CLICK_CHECKOUT", - "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_CLICK_LEAD", - "TOTAL_CLICK_SIGNUP", - "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", - "TOTAL_CONVERSIONS", - "TOTAL_CUSTOM", - "TOTAL_ENGAGEMENT", - "TOTAL_ENGAGEMENT_CHECKOUT", - "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_ENGAGEMENT_LEAD", - "TOTAL_ENGAGEMENT_SIGNUP", - "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", - "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT", - "TOTAL_IMPRESSION_FREQUENCY", - "TOTAL_IMPRESSION_USER", - "TOTAL_LEAD", - "TOTAL_OFFLINE_CHECKOUT", - "TOTAL_PAGE_VISIT", - "TOTAL_REPIN_RATE", - "TOTAL_SIGNUP", - "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR", - "TOTAL_VIDEO_3SEC_VIEWS", - "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", - "TOTAL_VIDEO_MRC_VIEWS", - "TOTAL_VIDEO_P0_COMBINED", - "TOTAL_VIDEO_P100_COMPLETE", - "TOTAL_VIDEO_P25_COMBINED", - "TOTAL_VIDEO_P50_COMBINED", - "TOTAL_VIDEO_P75_COMBINED", - "TOTAL_VIDEO_P95_COMBINED", - "TOTAL_VIEW_ADD_TO_CART", - "TOTAL_VIEW_CHECKOUT", - "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_VIEW_LEAD", - "TOTAL_VIEW_SIGNUP", - "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", - "TOTAL_WEB_CHECKOUT", - "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_WEB_CLICK_CHECKOUT", - "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_WEB_ENGAGEMENT_CHECKOUT", - "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "TOTAL_WEB_SESSIONS", - "TOTAL_WEB_VIEW_CHECKOUT", - "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", - "VIDEO_3SEC_VIEWS_2", - "VIDEO_LENGTH", - "VIDEO_MRC_VIEWS_2", - "VIDEO_P0_COMBINED_2", - "VIDEO_P100_COMPLETE_2", - "VIDEO_P25_COMBINED_2", - "VIDEO_P50_COMBINED_2", - "VIDEO_P75_COMBINED_2", - "VIDEO_P95_COMBINED_2", - "WEB_CHECKOUT_COST_PER_ACTION", - "WEB_CHECKOUT_ROAS", - "WEB_SESSIONS_1", - "WEB_SESSIONS_2" - ] - } - }, - "click_window_days": { - "title": "Click window days", - "description": "Number of days to use as the conversion attribution window for a pin click action.", - "default": 30, - "enum": [0, 1, 7, 14, 30, 60], - "type": "integer", - "order": 4 - }, - "engagement_window_days": { - "title": "Engagement window days", - "description": "Number of days to use as the conversion attribution window for an engagement action.", - "default": [30], - "enum": [0, 1, 7, 14, 30, 60], - "type": "integer", - "order": 5 - }, - "view_window_days": { - "title": "View window days", - "description": "Number of days to use as the conversion attribution window for a view action.", - "default": [30], - "enum": [0, 1, 7, 14, 30, 60], - "type": "integer", - "order": 6 - }, - "conversion_report_time": { - "title": "Conversion report time", - "description": "The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event..", - "default": "TIME_OF_AD_ACTION", - "enum": ["TIME_OF_AD_ACTION", "TIME_OF_CONVERSION"], - "type": "string", - "order": 7 - }, - "attribution_types": { - "title": "Attribution types", - "description": "List of types of attribution for the conversion report", - "default": ["INDIVIDUAL", "HOUSEHOLD"], - "type": "array", - "items": { - "title": "ValidEnums", - "description": "An enumeration.", - "enum": ["INDIVIDUAL", "HOUSEHOLD"] - }, - "order": 8 - }, - "start_date": { - "type": "string", - "title": "Start Date", - "description": "A date in the format YYYY-MM-DD. If you have not set a date, it would be defaulted to latest allowed date by report api (913 days from today).", - "format": "date", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", - "pattern_descriptor": "YYYY-MM-DD", - "examples": ["2022-07-28"], - "order": 9 - } - } - } - } - } - }, - "advanced_auth": { - "auth_flow_type": "oauth2.0", - "predicate_key": ["credentials", "auth_method"], - "predicate_value": "oauth2.0", - "oauth_config_specification": { - "complete_oauth_output_specification": { - "type": "object", - "additionalProperties": false, - "properties": { - "refresh_token": { - "type": "string", - "path_in_connector_config": ["credentials", "refresh_token"] - } - } - }, - "complete_oauth_server_input_specification": { - "type": "object", - "additionalProperties": false, - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - } - } - }, - "complete_oauth_server_output_specification": { - "type": "object", - "additionalProperties": false, - "properties": { - "client_id": { - "type": "string", - "path_in_connector_config": ["credentials", "client_id"] - }, - "client_secret": { - "type": "string", - "path_in_connector_config": ["credentials", "client_secret"] - } - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-pinterest/source_pinterest/streams.py b/airbyte-integrations/connectors/source-pinterest/source_pinterest/streams.py index ab36624e6424..f89656efd17d 100644 --- a/airbyte-integrations/connectors/source-pinterest/source_pinterest/streams.py +++ b/airbyte-integrations/connectors/source-pinterest/source_pinterest/streams.py @@ -2,21 +2,16 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -import logging from abc import ABC from datetime import datetime -from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional +from typing import Any, Iterable, List, Mapping, MutableMapping, Optional import pendulum import requests from airbyte_cdk.models import SyncMode -from airbyte_cdk.sources import Source from airbyte_cdk.sources.streams import Stream -from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy from airbyte_cdk.sources.streams.http import HttpStream, HttpSubStream -from airbyte_cdk.sources.streams.http.availability_strategy import HttpAvailabilityStrategy from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer -from requests import HTTPError from .utils import get_analytics_columns, to_datetime_str @@ -41,16 +36,16 @@ class PinterestStream(HttpStream, ABC): max_rate_limit_exceeded = False transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization) - def __init__(self, config: Mapping[str, Any]): + def __init__(self, config: Mapping[str, Any]) -> None: super().__init__(authenticator=config["authenticator"]) self.config = config @property - def start_date(self): + def start_date(self) -> str: return self.config["start_date"] @property - def window_in_days(self): + def window_in_days(self) -> int: return 30 # Set window_in_days to 30 days date range def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]: @@ -118,110 +113,6 @@ def stream_slices( yield {"parent": record, "sub_parent": stream_slice} -class Boards(PinterestStream): - use_cache = True - - def path(self, **kwargs) -> str: - return "boards" - - -class Catalogs(PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/catalogs/list""" - - use_cache = True - - def path(self, **kwargs) -> str: - return "catalogs" - - -class CatalogsFeeds(PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/feeds/list""" - - use_cache = True - - def path(self, **kwargs) -> str: - return "catalogs/feeds" - - def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]: - # Remove sensitive data - for record in super().parse_response(response, stream_state, **kwargs): - record.pop("credentials", None) - yield record - - -class CatalogsProductGroupsAvailabilityStrategy(HttpAvailabilityStrategy): - def reasons_for_unavailable_status_codes( - self, stream: Stream, logger: logging.Logger, source: Optional[Source], error: HTTPError - ) -> Dict[int, str]: - reasons_for_codes: Dict[int, str] = super().reasons_for_unavailable_status_codes(stream, logger, source, error) - reasons_for_codes[409] = "Can't access catalog product groups because there is no existing catalog." - - return reasons_for_codes - - -class CatalogsProductGroups(PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/catalogs_product_groups/list""" - - use_cache = True - - def path(self, **kwargs) -> str: - return "catalogs/product_groups" - - @property - def availability_strategy(self) -> Optional["AvailabilityStrategy"]: - return CatalogsProductGroupsAvailabilityStrategy() - - -class AdAccounts(PinterestStream): - use_cache = True - - def path(self, **kwargs) -> str: - return "ad_accounts" - - -class BoardSections(PinterestSubStream, PinterestStream): - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"boards/{stream_slice['parent']['id']}/sections" - - -class BoardPins(PinterestSubStream, PinterestStream): - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"boards/{stream_slice['parent']['id']}/pins" - - -class BoardSectionPins(PinterestSubStream, PinterestStream): - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"boards/{stream_slice['sub_parent']['parent']['id']}/sections/{stream_slice['parent']['id']}/pins" - - -class Audiences(PinterestSubStream, PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/audiences/list""" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['parent']['id']}/audiences" - - -class Keywords(PinterestSubStream, PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/keywords/get""" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['parent']['ad_account_id']}/keywords?ad_group_id={stream_slice['parent']['id']}" - - -class ConversionTags(PinterestSubStream, PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#operation/conversion_tags/list""" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['parent']['id']}/conversion_tags" - - -class CustomerLists(PinterestSubStream, PinterestStream): - """Docs: https://developers.pinterest.com/docs/api/v5/#tag/customer_lists""" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['parent']['id']}/customer_lists" - - class IncrementalPinterestStream(PinterestStream, ABC): def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]: default_value = self.start_date.format("YYYY-MM-DD") @@ -283,7 +174,7 @@ def stream_slices( class IncrementalPinterestSubStream(IncrementalPinterestStream): cursor_field = "updated_time" - def __init__(self, parent: HttpStream, with_data_slices: bool = True, **kwargs): + def __init__(self, parent: Stream, with_data_slices: bool = True, **kwargs) -> None: super().__init__(**kwargs) self.parent = parent self.with_data_slices = with_data_slices @@ -308,7 +199,8 @@ class PinterestAnalyticsStream(IncrementalPinterestSubStream): granularity = "DAY" analytics_target_ids = None - def lookback_date_limt_reached(self, response: requests.Response) -> bool: + @staticmethod + def lookback_date_limit_reached(response: requests.Response) -> bool: """ After few consecutive requests analytics API return bad request error with 'You can only get data from the last 90 days' error message. @@ -321,10 +213,10 @@ def lookback_date_limt_reached(self, response: requests.Response) -> bool: return False def should_retry(self, response: requests.Response) -> bool: - return super().should_retry(response) or self.lookback_date_limt_reached(response) + return super().should_retry(response) or self.lookback_date_limit_reached(response) def backoff_time(self, response: requests.Response) -> Optional[float]: - if self.lookback_date_limt_reached(response): + if self.lookback_date_limit_reached(response): return 1 return super().backoff_time(response) @@ -345,84 +237,3 @@ def request_params( params.update({self.analytics_target_ids: stream_slice["parent"]["id"]}) return params - - -class ServerSideFilterStream(IncrementalPinterestSubStream): - def filter_by_state(self, stream_state: Mapping[str, Any] = None, record: Mapping[str, Any] = None) -> Iterable: - """ - Endpoint does not provide query filtering params, but they provide us - cursor field in most cases, so we used that as incremental filtering - during the parsing. - """ - - if not stream_state or record[self.cursor_field] >= stream_state.get(self.cursor_field): - yield record - - def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]: - for record in super().parse_response(response, stream_state, **kwargs): - yield from self.filter_by_state(stream_state=stream_state, record=record) - - -class UserAccountAnalytics(PinterestAnalyticsStream): - data_fields = ["all", "daily_metrics"] - cursor_field = "date" - - def path(self, **kwargs) -> str: - return "user_account/analytics" - - -class AdAccountAnalytics(PinterestAnalyticsStream): - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['parent']['id']}/analytics" - - -class Campaigns(ServerSideFilterStream): - def __init__(self, parent: HttpStream, with_data_slices: bool = False, status_filter: str = "", **kwargs): - super().__init__(parent, with_data_slices, **kwargs) - self.status_filter = status_filter - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - params = f"?entity_statuses={self.status_filter}" if self.status_filter else "" - return f"ad_accounts/{stream_slice['parent']['id']}/campaigns{params}" - - -class CampaignAnalytics(PinterestAnalyticsStream): - analytics_target_ids = "campaign_ids" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['sub_parent']['parent']['id']}/campaigns/analytics" - - -class AdGroups(ServerSideFilterStream): - def __init__(self, parent: HttpStream, with_data_slices: bool = False, status_filter: str = "", **kwargs): - super().__init__(parent, with_data_slices, **kwargs) - self.status_filter = status_filter - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - print(f"=========== stream_slice: {stream_slice} =====================") - params = f"?entity_statuses={self.status_filter}" if self.status_filter else "" - return f"ad_accounts/{stream_slice['parent']['id']}/ad_groups{params}" - - -class AdGroupAnalytics(PinterestAnalyticsStream): - analytics_target_ids = "ad_group_ids" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['sub_parent']['parent']['id']}/ad_groups/analytics" - - -class Ads(ServerSideFilterStream): - def __init__(self, parent: HttpStream, with_data_slices: bool = False, status_filter: str = "", **kwargs): - super().__init__(parent, with_data_slices, **kwargs) - self.status_filter = status_filter - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - params = f"?entity_statuses={self.status_filter}" if self.status_filter else "" - return f"ad_accounts/{stream_slice['parent']['id']}/ads{params}" - - -class AdAnalytics(PinterestAnalyticsStream): - analytics_target_ids = "ad_ids" - - def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str: - return f"ad_accounts/{stream_slice['sub_parent']['parent']['id']}/ads/analytics" diff --git a/airbyte-integrations/connectors/source-pinterest/unit_tests/conftest.py b/airbyte-integrations/connectors/source-pinterest/unit_tests/conftest.py index 0597c5b7681b..0ca0151e2db8 100644 --- a/airbyte-integrations/connectors/source-pinterest/unit_tests/conftest.py +++ b/airbyte-integrations/connectors/source-pinterest/unit_tests/conftest.py @@ -2,14 +2,17 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # +from typing import Any, Mapping from unittest.mock import MagicMock +from airbyte_cdk.sources.streams import Stream from pytest import fixture from source_pinterest.reports import CampaignAnalyticsReport +from source_pinterest.source import SourcePinterest @fixture -def test_config(): +def test_config() -> Mapping[str, str]: return { "client_id": "test_client_id", "client_secret": "test_client_secret", @@ -19,7 +22,7 @@ def test_config(): @fixture -def wrong_date_config(): +def wrong_date_config() -> Mapping[str, str]: return { "client_id": "test_client_id", "client_secret": "test_client_secret", @@ -29,7 +32,7 @@ def wrong_date_config(): @fixture -def test_incremental_config(): +def test_incremental_config() -> Mapping[str, Any]: return { "authenticator": MagicMock(), "start_date": "2021-05-07", @@ -37,39 +40,48 @@ def test_incremental_config(): @fixture -def test_current_stream_state(): +def test_current_stream_state() -> Mapping[str, str]: return {"updated_time": "2021-10-22"} @fixture -def test_record(): +def test_record() -> Mapping[str, Any]: return {"items": [{}], "bookmark": "string"} @fixture -def test_record_filter(): +def test_record_filter() -> Mapping[str, Any]: return {"items": [{"updated_time": "2021-11-01"}], "bookmark": "string"} @fixture -def test_response(test_record): +def test_response(test_record) -> MagicMock: response = MagicMock() response.json.return_value = test_record return response @fixture -def test_response_filter(test_record_filter): - response = MagicMock() - response.json.return_value = test_record_filter - return response - - -@fixture -def analytics_report_stream(): +def analytics_report_stream() -> CampaignAnalyticsReport: return CampaignAnalyticsReport(parent=None, config=MagicMock()) @fixture -def date_range(): +def date_range() -> Mapping[str, Any]: return {"start_date": "2023-01-01", "end_date": "2023-01-31", "parent": {"id": "123"}} + + +@fixture(autouse=True) +def mock_auth(requests_mock) -> None: + requests_mock.post( + url="https://api.pinterest.com/v5/oauth/token", + json={"access_token": "access_token", "expires_in": 3600}, + ) + + +def get_stream_by_name(stream_name: str, config: Mapping[str, Any]) -> Stream: + source = SourcePinterest() + matches_by_name = [stream_config for stream_config in source.streams(config) if stream_config.name == stream_name] + if not matches_by_name: + raise ValueError("Please provide a valid stream name.") + return matches_by_name[0] diff --git a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_incremental_streams.py b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_incremental_streams.py index ca34553b28b6..355fe74b3a06 100644 --- a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_incremental_streams.py +++ b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_incremental_streams.py @@ -9,7 +9,9 @@ import pytest from airbyte_cdk.models import SyncMode from pytest import fixture -from source_pinterest.streams import AdAccountAnalytics, Campaigns, IncrementalPinterestSubStream +from source_pinterest.streams import IncrementalPinterestSubStream + +from .conftest import get_stream_by_name @fixture @@ -57,32 +59,83 @@ def test_stream_checkpoint_interval(patch_incremental_base_class): assert stream.state_checkpoint_interval == expected_checkpoint_interval -def test_request_params(patch_incremental_base_class): - stream = AdAccountAnalytics(None, config=MagicMock()) - test_slice = {"start_date": "2022-01-01", "end_date": "2022-01-02"} - expected_property = "columns" - res = stream.request_params({}, test_slice) - assert expected_property in res - - @pytest.mark.parametrize( ("http_status", "should_retry"), - [ + ( (HTTPStatus.OK, False), - (HTTPStatus.BAD_REQUEST, False), + (HTTPStatus.BAD_REQUEST, True), (HTTPStatus.TOO_MANY_REQUESTS, False), (HTTPStatus.INTERNAL_SERVER_ERROR, True), - ], + ), ) -def test_should_retry(patch_incremental_base_class, http_status, should_retry): +def test_should_retry(test_config, http_status, should_retry): response_mock = MagicMock() response_mock.status_code = http_status - stream = AdAccountAnalytics(None, config=MagicMock()) - assert stream.should_retry(response_mock) == should_retry + response_mock.ok = http_status == HTTPStatus.OK + stream = get_stream_by_name("ad_account_analytics", test_config) + assert stream.retriever.requester._should_retry(response_mock) == should_retry -def test_parse_response(patch_incremental_base_class, test_response_filter, test_current_stream_state): - stream = Campaigns(None, config=MagicMock()) - expected_parsed_object = [{"updated_time": "2021-11-01"}] - result = list(stream.parse_response(test_response_filter, test_current_stream_state)) - assert result == expected_parsed_object +@pytest.mark.parametrize( + ("start_date", "stream_state", "expected_records"), + ( + ( + None, + {}, + [ + {"id": "campaign_id_1", "ad_account_id": "ad_account_id", "updated_time": 1711929600}, + {"id": "campaign_id_2", "ad_account_id": "ad_account_id", "updated_time": 1712102400}, + ], + ), + ("2024-04-02", {}, [{"id": "campaign_id_2", "ad_account_id": "ad_account_id", "updated_time": 1712102400}]), + ( + "2024-03-30", + { + "states": [ + {"partition": {"id": "ad_account_id", "parent_slice": {}}, "cursor": {"updated_time": 1712016000}}, + ], + }, + [{"id": "campaign_id_2", "ad_account_id": "ad_account_id", "updated_time": 1712102400}], + ), + ( + "2024-04-02", + { + "states": [ + {"partition": {"id": "ad_account_id", "parent_slice": {}}, "cursor": {"updated_time": 1711929599}}, + ], + }, + [{"id": "campaign_id_2", "ad_account_id": "ad_account_id", "updated_time": 1712102400}], + ), + ( + None, + { + "states": [ + {"partition": {"id": "ad_account_id", "parent_slice": {}}, "cursor": {"updated_time": 1712016000}}, + ], + }, + [{"id": "campaign_id_2", "ad_account_id": "ad_account_id", "updated_time": 1712102400}], + ), + ), +) +def test_semi_incremental_read(requests_mock, test_config, start_date, stream_state, expected_records): + stream = get_stream_by_name("campaigns", test_config) + stream.config["start_date"] = start_date + + ad_account_id = "ad_account_id" + requests_mock.get(url="https://api.pinterest.com/v5/ad_accounts", json={"items": [{"id": ad_account_id}]}) + requests_mock.get( + url=f"https://api.pinterest.com/v5/ad_accounts/{ad_account_id}/campaigns", + json={ + "items": [ + {"id": "campaign_id_1", "ad_account_id": ad_account_id, "updated_time": 1711929600}, # 2024-04-01 + {"id": "campaign_id_2", "ad_account_id": ad_account_id, "updated_time": 1712102400}, # 2024-04-03 + ], + }, + ) + + stream.state = stream_state + actual_records = [ + dict(record) for stream_slice in stream.stream_slices(sync_mode=SyncMode.incremental) + for record in stream.read_records(sync_mode=SyncMode.incremental, stream_slice=stream_slice) + ] + assert actual_records == expected_records diff --git a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_reports.py b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_reports.py index 9bff0aa37036..df5c903ee347 100644 --- a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_reports.py +++ b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_reports.py @@ -1,12 +1,12 @@ # # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # + import copy import os from unittest.mock import MagicMock import pytest -import responses from source_pinterest import SourcePinterest from source_pinterest.reports import CampaignAnalyticsReport from source_pinterest.reports.reports import ( @@ -23,11 +23,10 @@ ProductItemReport, ) from source_pinterest.utils import get_analytics_columns -from unit_tests.test_source import setup_responses os.environ["REQUEST_CACHE_PATH"] = '/tmp' -@responses.activate + def test_request_body_json(analytics_report_stream, date_range): granularity = "DAY" columns = get_analytics_columns() @@ -44,8 +43,7 @@ def test_request_body_json(analytics_report_stream, date_range): assert body == expected_body -@responses.activate -def test_read_records(analytics_report_stream, date_range): +def test_read_records(requests_mock, analytics_report_stream, date_range): report_download_url = "https://download.report" report_request_url = "https://api.pinterest.com/v5/ad_accounts/123/reports" @@ -55,9 +53,9 @@ def test_read_records(analytics_report_stream, date_range): final_response = {"campaign_id": [{"metric": 1}]} - responses.add(responses.POST, report_request_url, json=initial_response) - responses.add(responses.GET, report_request_url, json=final_report_status, status=200) - responses.add(responses.GET, report_download_url, json=final_response, status=200) + requests_mock.post(report_request_url, json=initial_response) + requests_mock.get(report_request_url, json=final_report_status, status_code=200) + requests_mock.get(report_download_url, json=final_response, status_code=200) sync_mode = "full_refresh" cursor_field = ["last_updated"] @@ -70,19 +68,15 @@ def test_read_records(analytics_report_stream, date_range): expected_record = {"metric": 1} assert next(records) == expected_record - assert len(responses.calls) == 3 - assert responses.calls[0].request.url == report_request_url -@responses.activate def test_streams(test_config): - setup_responses() source = SourcePinterest() streams = source.streams(test_config) expected_streams_number = 32 assert len(streams) == expected_streams_number -@responses.activate + def test_custom_streams(test_config): config = copy.deepcopy(test_config) config['custom_reports'] = [{ @@ -97,15 +91,15 @@ def test_custom_streams(test_config): "columns": ["ADVERTISER_ID", "AD_ACCOUNT_ID", "AD_GROUP_ID", "CTR", "IMPRESSION_2"], "start_date": "2023-01-08" }] - setup_responses() source = SourcePinterest() streams = source.streams(config) expected_streams_number = 33 assert len(streams) == expected_streams_number + @pytest.mark.parametrize( - "report_name, expected_level", - [ + ("report_name", "expected_level"), + ( [CampaignAnalyticsReport, 'CAMPAIGN'], [CampaignTargetingReport, 'CAMPAIGN_TARGETING'], [AdvertiserReport, 'ADVERTISER'], @@ -118,8 +112,7 @@ def test_custom_streams(test_config): [ProductGroupTargetingReport, 'PRODUCT_GROUP_TARGETING'], [ProductItemReport, 'PRODUCT_ITEM'], [KeywordReport, 'KEYWORD'] - ], + ), ) def test_level(test_config, report_name, expected_level): assert report_name(parent=None, config=MagicMock()).level == expected_level - diff --git a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_source.py b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_source.py index 615e0aa9c109..b23a713797ff 100644 --- a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_source.py +++ b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_source.py @@ -5,27 +5,12 @@ from unittest.mock import MagicMock import pytest -import responses from airbyte_cdk.utils import AirbyteTracedException from source_pinterest.source import SourcePinterest -def setup_responses(): - responses.add( - responses.POST, - "https://api.pinterest.com/v5/oauth/token", - json={"access_token": "fake_access_token", "expires_in": 3600}, - ) - responses.add( - responses.GET, - "https://api.pinterest.com/v5/user_account", - json={}, - ) - - -@responses.activate -def test_check_connection(test_config): - setup_responses() +def test_check_connection(requests_mock, test_config): + requests_mock.get("https://api.pinterest.com/v5/boards", status_code=200) source = SourcePinterest() logger_mock = MagicMock() assert source.check_connection(logger_mock, test_config) == (True, None) @@ -39,15 +24,14 @@ def test_check_wrong_date_connection(wrong_date_config): assert e.value.message == "Entered `Start Date` wrong_date_format does not match format YYYY-MM-DD" -@responses.activate -def test_check_connection_expired_token(test_config): - responses.add(responses.POST, "https://api.pinterest.com/v5/oauth/token", status=401) +def test_check_connection_expired_token(requests_mock, test_config): + requests_mock.post("https://api.pinterest.com/v5/oauth/token", status_code=401) source = SourcePinterest() logger_mock = MagicMock() assert source.check_connection(logger_mock, test_config) == ( False, - "Try to re-authenticate because current refresh token is not valid. " - "401 Client Error: Unauthorized for url: https://api.pinterest.com/v5/oauth/token", + "Unable to connect to stream boards - 401 Client Error: None " + "for url: https://api.pinterest.com/v5/oauth/token", ) diff --git a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_streams.py b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_streams.py index bca080a29216..3251a9539b46 100644 --- a/airbyte-integrations/connectors/source-pinterest/unit_tests/test_streams.py +++ b/airbyte-integrations/connectors/source-pinterest/unit_tests/test_streams.py @@ -8,31 +8,12 @@ import pytest import requests -from source_pinterest.streams import ( - AdAccountAnalytics, - AdAccounts, - AdAnalytics, - AdGroupAnalytics, - AdGroups, - Ads, - Audiences, - BoardPins, - Boards, - BoardSectionPins, - BoardSections, - CampaignAnalytics, - Campaigns, - Catalogs, - CatalogsFeeds, - CatalogsProductGroups, - ConversionTags, - CustomerLists, - Keywords, - PinterestStream, - PinterestSubStream, - RateLimitExceeded, - UserAccountAnalytics, -) +from airbyte_cdk.models.airbyte_protocol import SyncMode +from airbyte_cdk.sources.declarative.types import StreamSlice +from source_pinterest.streams import PinterestAnalyticsStream, PinterestStream, PinterestSubStream, RateLimitExceeded +from source_pinterest.utils import get_analytics_columns + +from .conftest import get_stream_by_name os.environ["REQUEST_CACHE_PATH"] = "/tmp" @@ -49,6 +30,12 @@ def patch_base_class(mocker): mocker.patch.object(PinterestSubStream, "next_page_token", None) mocker.patch.object(PinterestSubStream, "parse_response", {}) mocker.patch.object(PinterestSubStream, "__abstractmethods__", set()) + # + mocker.patch.object(PinterestAnalyticsStream, "path", "v0/example_endpoint") + mocker.patch.object(PinterestAnalyticsStream, "primary_key", "test_primary_key") + mocker.patch.object(PinterestAnalyticsStream, "next_page_token", None) + mocker.patch.object(PinterestAnalyticsStream, "parse_response", {}) + mocker.patch.object(PinterestAnalyticsStream, "__abstractmethods__", set()) def test_request_params(patch_base_class): @@ -72,12 +59,17 @@ def test_parse_response(patch_base_class, test_response, test_current_stream_sta assert next(stream.parse_response(**inputs)) == expected_parsed_object -def test_parse_response_with_sensitive_data(patch_base_class): +def test_parse_response_with_sensitive_data(requests_mock, test_config): """Test that sensitive data is removed""" - stream = CatalogsFeeds(config=MagicMock()) - response = MagicMock() - response.json.return_value = {"items": [{"id": "CatalogsFeeds1", "credentials": {"password": "bla"}}], "bookmark": "string"} - actual_response = list(stream.parse_response(response=response, stream_state=None)) + stream = get_stream_by_name("catalogs_feeds", test_config) + requests_mock.get( + url="https://api.pinterest.com/v5/catalogs/feeds", + json={"items": [{"id": "CatalogsFeeds1", "credentials": {"password": "bla"}}]}, + ) + actual_response = [ + dict(record) for stream_slice in stream.stream_slices(sync_mode=SyncMode.full_refresh) + for record in stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice) + ] assert actual_response == [{"id": "CatalogsFeeds1"}] @@ -96,12 +88,12 @@ def test_http_method(patch_base_class): @pytest.mark.parametrize( ("http_status", "should_retry"), - [ + ( (HTTPStatus.OK, False), (HTTPStatus.BAD_REQUEST, False), (HTTPStatus.TOO_MANY_REQUESTS, False), (HTTPStatus.INTERNAL_SERVER_ERROR, True), - ], + ), ) def test_should_retry(patch_base_class, http_status, should_retry): response_mock = MagicMock() @@ -118,23 +110,23 @@ def test_backoff_time(patch_base_class): @pytest.mark.parametrize( - "test_response, status_code, expected", - [ + ("test_response", "status_code", "expected"), + ( ({"code": 8, "message": "You have exceeded your rate limit. Try again later."}, 429, False), ({"code": 7, "message": "Some other error message"}, 429, False), - ], + ), ) -def test_should_retry_on_max_rate_limit_error(requests_mock, test_response, status_code, expected): - stream = Boards(config=MagicMock()) +def test_should_retry_on_max_rate_limit_error(requests_mock, test_config, test_response, status_code, expected): + stream = get_stream_by_name("boards", test_config) url = "https://api.pinterest.com/v5/boards" requests_mock.get("https://api.pinterest.com/v5/boards", json=test_response, status_code=status_code) response = requests.get(url) - result = stream.should_retry(response) - assert result == expected + result = stream.retriever.requester._should_retry(response) + assert result is expected -def test_non_json_response(requests_mock): - stream = UserAccountAnalytics(parent=None, config=MagicMock()) +def test_non_json_response(requests_mock, patch_base_class): + stream = PinterestStream(config=MagicMock()) url = "https://api.pinterest.com/v5/boards" requests_mock.get("https://api.pinterest.com/v5/boards", text="some response", status_code=200) response = requests.get(url) @@ -146,19 +138,24 @@ def test_non_json_response(requests_mock): @pytest.mark.parametrize( - "test_response, test_headers, status_code, expected", - [ + ("test_response", "test_headers", "status_code", "expected"), + ( ({"code": 7, "message": "Some other error message"}, {"X-RateLimit-Reset": "2"}, 429, 2.0), ( {"code": 7, "message": "Some other error message"}, {"X-RateLimit-Reset": "2000"}, 429, - (RateLimitExceeded, "Rate limit exceeded for stream boards. Waiting time is longer than 10 minutes: 2000.0s."), + ( + RateLimitExceeded, + "Rate limit exceeded for stream pinterest_stream. Waiting time is longer than 10 minutes: 2000.0s.", + ), ), - ], + ), ) -def test_backoff_on_rate_limit_error(requests_mock, test_response, status_code, test_headers, expected): - stream = Boards(config=MagicMock()) +def test_backoff_on_rate_limit_error( + requests_mock, test_config, patch_base_class, test_response, status_code, test_headers, expected +): + stream = PinterestStream(config=MagicMock()) url = "https://api.pinterest.com/v5/boards" requests_mock.get( "https://api.pinterest.com/v5/boards", @@ -177,54 +174,69 @@ def test_backoff_on_rate_limit_error(requests_mock, test_response, status_code, assert result == expected +@pytest.mark.parametrize(("response", "expected_backoff_time"), (({"code": 1}, 1), ({}, None))) +def test_analytics_stream_backoff_time(patch_base_class, response, expected_backoff_time): + stream = PinterestAnalyticsStream(parent=None, config=MagicMock()) + response_mock = MagicMock() + response_mock.status_code = 400 + response_mock.json.return_value = response + assert stream.backoff_time(response_mock) == expected_backoff_time + + +def test_analytics_stream_request_params(patch_base_class): + stream = PinterestAnalyticsStream(parent=None, config=MagicMock()) + stream.analytics_target_ids = "target_id" + stream_slice = {"start_date": "2024-04-04", "end_date": "2024-04-05", "parent": {"id": "parent_id"}} + expected_params = { + "start_date": "2024-04-04", + "end_date": "2024-04-05", + "granularity": "DAY", + "columns": get_analytics_columns(), + "target_id": "parent_id", + } + assert stream.request_params(stream_state={}, stream_slice=stream_slice) == expected_params + + @pytest.mark.parametrize( - ("stream_cls, slice, expected"), - [ - (Boards(MagicMock()), None, "boards"), - (AdAccounts(MagicMock()), None, "ad_accounts"), - (BoardSections(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "boards/123/sections"), - (BoardPins(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "boards/123/pins"), - ( - BoardSectionPins(parent=None, config=MagicMock()), - {"sub_parent": {"parent": {"id": "234"}}, "parent": {"id": "123"}}, - "boards/234/sections/123/pins", - ), - (AdAccountAnalytics(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "ad_accounts/123/analytics"), - (Campaigns(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "ad_accounts/123/campaigns"), + ("stream_name", "stream_slice", "expected_path"), + ( + ("boards", None, "boards"), + ("ad_accounts", None, "ad_accounts"), + ("board_sections", {"id": "123"}, "boards/123/sections"), + ("board_pins", {"id": "123"}, "boards/123/pins"), + ("board_section_pins", {"parent_slice": {"id": "234"}, "id": "123"}, "boards/234/sections/123/pins"), + ("ad_account_analytics", {"id": "123"}, "ad_accounts/123/analytics"), + ("campaigns", {"id": "123"}, "ad_accounts/123/campaigns"), ( - CampaignAnalytics(parent=None, config=MagicMock()), - {"sub_parent": {"parent": {"id": "234"}}, "parent": {"id": "123"}}, - "ad_accounts/234/campaigns/analytics", + "campaign_analytics", + {"parent_slice": {"id": "234"}, "id": "123"}, + "ad_accounts/234/campaigns/analytics?campaign_ids=123", ), - (AdGroups(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "ad_accounts/123/ad_groups"), + ("ad_groups", {"id": "123"}, "ad_accounts/123/ad_groups"), ( - AdGroupAnalytics(parent=None, config=MagicMock()), - {"sub_parent": {"parent": {"id": "234"}}, "parent": {"id": "123"}}, - "ad_accounts/234/ad_groups/analytics", + "ad_group_analytics", + {"parent_slice": {"id": "234"}, "id": "123"}, + "ad_accounts/234/ad_groups/analytics?ad_group_ids=123", ), - (Ads(parent=None, config=MagicMock()), {"parent": {"id": "123"}}, "ad_accounts/123/ads"), + ("ads", {"id": "123"}, "ad_accounts/123/ads"), + ("ad_analytics", {"parent_slice": {"id": "234"}, "id": "123"}, "ad_accounts/234/ads/analytics?ad_ids=123"), + ("catalogs", None, "catalogs"), + ("catalogs_feeds", None, "catalogs/feeds"), + ("catalogs_product_groups", None, "catalogs/product_groups"), ( - AdAnalytics(parent=None, config=MagicMock()), - {"sub_parent": {"parent": {"id": "234"}}, "parent": {"id": "123"}}, - "ad_accounts/234/ads/analytics", - ), - (Catalogs(config=MagicMock()), None, "catalogs"), - (CatalogsFeeds(config=MagicMock()), None, "catalogs/feeds"), - (CatalogsProductGroups(config=MagicMock()), None, "catalogs/product_groups"), - ( - Keywords(parent=None, config=MagicMock()), - {"parent": {"id": "234", "ad_account_id": "AD_ACCOUNT_1"}}, + "keywords", + {"parent_slice": {"id": "AD_ACCOUNT_1"}, "id": "234"}, "ad_accounts/AD_ACCOUNT_1/keywords?ad_group_id=234", ), - (Audiences(parent=None, config=MagicMock()), {"parent": {"id": "AD_ACCOUNT_1"}}, "ad_accounts/AD_ACCOUNT_1/audiences"), - (ConversionTags(parent=None, config=MagicMock()), {"parent": {"id": "AD_ACCOUNT_1"}}, "ad_accounts/AD_ACCOUNT_1/conversion_tags"), - (CustomerLists(parent=None, config=MagicMock()), {"parent": {"id": "AD_ACCOUNT_1"}}, "ad_accounts/AD_ACCOUNT_1/customer_lists"), - ], + ("audiences", {"id": "AD_ACCOUNT_1"}, "ad_accounts/AD_ACCOUNT_1/audiences"), + ("conversion_tags", {"id": "AD_ACCOUNT_1"}, "ad_accounts/AD_ACCOUNT_1/conversion_tags"), + ("customer_lists", {"id": "AD_ACCOUNT_1"}, "ad_accounts/AD_ACCOUNT_1/customer_lists"), + ), ) -def test_path(patch_base_class, stream_cls, slice, expected): - stream = stream_cls - if slice: - result = stream.path(stream_slice=slice) - else: - result = stream.path() - assert result == expected +def test_path(test_config, stream_name, stream_slice, expected_path): + stream = get_stream_by_name(stream_name, test_config) + if stream_slice: + stream_slice = StreamSlice(partition=stream_slice, cursor_slice={}) + + result = stream.retriever.requester.get_path(stream_slice=stream_slice, stream_state=None, next_page_token=None) + assert result == expected_path diff --git a/docs/integrations/sources/pinterest-migrations.md b/docs/integrations/sources/pinterest-migrations.md index cd722c1d7119..c0c47ada2eb4 100644 --- a/docs/integrations/sources/pinterest-migrations.md +++ b/docs/integrations/sources/pinterest-migrations.md @@ -1,5 +1,68 @@ # Pinterest Migration Guide +## Upgrading to 2.0.0 + +We're continuously striving to enhance the quality and reliability of our connectors at Airbyte. +As part of our commitment to delivering exceptional service, we are transitioning source Pinterest from the Python Connector Development Kit (CDK) to our innovative low-code framework. +This is part of a strategic move to streamline many processes across connectors, bolstering maintainability and freeing us to focus more of our efforts on improving the performance and features of our evolving platform and growing catalog. +However, due to differences between the Python and low-code CDKs, this migration constitutes a breaking change. + +We’ve evolved and standardized how state is managed for incremental streams that are nested within a parent stream. +This change impacts how individual states are tracked and stored for each partition, using a more structured approach to ensure the most granular and flexible state management. +This change will affect the following streams: +- `ad_account_analytics` +- `ad_analytics` +- `ad_group_analytics` +- `ad_groups` +- `ads` +- `campaign_analytics` +- `campaigns` + +To gracefully handle these changes for your existing connections, we highly recommend resetting your data before resuming your data syncs with the new version. + +## Migration Steps + +### For Airbyte Open Source: Update the local connector image + +Airbyte Open Source users must manually update the connector image in their local registry before proceeding with the migration. To do so: + +1. Select **Settings** in the main navbar. + 1. Select **Sources**. +2. Find Pinterest in the list of connectors. + +:::note +You will see two versions listed, the current in-use version and the latest version available. +::: + +3. Select **Change** to update your OSS version to the latest available version. + +### Update the connector version + +1. Select **Sources** in the main navbar. +2. Select the instance of the connector you wish to upgrade. + +:::note +Each instance of the connector must be updated separately. If you have created multiple instances of a connector, updating one will not affect the others. +::: + +3. Select **Upgrade** + 1. Follow the prompt to confirm you are ready to upgrade to the new version. + +### Refresh affected schemas and reset data + +1. Select **Connections** in the main nav bar. + 1.1 Select the connection(s) affected by the update. +2. Select the **Schema** tab. +3. Uncheck all streams except the affected ones. +4. Select **Save changes** at the bottom of the page. +5. Select the **Settings** tab. +6. Press the **Clear your data** button. +7. Return to the **Schema** tab. +8. Check all your streams. +9. Select **Sync now** to sync your data + +For more information on resetting your data in Airbyte, see [this page](https://docs.airbyte.com/operator-guides/reset). + ## Upgrading to 1.0.0 This release updates date-time fields with airbyte_type: timestamp_without_timezone for streams BoardPins, BoardSectionPins, Boards, Catalogs, CatalogFeeds. Additionally, the stream names AdvertizerReport and AdvertizerTargetingReport have been renamed to AdvertiserReport and AdvertiserTargetingReport, respectively. diff --git a/docs/integrations/sources/pinterest.md b/docs/integrations/sources/pinterest.md index 9769dcb8ade7..ef476c937bb6 100644 --- a/docs/integrations/sources/pinterest.md +++ b/docs/integrations/sources/pinterest.md @@ -199,7 +199,8 @@ The connector is restricted by the Pinterest ## Changelog | Version | Date | Pull Request | Subject | -| :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +|:--------|:-----------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 2.0.0 | 2024-05-20 | [37698](https://github.com/airbytehq/airbyte/pull/37698) | Migrate to low-code | | 1.3.3 | 2024-04-24 | [36655](https://github.com/airbytehq/airbyte/pull/36655) | Schema descriptions and CDK 0.80.0 | | 1.3.2 | 2024-04-08 | [36912](https://github.com/airbytehq/airbyte/pull/36912) | Fix icon | | 1.3.1 | 2024-04-03 | [36806](https://github.com/airbytehq/airbyte/pull/36806) | Update airbyte-cdk count bug to emit recordCount as float |