Skip to content

Commit

Permalink
incremental replicaton and new streams
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmizerany committed Nov 22, 2023
1 parent e5237aa commit f245198
Show file tree
Hide file tree
Showing 10 changed files with 1,015 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tap_fleetio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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://test.fleetio.com/api"

records_jsonpath = "$[*]" # Or override `parse_response`.

Expand Down
80 changes: 80 additions & 0 deletions tap_fleetio/schemas/contacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "http://json-schema.org/schema#",
"properties": {
"comments_count": {
"type": ["number", "null"]
},
"created_at": {
"type": ["string", "null"]
},
"custom_fields": {
"properties": {
"birthday": {
"type": ["string", "null"]
},
"certification": {
"type": ["string", "null"]
},
"checkbox": {
"type": ["string", "null"]
},
"dropdown": {
"type": ["string", "null"]
},
"out_of_network_mechanic": {
"type": ["string", "null"]
},
"pronouns": {
"type": ["string", "null"]
},
"t-shirt_size": {
"type": ["string", "null"]
},
"test_restricted_custom_fields": {
"type": ["string", "null"]
}
},
"type": "object"
},
"documents_count": {
"type": ["number", "null"]
},
"email": {
"type": ["string", "null"]
},
"employee": {
"type": "boolean"
},
"first_name": {
"type": ["string", "null"]
},
"group_id": {
"type": ["number", "null"]
},
"group_name": {
"type": ["string", "null"]
},
"id": {
"type": "number"
},
"images_count": {
"type": ["number", "null"]
},
"last_name": {
"type": ["string", "null"]
},
"name": {
"type": ["string", "null"]
},
"technician": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"vehicle_operator": {
"type": "boolean"
}
},
"type": "object"
}
71 changes: 71 additions & 0 deletions tap_fleetio/schemas/expense_entries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "http://json-schema.org/schema#",
"properties": {
"created_at": {
"type": "string"
},
"custom_fields": {
"properties": {
"expense_status": {
"type": ["string", "null"]
},
"juan_reason_for_entry_field": {
"type": ["string", "null"]
},
"otr_expenses": {
"type": ["string", "null"]
},
"test_checkbox": {
"type": ["string", "null"]
},
"test_date": {
"type": ["string", "null"]
},
"test_dropdown": {
"type": ["string", "null"]
},
"test_text": {
"type": ["string", "null"]
},
"xylophone": {
"type": ["string", "null"]
}
},
"type": "object"
},
"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"]
},
"updated_at": {
"type": "string"
},
"vehicle_id": {
"type": ["number", "null"]
},
"vehicle_name": {
"type": ["string", "null"]
},
"vendor_id": {
"type": ["number", "null"]
},
"vendor_name": {
"type": ["string", "null"]
}
},
"type": "object"
}
146 changes: 146 additions & 0 deletions tap_fleetio/schemas/fuel_entries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"$schema": "http://json-schema.org/schema#",
"properties": {
"attachment_permissions": {
"type": "object"
},
"comments": {
"type": "array"
},
"comments_count": {
"type": ["number", "null"]
},
"created_at": {
"type": ["string", "null"]
},
"custom_fields": {
"properties": {
"card_number": {
"type": ["string", "null"]
},
"custom_fuel_date": {
"type": ["string", "null"]
},
"expense_type": {
"type": ["string", "null"]
},
"fuel-up_state": {
"type": ["string", "null"]
},
"fuel_unit_number": {
"type": ["string", "null"]
},
"juan_type_of_fuel": {
"type": ["string", "null"]
},
"second_tank_gallons": {
"type": ["string", "null"]
},
"test_restricted_custom_fields": {
"type": ["string", "null"]
},
"used_card": {
"type": ["string", "null"]
}
},
"type": "object"
},
"date": {
"type": ["string", "null"]
},
"documents": {
"type": "array"
},
"documents_count": {
"type": ["number", "null"]
},
"fuel_economy_units_for_current_user": {
"type": ["string", "null"]
},
"geolocation": {
"type": "object"
},
"id": {
"type": "number"
},
"images": {
"type": "array"
},
"images_count": {
"type": ["number", "null"]
},
"is_sample": {
"type": "boolean"
},
"liters": {
"type": ["string", "null"]
},
"map_previews": {
"properties": {},
"type": "object"
},
"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"
}
},
"type": "object"
},
"partial": {
"type": "boolean"
},
"personal": {
"type": "boolean"
},
"reference": {
"type": ["string", "null"]
},
"reset": {
"type": "boolean"
},
"total_amount": {
"type": ["number", "null"]
},
"uk_gallons": {
"type": ["string", "null"]
},
"updated_at": {
"type": ["string", "null"]
},
"us_gallons": {
"type": ["string", "null"]
},
"vehicle_id": {
"type": ["number", "null"]
},
"vehicle_name": {
"type": ["string", "null"]
}
},
"type": "object"
}
18 changes: 9 additions & 9 deletions tap_fleetio/schemas/issues.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
]
},
"closed_note": {
"type": "string"
"type": ["string", "null"]
},
"comments_count": {
"type": "number"
"type": ["number", "null"]
},
"created_at": {
"type": "string"
"type": ["string"]
},
"creation_type": {
"type": "string"
"type": ["string", "null"]
},
"description": {
"type": "string"
"type": ["string", "null"]
},
"documents_count": {
"type": "number"
Expand Down Expand Up @@ -90,7 +90,7 @@
"type": "boolean"
},
"number": {
"type": "number"
"type": ["number", "null"]
},
"reported_at": {
"type": "string"
Expand Down Expand Up @@ -147,13 +147,13 @@
]
},
"summary": {
"type": "string"
"type": ["string", "null"]
},
"updated_at": {
"type": "string"
"type": ["string", "null"]
},
"watchers_count": {
"type": "number"
"type": ["number", "null"]
}
}
}
Loading

0 comments on commit f245198

Please sign in to comment.