diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..46cceb9 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,44 @@ +name-template: 'v$RESOLVED_VERSION šŸŒˆ' +tag-template: 'v$RESOLVED_VERSION' +template: | + # What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + +categories: + - title: 'šŸš€ New Features' + labels: + - 'feature' + - 'enhancement' + - title: 'šŸ› Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: 'šŸ§° Maintenance' + labels: + - 'chore' + - 'docs' + - 'security' + - 'dependencies' + +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'feature' + - 'enhancement' + patch: + labels: + - 'fix' + - 'bugfix' + - 'bug' + - 'dependencies' + - 'security' + - 'docs' + - 'chore' + default: patch \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4824d92..2a47790 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,13 @@ ### A CI workflow template that runs linting and python testing -### TODO: Modify as needed or as desired. name: Test tap-fleetio on: [push] +env: + TAP_FLEETIO_API_TOKEN: ${{ secrets.TAP_FLEETIO_API_TOKEN }} + TAP_FLEETIO_ACCOUNT_TOKEN: ${{ secrets.TAP_FLEETIO_ACCOUNT_TOKEN }} + jobs: pytest: runs-on: ubuntu-latest @@ -12,7 +15,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.gitignore b/.gitignore index fc74522..72b94da 100644 --- a/.gitignore +++ b/.gitignore @@ -135,3 +135,6 @@ dmypy.json # Pyre type checker .pyre/ + +#Mac +.DS_Store diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..38ffd19 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,77 @@ +# Code of Conduct + +## **Our Pledge** + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## **Our Standards** + +Examples of behavior that contributes to a positive environment for our community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing othersā€™ private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## **Enforcement Responsibilities** + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## **Scope** + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## **Enforcement** + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [Fleetio](https://www.fleetio.com/contact). All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## **Enforcement Guidelines** + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## **Attribution** + +This Code of Conduct is adapted from theĀ **[Contributor Covenant](https://www.contributor-covenant.org/)**, version 2.1, available atĀ **https://www.contributor-covenant.org/version/2/1/code_of_conduct.html**. + +Community Impact Guidelines were inspired byĀ **[Mozillaā€™s code of conduct enforcement ladder](https://github.com/mozilla/diversity)**. + +For answers to common questions about this code of conduct, see the FAQ atĀ **https://www.contributor-covenant.org/faq**. Translations are available atĀ **https://www.contributor-covenant.org/translations**. \ No newline at end of file diff --git a/README.md b/README.md index 4647763..05747ac 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,43 @@ # tap-fleetio -`tap-fleetio` is a Singer tap for fleetio. +`tap-fleetio` is a Singer tap for [Fleetio](https://fleetio.com). Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps. - - ## Configuration ### Accepted Config Options - +## Capabilities + +* `catalog` +* `state` +* `discover` +* `about` +* `stream-maps` +* `schema-flattening` +* `batch` + +## Settings + +| Setting | Required | Default | Description | +|:--------------------|:--------:|:-------:|:------------| +| api_token | True | None | The token to authenticate against the Fleetio API | +| account_token | True | None | Account Token | +| api_url | False | https://secure.fleetio.com/api | Fleetio API base url | +| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). | +| stream_map_config | False | None | User-defined config values to be used within map expressions. | +| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. | +| flattening_max_depth| False | None | The max depth to flatten schemas. | +| batch_config | False | None | | A full list of supported settings and capabilities for this tap is available by running: @@ -53,10 +54,6 @@ environment variable is set either in the terminal context or in the `.env` file ### Source Authentication and Authorization - - ## Usage You can easily run `tap-fleetio` by itself or in a pipeline using [Meltano](https://meltano.com/). @@ -125,6 +122,9 @@ meltano invoke tap-fleetio --version meltano elt tap-fleetio target-jsonl ``` +### Fleetio API Docs +Further documentation about the Fleetio API can be found [here](https://developer.fleetio.com) + ### SDK Dev Guide See the [dev guide](https://sdk.meltano.com/en/latest/dev_guide.html) for more instructions on how to use the SDK to diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e6a3e5a --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,22 @@ +- [Security Policy](#security-policy) + - [Supported Versions](#supported-versions) + - [Dependabot Versioning](#dependabot-versioning) + - [Reporting a Vulnerability](#reporting-a-vulnerability) + +# Security Policy + +## Supported Versions + +We currently support the following python versions + +| Python Versions | +| --------------- | +| 3.10 | +| 3.11 | + +## Dependabot Versioning +By default, we have dependabot enabled on this repo to update any external packages we have to the latest version. Before merging those changes in, we inspect the changelog of the packages to be upgraded before merging + +## Reporting a Vulnerability + +If you notice a suspected security issue, please create a GitHub issue and be sure to use the `Security` tag. \ No newline at end of file diff --git a/meltano.yml b/meltano.yml index 15c6af1..c2ef3ca 100644 --- a/meltano.yml +++ b/meltano.yml @@ -20,9 +20,7 @@ plugins: kind: password - name: account_token kind: password - config: - start_date: '2010-01-01T00:00:00Z' loaders: - name: target-jsonl variant: andyh1203 - pip_url: target-jsonl + pip_url: target-jsonl \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 57ad071..1ef98e7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "appdirs" @@ -43,6 +43,46 @@ files = [ {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, ] +[[package]] +name = "backports-datetime-fromisoformat" +version = "2.0.1" +description = "Backport of Python 3.11's datetime.fromisoformat" +optional = false +python-versions = ">3" +files = [ + {file = "backports-datetime-fromisoformat-2.0.1.tar.gz", hash = "sha256:1b6afca7f47019c22df43062cde73c1af65fbdebc66520f352c690d52fd27127"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b739ccd3f36244f618f1fbc21d89894d9dc9d1d75a68762fcf917d433df38ae3"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:afd072ca32f2ca4e838e0f7b61a56168d98837ee9a182c567a49a834e07c2b98"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a136d85f8b1db4747aa9e56a8caa0ba77c5c25b761b18e2169ea7b1b516f012"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d3a0579958ade7db62c8238163e05d46a4de61c99cebb40031ed7409a44d5f6"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:199df62af8feff5da0f4953fdc4a6994bcd7dbfe1db95901d8b93d05feda2ab5"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:afe32e60a471831058ede14fc226d9f14120e6dc67d66fbbd36e1724826ad70b"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:a1ba7e226a9694b20b713867f71b5ed2f662603c39875f14f968608d331fc96a"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:403f155deecbe94d43d0679a74abb5c9ac441422a9ececcfde030fb133865659"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d2ee049997d3aa2e714489cb3c34864fb0f25786e7a4ff04ac9d82af58b453"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:20aa422769af9f72ca41d83238d4a3a008d6cd74bcff0a08befb11b0018d6aa5"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8ea8d85c3c9afa4ad51b6644d26516d43493f44c2131c12a2ba959433f4417f6"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:812b8c34e88a7d9615c604f1a0473a4e6d664aba94086bffb0c55627f9e3fb68"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:df5365930320b7a9d404cd6f7bc13988e28355e812aa42e21aa5c93443dcdd2e"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fe3e3968c8dce4a44da2da81a6031e992a4ee62d130c2536696d215a4db2ce3c"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:36a4abb678ab0d6a1965d70e21e424bcf7a52086a7afb1c5f13243a3d44fa2dd"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96b7e806ade09a91d8ce195c197fc799d8fbe6b8ea9cde21f8a01f1090e51e33"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:002a77bd4f549ff5e80f1ef4a9b69982746dd6190786b90abe3d9c69c9883ce4"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7b4ad0013a96b656ebf85079921ffb211623a1e28ff4981b3927690a2ed6df54"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:065421723e735ce8f68dbb4486f07562ce8556ed543ceaa012189b9aa209f303"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a4bf1bec08bc84095ee379202466c948fe12cff1442f58ee1a91fac4c5164c97"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1836aff09b8317e179cc7288856b61a450515d4b411f0ab723dc9692dfa5362e"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:815f85a581b142bcf34632c3ce26f7e21003f101ce88b5649631330e334bbe35"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a6986cfd3bc40b41465a6c54c18a30ca8110333d0b71f6062af136db11c8ff0"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:82741e732d71f78b44a8c3b95f33b3630e7bfbdb02e3fede3938cdf15d5b6a83"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4eac27abb51ee84e08d1dd1e908c16cae2078c217ff5b54092e6cb92107b4c6c"}, + {file = "backports_datetime_fromisoformat-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:3b730d72061523be9600bcd281ef353f7f73b1df095adbbdc364aac8f430c44c"}, + {file = "backports_datetime_fromisoformat-2.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6e8f28f4a68539192473f427ed86794931502d186e2fffa1926250550c1335a"}, + {file = "backports_datetime_fromisoformat-2.0.1-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0cef151f1df77e413dc179607edb5bee11949ca5890e81c0bb742d96fec753fe"}, + {file = "backports_datetime_fromisoformat-2.0.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c28c95d6df2a44fa3540e18e484596c03e8ff7112e2f93b664f482fe3a88720b"}, + {file = "backports_datetime_fromisoformat-2.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91042b53de903e3725209ad6d69b6994ae4819614c0decd62d05dfea23f35e2b"}, +] + [[package]] name = "boto3" version = "1.28.3" @@ -395,6 +435,7 @@ files = [ {file = "greenlet-2.0.2-cp27-cp27m-win32.whl", hash = "sha256:6c3acb79b0bfd4fe733dff8bc62695283b57949ebcca05ae5c129eb606ff2d74"}, {file = "greenlet-2.0.2-cp27-cp27m-win_amd64.whl", hash = "sha256:283737e0da3f08bd637b5ad058507e578dd462db259f7f6e4c5c365ba4ee9343"}, {file = "greenlet-2.0.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d27ec7509b9c18b6d73f2f5ede2622441de812e7b1a80bbd446cb0633bd3d5ae"}, + {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d967650d3f56af314b72df7089d96cda1083a7fc2da05b375d2bc48c82ab3f3c"}, {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:30bcf80dda7f15ac77ba5af2b961bdd9dbc77fd4ac6105cee85b0d0a5fcf74df"}, {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26fbfce90728d82bc9e6c38ea4d038cba20b7faf8a0ca53a9c07b67318d46088"}, {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9190f09060ea4debddd24665d6804b995a9c122ef5917ab26e1566dcc712ceeb"}, @@ -403,6 +444,7 @@ files = [ {file = "greenlet-2.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:76ae285c8104046b3a7f06b42f29c7b73f77683df18c49ab5af7983994c2dd91"}, {file = "greenlet-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:2d4686f195e32d36b4d7cf2d166857dbd0ee9f3d20ae349b6bf8afc8485b3645"}, {file = "greenlet-2.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c4302695ad8027363e96311df24ee28978162cdcdd2006476c43970b384a244c"}, + {file = "greenlet-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d4606a527e30548153be1a9f155f4e283d109ffba663a15856089fb55f933e47"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c48f54ef8e05f04d6eff74b8233f6063cb1ed960243eacc474ee73a2ea8573ca"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1846f1b999e78e13837c93c778dcfc3365902cfb8d1bdb7dd73ead37059f0d0"}, {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a06ad5312349fec0ab944664b01d26f8d1f05009566339ac6f63f56589bc1a2"}, @@ -432,6 +474,7 @@ files = [ {file = "greenlet-2.0.2-cp37-cp37m-win32.whl", hash = "sha256:3f6ea9bd35eb450837a3d80e77b517ea5bc56b4647f5502cd28de13675ee12f7"}, {file = "greenlet-2.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:7492e2b7bd7c9b9916388d9df23fa49d9b88ac0640db0a5b4ecc2b653bf451e3"}, {file = "greenlet-2.0.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:b864ba53912b6c3ab6bcb2beb19f19edd01a6bfcbdfe1f37ddd1778abfe75a30"}, + {file = "greenlet-2.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1087300cf9700bbf455b1b97e24db18f2f77b55302a68272c56209d5587c12d1"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:ba2956617f1c42598a308a84c6cf021a90ff3862eddafd20c3333d50f0edb45b"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc3a569657468b6f3fb60587e48356fe512c1754ca05a564f11366ac9e306526"}, {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8eab883b3b2a38cc1e050819ef06a7e6344d4a990d24d45bc6f2cf959045a45b"}, @@ -440,6 +483,7 @@ files = [ {file = "greenlet-2.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0ef99cdbe2b682b9ccbb964743a6aca37905fda5e0452e5ee239b1654d37f2a"}, {file = "greenlet-2.0.2-cp38-cp38-win32.whl", hash = "sha256:b80f600eddddce72320dbbc8e3784d16bd3fb7b517e82476d8da921f27d4b249"}, {file = "greenlet-2.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:4d2e11331fc0c02b6e84b0d28ece3a36e0548ee1a1ce9ddde03752d9b79bba40"}, + {file = "greenlet-2.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8512a0c38cfd4e66a858ddd1b17705587900dd760c6003998e9472b77b56d417"}, {file = "greenlet-2.0.2-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:88d9ab96491d38a5ab7c56dd7a3cc37d83336ecc564e4e8816dbed12e5aaefc8"}, {file = "greenlet-2.0.2-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:561091a7be172ab497a3527602d467e2b3fbe75f9e783d8b8ce403fa414f71a6"}, {file = "greenlet-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:971ce5e14dc5e73715755d0ca2975ac88cfdaefcaab078a284fea6cfabf866df"}, @@ -941,6 +985,17 @@ docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-g testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +[[package]] +name = "simpleeval" +version = "0.9.13" +description = "A simple, safe single expression evaluator library." +optional = false +python-versions = "*" +files = [ + {file = "simpleeval-0.9.13-py2.py3-none-any.whl", hash = "sha256:22a2701a5006e4188d125d34accf2405c2c37c93f6b346f2484b6422415ae54a"}, + {file = "simpleeval-0.9.13.tar.gz", hash = "sha256:4a30f9cc01825fe4c719c785e3762623e350c4840d5e6855c2a8496baaa65fac"}, +] + [[package]] name = "simplejson" version = "3.19.1" @@ -1037,45 +1092,55 @@ files = [ [[package]] name = "singer-sdk" -version = "0.30.0" +version = "0.34.1" description = "A framework for building Singer taps" optional = false -python-versions = ">=3.7.1,<3.12" +python-versions = ">=3.7.1" files = [ - {file = "singer_sdk-0.30.0-py3-none-any.whl", hash = "sha256:ca8e002ab6fce56c4e6f3312655c7b68896d1d07f88a9efeb373e74c58ceb9b8"}, - {file = "singer_sdk-0.30.0.tar.gz", hash = "sha256:73300d1c1bcb048b49a7f28c71ae26c9d309fdf3375e65940747b05c8a6551b5"}, + {file = "singer_sdk-0.34.1-py3-none-any.whl", hash = "sha256:2b9afa40722c2d7288992d86d16298128e38387941306267d908b9cd954227a3"}, + {file = "singer_sdk-0.34.1.tar.gz", hash = "sha256:5da11da3de07cc31cc8c1f3f19a40b8f8be4a0df9b5535fb90880c263e58aee5"}, ] [package.dependencies] -backoff = ">=2.0.0,<3.0" +backoff = {version = ">=2.0.0", markers = "python_version < \"4\""} +backports-datetime-fromisoformat = {version = ">=2.0.1", markers = "python_version < \"3.11\""} click = ">=8.0,<9.0" -cryptography = ">=3.4.6,<42.0.0" -fs = ">=2.4.16,<3.0.0" -importlib-metadata = {version = "<5.0.0", markers = "python_version < \"3.8\""} -importlib-resources = {version = "5.12.0", markers = "python_version < \"3.9\""} -inflection = ">=0.5.1,<0.6.0" -joblib = ">=1.0.1,<2.0.0" -jsonpath-ng = ">=1.5.3,<2.0.0" -jsonschema = ">=4.16.0,<5.0.0" -memoization = ">=0.3.2,<0.5.0" +cryptography = ">=3.4.6" +fs = ">=2.4.16" +importlib-metadata = {version = "<7.0.0", markers = "python_version < \"3.12\""} +importlib-resources = {version = ">=5.12.0", markers = "python_version < \"3.9\""} +inflection = ">=0.5.1" +joblib = ">=1.0.1" +jsonpath-ng = ">=1.5.3" +jsonschema = [ + {version = ">=4.16.0", markers = "python_version >= \"3.8\""}, + {version = ">=4.16.0,<4.18", markers = "python_version < \"3.8\""}, +] +memoization = {version = ">=0.3.2,<0.5.0", markers = "python_version < \"4\""} packaging = ">=23.1" -pendulum = ">=2.1.0,<3.0.0" +pendulum = [ + {version = ">=2.1.0,<4", markers = "python_version >= \"3.8\""}, + {version = ">=2.1.0,<3", markers = "python_version < \"3.8\""}, +] PyJWT = ">=2.4,<3.0" -pytest = {version = ">=7.2.1,<8.0.0", optional = true, markers = "extra == \"testing\""} -pytest-durations = {version = ">=1.2.0,<2.0.0", optional = true, markers = "extra == \"testing\""} -python-dotenv = ">=0.20,<0.22" -pytz = ">=2022.2.1,<2024.0.0" -PyYAML = ">=6.0,<7.0" -requests = ">=2.25.1,<3.0.0" -simplejson = ">=3.17.6,<4.0.0" -sqlalchemy = ">=1.4,<2.0" -typing-extensions = ">=4.2.0,<5.0.0" +pytest = {version = ">=7.2.1", optional = true, markers = "extra == \"testing\""} +pytest-durations = {version = ">=1.2.0", optional = true, markers = "extra == \"testing\""} +python-dateutil = ">=2.8.2" +python-dotenv = ">=0.20" +pytz = ">=2022.2.1" +PyYAML = ">=6.0" +requests = ">=2.25.1" +simpleeval = ">=0.9.13" +simplejson = ">=3.17.6" +sqlalchemy = ">=1.4,<3.0" +typing-extensions = ">=4.5.0" urllib3 = ">=1.26,<2" [package.extras] -docs = ["furo (>=2022.12.7,<2024.0.0)", "myst-parser (>=0.17.2,<1.1.0)", "sphinx (>=4.5,<6.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.3.1,<0.6.0)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-reredirects (>=0.1.1,<0.2.0)"] -s3 = ["fs-s3fs (>=1.1.1,<2.0.0)"] -testing = ["pytest (>=7.2.1,<8.0.0)", "pytest-durations (>=1.2.0,<2.0.0)"] +docs = ["furo (>=2022.12.7)", "myst-parser (>=1)", "sphinx (>=4.5)", "sphinx-autobuild (>=2021.3.14)", "sphinx-copybutton (>=0.3.1)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-notfound-page (>=1.0.0)", "sphinx-reredirects (>=0.1.1)"] +parquet = ["numpy (<1.22)", "numpy (>=1.22)", "numpy (>=1.22,<1.25)", "pyarrow (>=11,<13)", "pyarrow (>=13)"] +s3 = ["fs-s3fs (>=1.1.1)"] +testing = ["pytest (>=7.2.1)", "pytest-durations (>=1.2.0)"] [[package]] name = "six" @@ -1099,6 +1164,7 @@ files = [ {file = "SQLAlchemy-1.4.49-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:03db81b89fe7ef3857b4a00b63dedd632d6183d4ea5a31c5d8a92e000a41fc71"}, {file = "SQLAlchemy-1.4.49-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:95b9df9afd680b7a3b13b38adf6e3a38995da5e162cc7524ef08e3be4e5ed3e1"}, {file = "SQLAlchemy-1.4.49-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a63e43bf3f668c11bb0444ce6e809c1227b8f067ca1068898f3008a273f52b09"}, + {file = "SQLAlchemy-1.4.49-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca46de16650d143a928d10842939dab208e8d8c3a9a8757600cae9b7c579c5cd"}, {file = "SQLAlchemy-1.4.49-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f835c050ebaa4e48b18403bed2c0fda986525896efd76c245bdd4db995e51a4c"}, {file = "SQLAlchemy-1.4.49-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c21b172dfb22e0db303ff6419451f0cac891d2e911bb9fbf8003d717f1bcf91"}, {file = "SQLAlchemy-1.4.49-cp310-cp310-win32.whl", hash = "sha256:5fb1ebdfc8373b5a291485757bd6431de8d7ed42c27439f543c81f6c8febd729"}, @@ -1108,26 +1174,35 @@ files = [ {file = "SQLAlchemy-1.4.49-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5debe7d49b8acf1f3035317e63d9ec8d5e4d904c6e75a2a9246a119f5f2fdf3d"}, {file = "SQLAlchemy-1.4.49-cp311-cp311-win32.whl", hash = "sha256:82b08e82da3756765c2e75f327b9bf6b0f043c9c3925fb95fb51e1567fa4ee87"}, {file = "SQLAlchemy-1.4.49-cp311-cp311-win_amd64.whl", hash = "sha256:171e04eeb5d1c0d96a544caf982621a1711d078dbc5c96f11d6469169bd003f1"}, + {file = "SQLAlchemy-1.4.49-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f23755c384c2969ca2f7667a83f7c5648fcf8b62a3f2bbd883d805454964a800"}, + {file = "SQLAlchemy-1.4.49-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8396e896e08e37032e87e7fbf4a15f431aa878c286dc7f79e616c2feacdb366c"}, + {file = "SQLAlchemy-1.4.49-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66da9627cfcc43bbdebd47bfe0145bb662041472393c03b7802253993b6b7c90"}, + {file = "SQLAlchemy-1.4.49-cp312-cp312-win32.whl", hash = "sha256:9a06e046ffeb8a484279e54bda0a5abfd9675f594a2e38ef3133d7e4d75b6214"}, + {file = "SQLAlchemy-1.4.49-cp312-cp312-win_amd64.whl", hash = "sha256:7cf8b90ad84ad3a45098b1c9f56f2b161601e4670827d6b892ea0e884569bd1d"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:36e58f8c4fe43984384e3fbe6341ac99b6b4e083de2fe838f0fdb91cebe9e9cb"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b31e67ff419013f99ad6f8fc73ee19ea31585e1e9fe773744c0f3ce58c039c30"}, + {file = "SQLAlchemy-1.4.49-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebc22807a7e161c0d8f3da34018ab7c97ef6223578fcdd99b1d3e7ed1100a5db"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c14b29d9e1529f99efd550cd04dbb6db6ba5d690abb96d52de2bff4ed518bc95"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c40f3470e084d31247aea228aa1c39bbc0904c2b9ccbf5d3cfa2ea2dac06f26d"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-win32.whl", hash = "sha256:706bfa02157b97c136547c406f263e4c6274a7b061b3eb9742915dd774bbc264"}, {file = "SQLAlchemy-1.4.49-cp36-cp36m-win_amd64.whl", hash = "sha256:a7f7b5c07ae5c0cfd24c2db86071fb2a3d947da7bd487e359cc91e67ac1c6d2e"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-macosx_11_0_x86_64.whl", hash = "sha256:4afbbf5ef41ac18e02c8dc1f86c04b22b7a2125f2a030e25bbb4aff31abb224b"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24e300c0c2147484a002b175f4e1361f102e82c345bf263242f0449672a4bccf"}, + {file = "SQLAlchemy-1.4.49-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:393cd06c3b00b57f5421e2133e088df9cabcececcea180327e43b937b5a7caa5"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:201de072b818f8ad55c80d18d1a788729cccf9be6d9dc3b9d8613b053cd4836d"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7653ed6817c710d0c95558232aba799307d14ae084cc9b1f4c389157ec50df5c"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-win32.whl", hash = "sha256:647e0b309cb4512b1f1b78471fdaf72921b6fa6e750b9f891e09c6e2f0e5326f"}, {file = "SQLAlchemy-1.4.49-cp37-cp37m-win_amd64.whl", hash = "sha256:ab73ed1a05ff539afc4a7f8cf371764cdf79768ecb7d2ec691e3ff89abbc541e"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:37ce517c011560d68f1ffb28af65d7e06f873f191eb3a73af5671e9c3fada08a"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1878ce508edea4a879015ab5215546c444233881301e97ca16fe251e89f1c55"}, + {file = "SQLAlchemy-1.4.49-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95ab792ca493891d7a45a077e35b418f68435efb3e1706cb8155e20e86a9013c"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0e8e608983e6f85d0852ca61f97e521b62e67969e6e640fe6c6b575d4db68557"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ccf956da45290df6e809ea12c54c02ace7f8ff4d765d6d3dfb3655ee876ce58d"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-win32.whl", hash = "sha256:f167c8175ab908ce48bd6550679cc6ea20ae169379e73c7720a28f89e53aa532"}, {file = "SQLAlchemy-1.4.49-cp38-cp38-win_amd64.whl", hash = "sha256:45806315aae81a0c202752558f0df52b42d11dd7ba0097bf71e253b4215f34f4"}, {file = "SQLAlchemy-1.4.49-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:b6d0c4b15d65087738a6e22e0ff461b407533ff65a73b818089efc8eb2b3e1de"}, {file = "SQLAlchemy-1.4.49-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a843e34abfd4c797018fd8d00ffffa99fd5184c421f190b6ca99def4087689bd"}, + {file = "SQLAlchemy-1.4.49-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:738d7321212941ab19ba2acf02a68b8ee64987b248ffa2101630e8fccb549e0d"}, {file = "SQLAlchemy-1.4.49-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1c890421651b45a681181301b3497e4d57c0d01dc001e10438a40e9a9c25ee77"}, {file = "SQLAlchemy-1.4.49-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d26f280b8f0a8f497bc10573849ad6dc62e671d2468826e5c748d04ed9e670d5"}, {file = "SQLAlchemy-1.4.49-cp39-cp39-win32.whl", hash = "sha256:ec2268de67f73b43320383947e74700e95c6770d0c68c4e615e9897e46296294"}, @@ -1136,7 +1211,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\")"} +greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] @@ -1219,4 +1294,4 @@ s3 = ["fs-s3fs"] [metadata] lock-version = "2.0" python-versions = "<3.12,>=3.7.1" -content-hash = "21c449df946a82dc4c92d6caee9f8f29242e466ab0684841731c8e8b8bf4d675" +content-hash = "75c165f2f8847701b803fc5c509fec8963201342a6edf7ee6d48537bcaad3040" diff --git a/pyproject.toml b/pyproject.toml index 23be6fa..b4ce557 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,13 +12,13 @@ license = "Apache-2.0" [tool.poetry.dependencies] python = "<3.12,>=3.7.1" -singer-sdk = { version="^0.30.0" } +singer-sdk = { version="^0.34.1" } fs-s3fs = { version = "^1.1.1", optional = true } requests = "^2.31.0" [tool.poetry.group.dev.dependencies] pytest = "^7.2.1" -singer-sdk = { version="^0.30.0", extras = ["testing"] } +singer-sdk = { version="^0.34.1", extras = ["testing"] } [tool.poetry.extras] s3 = ["fs-s3fs"] diff --git a/tap_fleetio/client.py b/tap_fleetio/client.py index 2e5dcbc..67343da 100644 --- a/tap_fleetio/client.py +++ b/tap_fleetio/client.py @@ -13,23 +13,23 @@ _Auth = Callable[[requests.PreparedRequest], requests.PreparedRequest] SCHEMAS_DIR = Path(__file__).parent / Path("./schemas") -class fleetioPagination(BasePageNumberPaginator): +class fleetioCursorPagination(BasePageNumberPaginator): + """ + Pagination for Streams supporting cursor based pagination + """ def has_more(self, response) -> bool: - data = response.headers - if (data.get('X-Pagination-Current-Page') == data.get('X-Pagination-Total-Pages') ): + if (response.json().get('next_cursor') ) == None: has_more = False else: has_more = True return has_more def get_next(self, response): - data = response.headers - current_page = data.get('X-Pagination-Current-Page') - max_page = data.get('X-Pagination-Total-Pages') + next_cursor = response.json().get("next_cursor") next_page = None - if (current_page < max_page): - next_page = int(current_page) + 1 - + if(next_cursor is not None): + next_page = next_cursor + return next_page class fleetioStream(RESTStream): @@ -38,9 +38,9 @@ class fleetioStream(RESTStream): @property def url_base(self) -> str: """Return the API URL root, configurable via tap settings.""" - return "https://data-testing.preview.fleet.io/api" + return "https://secure.fleetio.com/api" - records_jsonpath = "$[*]" # Or override `parse_response`. + #records_jsonpath = "$[*]" # Or override `parse_response`. @property def http_headers(self) -> dict: @@ -54,7 +54,9 @@ def http_headers(self) -> dict: headers["User-Agent"] = self.config.get("user_agent") headers["Authorization"] = f"Token {self.config.get('api_token')}" headers["Account-Token"] = self.config.get('account_token') - headers["request_source"] = "fleetio_singer_tap" + headers["X-Client-Name"] = "data_connector" + headers["X-Client-Platform"] = "fleetio_singer_tap" + headers["X-Api-Version"] = self.api_version return headers def get_new_paginator(self): @@ -70,8 +72,7 @@ def get_new_paginator(self): Returns: A pagination helper instance. """ - - return fleetioPagination(1) + return fleetioCursorPagination(None) def get_url_params( self, @@ -87,12 +88,11 @@ def get_url_params( Returns: A dictionary of URL query parameters. """ + start_replication = self.get_context_state(context) params: dict = {} - if next_page_token: - params["page"] = next_page_token - if self.replication_key: - params["sort"] = "asc" - params["order_by"] = self.replication_key + if next_page_token and self.api_version == "2024-03-15": + params["start_cursor"] = next_page_token + params["per_page"] = 100 return params def parse_response(self, response: requests.Response) -> Iterable[dict]: diff --git a/tap_fleetio/schemas/contacts.json b/tap_fleetio/schemas/contacts.json new file mode 100644 index 0000000..102a258 --- /dev/null +++ b/tap_fleetio/schemas/contacts.json @@ -0,0 +1,240 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "comments_count": { + "type": [ + "number", + "null" + ] + }, + "created_at": { + "type": [ + "string", + "null" + ] + }, + "custom_fields": { + "type": [ + "object", + "null" + ] + }, + "documents_count": { + "type": [ + "number", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "employee": { + "type": ["boolean", "null"] + }, + "first_name": { + "type": [ + "string", + "null" + ] + }, + "middle_name": { + "type": [ + "string", + "null" + ] + }, + "group_id": { + "type": [ + "number", + "null" + ] + }, + "group_name": { + "type": [ + "string", + "null" + ] + }, + "group_hierarchy": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": [ + "number", + "null" + ] + }, + "last_name": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "technician": { + "type": ["boolean", "null"] + }, + "updated_at": { + "type": "string" + }, + "vehicle_operator": { + "type": [ + "boolean", + "null" + ] + }, + "birth_date": { + "type": [ + "string", + "null" + ] + }, + "street_address": { + "type": [ + "string", + "null" + ] + }, + "street_address_line_2": { + "type": [ + "string", + "null" + ] + }, + "city": { + "type": [ + "string", + "null" + ] + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "employee_number": { + "type": [ + "string", + "null" + ] + }, + "home_phone_number": { + "type": [ + "string", + "null" + ] + }, + "job_title": { + "type": [ + "string", + "null" + ] + }, + "leave_date": { + "type": [ + "string", + "null" + ] + }, + "license_class": { + "type": [ + "string", + "null" + ] + }, + "license_plate": { + "type": [ + "string", + "null" + ] + }, + "license_number": { + "type": [ + "string", + "null" + ] + }, + "license_state": { + "type": [ + "string", + "null" + ] + }, + "mobile_phone_number": { + "type": [ + "string", + "null" + ] + }, + "other_phone_number": { + "type": [ + "string", + "null" + ] + }, + "postal_code": { + "type": [ + "string", + "null" + ] + }, + "region": { + "type": [ + "string", + "null" + ] + }, + "start_date": { + "type": [ + "string", + "null" + ] + }, + "work_phone_number": { + "type": [ + "string", + "null" + ] + }, + "hourly_labor_rate_cents": { + "type": [ + "number", + "null" + ] + }, + "attachment_permissions": { + "type": [ + "object", + "null" + ] + }, + "default_image_url": { + "type": [ + "string", + "null" + ] + }, + "account_membership_id": { + "type": [ + "number", + "null" + ] + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/expense_entries.json b/tap_fleetio/schemas/expense_entries.json new file mode 100644 index 0000000..ef138e0 --- /dev/null +++ b/tap_fleetio/schemas/expense_entries.json @@ -0,0 +1,93 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "created_at": { + "type": "string" + }, + "custom_fields": { + "type": [ + "object", + "null" + ] + }, + "expense_entry_type_id": { + "type": [ + "number", + "null" + ] + }, + "expense_entry_type_name": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "number" + }, + "notes": { + "type": [ + "string", + "null" + ] + }, + "occurred_at": { + "type": [ + "string", + "null" + ] + }, + "total_amount": { + "type": [ + "number", + "null" + ] + }, + "total_amount_cents": { + "type": [ + "number", + "null" + ] + }, + "updated_at": { + "type": "string" + }, + "vehicle_id": { + "type": [ + "number", + "null" + ] + }, + "vehicle_name": { + "type": [ + "string", + "null" + ] + }, + "vehicle": { + "type": [ + "object", + "null" + ] + }, + "vendor_id": { + "type": [ + "number", + "null" + ] + }, + "vendor_name": { + "type": [ + "string", + "null" + ] + }, + "vendor": { + "type": [ + "object", + "null" + ] + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/fuel_entries.json b/tap_fleetio/schemas/fuel_entries.json new file mode 100644 index 0000000..4ad71ce --- /dev/null +++ b/tap_fleetio/schemas/fuel_entries.json @@ -0,0 +1,341 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "attachment_permissions": { + "type": "object" + }, + "comments_count": { + "type": [ + "number", + "null" + ] + }, + "created_at": { + "type": [ + "string", + "null" + ] + }, + "custom_fields": { + "type": [ + "object", + "null" + ] + }, + "date": { + "type": [ + "string", + "null" + ] + }, + "external_id": { + "type": [ + "string", + "null" + ] + }, + "fuel_type_id": { + "type": [ + "number", + "null" + ] + }, + "fuel_type_name": { + "type": [ + "string", + "null" + ] + }, + "kpl": { + "type": [ + "string", + "null" + ] + }, + "documents_count": { + "type": [ + "number", + "null" + ] + }, + "fuel_economy_units_for_current_user": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": [ + "number", + "null" + ] + }, + "is_sample": { + "type": "boolean" + }, + "liters": { + "type": [ + "string", + "null" + ] + }, + "meter_entry": { + "properties": { + "created_at": { + "type": [ + "string", + "null" + ] + }, + "date": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "number", + "null" + ] + }, + "meterable_id": { + "type": [ + "number", + "null" + ] + }, + "meterable_type": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "type": [ + "string", + "null" + ] + }, + "value": { + "type": [ + "string", + "null" + ] + }, + "vehicle_id": { + "type": [ + "number", + "null" + ] + }, + "void": { + "type": "boolean" + }, + "auto_voided_at": { + "type": [ + "string", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "meter_type": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "partial": { + "type": [ + "boolean", + "null" + ] + }, + "personal": { + "type": [ + "boolean", + "null" + ] + }, + "price_per_volume_unit": { + "type": [ + "string", + "null" + ] + }, + "reference": { + "type": [ + "string", + "null" + ] + }, + "region": { + "type": [ + "string", + "null" + ] + }, + "reset": { + "type": [ + "boolean", + "null" + ] + }, + "uk_gallons_per_hr": { + "type": [ + "string", + "null" + ] + }, + "us_gallons_per_hr": { + "type": [ + "string", + "null" + ] + }, + "usage_in_hr": { + "type": [ + "string", + "null" + ] + }, + "usage_in_km": { + "type": [ + "string", + "null" + ] + }, + "usage_in_mi": { + "type": [ + "string", + "null" + ] + }, + "liters_per_hr": { + "type": [ + "string", + "null" + ] + }, + "lp100k": { + "type": [ + "string", + "null" + ] + }, + "mpg_uk": { + "type": [ + "string", + "null" + ] + }, + "mpg_us": { + "type": [ + "string", + "null" + ] + }, + "total_amount": { + "type": [ + "string", + "null" + ] + }, + "total_amount_cents": { + "type": [ + "number", + "null" + ] + }, + "uk_gallons": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "type": [ + "string", + "null" + ] + }, + "cost_per_hr": { + "type": [ + "string", + "null" + ] + }, + "cost_per_km": { + "type": [ + "string", + "null" + ] + }, + "cost_per_mi": { + "type": [ + "string", + "null" + ] + }, + "us_gallons": { + "type": [ + "string", + "null" + ] + }, + "vehicle_id": { + "type": [ + "number", + "null" + ] + }, + "vehicle_name": { + "type": [ + "string", + "null" + ] + }, + "vehicle": { + "type": [ + "object", + "null" + ] + }, + "vendor_id": { + "type": [ + "number", + "null" + ] + }, + "vendor": { + "type": [ + "object", + "null" + ] + }, + "watchers_count": { + "type": [ + "number", + "null" + ] + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/issues.json b/tap_fleetio/schemas/issues.json index 512d398..961d4a0 100644 --- a/tap_fleetio/schemas/issues.json +++ b/tap_fleetio/schemas/issues.json @@ -2,158 +2,249 @@ "type": "object", "additionalProperties": false, "properties": { - "asset": { - "properties": { - "id": { - "type": "number" - } + "asset_type": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "closed_at": { + "type": [ + "null", + "string" + ] + }, + "closed_by": { + "properties": { + "id": { + "type": "number" + } + }, + "type": [ + "object", + "null" + ] + }, + "closed_note": { + "type": [ + "string", + "null" + ] + }, + "comments_count": { + "type": [ + "number", + "null" + ] + }, + "created_at": { + "type": [ + "string" + ] + }, + "creation_type": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "documents_count": { + "type": "number" + }, + "due_date": { + "type": [ + "null", + "string" + ] + }, + "due_meter_value": { + "type": [ + "null", + "number" + ] + }, + "due_secondary_meter_value": { + "type": [ + "null", + "number", + "string" + ] + }, + "equipment": { + "type": [ + "null", + "object" + ] + }, + "attachment_permissions": { + "type": [ + "null", + "object" + ] + }, + "external_id": { + "type": [ + "null", + "number" + ] + }, + "fault_id": { + "type": [ + "null", + "number" + ] + }, + "fault": { + "properties": { + "id": { + "type": "number" + } + }, + "type": [ + "object", + "null" + ] + }, + "fault_rule": { + "type": [ + "null", + "object" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": "number" + }, + "number": { + "type": [ + "null", + "string" + ] + }, + "reported_at": { + "type": "string" + }, + "reported_by": { + "properties": { + "id": { + "type": "number" }, - "type": "object" - }, - "asset_type": { - "type": "string" - }, - "closed_at": { - "type": [ - "null", - "string" - ] - }, - "closed_by": { - "properties": { - "id": { - "type": "number" - } + "name": { + "type": [ + "null", + "string" + ] }, - "type": [ - "object", - "null" - ] - }, - "closed_note": { - "type": "string" - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "creation_type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "documents_count": { - "type": "number" - }, - "due_date": { - "type": [ - "null", - "string" - ] - }, - "due_meter_value": { - "type": [ - "null", - "number" - ] - }, - "due_secondary_meter_value": { - "type": [ - "null", - "number" - ] - }, - "fault": { - "properties": { - "id": { - "type": "number" - } - }, - "type": [ - "object", - "null" - ] - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "is_overdue": { - "type": "boolean" - }, - "is_watched": { - "type": "boolean" - }, - "number": { - "type": "number" - }, - "reported_at": { - "type": "string" - }, - "reported_by": { - "properties": { - "id": { - "type": "number" - } - }, - "type": [ - "object", - "null" - ] - }, - "resolvable": { - "properties": { - "id": { - "type": "number" - } - }, - "type": [ - "object", - "null" - ] - }, - "resolvable_type": { - "type": [ - "null", - "string" - ] - }, - "resolved_at": { - "type": [ - "null", - "string" - ] - }, - "resolved_note": { - "type": "string" - }, - "state": { - "type": "string" - }, - "submitted_inspection_form": { - "properties": { - "id": { - "type": "number" - } - }, - "type": [ - "object", - "null" - ] - }, - "summary": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "watchers_count": { - "type": "number" - } + "default_image_url": { + "type": [ + "null", + "string" + ] + } + }, + "type": [ + "object", + "null" + ] + }, + "due_primary_meter_value": { + "type": [ + "string", + "null" + ] + }, + "overdue": { + "type": [ + "boolean", + "null" + ] + }, + "resolvable_id": { + "type": [ + "number", + "null" + ] + }, + "resolvable": { + "properties": { + "id": { + "type": "number" + } + }, + "type": [ + "object", + "null" + ] + }, + "resolvable_type": { + "type": [ + "null", + "string" + ] + }, + "resolved_at": { + "type": [ + "null", + "string" + ] + }, + "state": { + "type": "string" + }, + "submitted_inspection_form_id": { + "type": [ + "null", + "number" + ] + }, + "submitted_inspection_form": { + "properties": { + "id": { + "type": "number" + } + }, + "type": [ + "object", + "null" + ] + }, + "summary": { + "type": [ + "string", + "null" + ] + }, + "vehicle": { + "type": [ + "null", + "object" + ] + }, + "updated_at": { + "type": [ + "string", + "null" + ] + }, + "watchers_count": { + "type": [ + "number", + "null" + ] + } } } \ No newline at end of file diff --git a/tap_fleetio/schemas/parts.json b/tap_fleetio/schemas/parts.json new file mode 100644 index 0000000..d55ff59 --- /dev/null +++ b/tap_fleetio/schemas/parts.json @@ -0,0 +1,208 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "attachment_permissions": { + "type": "object" + }, + "comments_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "custom_fields": { + "type": [ + "object", + "null" + ] + }, + "default_image_url": { + "type": [ + "null", + "string" + ] + }, + "default_image_url_large": { + "type": [ + "null", + "string" + ] + }, + "default_image_url_medium": { + "type": [ + "null", + "string" + ] + }, + "default_image_url_small": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "documents_count": { + "type": [ + "number", + "null" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": [ + "number", + "null" + ] + }, + "manufacturer_part_number": { + "type": [ + "null", + "string" + ] + }, + "measurement_unit_id": { + "type": [ + "null", + "number" + ] + }, + "measurement_unit_name": { + "type": [ + "null", + "string" + ] + }, + "number": { + "type": "string" + }, + "part_category": { + "properties": { + "id": { + "type": "number" + }, + "tire_category": { + "type": ["boolean", "null"] + }, + "account_id": { + "type": [ + "number", + "null" + ] + }, + "default": { + "type": [ + "boolean", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "tires_count": { + "type": [ + "string", + "number", + "null" + ] + }, + "created_at": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "type": [ + "string", + "null" + ] + } + }, + "type": ["object", "null"] + }, + "part_category_id": { + "type": [ + "null", + "number" + ] + }, + "part_category_name": { + "type": [ + "null", + "string" + ] + }, + "part_manufacturer": { + "type": [ + "object", + "null" + ] + }, + "part_manufacturer_id": { + "type": [ + "null", + "number" + ] + }, + "part_manufacturer_name": { + "type": [ + "null", + "string" + ] + }, + "unit_cost": { + "type": [ + "null", + "number" + ] + }, + "unit_cost_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "average_unit_cost_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "upc": { + "type": [ + "null", + "string" + ] + }, + "archived_at": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "type": [ + "string" + ] + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/purchase_orders.json b/tap_fleetio/schemas/purchase_orders.json new file mode 100644 index 0000000..95fa79f --- /dev/null +++ b/tap_fleetio/schemas/purchase_orders.json @@ -0,0 +1,325 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "approved_at": { + "type": [ + "string", + "null" + ] + }, + "approved_by": { + "type": [ + "string", + "null" + ] + }, + "comments_count": { + "type": [ + "number", + "null" + ] + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": ["string", "null"] + }, + "custom_fields": { + "type": [ + "object", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "discount": { + "type": [ + "number", + "null" + ] + }, + "discount_percentage": { + "type": [ + "number", + "null" + ] + }, + "discount_type": { + "type": [ + "string", + "null" + ] + }, + "documents_count": { + "type": [ + "number", + "null" + ] + }, + "id": { + "type": "number" + }, + "number": { + "type": [ + "number", + "null" + ] + }, + "part_location_id": { + "type": [ + "number", + "null" + ] + }, + "part_location_name": { + "type": [ + "string", + "null" + ] + }, + "shipping": { + "type": [ + "number", + "null" + ] + }, + "state": { + "type": [ + "string", + "null" + ] + }, + "subtotal": { + "type": [ + "number", + "null" + ] + }, + "tax_1": { + "type": [ + "number", + "null" + ] + }, + "tax_1_percentage": { + "type": [ + "string", + "null" + ] + }, + "tax_1_type": { + "type": [ + "string", + "null" + ] + }, + "tax_2": { + "type": [ + "number", + "null" + ] + }, + "tax_2_percentage": { + "type": [ + "string", + "null" + ] + }, + "tax_2_type": { + "type": [ + "string", + "null" + ] + }, + "total_amount": { + "type": [ + "number", + "null" + ] + }, + "watchers_count": { + "type": [ + "number", + "string", + "null" + ] + }, + "status_name": { + "type": [ + "string", + "null" + ] + }, + "status_color": { + "type": [ + "string", + "null" + ] + }, + "submitted_for_approval_at": { + "type": [ + "string", + "null" + ] + }, + "rejected_at": { + "type": [ + "string", + "null" + ] + }, + "purchased_at": { + "type": [ + "string", + "null" + ] + }, + "received_partial_at": { + "type": [ + "string", + "null" + ] + }, + "received_full_at": { + "type": [ + "string", + "null" + ] + }, + "closed_at": { + "type": [ + "string", + "null" + ] + }, + "discount_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "tax_1_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "tax_2_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "subtotal_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "shipping_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "total_amount_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "approved_by_id": { + "type": [ + "number", + "null" + ] + }, + "created_by_id": { + "type": [ + "number", + "null" + ] + }, + "closed_by_id": { + "type": [ + "number", + "null" + ] + }, + "purchased_by_id": { + "type": [ + "number", + "null" + ] + }, + "rejected_by_id": { + "type": [ + "number", + "null" + ] + }, + "received_partial_by_id": { + "type": [ + "number", + "null" + ] + }, + "received_full_by_id": { + "type": [ + "number", + "null" + ] + }, + "purchase_order_status_id": { + "type": [ + "number", + "null" + ] + }, + "submitted_for_approval_by_id": { + "type": [ + "number", + "null" + ] + }, + "updated_at": { + "type": "string" + }, + "vendor_id": { + "type": [ + "number", + "null" + ] + }, + "vendor_name": { + "type": [ + "string", + "null" + ] + }, + "vendor": { + "type": [ + "object", + "null" + ] + }, + "labels": { + "type": [ + "array", + "null" + ] + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/service_entries.json b/tap_fleetio/schemas/service_entries.json index 5b59d6e..6471dbd 100644 --- a/tap_fleetio/schemas/service_entries.json +++ b/tap_fleetio/schemas/service_entries.json @@ -2,3349 +2,301 @@ "type": "object", "additionalProperties": false, "properties": { - "attachment_permissions": { - "type": "object" - }, - "auto_integrate_repair_order_status_color": { - "type": "string" - }, - "comments": { - "items": { - "properties": { - "comment": { - "type": "string" - }, - "commentable_id": { - "type": "number" - }, - "commentable_type": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "number" - }, - "title": { - "type": [ - "null", - "string" - ] - }, - "updated_at": { - "type": "string" - }, - "user_full_name": { - "type": "string" - }, - "user_id": { - "type": [ - "null", - "number" - ] - }, - "user_image_url": { - "type": [ - "null", - "string" - ] - }, - "with_mentions": { - "type": "boolean" - } - }, - "type": "object" - }, - "type": "array" - }, - "comments_count": { - "type": "number" - }, - "completed_at": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "custom_fields": { - "properties": { - "datum": { - "type": "string" - }, - "id_number": { - "type": "string" - }, - "position": { - "type": "string" - }, - "service_type": { - "type": "string" - }, - "test_restricted_custom_fields": { - "type": "string" - }, - "this": { - "type": "string" - }, - "true_or_false": { - "type": "string" - } - }, - "type": "object" - }, - "date": { - "type": "string" - }, - "discount": { - "type": [ - "null", - "number" - ] - }, - "discount_percentage": { - "type": [ - "null", - "number" - ] - }, - "discount_type": { - "type": "string" - }, - "documents": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "documentable_id": { - "type": "number" - }, - "documentable_type": { - "type": "string" - }, - "file_mime_type": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "file_size": { - "type": "number" - }, - "file_url": { - "type": "string" - }, - "full_file_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "documents_count": { - "type": "number" - }, - "general_notes": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "images": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "file_mime_type": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "file_size": { - "type": [ - "null", - "number" - ] - }, - "file_url": { - "type": "string" - }, - "full_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "imageable_id": { - "type": "number" - }, - "imageable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "images_count": { - "type": "number" - }, - "is_sample": { - "type": "boolean" - }, - "issues": { - "items": { - "properties": { - "assigned_contacts": { - "items": { - "properties": { - "account_membership_id": { - "type": ["null", "number"] - }, - "attachment_permissions": { - "type": "object" - }, - "birth_date": { - "type": [ - "null", - "string" - ] - }, - "city": { - "type": [ - "null", - "string" - ] - }, - "comments_count": { - "type": "number" - }, - "country": { - "type": [ - "null", - "string" - ] - }, - "created_at": { - "type": "string" - }, - "custom_fields": { - "properties": { - "birthday": { - "type": "string" - }, - "certification": { - "type": "string" - }, - "checkbox": { - "type": "string" - }, - "dropdown": { - "type": "string" - }, - "out_of_network_mechanic": { - "type": "string" - }, - "pronouns": { - "type": "string" - }, - "t-shirt_size": { - "type": "string" - }, - "test_restricted_custom_fields": { - "type": "string" - } - }, - "type": "object" - }, - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "documents_count": { - "type": "number" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "employee": { - "type": [ - "boolean", - "null" - ] - }, - "employee_number": { - "type": [ - "null", - "string" - ] - }, - "first_name": { - "type": "string" - }, - "group_hierarchy": { - "type": "string" - }, - "group_id": { - "type": "number" - }, - "group_name": { - "type": "string" - }, - "home_phone_number": { - "type": [ - "null", - "string" - ] - }, - "hourly_labor_rate": { - "type": [ - "null", - "number" - ] - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "job_title": { - "type": [ - "null", - "string" - ] - }, - "last_name": { - "type": "string" - }, - "leave_date": { - "type": [ - "null", - "string" - ] - }, - "license_class": { - "type": [ - "null", - "string" - ] - }, - "license_number": { - "type": [ - "null", - "string" - ] - }, - "license_state": { - "type": [ - "null", - "string" - ] - }, - "middle_name": { - "type": [ - "null", - "string" - ] - }, - "mobile_phone_number": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - }, - "other_phone_number": { - "type": [ - "null", - "string" - ] - }, - "postal_code": { - "type": [ - "null", - "string" - ] - }, - "region": { - "type": [ - "null", - "string" - ] - }, - "start_date": { - "type": [ - "null", - "string" - ] - }, - "street_address": { - "type": [ - "null", - "string" - ] - }, - "street_address_line_2": { - "type": [ - "null", - "string" - ] - }, - "technician": { - "type": [ - "boolean", - "null" - ] - }, - "updated_at": { - "type": "string" - }, - "user": { - "properties": { - "contacts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "equipments_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "number" - }, - "inspection_forms_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "parts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "role": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "time_zone": { - "type": "string" - }, - "user_type": { - "type": "string" - }, - "username": { - "type": ["null", "string"] - }, - "vehicles_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": ["null", "object"] - }, - "vehicle_operator": { - "type": "boolean" - }, - "work_phone_number": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "type": "array" - }, - "attachment_permissions": { - "type": "object" - }, - "comments": { - "items": { - "properties": { - "comment": { - "type": "string" - }, - "commentable_id": { - "type": "number" - }, - "commentable_type": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "number" - }, - "title": { - "type": [ - "null", - "string" - ] - }, - "updated_at": { - "type": "string" - }, - "user_full_name": { - "type": "string" - }, - "user_id": { - "type": "number" - }, - "user_image_url": { - "type": [ - "null", - "string" - ] - }, - "with_mentions": { - "type": "boolean" - } - }, - "type": "object" - }, - "type": "array" - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "created_by_workflow": { - "type": "boolean" - }, - "custom_fields": { - "properties": { - "already_discussed_with_manager": { - "type": "string" - }, - "custom_date": { - "type": "string" - }, - "priority": { - "type": "string" - }, - "restricted_field": { - "type": "string" - } - }, - "type": "object" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "documents": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "documentable_id": { - "type": "number" - }, - "documentable_type": { - "type": "string" - }, - "file_mime_type": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "file_size": { - "type": "number" - }, - "file_url": { - "type": "string" - }, - "full_file_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "name": { - "type": [ - "null", - "string" - ] - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "documents_count": { - "type": "number" - }, - "due_date": { - "type": [ - "null", - "string" - ] - }, - "due_meter_value": { - "type": [ - "null", - "string" - ] - }, - "due_secondary_meter_value": { - "type": [ - "null", - "number" - ] - }, - "id": { - "type": "number" - }, - "images": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "file_mime_type": { - "type": [ - "null", - "string" - ] - }, - "file_name": { - "type": [ - "null", - "string" - ] - }, - "file_size": { - "type": [ - "null", - "number" - ] - }, - "file_url": { - "type": "string" - }, - "full_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "imageable_id": { - "type": "number" - }, - "imageable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "images_count": { - "type": "number" - }, - "is_sample": { - "type": "boolean" - }, - "is_watched": { - "type": "boolean" - }, - "issue_resolution": { - "properties": { - "confirmed_at": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "issue_id": { - "type": "number" - }, - "rejected_at": { - "type": [ - "null", - "string" - ] - }, - "submitted_inspection_form_id": { - "type": [ - "null", - "number" - ] - }, - "user": { - "properties": { - "image": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "labels": { - "items": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "linked_work_orders": { - "items": { - "properties": { - "id": { - "type": "number" - }, - "issued_at": { - "type": "string" - }, - "number": { - "type": "number" - } - }, - "type": "object" - }, - "type": [ - "array", - "null" - ] - }, - "meter_entry": { - "properties": { - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, - "id": { - "type": "number" - }, - "meterable_id": { - "type": "number" - }, - "meterable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "value": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "void": { - "type": "boolean" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string" - }, - "overdue": { - "type": "boolean" - }, - "reported_at": { - "type": "string" - }, - "reported_by": { - "properties": { - "account_membership_id": { - "type": [ - "null", - "number" - ] - }, - "attachment_permissions": { - "type": "object" - }, - "birth_date": { - "type": [ - "null", - "string" - ] - }, - "city": { - "type": [ - "null", - "string" - ] - }, - "comments_count": { - "type": "number" - }, - "country": { - "type": [ - "null", - "string" - ] - }, - "created_at": { - "type": "string" - }, - "custom_fields": { - "properties": { - "birthday": { - "type": "string" - }, - "certification": { - "type": "string" - }, - "checkbox": { - "type": "string" - }, - "dropdown": { - "type": "string" - }, - "out_of_network_mechanic": { - "type": "string" - }, - "pronouns": { - "type": "string" - }, - "t-shirt_size": { - "type": "string" - }, - "test_restricted_custom_fields": { - "type": "string" - } - }, - "type": "object" - }, - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "documents_count": { - "type": "number" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "employee": { - "type": [ - "boolean", - "null" - ] - }, - "employee_number": { - "type": [ - "null", - "string" - ] - }, - "first_name": { - "type": "string" - }, - "group_hierarchy": { - "type": "string" - }, - "group_id": { - "type": [ - "null", - "number" - ] - }, - "group_name": { - "type": [ - "null", - "string" - ] - }, - "home_phone_number": { - "type": [ - "null", - "string" - ] - }, - "hourly_labor_rate": { - "type": [ - "null", - "number" - ] - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "job_title": { - "type": [ - "null", - "string" - ] - }, - "last_name": { - "type": [ - "null", - "string" - ] - }, - "leave_date": { - "type": [ - "null", - "string" - ] - }, - "license_class": { - "type": [ - "null", - "string" - ] - }, - "license_number": { - "type": [ - "null", - "string" - ] - }, - "license_state": { - "type": [ - "null", - "string" - ] - }, - "mobile_phone_number": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - }, - "other_phone_number": { - "type": [ - "null", - "string" - ] - }, - "postal_code": { - "type": [ - "null", - "string" - ] - }, - "region": { - "type": [ - "null", - "string" - ] - }, - "start_date": { - "type": [ - "null", - "string" - ] - }, - "street_address": { - "type": [ - "null", - "string" - ] - }, - "street_address_line_2": { - "type": [ - "null", - "string" - ] - }, - "technician": { - "type": [ - "boolean", - "null" - ] - }, - "updated_at": { - "type": "string" - }, - "user": { - "properties": { - "contacts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "equipments_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "number" - }, - "inspection_forms_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "parts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "role": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "time_zone": { - "type": "string" - }, - "user_type": { - "type": "string" - }, - "username": { - "type": [ - "null", - "string" - ] - }, - "vehicles_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": [ - "object", - "null" - ] - }, - "vehicle_operator": { - "type": [ - "boolean", - "null" - ] - }, - "work_phone_number": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "reported_by_id": { - "type": [ - "null", - "number" - ] - }, - "reported_by_name": { - "type": [ - "null", - "string" - ] - }, - "resolvable_id": { - "type": "number" - }, - "resolvable_type": { - "type": "string" - }, - "resolved_at": { - "type": "string" - }, - "secondary_meter_entry": { - "properties": { - "auto_voided_at": { - "type": [ - "null", - "string" - ] - }, - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, - "id": { - "type": "number" - }, - "meter_type": { - "type": "string" - }, - "meterable_id": { - "type": "number" - }, - "meterable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "value": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "void": { - "type": "boolean" - } - }, - "type": "object" - }, - "source": { - "properties": { - "failed_inspection_item_label": { - "type": [ - "null", - "string" - ] - }, - "inspection_form": { - "properties": { - "color": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": [ - "null", - "number" - ] - }, - "title": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "inspection_submissions_count": { - "type": "number" - }, - "last_inspection_submission_at": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "state": { - "type": "string" - }, - "submitted_inspection_form_id": { - "type": [ - "null", - "number" - ] - }, - "summary": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "valid_required_custom_fields": { - "type": "boolean" - }, - "vehicle_id": { - "type": "number" - }, - "vehicle_image_url": { - "type": ["null", "string"] - }, - "vehicle_image_url_large": { - "type": ["null", "string"] - }, - "vehicle_image_url_medium": { - "type": ["null", "string"] - }, - "vehicle_image_url_small": { - "type": ["null", "string"] - }, - "vehicle_name": { - "type": "string" - }, - "watchers_count": { - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - }, - "labels": { - "items": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "labor_subtotal": { - "type": [ - "null", - "number" - ] - }, - "meter_entry": { - "properties": { - "auto_voided_at": { - "type": [ - "null", - "string" - ] - }, - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, - "id": { - "type": "number" - }, - "meterable_id": { - "type": "number" - }, - "meterable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "value": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "void": { - "type": "boolean" - } - }, - "type": "object" - }, - "parts_subtotal": { - "type": [ - "null", - "number" - ] - }, - "reference": { - "type": [ - "null", - "string" - ] - }, - "secondary_meter_entry": { + "attachment_permissions": { + "type": "object" + }, + "auto_integrate_repair_order_status": { + "type": [ + "string", + "null" + ] + }, + "invoice": { + "type": [ + "object", + "null" + ] + }, + "warranty_credits_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "warranty_credits_percentage": { + "type": [ + "string", + "null" + ] + }, + "warranty_credits_type": { + "type": [ + "string", + "null" + ] + }, + "labor_subtotal_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "parts_subtotal_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "subtotal_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "discout_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "tax_1_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "tax_2_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "total_amount_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "warrant_credits_cents": { + "type": [ + "string", + "number", + "null" + ] + }, + "comments_count": { + "type": "number" + }, + "completed_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "discount": { + "type": [ + "null", + "number" + ] + }, + "discount_percentage": { + "type": [ + "null", + "string" + ] + }, + "fees_cents": { + "type": [ + "number", + "null" + ] + }, + "discount_type": { + "type": "string" + }, + "discount_cents": { + "type": [ + "number", + "string", + "null" + ] + }, + "documents_count": { + "type": "number" + }, + "general_notes": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": "number" + }, + "is_sample": { + "type": "boolean" + }, + "labels": { + "items": { "properties": { - "auto_voided_at": { - "type": [ - "null", - "string" - ] - }, - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, "id": { "type": "number" }, - "meter_type": { - "type": "string" - }, - "meterable_id": { - "type": "number" - }, - "meterable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "value": { + "name": { "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "void": { - "type": "boolean" } }, "type": "object" }, - "service_entry_line_items": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "issues": { - "items": { - "properties": { - "assigned_contacts": { - "items": { - "properties": { - "account_membership_id": { - "type": ["null", "number"] - }, - "attachment_permissions": { - "type": "object" - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "custom_fields": { - "properties": { - "birthday": { - "type": "string" - }, - "certification": { - "type": "string" - }, - "checkbox": { - "type": "string" - }, - "dropdown": { - "type": "string" - }, - "out_of_network_mechanic": { - "type": "string" - }, - "pronouns": { - "type": "string" - }, - "t-shirt_size": { - "type": "string" - }, - "test_restricted_custom_fields": { - "type": "string" - } - }, - "type": "object" - }, - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "documents_count": { - "type": "number" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "employee": { - "type": "boolean" - }, - "first_name": { - "type": "string" - }, - "group_hierarchy": { - "type": "string" - }, - "group_id": { - "type": "number" - }, - "group_name": { - "type": "string" - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "last_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "technician": { - "type": "boolean" - }, - "updated_at": { - "type": "string" - }, - "user": { - "properties": { - "contacts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "equipments_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "number" - }, - "inspection_forms_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "parts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "role": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": ["null", "string"] - } - }, - "type": "object" - }, - "time_zone": { - "type": "string" - }, - "user_type": { - "type": "string" - }, - "username": { - "type": ["null", "string"] - }, - "vehicles_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": ["null", "object"] - }, - "vehicle_operator": { - "type": "boolean" - } - }, - "type": "object" - }, - "type": "array" - }, - "attachment_permissions": { - "type": "object" - }, - "comments": { - "items": { - "properties": { - "comment": { - "type": "string" - }, - "commentable_id": { - "type": "number" - }, - "commentable_type": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "number" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "user_full_name": { - "type": "string" - }, - "user_id": { - "type": "number" - }, - "user_image_url": { - "type": "string" - }, - "with_mentions": { - "type": "boolean" - } - }, - "type": "object" - }, - "type": "array" - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "created_by_workflow": { - "type": "boolean" - }, - "custom_fields": { - "properties": { - "already_discussed_with_manager": { - "type": "string" - }, - "custom_date": { - "type": "string" - }, - "priority": { - "type": "string" - }, - "restricted_field": { - "type": "string" - } - }, - "type": "object" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "documents": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "documentable_id": { - "type": "number" - }, - "documentable_type": { - "type": "string" - }, - "file_mime_type": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "file_size": { - "type": "number" - }, - "file_url": { - "type": "string" - }, - "full_file_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "documents_count": { - "type": "number" - }, - "due_date": { - "type": [ - "null", - "string" - ] - }, - "due_meter_value": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "images": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "file_mime_type": { - "type": "string" - }, - "file_name": { - "type": "string" - }, - "file_size": { - "type": "number" - }, - "file_url": { - "type": "string" - }, - "full_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "imageable_id": { - "type": "number" - }, - "imageable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "images_count": { - "type": "number" - }, - "is_sample": { - "type": "boolean" - }, - "is_watched": { - "type": "boolean" - }, - "issue_resolution": { - "properties": { - "confirmed_at": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "issue_id": { - "type": "number" - }, - "rejected_at": { - "type": [ - "null", - "string" - ] - }, - "submitted_inspection_form_id": { - "type": "number" - }, - "user": { - "properties": { - "image": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "labels": { - "items": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "linked_work_orders": { - "items": { - "properties": { - "id": { - "type": "number" - }, - "issued_at": { - "type": "string" - }, - "number": { - "type": "number" - } - }, - "type": "object" - }, - "type": [ - "array", - "null" - ] - }, - "meter_entry": { - "properties": { - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, - "id": { - "type": "number" - }, - "meterable_id": { - "type": "number" - }, - "meterable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "value": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "void": { - "type": "boolean" - } - }, - "type": "object" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string" - }, - "overdue": { - "type": "boolean" - }, - "reported_at": { - "type": "string" - }, - "reported_by": { - "properties": { - "account_membership_id": { - "type": "number" - }, - "attachment_permissions": { - "type": "object" - }, - "birth_date": { - "type": [ - "null", - "string" - ] - }, - "city": { - "type": [ - "null", - "string" - ] - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "custom_fields": { - "properties": { - "birthday": { - "type": "string" - }, - "certification": { - "type": "string" - }, - "checkbox": { - "type": "string" - }, - "dropdown": { - "type": "string" - }, - "out_of_network_mechanic": { - "type": "string" - }, - "pronouns": { - "type": "string" - }, - "t-shirt_size": { - "type": "string" - }, - "test_restricted_custom_fields": { - "type": "string" - } - }, - "type": "object" - }, - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "documents_count": { - "type": "number" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "employee": { - "type": "boolean" - }, - "employee_number": { - "type": [ - "null", - "string" - ] - }, - "first_name": { - "type": "string" - }, - "group_hierarchy": { - "type": "string" - }, - "group_id": { - "type": "number" - }, - "group_name": { - "type": "string" - }, - "home_phone_number": { - "type": [ - "null", - "string" - ] - }, - "hourly_labor_rate": { - "type": [ - "null", - "number" - ] - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "job_title": { - "type": [ - "null", - "string" - ] - }, - "last_name": { - "type": "string" - }, - "leave_date": { - "type": [ - "null", - "string" - ] - }, - "license_class": { - "type": [ - "null", - "string" - ] - }, - "license_number": { - "type": [ - "null", - "string" - ] - }, - "license_state": { - "type": [ - "null", - "string" - ] - }, - "mobile_phone_number": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - }, - "postal_code": { - "type": [ - "null", - "string" - ] - }, - "region": { - "type": [ - "null", - "string" - ] - }, - "start_date": { - "type": [ - "null", - "string" - ] - }, - "street_address": { - "type": [ - "null", - "string" - ] - }, - "street_address_line_2": { - "type": [ - "null", - "string" - ] - }, - "technician": { - "type": "boolean" - }, - "updated_at": { - "type": "string" - }, - "user": { - "properties": { - "contacts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "email": { - "type": [ - "null", - "string" - ] - }, - "equipments_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "id": { - "type": "number" - }, - "inspection_forms_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "parts_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "role": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "time_zone": { - "type": "string" - }, - "user_type": { - "type": "string" - }, - "username": { - "type": ["null", "string"] - }, - "vehicles_record_set": { - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "vehicle_operator": { - "type": "boolean" - }, - "work_phone_number": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "reported_by_id": { - "type": [ - "null", - "number" - ] - }, - "reported_by_name": { - "type": [ - "null", - "string" - ] - }, - "resolvable_id": { - "type": "number" - }, - "resolvable_type": { - "type": "string" - }, - "resolved_at": { - "type": "string" - }, - "source": { - "properties": { - "failed_inspection_item_label": { - "type": [ - "null", - "string" - ] - }, - "inspection_form": { - "properties": { - "color": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": [ - "null", - "number" - ] - }, - "title": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "inspection_submissions_count": { - "type": "number" - }, - "last_inspection_submission_at": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "state": { - "type": "string" - }, - "submitted_inspection_form_id": { - "type": [ - "null", - "number" - ] - }, - "summary": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "valid_required_custom_fields": { - "type": "boolean" - }, - "vehicle_id": { - "type": "number" - }, - "vehicle_image_url": { - "type": [ - "null", - "string" - ] - }, - "vehicle_image_url_large": { - "type": [ - "null", - "string" - ] - }, - "vehicle_image_url_medium": { - "type": [ - "null", - "string" - ] - }, - "vehicle_image_url_small": { - "type": [ - "null", - "string" - ] - }, - "vehicle_name": { - "type": "string" - }, - "watchers_count": { - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - }, - "labor_cost": { - "type": [ - "null", - "number" - ] - }, - "parts_cost": { - "type": [ - "null", - "number" - ] - }, - "service_entry_line_item_id": { - "type": [ - "null", - "number" - ] - }, - "service_reminder_id": { - "type": [ - "null", - "number" - ] - }, - "service_task": { - "properties": { - "created_at": { - "type": "string" - }, - "default_vmrs_assembly": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_component": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "component_name": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": [ - "null", - "string" - ] - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system_group": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "subtasks": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "default_vmrs_assembly": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_component": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "component_name": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system_group": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "subtasks": { - "type": "array" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "subtotal": { - "type": "number" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "vmrs_assembly": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "vmrs_component": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "component_name": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "vmrs_system": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": [ - "null", - "string" - ] - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "vmrs_system_group": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - } - }, - "type": "object" + "type": "array" + }, + "labor_subtotal": { + "type": [ + "null", + "number" + ] + }, + "primary_meter_entry":{ + "type": [ + "object", + "null" + ] + }, + "secondary_meter_entry":{ + "type": [ + "object", + "null" + ] + }, + "parts_subtotal": { + "type": [ + "null", + "number" + ] + }, + "reference": { + "type": [ + "null", + "string" + ] + }, + "started_at": { + "type": [ + "null", + "string" + ] + }, + "status": { + "type": "string" + }, + "tax_1": { + "type": [ + "null", + "number" + ] + }, + "tax_1_percentage": { + "type": [ + "null", + "string" + ] + }, + "tax_1_type": { + "type": [ + "null", + "string" + ] + }, + "tax_2": { + "type": [ + "null", + "number" + ] + }, + "tax_2_percentage": { + "type": [ + "null", + "string" + ] + }, + "tax_2_type": { + "type": [ + "null", + "string" + ] + }, + "updated_at": { + "type": "string" + }, + "vehicle_id": { + "type": "number" + }, + "vehicle": { + "type": [ + "object", + "null" + ] + }, + "vendor_id": { + "type": [ + "null", + "number" + ] + }, + "vendor_name": { + "type": [ + "null", + "string" + ] + }, + "vendor": { + "type": [ + "object", + "null" + ] + }, + "vmrs_repair_priority_class": { + "properties": { + "code": { + "type": "string" }, - "type": "array" - }, - "service_tasks": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "default_vmrs_assembly": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_component": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "component_name": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": [ - "null", - "string" - ] - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system_group": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "subtasks": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "default_vmrs_assembly": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_component": { - "properties": { - "assembly_code": { - "type": "string" - }, - "assembly_name": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "component_name": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": [ - "null", - "string" - ] - }, - "system_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "default_vmrs_system_group": { - "properties": { - "assembly_code": { - "type": "string" - }, - "component_code": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "type": "number" - }, - "system_code": { - "type": "string" - }, - "system_group_code": { - "type": "string" - }, - "system_group_name": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, - "subtasks": { - "type": "array" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" + "color": { + "type": "string" }, - "type": "array" - }, - "started_at": { - "type": [ - "null", - "string" - ] - }, - "status": { - "type": "string" - }, - "subtotal": { - "type": "number" - }, - "tax_1": { - "type": [ - "null", - "number" - ] - }, - "tax_1_percentage": { - "type": [ - "null", - "number" - ] - }, - "tax_1_type": { - "type": [ - "null", - "string" - ] - }, - "tax_2": { - "type": [ - "null", - "number" - ] - }, - "tax_2_percentage": { - "type": [ - "null", - "number" - ] - }, - "tax_2_type": { - "type": [ - "null", - "string" - ] - }, - "tax_free_labor": { - "type": "boolean" - }, - "total_amount": { - "type": "number" - }, - "updated_at": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "vehicle_name": { - "type": "string" - }, - "vendor_id": { - "type": [ - "null", - "number" - ] - }, - "vendor_name": { - "type": [ - "null", - "string" - ] - }, - "vmrs_repair_priority_class": { - "properties": { - "code": { - "type": "string" - }, - "color": { - "type": "string" - }, - "id": { - "type": "number" - }, - "name": { - "type": "string" - } + "id": { + "type": "number" }, - "type": [ - "object", - "null" - ] - }, - "work_order_id": { - "type": [ - "null", - "number" - ] - }, - "work_order_number": { - "type": [ - "null", - "number" - ] - } + "name": { + "type": "string" + } + }, + "type": [ + "object", + "null" + ] + }, + "work_order_id": { + "type": [ + "null", + "number" + ] + }, + "work_order_number": { + "type": [ + "null", + "number" + ] + } } } \ No newline at end of file diff --git a/tap_fleetio/schemas/submitted_inspection_forms.json b/tap_fleetio/schemas/submitted_inspection_forms.json index 34ee7ad..73b30cf 100644 --- a/tap_fleetio/schemas/submitted_inspection_forms.json +++ b/tap_fleetio/schemas/submitted_inspection_forms.json @@ -2,284 +2,70 @@ "type": "object", "additionalProperties": false, "properties": { - "comments_count": { - "type": "number" - }, - "contact_id": { - "type": "number" - }, - "date": { - "type": "string" - }, - "duration": { - "type": "string" - }, - "failed_items": { - "type": "number" - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "inspection_form": { - "properties": { - "description": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "title": { - "type": "string" - } + "date": { + "type": "string" + }, + "failed_items": { + "type": "number" + }, + "id": { + "type": "number" + }, + "inspection_form": { + "properties": { + "description": { + "type": [ + "null", + "string" + ] }, - "type": "object" - }, - "started_at": { - "type": "string" - }, - "starting_latitude": { - "type": [ - "null", - "number" - ] - }, - "starting_longitude": { - "type": [ - "null", - "number" - ] - }, - "submitted_at": { - "type": "string" - }, - "submitted_inspection_items": { - "items": { - "properties": { - "comments": { - "items": { - "properties": { - "comment": { - "type": "string" - }, - "id": { - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - }, - "comments_count": { - "type": "number" - }, - "id": { - "type": "number" - }, - "images": { - "items": { - "properties": { - "created_at": { - "type": "string" - }, - "file_mime_type": { - "type": [ - "null", - "string" - ] - }, - "file_name": { - "type": [ - "null", - "string" - ] - }, - "file_size": { - "type": [ - "null", - "number" - ] - }, - "file_url": { - "type": "string" - }, - "full_url": { - "type": "string" - }, - "id": { - "type": "number" - }, - "imageable_id": { - "type": "number" - }, - "imageable_type": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "images_count": { - "type": "number" - }, - "inspection_item": { - "properties": { - "dropdown_options": { - "items": { - "properties": { - "fail_if_chosen": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "position": { - "type": "number" - } - }, - "type": "object" - }, - "type": "array" - }, - "fail_label": { - "type": [ - "null", - "string" - ] - }, - "label": { - "type": "string" - }, - "na_label": { - "type": "string" - }, - "numeric_range_max": { - "type": [ - "null", - "number" - ] - }, - "numeric_range_min": { - "type": [ - "null", - "number" - ] - }, - "pass_label": { - "type": [ - "null", - "string" - ] - }, - "type": { - "type": "string" - } - }, - "type": "object" - }, - "latitude": { - "type": [ - "null", - "number" - ] - }, - "longitude": { - "type": [ - "null", - "number" - ] - }, - "meter_entry_value": { - "type": "string" - }, - "result": { - "properties": { - "file_url": { - "type": ["null", "string"] - }, - "full_file_url": { - "type": ["null", "string"] - }, - "full_signature_file_url": { - "type": ["null", "string"] - }, - "label": { - "type": [ - "null", - "string" - ] - }, - "signature_file_mime_type": { - "type": [ - "null", - "string" - ] - }, - "signature_file_size": { - "type": [ - "null", - "number" - ] - }, - "signature_file_url": { - "type": [ - "null", - "string" - ] - }, - "text": { - "type": [ - "null", - "string" - ] - }, - "value": { - "type": [ - "null", - "number", - "string" - ] - } - }, - "type": "object" - }, - "secondary_meter_entry_value": { - "type": "string" - }, - "submitted_inspection_form_id": { - "type": "number" - } - }, - "type": "object" + "id": { + "type": "number" }, - "type": "array" - }, - "submitted_latitude": { - "type": [ - "null", - "number" - ] - }, - "submitted_longitude": { - "type": [ - "null", - "number" - ] - }, - "user": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - } + "title": { + "type": "string" + } + }, + "type": "object" + }, + "started_at": { + "type": "string" + }, + "starting_latitude": { + "type": [ + "null", + "number" + ] + }, + "starting_longitude": { + "type": [ + "null", + "number" + ] + }, + "submitted_at": { + "type": "string" + }, + "submitted_latitude": { + "type": [ + "null", + "number" + ] + }, + "submitted_longitude": { + "type": [ + "null", + "number" + ] + }, + "user": { + "type": ["string", "object"] + }, + "vehicle": { + "type": [ + "object", + "null" + ] + } } } \ No newline at end of file diff --git a/tap_fleetio/schemas/vehicle_assignments.json b/tap_fleetio/schemas/vehicle_assignments.json new file mode 100644 index 0000000..2486c5c --- /dev/null +++ b/tap_fleetio/schemas/vehicle_assignments.json @@ -0,0 +1,125 @@ +{ + "$schema": "http://json-schema.org/schema#", + "properties": { + "attachment_permissions": { + "type": "object" + }, + "contact": { + "type": [ + "object", + "null" + ] + }, + "vehicle": { + "type": [ + "object", + "null" + ] + }, + "comments_count": { + "type": [ + "number", + "null" + ] + }, + "contact_full_name": { + "type": [ + "string", + "null" + ] + }, + "contact_id": { + "type": [ + "number", + "null" + ] + }, + "started_at": { + "type": [ + "string", + "null" + ] + }, + "ended_at": { + "type": [ + "string", + "null" + ] + }, + "contact_image_url": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "custom_fields": { + "properties": { + "checkbox_type": { + "type": [ + "string", + "null" + ] + }, + "department_using_vehicle": { + "type": [ + "string", + "null" + ] + }, + "license_expiration_date": { + "type": [ + "string", + "null" + ] + }, + "operator_id": { + "type": [ + "string", + "null" + ] + }, + "test_restricted_custom_fields": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "future": { + "type": "boolean" + }, + "starting_meter_entry_value": { + "type": [ + "string", + "null" + ] + }, + "ending_meter_entry_value": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "number", + "null" + ] + }, + "updated_at": { + "type": "string" + }, + "vehicle_id": { + "type": "number" + } + }, + "type": "object" + } \ No newline at end of file diff --git a/tap_fleetio/schemas/vehicles.json b/tap_fleetio/schemas/vehicles.json index 9dfeaf6..4974021 100644 --- a/tap_fleetio/schemas/vehicles.json +++ b/tap_fleetio/schemas/vehicles.json @@ -1,931 +1,270 @@ { - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "type": "number" - }, - "ai_enabled": { - "type": "boolean" - }, - "assetable_type": { - "type": "string" - }, - "color": { - "type": [ - "null", - "string" - ] - }, - "comments_count": { - "type": "number" - }, - "created_at": { - "type": "string" - }, - "current_location_entry": { - "properties": { - "address": { - "type": [ - "null", - "string" - ] - }, - "address_components": { - "properties": { - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "country_short": { - "type": "string" - }, - "postal_code": { - "type": "string" - }, - "region": { - "type": "string" - }, - "region_short": { - "type": "string" - }, - "street": { - "type": "string" - }, - "street_number": { - "type": "string" - } - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "date": { - "type": "string" - }, - "geolocation": { - "properties": { - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - } - }, - "type": "object" - }, - "id": { - "type": "number" - }, - "is_current": { - "type": "boolean" - }, - "item_id": { - "type": "number" - }, - "item_type": { - "type": "string" - }, - "locatable_id": { - "type": [ - "null", - "number" - ] - }, - "locatable_type": { - "type": [ - "null", - "string" - ] - }, - "location": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - } - }, - "type": "object" - }, - "current_location_entry_id": { - "type": [ - "null", - "number" - ] - }, - "current_meter_date": { - "type": [ - "null", - "string" - ] - }, - "current_meter_value": { - "type": "number" - }, - "custom_fields": { - "properties": { - "checkbox_filter_test": { - "type": "string" - }, - "extra_rextra_read_all_about_it_this_is_a_super_long_field_name_my_guyyy": { - "type": "string" - }, - "in_service_date": { - "type": "string" - }, - "manufacturer_model": { - "type": "string" - }, - "rear_camera_enabled": { - "type": "string" - }, - "registration_expiration": { - "type": "string" - }, - "req": { - "type": "string" - }, - "restrict": { - "type": "string" - }, - "telematics_subscription": { - "type": "string" - }, - "test": { - "type": "string" - }, - "test_roles_on_restricted_custom_fields": { - "type": "string" - }, - "toll_pass_number": { - "type": "string" - }, - "vehicle": { - "type": "string" - }, - "vehicle_cleanliness": { - "type": "string" - }, - "warranty_expiration": { - "type": "string" - }, - "warranty_type": { - "type": "string" - } - }, - "type": "object" - }, - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "default_image_url_large": { - "type": [ - "null", - "string" - ] - }, - "default_image_url_medium": { - "type": [ - "null", - "string" - ] - }, - "default_image_url_small": { - "type": [ - "null", - "string" - ] - }, - "documents_count": { - "type": "number" - }, - "driver": { - "properties": { - "default_image_url": { - "type": [ - "null", - "string" - ] - }, - "first_name": { - "type": "string" - }, - "full_name": { - "type": "string" - }, - "id": { - "type": "number" - }, - "last_name": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "estimated_replacement_mileage": { - "type": [ - "null", - "number" - ] - }, - "estimated_resale_price": { - "properties": { - "cents": { - "type": "number" - }, - "currency_iso": { - "type": "string" - } - }, - "type": [ - "object", - "null" - ] - }, - "estimated_service_months": { - "type": [ - "null", - "number" - ] - }, - "external_ids": { - "properties": { - "clearpathgps": { - "type": [ - "null", - "string" - ] - }, - "external_fuel_id": { - "type": [ - "null", - "string" - ] - }, - "fuel_id": { - "type": [ - "null", - "string" - ] - }, - "task_code": { - "type": [ - "null", - "string" - ] - }, - "traxxis_id": { - "type": [ - "null", - "string" - ] - } - }, - "type": "object" - }, - "fuel_entries_count": { - "type": "number" - }, - "fuel_type_id": { - "type": [ - "null", - "number" - ] - }, - "fuel_type_name": { - "type": [ - "null", - "string" - ] - }, - "fuel_volume_units": { - "type": "string" - }, - "group_ancestry": { - "type": [ - "null", - "string" - ] - }, - "group_id": { - "type": [ - "null", - "number" - ] - }, - "group_name": { - "type": [ - "null", - "string" - ] - }, - "id": { - "type": "number" - }, - "images_count": { - "type": "number" - }, - "in_service_date": { - "type": [ - "null", - "string" - ] - }, - "in_service_meter": { - "type": [ - "null", - "number" - ] - }, - "inspection_schedules_count": { - "type": "number" - }, - "is_sample": { - "type": "boolean" - }, - "issues_count": { - "type": "number" - }, - "license_plate": { - "type": [ - "null", - "string" - ] - }, - "loan_account_number": { - "type": [ - "null", - "string" - ] - }, - "loan_amount": { - "type": [ - "null", - "number" - ] - }, - "loan_ended_at": { - "type": [ - "null", - "string" - ] - }, - "loan_interest_rate": { - "type": [ - "null", - "number" - ] - }, - "loan_notes": { - "type": [ - "null", - "string" - ] - }, - "loan_payment": { - "type": [ - "null", - "number" - ] - }, - "loan_started_at": { - "type": [ - "null", - "string" - ] - }, - "loan_vendor_id": { - "type": [ - "null", - "number" - ] - }, - "loan_vendor_name": { - "type": [ - "null", - "string" - ] - }, - "make": { - "type": [ - "null", - "string" - ] - }, - "meter_name": { - "type": "string" - }, - "meter_unit": { - "type": "string" - }, - "model": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - }, - "out_of_service_date": { - "type": [ - "null", - "string" - ] - }, - "out_of_service_meter": { - "type": [ - "null", - "number" - ] - }, - "ownership": { - "type": "string" - }, - "primary_meter_usage_per_day": { - "type": [ - "null", - "string" - ] - }, - "registration_expiration_month": { - "type": "number" - }, - "registration_state": { - "type": [ - "null", - "string" - ] - }, - "residual_value": { - "type": [ - "null", - "number" - ] - }, - "secondary_meter": { - "type": "boolean" - }, - "secondary_meter_date": { - "type": [ - "null", - "string" - ] - }, - "secondary_meter_name": { - "type": "string" - }, - "secondary_meter_unit": { - "type": [ - "null", - "string" - ] - }, - "secondary_meter_usage_per_day": { - "type": [ - "null", - "string" - ] - }, - "secondary_meter_value": { - "type": "number" - }, - "service_entries_count": { - "type": "number" - }, - "service_reminders_count": { - "type": "number" - }, - "specs": { - "properties": { - "account_id": { - "type": "number" - }, - "base_towing_capacity": { - "type": [ - "null", - "number" - ] - }, - "bed_length": { - "type": [ - "null", - "number" - ] - }, - "body_subtype": { - "type": [ - "null", - "string" - ] - }, - "body_type": { - "type": [ - "null", - "string" - ] - }, - "brake_system": { - "type": [ - "null", - "string" - ] - }, - "cargo_volume": { - "type": [ - "null", - "number" - ] - }, - "created_at": { - "type": "string" - }, - "curb_weight": { - "type": [ - "null", - "number" - ] - }, - "drive_type": { - "type": [ - "null", - "string" - ] - }, - "duty_type": { - "type": [ - "null", - "string" - ] - }, - "engine_aspiration": { - "type": [ - "null", - "string" - ] - }, - "engine_block_type": { - "type": [ - "null", - "string" - ] - }, - "engine_bore": { - "type": [ - "null", - "number" - ] - }, - "engine_bore_with_units": { - "type": [ - "null", - "string" - ] - }, - "engine_brand": { - "type": [ - "null", - "string" - ] - }, - "engine_cam_type": { - "type": [ - "null", - "string" - ] - }, - "engine_compression": { - "type": [ - "null", - "number" - ] - }, - "engine_cylinders": { - "type": [ - "null", - "number" - ] - }, - "engine_description": { - "type": [ - "null", - "string" - ] - }, - "engine_displacement": { - "type": [ - "null", - "number" - ] - }, - "engine_stroke": { - "type": [ - "null", - "number" - ] - }, - "engine_valves": { - "type": [ - "null", - "number" - ] - }, - "epa_city": { - "type": [ - "null", - "number" - ] - }, - "epa_combined": { - "type": [ - "null", - "number" - ] - }, - "epa_highway": { - "type": [ - "null", - "number" - ] - }, - "front_tire_psi": { - "type": [ - "null", - "number" - ] - }, - "front_tire_type": { - "type": [ - "null", - "string" - ] - }, - "front_track_width": { - "type": [ - "null", - "number" - ] - }, - "front_wheel_diameter": { - "type": [ - "null", - "string" - ] - }, - "fuel_induction": { - "type": [ - "null", - "string" - ] - }, - "fuel_quality": { - "type": [ - "null", - "string" - ] - }, - "fuel_tank_2_capacity": { - "type": [ - "null", - "number" - ] - }, - "fuel_tank_capacity": { - "type": [ - "null", - "number" - ] - }, - "gross_vehicle_weight_rating": { - "type": [ - "null", - "number" - ] - }, - "ground_clearance": { - "type": [ - "null", - "number" - ] - }, - "height": { - "type": [ - "null", - "number" - ] - }, - "id": { - "type": "number" - }, - "interior_volume": { - "type": [ - "null", - "number" - ] - }, - "length": { - "type": [ - "null", - "number" - ] - }, - "max_hp": { - "type": [ - "null", - "number" - ] - }, - "max_payload": { - "type": [ - "null", - "number" - ] - }, - "max_torque": { - "type": [ - "null", - "number" - ] - }, - "msrp": { - "type": [ - "null", - "number" - ] - }, - "msrp_cents": { - "type": [ - "null", - "number" - ] - }, - "oil_capacity": { - "type": [ - "null", - "number" - ] - }, - "passenger_volume": { - "type": [ - "null", - "string" - ] - }, - "rear_axle_type": { - "type": [ - "null", - "string" - ] - }, - "rear_tire_psi": { - "type": [ - "null", - "number" - ] - }, - "rear_tire_type": { - "type": [ - "null", - "string" - ] - }, - "rear_track_width": { - "type": [ - "null", - "number" - ] - }, - "rear_wheel_diameter": { - "type": [ - "null", - "string" - ] - }, - "redline_rpm": { - "type": [ - "null", - "string" - ] - }, - "transmission_brand": { - "type": [ - "null", - "string" - ] - }, - "transmission_description": { - "type": [ - "null", - "string" - ] - }, - "transmission_gears": { - "type": [ - "null", - "number" - ] - }, - "transmission_type": { - "type": [ - "null", - "string" - ] - }, - "updated_at": { - "type": "string" - }, - "vehicle_id": { - "type": "number" - }, - "weight_class": { - "type": [ - "null", - "string" - ] - }, - "wheelbase": { - "type": [ - "null", - "number" - ] - }, - "wheelbase_with_units": { - "type": [ - "null", - "string" - ] - }, - "width": { - "type": [ - "null", - "number" - ] - } - }, - "type": "object" - }, - "system_of_measurement": { - "type": "string" - }, - "trim": { - "type": [ - "null", - "string" - ] - }, - "type_name": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "vehicle_renewal_reminders_count": { - "type": "number" - }, - "vehicle_status_color": { - "type": [ - "null", - "string" - ] - }, - "vehicle_status_id": { - "type": "number" - }, - "vehicle_status_name": { - "type": "string" - }, - "vehicle_type_id": { - "type": "number" - }, - "vehicle_type_name": { - "type": "string" - }, - "vin": { - "type": [ - "null", - "string" - ] - }, - "work_orders_count": { - "type": "number" - }, - "year": { - "type": [ - "null", - "number" - ] - } + "$schema": "http://json-schema.org/schema#", + "properties": { + "account_id": { + "type": "number" + }, + "archived_at": { + "type": [ + "string", + "null" + ] + }, + "fuel_type_id": { + "type": [ + "number", + "null" + ] + }, + "fuel_type_name": { + "type": [ + "string", + "null" + ] + }, + "ai_enabled": { + "type": "boolean" + }, + "assetable_type": { + "type": "string" + }, + "color": { + "type": [ + "null", + "string" + ] + }, + "comments_count": { + "type": "number" + }, + "created_at": { + "type": "string" + }, + "current_location_entry_id": { + "type": [ + "null", + "number" + ] + }, + "default_image_url_small": { + "type": [ + "null", + "string" + ] + }, + "external_ids": { + "type": [ + "object", + "null" + ] + }, + "documents_count": { + "type": "number" + }, + "estimated_replacement_mileage": { + "type": [ + "null", + "string" + ] + }, + "estimated_resale_price_cents": { + "type": [ + "null", + "number" + ] + }, + "estimated_service_months": { + "type": [ + "null", + "number" + ] + }, + "fuel_entries_count": { + "type": "number" + }, + "fuel_volume_units": { + "type": "string" + }, + "group_ancestry": { + "type": [ + "null", + "string" + ] + }, + "group_id": { + "type": [ + "null", + "number" + ] + }, + "group_name": { + "type": [ + "null", + "string" + ] + }, + "id": { + "type": "number" + }, + "images_count": { + "type": "number" + }, + "in_service_date": { + "type": [ + "null", + "string" + ] + }, + "in_service_meter_value": { + "type": [ + "null", + "string" + ] + }, + "is_sample": { + "type": "boolean" + }, + "issues_count": { + "type": "number" + }, + "labels": { + "type": "array" + }, + "license_plate": { + "type": [ + "null", + "string" + ] + }, + "make": { + "type": [ + "null", + "string" + ] + }, + "model": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": "string" + }, + "out_of_service_date": { + "type": [ + "null", + "string" + ] + }, + "out_of_service_meter_value": { + "type": [ + "null", + "string" + ] + }, + "ownership": { + "type": "string" + }, + "primary_meter_date": { + "type": [ + "null", + "string" + ] + }, + "primary_meter_unit": { + "type": "string" + }, + "primary_meter_usage_per_day": { + "type": [ + "null", + "string" + ] + }, + "secondary_meter_unit": { + "type": [ + "string", + "null" + ] + }, + "secondary_meter_date": { + "type": [ + "string", + "null" + ] + }, + "primary_meter_value": { + "type": "string" + }, + "registration_expiration_month": { + "type": "number" + }, + "secondary_meter_usage_per_day": { + "type": [ + "null", + "string" + ] + }, + "secondary_meter_value": { + "type": "string" + }, + "service_entries_count": { + "type": "number" + }, + "service_reminders_count": { + "type": "number" + }, + "system_of_measurement": { + "type": "string" + }, + "trim": { + "type": [ + "null", + "string" + ] + }, + "registration_state": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "type": "string" + }, + "vehicle_renewal_reminders_count": { + "type": "number" + }, + "vehicle_status_color": { + "type": ["string", "null"] + }, + "vehicle_status_id": { + "type": "number" + }, + "vehicle_status_name": { + "type": "string" + }, + "vehicle_type_id": { + "type": "number" + }, + "vehicle_type_name": { + "type": "string" + }, + "vin": { + "type": [ + "null", + "string" + ] + }, + "work_orders_count": { + "type": "number" + }, + "year": { + "type": [ + "null", + "number" + ] } + }, + "type": "object" } \ No newline at end of file diff --git a/tap_fleetio/streams.py b/tap_fleetio/streams.py index 42bd4b3..f3fd527 100644 --- a/tap_fleetio/streams.py +++ b/tap_fleetio/streams.py @@ -14,7 +14,8 @@ class IssuesStream(fleetioStream): name = "issues" path = "/v2/issues" primary_keys = ["id"] - replication_key = None + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" schema_filepath = SCHEMAS_DIR / "issues.json" # noqa: ERA001 @@ -23,7 +24,8 @@ class ServiceEntriesStream(fleetioStream): name = "service_entries" path = "/v2/service_entries" primary_keys = ["id"] - replication_key = None + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" schema_filepath = SCHEMAS_DIR / "service_entries.json" # noqa: ERA001 @@ -32,7 +34,8 @@ class SubmittedInspectionFormsStream(fleetioStream): name = "submitted_inspection_forms" path = "/v1/submitted_inspection_forms" primary_keys = ["id"] - replication_key = None + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" schema_filepath = SCHEMAS_DIR / "submitted_inspection_forms.json" # noqa: ERA001 @@ -41,5 +44,66 @@ class VehiclesStream(fleetioStream): name = "vehicles" path = "/v1/vehicles" primary_keys = ["id"] - replication_key = None + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" schema_filepath = SCHEMAS_DIR / "vehicles.json" # noqa: ERA001 + + +class ExpenseEntriesStream(fleetioStream): + + name = "expense_entries" + path = "/v1/expense_entries" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "expense_entries.json" # noqa: ERA001 + + +class ContactsStream(fleetioStream): + + name = "contacts" + path = "/v2/contacts" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "contacts.json" # noqa: ERA001 + + +class FuelEntriesStream(fleetioStream): + + name = "fuel_entries" + path = "/v1/fuel_entries" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "fuel_entries.json" # noqa: ERA001 + + +class PartsStream(fleetioStream): + + name = "parts" + path = "/v1/parts" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "parts.json" # noqa: ERA001 + + +class PurchaseOrdersStream(fleetioStream): + + name = "purchase_orders" + path = "/v1/purchase_orders" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "purchase_orders.json" # noqa: ERA001 + + +class VehicleAssignmentsStream(fleetioStream): + + name = "vehicle_assignments" + path = "/v1/vehicle_assignments" + primary_keys = ["id"] + api_version = "2024-03-15" + records_jsonpath = "$.records[*]" + schema_filepath = SCHEMAS_DIR / "vehicle_assignments.json" # noqa: ERA001 \ No newline at end of file diff --git a/tap_fleetio/tap.py b/tap_fleetio/tap.py index 36efcbb..308a583 100644 --- a/tap_fleetio/tap.py +++ b/tap_fleetio/tap.py @@ -31,9 +31,9 @@ class Tapfleetio(Tap): th.Property( "api_url", th.StringType, - default="https://data-testing.preview.fleet.io/api", + default="https://secure.fleetio.com/api", description="Fleetio API base url", - ), + ) ).to_dict() def discover_streams(self) -> list[streams.fleetioStream]: @@ -46,7 +46,13 @@ def discover_streams(self) -> list[streams.fleetioStream]: streams.IssuesStream(self), streams.ServiceEntriesStream(self), streams.SubmittedInspectionFormsStream(self), - streams.VehiclesStream(self) + streams.VehiclesStream(self), + streams.ExpenseEntriesStream(self), + streams.ContactsStream(self), + streams.FuelEntriesStream(self), + streams.PartsStream(self), + streams.PurchaseOrdersStream(self), + streams.VehicleAssignmentsStream(self), ] diff --git a/tests/test_core.py b/tests/test_core.py index 385416e..6fd3378 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,22 +1,25 @@ """Tests standard tap features using the built-in SDK tests library.""" +import os import datetime -from singer_sdk.testing import get_tap_test_class +from singer_sdk.testing import get_tap_test_class, SuiteConfig from tap_fleetio.tap import Tapfleetio SAMPLE_CONFIG = { - "start_date": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"), - # TODO: Initialize minimal tap config + "api_token": os.environ.get("TAP_FLEETIO_API_TOKEN"), + "account_token": os.environ.get("TAP_FLEETIO_ACCOUNT_TOKEN") } +suite_config = SuiteConfig( + max_records_limit = 100 +) + # Run standard built-in tap tests from the SDK: TestTapfleetio = get_tap_test_class( tap_class=Tapfleetio, config=SAMPLE_CONFIG, + suite_config = suite_config, ) - - -# TODO: Create additional tests as appropriate for your tap.