@go-labs-sg/bb 3.9.0 → 3.10.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
@@ -722,7 +722,7 @@ Admin/Lead users can run `bb supplier approve <supplierId>` to directly re-appro
722
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`) |
723
723
  | **Contacts** | `list-contacts`, `create-contact-person` (`--payload`), `update-contact-person` (`--payload`) |
724
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) |
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) |
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, optional `--projectTeamOnly true` for the active `@getout.sg` users accepted as Inside Sales, Business Development or Project Manager; `--page` / `--perPage` rejected), `count-users` (`{ totalCount }` for the same `--q` and `--projectTeamOnly`), `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) |
726
726
  | **Errors (admin)** | `get-recent-errors`, `get-error`, `get-error-metrics` |
727
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) |
728
728
  | **Historical / benchmarks** | `get-approved-budgets`, `get-budget-category-benchmarks`, `get-item-pricing-history`, `get-supplier-pricing-history` |
@@ -9141,7 +9141,7 @@
9141
9141
  {
9142
9142
  "path": ["user", "list"],
9143
9143
  "legacyAliases": ["list-users", "list_users"],
9144
- "summary": "List users with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.",
9144
+ "summary": "List users with cursor pagination. [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager. --page/--perPage are rejected.",
9145
9145
  "globalOptions": [
9146
9146
  {
9147
9147
  "name": "--help",
@@ -9187,6 +9187,10 @@
9187
9187
  "name": "--q <text>",
9188
9188
  "description": "Search user names and emails (name A–Z). A bare --q is rejected; use -q/--quiet to hide logs."
9189
9189
  },
9190
+ {
9191
+ "name": "--projectTeamOnly <true|false>",
9192
+ "description": "true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager."
9193
+ },
9190
9194
  {
9191
9195
  "name": "--limit <1-100>",
9192
9196
  "description": "Rows per page. Output is { items, pageInfo }."
@@ -1489,7 +1489,7 @@ Effects: state-change, delete.
1489
1489
 
1490
1490
  ## `bb user list`
1491
1491
 
1492
- List users with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.
1492
+ List users with cursor pagination. [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>] Name A–Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager. --page/--perPage are rejected.
1493
1493
 
1494
1494
  Legacy aliases: `list-users`, `list_users`.
1495
1495
 
package/dist/index.js CHANGED
@@ -11564,7 +11564,7 @@ var summaryFor = (legacyTarget) => {
11564
11564
  if (legacyTarget === "list-quotations")
11565
11565
  return "List quotations with cursor pagination. [--projectId] [--budgetId] [--supplierId] [--status CSV] [--createdBy CSV] [--search] [--limit 1-100] [--cursor <token>] [--direction forward|backward] Newest first; returns { items, pageInfo }. Follow nextCursor/previousCursor with the same filters. --page/--pageSize/--perPage are rejected; --requesterIds remains an alias for --createdBy.";
11566
11566
  if (legacyTarget === "list-users")
11567
- return "List users with cursor pagination. [--q] [--limit 1-100] [--cursor <token>] Name A\u2013Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.";
11567
+ return "List users with cursor pagination. [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>] Name A\u2013Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager. --page/--perPage are rejected.";
11568
11568
  if (legacyTarget === "list-companies")
11569
11569
  return "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.";
11570
11570
  if (legacyTarget === "count-companies")
@@ -12547,6 +12547,10 @@ var registry2 = [
12547
12547
  name: "--q <text>",
12548
12548
  description: "Search user names and emails (name A\u2013Z). A bare --q is rejected; use -q/--quiet to hide logs."
12549
12549
  },
12550
+ {
12551
+ name: "--projectTeamOnly <true|false>",
12552
+ description: "true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager."
12553
+ },
12550
12554
  {
12551
12555
  name: "--limit <1-100>",
12552
12556
  description: "Rows per page. Output is { items, pageInfo }."
@@ -13664,6 +13668,7 @@ Companies & projects
13664
13668
  update-project-status <id> <status> [--projectManagerId <userId>] [--projectManagerEmail <email>]
13665
13669
  PITCH \u2192 WON requires an accepted/closed estimate. To win a pitch, accept its estimate with mark-budget-won <budgetId> <signed-quote.pdf>, which moves the project to WON.
13666
13670
  Required when moving PITCH \u2192 WON: supply --projectManagerId or --projectManagerEmail.
13671
+ The project manager must be an active @getout.sg user; list eligible users with list-users --projectTeamOnly true.
13667
13672
  status: ${projectStatusesForHelp.join(", ")}
13668
13673
 
13669
13674
  Contacts
@@ -13708,9 +13713,10 @@ Suppliers & items
13708
13713
 
13709
13714
  Dashboard & users
13710
13715
  whoami Show the user identity and role for the active API key.
13711
- list-users [--q] [--limit 1-100] [--cursor <token>]
13712
- Name A\u2013Z. Returns { items, pageInfo }; follow nextCursor with the same --q. --page/--perPage are rejected.
13713
- count-users [--q] totalCount for the same search
13716
+ list-users [--q] [--projectTeamOnly true|false] [--limit 1-100] [--cursor <token>]
13717
+ Name A\u2013Z. Returns { items, pageInfo }; follow nextCursor with the same --q and --projectTeamOnly. --page/--perPage are rejected.
13718
+ --projectTeamOnly true lists only active @getout.sg users, the only accounts accepted as Inside Sales, Business Development or Project Manager.
13719
+ count-users [--q] [--projectTeamOnly true|false] totalCount for the same search
13714
13720
  create-user --email <email> [--name <name>] [--role ${userRolesForHelp.join("|")}] (admin; API-only service identity with no Google sign-in)
13715
13721
  create-api-key --name <label> [--userId <userId>] (defaults to the caller; admin required for another user; raw key is shown once)
13716
13722
  list-api-keys [--userId <userId>] [--limit 1-100] [--cursor <token>] (newest first, { items, pageInfo }; defaults to the caller; admin required for another user)
@@ -15938,11 +15944,13 @@ Waiting for approval\u2026
15938
15944
  case "count-users": {
15939
15945
  rejectRetiredPageFlags(flags);
15940
15946
  const q = getFlag(flags, "q");
15947
+ rejectBareFlag(flags, "projectTeamOnly");
15948
+ const projectTeamOnly = parseOptionalBoolFlag(flags, "projectTeamOnly");
15941
15949
  if (cmd === "count-users") {
15942
15950
  for (const key of ["limit", "cursor"])
15943
15951
  if (flags[key] !== undefined)
15944
- throw new Error(`count-users does not accept --${key}; totals use --q only.`);
15945
- await countUsers({ q });
15952
+ throw new Error(`count-users does not accept --${key}; totals use --q and --projectTeamOnly only.`);
15953
+ await countUsers({ q, projectTeamOnly });
15946
15954
  break;
15947
15955
  }
15948
15956
  for (const key of ["limit", "cursor"])
@@ -15954,6 +15962,7 @@ Waiting for approval\u2026
15954
15962
  throw new Error("--cursor must be a non-empty opaque token of at most 8192 characters.");
15955
15963
  await listUsers({
15956
15964
  q,
15965
+ projectTeamOnly,
15957
15966
  limit: parseProjectLimit(getFlag(flags, "limit")),
15958
15967
  cursor
15959
15968
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/bb",
3
- "version": "3.9.0",
3
+ "version": "3.10.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",
@@ -19,7 +19,7 @@
19
19
  "command-manifest.json"
20
20
  ],
21
21
  "dependencies": {
22
- "@trpc/client": "^11.22.1",
22
+ "@trpc/client": "^11.24.0",
23
23
  "dotenv": "^18.0.9",
24
24
  "mime-types": "^3.0.2",
25
25
  "superjson": "^2.2.6"