@go-labs-sg/bb 1.2.3 → 1.2.5
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 +2 -2
- package/dist/commands.js +3 -0
- package/dist/index.js +11 -2
- package/dist/prisma-enums.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Global options and flags use `--key=value` or `--key value` (see `bb help`).
|
|
|
59
59
|
| **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`, `get-budget-versions`, `update-budget-status`, `create-budget` / `update-budget` (`--payload`), `delete-budget`, `create-budget-approval`, `add-budget-items`, `update-budget-item`, `remove-budget-item`, `reorder-budget-items`, `update-budget-item-supplier`, `create-budget-category`, `update-budget-category`, `delete-budget-category`, `update-budget-commission`, `update-budget-discount` (`--payload` where noted), `upload-budget-attachment` (`<budgetId>` + local file path; uses `attachment.requestBudgetAttachmentUpload` + PUT + `attachment.confirmBudgetAttachment`) |
|
|
60
60
|
| **Bills** | `list-bills`, `list-claims`, `create-bill` (`--payload`), `update-bill` (`--payload`), `delete-bill`, `create-bill-approval`, `update-bill-status`, `patch-bill-payment` (PAID bills: `--paymentTrackingUrl`, `--paymentReference`, `--quickbooksBillId`, `--paymentDate` ISO; clear with `--clearPaymentTrackingUrl` / `--clearPaymentReference` / `--clearQuickbooksBillId` / `--clearPaymentDate` `true`), `patch-bill-invoice-number`, `get-bill-attachments`, `upload-bill-attachment` (`<billId>` + local path), `get-bill-details` |
|
|
61
61
|
| **Approvals** | `list-approvals` / `get-pending-approvals`, `approve-bill`, `reject-bill`, `approve-budget`, `reject-budget`, `approve-supplier`, `reject-supplier` |
|
|
62
|
-
| **Companies & projects** | `list-companies`, `get-company`, `create-company`, `update-company` (`--payload`), `delete-company`, `list-projects`, `get-project`, `create-project` (optional `--requestQboAccountantNotification false` to skip QBO accountant emails), `update-project` (`--payload`, optional `requestQboAccountantNotification` in JSON), `delete-project`, `update-project-status` |
|
|
62
|
+
| **Companies & projects** | `list-companies`, `get-company`, `create-company`, `update-company` (`--payload`), `delete-company`, `list-projects`, `get-project`, `create-project` (`--asanaTaskId`, `--slackChannelId`, `--slackChannelUrl`, `--slackChannelName`, …; optional `--requestQboAccountantNotification false` to skip QBO accountant emails), `update-project` (`--payload`, optional `requestQboAccountantNotification` in JSON), `delete-project`, `update-project-status` (`<id>` `<status>`: `PITCH` \| `EVENT` \| `COMPLETED` \| `LOST`) |
|
|
63
63
|
| **Contacts** | `list-contacts`, `create-contact-person` (`--payload`), `update-contact-person` (`--payload`) |
|
|
64
64
|
| **Suppliers & items** | `list-suppliers`, `create-supplier` (`--payload`), `update-supplier` (`--payload`), `delete-suppliers` (`--ids` CSV; admin), `create-certification` / `create-payment-method` / `create-supplier-role` / `create-supplier-tag` (`--name`), `get-supplier-details`, `get-supplier-analytics`, `list-items`, `create-item` (`--payload`), `update-item` (`--payload`), `delete-item`, `get-item`, `list-item-categories`, `create-item-category`, `update-item-category`, `delete-item-categories` (`--ids` CSV; admin) |
|
|
65
65
|
| **Dashboard & users** | `list-users`, `get-user-performance`, `get-dashboard`, `get-monthly-metrics`, `get-system-overview`, `get-estimate-performance`, `get-financial-overview` |
|
|
@@ -99,4 +99,4 @@ bun run src/index.ts list-budgets
|
|
|
99
99
|
|
|
100
100
|
### Publish
|
|
101
101
|
|
|
102
|
-
`
|
|
102
|
+
`prepack` strips `workspace:` / `catalog:` entries from this package’s `package.json`, runs `tsc`, then `postpack` restores the file — so the npm tarball does not contain monorepo protocol dependencies. Types from `@go-labs/budget-builder-api` are compile-time only (`import type`). Prisma enum **values** used at runtime live in `src/prisma-enums.ts` (kept in sync with `packages/budget-builder/db` generated enums) so npm installs do not need `@go-labs/budget-builder-db`.
|
package/dist/commands.js
CHANGED
|
@@ -547,6 +547,9 @@ export async function createProject(opts) {
|
|
|
547
547
|
companyId: opts.companyId,
|
|
548
548
|
contactPersonId: opts.contactPersonId,
|
|
549
549
|
asanaTaskId: opts.asanaTaskId,
|
|
550
|
+
slackChannelId: opts.slackChannelId,
|
|
551
|
+
slackChannelUrl: opts.slackChannelUrl,
|
|
552
|
+
slackChannelName: opts.slackChannelName,
|
|
550
553
|
dateRange: {
|
|
551
554
|
from: new Date(opts.startDate),
|
|
552
555
|
to: opts.endDate ? new Date(opts.endDate) : undefined,
|
package/dist/index.js
CHANGED
|
@@ -125,7 +125,7 @@ Companies & projects
|
|
|
125
125
|
delete-company <id>
|
|
126
126
|
list-projects [--companyId] [--name] [--status] [--page] [--perPage]
|
|
127
127
|
get-project <id>
|
|
128
|
-
create-project --name --companyId --contactPersonId --startDate <ISO> [--endDate] [--description] [--requestQboAccountantNotification false]
|
|
128
|
+
create-project --name --companyId --contactPersonId --asanaTaskId --slackChannelId --slackChannelUrl --slackChannelName --startDate <ISO> [--endDate] [--description] [--requestQboAccountantNotification false]
|
|
129
129
|
update-project --payload '<json>' (project.updateProject; optional requestQboAccountantNotification; default notify like web)
|
|
130
130
|
delete-project <id>
|
|
131
131
|
update-project-status <id> <status>
|
|
@@ -692,19 +692,28 @@ async function main() {
|
|
|
692
692
|
const companyId = getFlag(flags, "companyId");
|
|
693
693
|
const contactPersonId = getFlag(flags, "contactPersonId");
|
|
694
694
|
const asanaTaskId = getFlag(flags, "asanaTaskId");
|
|
695
|
+
const slackChannelId = getFlag(flags, "slackChannelId");
|
|
696
|
+
const slackChannelUrl = getFlag(flags, "slackChannelUrl");
|
|
697
|
+
const slackChannelName = getFlag(flags, "slackChannelName");
|
|
695
698
|
const startDate = getFlag(flags, "startDate");
|
|
696
699
|
if (!name ||
|
|
697
700
|
!companyId ||
|
|
698
701
|
!contactPersonId ||
|
|
699
702
|
!asanaTaskId ||
|
|
703
|
+
!slackChannelId ||
|
|
704
|
+
!slackChannelUrl ||
|
|
705
|
+
!slackChannelName ||
|
|
700
706
|
!startDate) {
|
|
701
|
-
throw new Error("create-project requires --name --companyId --contactPersonId --asanaTaskId --startDate (ISO)");
|
|
707
|
+
throw new Error("create-project requires --name --companyId --contactPersonId --asanaTaskId --slackChannelId --slackChannelUrl --slackChannelName --startDate (ISO)");
|
|
702
708
|
}
|
|
703
709
|
await createProject({
|
|
704
710
|
name,
|
|
705
711
|
companyId,
|
|
706
712
|
contactPersonId,
|
|
707
713
|
asanaTaskId,
|
|
714
|
+
slackChannelId,
|
|
715
|
+
slackChannelUrl,
|
|
716
|
+
slackChannelName,
|
|
708
717
|
startDate,
|
|
709
718
|
endDate: getFlag(flags, "endDate"),
|
|
710
719
|
description: getFlag(flags, "description"),
|
package/dist/prisma-enums.js
CHANGED
|
@@ -7,10 +7,10 @@ export const EstimationMode = {
|
|
|
7
7
|
MANPOWER_SPECIFIED: "MANPOWER_SPECIFIED",
|
|
8
8
|
};
|
|
9
9
|
export const ProjectStatus = {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
PITCH: "PITCH",
|
|
11
|
+
EVENT: "EVENT",
|
|
12
12
|
COMPLETED: "COMPLETED",
|
|
13
|
-
|
|
13
|
+
LOST: "LOST",
|
|
14
14
|
};
|
|
15
15
|
export const BudgetStatus = {
|
|
16
16
|
DRAFT: "DRAFT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/bb",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Budget Builder CLI — list budgets, bills, approvals, suppliers; approve bills; change status. For AI agents (e.g. Chuck/OpenClaw).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"check": "biome check .",
|
|
18
18
|
"check:write": "biome check --write .",
|
|
19
19
|
"run": "bun run src/index.ts",
|
|
20
|
-
"
|
|
20
|
+
"prepack": "node scripts/strip-workspace-deps.js && bun run build",
|
|
21
21
|
"postpack": "node scripts/restore-package-json.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|