@go-labs-sg/bb 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,6 +24,17 @@ For AI agents using this CLI: do not execute mutations until the user explicitly
24
24
 
25
25
  **Registry:** [`@go-labs-sg/bb`](https://www.npmjs.com/package/@go-labs-sg/bb)
26
26
 
27
+ ## QuickBooks names
28
+
29
+ Company, supplier, project, item and item-category mutation names use the same
30
+ `quickBooksNameSchema` as the web forms and API. The CLI bundles that schema from
31
+ `@go-labs/budget-builder-validators/quickbooks/qbo-name`; do not add a CLI-only
32
+ regex, character list or name-length limit. Read-only search filters are not
33
+ mutation names and remain unrestricted by this rule.
34
+
35
+ Item synchronization also validates the complete QuickBooks name, including
36
+ Budget Builder's ` (catalogueCode)` suffix, before queuing a new provider write.
37
+
27
38
  ## Supplier cursor pages and independent totals
28
39
 
29
40
  `bb supplier list` (alias `list-suppliers`) returns rich `items` and `pageInfo` with opaque `nextCursor`, `previousCursor`, and directional availability. Use `--limit 1-100` (default 10), then pass a returned token unchanged with the same filters and sort. Previous navigation uses `--direction backward --cursor <previousCursor>`. Retired `--page`/`--perPage` flags are rejected; numbered/random-access pages are no longer supported.
@@ -51,7 +62,7 @@ Roll out the API and maintained CLI together: `suppliers`/`pageCount` and offset
51
62
 
52
63
  **Item detail shape:** `item.getItem` / `bb get-item` return the catalogue item's own fields (name, code, cost, rich-text description, GST flags, active/QuickBooks/availability state) with `supplier` narrowed to `{ id, name, gstRegistered, active, status }`, `itemCategory` to `{ id, name }` and attachments to `{ id, name, key, size }`. Full supplier and category records, plain-text `description`, `lowerCaseName` and the QuickBooks sync token are no longer included. `list-items` rows carry the list columns plus the same edit fields.
53
64
 
54
- **Supplier detail shape:** `supplier.getSupplierById` / `bb get-supplier-details` keep every supplier field the detail page and pending-update diff compare (contact, banking, PayNow, payment/role/certification ids, address, pending update), with `createdBy` narrowed to `{ id, name, email, image, role }`, attachments to `{ id, name, key, size }`, payment method/role/certification/tags to `{ id, name }` and each catalogue item to `{ id, catalogueCode, name, cost, descriptionRichText, itemCategory { id, name }, _count }`. Approvals carry their ids, status, timestamps and approver/responder users, not budget/bill/quotation links. `lowerCaseName`, the QuickBooks id and sync token, and `createdById` are no longer included.
65
+ **Supplier detail shape:** `supplier.getSupplierById` / `bb get-supplier-details` return the full supplier in one read and keep every supplier field the detail page and pending-update diff compare (contact, banking, PayNow, payment/role/certification ids, address, pending update), with `createdBy` narrowed to `{ id, name, email, image, role }`, attachments to `{ id, name, key, size }`, payment method/role/certification/tags to `{ id, name }` and each catalogue item to `{ id, catalogueCode, name, cost, descriptionRichText, itemCategory { id, name }, _count }`. Approvals carry their ids, status, timestamps and approver/responder users, not budget/bill/quotation links. `lowerCaseName`, the QuickBooks id and sync token, and `createdById` are no longer included.
55
66
 
56
67
  **Project detail shape:** `project.getProjectById` returns the project's own scheduling, ownership, Slack, Asana-task, QuickBooks and win fields plus the derived calendar, Asana and PM-membership fields, with `company { id, name }`, `asanaProject { gid, url }`, `insideSales`/`businessDevelopment`/`wonBy { id, name }`, `projectManager { id, name, email, bannedAt }` and `contactPerson { id, displayName, firstName, lastName }`. `project.getProjectDetailsById` / `bb get-project` returns the same project fields with only the derived Asana fields, `company { id, name }`, `asanaProject { gid, url }`, `wonBy { id, name }` and `contactPerson { id, displayName, firstName, lastName, email, mobile }`; it has no assignment relations, calendar or PM-membership fields. Both no longer include lost/override reasons, deal-automation and deal-lost bookkeeping columns, `winProofRequirement` or the payment-schedule lead days.
57
68
 
@@ -706,11 +717,11 @@ Admin/Lead users can run `bb supplier approve <supplierId>` to directly re-appro
706
717
  | **Budgets** | `list-budgets` (full payload by default; `--summary` or `--includeDetails false` for slim list), `get-budget`, `get-budget-items`, `get-budget-details`, `get-budget-categories` (forward cursor pages of active categories, name A–Z: `--q` / `--limit` / `--cursor`; returns `{ items, pageInfo }`), `get-budget-versions`, `rename-budget-version`, `restore-budget-version`, `update-budget-status` (`ESTIMATE_ACCEPTED` requires win proof, auto-marks `PITCH` or `LOST` projects `WON`, and auto-creates an Asana Event Ops section from Prompt 5 tasks when enabled; Prompt 5 skips quantity-zero items, combines matching non-GO-internal suppliers, keeps each GO internal item separate, removes generated work that repeats another line item or group, adds 5 mandatory supplier subtasks ending in "Get bill and upload to Budget Builder", and sets no subtask due dates; `--projectStatusOnCommercialRejection PITCH\|LOST` is required when rejecting the only accepted/closed budget on a commercial project), `mark-budget-won` (`<budgetId>` + proof file path; `PITCH` or `LOST` projects become `WON` automatically), `create-budget` / `update-budget` (`--payload`; cloned unavailable lines require `unavailableItemReviewAcknowledged: true`), `delete-budget`, `create-budget-approval` (also sends approval request emails), `create-estimate`, `send-estimate-to-contact-person` (same contact-person email workflow as web), `add-budget-items`, `update-budget-item`, `replace-budget-item`, `approve-unavailable-item-exception` (Lead/Admin), `remove-budget-item`, `reorder-budget-items`, `update-budget-item-supplier`, `mark-budget-items-not-utilized`, `restore-budget-item`, `create-placeholder-bill` (admin recovery), `create-budget-category`, `update-budget-category`, `delete-budget-category`, `update-budget-commission`, `delete-budget-commission`, `update-budget-discount`, `delete-budget-discount` (`--payload` where noted), `upload-budget-attachment` (`<budgetId>` + local file path; uses `attachment.requestBudgetAttachmentUpload` + PUT + `attachment.confirmBudgetAttachment`) |
707
718
  | **Bills / claims** | `list-bills` (`--isClaimable false` for bills, `--isClaimable true` for claims, omit for both), `list-claims` (claims only), `validate-bill-selection` (`--payload`, plus `--quotationIds q1,q2` or legacy `--quotationId q1`; validates the approved supplier and quotation coverage), `link-bill-quotations` (`<billId> --quotationIds q1,q2`; Admin source-link repair for eligible supplier bills), `stage-bill-attachment` (securely uploads invoice/payment-proof files before creation and returns attachment JSON; ownership and one-hour expiry are enforced by a server-side staged-upload record rather than encoded in the object key), `cleanup-staged-bill-attachments`, `create-bill` (`--payload`; set `isClaimable=false` for a bill and provide approved `quotationIds`, or use `--quotation-exempt` for an eligible server-validated exemption; set `isClaimable=true` for a claim without quotations; supplier bills require positive **before-GST** `extractedAmount` (full invoice subtotal) and `amount` (portion billed), with `amount <= extractedAmount`; line and quotation allocation amounts also exclude GST; an already-paid supplier bill sets `alreadyPaid=true` and requires `paymentReference` plus a staged PDF in `paymentProofAttachments`; admin creation automatically queues QBO finalization while other roles remain pending approval), `update-bill` (`--payload`), `update-bill-payment-evidence` (`--payload`; replaces the payment reference and payment-proof PDFs for an already-paid bill), `delete-bill`, `create-bill-approval` (also sends approval request emails), `update-bill-status` (`PAID` requires `--paymentReference`; pass `--paymentProof <receipt.pdf>` to stage and submit a PDF up to 20MB atomically, or omit it only when BB already has payment proof; moving to `PAID` runs the server's paid-bill notification workflow), `patch-bill-payment` (PAID bills: `--paymentTrackingUrl`, `--paymentReference`, `--quickbooksBillId`, `--paymentDate` ISO; clearing a paid bill's QuickBooks link is not allowed), `patch-bill-invoice-number`, `get-bill-attachments` (newest-first cursor pages: `--limit` 1–50, `--cursor`; returns `{ items, pageInfo }`), `upload-bill-attachment` (`<billId>` + local path), `get-bill-details` (the web bill summary: status, amounts, people, payment, line totals), `get-bill-line-items` / `get-bill-approvals` (newest-first cursor pages: `--limit`, `--cursor`; `{ items, pageInfo }`), `get-bill-payment` (payment status, reference, date, tracking URL, QuickBooks link, external payment) |
708
719
  | **Quotations** | `list-quotations` (project, budget, supplier, status, requester and text-search filters; newest-first cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`; `--page` / `--perPage` / `--pageSize` are rejected), `count-quotations` (`quotation.getCounts`: filters only, returns `totalCount`, status facets that ignore their own status filter, and `--includeMetrics true` amount metrics), `get-quotation` (web quotation shape), `get-quotation-line-items` (`<quotationId>`; newest-first cursor pages, `--limit 1-100`, `--cursor`), `upload-quotation-attachment` (`<projectId>` + PDF/JPEG/PNG path up to 20MB; returns attachment JSON for payload use), `cleanup-staged-quotation-attachments`, `create-quotation` (`--payload` for `quotation.createDraft`; include `amountWithoutGst`, `gstAmount`, and `lineAmounts` entries `{ budgetItemId, amount }` for multiple selected items), `update-quotation` (`--payload`; updates a `DRAFT` or `REJECTED` quotation), `delete-quotation`, `submit-quotation`, `approve-quotation`, `reject-quotation`, `download-quotation-pdf` (`original`, `staff`, or `final`) |
709
- | **Customer invoices** | `check-customer-invoice-readiness`, `list-eligible-customer-invoice-budgets`, `preview-customer-invoice-amount`, `list-available-qbo-customer-invoices`, `list-customer-invoices` (global/project/budget filters; cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`, `--page` / `--perPage` rejected; `--sortBy totalInvoiceAmount` sorts provider-confirmed totals including GST, with unknown amounts last), `count-customer-invoices` (`customerInvoice.getCounts`: filters only; `totalCount`, lifecycle status facets that ignore their own status filter, and amount metrics), `get-customer-invoice` (web-shaped batch), `get-customer-invoice-invoices`, `get-customer-invoice-lines`, `get-customer-invoice-approvals`, `get-customer-invoice-history`, `get-customer-invoice-email-context`, `preview-qbo-customer-invoice`, `import-qbo-customer-invoice` (BB-only link with reviewed token), `create-customer-invoice`, `resubmit-customer-invoice` (original requester only; one replacement after confirmed expiry voiding; repeated calls return the same replacement), `discard-customer-invoice`, `delete-customer-invoice`, `void-customer-invoice`, `approve-customer-invoice` (admin), `reject-customer-invoice` (admin), `send-customer-invoice-to-contact-person`, `download-customer-invoice-pdf` (non-admins cannot download while approval is pending), `mark-customer-invoice-sent-externally` (admin; `--sentAt` ISO, `--recipients` comma list, optional `--note`; records an APPROVED invoice as SENT/EXTERNAL, sends no email), `sync-customer-invoice` (status only: QuickBooks edits to bill-to address, memo, bill email or total are held as `qboDetailsDrift` and admins are emailed once per QuickBooks revision), `update-customer-invoice-details` (bill-to address and memo; external QuickBooks write; bill email is managed in QuickBooks), `update-customer-invoice-qbo-drift` (admin; `--resolution ACCEPT_QBO` writes BB only, `KEEP_BB` queues BB's address and memo to QuickBooks) |
720
+ | **Customer invoices** | `check-customer-invoice-readiness`, `list-eligible-customer-invoice-budgets`, `preview-customer-invoice-amount`, `list-available-qbo-customer-invoices`, `list-customer-invoices` (global/project/budget filters; cursor pages via `--limit` / `--cursor` / `--direction` returning `{ items, pageInfo }`, `--page` / `--perPage` rejected; `--sortBy totalInvoiceAmount` sorts provider-confirmed totals including GST, with unknown amounts last), `count-customer-invoices` (`customerInvoice.getCounts`: filters only; `totalCount`, lifecycle status facets that ignore their own status filter, and amount metrics), `get-customer-invoice` (web-shaped batch), `get-customer-invoice-invoices`, `get-customer-invoice-lines`, `get-customer-invoice-approvals`, `get-customer-invoice-history`, `get-customer-invoice-payments` (live QuickBooks payments for one invoice), `get-customer-invoice-email-context`, `preview-qbo-customer-invoice`, `import-qbo-customer-invoice` (BB-only link with reviewed token), `create-customer-invoice`, `resubmit-customer-invoice` (original requester only; one replacement after confirmed expiry voiding; repeated calls return the same replacement), `discard-customer-invoice`, `delete-customer-invoice`, `void-customer-invoice`, `approve-customer-invoice` (admin), `reject-customer-invoice` (admin), `send-customer-invoice-to-contact-person`, `download-customer-invoice-pdf` (non-admins cannot download while approval is pending), `mark-customer-invoice-sent-externally` (admin; `--sentAt` ISO, `--recipients` comma list, optional `--note`; records an APPROVED invoice as SENT/EXTERNAL, sends no email), `sync-customer-invoice` (status only: QuickBooks edits to bill-to address, memo, bill email or total are held as `qboDetailsDrift` and admins are emailed once per QuickBooks revision), `update-customer-invoice-details` (bill-to address and memo; external QuickBooks write; bill email is managed in QuickBooks), `update-customer-invoice-qbo-drift` (admin; `--resolution ACCEPT_QBO` writes BB only, `KEEP_BB` queues BB's address and memo to QuickBooks) |
710
721
  | **Approvals** | `list-approvals` / `get-pending-approvals` (`--type budget\|supplier\|bill\|quotation\|customer_invoice\|all`), `approve-bill` / `reject-bill` (send reply email), `approve-budget` / `reject-budget` (send reply email), `approve-supplier` / `reject-supplier` (send reply email), `approve-quotation` / `reject-quotation`, `approve-customer-invoice` / `reject-customer-invoice` |
711
722
  | **Companies & projects** | `list-companies`, `get-company`, `create-company`, `update-company` (`--payload`), `delete-company`, `list-projects`, `get-project` (its budget overview returns `totalRevenue`, calculated only from Estimate Accepted and Estimate Closed budgets), `get-project-hub-status`, `setup-project-hub`, `sync-project-hub-commercial-documents`, `create-project` (required: `--name`, `--companyId`, `--contactPersonId`, `--insideSalesId`, `--businessDevelopmentId`, `--venue`, `--startDate` as ISO datetime for project/window start; when `--asanaTaskId` is omitted, the CLI searches open Asana lead tasks in the Deals project, prompts for one of the top five matches, and resolves Slack channel fields from the selected deal card; optional `--asanaSearch`, `--pax`, `--endDate`, `--description`, `--projectManagerId`; always requests QBO project import like the web app), `update-project` (`--payload` with `dateRange.from` / `dateRange.to` for the project window; optional `projectManagerId` and `requestQboAccountantNotification` in JSON), `delete-project`, `check-project-reconciliation <id>` (runs the web app's live checks without changing status), `reconcile-project <id>` (reruns checks transactionally and marks an eligible project `RECONCILED`), `complete-project <id>` (reruns validation, marks a reconciled project `COMPLETED`, and queues QuickBooks placeholder cleanup), `import-qbo-project`, `update-project-status` (`<id>` `<status>`: `PITCH` \| `WON` \| `COMPLETED` \| `RECONCILED` \| `LOST`; close-out follows `WON` → `RECONCILED` → `COMPLETED`, and reconciliation requires every accepted/closed budget line to have an Approved/Paid bill or claim or be explicitly Not Utilized; marking `COMPLETED` queues deletion of every remaining project placeholder bill from QuickBooks; for `PITCH` → `WON` also pass a Budget Builder user `--projectManagerId` or `--projectManagerEmail`; when marking `WON` without an accepted/closed budget or proof, pass `--wonOverrideReason`) |
712
723
  | **Contacts** | `list-contacts`, `create-contact-person` (`--payload`), `update-contact-person` (`--payload`) |
713
- | **Suppliers & items** | `list-suppliers` (defaults to active suppliers, `--perPage 10`, sorted by `createdAt` desc; supports `--name`, `--sortBy` for scalar supplier fields, `--sortDir`, `--createdBy`, `--gstRegistered`, `--status`, `--supplierTags`, `--active false` for archived suppliers), `create-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `update-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `delete-suppliers` (`--ids` CSV; admin; archives/deactivates related items), `reactivate-suppliers` (`--ids` CSV; admin; reactivates related items), `create-certification` / `create-payment-method` / `create-supplier-role` / `create-supplier-tag` (`--name`), `get-supplier-details` (includes `supplierApprovalSummary` for pending approvers, superseded approvers, and the actual responder/respondedAt metadata), `get-supplier-analytics` (admin; cursor pages: `--limit` / `--cursor` / `--direction`, optional `--name`, `--status` CSV, `--gstRegistered true|false`, `--createdBy`, `--timeFrame` (with `--startDate`/`--endDate` for `CUSTOM` only), `--sortBy name|gstRegistered|status|phone|email|updatedAt|createdAt`, `--sortDir`; `--page` / `--perPage` rejected; invalid filters are rejected instead of silently widening results), `count-supplier-analytics` (admin; `{ totalCount }` for the same filters), `list-items` (`--includeQuickBooksDeactivationPending true` discovers interrupted QuickBooks deactivations for Admin retry), `create-item` (`--payload`), `update-item` (`--payload`), `archive-items` (`--ids` CSV, max 100; Budget Builder-only; open estimates retain unavailable snapshot lines for resolution), `delete-item` (admin; archives in Budget Builder and makes the item inactive in QuickBooks; blocked while an open estimate references it), `get-item`, `list-item-categories` (cursor pages of active categories: `--limit` / `--cursor` / `--direction`, optional `--name`, `--sortBy createdAt|name|itemCount|createdBy`, `--sortDir`; `--page` / `--perPage` rejected), `count-item-categories` (`{ totalCount }` for the same `--name`), `create-item-category` / `update-item-category` / `delete-item-categories` (admin; `--ids` CSV for delete) |
724
+ | **Suppliers & items** | `list-suppliers` (defaults to active suppliers, `--perPage 10`, sorted by `createdAt` desc; supports `--name`, `--sortBy` for scalar supplier fields, `--sortDir`, `--createdBy`, `--gstRegistered`, `--status`, `--supplierTags`, `--active false` for archived suppliers), `create-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `update-supplier` (`--payload`; when supplier status is `PENDING_APPROVAL`, also runs `supplier.createSupplierApproval` and `email.sendSupplierApprovalRequestEmail`), `delete-suppliers` (`--ids` CSV; admin; archives/deactivates related items), `reactivate-suppliers` (`--ids` CSV; admin; reactivates related items), `create-certification` / `create-payment-method` / `create-supplier-role` / `create-supplier-tag` (`--name`), `get-supplier-details` (includes `supplierApprovalSummary` for pending approvers, superseded approvers, and the actual responder/respondedAt metadata), `get-supplier-overview` / `get-supplier-usage` / `get-supplier-items` `<supplierId>` (the supplier page's per-tab reads: profile, approvals and tab counts without usage or items; usage rows with spending; inventory items), `get-supplier-analytics` (admin; cursor pages: `--limit` / `--cursor` / `--direction`, optional `--name`, `--status` CSV, `--gstRegistered true|false`, `--createdBy`, `--timeFrame` (with `--startDate`/`--endDate` for `CUSTOM` only), `--sortBy name|gstRegistered|status|phone|email|updatedAt|createdAt`, `--sortDir`; `--page` / `--perPage` rejected; invalid filters are rejected instead of silently widening results), `count-supplier-analytics` (admin; `{ totalCount }` for the same filters), `list-items` (`--includeQuickBooksDeactivationPending true` discovers interrupted QuickBooks deactivations for Admin retry), `create-item` (`--payload`), `update-item` (`--payload`), `archive-items` (`--ids` CSV, max 100; Budget Builder-only; open estimates retain unavailable snapshot lines for resolution), `delete-item` (admin; archives in Budget Builder and makes the item inactive in QuickBooks; blocked while an open estimate references it), `get-item`, `list-item-categories` (cursor pages of active categories: `--limit` / `--cursor` / `--direction`, optional `--name`, `--sortBy createdAt|name|itemCount|createdBy`, `--sortDir`; `--page` / `--perPage` rejected), `count-item-categories` (`{ totalCount }` for the same `--name`), `create-item-category` / `update-item-category` / `delete-item-categories` (admin; `--ids` CSV for delete) |
714
725
  | **Dashboard & users** | `whoami` (current authenticated identity and role), `list-users` (forward cursor pages, name A–Z: `--limit` / `--cursor`, optional `--q` matching name or email; `--page` / `--perPage` rejected), `count-users` (`{ totalCount }` for the same `--q`), `create-user` (admin; provisions an API-only service identity with no Google sign-in; `--email`, optional `--name`, optional `--role` defaulting to `USER`), `create-api-key` (`--name`; defaults to the caller; admin-only `--userId` for another user; raw key shown once), `list-api-keys` (newest-first cursor pages: `--limit` 1–100, `--cursor`; returns `{ items, pageInfo }`; defaults to the caller; admin-only `--userId` for another user), `revoke-api-key` (key ID; admin-only `--userId` for another user), `get-user-performance`, `get-dashboard`, `get-monthly-metrics`, `get-system-overview`, `get-estimate-performance`, `get-financial-overview` (performance/dashboard commands are admin-only) |
715
726
  | **Errors (admin)** | `get-recent-errors`, `get-error`, `get-error-metrics` |
716
727
  | **Automation (admin)** | `list-integration-operations` (cursor pages, newest first: `--limit` / `--cursor` / `--direction` with `--search`, `--destination`, `--status`; `--page` / `--perPage` rejected), `count-integration-operations` (`{ filterOptions }` provider options only; no total, so the command does not scan the outbox; filter flags are accepted but ignored), `get-integration-operation <operationId>` (who queued the job, what it is for, saved progress, Retry state), `reconcile-resource-operation <operationId>`, `retry-integration-operation` (QuickBooks jobs with a saved attempt check QuickBooks first and never resend an applied change; Resend resolution requires `--confirmExternalStateReconciled true` plus `--outboundEmailResolution ACCEPTED\|NOT_ACCEPTED_RETRY`; include `--providerMessageId` when accepted) |
@@ -4728,6 +4728,59 @@
4728
4728
  "effects": [],
4729
4729
  "legacyTarget": "get-customer-invoice-history"
4730
4730
  },
4731
+ {
4732
+ "path": ["customer-invoice", "payments", "list"],
4733
+ "legacyAliases": [
4734
+ "get-customer-invoice-payments",
4735
+ "get_customer_invoice_payments"
4736
+ ],
4737
+ "summary": "List the payments QuickBooks applied to one invoice: payment id, date, reference, amount applied, total and attachment names. Argument: <invoiceId> (from get-customer-invoice-invoices). Live QuickBooks read.",
4738
+ "globalOptions": [
4739
+ {
4740
+ "name": "--help",
4741
+ "description": "Show help for this command."
4742
+ },
4743
+ {
4744
+ "name": "--quiet",
4745
+ "description": "Suppress non-error diagnostics."
4746
+ },
4747
+ {
4748
+ "name": "--debug",
4749
+ "description": "Emit sanitized diagnostic traces."
4750
+ },
4751
+ {
4752
+ "name": "--api-url",
4753
+ "description": "Override the Budget Builder API base URL."
4754
+ },
4755
+ {
4756
+ "name": "--no-browser",
4757
+ "description": "Print the authorization URL without opening a browser."
4758
+ },
4759
+ {
4760
+ "name": "--allow-state-change",
4761
+ "description": "Allow a Budget Builder state change in non-interactive use."
4762
+ },
4763
+ {
4764
+ "name": "--allow-email",
4765
+ "description": "Allow sending email in non-interactive use."
4766
+ },
4767
+ {
4768
+ "name": "--allow-external-write",
4769
+ "description": "Allow writes to external systems in non-interactive use."
4770
+ },
4771
+ {
4772
+ "name": "--allow-delete",
4773
+ "description": "Allow deleting data in non-interactive use."
4774
+ },
4775
+ {
4776
+ "name": "--allow-financial-write",
4777
+ "description": "Allow financial-record changes in non-interactive use."
4778
+ }
4779
+ ],
4780
+ "argumentMode": "legacy-passthrough",
4781
+ "effects": [],
4782
+ "legacyTarget": "get-customer-invoice-payments"
4783
+ },
4731
4784
  {
4732
4785
  "path": ["customer-invoice", "email-context", "get"],
4733
4786
  "legacyAliases": [
@@ -5957,6 +6010,156 @@
5957
6010
  "effects": [],
5958
6011
  "legacyTarget": "get-supplier-details"
5959
6012
  },
6013
+ {
6014
+ "path": ["supplier", "overview", "get"],
6015
+ "legacyAliases": ["get-supplier-overview", "get_supplier_overview"],
6016
+ "summary": "Get a supplier's profile, approvals, pending update, attachments and tab counts (usageCount, _count.items). Skips usage rows, spending and items; use get-supplier-usage or get-supplier-items for those.",
6017
+ "globalOptions": [
6018
+ {
6019
+ "name": "--help",
6020
+ "description": "Show help for this command."
6021
+ },
6022
+ {
6023
+ "name": "--quiet",
6024
+ "description": "Suppress non-error diagnostics."
6025
+ },
6026
+ {
6027
+ "name": "--debug",
6028
+ "description": "Emit sanitized diagnostic traces."
6029
+ },
6030
+ {
6031
+ "name": "--api-url",
6032
+ "description": "Override the Budget Builder API base URL."
6033
+ },
6034
+ {
6035
+ "name": "--no-browser",
6036
+ "description": "Print the authorization URL without opening a browser."
6037
+ },
6038
+ {
6039
+ "name": "--allow-state-change",
6040
+ "description": "Allow a Budget Builder state change in non-interactive use."
6041
+ },
6042
+ {
6043
+ "name": "--allow-email",
6044
+ "description": "Allow sending email in non-interactive use."
6045
+ },
6046
+ {
6047
+ "name": "--allow-external-write",
6048
+ "description": "Allow writes to external systems in non-interactive use."
6049
+ },
6050
+ {
6051
+ "name": "--allow-delete",
6052
+ "description": "Allow deleting data in non-interactive use."
6053
+ },
6054
+ {
6055
+ "name": "--allow-financial-write",
6056
+ "description": "Allow financial-record changes in non-interactive use."
6057
+ }
6058
+ ],
6059
+ "argumentMode": "legacy-passthrough",
6060
+ "effects": [],
6061
+ "legacyTarget": "get-supplier-overview"
6062
+ },
6063
+ {
6064
+ "path": ["supplier", "usage", "get"],
6065
+ "legacyAliases": ["get-supplier-usage", "get_supplier_usage"],
6066
+ "summary": "Get a supplier's usage rows (accepted/closed budget lines and lines with its actual spending) plus spending, actualSpending and estimatedSpending.",
6067
+ "globalOptions": [
6068
+ {
6069
+ "name": "--help",
6070
+ "description": "Show help for this command."
6071
+ },
6072
+ {
6073
+ "name": "--quiet",
6074
+ "description": "Suppress non-error diagnostics."
6075
+ },
6076
+ {
6077
+ "name": "--debug",
6078
+ "description": "Emit sanitized diagnostic traces."
6079
+ },
6080
+ {
6081
+ "name": "--api-url",
6082
+ "description": "Override the Budget Builder API base URL."
6083
+ },
6084
+ {
6085
+ "name": "--no-browser",
6086
+ "description": "Print the authorization URL without opening a browser."
6087
+ },
6088
+ {
6089
+ "name": "--allow-state-change",
6090
+ "description": "Allow a Budget Builder state change in non-interactive use."
6091
+ },
6092
+ {
6093
+ "name": "--allow-email",
6094
+ "description": "Allow sending email in non-interactive use."
6095
+ },
6096
+ {
6097
+ "name": "--allow-external-write",
6098
+ "description": "Allow writes to external systems in non-interactive use."
6099
+ },
6100
+ {
6101
+ "name": "--allow-delete",
6102
+ "description": "Allow deleting data in non-interactive use."
6103
+ },
6104
+ {
6105
+ "name": "--allow-financial-write",
6106
+ "description": "Allow financial-record changes in non-interactive use."
6107
+ }
6108
+ ],
6109
+ "argumentMode": "legacy-passthrough",
6110
+ "effects": [],
6111
+ "legacyTarget": "get-supplier-usage"
6112
+ },
6113
+ {
6114
+ "path": ["supplier", "items", "get"],
6115
+ "legacyAliases": ["get-supplier-items", "get_supplier_items"],
6116
+ "summary": "Get the inventory items catalogued under a supplier.",
6117
+ "globalOptions": [
6118
+ {
6119
+ "name": "--help",
6120
+ "description": "Show help for this command."
6121
+ },
6122
+ {
6123
+ "name": "--quiet",
6124
+ "description": "Suppress non-error diagnostics."
6125
+ },
6126
+ {
6127
+ "name": "--debug",
6128
+ "description": "Emit sanitized diagnostic traces."
6129
+ },
6130
+ {
6131
+ "name": "--api-url",
6132
+ "description": "Override the Budget Builder API base URL."
6133
+ },
6134
+ {
6135
+ "name": "--no-browser",
6136
+ "description": "Print the authorization URL without opening a browser."
6137
+ },
6138
+ {
6139
+ "name": "--allow-state-change",
6140
+ "description": "Allow a Budget Builder state change in non-interactive use."
6141
+ },
6142
+ {
6143
+ "name": "--allow-email",
6144
+ "description": "Allow sending email in non-interactive use."
6145
+ },
6146
+ {
6147
+ "name": "--allow-external-write",
6148
+ "description": "Allow writes to external systems in non-interactive use."
6149
+ },
6150
+ {
6151
+ "name": "--allow-delete",
6152
+ "description": "Allow deleting data in non-interactive use."
6153
+ },
6154
+ {
6155
+ "name": "--allow-financial-write",
6156
+ "description": "Allow financial-record changes in non-interactive use."
6157
+ }
6158
+ ],
6159
+ "argumentMode": "legacy-passthrough",
6160
+ "effects": [],
6161
+ "legacyTarget": "get-supplier-items"
6162
+ },
5960
6163
  {
5961
6164
  "path": ["company", "list"],
5962
6165
  "legacyAliases": ["list-companies", "list_companies"],
@@ -789,6 +789,14 @@ Legacy aliases: `get-customer-invoice-history`, `get_customer_invoice_history`.
789
789
 
790
790
  Effects: none.
791
791
 
792
+ ## `bb customer-invoice payments list`
793
+
794
+ List the payments QuickBooks applied to one invoice: payment id, date, reference, amount applied, total and attachment names. Argument: <invoiceId> (from get-customer-invoice-invoices). Live QuickBooks read.
795
+
796
+ Legacy aliases: `get-customer-invoice-payments`, `get_customer_invoice_payments`.
797
+
798
+ Effects: none.
799
+
792
800
  ## `bb customer-invoice email-context get`
793
801
 
794
802
  Get customer invoice email context.
@@ -991,6 +999,30 @@ Legacy aliases: `get-supplier-details`, `get_supplier_details`.
991
999
 
992
1000
  Effects: none.
993
1001
 
1002
+ ## `bb supplier overview get`
1003
+
1004
+ Get a supplier's profile, approvals, pending update, attachments and tab counts (usageCount, _count.items). Skips usage rows, spending and items; use get-supplier-usage or get-supplier-items for those.
1005
+
1006
+ Legacy aliases: `get-supplier-overview`, `get_supplier_overview`.
1007
+
1008
+ Effects: none.
1009
+
1010
+ ## `bb supplier usage get`
1011
+
1012
+ Get a supplier's usage rows (accepted/closed budget lines and lines with its actual spending) plus spending, actualSpending and estimatedSpending.
1013
+
1014
+ Legacy aliases: `get-supplier-usage`, `get_supplier_usage`.
1015
+
1016
+ Effects: none.
1017
+
1018
+ ## `bb supplier items get`
1019
+
1020
+ Get the inventory items catalogued under a supplier.
1021
+
1022
+ Legacy aliases: `get-supplier-items`, `get_supplier_items`.
1023
+
1024
+ Effects: none.
1025
+
994
1026
  ## `bb company list`
995
1027
 
996
1028
  List companies with cursor pagination. Returns { items, pageInfo }; default sort is createdAt descending with limit 20. Pass nextCursor forward or previousCursor backward unchanged. Legacy page/perPage flags are rejected.
package/dist/index.js CHANGED
@@ -7221,9 +7221,6 @@ var formatValidationMessage = (message, data) => {
7221
7221
  if (issue.code === "invalid_type" && typeof issue.expected === "string" && issue.message.toLowerCase().includes("required")) {
7222
7222
  return `${path} must be a ${issue.expected}${path === "cost" ? ', e.g. "19"' : ""}`;
7223
7223
  }
7224
- if (issue.code === "invalid_format" && issue.format === "regex" && path === "name" && String(issue.pattern ?? issue.message).includes("A-Za-z0-9,.?@&!#'~* _;+-")) {
7225
- return `${path} contains characters that are not allowed. Allowed: letters, numbers, spaces and , . ? @ & ! # ' ~ * _ ; + -`;
7226
- }
7227
7224
  return `${path}: ${issue.message}`;
7228
7225
  });
7229
7226
  return issues.every((issue) => issue !== undefined) ? issues.join("; ") : message;
@@ -7657,6 +7654,12 @@ var billStatusesForUpdateHelp = Object.values(BillStatus2).filter((s) => s !== B
7657
7654
  var projectStatusesForHelp = Object.values(ProjectStatus2);
7658
7655
  var userRolesForHelp = Object.values(UserRole);
7659
7656
 
7657
+ // ../validators/src/quickbooks/qbo-name.ts
7658
+ var QUICKBOOKS_NAME_VALIDATION_MESSAGE = "Name cannot contain colons, tabs or line breaks (QuickBooks rule)";
7659
+ var quickBooksNameSchema = string2().trim().min(1, { error: "Name is required" }).max(100, { error: "Name cannot be longer than 100 characters" }).regex(/^[^:\t\n]+$/, {
7660
+ error: QUICKBOOKS_NAME_VALIDATION_MESSAGE
7661
+ });
7662
+
7660
7663
  // ../utils/src/rich-text.ts
7661
7664
  var escapeHtml = (text) => text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
7662
7665
  var createRichTextFromPlainText = (text) => {
@@ -8310,7 +8313,7 @@ function parseUpdateProjectPayload(raw) {
8310
8313
  } : {};
8311
8314
  return {
8312
8315
  id: requiredString(o.id, "update-project payload.id"),
8313
- name: requiredString(o.name, "update-project payload.name"),
8316
+ name: parseQuickBooksName(o.name),
8314
8317
  description: optionalString(o.description),
8315
8318
  companyId: requiredString(o.companyId, "update-project payload.companyId"),
8316
8319
  contactPersonId: requiredString(o.contactPersonId, "update-project payload.contactPersonId"),
@@ -8333,25 +8336,31 @@ function parseUpdateProjectPayload(raw) {
8333
8336
  }
8334
8337
  };
8335
8338
  }
8339
+ var parseQuickBooksName = (value) => {
8340
+ const result = quickBooksNameSchema.safeParse(value);
8341
+ if (!result.success) {
8342
+ throw validationError(result.error.issues[0]?.message ?? "Invalid QuickBooks name");
8343
+ }
8344
+ return result.data;
8345
+ };
8336
8346
  function parseSupplierCreatePayload(raw) {
8337
- requireObject(raw, "create-supplier payload");
8338
- return raw;
8347
+ const input = requireObject(raw, "create-supplier payload");
8348
+ return {
8349
+ ...input,
8350
+ name: parseQuickBooksName(input.name)
8351
+ };
8339
8352
  }
8340
8353
  function parseSupplierUpdatePayload(raw) {
8341
- requireObject(raw, "update-supplier payload");
8342
- return raw;
8354
+ const input = requireObject(raw, "update-supplier payload");
8355
+ return {
8356
+ ...input,
8357
+ name: parseQuickBooksName(input.name)
8358
+ };
8343
8359
  }
8344
- var normalizeItemPayload = (input, command) => {
8345
- if (typeof input.name === "string") {
8346
- const invalidCharacters = [
8347
- ...new Set([...input.name].filter((character) => !/^[A-Za-z0-9,.?@&!#'~* _;+-]$/.test(character)))
8348
- ];
8349
- if (invalidCharacters.length > 0) {
8350
- throw validationError(`${command} payload.name contains characters that are not allowed: ${invalidCharacters.join(" ")}. Allowed: letters, numbers, spaces and , . ? @ & ! # ' ~ * _ ; + -`);
8351
- }
8352
- }
8360
+ var normalizeItemPayload = (input) => {
8353
8361
  const normalized = {
8354
8362
  ...input,
8363
+ name: parseQuickBooksName(input.name),
8355
8364
  ...typeof input.cost === "number" && Number.isFinite(input.cost) ? { cost: String(input.cost) } : {}
8356
8365
  };
8357
8366
  return normalizePlainTextRichTextField({
@@ -8361,10 +8370,10 @@ var normalizeItemPayload = (input, command) => {
8361
8370
  });
8362
8371
  };
8363
8372
  function parseItemCreatePayload(raw) {
8364
- return normalizeItemPayload(requireObject(raw, "create-item payload"), "create-item");
8373
+ return normalizeItemPayload(requireObject(raw, "create-item payload"));
8365
8374
  }
8366
8375
  function parseItemUpdatePayload(raw) {
8367
- return normalizeItemPayload(requireObject(raw, "update-item payload"), "update-item");
8376
+ return normalizeItemPayload(requireObject(raw, "update-item payload"));
8368
8377
  }
8369
8378
  function parseContactCreatePayload(raw) {
8370
8379
  requireObject(raw, "create-contact-person payload");
@@ -8382,7 +8391,7 @@ function parseCompanyUpdatePayload(raw) {
8382
8391
  }
8383
8392
  return {
8384
8393
  id: requiredString(input.id, "id"),
8385
- name: requiredString(input.name, "name"),
8394
+ name: parseQuickBooksName(input.name),
8386
8395
  website: requiredString(input.website, "website"),
8387
8396
  ...input.confirmDistinct === undefined ? {} : { confirmDistinct: input.confirmDistinct },
8388
8397
  ...billingEmails === undefined ? {} : { billingEmails }
@@ -9900,11 +9909,16 @@ async function createSupplierTagOption(name) {
9900
9909
  out(result);
9901
9910
  }
9902
9911
  async function createItemCategory(name) {
9903
- const result = await api2.itemCategory.createItemCategory.mutate({ name });
9912
+ const result = await api2.itemCategory.createItemCategory.mutate({
9913
+ name: parseQuickBooksName(name)
9914
+ });
9904
9915
  out(result);
9905
9916
  }
9906
9917
  async function updateItemCategory(opts) {
9907
- const result = await api2.itemCategory.updateItemCategory.mutate(opts);
9918
+ const result = await api2.itemCategory.updateItemCategory.mutate({
9919
+ ...opts,
9920
+ name: parseQuickBooksName(opts.name)
9921
+ });
9908
9922
  out(result);
9909
9923
  }
9910
9924
  async function deleteItemCategoriesByIds(ids) {
@@ -10024,6 +10038,9 @@ var getCustomerInvoiceApprovals = async (input) => {
10024
10038
  var getCustomerInvoiceHistory = async (input) => {
10025
10039
  out(await api2.customerInvoice.getHistory.query(input));
10026
10040
  };
10041
+ var getCustomerInvoicePayments = async (invoiceId) => {
10042
+ out(await api2.customerInvoice.getPayments.query({ invoiceId }));
10043
+ };
10027
10044
  var getCustomerInvoiceEmailContext = async (batchId) => {
10028
10045
  const result = await api2.customerInvoice.getInvoiceEmailContext.query({
10029
10046
  batchId
@@ -10380,6 +10397,15 @@ async function rejectBudget(budgetId, reason) {
10380
10397
  email
10381
10398
  });
10382
10399
  }
10400
+ async function getSupplierOverview(supplierId) {
10401
+ out(await api2.supplier.getSupplierOverview.query({ id: supplierId }));
10402
+ }
10403
+ async function getSupplierUsage(supplierId) {
10404
+ out(await api2.supplier.getSupplierUsage.query({ id: supplierId }));
10405
+ }
10406
+ async function getSupplierItems(supplierId) {
10407
+ out(await api2.supplier.getSupplierItems.query({ id: supplierId }));
10408
+ }
10383
10409
  async function getSupplierDetails(supplierId) {
10384
10410
  const supplier = await api2.supplier.getSupplierById.query({
10385
10411
  id: supplierId
@@ -10434,7 +10460,9 @@ async function getSupplierDetails(supplierId) {
10434
10460
  });
10435
10461
  }
10436
10462
  async function approveSupplier(supplierId) {
10437
- const supplier = await api2.supplier.getSupplierById.query({ id: supplierId });
10463
+ const supplier = await api2.supplier.getSupplierOverview.query({
10464
+ id: supplierId
10465
+ });
10438
10466
  if (supplier.status === ExtendedApprovalStatus.REJECTED) {
10439
10467
  await assertSensitiveWorkflowConfirmed({
10440
10468
  action: "Re-approve supplier",
@@ -10582,7 +10610,10 @@ async function getCompany(id) {
10582
10610
  out(company);
10583
10611
  }
10584
10612
  async function createCompany(opts) {
10585
- const result = await api2.company.createCompany.mutate(opts);
10613
+ const result = await api2.company.createCompany.mutate({
10614
+ ...opts,
10615
+ name: parseQuickBooksName(opts.name)
10616
+ });
10586
10617
  out(result);
10587
10618
  }
10588
10619
  var searchExistingCompanies = async (input) => {
@@ -10638,8 +10669,9 @@ var syncProjectHubCommercialDocuments = async (projectId) => {
10638
10669
  out(result);
10639
10670
  };
10640
10671
  async function createProject(opts) {
10672
+ const name = parseQuickBooksName(opts.name);
10641
10673
  const links = await resolveCreateProjectLinks({
10642
- name: opts.name,
10674
+ name,
10643
10675
  asanaTaskId: opts.asanaTaskId,
10644
10676
  asanaSearch: opts.asanaSearch,
10645
10677
  slackChannelId: opts.slackChannelId,
@@ -10647,7 +10679,7 @@ async function createProject(opts) {
10647
10679
  slackChannelName: opts.slackChannelName
10648
10680
  });
10649
10681
  const result = await api2.project.createProject.mutate({
10650
- name: opts.name,
10682
+ name,
10651
10683
  description: opts.description,
10652
10684
  companyId: opts.companyId,
10653
10685
  contactPersonId: opts.contactPersonId,
@@ -11505,12 +11537,20 @@ var summaryFor = (legacyTarget) => {
11505
11537
  return "List an invoice batch's approval requests with approver, requester and responder. <batchId> [--limit 1-50] [--cursor <token>] Newest first. Returns { items, pageInfo }; follow nextCursor.";
11506
11538
  if (legacyTarget === "get-customer-invoice-history")
11507
11539
  return "List an invoice batch's status history (batch/invoice status changes, source, note, actor). <batchId> [--limit 1-100] [--cursor <token>] Newest first. Returns { items, pageInfo }; follow nextCursor.";
11540
+ if (legacyTarget === "get-customer-invoice-payments")
11541
+ return "List the payments QuickBooks applied to one invoice: payment id, date, reference, amount applied, total and attachment names. Argument: <invoiceId> (from get-customer-invoice-invoices). Live QuickBooks read.";
11508
11542
  if (legacyTarget === "get-quotation-line-items")
11509
11543
  return "List a quotation's line items with budget-item, supplier and budget detail. <quotationId> [--limit 1-100] [--cursor <token>] Newest first. Returns { items, pageInfo }; follow nextCursor.";
11510
11544
  if (legacyTarget === "get-bill-attachments")
11511
11545
  return "List bill attachments with cursor pagination. <billId> [--limit 1-50] [--cursor <token>] Newest first. Returns { items, pageInfo }; follow nextCursor.";
11512
11546
  if (legacyTarget === "get-budget-categories")
11513
11547
  return "List budget categories with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Active categories, name A\u2013Z. Returns { items, pageInfo }; follow nextCursor with the same --q.";
11548
+ if (legacyTarget === "get-supplier-overview")
11549
+ return "Get a supplier's profile, approvals, pending update, attachments and tab counts (usageCount, _count.items). Skips usage rows, spending and items; use get-supplier-usage or get-supplier-items for those.";
11550
+ if (legacyTarget === "get-supplier-usage")
11551
+ return "Get a supplier's usage rows (accepted/closed budget lines and lines with its actual spending) plus spending, actualSpending and estimatedSpending.";
11552
+ if (legacyTarget === "get-supplier-items")
11553
+ return "Get the inventory items catalogued under a supplier.";
11514
11554
  if (legacyTarget === "get-supplier-analytics")
11515
11555
  return "List supplier analytics rows with cursor pagination. [--name] [--status CSV] [--gstRegistered true|false] [--createdBy <text>] [--timeFrame ALL|LAST_YEAR|LAST_6_MONTHS|LAST_3_MONTHS|CUSTOM] [--startDate <ISO> --endDate <ISO>] [--sortBy name|gstRegistered|status|phone|email|updatedAt|createdAt] [--sortDir asc|desc] [--limit 1-100] [--cursor <token>] [--direction forward|backward] Admin. Returns { items, pageInfo }; follow nextCursor/previousCursor with the same filters and sort. --page/--perPage are rejected.";
11516
11556
  if (legacyTarget === "list-api-keys")
@@ -12066,6 +12106,11 @@ var registry2 = [
12066
12106
  description: "pageInfo.nextCursor from the last page, unchanged; pages forward only."
12067
12107
  }
12068
12108
  ]),
12109
+ legacyCommand("get-customer-invoice-payments", [
12110
+ "customer-invoice",
12111
+ "payments",
12112
+ "list"
12113
+ ]),
12069
12114
  legacyCommand("get-customer-invoice-email-context", [
12070
12115
  "customer-invoice",
12071
12116
  "email-context",
@@ -12118,6 +12163,9 @@ var registry2 = [
12118
12163
  legacyCommand("approve-supplier", ["supplier", "approve"]),
12119
12164
  legacyCommand("reject-supplier", ["supplier", "reject"]),
12120
12165
  legacyCommand("get-supplier-details", ["supplier", "detail", "get"]),
12166
+ legacyCommand("get-supplier-overview", ["supplier", "overview", "get"]),
12167
+ legacyCommand("get-supplier-usage", ["supplier", "usage", "get"]),
12168
+ legacyCommand("get-supplier-items", ["supplier", "items", "get"]),
12121
12169
  legacyCommand("list-companies", ["company", "list"], [], [
12122
12170
  {
12123
12171
  name: "--name <text>",
@@ -13551,6 +13599,7 @@ Customer invoices
13551
13599
  get-customer-invoice-lines <invoiceId> [--limit 1-100] [--cursor <token>] One invoice's lines; { items, pageInfo }
13552
13600
  get-customer-invoice-approvals <batchId> [--limit 1-50] [--cursor <token>] Approval requests with approver/requester/responder; { items, pageInfo }
13553
13601
  get-customer-invoice-history <batchId> [--limit 1-100] [--cursor <token>] Status history; { items, pageInfo }
13602
+ get-customer-invoice-payments <invoiceId> Payments QuickBooks applied to one invoice (date, reference, amount applied, attachment names). Live QuickBooks read.
13554
13603
  get-customer-invoice-email-context <batchId> Contact, required CC, budget, and project context for composing an invoice email.
13555
13604
  preview-qbo-customer-invoice <budgetId> <qboInvoiceId> Preview an invoice selected from list-available-qbo-customer-invoices; works on accepted/closed estimates.
13556
13605
  import-qbo-customer-invoice <budgetId> <qboInvoiceId> --token <previewToken> Confirm the reviewed BB-only link; requires --allow-state-change --allow-financial-write in automation.
@@ -13639,6 +13688,9 @@ Suppliers & items
13639
13688
  archive-items --ids <csv> (item.archiveItems; Budget Builder only; max 100; users can archive their own items, leads/admins any item; open estimates retain snapshot lines and require resolution before send/acceptance)
13640
13689
  delete-item <id> (item.deleteItem; admin; archives in Budget Builder and makes the item inactive in QuickBooks; blocked while used by an open estimate)
13641
13690
  get-supplier-details <supplierId>
13691
+ get-supplier-overview <supplierId> (supplier.getSupplierOverview; profile, approvals, attachments and tab counts; no usage or items)
13692
+ get-supplier-usage <supplierId> (supplier.getSupplierUsage; usage rows and spending)
13693
+ get-supplier-items <supplierId> (supplier.getSupplierItems; inventory items)
13642
13694
  get-supplier-analytics [--name] [--status CSV] [--gstRegistered true|false] [--createdBy <text>] [--timeFrame ALL|LAST_YEAR|LAST_6_MONTHS|LAST_3_MONTHS|CUSTOM] [--startDate <ISO> --endDate <ISO>] [--sortBy name|gstRegistered|status|phone|email|updatedAt|createdAt] [--sortDir asc|desc] [--limit 1-100] [--cursor <token>] [--direction forward|backward]
13643
13695
  Admin. Returns { items, pageInfo }; follow nextCursor/previousCursor with the same filters and sort. --page/--perPage are rejected.
13644
13696
  count-supplier-analytics [--name] [--status] [--gstRegistered] [--createdBy] [--timeFrame] [--startDate --endDate] Admin. totalCount for the same filters
@@ -15024,6 +15076,14 @@ Waiting for approval\u2026
15024
15076
  await getCustomerInvoiceHistory(page);
15025
15077
  break;
15026
15078
  }
15079
+ case "get-customer-invoice-payments": {
15080
+ const invoiceId = positional[0];
15081
+ if (!invoiceId) {
15082
+ throw new Error("get-customer-invoice-payments requires <invoiceId>");
15083
+ }
15084
+ await getCustomerInvoicePayments(invoiceId);
15085
+ break;
15086
+ }
15027
15087
  case "get-customer-invoice-email-context": {
15028
15088
  const batchId = positional[0];
15029
15089
  if (!batchId) {
@@ -15241,6 +15301,27 @@ Waiting for approval\u2026
15241
15301
  await getSupplierDetails(id);
15242
15302
  break;
15243
15303
  }
15304
+ case "get-supplier-overview": {
15305
+ const id = positional[0];
15306
+ if (!id)
15307
+ throw new Error("get-supplier-overview requires <supplierId>");
15308
+ await getSupplierOverview(id);
15309
+ break;
15310
+ }
15311
+ case "get-supplier-usage": {
15312
+ const id = positional[0];
15313
+ if (!id)
15314
+ throw new Error("get-supplier-usage requires <supplierId>");
15315
+ await getSupplierUsage(id);
15316
+ break;
15317
+ }
15318
+ case "get-supplier-items": {
15319
+ const id = positional[0];
15320
+ if (!id)
15321
+ throw new Error("get-supplier-items requires <supplierId>");
15322
+ await getSupplierItems(id);
15323
+ break;
15324
+ }
15244
15325
  case "list-companies": {
15245
15326
  await listCompanies(parseCompanyListFlags(flags));
15246
15327
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/bb",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Budget Builder CLI for AI agents — manage budgets, bills, claims, quotations, and customer invoices with explicit workflow previews for sensitive changes.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",