@go-labs-sg/bb 3.7.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), `sync-customer-invoice` |
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": [
@@ -5393,6 +5446,165 @@
5393
5446
  "effects": ["state-change", "external-write", "financial-write"],
5394
5447
  "legacyTarget": "sync-customer-invoice"
5395
5448
  },
5449
+ {
5450
+ "path": ["customer-invoice", "details", "update"],
5451
+ "legacyAliases": [
5452
+ "update-customer-invoice-details",
5453
+ "update_customer_invoice_details"
5454
+ ],
5455
+ "summary": "Update Customer Invoice Details.",
5456
+ "globalOptions": [
5457
+ {
5458
+ "name": "--help",
5459
+ "description": "Show help for this command."
5460
+ },
5461
+ {
5462
+ "name": "--quiet",
5463
+ "description": "Suppress non-error diagnostics."
5464
+ },
5465
+ {
5466
+ "name": "--debug",
5467
+ "description": "Emit sanitized diagnostic traces."
5468
+ },
5469
+ {
5470
+ "name": "--api-url",
5471
+ "description": "Override the Budget Builder API base URL."
5472
+ },
5473
+ {
5474
+ "name": "--no-browser",
5475
+ "description": "Print the authorization URL without opening a browser."
5476
+ },
5477
+ {
5478
+ "name": "--allow-state-change",
5479
+ "description": "Allow a Budget Builder state change in non-interactive use."
5480
+ },
5481
+ {
5482
+ "name": "--allow-email",
5483
+ "description": "Allow sending email in non-interactive use."
5484
+ },
5485
+ {
5486
+ "name": "--allow-external-write",
5487
+ "description": "Allow writes to external systems in non-interactive use."
5488
+ },
5489
+ {
5490
+ "name": "--allow-delete",
5491
+ "description": "Allow deleting data in non-interactive use."
5492
+ },
5493
+ {
5494
+ "name": "--allow-financial-write",
5495
+ "description": "Allow financial-record changes in non-interactive use."
5496
+ }
5497
+ ],
5498
+ "argumentMode": "legacy-passthrough",
5499
+ "effects": ["state-change", "external-write"],
5500
+ "legacyTarget": "update-customer-invoice-details"
5501
+ },
5502
+ {
5503
+ "path": ["customer-invoice", "qbo-drift", "resolve"],
5504
+ "legacyAliases": [
5505
+ "update-customer-invoice-qbo-drift",
5506
+ "update_customer_invoice_qbo_drift"
5507
+ ],
5508
+ "summary": "Update Customer Invoice Qbo Drift.",
5509
+ "globalOptions": [
5510
+ {
5511
+ "name": "--help",
5512
+ "description": "Show help for this command."
5513
+ },
5514
+ {
5515
+ "name": "--quiet",
5516
+ "description": "Suppress non-error diagnostics."
5517
+ },
5518
+ {
5519
+ "name": "--debug",
5520
+ "description": "Emit sanitized diagnostic traces."
5521
+ },
5522
+ {
5523
+ "name": "--api-url",
5524
+ "description": "Override the Budget Builder API base URL."
5525
+ },
5526
+ {
5527
+ "name": "--no-browser",
5528
+ "description": "Print the authorization URL without opening a browser."
5529
+ },
5530
+ {
5531
+ "name": "--allow-state-change",
5532
+ "description": "Allow a Budget Builder state change in non-interactive use."
5533
+ },
5534
+ {
5535
+ "name": "--allow-email",
5536
+ "description": "Allow sending email in non-interactive use."
5537
+ },
5538
+ {
5539
+ "name": "--allow-external-write",
5540
+ "description": "Allow writes to external systems in non-interactive use."
5541
+ },
5542
+ {
5543
+ "name": "--allow-delete",
5544
+ "description": "Allow deleting data in non-interactive use."
5545
+ },
5546
+ {
5547
+ "name": "--allow-financial-write",
5548
+ "description": "Allow financial-record changes in non-interactive use."
5549
+ }
5550
+ ],
5551
+ "argumentMode": "legacy-passthrough",
5552
+ "effects": ["state-change", "external-write", "financial-write"],
5553
+ "legacyTarget": "update-customer-invoice-qbo-drift"
5554
+ },
5555
+ {
5556
+ "path": ["customer-invoice", "mark-sent-externally"],
5557
+ "legacyAliases": [
5558
+ "mark-customer-invoice-sent-externally",
5559
+ "mark_customer_invoice_sent_externally"
5560
+ ],
5561
+ "summary": "Admin only. Record an APPROVED customer invoice as SENT (source EXTERNAL) because it was emailed to the customer outside Budget Builder. Sends no email and writes nothing to QuickBooks. Requires <invoiceId> --sentAt <ISO datetime, not in the future, not before approval> --recipients a@x.com,b@y.com [--note <message reference>].",
5562
+ "globalOptions": [
5563
+ {
5564
+ "name": "--help",
5565
+ "description": "Show help for this command."
5566
+ },
5567
+ {
5568
+ "name": "--quiet",
5569
+ "description": "Suppress non-error diagnostics."
5570
+ },
5571
+ {
5572
+ "name": "--debug",
5573
+ "description": "Emit sanitized diagnostic traces."
5574
+ },
5575
+ {
5576
+ "name": "--api-url",
5577
+ "description": "Override the Budget Builder API base URL."
5578
+ },
5579
+ {
5580
+ "name": "--no-browser",
5581
+ "description": "Print the authorization URL without opening a browser."
5582
+ },
5583
+ {
5584
+ "name": "--allow-state-change",
5585
+ "description": "Allow a Budget Builder state change in non-interactive use."
5586
+ },
5587
+ {
5588
+ "name": "--allow-email",
5589
+ "description": "Allow sending email in non-interactive use."
5590
+ },
5591
+ {
5592
+ "name": "--allow-external-write",
5593
+ "description": "Allow writes to external systems in non-interactive use."
5594
+ },
5595
+ {
5596
+ "name": "--allow-delete",
5597
+ "description": "Allow deleting data in non-interactive use."
5598
+ },
5599
+ {
5600
+ "name": "--allow-financial-write",
5601
+ "description": "Allow financial-record changes in non-interactive use."
5602
+ }
5603
+ ],
5604
+ "argumentMode": "legacy-passthrough",
5605
+ "effects": ["state-change", "financial-write"],
5606
+ "legacyTarget": "mark-customer-invoice-sent-externally"
5607
+ },
5396
5608
  {
5397
5609
  "path": ["approval", "list"],
5398
5610
  "legacyAliases": [
@@ -5798,6 +6010,156 @@
5798
6010
  "effects": [],
5799
6011
  "legacyTarget": "get-supplier-details"
5800
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
+ },
5801
6163
  {
5802
6164
  "path": ["company", "list"],
5803
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.
@@ -903,6 +911,30 @@ Legacy aliases: `sync-customer-invoice`, `sync_customer_invoice`.
903
911
 
904
912
  Effects: state-change, external-write, financial-write.
905
913
 
914
+ ## `bb customer-invoice details update`
915
+
916
+ Update Customer Invoice Details.
917
+
918
+ Legacy aliases: `update-customer-invoice-details`, `update_customer_invoice_details`.
919
+
920
+ Effects: state-change, external-write.
921
+
922
+ ## `bb customer-invoice qbo-drift resolve`
923
+
924
+ Update Customer Invoice Qbo Drift.
925
+
926
+ Legacy aliases: `update-customer-invoice-qbo-drift`, `update_customer_invoice_qbo_drift`.
927
+
928
+ Effects: state-change, external-write, financial-write.
929
+
930
+ ## `bb customer-invoice mark-sent-externally`
931
+
932
+ Admin only. Record an APPROVED customer invoice as SENT (source EXTERNAL) because it was emailed to the customer outside Budget Builder. Sends no email and writes nothing to QuickBooks. Requires <invoiceId> --sentAt <ISO datetime, not in the future, not before approval> --recipients a@x.com,b@y.com [--note <message reference>].
933
+
934
+ Legacy aliases: `mark-customer-invoice-sent-externally`, `mark_customer_invoice_sent_externally`.
935
+
936
+ Effects: state-change, financial-write.
937
+
906
938
  ## `bb approval list`
907
939
 
908
940
  List approvals.
@@ -967,6 +999,30 @@ Legacy aliases: `get-supplier-details`, `get_supplier_details`.
967
999
 
968
1000
  Effects: none.
969
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
+
970
1026
  ## `bb company list`
971
1027
 
972
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.
@@ -1195,7 +1251,7 @@ Effects: state-change.
1195
1251
 
1196
1252
  Payload fields (--payload JSON)
1197
1253
  Required: companyId: string; title: MR|MRS|MS|DR; firstName: string; lastName: string|null; email: string; mobile: string
1198
- Optional: address: {streetAddress1?, city?, state?, postalCode?, countryCode? (ISO 3166-1 alpha-2, e.g. SG), country? (legacy name)}
1254
+ Optional: address: {streetAddress1?, city?, state?, postalCode?, countryCode? (ISO 3166-1 alpha-2, e.g. SG)}
1199
1255
  Example: bb create-contact-person --payload '{"companyId":"<company-id>","title":"MS","firstName":"Jane","lastName":"Tan","email":"jane@example.com","mobile":"+65 9123 4567"}'
1200
1256
 
1201
1257
  ## `bb contact update`
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
@@ -10145,6 +10162,55 @@ var syncCustomerInvoice = async (invoiceId) => {
10145
10162
  });
10146
10163
  out(result);
10147
10164
  };
10165
+ var updateCustomerInvoiceDetails = async ({
10166
+ billingAddress,
10167
+ customerMemo,
10168
+ invoiceId,
10169
+ requestId = randomUUID2()
10170
+ }) => {
10171
+ await assertSensitiveWorkflowConfirmed({
10172
+ action: "Update customer invoice billing details",
10173
+ entity: `invoice ${invoiceId}`,
10174
+ details: `saves the bill-to address and memo in BB, then queues a QuickBooks invoice update (external write); the bill email is managed in QuickBooks and is not changed; retry a lost response with --requestId ${requestId}`
10175
+ });
10176
+ const result = await api2.customerInvoice.updateInvoiceDetails.mutate({
10177
+ billingAddress,
10178
+ customerMemo,
10179
+ invoiceId,
10180
+ requestId
10181
+ });
10182
+ out({
10183
+ invoices: result.batch.invoices.filter((invoice) => invoice.id === invoiceId),
10184
+ operation: result.operation
10185
+ });
10186
+ };
10187
+ var updateCustomerInvoiceQboDrift = async ({
10188
+ invoiceId,
10189
+ requestId,
10190
+ resolution
10191
+ }) => {
10192
+ const keepRequestId = resolution === "KEEP_BB" ? requestId ?? randomUUID2() : undefined;
10193
+ await assertSensitiveWorkflowConfirmed({
10194
+ action: resolution === "ACCEPT_QBO" ? "Accept QuickBooks invoice changes into BB" : "Keep BB invoice values over QuickBooks changes",
10195
+ entity: `invoice ${invoiceId}`,
10196
+ details: resolution === "ACCEPT_QBO" ? "copies the held QuickBooks bill-to address, memo, bill email and total into BB; QuickBooks is not changed" : `keeps BB's values; queues BB's bill-to address and memo to QuickBooks (external write); bill email and total are not changed in QuickBooks; retry a lost response with --requestId ${keepRequestId}`
10197
+ });
10198
+ const result = await api2.customerInvoice.resolveQboDrift.mutate({
10199
+ invoiceId,
10200
+ resolution,
10201
+ ...keepRequestId ? { requestId: keepRequestId } : {}
10202
+ });
10203
+ out(result);
10204
+ };
10205
+ var markCustomerInvoiceSentExternally = async (input) => {
10206
+ await assertSensitiveWorkflowConfirmed({
10207
+ action: "Record customer invoice as sent externally",
10208
+ entity: `invoice ${input.invoiceId}`,
10209
+ details: `records the invoice as SENT (source EXTERNAL) at ${input.sentAt} for ${input.recipients.join(", ")}; sends no email and does not write to QuickBooks`
10210
+ });
10211
+ const result = await api2.customerInvoice.markSentExternally.mutate(input);
10212
+ out(result);
10213
+ };
10148
10214
  var describeCustomerInvoiceEmailConfirmation = (input) => `emails the QBO invoice PDF to ${input.to} and saves that address as the project's billing email; requested CC ${input.cc === undefined ? "company billing defaults" : input.cc.length > 0 ? input.cc.join(", ") : "none (company billing defaults removed)"}; reply-to ${input.replyTo}; subject "${input.subject}"; server-required admin, creator, business-development, and inside-sales CC recipients are added; success marks the invoice SENT; do not retry blindly after an ambiguous delivery failure`;
10149
10215
  var sendCustomerInvoiceToContactPersonFromPayload = async (raw) => {
10150
10216
  const input = parseSendCustomerInvoiceToContactPersonPayload(raw);
@@ -10331,6 +10397,15 @@ async function rejectBudget(budgetId, reason) {
10331
10397
  email
10332
10398
  });
10333
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
+ }
10334
10409
  async function getSupplierDetails(supplierId) {
10335
10410
  const supplier = await api2.supplier.getSupplierById.query({
10336
10411
  id: supplierId
@@ -10385,7 +10460,9 @@ async function getSupplierDetails(supplierId) {
10385
10460
  });
10386
10461
  }
10387
10462
  async function approveSupplier(supplierId) {
10388
- const supplier = await api2.supplier.getSupplierById.query({ id: supplierId });
10463
+ const supplier = await api2.supplier.getSupplierOverview.query({
10464
+ id: supplierId
10465
+ });
10389
10466
  if (supplier.status === ExtendedApprovalStatus.REJECTED) {
10390
10467
  await assertSensitiveWorkflowConfirmed({
10391
10468
  action: "Re-approve supplier",
@@ -10533,7 +10610,10 @@ async function getCompany(id) {
10533
10610
  out(company);
10534
10611
  }
10535
10612
  async function createCompany(opts) {
10536
- const result = await api2.company.createCompany.mutate(opts);
10613
+ const result = await api2.company.createCompany.mutate({
10614
+ ...opts,
10615
+ name: parseQuickBooksName(opts.name)
10616
+ });
10537
10617
  out(result);
10538
10618
  }
10539
10619
  var searchExistingCompanies = async (input) => {
@@ -10589,8 +10669,9 @@ var syncProjectHubCommercialDocuments = async (projectId) => {
10589
10669
  out(result);
10590
10670
  };
10591
10671
  async function createProject(opts) {
10672
+ const name = parseQuickBooksName(opts.name);
10592
10673
  const links = await resolveCreateProjectLinks({
10593
- name: opts.name,
10674
+ name,
10594
10675
  asanaTaskId: opts.asanaTaskId,
10595
10676
  asanaSearch: opts.asanaSearch,
10596
10677
  slackChannelId: opts.slackChannelId,
@@ -10598,7 +10679,7 @@ async function createProject(opts) {
10598
10679
  slackChannelName: opts.slackChannelName
10599
10680
  });
10600
10681
  const result = await api2.project.createProject.mutate({
10601
- name: opts.name,
10682
+ name,
10602
10683
  description: opts.description,
10603
10684
  companyId: opts.companyId,
10604
10685
  contactPersonId: opts.contactPersonId,
@@ -11095,7 +11176,7 @@ var payloadHelp = {
11095
11176
  },
11096
11177
  "create-contact-person": {
11097
11178
  required: "companyId: string; title: MR|MRS|MS|DR; firstName: string; lastName: string|null; email: string; mobile: string",
11098
- optional: "address: {streetAddress1?, city?, state?, postalCode?, countryCode? (ISO 3166-1 alpha-2, e.g. SG), country? (legacy name)}",
11179
+ optional: "address: {streetAddress1?, city?, state?, postalCode?, countryCode? (ISO 3166-1 alpha-2, e.g. SG)}",
11099
11180
  example: '{"companyId":"<company-id>","title":"MS","firstName":"Jane","lastName":"Tan","email":"jane@example.com","mobile":"+65 9123 4567"}'
11100
11181
  },
11101
11182
  "update-contact-person": {
@@ -11298,6 +11379,8 @@ var emailTargets = new Set([
11298
11379
  "update-supplier"
11299
11380
  ]);
11300
11381
  var externalWriteTargets = new Set([
11382
+ "update-customer-invoice-details",
11383
+ "update-customer-invoice-qbo-drift",
11301
11384
  "record-external-bill-payment",
11302
11385
  "approve-bill",
11303
11386
  "approve-customer-invoice",
@@ -11344,6 +11427,7 @@ var externalWriteTargets = new Set([
11344
11427
  "void-customer-invoice"
11345
11428
  ]);
11346
11429
  var financialWriteTargets = new Set([
11430
+ "update-customer-invoice-qbo-drift",
11347
11431
  "record-external-bill-payment",
11348
11432
  "import-qbo-customer-invoice",
11349
11433
  "link-bill-quotations",
@@ -11361,6 +11445,7 @@ var financialWriteTargets = new Set([
11361
11445
  "delete-customer-invoice",
11362
11446
  "mark-budget-items-not-utilized",
11363
11447
  "mark-budget-won",
11448
+ "mark-customer-invoice-sent-externally",
11364
11449
  "patch-bill-payment",
11365
11450
  "reject-customer-invoice",
11366
11451
  "restore-budget-item",
@@ -11452,12 +11537,20 @@ var summaryFor = (legacyTarget) => {
11452
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.";
11453
11538
  if (legacyTarget === "get-customer-invoice-history")
11454
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.";
11455
11542
  if (legacyTarget === "get-quotation-line-items")
11456
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.";
11457
11544
  if (legacyTarget === "get-bill-attachments")
11458
11545
  return "List bill attachments with cursor pagination. <billId> [--limit 1-50] [--cursor <token>] Newest first. Returns { items, pageInfo }; follow nextCursor.";
11459
11546
  if (legacyTarget === "get-budget-categories")
11460
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.";
11461
11554
  if (legacyTarget === "get-supplier-analytics")
11462
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.";
11463
11556
  if (legacyTarget === "list-api-keys")
@@ -11539,6 +11632,8 @@ var summaryFor = (legacyTarget) => {
11539
11632
  }
11540
11633
  if (legacyTarget === "record-external-bill-payment")
11541
11634
  return "Record an already-made payment on an APPROVED bill or claim, with no email and no money transfer. Requires <billId> --paymentReference --paymentDate YYYY-MM-DD --paymentAccount <QBO account ID> [--paymentProof receipt.pdf]. Reuses settled QBO payment links or queues one dated payment from the selected account. Exact retries are safe; do not pay again while reconciliation is pending.";
11635
+ if (legacyTarget === "mark-customer-invoice-sent-externally")
11636
+ return "Admin only. Record an APPROVED customer invoice as SENT (source EXTERNAL) because it was emailed to the customer outside Budget Builder. Sends no email and writes nothing to QuickBooks. Requires <invoiceId> --sentAt <ISO datetime, not in the future, not before approval> --recipients a@x.com,b@y.com [--note <message reference>].";
11542
11637
  if (legacyTarget === "list-external-payment-accounts")
11543
11638
  return "List active QuickBooks bank and credit-card account IDs for recording external payments (admin only).";
11544
11639
  if (legacyTarget === "update-bill") {
@@ -12011,6 +12106,11 @@ var registry2 = [
12011
12106
  description: "pageInfo.nextCursor from the last page, unchanged; pages forward only."
12012
12107
  }
12013
12108
  ]),
12109
+ legacyCommand("get-customer-invoice-payments", [
12110
+ "customer-invoice",
12111
+ "payments",
12112
+ "list"
12113
+ ]),
12014
12114
  legacyCommand("get-customer-invoice-email-context", [
12015
12115
  "customer-invoice",
12016
12116
  "email-context",
@@ -12041,6 +12141,20 @@ var registry2 = [
12041
12141
  "download"
12042
12142
  ]),
12043
12143
  legacyCommand("sync-customer-invoice", ["customer-invoice", "sync"]),
12144
+ legacyCommand("update-customer-invoice-details", [
12145
+ "customer-invoice",
12146
+ "details",
12147
+ "update"
12148
+ ]),
12149
+ legacyCommand("update-customer-invoice-qbo-drift", [
12150
+ "customer-invoice",
12151
+ "qbo-drift",
12152
+ "resolve"
12153
+ ]),
12154
+ legacyCommand("mark-customer-invoice-sent-externally", [
12155
+ "customer-invoice",
12156
+ "mark-sent-externally"
12157
+ ]),
12044
12158
  legacyCommand("list-approvals", ["approval", "list"], ["get-pending-approvals"]),
12045
12159
  legacyCommand("approve-bill", ["bill", "approve"]),
12046
12160
  legacyCommand("reject-bill", ["bill", "reject"]),
@@ -12049,6 +12163,9 @@ var registry2 = [
12049
12163
  legacyCommand("approve-supplier", ["supplier", "approve"]),
12050
12164
  legacyCommand("reject-supplier", ["supplier", "reject"]),
12051
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"]),
12052
12169
  legacyCommand("list-companies", ["company", "list"], [], [
12053
12170
  {
12054
12171
  name: "--name <text>",
@@ -13478,10 +13595,11 @@ Customer invoices
13478
13595
  No scope flag lists invoices globally. --projectId uses the project scope. A positional budgetId is a backward-compatible shortcut for --budgetIds.
13479
13596
  count-customer-invoices [budgetId] [same filter flags as list-customer-invoices] totalCount, lifecycle status facets (ignore --status) and amount metrics; no paging or sort flags
13480
13597
  get-customer-invoice <batchId> Batch as shown in the web app: status, totals, people, approvals and invoice summaries
13481
- get-customer-invoice-invoices <batchId> Invoices with QuickBooks identity, dates and sync state
13598
+ get-customer-invoice-invoices <batchId> Invoices with QuickBooks identity, dates, sync state, bill email (from QuickBooks) and held QuickBooks changes (qboDetailsDrift)
13482
13599
  get-customer-invoice-lines <invoiceId> [--limit 1-100] [--cursor <token>] One invoice's lines; { items, pageInfo }
13483
13600
  get-customer-invoice-approvals <batchId> [--limit 1-50] [--cursor <token>] Approval requests with approver/requester/responder; { items, pageInfo }
13484
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.
13485
13603
  get-customer-invoice-email-context <batchId> Contact, required CC, budget, and project context for composing an invoice email.
13486
13604
  preview-qbo-customer-invoice <budgetId> <qboInvoiceId> Preview an invoice selected from list-available-qbo-customer-invoices; works on accepted/closed estimates.
13487
13605
  import-qbo-customer-invoice <budgetId> <qboInvoiceId> --token <previewToken> Confirm the reviewed BB-only link; requires --allow-state-change --allow-financial-write in automation.
@@ -13494,7 +13612,12 @@ Customer invoices
13494
13612
  reject-customer-invoice <batchId> --reason <text> Admin rejection; voids QBO invoices and notifies the creator.
13495
13613
  send-customer-invoice-to-contact-person --payload '<json>' Queues same composer workflow as web; requires invoiceId, to, cc, replyTo, subject, HTML content, and HTML signature.
13496
13614
  download-customer-invoice-pdf <invoiceId> [--output <path>]
13497
- sync-customer-invoice <invoiceId> Refresh local status and balance from QuickBooks; paid invoices become PAID, reversals restore delivery/approval, and QBO voids can reopen an estimate.
13615
+ mark-customer-invoice-sent-externally <invoiceId> --sentAt <ISO datetime> --recipients a@x.com,b@y.com [--note <text>] Admin only. Record an APPROVED invoice as SENT because it was emailed outside Budget Builder; sends no email.
13616
+ sync-customer-invoice <invoiceId> Refresh local status and balance from QuickBooks; paid invoices become PAID, reversals restore delivery/approval, and QBO voids can reopen an estimate. QuickBooks edits to bill-to address, memo, bill email or total are not applied: they are flagged as qboDetailsDrift and admins are emailed.
13617
+ update-customer-invoice-details <invoiceId> --billingAddress <text> --customerMemo <text> [--requestId <uuid>]
13618
+ Save bill-to address and memo in BB and queue the QuickBooks update (external write). Bill email is managed in QuickBooks.
13619
+ update-customer-invoice-qbo-drift <invoiceId> --resolution ACCEPT_QBO|KEEP_BB [--requestId <uuid>]
13620
+ Admin: resolve flagged QuickBooks changes. ACCEPT_QBO copies them into BB only; KEEP_BB queues BB's address and memo to QuickBooks.
13498
13621
 
13499
13622
  Approvals
13500
13623
  list-approvals | get-pending-approvals [--type budget|supplier|bill|quotation|customer_invoice|all]
@@ -13565,6 +13688,9 @@ Suppliers & items
13565
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)
13566
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)
13567
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)
13568
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]
13569
13695
  Admin. Returns { items, pageInfo }; follow nextCursor/previousCursor with the same filters and sort. --page/--perPage are rejected.
13570
13696
  count-supplier-analytics [--name] [--status] [--gstRegistered] [--createdBy] [--timeFrame] [--startDate --endDate] Admin. totalCount for the same filters
@@ -14950,6 +15076,14 @@ Waiting for approval\u2026
14950
15076
  await getCustomerInvoiceHistory(page);
14951
15077
  break;
14952
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
+ }
14953
15087
  case "get-customer-invoice-email-context": {
14954
15088
  const batchId = positional[0];
14955
15089
  if (!batchId) {
@@ -15050,6 +15184,52 @@ Waiting for approval\u2026
15050
15184
  await downloadCustomerInvoicePdf(invoiceId, getFlag(flags, "output"));
15051
15185
  break;
15052
15186
  }
15187
+ case "update-customer-invoice-details": {
15188
+ const invoiceId = positional[0];
15189
+ const billingAddress = getFlag(flags, "billingAddress");
15190
+ const customerMemo = getFlag(flags, "customerMemo");
15191
+ if (!invoiceId || typeof billingAddress !== "string" || typeof customerMemo !== "string") {
15192
+ throw new Error("update-customer-invoice-details requires <invoiceId> --billingAddress <text> --customerMemo <text> (send both; use \\n for address lines). The bill email is managed in QuickBooks.");
15193
+ }
15194
+ const requestId = getFlag(flags, "requestId");
15195
+ await updateCustomerInvoiceDetails({
15196
+ billingAddress: billingAddress.replaceAll("\\n", `
15197
+ `),
15198
+ customerMemo,
15199
+ invoiceId,
15200
+ ...typeof requestId === "string" ? { requestId } : {}
15201
+ });
15202
+ break;
15203
+ }
15204
+ case "update-customer-invoice-qbo-drift": {
15205
+ const invoiceId = positional[0];
15206
+ const resolution = getFlag(flags, "resolution");
15207
+ if (!invoiceId || resolution !== "ACCEPT_QBO" && resolution !== "KEEP_BB") {
15208
+ throw new Error("update-customer-invoice-qbo-drift requires <invoiceId> --resolution ACCEPT_QBO|KEEP_BB");
15209
+ }
15210
+ const requestId = getFlag(flags, "requestId");
15211
+ await updateCustomerInvoiceQboDrift({
15212
+ invoiceId,
15213
+ resolution,
15214
+ ...typeof requestId === "string" ? { requestId } : {}
15215
+ });
15216
+ break;
15217
+ }
15218
+ case "mark-customer-invoice-sent-externally": {
15219
+ const invoiceId = positional[0];
15220
+ const sentAt = getFlag(flags, "sentAt");
15221
+ const recipients = getFlag(flags, "recipients");
15222
+ if (!invoiceId || !sentAt || !recipients) {
15223
+ throw new Error("mark-customer-invoice-sent-externally requires <invoiceId> --sentAt <ISO datetime> --recipients a@x.com,b@y.com [--note <text>]");
15224
+ }
15225
+ await markCustomerInvoiceSentExternally({
15226
+ invoiceId,
15227
+ sentAt,
15228
+ recipients: recipients.split(",").map((recipient) => recipient.trim()).filter(Boolean),
15229
+ note: getFlag(flags, "note")
15230
+ });
15231
+ break;
15232
+ }
15053
15233
  case "sync-customer-invoice": {
15054
15234
  const invoiceId = positional[0];
15055
15235
  if (!invoiceId) {
@@ -15121,6 +15301,27 @@ Waiting for approval\u2026
15121
15301
  await getSupplierDetails(id);
15122
15302
  break;
15123
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
+ }
15124
15325
  case "list-companies": {
15125
15326
  await listCompanies(parseCompanyListFlags(flags));
15126
15327
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/bb",
3
- "version": "3.7.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",