:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(warehouse-sources): add invoiceninja bank_transactions, users and task_statuses tables (#111882)
Tom Owers50f54df62c51
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.mdindex f299c2af810f..3bbb4eb35bfd 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md@@ -4415,15 +4415,15 @@ Note: Docs are HTML only (no sitemap, no llms.txt, no OpenAPI); the resource lis## Invoiceninja — gaps-Today (15): `clients`, `credits`, `expense_categories`, `expenses`, `invoices`, `payment_terms`, `payments`, `products`, `projects`, `purchase_orders`, `quotes`, `recurring_invoices`, `tasks`, `tax_rates`, `vendors`+Today (18): `bank_transactions`, `clients`, `credits`, `expense_categories`, `expenses`, `invoices`, `payment_terms`, `payments`, `products`, `projects`, `purchase_orders`, `quotes`, `recurring_invoices`, `tasks`, `task_statuses`, `tax_rates`, `users`, `vendors`Diffed against: <https://api-docs.invoicing.co/api-docs.yaml>- [ ] `GET /api/v1/activities` — the audit/activity log — every entity state transition (invoice sent, viewed, paid, quote approved) (high)-- [ ] `GET /api/v1/statics` — master lookup payload (currencies, countries, payment types, industries, sizes, timezones, date formats) resolving the \*\_id columns on nearly every synced table (high)-- [ ] `GET /api/v1/task_statuses` — lookup resolving the status_id on the tasks we already sync (high)-- [ ] `GET /api/v1/users` — lookup resolving user_id / assigned_user_id on clients, invoices, tasks, expenses (high)-- [ ] `GET /api/v1/bank_transactions` — bank feed transactions and their match state against payments/expenses (high)+- [ ] `GET /api/v1/statics` — master lookup payload (currencies, countries, payment types, industries, sizes, timezones, date formats) resolving the \*\_id columns on nearly every synced table (high). Skipped: the endpoint returns one unpaginated object whose keys each hold a different lookup list (currencies, countries, industries, and so on) with separate id spaces, so it is not one table. The lists are reference data shipped with Invoice Ninja, not account records, and self-hosted instances also put the instance `license_key` in the payload.+- [x] `GET /api/v1/task_statuses` — lookup resolving the status_id on the tasks we already sync (high). Added as `task_statuses`.+- [x] `GET /api/v1/users` — lookup resolving user_id / assigned_user_id on clients, invoices, tasks, expenses (high). Added as `users`.+- [x] `GET /api/v1/bank_transactions` — bank feed transactions and their match state against payments/expenses (high). Added as `bank_transactions`.- [ ] `GET /api/v1/company_ledger` — per-client ledger entries — the running AR balance behind invoices and payments (medium)- [ ] `GET /api/v1/subscriptions` — recurring billing plans customers are subscribed to (medium)- [ ] `GET /api/v1/recurring_expenses` — recurring cost side; we sync recurring_invoices but not recurring_expenses (medium)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/canonical_descriptions.pyindex e56fdb77ca8f..591aa81fc656 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/canonical_descriptions.py@@ -196,4 +196,50 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"created_at": "Unix timestamp (seconds) when the payment term was created.",},},+ "bank_transactions": {+ "description": "A transaction imported from a connected bank feed, with its match state against invoices, payments, and expenses.",+ "docs_url": _DOCS_URL,+ "columns": {+ "id": "Unique identifier for the bank transaction.",+ "bank_integration_id": "Identifier of the bank integration (connected account) the transaction came from.",+ "amount": "Transaction amount.",+ "currency_id": "Identifier of the transaction currency.",+ "base_type": "Direction of the transaction: CREDIT (money in) or DEBIT (money out).",+ "date": "Date the transaction was posted (YYYY-MM-DD).",+ "description": "Description of the transaction as reported by the bank.",+ "status_id": "Match state of the transaction (unmatched, matched, or converted).",+ "invoice_ids": "Comma-separated identifiers of the invoices the transaction was matched to.",+ "payment_id": "Identifier of the payment created from the transaction, if any.",+ "expense_id": "Identifier(s) of the expense created from the transaction, if any.",+ "vendor_id": "Identifier of the vendor the transaction was assigned to, if any.",+ "bank_transaction_rule_id": "Identifier of the matching rule that categorized the transaction, if any.",+ "is_deleted": "Whether the bank transaction has been soft-deleted.",+ "created_at": "Unix timestamp (seconds) when the bank transaction was imported.",+ },+ },+ "task_statuses": {+ "description": "A workflow status (Kanban column) a task can be in. Resolves the `status_id` on tasks.",+ "docs_url": _DOCS_URL,+ "columns": {+ "id": "Unique identifier for the task status.",+ "name": "Name of the task status.",+ "color": "Display color of the task status.",+ "status_order": "Position of the status in the task board ordering.",+ "is_deleted": "Whether the task status has been soft-deleted.",+ "created_at": "Unix timestamp (seconds) when the task status was created.",+ },+ },+ "users": {+ "description": "A user of the Invoice Ninja company. Resolves `user_id` and `assigned_user_id` on other records.",+ "docs_url": _DOCS_URL,+ "columns": {+ "id": "Unique identifier for the user.",+ "first_name": "The user's first name.",+ "last_name": "The user's last name.",+ "email": "The user's email address.",+ "last_login": "Unix timestamp (seconds) of the user's last login, or 0 if they have never logged in.",+ "is_deleted": "Whether the user has been soft-deleted.",+ "created_at": "Unix timestamp (seconds) when the user was created.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/settings.pyindex 58797ef51223..5bc16d92168b 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/invoiceninja/settings.py@@ -30,6 +30,7 @@ class InvoiceNinjaEndpointConfig:# filter. Client and vendor contacts arrive embedded in their parent objects (Invoice Ninja nests a# `contacts` array on each client/vendor), so they are captured without a dedicated fan-out endpoint.INVOICENINJA_ENDPOINTS: dict[str, InvoiceNinjaEndpointConfig] = {+ "bank_transactions": InvoiceNinjaEndpointConfig(name="bank_transactions", path="/bank_transactions"),"clients": InvoiceNinjaEndpointConfig(name="clients", path="/clients"),"credits": InvoiceNinjaEndpointConfig(name="credits", path="/credits"),"expense_categories": InvoiceNinjaEndpointConfig(name="expense_categories", path="/expense_categories"),@@ -43,7 +44,9 @@ INVOICENINJA_ENDPOINTS: dict[str, InvoiceNinjaEndpointConfig] = {"quotes": InvoiceNinjaEndpointConfig(name="quotes", path="/quotes"),"recurring_invoices": InvoiceNinjaEndpointConfig(name="recurring_invoices", path="/recurring_invoices"),"tasks": InvoiceNinjaEndpointConfig(name="tasks", path="/tasks"),+ "task_statuses": InvoiceNinjaEndpointConfig(name="task_statuses", path="/task_statuses"),"tax_rates": InvoiceNinjaEndpointConfig(name="tax_rates", path="/tax_rates"),+ "users": InvoiceNinjaEndpointConfig(name="users", path="/users"),"vendors": InvoiceNinjaEndpointConfig(name="vendors", path="/vendors"),}