diff --git a/airbyte-integrations/connectors/source-onfleet/README.md b/airbyte-integrations/connectors/source-onfleet/README.md new file mode 100644 index 000000000000..36a39206e30d --- /dev/null +++ b/airbyte-integrations/connectors/source-onfleet/README.md @@ -0,0 +1,39 @@ +# Onfleet +This directory contains the manifest-only connector for `source-onfleet`. + +This is the Onfleet connector that ingests data from the Onfleet API. + +Onfleet is the world's advanced logistics software that delights customers, scale operations, and boost efficiency https://onfleet.com/ + +In order to use this source you must first create an account on Onfleet. Once logged in, you can find the can create an API keys through the settings menu in the dashboard, by going into the API section. + +You can find more information about the API here https://docs.onfleet.com/reference/setup-tutorial + +## Usage +There are multiple ways to use this connector: +- You can use this connector as any other connector in Airbyte Marketplace. +- You can load this connector in `pyairbyte` using `get_source`! +- You can open this connector in Connector Builder, edit it, and publish to your workspaces. + +Please refer to the manifest-only connector documentation for more details. + +## Local Development +We recommend you use the Connector Builder to edit this connector. + +But, if you want to develop this connector locally, you can use the following steps. + +### Environment Setup +You will need `airbyte-ci` installed. You can find the documentation [here](airbyte-ci). + +### Build +This will create a dev image (`source-onfleet:dev`) that you can use to test the connector locally. +```bash +airbyte-ci connectors --name=source-onfleet build +``` + +### Test +This will run the acceptance tests for the connector. +```bash +airbyte-ci connectors --name=source-onfleet test +``` + diff --git a/airbyte-integrations/connectors/source-onfleet/acceptance-test-config.yml b/airbyte-integrations/connectors/source-onfleet/acceptance-test-config.yml new file mode 100644 index 000000000000..f77a7e15f95b --- /dev/null +++ b/airbyte-integrations/connectors/source-onfleet/acceptance-test-config.yml @@ -0,0 +1,17 @@ +# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) +# for more information about how to configure these tests +connector_image: airbyte/source-onfleet:dev +acceptance_tests: + spec: + tests: + - spec_path: "manifest.yaml" + connection: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + discovery: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + basic_read: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + incremental: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" + full_refresh: + bypass_reason: "This is a builder contribution, and we do not have secrets at this time" diff --git a/airbyte-integrations/connectors/source-onfleet/icon.svg b/airbyte-integrations/connectors/source-onfleet/icon.svg new file mode 100644 index 000000000000..cf5618012c9a --- /dev/null +++ b/airbyte-integrations/connectors/source-onfleet/icon.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-onfleet/manifest.yaml b/airbyte-integrations/connectors/source-onfleet/manifest.yaml new file mode 100644 index 000000000000..5268c27a15fc --- /dev/null +++ b/airbyte-integrations/connectors/source-onfleet/manifest.yaml @@ -0,0 +1,757 @@ +version: 5.15.0 + +type: DeclarativeSource + +description: >- + This is the Onfleet connector that ingests data from the Onfleet API. + + + Onfleet is the world's advanced logistics software that delights customers, + scale operations, and boost efficiency https://onfleet.com/ + + + In order to use this source you must first create an account on Onfleet. Once + logged in, you can find the can create an API keys through the settings menu + in the dashboard, by going into the API section. + + + You can find more information about the API here + https://docs.onfleet.com/reference/setup-tutorial + +check: + type: CheckStream + stream_names: + - workers + +definitions: + streams: + workers: + type: DeclarativeStream + name: workers + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /api/v2/workers + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/workers" + administrators: + type: DeclarativeStream + name: administrators + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /api/v2/admins + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/administrators" + teams: + type: DeclarativeStream + name: teams + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /api/v2/teams + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/teams" + hubs: + type: DeclarativeStream + name: hubs + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /api/v2/hubs + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/hubs" + tasks: + type: DeclarativeStream + name: tasks + primary_key: + - id + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /api/v2/tasks + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: [] + paginator: + type: DefaultPaginator + page_token_option: + type: RequestOption + inject_into: request_parameter + field_name: lastId + pagination_strategy: + type: CursorPagination + cursor_value: "{{ response.get('lastId') }}" + stop_condition: "{{ response.get('lastId') is none }}" + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/tasks" + base_requester: + type: HttpRequester + url_base: https://onfleet.com + authenticator: + type: BasicHttpAuthenticator + password: "{{ config[\"password\"] }}" + username: "{{ config[\"api_key\"] }}" + +streams: + - $ref: "#/definitions/streams/workers" + - $ref: "#/definitions/streams/administrators" + - $ref: "#/definitions/streams/teams" + - $ref: "#/definitions/streams/hubs" + - $ref: "#/definitions/streams/tasks" + +spec: + type: Spec + connection_specification: + type: object + $schema: http://json-schema.org/draft-07/schema# + required: + - api_key + - password + properties: + api_key: + type: string + description: >- + API key to use for authenticating requests. You can create and manage + your API keys in the API section of the Onfleet dashboard. + name: api_key + title: API Key + airbyte_secret: true + order: 0 + password: + type: string + description: >- + Placeholder for basic HTTP auth password - should be set to empty + string + name: password + title: Placeholder Password + default: x + airbyte_secret: true + order: 1 + additionalProperties: true + +metadata: + autoImportSchema: + workers: true + administrators: false + teams: false + hubs: false + tasks: false + testedStreams: + workers: + streamHash: 4e4085588a0a68d16ff464a0f06756f90ba1579c + hasResponse: true + responsesAreSuccessful: true + hasRecords: true + primaryKeysArePresent: true + primaryKeysAreUnique: true + administrators: + streamHash: 86bf4b87b06b606bf5317cd75403626232cc338e + hasResponse: true + responsesAreSuccessful: true + hasRecords: true + primaryKeysArePresent: true + primaryKeysAreUnique: true + teams: + streamHash: 5c5a6e8dfa1d1f93921563dbbe5c24179c4e3b54 + hasResponse: true + responsesAreSuccessful: true + hasRecords: true + primaryKeysArePresent: true + primaryKeysAreUnique: true + hubs: + streamHash: 05fc33213f414d818d7100942eb057100bdcdbb5 + hasResponse: true + responsesAreSuccessful: true + hasRecords: true + primaryKeysArePresent: true + primaryKeysAreUnique: true + tasks: + streamHash: e95fcb0a6846523fa0bd74c3aa979463ff7705f0 + hasResponse: true + responsesAreSuccessful: true + hasRecords: true + primaryKeysArePresent: true + primaryKeysAreUnique: true + assist: + docsUrl: https://docs.onfleet.com/reference/setup-tutorial + +schemas: + workers: + type: object + $schema: http://json-schema.org/schema# + additionalProperties: true + properties: + metadata: + type: + - array + - "null" + accountStatus: + type: + - string + - "null" + additionalCapacities: + type: + - object + - "null" + properties: + capacityA: + type: + - number + - "null" + capacityB: + type: + - number + - "null" + capacityC: + type: + - number + - "null" + capacity: + type: + - number + - "null" + displayName: + type: + - string + - "null" + id: + type: string + name: + type: + - string + - "null" + onDuty: + type: + - boolean + - "null" + organization: + type: + - string + - "null" + phone: + type: + - string + - "null" + tasks: + type: + - array + - "null" + teams: + type: + - array + - "null" + items: + type: + - string + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + userData: + type: + - object + - "null" + vehicle: + type: + - object + - "null" + properties: + type: + type: + - string + - "null" + id: + type: + - string + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + required: + - id + administrators: + type: object + $schema: http://json-schema.org/schema# + properties: + type: + type: + - string + - "null" + metadata: + type: + - array + - "null" + email: + type: + - string + - "null" + id: + type: string + isAccountOwner: + type: + - boolean + - "null" + isActive: + type: + - boolean + - "null" + isReadOnly: + type: + - boolean + - "null" + name: + type: + - string + - "null" + organization: + type: + - string + - "null" + phone: + type: + - string + - "null" + teams: + type: + - array + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + required: + - id + additionalProperties: true + teams: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: {} + hubs: + type: object + $schema: http://json-schema.org/schema# + properties: + address: + type: + - object + - "null" + properties: + apartment: + type: + - string + - "null" + city: + type: + - string + - "null" + country: + type: + - string + - "null" + number: + type: + - string + - "null" + postalCode: + type: + - string + - "null" + state: + type: + - string + - "null" + street: + type: + - string + - "null" + id: + type: string + location: + type: + - array + - "null" + items: + type: + - number + - "null" + name: + type: + - string + - "null" + teams: + type: + - array + - "null" + items: + type: + - string + - "null" + required: + - id + additionalProperties: true + tasks: + type: object + $schema: http://json-schema.org/schema# + properties: + type: + type: + - number + - "null" + metadata: + type: + - array + - "null" + additionalQuantities: + type: + - object + - "null" + properties: + quantityA: + type: + - number + - "null" + quantityB: + type: + - number + - "null" + quantityC: + type: + - number + - "null" + appearance: + type: + - object + - "null" + properties: {} + completeAfter: + type: + - number + - "null" + completionDetails: + type: + - object + - "null" + properties: + actions: + type: + - array + - "null" + events: + type: + - array + - "null" + failureNotes: + type: + - string + - "null" + failureReason: + type: + - string + - "null" + firstLocation: + type: + - array + - "null" + lastLocation: + type: + - array + - "null" + successNotes: + type: + - string + - "null" + unavailableAttachments: + type: + - array + - "null" + container: + type: + - object + - "null" + properties: + type: + type: + - string + - "null" + organization: + type: + - string + - "null" + creator: + type: + - string + - "null" + customFields: + type: + - array + - "null" + dependencies: + type: + - array + - "null" + destination: + type: + - object + - "null" + properties: + metadata: + type: + - array + - "null" + address: + type: + - object + - "null" + properties: + apartment: + type: + - string + - "null" + city: + type: + - string + - "null" + country: + type: + - string + - "null" + number: + type: + - string + - "null" + postalCode: + type: + - string + - "null" + state: + type: + - string + - "null" + street: + type: + - string + - "null" + googlePlaceId: + type: + - string + - "null" + id: + type: + - string + - "null" + location: + type: + - array + - "null" + items: + type: + - number + - "null" + notes: + type: + - string + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + useGPS: + type: + - boolean + - "null" + warnings: + type: + - array + - "null" + executor: + type: + - string + - "null" + feedback: + type: + - array + - "null" + id: + type: string + identity: + type: + - object + - "null" + properties: + failedScanCount: + type: + - number + - "null" + merchant: + type: + - string + - "null" + notes: + type: + - string + - "null" + organization: + type: + - string + - "null" + overrides: + type: + - object + - "null" + pickupTask: + type: + - boolean + - "null" + quantity: + type: + - number + - "null" + recipients: + type: + - array + - "null" + items: + type: + - object + - "null" + properties: + metadata: + type: + - array + - "null" + id: + type: + - string + - "null" + name: + type: + - string + - "null" + notes: + type: + - string + - "null" + organization: + type: + - string + - "null" + phone: + type: + - string + - "null" + skipSMSNotifications: + type: + - boolean + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + scanOnlyRequiredBarcodes: + type: + - boolean + - "null" + serviceTime: + type: + - number + - "null" + shortId: + type: + - string + - "null" + state: + type: + - number + - "null" + timeCreated: + type: + - number + - "null" + timeLastModified: + type: + - number + - "null" + trackingURL: + type: + - string + - "null" + trackingViewed: + type: + - boolean + - "null" + required: + - id + additionalProperties: true diff --git a/airbyte-integrations/connectors/source-onfleet/metadata.yaml b/airbyte-integrations/connectors/source-onfleet/metadata.yaml new file mode 100644 index 000000000000..f39cab554be7 --- /dev/null +++ b/airbyte-integrations/connectors/source-onfleet/metadata.yaml @@ -0,0 +1,35 @@ +metadataSpecVersion: "1.0" +data: + allowedHosts: + hosts: + - "onfleet.com" + registryOverrides: + oss: + enabled: true + cloud: + enabled: true + remoteRegistries: + pypi: + enabled: false + packageName: airbyte-source-onfleet + connectorBuildOptions: + baseImage: docker.io/airbyte/source-declarative-manifest:5.16.0@sha256:6800f806944ee4fccf24ae01f6b8fbefb12d952c3b3da338f51f732b55de51f2 + connectorSubtype: api + connectorType: source + definitionId: e4285e7f-ee6c-4b8b-b231-746c9640164e + dockerImageTag: 0.0.1 + dockerRepository: airbyte/source-onfleet + githubIssueLabel: source-onfleet + icon: icon.svg + license: MIT + name: Onfleet + releaseDate: 2024-10-27 + releaseStage: alpha + supportLevel: community + documentationUrl: https://docs.airbyte.com/integrations/sources/onfleet + tags: + - language:manifest-only + - cdk:low-code + ab_internal: + ql: 100 + sl: 100 diff --git a/docs/integrations/sources/onfleet.md b/docs/integrations/sources/onfleet.md new file mode 100644 index 000000000000..98e083615654 --- /dev/null +++ b/docs/integrations/sources/onfleet.md @@ -0,0 +1,35 @@ +# Onfleet +This is the Onfleet connector that ingests data from the Onfleet API. + +Onfleet is the world's advanced logistics software that delights customers, scale operations, and boost efficiency https://onfleet.com/ + +In order to use this source you must first create an account on Onfleet. Once logged in, you can find the can create an API keys through the settings menu in the dashboard, by going into the API section. + +You can find more information about the API here https://docs.onfleet.com/reference/setup-tutorial + +## Configuration + +| Input | Type | Description | Default Value | +|-------|------|-------------|---------------| +| `api_key` | `string` | API Key. API key to use for authenticating requests. You can create and manage your API keys in the API section of the Onfleet dashboard. | | +| `password` | `string` | Placeholder Password. Placeholder for basic HTTP auth password - should be set to empty string | x | + +## Streams +| Stream Name | Primary Key | Pagination | Supports Full Sync | Supports Incremental | +|-------------|-------------|------------|---------------------|----------------------| +| workers | id | No pagination | ✅ | ❌ | +| administrators | id | No pagination | ✅ | ❌ | +| teams | id | No pagination | ✅ | ❌ | +| hubs | id | No pagination | ✅ | ❌ | +| tasks | id | DefaultPaginator | ✅ | ❌ | + +## Changelog + +
+ Expand to review + +| Version | Date | Pull Request | Subject | +|------------------|-------------------|--------------|----------------| +| 0.0.1 | 2024-10-27 | | Initial release by [@aazam-gh](https://github.com/aazam-gh) via Connector Builder | + +