feat(quickbooks): add read-only procurement integration - #6099
feat(quickbooks): add read-only procurement integration#6099BillLeoutsakosvl346 wants to merge 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview OAuth and auth wires Intuit OAuth (scopes, token exchange, refresh with rotation), validates Runtime adds the QuickBooks block (pagination, templates/skills), tool client with bounded reads, minor version 75, explicit pagination, and a dedicated QuickBooks Fault error extractor (not global fallback). Serializer fix keeps singleton OAuth credentials when other advanced fields are set. Docs and config: icon, integration registry/docs, Reviewed by Cursor Bugbot for commit 9a6a51c. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryAdds a read-only QuickBooks Online procurement integration.
Confidence Score: 5/5The PR appears safe to merge based on the reviewed code, with no actionable defects identified. The company identifier remains credential-bound through OAuth validation and tool execution, requests are constrained to fixed read-only entities and configured hosts, and response, pagination, refresh, and error-handling paths include explicit bounds and validation.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/oauth/quickbooks.ts | Defines and validates the company-bound QuickBooks account identity and OAuth connection profile. |
| apps/sim/lib/auth/auth.ts | Registers the QuickBooks generic OAuth flow and validates the selected company during connection. |
| apps/sim/app/api/auth/oauth/token/route.ts | Extracts the bound QuickBooks realm from authorized credentials and returns it to tool execution. |
| apps/sim/lib/quickbooks/client.ts | Centralizes environment-specific hosts, URL construction, response limits, headers, and CompanyInfo validation. |
| apps/sim/tools/quickbooks/utils.ts | Implements fixed-entity queries, bounded JSON parsing, fault detection, pagination validation, and response transformation. |
| apps/sim/tools/index.ts | Propagates provider context, supports per-tool response limits, and sanitizes QuickBooks errors before output or logging. |
| apps/sim/blocks/blocks/quickbooks.ts | Adds the QuickBooks block, four fixed operations, validated pagination mapping, templates, and skills. |
| apps/sim/lib/oauth/oauth.ts | Registers QuickBooks OAuth metadata and hardens shared refresh-response parsing and logging. |
Sequence Diagram
sequenceDiagram
participant User
participant OAuth as QuickBooks OAuth
participant Auth as Sim Auth
participant Token as OAuth Token Route
participant Tool as QuickBooks Tool
participant QBO as QuickBooks Accounting API
User->>OAuth: Authorize selected company
OAuth-->>Auth: Authorization code
Auth->>OAuth: Exchange code and fetch UserInfo
Auth->>QBO: Validate CompanyInfo for realmId
Auth-->>User: Store company-bound credential
Tool->>Token: Request refreshed credential context
Token-->>Tool: accessToken and bound realmId
Tool->>QBO: Fixed read-only request for bound company
QBO-->>Tool: CompanyInfo or paginated entities
Tool-->>User: Sanitized bounded response
Reviews (1): Last reviewed commit: "feat(quickbooks): add read-only procurem..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 33d9afb. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 29bfcc5. Configure here.
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 19e00eb. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 00fc671. Configure here.
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 970d3b1. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6df18b0. Configure here.
…tegration # Conflicts: # apps/sim/tools/generated/tool-ids.ts # apps/sim/tools/generated/tool-metadata.ts # apps/sim/tools/generated/tool-outputs.ts
Summary
Adds a clean, read-only QuickBooks Online procurement integration with one OAuth connection bound to one selected QuickBooks company.
realmIdto the validated OAuth credential, so workflows cannot choose or override a company.Review fixes included
Validation
bunx vitest run tools/index.test.ts tools/quickbooks lib/oauth/quickbooks.test.ts lib/oauth/oauth.test.ts lib/oauth/utils.test.ts app/api/auth/oauth/token/route.test.ts blocks/blocks.test.ts— 8 files, 387 tests passed.bun run type-check— 23/23 monorepo tasks passed.bun run lint:check— passed; only two pre-existing Biome false-positive warnings on terminalfit()method calls.bun run generate-docs— passed.bun run check:bare-icons— passed.bun run check:icon-paths— passed.bun run check:api-validation— passed.git diff --check origin/staging...HEAD— passed.READY FOR DRAFT PR.Manual sandbox acceptance still required
This PR remains a draft until a live Intuit sandbox confirms UserInfo
realmIddelivery and the full acceptance flow: CompanyInfo identity matching, all four actions, explicit page continuation, empty pages, two-company isolation, reconnect behavior, refresh-token rotation, revoked-credential guidance, and sandbox-host isolation. No credentials or unsanitized accounting data are committed.