diff --git a/airbyte-integrations/connectors/source-shortio/metadata.yaml b/airbyte-integrations/connectors/source-shortio/metadata.yaml index a28824b1c734..93e32393f9e3 100644 --- a/airbyte-integrations/connectors/source-shortio/metadata.yaml +++ b/airbyte-integrations/connectors/source-shortio/metadata.yaml @@ -17,7 +17,7 @@ data: connectorSubtype: api connectorType: source definitionId: 2fed2292-5586-480c-af92-9944e39fe12d - dockerImageTag: 0.2.2 + dockerImageTag: 0.2.3 dockerRepository: airbyte/source-shortio githubIssueLabel: source-shortio icon: shortio.svg diff --git a/airbyte-integrations/connectors/source-shortio/pyproject.toml b/airbyte-integrations/connectors/source-shortio/pyproject.toml index a9f5d68fa090..d6ec38f1b1d0 100644 --- a/airbyte-integrations/connectors/source-shortio/pyproject.toml +++ b/airbyte-integrations/connectors/source-shortio/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.2.2" +version = "0.2.3" name = "source-shortio" description = "Source implementation for Shortio." authors = [ "Airbyte ",] diff --git a/airbyte-integrations/connectors/source-shortio/source_shortio/manifest.yaml b/airbyte-integrations/connectors/source-shortio/source_shortio/manifest.yaml index fd5092b6e14a..9bf8e9585828 100644 --- a/airbyte-integrations/connectors/source-shortio/source_shortio/manifest.yaml +++ b/airbyte-integrations/connectors/source-shortio/source_shortio/manifest.yaml @@ -1,106 +1,432 @@ version: "0.86.0" definitions: - selector: - type: RecordSelector - extractor: - type: DpathExtractor - field_path: ["{{ parameters.extractor_path }}"] - - v1_api_requester: - type: HttpRequester - url_base: "https://api.short.io/api/" - http_method: "GET" - authenticator: - type: "ApiKeyAuthenticator" - header: "Authorization" - api_token: "{{ config['secret_key'] }}" - request_parameters: - domain_id: "{{ config['domain_id'] }}" - - v2_api_requester: - type: HttpRequester - url_base: "https://api-v2.short.cm/statistics/" - http_method: "GET" - authenticator: - type: "ApiKeyAuthenticator" - header: "Authorization" - api_token: "{{ config['secret_key'] }}" - - base_paginator: - type: "DefaultPaginator" - pagination_strategy: - type: "CursorPagination" - cursor_value: "{{ response['nextPageToken'] }}" - page_token_option: - type: "RequestPath" - field_name: "pageToken" - inject_into: "request_parameter" - - v1_base_stream: + links_stream: type: DeclarativeStream retriever: type: SimpleRetriever record_selector: - $ref: "#/definitions/selector" + type: RecordSelector + extractor: + type: DpathExtractor + field_path: ["links"] paginator: - $ref: "#/definitions/base_paginator" + type: "DefaultPaginator" + pagination_strategy: + type: "CursorPagination" + cursor_value: "{{ response['nextPageToken'] }}" + page_token_option: + type: "RequestPath" + field_name: "pageToken" + inject_into: "request_parameter" requester: - $ref: "#/definitions/v1_api_requester" + type: HttpRequester + url_base: "https://api.short.io/api/" + http_method: "GET" + path: "links" + authenticator: + type: "ApiKeyAuthenticator" + header: "Authorization" + api_token: "{{ config['secret_key'] }}" + request_parameters: + domain_id: "{{ config['domain_id'] }}" + name: "links" + incremental_sync: + type: DatetimeBasedCursor + cursor_field: "updatedAt" + datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" + cursor_granularity: "PT0.001S" + lookback_window: "P31D" + start_datetime: + datetime: "{{ config['start_date'] }}" + datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" + end_datetime: + datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%S.%f%z') }}" + datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" + step: "P1M" + end_time_option: + field_name: "beforeDate" + inject_into: "request_parameter" + start_time_option: + field_name: "afterDate" + inject_into: "request_parameter" + primary_key: "id" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/links" - v2_base_stream: + clicks_stream: type: DeclarativeStream retriever: type: SimpleRetriever record_selector: - $ref: "#/definitions/selector" + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] paginator: - $ref: "#/definitions/base_paginator" + type: "DefaultPaginator" + pagination_strategy: + type: "CursorPagination" + cursor_value: "{{ response['nextPageToken'] }}" + page_token_option: + type: "RequestPath" + field_name: "pageToken" + inject_into: "request_parameter" requester: - $ref: "#/definitions/v2_api_requester" - - incremental_base: - type: DatetimeBasedCursor - cursor_field: "updatedAt" - datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" - cursor_granularity: "PT0.001S" - lookback_window: "P31D" - start_datetime: - datetime: "{{ config['start_date'] }}" - datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" - end_datetime: - datetime: "{{ now_utc().strftime('%Y-%m-%dT%H:%M:%S.%f%z') }}" - datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z" - step: "P1M" - end_time_option: - field_name: "beforeDate" - inject_into: "request_parameter" - start_time_option: - field_name: "afterDate" - inject_into: "request_parameter" + type: HttpRequester + url_base: "https://api-v2.short.cm/statistics/" + http_method: "GET" + path: "domain/{{ config['domain_id'] }}/link_clicks" + authenticator: + type: "ApiKeyAuthenticator" + header: "Authorization" + api_token: "{{ config['secret_key'] }}" + name: "clicks" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/clicks" - links_stream: - $ref: "#/definitions/v1_base_stream" - name: "links" - incremental_sync: - $ref: "#/definitions/incremental_base" - primary_key: "id" - $parameters: - extractor_path: "links" - path: "links" +schemas: + links: + "$schema": http://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + lcpath: + type: + - "null" + - string + passwordContact: + type: + - "null" + - boolean + hasPassword: + type: + - "null" + - boolean + OwnerId: + type: + - "null" + - integer + id: + type: + - "null" + - string + path: + type: + - "null" + - string + title: + type: + - "null" + - string + icon: + type: + - "null" + - string + archived: + type: + - "null" + - boolean + originalURL: + type: string + iphoneURL: + type: + - "null" + - string + androidURL: + type: + - "null" + - string + password: + type: + - "null" + - string + utmSource: + type: + - "null" + - string + utmMedium: + type: + - "null" + - string + utmCampaign: + type: + - "null" + - string + utmCampaignId: + type: + - "null" + - string + utmTerm: + type: + - "null" + - string + utmContent: + type: + - "null" + - string + splitURL: + type: + - "null" + - string + splitPercent: + type: + - "null" + - string + expiresAt: + type: + - "null" + - string + expiredURL: + type: + - "null" + - string + redirectType: + type: + - "null" + - string + clicksLimit: + type: + - "null" + - string + cloaking: + type: + - "null" + - boolean + source: + type: + - "null" + - string + integrationGA: + type: + - "null" + - string + integrationFB: + type: + - "null" + - string + integrationAdroll: + type: + - "null" + - string + integrationGTM: + type: + - "null" + - string + AutodeletedAt: + type: + - "null" + - string + format: date-time + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + DomainId: + type: integer + Owner: + type: + - "null" + - object + properties: + id: + type: integer + name: + type: + - "null" + - string + email: + type: + - "null" + - string + photoURL: + type: + - "null" + - string + tags: + type: + - "null" + - array + items: + type: string + secureShortURL: + type: + - "null" + - string + idString: + type: string + shortURL: + type: string + User: + type: + - "null" + - object + properties: + id: + type: integer + name: + type: + - "null" + - string + email: + type: + - "null" + - string + photoURL: + type: + - "null" + - string - clicks_stream: - $ref: "#/definitions/v2_base_stream" - name: "clicks" - $parameters: - path: "domain/{{ config['domain_id'] }}/link_clicks" + clicks: + "$schema": http://json-schema.org/draft-07/schema# + type: object + default_cursor_field: + - dt + additionalProperties: true + properties: + host: + type: + - "null" + - string + path: + type: + - "null" + - string + method: + type: + - "null" + - string + url: + type: + - "null" + - string + dt: + type: + - "null" + - string + format: date-time + st: + type: + - "null" + - integer + ip: + type: + - "null" + - string + proto: + type: + - "null" + - string + ref: + type: + - "null" + - string + ua: + type: + - "null" + - string + human: + type: + - "null" + - boolean + browser: + type: + - "null" + - string + browser_version: + type: + - "null" + - string + country: + type: + - "null" + - string + city: + type: + - "null" + - string + social: + type: + - "null" + - string + refhost: + type: + - "null" + - string + os: + type: + - "null" + - string + utm_source: + type: + - "null" + - string + utm_medium: + type: + - "null" + - string + utm_campaign: + type: + - "null" + - string + goal_completed: + type: + - "null" + - string + ab_path: + type: + - "null" + - string + lcpath: + type: + - "null" + - string streams: - - "#/definitions/links_stream" - - "#/definitions/clicks_stream" + - $ref: "#/definitions/links_stream" + - $ref: "#/definitions/clicks_stream" check: type: CheckStream stream_names: - "links" - "clicks" + +spec: + type: Spec + documentation_url: https://docs.airbyte.com/integrations/sources/shortio/ + connection_specification: + $schema: http://json-schema.org/draft-07/schema# + title: Shortio Spec + type: object + additionalProperties: true + required: + - domain_id + - secret_key + - start_date + properties: + domain_id: + type: string + desciprtion: Short.io Domain ID + title: Domain ID + airbyte_secret: false + secret_key: + type: string + title: Secret Key + description: Short.io Secret Key + airbyte_secret: true + start_date: + type: string + title: Start Date + description: + UTC date and time in the format 2017-01-25T00:00:00Z. Any data + before this date will not be replicated. + examples: + - "2023-07-30T03:43:59.244Z" + airbyte_secret: false diff --git a/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/clicks.json b/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/clicks.json deleted file mode 100644 index f1d34afa1540..000000000000 --- a/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/clicks.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "default_cursor_field": ["dt"], - "additionalProperties": true, - "properties": { - "host": { - "type": ["null", "string"] - }, - "path": { - "type": ["null", "string"] - }, - "method": { - "type": ["null", "string"] - }, - "url": { - "type": ["null", "string"] - }, - "dt": { - "type": ["null", "string"], - "format": "date-time" - }, - "st": { - "type": ["null", "integer"] - }, - "ip": { - "type": ["null", "string"] - }, - "proto": { - "type": ["null", "string"] - }, - "ref": { - "type": ["null", "string"] - }, - "ua": { - "type": ["null", "string"] - }, - "human": { - "type": ["null", "boolean"] - }, - "browser": { - "type": ["null", "string"] - }, - "browser_version": { - "type": ["null", "string"] - }, - "country": { - "type": ["null", "string"] - }, - "city": { - "type": ["null", "string"] - }, - "social": { - "type": ["null", "string"] - }, - "refhost": { - "type": ["null", "string"] - }, - "os": { - "type": ["null", "string"] - }, - "utm_source": { - "type": ["null", "string"] - }, - "utm_medium": { - "type": ["null", "string"] - }, - "utm_campaign": { - "type": ["null", "string"] - }, - "goal_completed": { - "type": ["null", "string"] - }, - "ab_path": { - "type": ["null", "string"] - }, - "lcpath": { - "type": ["null", "string"] - } - } -} diff --git a/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/links.json b/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/links.json deleted file mode 100644 index 7a760d599524..000000000000 --- a/airbyte-integrations/connectors/source-shortio/source_shortio/schemas/links.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "lcpath": { - "type": ["null", "string"] - }, - "passwordContact": { - "type": ["null", "boolean"] - }, - "hasPassword": { - "type": ["null", "boolean"] - }, - "OwnerId": { - "type": ["null", "integer"] - }, - "id": { - "type": ["null", "string"] - }, - "path": { - "type": ["null", "string"] - }, - "title": { - "type": ["null", "string"] - }, - "icon": { - "type": ["null", "string"] - }, - "archived": { - "type": ["null", "boolean"] - }, - "originalURL": { - "type": "string" - }, - "iphoneURL": { - "type": ["null", "string"] - }, - "androidURL": { - "type": ["null", "string"] - }, - "password": { - "type": ["null", "string"] - }, - "utmSource": { - "type": ["null", "string"] - }, - "utmMedium": { - "type": ["null", "string"] - }, - "utmCampaign": { - "type": ["null", "string"] - }, - "utmCampaignId": { - "type": ["null", "string"] - }, - "utmTerm": { - "type": ["null", "string"] - }, - "utmContent": { - "type": ["null", "string"] - }, - "splitURL": { - "type": ["null", "string"] - }, - "splitPercent": { - "type": ["null", "string"] - }, - "expiresAt": { - "type": ["null", "string"] - }, - "expiredURL": { - "type": ["null", "string"] - }, - "redirectType": { - "type": ["null", "string"] - }, - "clicksLimit": { - "type": ["null", "string"] - }, - "cloaking": { - "type": ["null", "boolean"] - }, - "source": { - "type": ["null", "string"] - }, - "integrationGA": { - "type": ["null", "string"] - }, - "integrationFB": { - "type": ["null", "string"] - }, - "integrationAdroll": { - "type": ["null", "string"] - }, - "integrationGTM": { - "type": ["null", "string"] - }, - "AutodeletedAt": { - "type": ["null", "string"], - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "DomainId": { - "type": "integer" - }, - "Owner": { - "type": ["null", "object"], - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "photoURL": { - "type": ["null", "string"] - } - } - }, - "tags": { - "type": ["null", "array"], - "items": { - "type": "string" - } - }, - "secureShortURL": { - "type": ["null", "string"] - }, - "idString": { - "type": "string" - }, - "shortURL": { - "type": "string" - }, - "User": { - "type": ["null", "object"], - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": ["null", "string"] - }, - "email": { - "type": ["null", "string"] - }, - "photoURL": { - "type": ["null", "string"] - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-shortio/source_shortio/spec.yaml b/airbyte-integrations/connectors/source-shortio/source_shortio/spec.yaml deleted file mode 100644 index 09596cd87c36..000000000000 --- a/airbyte-integrations/connectors/source-shortio/source_shortio/spec.yaml +++ /dev/null @@ -1,30 +0,0 @@ -documentationUrl: https://docs.airbyte.com/integrations/sources/shortio/ -connectionSpecification: - $schema: http://json-schema.org/draft-07/schema# - title: Shortio Spec - type: object - additionalProperties: true - required: - - domain_id - - secret_key - - start_date - properties: - domain_id: - type: string - desciprtion: Short.io Domain ID - title: Domain ID - airbyte_secret: false - secret_key: - type: string - title: Secret Key - description: Short.io Secret Key - airbyte_secret: true - start_date: - type: string - title: Start Date - description: - UTC date and time in the format 2017-01-25T00:00:00Z. Any data - before this date will not be replicated. - examples: - - "2023-07-30T03:43:59.244Z" - airbyte_secret: false diff --git a/docs/integrations/sources/shortio.md b/docs/integrations/sources/shortio.md index ac43dc4ceb42..2ff21062f255 100644 --- a/docs/integrations/sources/shortio.md +++ b/docs/integrations/sources/shortio.md @@ -44,12 +44,13 @@ This Source is capable of syncing the following Streams: | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------ | -| 0.2.2 | 2024-06-04 | [38970](https://github.com/airbytehq/airbyte/pull/38970) | [autopull] Upgrade base image to v1.2.1 | -| 0.2.1 | 2024-05-02 | [37597](https://github.com/airbytehq/airbyte/pull/37597) | Change `last_records` to `last_record` | -| 0.2.0 | 2023-08-02 | [28950](https://github.com/airbytehq/airbyte/pull/28950) | Migrate to Low-Code CDK | -| 0.1.3 | 2022-08-01 | [15066](https://github.com/airbytehq/airbyte/pull/15066) | Update primary key to `idString` | -| 0.1.2 | 2021-12-28 | [8628](https://github.com/airbytehq/airbyte/pull/8628) | Update fields in source-connectors specifications | -| 0.1.1 | 2021-11-08 | [7499](https://github.com/airbytehq/airbyte/pull/7499) | Remove base-python dependencies | +| 0.2.3 | 2024-06-05 | [38842](https://github.com/airbytehq/airbyte/pull/38842) | Embed schemas and spec | +| 0.2.2 | 2024-06-04 | [38970](https://github.com/airbytehq/airbyte/pull/38970) | [autopull] Upgrade base image to v1.2.1 | +| 0.2.1 | 2024-05-02 | [37597](https://github.com/airbytehq/airbyte/pull/37597) | Change `last_records` to `last_record` | +| 0.2.0 | 2023-08-02 | [28950](https://github.com/airbytehq/airbyte/pull/28950) | Migrate to Low-Code CDK | +| 0.1.3 | 2022-08-01 | [15066](https://github.com/airbytehq/airbyte/pull/15066) | Update primary key to `idString` | +| 0.1.2 | 2021-12-28 | [8628](https://github.com/airbytehq/airbyte/pull/8628) | Update fields in source-connectors specifications | +| 0.1.1 | 2021-11-08 | [7499](https://github.com/airbytehq/airbyte/pull/7499) | Remove base-python dependencies | | 0.1.0 | 2021-08-16 | [3787](https://github.com/airbytehq/airbyte/pull/5418) | Add Native Shortio Source Connector | \ No newline at end of file