Add QuickBooks Online adapter (ChangeDataCapture)#286
Draft
maximelb wants to merge 1 commit into
Draft
Conversation
Collects change/activity data from a QuickBooks Online company via the Accounting API's ChangeDataCapture (CDC) operation, over OAuth 2.0. QuickBooks Online's user-attributed "Audit Log" UI feature is not exposed through any public Intuit API; CDC is the authoritative programmatic source of change activity (creations, updates, and deletions across entities), so the adapter polls CDC on a rolling window and ships each changed entity to LimaCharlie verbatim, tagged with its entity type. Highlights: - OAuth 2.0 refresh-token flow with transparent access-token refresh, one-shot 401 refresh-and-retry, refresh-token rotation handling, and a fatal stop on permanently rejected credentials. - Rolling-window CDC polling with overlap + in-memory dedupe keyed on entityType|Id|LastUpdatedTime (re-emits a fresh event when an object is edited again). Clamps to CDC's 30-day horizon and warns on the 1000-object cap. Retries 429/5xx with exponential backoff. - Configurable entity set (sensible default), sandbox/prod roots, minor version pin, poll interval, overlap, and initial lookback. - Thorough tests: unit tests for CDC response parsing, dedupe keying, config validation, transient-error classification; plus end-to-end tests against a mock QBO server (token + CDC) covering verbatim shipping, exactly-once delivery, updated-entity re-ship, deletions, 401 token refresh, and credential-failure shutdown. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lcbill
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
quickbooksUSP adapter that collects change/activity data from a QuickBooks Online company via the Accounting API's ChangeDataCapture (CDC) operation, over OAuth 2.0.Important scoping note
QuickBooks Online's user-attributed "Audit Log" (the Settings → Audit Log UI feature showing who did what) is not exposed through any public Intuit API — Intuit confirms this repeatedly; it's an internal report only available in the web UI. The authoritative programmatic source of activity is ChangeDataCapture, which returns the full current state of every entity that changed since a timestamp, including deletions (
status: "Deleted"). It tells you what changed and when, not the acting user or a field-level diff. The README is explicit about this so operators have correct expectations.Authoritative sources used:
How it works
[since - overlap, now]window; the high-water mark advances only on success. An in-memory deduper keyed onentityType|Id|LastUpdatedTimegives exactly-once delivery across the overlap while still re-emitting when an object is edited again.sandbox/prod roots, minor-version pin, poll interval, overlap, initial lookback, dedupe TTL, retry tuning. Registered incontainers/conf/all.goandcontainers/general/tool.go; usage is reflection-generated automatically.Tests
go test ./quickbooks/(also passing under-race):TokenErrorwrapping).MetaData.LastUpdatedTime, exactly-once delivery, mid-run new change, updated-entity re-ship, deletion capture, transparent 401 token refresh, multi-poll overlap with no re-ship, and credential-failure shutdown.Notes for reviewers
threatlockeradapter (generic client + adapter +uspSinktest seam + deduper).🤖 Generated with Claude Code