From f2e28758496fb288d81a0b58db3d487cb60e451b Mon Sep 17 00:00:00 2001 From: Christo Date: Mon, 11 Mar 2024 13:08:53 -0400 Subject: [PATCH] remove google workspace admin reports from repo --- .../.dockerignore | 6 - .../.gitignore | 1 - .../Dockerfile | 38 - .../README.md | 67 -- .../acceptance-test-config.yml | 26 - .../integration_tests/__init__.py | 0 .../integration_tests/abnormal_state.json | 20 - .../integration_tests/acceptance.py | 14 - .../integration_tests/configured_catalog.json | 76 -- .../integration_tests/invalid_config.json | 5 - .../main.py | 8 - .../metadata.yaml | 6 +- .../requirements.txt | 2 - .../sample_files/configured_catalog.json | 1008 ----------------- .../setup.py | 51 - .../__init__.py | 3 - .../api.py | 193 ---- .../client.py | 52 - .../run.py | 14 - .../schemas/admin.json | 121 -- .../schemas/drive.json | 115 -- .../schemas/logins.json | 117 -- .../schemas/meet.json | 116 -- .../schemas/mobile.json | 117 -- .../schemas/oauth_tokens.json | 185 --- .../source.py | 12 - .../spec.json | 30 - .../utils.py | 16 - .../unit_tests/unit_test.py | 7 - 29 files changed, 3 insertions(+), 2423 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/.dockerignore delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/.gitignore delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/README.md delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json delete mode 100755 airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/main.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/configured_catalog.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/__init__.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/client.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/run.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/meet.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/source.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/spec.json delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/utils.py delete mode 100644 airbyte-integrations/connectors/source-google-workspace-admin-reports/unit_tests/unit_test.py diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/.dockerignore b/airbyte-integrations/connectors/source-google-workspace-admin-reports/.dockerignore deleted file mode 100644 index 59ee1b829e95..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -* -!Dockerfile -!main.py -!source_google_workspace_admin_reports -!setup.py -!secrets diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/.gitignore b/airbyte-integrations/connectors/source-google-workspace-admin-reports/.gitignore deleted file mode 100644 index 29fffc6a50cc..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/.gitignore +++ /dev/null @@ -1 +0,0 @@ -NEW_SOURCE_CHECKLIST.md diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile b/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile deleted file mode 100644 index 6a4be680b776..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM python:3.9.11-alpine3.15 as base - -# build and load all requirements -FROM base as builder -WORKDIR /airbyte/integration_code - -# upgrade pip to the latest version -RUN apk --no-cache upgrade \ - && pip install --upgrade pip \ - && apk --no-cache add tzdata build-base - - -COPY setup.py ./ -# install necessary packages to a temporary folder -RUN pip install --prefix=/install . - -# build a clean environment -FROM base -WORKDIR /airbyte/integration_code - -# copy all loaded and built libraries to a pure basic image -COPY --from=builder /install /usr/local -# add default timezone settings -COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime -RUN echo "Etc/UTC" > /etc/timezone - -# bash is installed for more convenient debugging. -RUN apk --no-cache add bash - -# copy payload code only -COPY main.py ./ -COPY source_google_workspace_admin_reports ./source_google_workspace_admin_reports - -ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" -ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] - -LABEL io.airbyte.version=0.1.8 -LABEL io.airbyte.name=airbyte/source-google-workspace-admin-reports diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/README.md b/airbyte-integrations/connectors/source-google-workspace-admin-reports/README.md deleted file mode 100644 index baf8c2eeffab..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Wikipedia Pageviews Source - -This is the repository for the Wikipedia Pageviews configuration based source connector. -For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/wikipedia-pageviews). - -## Local development - -#### Create credentials -**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/wikipedia-pageviews) -to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_wikipedia_pageviews/spec.yaml` file. -Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. -See `integration_tests/sample_config.json` for a sample config file. - -**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source wikipedia-pageviews test creds` -and place them into `secrets/config.json`. - -### Locally running the connector docker image - - -#### Build -**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):** -```bash -airbyte-ci connectors --name source-wikipedia-pageviews build -``` - -An image will be built with the tag `airbyte/source-wikipedia-pageviews:dev`. - -**Via `docker build`:** -```bash -docker build -t airbyte/source-wikipedia-pageviews:dev . -``` - -#### Run -Then run any of the connector commands as follows: -``` -docker run --rm airbyte/source-wikipedia-pageviews:dev spec -docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-wikipedia-pageviews:dev check --config /secrets/config.json -docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-wikipedia-pageviews:dev discover --config /secrets/config.json -docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-wikipedia-pageviews:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json -``` - -## Testing -You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md): -```bash -airbyte-ci connectors --name=source-google-workspace-admin-reports test -``` - -### Customizing acceptance Tests -Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. -If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. - -## Dependency Management -All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development. -We split dependencies between two groups, dependencies that are: -* required for your connector to work need to go to `MAIN_REQUIREMENTS` list. -* required for the testing need to go to `TEST_REQUIREMENTS` list - -### Publishing a new version of the connector -You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what? -1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-workspace-admin-reports test` -2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors). -3. Make sure the `metadata.yaml` content is up to date. -4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/google-workspace-admin-reports.md`). -5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention). -6. Pat yourself on the back for being an awesome contributor. -7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master. - diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml deleted file mode 100755 index 78e2d1fe2aa6..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/acceptance-test-config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) -# for more information about how to configure these tests -connector_image: airbyte/source-google-workspace-admin-reports:dev -tests: - spec: - - spec_path: "source_google_workspace_admin_reports/spec.json" - connection: - - config_path: "secrets/config.json" - status: "succeed" - - config_path: "integration_tests/invalid_config.json" - status: "failed" - discovery: - - config_path: "secrets/config.json" - basic_read: - - config_path: "secrets/config.json" - configured_catalog_path: "integration_tests/configured_catalog.json" - empty_streams: ["admin"] - # We have active test account. New records in reports appear frequently. - # Therefore, second activity differs from first, and it brakes test. - # full_refresh: - # - config_path: "secrets/config.json" - # configured_catalog_path: "integration_tests/configured_catalog.json" - incremental: - - config_path: "secrets/config.json" - configured_catalog_path: "integration_tests/configured_catalog.json" - future_state_path: "integration_tests/abnormal_state.json" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/__init__.py deleted file mode 100755 index e69de29bb2d1..000000000000 diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json deleted file mode 100755 index 10417016c164..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/abnormal_state.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "drive": { - "time": "2121-04-04T22:01:22.313Z" - }, - "oauth_tokens": { - "time": "2121-04-05T03:06:30.849Z" - }, - "admin": { - "time": "2121-04-05T03:06:30.849Z" - }, - "logins": { - "time": "2121-04-05T03:06:30.849Z" - }, - "meet": { - "time": "2121-04-05T03:06:30.849Z" - }, - "mobile": { - "time": "2121-04-05T03:06:30.849Z" - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py deleted file mode 100755 index 82823254d266..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/acceptance.py +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -import pytest - -pytest_plugins = ("connector_acceptance_test.plugin",) - - -@pytest.fixture(scope="session", autouse=True) -def connector_setup(): - """This fixture is a placeholder for external resources that acceptance test might require.""" - yield diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json deleted file mode 100755 index 2427cc906dbb..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/configured_catalog.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "streams": [ - { - "stream": { - "name": "admin", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "drive", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "logins", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "meet", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "mobile", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "oauth_tokens", - "json_schema": {}, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - } - ] -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json deleted file mode 100755 index b774ecc0558b..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/integration_tests/invalid_config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "credentials_json": "{\n \"type\": \"service_account\"}\n", - "email": "test_email", - "lookback": 0 -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/main.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/main.py deleted file mode 100644 index 1e88c29a963d..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/main.py +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - -from source_google_workspace_admin_reports.run import run - -if __name__ == "__main__": - run() diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml index e8d6d40b7ad6..9735413e3c63 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml @@ -16,9 +16,9 @@ data: registries: cloud: dockerImageTag: 0.1.4 - enabled: true + enabled: false oss: - enabled: true + enabled: false releaseStage: alpha documentationUrl: https://docs.airbyte.com/integrations/sources/google-workspace-admin-reports tags: @@ -27,5 +27,5 @@ data: ab_internal: sl: 100 ql: 100 - supportLevel: community + supportLevel: archived metadataSpecVersion: "1.0" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt b/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt deleted file mode 100644 index 7b9114ed5867..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -# This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. --e . diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/configured_catalog.json deleted file mode 100644 index f1a5b1d583b7..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/sample_files/configured_catalog.json +++ /dev/null @@ -1,1008 +0,0 @@ -{ - "streams": [ - { - "stream": { - "name": "admin", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId", "key"] - }, - "ownerDomain": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "intValue": { - "type": "string" - }, - "boolValue": { - "type": "string" - } - }, - "required": ["name", "value", "intValue", "boolValue"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "drive", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqQualifier", - "applicationName", - "customerId" - ] - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - }, - "key": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId", "key"] - }, - "ownerDomain": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "logins", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email", "profileId"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - }, - "required": ["name", "boolValue"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "meet", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId"] - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - }, - "required": ["name", "intValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "mobile", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId"] - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - }, - "required": ["name", "intValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - } - ] - } - }, - "required": ["type", "name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "oauth_tokens", - "json_schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": [ - "time", - "uniqueQualifier", - "applicationName", - "customerId" - ] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email", "profileId"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiMessageValue": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - }, - { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["name", "value"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["parameter"] - } - ] - } - }, - "required": ["name", "multiMessageValue"] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ] - } - }, - "required": ["name", "multiValue"] - } - ] - } - }, - "required": ["name", "parameters"] - } - ] - } - } - }, - "supported_sync_modes": ["incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["time"] - }, - "sync_mode": "incremental", - "cursor_field": ["time"], - "destination_sync_mode": "append" - } - ] -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py deleted file mode 100644 index 9d85298d1b15..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/setup.py +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -from setuptools import find_packages, setup - -MAIN_REQUIREMENTS = [ - "airbyte-cdk~=0.1", - "google-api-python-client==2.0.2", - "google-auth-httplib2==0.1.0", - "google-auth-oauthlib==0.4.3", - "backoff==1.10.0", - "pendulum==2.1.2", -] - -TEST_REQUIREMENTS = [ - "requests-mock~=1.9.3", - "pytest~=6.1", - "pytest-mock~=3.6.1", -] - -setup( - entry_points={ - "console_scripts": [ - "source-google-workspace-admin-reports=source_google_workspace_admin_reports.run:run", - ], - }, - name="source_google_workspace_admin_reports", - description="Source implementation for Google Workspace Admin Reports.", - author="Airbyte", - author_email="contact@airbyte.io", - packages=find_packages(), - install_requires=MAIN_REQUIREMENTS, - package_data={ - "": [ - # Include yaml files in the package (if any) - "*.yml", - "*.yaml", - # Include all json files in the package, up to 4 levels deep - "*.json", - "*/*.json", - "*/*/*.json", - "*/*/*/*.json", - "*/*/*/*/*.json", - ] - }, - extras_require={ - "tests": TEST_REQUIREMENTS, - }, -) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/__init__.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/__init__.py deleted file mode 100644 index 61310a7b08be..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .source import SourceGoogleWorkspaceAdminReports - -__all__ = ["SourceGoogleWorkspaceAdminReports"] diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py deleted file mode 100644 index 1fb9b723c15a..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/api.py +++ /dev/null @@ -1,193 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -import json -import socket -from abc import ABC, abstractmethod -from datetime import datetime, timedelta -from functools import partial -from typing import Any, Callable, Dict, Iterator, Mapping, Optional, Sequence - -import backoff -import pendulum -import pytz -from airbyte_cdk.entrypoint import logger -from google.oauth2 import service_account -from googleapiclient.discovery import Resource, build -from googleapiclient.errors import HttpError as GoogleApiHttpError - -from .utils import rate_limit_handling - -SCOPES = ["https://www.googleapis.com/auth/admin.reports.audit.readonly", "https://www.googleapis.com/auth/admin.reports.usage.readonly"] - - -class API: - def __init__(self, credentials_json: str, email: str, lookback: Optional[int] = None): - self._creds = None - self._credentials_json = credentials_json - self._admin_email = email - self._resource = None - self.lookback = lookback - - def _load_account_info(self) -> Dict: - account_info = json.loads(self._credentials_json) - return account_info - - def _obtain_creds(self) -> service_account.Credentials: - account_info = self._load_account_info() - creds = service_account.Credentials.from_service_account_info(account_info, scopes=SCOPES) - self._creds = creds.with_subject(self._admin_email) - - def _construct_resource(self) -> Resource: - if not self._creds: - self._obtain_creds() - service = build("admin", "reports_v1", credentials=self._creds) - return service - - def _get_resource(self, name: str): - service = self._construct_resource() - return getattr(service, name) - - @backoff.on_exception(backoff.expo, (GoogleApiHttpError, socket.timeout), max_tries=7, giveup=rate_limit_handling) - def get(self, name: str, params: Dict = None) -> Dict: - if not self._resource: - self._resource = self._get_resource(name) - response = self._resource().list(**params).execute() - return response - - -class StreamAPI(ABC): - results_per_page = 100 - - def __init__(self, api: API, *args, **kwargs): - super().__init__(*args, **kwargs) - self._api = api - self._start_time = None - if self._api.lookback: - base_start_time = datetime.utcnow() - timedelta(self._api.lookback) - self._start_time = base_start_time.replace(tzinfo=pytz.UTC).isoformat() - - @property - @abstractmethod - def name(self): - """Name of the stream""" - - def _api_get(self, resource: str, params: Dict = None): - return self._api.get(resource, params=params) - - @abstractmethod - def list(self, fields: Sequence[str] = None) -> Iterator[dict]: - """Iterate over entities""" - - @abstractmethod - def process_response(self, response: Dict) -> Iterator[dict]: - """Process Google Workspace Admin SDK Reports API response""" - - def read(self, getter: Callable, params: Dict = None) -> Iterator: - """Read using getter""" - params = params or {} - params["maxResults"] = self.results_per_page - while True: - batch = getter(params={**params}) - yield from self.process_response(batch) - - if "nextPageToken" in batch: - params["pageToken"] = batch["nextPageToken"] - else: - break - - -class IncrementalStreamAPI(StreamAPI, ABC): - """Stream that supports state and incremental read""" - - state_pk = "time" - - @property - def state(self) -> Optional[Mapping[str, Any]]: - """Current state, if wasn't set return None""" - if self._state: - return {self.state_pk: self._state.isoformat()} - return None - - @state.setter - def state(self, value): - self._state = pendulum.parse(value[self.state_pk]) - self._start_time = self._state.to_iso8601_string() - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self._state = None - - def read(self, getter: Callable, params: Mapping[str, Any] = None) -> Iterator: - """Update cursor(state)""" - params = params or {} - cursor = None - for record in super().read(getter, params): - "Report API return records from newest to oldest" - if not cursor: - cursor = pendulum.parse(record[self.state_pk]) - record[self.state_pk] = pendulum.parse(record[self.state_pk]).isoformat() - yield record - - if cursor: - new_state = max(cursor, self._state) if self._state else cursor - if new_state != self._state: - logger.info(f"Advancing bookmark for {self.name} stream from {self._state} to {new_state}") - self._state = new_state - - -class ActivitiesAPI(IncrementalStreamAPI): - application_name = None - - def get_params(self) -> Dict: - params = {"userKey": "all", "applicationName": self.application_name} - - if self._start_time: - params["startTime"] = self._start_time - - return params - - def process_response(self, response: Dict) -> Iterator[dict]: - activities = response.get("items", []) - for activity in activities: - activity_id = activity.get("id", {}) - if "time" in activity_id: - # place time property in top level - activity["time"] = activity_id["time"] - yield activity - - def list(self, fields: Sequence[str] = None) -> Iterator[dict]: - params = self.get_params() - yield from self.read(partial(self._api_get, resource="activities"), params=params) - - -class AdminAPI(ActivitiesAPI): - name = "Admin" - application_name = "admin" - - -class DriveAPI(ActivitiesAPI): - name = "Drive" - application_name = "drive" - - -class LoginsAPI(ActivitiesAPI): - name = "Logins" - application_name = "login" - - -class MeetAPI(ActivitiesAPI): - name = "Meet" - application_name = "meet" - - -class MobileAPI(ActivitiesAPI): - name = "Mobile" - application_name = "mobile" - - -class OAuthTokensAPI(ActivitiesAPI): - name = "OAuth Tokens" - application_name = "token" diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/client.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/client.py deleted file mode 100644 index 8498f4a61511..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/client.py +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -from typing import Any, Mapping, Optional, Tuple - -from airbyte_cdk.sources.deprecated.client import BaseClient - -from .api import API, AdminAPI, DriveAPI, IncrementalStreamAPI, LoginsAPI, MeetAPI, MobileAPI, OAuthTokensAPI - - -class Client(BaseClient): - def __init__(self, credentials_json: str, email: str, lookback: Optional[int] = None): - self._api = API(credentials_json, email, lookback) - self._apis = { - "admin": AdminAPI(self._api), - "drive": DriveAPI(self._api), - "logins": LoginsAPI(self._api), - "meet": MeetAPI(self._api), - "mobile": MobileAPI(self._api), - "oauth_tokens": OAuthTokensAPI(self._api), - } - super().__init__() - - def stream_has_state(self, name: str) -> bool: - """Tell if stream supports incremental sync""" - return isinstance(self._apis[name], IncrementalStreamAPI) - - def get_stream_state(self, name: str) -> Any: - """Get state of stream with corresponding name""" - return self._apis[name].state - - def set_stream_state(self, name: str, state: Any): - """Set state of stream with corresponding name""" - self._apis[name].state = state - - def _enumerate_methods(self) -> Mapping[str, callable]: - return {name: api.list for name, api in self._apis.items()} - - def health_check(self) -> Tuple[bool, str]: - alive = True - error_msg = None - - try: - params = {"userKey": "all", "applicationName": "login"} - self._api.get(name="activities", params=params) - except Exception as error: - alive = False - error_msg = repr(error) - - return alive, error_msg diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/run.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/run.py deleted file mode 100644 index b5ecb1fabd63..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/run.py +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -import sys - -from airbyte_cdk.entrypoint import launch -from source_google_workspace_admin_reports import SourceGoogleWorkspaceAdminReports - - -def run(): - source = SourceGoogleWorkspaceAdminReports() - launch(source, sys.argv[1:]) diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json deleted file mode 100644 index 06589fde0fdb..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/admin.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - } - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - }, - "key": { - "type": "string" - } - } - }, - "ownerDomain": { - "type": "string" - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json deleted file mode 100644 index 80595ba3b7b0..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/drive.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - } - }, - "etag": { - "type": ["string"] - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - } - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json deleted file mode 100644 index fcd940b36634..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/logins.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/meet.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/meet.json deleted file mode 100644 index d7599231bc2e..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/meet.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "profileId": { - "type": ["null", "string"] - } - } - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json deleted file mode 100644 index e653311d6f85..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/mobile.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "callerType": { - "type": "string" - }, - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["callerType", "email", "profileId"] - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json deleted file mode 100644 index 9acdc97e92eb..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/schemas/oauth_tokens.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "id": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "uniqueQualifier": { - "type": "string" - }, - "applicationName": { - "type": "string" - }, - "customerId": { - "type": "string" - } - }, - "required": ["time", "uniqueQualifier", "applicationName", "customerId"] - }, - "etag": { - "type": "string" - }, - "actor": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "profileId": { - "type": "string" - } - }, - "required": ["email", "profileId"] - }, - "ipAddress": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiMessageValue": { - "type": "array", - "items": { - "type": "object", - "properties": { - "parameter": { - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "intValue": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "boolValue": { - "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "multiValue": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - } - } - } - } - } - } - } - ] - } - } - } - } - }, - "time": { - "type": "string" - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/source.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/source.py deleted file mode 100644 index cbe4964a0157..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/source.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -from airbyte_cdk.sources.deprecated.base_source import BaseSource - -from .client import Client - - -class SourceGoogleWorkspaceAdminReports(BaseSource): - client_class = Client diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/spec.json b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/spec.json deleted file mode 100644 index 25a5263cedac..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/spec.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "documentationUrl": "https://docs.airbyte.com/integrations/sources/google-workspace-admin-reports", - "connectionSpecification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Google Directory Spec", - "type": "object", - "required": ["credentials_json", "email"], - "additionalProperties": false, - "properties": { - "credentials_json": { - "type": "string", - "title": "Credentials JSON", - "description": "The contents of the JSON service account key. See the docs for more information on how to generate this key.", - "airbyte_secret": true - }, - "email": { - "type": "string", - "title": "Email", - "description": "The email of the user, who has permissions to access the Google Workspace Admin APIs." - }, - "lookback": { - "type": "integer", - "title": "Lookback Window in Days", - "minimum": 0, - "maximum": 180, - "description": "Sets the range of time shown in the report. The maximum value allowed by the Google API is 180 days." - } - } - } -} diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/utils.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/utils.py deleted file mode 100644 index 4eae3d9c218e..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/source_google_workspace_admin_reports/utils.py +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -from googleapiclient.errors import HttpError - - -def rate_limit_handling(error): - retried_cases = [ - (503,), - ] - - if error.__class__ == HttpError: - return (error.resp.status,) not in retried_cases - return False diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/unit_tests/unit_test.py b/airbyte-integrations/connectors/source-google-workspace-admin-reports/unit_tests/unit_test.py deleted file mode 100644 index 219ae0142c72..000000000000 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/unit_tests/unit_test.py +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. -# - - -def test_example_method(): - assert True