1
0
mirror of synced 2025-12-25 02:09:19 -05:00

Source callrail: Migrate to manifest-only (#44591)

This commit is contained in:
Christo Grabowski
2024-08-23 17:34:17 -04:00
committed by GitHub
parent 66f058d99f
commit 01175db344
18 changed files with 829 additions and 1990 deletions

View File

@@ -1,89 +1,63 @@
# Callrail source connector
This directory contains the manifest-only connector for `source-callrail`.
This _manifest-only_ connector is not a Python package on its own, as it runs inside of the base `source-declarative-manifest` image.
This is the repository for the Callrail source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/callrail).
For information about how to configure and use this connector within Airbyte, see [the connector's full documentation](https://docs.airbyte.com/integrations/sources/callrail).
## Local development
### Prerequisites
* Python (~=3.9)
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
We recommend using the Connector Builder to edit this connector.
Using either Airbyte Cloud or your local Airbyte OSS instance, navigate to the **Builder** tab and select **Import a YAML**.
Then select the connector's `manifest.yaml` file to load the connector into the Builder. You're now ready to make changes to the connector!
### Installing the connector
From this connector directory, run:
```bash
poetry install --with dev
```
### Create credentials
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/callrail)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_callrail/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 `sample_files/sample_config.json` for a sample config file.
### Locally running the connector
```
poetry run source-callrail spec
poetry run source-callrail check --config secrets/config.json
poetry run source-callrail discover --config secrets/config.json
poetry run source-callrail read --config secrets/config.json --catalog sample_files/configured_catalog.json
```
### Running unit tests
To run unit tests locally, from the connector directory run:
```
poetry run pytest unit_tests
```
If you prefer to develop locally, you can follow the instructions below.
### Building the docker image
You can build any manifest-only connector with `airbyte-ci`:
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
2. Run the following command to build the docker image:
```bash
airbyte-ci connectors --name=source-callrail build
```
An image will be available on your host with the tag `airbyte/source-callrail:dev`.
### Creating credentials
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/callrail)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `spec` object in the connector's `manifest.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.
### Running as a docker container
Then run any of the connector commands as follows:
```
Then run any of the standard source connector commands:
```bash
docker run --rm airbyte/source-callrail:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-callrail:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-callrail:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-callrail:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
```
### Running our CI test suite
### Running the CI test suite
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-callrail test
```
### Customizing acceptance Tests
Customize `acceptance-test-config.yml` file to configure acceptance 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 be managed via Poetry.
To add a new dependency, run:
```bash
poetry add <package-name>
```
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
## 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-callrail test`
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
If you want to contribute changes to `source-callrail`, here's how you can do that:
1. Make your changes locally, or load the connector's manifest into Connector Builder and make changes there.
2. Make sure your changes are passing our test suite with `airbyte-ci connectors --name=source-callrail test`
3. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
- bump the `dockerImageTag` value in in `metadata.yaml`
- bump the `version` value in `pyproject.toml`
3. Make sure the `metadata.yaml` content is up to date.
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/callrail.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.

View File

@@ -1,3 +0,0 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

View File

@@ -3,7 +3,7 @@
connector_image: airbyte/source-callrail:dev
tests:
spec:
- spec_path: "source_callrail/spec.yaml"
- spec_path: "manifest.yaml"
timeout_seconds: 60
connection:
- config_path: "secrets/config.json"

View File

@@ -1,8 +0,0 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from source_callrail.run import run
if __name__ == "__main__":
run()

View File

@@ -0,0 +1,795 @@
version: 4.5.4
type: DeclarativeSource
check:
type: CheckStream
stream_names:
- users
definitions:
streams:
calls:
type: DeclarativeStream
name: calls
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: "{{ config['account_id'] }}/calls.json?"
http_method: GET
request_parameters:
fields: >-
call_type,company_id,company_name,company_time_zone,created_at,device_type,first_call,formatted_call_type,formatted_customer_location,formatted_business_phone_number,formatted_customer_name,prior_calls,formatted_customer_name_or_phone_number,formatted_customer_phone_number,formatted_duration,formatted_tracking_phone_number,formatted_tracking_source,formatted_value,good_lead_call_id,good_lead_call_time,lead_status,note,source,source_name,tags,total_calls,value,waveforms,tracker_id,speaker_percent,keywords,medium,campaign,referring_url,landing_page_url,last_requested_url,referrer_domain,utm_source,utm_medium,utm_term,utm_content,utm_campaign,utma,utmb,utmc,utmv,utmz,ga,gclid,fbclid,msclkid,milestones,timeline_url,keywords_spotted,call_highlights,agent_email,keypad_entries
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- calls
paginator:
type: DefaultPaginator
page_token_option:
type: RequestPath
page_size_option:
type: RequestOption
field_name: per_page
inject_into: request_parameter
pagination_strategy:
type: CursorPagination
page_size: 100
cursor_value: "{{ headers['link']['next']['url'] }}"
stop_condition: "{{ 'next' not in headers['link'] }}"
incremental_sync:
type: DatetimeBasedCursor
cursor_field: start_time
cursor_datetime_formats:
- "%Y-%m-%dT%H:%M:%S.%f%z"
datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z"
start_datetime:
type: MinMaxDatetime
datetime: "{{ config.start_date }}"
datetime_format: "%Y-%m-%d"
start_time_option:
type: RequestOption
field_name: start_date
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ today_utc() }}"
datetime_format: "%Y-%m-%d"
step: P100D
cursor_granularity: PT0.000001S
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/calls"
conversations:
type: DeclarativeStream
name: conversations
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: "{{ config['account_id'] }}/text-messages.json?"
http_method: GET
request_parameters:
fields: >-
id,company_id,initial_tracker_id,current_tracker_id,customer_name,customer_phone_number,initial_tracking_number,current_tracking_number,last_message_at,state,company_time_zone,formatted_customer_phone_number,formatted_initial_tracking_number,formatted_current_tracking_number,formatted_customer_name,recent_messages
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- conversations
paginator:
type: DefaultPaginator
page_token_option:
type: RequestPath
page_size_option:
type: RequestOption
field_name: per_page
inject_into: request_parameter
pagination_strategy:
type: CursorPagination
page_size: 100
cursor_value: "{{ headers['link']['next']['url'] }}"
stop_condition: "{{ 'next' not in headers['link'] }}"
incremental_sync:
type: DatetimeBasedCursor
cursor_field: last_message_at
cursor_datetime_formats:
- "%Y-%m-%dT%H:%M:%S.%f%z"
datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z"
start_datetime:
type: MinMaxDatetime
datetime: "{{ config.start_date }}"
datetime_format: "%Y-%m-%d"
start_time_option:
type: RequestOption
field_name: start_date
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ today_utc() }}"
datetime_format: "%Y-%m-%d"
step: P100D
cursor_granularity: PT0.000001S
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/conversations"
users:
type: DeclarativeStream
name: users
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: "{{ config['account_id'] }}/users.json?"
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- users
paginator:
type: DefaultPaginator
page_token_option:
type: RequestPath
page_size_option:
type: RequestOption
field_name: per_page
inject_into: request_parameter
pagination_strategy:
type: CursorPagination
page_size: 100
cursor_value: "{{ headers['link']['next']['url'] }}"
stop_condition: "{{ 'next' not in headers['link'] }}"
incremental_sync:
type: DatetimeBasedCursor
cursor_field: created_at
cursor_datetime_formats:
- "%Y-%m-%dT%H:%M:%S.%f%z"
datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z"
start_datetime:
type: MinMaxDatetime
datetime: "{{ config.start_date }}"
datetime_format: "%Y-%m-%d"
start_time_option:
type: RequestOption
field_name: start_date
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ today_utc() }}"
datetime_format: "%Y-%m-%d"
step: P100D
cursor_granularity: PT0.000001S
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/users"
companies:
type: DeclarativeStream
name: companies
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: "{{ config['account_id'] }}/companies.json?"
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- companies
paginator:
type: DefaultPaginator
page_token_option:
type: RequestPath
page_size_option:
type: RequestOption
field_name: per_page
inject_into: request_parameter
pagination_strategy:
type: CursorPagination
page_size: 100
cursor_value: "{{ headers['link']['next']['url'] }}"
stop_condition: "{{ 'next' not in headers['link'] }}"
incremental_sync:
type: DatetimeBasedCursor
cursor_field: created_at
cursor_datetime_formats:
- "%Y-%m-%dT%H:%M:%S.%f%z"
datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z"
start_datetime:
type: MinMaxDatetime
datetime: "{{ config.start_date }}"
datetime_format: "%Y-%m-%d"
start_time_option:
type: RequestOption
field_name: start_date
inject_into: request_parameter
end_datetime:
type: MinMaxDatetime
datetime: "{{ today_utc() }}"
datetime_format: "%Y-%m-%d"
step: P100D
cursor_granularity: PT0.000001S
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/companies"
base_requester:
type: HttpRequester
url_base: https://api.callrail.com/v3/a/
authenticator:
type: ApiKeyAuthenticator
header: Authorization
api_token: Token token={{ config.api_key }}
streams:
- $ref: "#/definitions/streams/calls"
- $ref: "#/definitions/streams/conversations"
- $ref: "#/definitions/streams/users"
- $ref: "#/definitions/streams/companies"
spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required:
- api_key
- account_id
- start_date
properties:
api_key:
type: string
description: API access key
airbyte_secret: true
order: 0
account_id:
type: string
description: Account ID
airbyte_secret: true
order: 1
start_date:
type: string
description: Start getting data from that date.
pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
examples:
- "%Y-%m-%d"
order: 2
additionalProperties: true
metadata:
autoImportSchema:
calls: false
conversations: false
users: false
companies: false
yamlComponents:
global:
- authenticator
testedStreams: {}
assist: {}
schemas:
calls:
type: object
properties:
agent_email:
type:
- "null"
- string
answered:
type:
- "null"
- boolean
business_phone_number:
type:
- "null"
- string
call_highlights:
type:
- "null"
- array
additionalProperties: true
items: {}
call_type:
type:
- "null"
- string
campaign:
type:
- "null"
- string
company_id:
type:
- "null"
- string
company_name:
type:
- "null"
- string
company_time_zone:
type:
- "null"
- string
created_at:
type:
- "null"
- string
format: date-time
customer_city:
type:
- "null"
- string
customer_country:
type:
- "null"
- string
customer_name:
type:
- "null"
- string
customer_phone_number:
type:
- "null"
- string
customer_state:
type:
- "null"
- string
device_type:
type:
- "null"
- string
direction:
type:
- "null"
- string
duration:
type:
- "null"
- integer
fbclid:
type:
- "null"
- string
first_call:
type:
- "null"
- boolean
formatted_business_phone_number:
type:
- "null"
- string
formatted_call_type:
type:
- "null"
- string
formatted_customer_location:
type:
- "null"
- string
formatted_customer_name:
type:
- "null"
- string
formatted_customer_name_or_phone_number:
type:
- "null"
- string
formatted_customer_phone_number:
type:
- "null"
- string
formatted_duration:
type:
- "null"
- string
formatted_tracking_phone_number:
type:
- "null"
- string
formatted_tracking_source:
type:
- "null"
- string
formatted_value:
type:
- "null"
- string
ga:
type:
- "null"
- string
gclid:
type:
- "null"
- string
good_lead_call_id:
type:
- "null"
- string
good_lead_call_time:
type:
- "null"
- string
format: date-time
id:
type:
- "null"
- string
keypad_entries:
type:
- "null"
- string
keywords:
type:
- "null"
- string
keywords_spotted:
type:
- "null"
- array
additionalProperties: true
items: {}
landing_page_url:
type:
- "null"
- string
last_requested_url:
type:
- "null"
- string
lead_status:
type:
- "null"
- string
medium:
type:
- "null"
- string
msclkid:
type:
- "null"
- string
note:
type:
- "null"
- string
prior_calls:
type:
- "null"
- integer
recording:
type:
- "null"
- string
recording_duration:
type:
- "null"
- integer
recording_player:
type:
- "null"
- string
referrer_domain:
type:
- "null"
- string
referring_url:
type:
- "null"
- string
source:
type:
- "null"
- string
source_name:
type:
- "null"
- string
speaker_percent:
type:
- "null"
- array
items: {}
start_time:
type:
- "null"
- string
format: date-time
tags:
type:
- "null"
- array
items: {}
timeline_url:
type:
- "null"
- string
total_calls:
type:
- "null"
- integer
tracker_id:
type:
- "null"
- string
tracking_phone_number:
type:
- "null"
- string
utm_campaign:
type:
- "null"
- string
utm_content:
type:
- "null"
- string
utm_medium:
type:
- "null"
- string
utm_source:
type:
- "null"
- string
utm_term:
type:
- "null"
- string
utma:
type:
- "null"
- string
utmb:
type:
- "null"
- string
utmc:
type:
- "null"
- string
utmv:
type:
- "null"
- string
utmz:
type:
- "null"
- string
value:
type:
- "null"
- string
voicemail:
type:
- "null"
- boolean
waveforms:
type:
- "null"
- array
items: {}
additionalProperties: true
conversations:
type: object
properties:
company_id:
type:
- "null"
- string
company_name:
type:
- "null"
- string
company_time_zone:
type:
- "null"
- string
current_tracker_id:
type:
- "null"
- string
current_tracking_number:
type:
- "null"
- string
customer_name:
type:
- "null"
- string
customer_phone_number:
type:
- "null"
- string
formatted_current_tracking_number:
type:
- "null"
- string
formatted_customer_name:
type:
- "null"
- string
formatted_customer_phone_number:
type:
- "null"
- string
formatted_initial_tracking_number:
type:
- "null"
- string
id:
type:
- "null"
- string
initial_tracker_id:
type:
- "null"
- string
initial_tracking_number:
type:
- "null"
- string
last_message_at:
type:
- "null"
- string
format: date-time
recent_messages:
type:
- "null"
- array
items:
type:
- "null"
- object
properties:
content:
type:
- "null"
- string
created_at:
type:
- "null"
- string
format: date-time
direction:
type:
- "null"
- string
state:
type:
- "null"
- string
tracker_name:
type:
- "null"
- string
additionalProperties: true
users:
type: object
properties:
accepted:
type:
- "null"
- boolean
created_at:
type:
- "null"
- string
format: date-time
email:
type:
- "null"
- string
first_name:
type:
- "null"
- string
id:
type:
- "null"
- string
last_name:
type:
- "null"
- string
name:
type:
- "null"
- string
role:
type:
- "null"
- string
additionalProperties: true
companies:
type: object
properties:
callscore_enabled:
type:
- "null"
- boolean
callscribe_enabled:
type:
- "null"
- boolean
created_at:
type:
- "null"
- string
format: date-time
disabled_at:
type:
- "null"
- string
format: date-time
dni_active:
type:
- "null"
- boolean
form_capture:
type:
- "null"
- boolean
id:
type:
- "null"
- string
keyword_spotting_enabled:
type:
- "null"
- boolean
lead_scoring_enabled:
type:
- "null"
- boolean
name:
type:
- "null"
- string
script_url:
type:
- "null"
- string
status:
type:
- "null"
- string
swap_cookie_duration:
type: integer
swap_exclude_jquery:
type:
- "null"
- string
swap_landing_override:
type:
- "null"
- string
swap_ppc_override:
type:
- "null"
- string
time_zone:
type:
- "null"
- string
additionalProperties: true

View File

@@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: dc98a6ad-2dd1-47b6-9529-2ec35820f9c6
dockerImageTag: 0.1.14
dockerImageTag: 0.2.0
dockerRepository: airbyte/source-callrail
githubIssueLabel: source-callrail
icon: callrail.svg
@@ -10,7 +10,7 @@ data:
name: CallRail
remoteRegistries:
pypi:
enabled: true
enabled: false
packageName: airbyte-source-callrail
registryOverrides:
cloud:
@@ -20,8 +20,8 @@ data:
releaseStage: alpha
documentationUrl: https://docs.airbyte.com/integrations/sources/callrail
tags:
- language:python
- cdk:low-code
- language:manifest-only
ab_internal:
sl: 100
ql: 100
@@ -38,5 +38,5 @@ data:
# type: GSM
# alias: airbyte-connector-testing-secret-store
connectorBuildOptions:
baseImage: docker.io/airbyte/python-connector-base:2.0.0@sha256:c44839ba84406116e8ba68722a0f30e8f6e7056c726f447681bb9e9ece8bd916
baseImage: docker.io/airbyte/source-declarative-manifest:4.5.4@sha256:b07a521add11f987c63c0db68c1b57e90bec0c985f1cb6f3c5a1940cde628a70
metadataSpecVersion: "1.0"

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +0,0 @@
[build-system]
requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
version = "0.1.14"
name = "source-callrail"
description = "Source implementation for Callrail."
authors = [ "Airbyte <contact@airbyte.io>",]
license = "MIT"
readme = "README.md"
documentation = "https://docs.airbyte.com/integrations/sources/callrail"
homepage = "https://airbyte.com"
repository = "https://github.com/airbytehq/airbyte"
[[tool.poetry.packages]]
include = "source_callrail"
[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = "1.0.0"
[tool.poetry.scripts]
source-callrail = "source_callrail.run:run"
[tool.poetry.group.dev.dependencies]
requests-mock = "^1.9.3"
pytest = "^6.1"
pytest-mock = "^3.6.1"

View File

@@ -1,8 +0,0 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from .source import SourceCallrail
__all__ = ["SourceCallrail"]

View File

@@ -1,128 +0,0 @@
version: "0.29.0"
definitions:
page_size: 100
step: "P100D"
schema_loader:
type: JsonFileSchemaLoader
file_path: "./source_callrail/schemas/{{ parameters['name'] }}.json"
requester:
type: HttpRequester
http_method: "GET"
authenticator:
type: ApiKeyAuthenticator
header: "Authorization"
api_token: "Token token={{ config.api_key }}"
incremental_sync:
type: "DatetimeBasedCursor"
start_datetime:
datetime: "{{ config.start_date }}"
datetime_format: "%Y-%m-%d"
end_datetime:
datetime: "{{ today_utc() }}"
datetime_format: "%Y-%m-%d"
step: "#/definitions/step"
start_time_option:
field_name: "start_date"
inject_into: "request_parameter"
datetime_format: "%Y-%m-%dT%H:%M:%S.%f%z"
cursor_granularity: "PT0.000001S"
retriever:
type: SimpleRetriever
$parameters:
url_base: "https://api.callrail.com/v3/a/"
record_selector:
extractor:
type: DpathExtractor
field_path: ["{{ parameters['name'] }}"]
paginator:
type: DefaultPaginator
pagination_strategy:
type: "CursorPagination"
cursor_value: "{{ headers['link']['next']['url'] }}"
stop_condition: "{{ 'next' not in headers['link'] }}"
page_size: 100
page_size_option:
field_name: "per_page"
inject_into: "request_parameter"
page_token_option:
type: RequestPath
calls_stream:
$parameters:
name: "calls"
cursor_field: "start_time"
primary_key: "id"
schema_loader:
$ref: "#/definitions/schema_loader"
incremental_sync:
$ref: "#/definitions/incremental_sync"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/requester"
path: "{{ config['account_id'] }}/calls.json?"
request_parameters:
fields: "call_type,company_id,company_name,company_time_zone,created_at,device_type,first_call,formatted_call_type,formatted_customer_location,formatted_business_phone_number,formatted_customer_name,prior_calls,formatted_customer_name_or_phone_number,formatted_customer_phone_number,formatted_duration,formatted_tracking_phone_number,formatted_tracking_source,formatted_value,good_lead_call_id,good_lead_call_time,lead_status,note,source,source_name,tags,total_calls,value,waveforms,tracker_id,speaker_percent,keywords,medium,campaign,referring_url,landing_page_url,last_requested_url,referrer_domain,utm_source,utm_medium,utm_term,utm_content,utm_campaign,utma,utmb,utmc,utmv,utmz,ga,gclid,fbclid,msclkid,milestones,timeline_url,keywords_spotted,call_highlights,agent_email,keypad_entries"
conversations_stream:
$parameters:
name: "conversations"
cursor_field: "last_message_at"
primary_key: "id"
schema_loader:
$ref: "#/definitions/schema_loader"
incremental_sync:
$ref: "#/definitions/incremental_sync"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/requester"
path: "{{ config['account_id'] }}/text-messages.json?"
request_parameters:
fields: "id,company_id,initial_tracker_id,current_tracker_id,customer_name,customer_phone_number,initial_tracking_number,current_tracking_number,last_message_at,state,company_time_zone,formatted_customer_phone_number,formatted_initial_tracking_number,formatted_current_tracking_number,formatted_customer_name,recent_messages"
users_stream:
$parameters:
name: "users"
cursor_field: "created_at"
primary_key: "id"
schema_loader:
$ref: "#/definitions/schema_loader"
incremental_sync:
$ref: "#/definitions/incremental_sync"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/requester"
path: "{{ config['account_id'] }}/users.json?"
companies_stream:
$parameters:
name: "companies"
cursor_field: "created_at"
primary_key: "id"
schema_loader:
$ref: "#/definitions/schema_loader"
incremental_sync:
$ref: "#/definitions/incremental_sync"
retriever:
$ref: "#/definitions/retriever"
requester:
$ref: "#/definitions/requester"
path: "{{ config['account_id'] }}/companies.json?"
streams:
- "#/definitions/calls_stream"
- "#/definitions/conversations_stream"
- "#/definitions/users_stream"
- "#/definitions/companies_stream"
check:
type: CheckStream
stream_names:
- users

View File

@@ -1,14 +0,0 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import sys
from airbyte_cdk.entrypoint import launch
from source_callrail import SourceCallrail
def run():
source = SourceCallrail()
launch(source, sys.argv[1:])

View File

@@ -1,231 +0,0 @@
{
"type": "object",
"properties": {
"answered": {
"type": ["null", "boolean"]
},
"business_phone_number": {
"type": ["null", "string"]
},
"customer_city": {
"type": ["null", "string"]
},
"customer_country": {
"type": ["null", "string"]
},
"customer_name": {
"type": ["null", "string"]
},
"customer_phone_number": {
"type": ["null", "string"]
},
"customer_state": {
"type": ["null", "string"]
},
"direction": {
"type": ["null", "string"]
},
"duration": {
"type": ["null", "integer"]
},
"id": {
"type": ["null", "string"]
},
"recording": {
"type": ["null", "string"]
},
"recording_duration": {
"type": ["null", "integer"]
},
"recording_player": {
"type": ["null", "string"]
},
"start_time": {
"type": ["null", "string"],
"format": "date-time"
},
"tracking_phone_number": {
"type": ["null", "string"]
},
"voicemail": {
"type": ["null", "boolean"]
},
"call_type": {
"type": ["null", "string"]
},
"company_id": {
"type": ["null", "string"]
},
"company_name": {
"type": ["null", "string"]
},
"company_time_zone": {
"type": ["null", "string"]
},
"created_at": {
"type": ["null", "string"],
"format": "date-time"
},
"device_type": {
"type": ["null", "string"]
},
"first_call": {
"type": ["null", "boolean"]
},
"formatted_call_type": {
"type": ["null", "string"]
},
"formatted_customer_location": {
"type": ["null", "string"]
},
"formatted_business_phone_number": {
"type": ["null", "string"]
},
"formatted_customer_name": {
"type": ["null", "string"]
},
"prior_calls": {
"type": ["null", "integer"]
},
"formatted_customer_name_or_phone_number": {
"type": ["null", "string"]
},
"formatted_customer_phone_number": {
"type": ["null", "string"]
},
"formatted_duration": {
"type": ["null", "string"]
},
"formatted_tracking_phone_number": {
"type": ["null", "string"]
},
"formatted_tracking_source": {
"type": ["null", "string"]
},
"formatted_value": {
"type": ["null", "string"]
},
"good_lead_call_id": {
"type": ["null", "string"]
},
"good_lead_call_time": {
"type": ["null", "string"],
"format": "date-time"
},
"lead_status": {
"type": ["null", "string"]
},
"note": {
"type": ["null", "string"]
},
"source": {
"type": ["null", "string"]
},
"source_name": {
"type": ["null", "string"]
},
"tags": {
"type": ["null", "array"],
"items": {}
},
"total_calls": {
"type": ["null", "integer"]
},
"value": {
"type": ["null", "string"]
},
"waveforms": {
"type": ["null", "array"],
"items": {}
},
"tracker_id": {
"type": ["null", "string"]
},
"speaker_percent": {
"type": ["null", "array"],
"items": {}
},
"keywords": {
"type": ["null", "string"]
},
"medium": {
"type": ["null", "string"]
},
"campaign": {
"type": ["null", "string"]
},
"referring_url": {
"type": ["null", "string"]
},
"landing_page_url": {
"type": ["null", "string"]
},
"last_requested_url": {
"type": ["null", "string"]
},
"referrer_domain": {
"type": ["null", "string"]
},
"utm_source": {
"type": ["null", "string"]
},
"utm_medium": {
"type": ["null", "string"]
},
"utm_term": {
"type": ["null", "string"]
},
"utm_content": {
"type": ["null", "string"]
},
"utm_campaign": {
"type": ["null", "string"]
},
"utma": {
"type": ["null", "string"]
},
"utmb": {
"type": ["null", "string"]
},
"utmc": {
"type": ["null", "string"]
},
"utmv": {
"type": ["null", "string"]
},
"utmz": {
"type": ["null", "string"]
},
"ga": {
"type": ["null", "string"]
},
"gclid": {
"type": ["null", "string"]
},
"fbclid": {
"type": ["null", "string"]
},
"msclkid": {
"type": ["null", "string"]
},
"timeline_url": {
"type": ["null", "string"]
},
"keywords_spotted": {
"type": ["null", "array"],
"items": {},
"additionalProperties": true
},
"call_highlights": {
"type": ["null", "array"],
"items": {},
"additionalProperties": true
},
"agent_email": {
"type": ["null", "string"]
},
"keypad_entries": {
"type": ["null", "string"]
}
}
}

View File

@@ -1,58 +0,0 @@
{
"type": "object",
"properties": {
"id": {
"type": ["null", "string"]
},
"name": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
},
"time_zone": {
"type": ["null", "string"]
},
"created_at": {
"type": ["null", "string"],
"format": "date-time"
},
"disabled_at": {
"type": ["null", "string"],
"format": "date-time"
},
"dni_active": {
"type": ["null", "boolean"]
},
"script_url": {
"type": ["null", "string"]
},
"callscore_enabled": {
"type": ["null", "boolean"]
},
"lead_scoring_enabled": {
"type": ["null", "boolean"]
},
"swap_exclude_jquery": {
"type": ["null", "string"]
},
"swap_ppc_override": {
"type": ["null", "string"]
},
"swap_landing_override": {
"type": ["null", "string"]
},
"swap_cookie_duration": {
"type": "integer"
},
"callscribe_enabled": {
"type": ["null", "boolean"]
},
"keyword_spotting_enabled": {
"type": ["null", "boolean"]
},
"form_capture": {
"type": ["null", "boolean"]
}
}
}

View File

@@ -1,36 +0,0 @@
{
"type": "object",
"properties": {
"id": { "type": ["null", "string"] },
"initial_tracker_id": { "type": ["null", "string"] },
"current_tracker_id": { "type": ["null", "string"] },
"customer_name": { "type": ["null", "string"] },
"customer_phone_number": { "type": ["null", "string"] },
"initial_tracking_number": { "type": ["null", "string"] },
"current_tracking_number": { "type": ["null", "string"] },
"last_message_at": { "type": ["null", "string"], "format": "date-time" },
"state": { "type": ["null", "string"] },
"formatted_customer_phone_number": { "type": ["null", "string"] },
"formatted_initial_tracking_number": { "type": ["null", "string"] },
"formatted_current_tracking_number": { "type": ["null", "string"] },
"formatted_customer_name": { "type": ["null", "string"] },
"company_time_zone": { "type": ["null", "string"] },
"tracker_name": { "type": ["null", "string"] },
"company_name": { "type": ["null", "string"] },
"company_id": { "type": ["null", "string"] },
"recent_messages": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"direction": { "type": ["null", "string"] },
"content": { "type": ["null", "string"] },
"created_at": {
"type": ["null", "string"],
"format": "date-time"
}
}
}
}
}
}

View File

@@ -1,13 +0,0 @@
{
"type": "object",
"properties": {
"email": { "type": ["null", "string"] },
"id": { "type": ["null", "string"] },
"created_at": { "type": ["null", "string"], "format": "date-time" },
"role": { "type": ["null", "string"] },
"first_name": { "type": ["null", "string"] },
"last_name": { "type": ["null", "string"] },
"name": { "type": ["null", "string"] },
"accepted": { "type": ["null", "boolean"] }
}
}

View File

@@ -1,18 +0,0 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource
"""
This file provides the necessary constructs to interpret a provided declarative YAML configuration file into
source connector.
WARNING: Do not modify this file.
"""
# Declarative Source
class SourceCallrail(YamlDeclarativeSource):
def __init__(self):
super().__init__(**{"path_to_yaml": "manifest.yaml"})

View File

@@ -1,25 +0,0 @@
documentationUrl: https://docs.airbyte.com/integrations/sources/callrail
connectionSpecification:
$schema: http://json-schema.org/draft-07/schema#
title: Call Rail Spec
type: object
required:
- api_key
- account_id
- start_date
additionalProperties: true
properties:
api_key:
type: string
description: API access key
airbyte_secret: true
account_id:
type: string
description: Account ID
airbyte_secret: true
start_date:
type: string
description: Start getting data from that date.
pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
examples:
- "%Y-%m-%d"

View File

@@ -37,6 +37,7 @@ This Source is capable of syncing the following core Streams:
| Version | Date | Pull Request | Subject |
| :------ | :--------- | :------------------------------------------------------- | :---------------------- |
| 0.2.0 | 2024-08-23 | [44591](https://github.com/airbytehq/airbyte/pull/44591) | Refactor connector to manifest-only format |
| 0.1.14 | 2024-08-17 | [44240](https://github.com/airbytehq/airbyte/pull/44240) | Update dependencies |
| 0.1.13 | 2024-08-12 | [43796](https://github.com/airbytehq/airbyte/pull/43796) | Update dependencies |
| 0.1.12 | 2024-08-10 | [43705](https://github.com/airbytehq/airbyte/pull/43705) | Update dependencies |