@go-labs-sg/bb 2.36.0 → 2.37.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 +14 -34
- package/command-manifest.json +0 -269
- package/command-reference.md +0 -40
- package/dist/index.js +656 -2098
- package/package.json +1 -1
- package/role-aware-agent-guide.md +1 -2
package/README.md
CHANGED
|
@@ -306,51 +306,31 @@ Bill creation determines its required permissions from the parsed input, for bot
|
|
|
306
306
|
|
|
307
307
|
**Contact-person estimate email:** `bb budget estimate send --payload '<json>'` calls the same `email.sendEstimateToContactPerson` procedure as the web composer. The payload requires `budgetId`, `estimateId`, optional `estimateDocNumber`, `to`, `cc`, `replyTo`, `subject`, HTML `content`, and HTML `signature`. It durably queues worker delivery of the QuickBooks PDF, standard terms, and Budget Builder budget attachments, and returns the outbound-email and operation IDs immediately. Worker retries reuse one provider idempotency key; the budget becomes `ESTIMATE_SENT` only after Resend accepts the email. The command requires interactive `CONFIRM`; inspect the budget, recipients, and HTML first.
|
|
308
308
|
|
|
309
|
-
###
|
|
309
|
+
### Invoice settings, due dates, and approval
|
|
310
310
|
|
|
311
|
-
After
|
|
311
|
+
After accepting an estimate, configure the project's invoice settings (70/30, 100% upfront, or custom deposit/balance), then choose a due date for each invoice. Creation is immediate; a future due date is a payment deadline, not an issue schedule.
|
|
312
312
|
|
|
313
|
-
1. `bb customer-invoice
|
|
314
|
-
2.
|
|
315
|
-
3. `bb customer-invoice
|
|
316
|
-
4.
|
|
317
|
-
5.
|
|
318
|
-
6. The user re-reads `splits`, then runs `bb customer-invoice send-group --payload '{"budgetId":"budget_1","expectedRevision":2,"instalmentIds":["row_1","row_2"]}'` to send approved invoices together in one email. Select one row for individual sending. Alternatively, use `--all-approved --payload '{"budgetId":"budget_1","expectedRevision":2}'` to select all approved, unsent invoices in that budget. Do not combine `--all-approved` with `instalmentIds`.
|
|
313
|
+
1. Read `bb customer-invoice readiness check <budgetId>`.
|
|
314
|
+
2. If needed, configure the project invoice settings in the web app, then re-check readiness.
|
|
315
|
+
3. Run `bb customer-invoice create --payload '<json>'` with the setting-derived splits and an explicit due date for each. Existing active invoices count toward coverage and are not recreated.
|
|
316
|
+
4. Non-admin creation automatically requests admin approval after QBO creation. Admin creation is auto-approved. Pending approval never sends invoices.
|
|
317
|
+
5. Use the normal invoice detail/email or portal-upload actions after approval. Creation and approval do not automatically email the customer.
|
|
319
318
|
|
|
320
|
-
|
|
319
|
+
Example only, for a project configured as 70/30 with no existing invoices:
|
|
321
320
|
|
|
322
321
|
```json
|
|
323
322
|
{
|
|
324
323
|
"budgetId": "budget_1",
|
|
325
|
-
"
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
"rows": [
|
|
330
|
-
{ "key": "deposit", "label": "Deposit", "amount": { "type": "PERCENTAGE", "value": 70 }, "due": { "type": "CONFIRMATION" }, "issue": { "type": "ACCEPTANCE" } },
|
|
331
|
-
{ "key": "balance", "label": "Balance", "amount": { "type": "PERCENTAGE", "value": 30 }, "due": { "type": "FIXED_DATE", "date": "2026-12-01" }, "issue": { "type": "ACCEPTANCE" } }
|
|
332
|
-
],
|
|
333
|
-
"reminderLeadDays": 7,
|
|
334
|
-
"billingRestriction": ""
|
|
335
|
-
},
|
|
336
|
-
"billing": {
|
|
337
|
-
"legalEntityName": "Customer legal entity",
|
|
338
|
-
"purchaseOrder": "PO-reference",
|
|
339
|
-
"billingAddress": "Customer billing address",
|
|
340
|
-
"to": "billing@example.invalid",
|
|
341
|
-
"cc": [],
|
|
342
|
-
"replyTo": "owner@example.invalid",
|
|
343
|
-
"deliveryMethod": "EMAIL",
|
|
344
|
-
"uploadUrl": null
|
|
345
|
-
}
|
|
324
|
+
"splits": [
|
|
325
|
+
{ "label": "Deposit", "percentage": 70, "dueDate": "2026-12-01" },
|
|
326
|
+
{ "label": "Balance", "percentage": 30, "dueDate": "2026-12-15" }
|
|
327
|
+
]
|
|
346
328
|
}
|
|
347
329
|
```
|
|
348
330
|
|
|
349
|
-
Use
|
|
350
|
-
|
|
351
|
-
Non-interactive save requires `--allow-state-change`; creation requires `--allow-state-change --allow-financial-write --allow-external-write --allow-email` (approval-request email, not customer invoice delivery); grouped sending requires `--allow-state-change --allow-email --allow-external-write`. These flags acknowledge effects, not role permissions or user authorisation. Both ordinary users and admins still need server-granted project access. Pending/rejected invoices cannot be sent; a mixed selection is rejected rather than silently dropping invoices. Sending uses each issued invoice's original billing revision, not later edits. Invoices with different original billing instructions must be sent in separate groups. Do not blindly retry uncertain QBO or email outcomes.
|
|
331
|
+
Use actual agreed dates and the project's saved percentages, not the example values. Non-interactive creation requires `--allow-state-change --allow-financial-write --allow-external-write --allow-email` (internal approval notification, not customer delivery). Do not blindly retry an uncertain QBO outcome; review the existing batch first.
|
|
352
332
|
|
|
353
|
-
|
|
333
|
+
The former `splits`, `preview-splits`, `save-splits`, `create-splits`, and `send-group` schedule commands are retired. Update the CLI alongside the API. Existing schedule data and invoices are retained, and previously queued emails retain their delivery/reconciliation support; no new schedules or reminders are created.
|
|
354
334
|
|
|
355
335
|
### Quotation amounts and line allocations
|
|
356
336
|
|
package/command-manifest.json
CHANGED
|
@@ -3829,275 +3829,6 @@
|
|
|
3829
3829
|
"effects": ["state-change", "financial-write"],
|
|
3830
3830
|
"legacyTarget": "import-qbo-customer-invoice"
|
|
3831
3831
|
},
|
|
3832
|
-
{
|
|
3833
|
-
"path": ["customer-invoice", "splits"],
|
|
3834
|
-
"legacyAliases": [
|
|
3835
|
-
"get-customer-invoice-splits",
|
|
3836
|
-
"get_customer_invoice_splits"
|
|
3837
|
-
],
|
|
3838
|
-
"summary": "Review acceptance invoice splits, due dates, approval states and saved billing details. Arguments: <budgetId>.",
|
|
3839
|
-
"globalOptions": [
|
|
3840
|
-
{
|
|
3841
|
-
"name": "--help",
|
|
3842
|
-
"description": "Show help for this command."
|
|
3843
|
-
},
|
|
3844
|
-
{
|
|
3845
|
-
"name": "--quiet",
|
|
3846
|
-
"description": "Suppress non-error diagnostics."
|
|
3847
|
-
},
|
|
3848
|
-
{
|
|
3849
|
-
"name": "--debug",
|
|
3850
|
-
"description": "Emit sanitized diagnostic traces."
|
|
3851
|
-
},
|
|
3852
|
-
{
|
|
3853
|
-
"name": "--api-url",
|
|
3854
|
-
"description": "Override the Budget Builder API base URL."
|
|
3855
|
-
},
|
|
3856
|
-
{
|
|
3857
|
-
"name": "--no-browser",
|
|
3858
|
-
"description": "Print the authorization URL without opening a browser."
|
|
3859
|
-
},
|
|
3860
|
-
{
|
|
3861
|
-
"name": "--allow-state-change",
|
|
3862
|
-
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
3863
|
-
},
|
|
3864
|
-
{
|
|
3865
|
-
"name": "--allow-email",
|
|
3866
|
-
"description": "Allow sending email in non-interactive use."
|
|
3867
|
-
},
|
|
3868
|
-
{
|
|
3869
|
-
"name": "--allow-external-write",
|
|
3870
|
-
"description": "Allow writes to external systems in non-interactive use."
|
|
3871
|
-
},
|
|
3872
|
-
{
|
|
3873
|
-
"name": "--allow-delete",
|
|
3874
|
-
"description": "Allow deleting data in non-interactive use."
|
|
3875
|
-
},
|
|
3876
|
-
{
|
|
3877
|
-
"name": "--allow-financial-write",
|
|
3878
|
-
"description": "Allow financial-record changes in non-interactive use."
|
|
3879
|
-
}
|
|
3880
|
-
],
|
|
3881
|
-
"argumentMode": "legacy-passthrough",
|
|
3882
|
-
"effects": [],
|
|
3883
|
-
"legacyTarget": "get-customer-invoice-splits"
|
|
3884
|
-
},
|
|
3885
|
-
{
|
|
3886
|
-
"path": ["customer-invoice", "preview-splits"],
|
|
3887
|
-
"legacyAliases": [
|
|
3888
|
-
"preview-customer-invoice-splits",
|
|
3889
|
-
"preview_customer_invoice_splits"
|
|
3890
|
-
],
|
|
3891
|
-
"summary": "Preview splits, GST totals and due-date changes without writes. Requires --payload with the schedule save input.",
|
|
3892
|
-
"globalOptions": [
|
|
3893
|
-
{
|
|
3894
|
-
"name": "--help",
|
|
3895
|
-
"description": "Show help for this command."
|
|
3896
|
-
},
|
|
3897
|
-
{
|
|
3898
|
-
"name": "--quiet",
|
|
3899
|
-
"description": "Suppress non-error diagnostics."
|
|
3900
|
-
},
|
|
3901
|
-
{
|
|
3902
|
-
"name": "--debug",
|
|
3903
|
-
"description": "Emit sanitized diagnostic traces."
|
|
3904
|
-
},
|
|
3905
|
-
{
|
|
3906
|
-
"name": "--api-url",
|
|
3907
|
-
"description": "Override the Budget Builder API base URL."
|
|
3908
|
-
},
|
|
3909
|
-
{
|
|
3910
|
-
"name": "--no-browser",
|
|
3911
|
-
"description": "Print the authorization URL without opening a browser."
|
|
3912
|
-
},
|
|
3913
|
-
{
|
|
3914
|
-
"name": "--allow-state-change",
|
|
3915
|
-
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
3916
|
-
},
|
|
3917
|
-
{
|
|
3918
|
-
"name": "--allow-email",
|
|
3919
|
-
"description": "Allow sending email in non-interactive use."
|
|
3920
|
-
},
|
|
3921
|
-
{
|
|
3922
|
-
"name": "--allow-external-write",
|
|
3923
|
-
"description": "Allow writes to external systems in non-interactive use."
|
|
3924
|
-
},
|
|
3925
|
-
{
|
|
3926
|
-
"name": "--allow-delete",
|
|
3927
|
-
"description": "Allow deleting data in non-interactive use."
|
|
3928
|
-
},
|
|
3929
|
-
{
|
|
3930
|
-
"name": "--allow-financial-write",
|
|
3931
|
-
"description": "Allow financial-record changes in non-interactive use."
|
|
3932
|
-
}
|
|
3933
|
-
],
|
|
3934
|
-
"argumentMode": "legacy-passthrough",
|
|
3935
|
-
"effects": [],
|
|
3936
|
-
"legacyTarget": "preview-customer-invoice-splits"
|
|
3937
|
-
},
|
|
3938
|
-
{
|
|
3939
|
-
"path": ["customer-invoice", "save-splits"],
|
|
3940
|
-
"legacyAliases": [
|
|
3941
|
-
"save-customer-invoice-splits",
|
|
3942
|
-
"save_customer_invoice_splits"
|
|
3943
|
-
],
|
|
3944
|
-
"summary": "Save split amounts and separate due dates after estimate acceptance. Requires --payload; does not create invoices or request approval.",
|
|
3945
|
-
"globalOptions": [
|
|
3946
|
-
{
|
|
3947
|
-
"name": "--help",
|
|
3948
|
-
"description": "Show help for this command."
|
|
3949
|
-
},
|
|
3950
|
-
{
|
|
3951
|
-
"name": "--quiet",
|
|
3952
|
-
"description": "Suppress non-error diagnostics."
|
|
3953
|
-
},
|
|
3954
|
-
{
|
|
3955
|
-
"name": "--debug",
|
|
3956
|
-
"description": "Emit sanitized diagnostic traces."
|
|
3957
|
-
},
|
|
3958
|
-
{
|
|
3959
|
-
"name": "--api-url",
|
|
3960
|
-
"description": "Override the Budget Builder API base URL."
|
|
3961
|
-
},
|
|
3962
|
-
{
|
|
3963
|
-
"name": "--no-browser",
|
|
3964
|
-
"description": "Print the authorization URL without opening a browser."
|
|
3965
|
-
},
|
|
3966
|
-
{
|
|
3967
|
-
"name": "--allow-state-change",
|
|
3968
|
-
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
3969
|
-
},
|
|
3970
|
-
{
|
|
3971
|
-
"name": "--allow-email",
|
|
3972
|
-
"description": "Allow sending email in non-interactive use."
|
|
3973
|
-
},
|
|
3974
|
-
{
|
|
3975
|
-
"name": "--allow-external-write",
|
|
3976
|
-
"description": "Allow writes to external systems in non-interactive use."
|
|
3977
|
-
},
|
|
3978
|
-
{
|
|
3979
|
-
"name": "--allow-delete",
|
|
3980
|
-
"description": "Allow deleting data in non-interactive use."
|
|
3981
|
-
},
|
|
3982
|
-
{
|
|
3983
|
-
"name": "--allow-financial-write",
|
|
3984
|
-
"description": "Allow financial-record changes in non-interactive use."
|
|
3985
|
-
}
|
|
3986
|
-
],
|
|
3987
|
-
"argumentMode": "legacy-passthrough",
|
|
3988
|
-
"effects": ["state-change"],
|
|
3989
|
-
"legacyTarget": "save-customer-invoice-splits"
|
|
3990
|
-
},
|
|
3991
|
-
{
|
|
3992
|
-
"path": ["customer-invoice", "create-splits"],
|
|
3993
|
-
"legacyAliases": [
|
|
3994
|
-
"create-customer-invoice-splits",
|
|
3995
|
-
"create_customer_invoice_splits"
|
|
3996
|
-
],
|
|
3997
|
-
"summary": "Create selected split invoices in QBO, then request admin approval for non-admin creators or auto-approve admin creators. Requires --payload with budgetId, expectedRevision, instalmentIds. Never sends customer invoices.",
|
|
3998
|
-
"globalOptions": [
|
|
3999
|
-
{
|
|
4000
|
-
"name": "--help",
|
|
4001
|
-
"description": "Show help for this command."
|
|
4002
|
-
},
|
|
4003
|
-
{
|
|
4004
|
-
"name": "--quiet",
|
|
4005
|
-
"description": "Suppress non-error diagnostics."
|
|
4006
|
-
},
|
|
4007
|
-
{
|
|
4008
|
-
"name": "--debug",
|
|
4009
|
-
"description": "Emit sanitized diagnostic traces."
|
|
4010
|
-
},
|
|
4011
|
-
{
|
|
4012
|
-
"name": "--api-url",
|
|
4013
|
-
"description": "Override the Budget Builder API base URL."
|
|
4014
|
-
},
|
|
4015
|
-
{
|
|
4016
|
-
"name": "--no-browser",
|
|
4017
|
-
"description": "Print the authorization URL without opening a browser."
|
|
4018
|
-
},
|
|
4019
|
-
{
|
|
4020
|
-
"name": "--allow-state-change",
|
|
4021
|
-
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
4022
|
-
},
|
|
4023
|
-
{
|
|
4024
|
-
"name": "--allow-email",
|
|
4025
|
-
"description": "Allow sending email in non-interactive use."
|
|
4026
|
-
},
|
|
4027
|
-
{
|
|
4028
|
-
"name": "--allow-external-write",
|
|
4029
|
-
"description": "Allow writes to external systems in non-interactive use."
|
|
4030
|
-
},
|
|
4031
|
-
{
|
|
4032
|
-
"name": "--allow-delete",
|
|
4033
|
-
"description": "Allow deleting data in non-interactive use."
|
|
4034
|
-
},
|
|
4035
|
-
{
|
|
4036
|
-
"name": "--allow-financial-write",
|
|
4037
|
-
"description": "Allow financial-record changes in non-interactive use."
|
|
4038
|
-
}
|
|
4039
|
-
],
|
|
4040
|
-
"argumentMode": "legacy-passthrough",
|
|
4041
|
-
"effects": ["state-change", "financial-write", "external-write", "email"],
|
|
4042
|
-
"legacyTarget": "create-customer-invoice-splits"
|
|
4043
|
-
},
|
|
4044
|
-
{
|
|
4045
|
-
"path": ["customer-invoice", "send-group"],
|
|
4046
|
-
"legacyAliases": [
|
|
4047
|
-
"send-customer-invoice-group",
|
|
4048
|
-
"send_customer_invoice_group"
|
|
4049
|
-
],
|
|
4050
|
-
"summary": "Send selected approved invoices together in one email. Requires --payload with budgetId, expectedRevision, instalmentIds, or --all-approved without instalmentIds. Pass one instalment for individual sending.",
|
|
4051
|
-
"globalOptions": [
|
|
4052
|
-
{
|
|
4053
|
-
"name": "--help",
|
|
4054
|
-
"description": "Show help for this command."
|
|
4055
|
-
},
|
|
4056
|
-
{
|
|
4057
|
-
"name": "--quiet",
|
|
4058
|
-
"description": "Suppress non-error diagnostics."
|
|
4059
|
-
},
|
|
4060
|
-
{
|
|
4061
|
-
"name": "--debug",
|
|
4062
|
-
"description": "Emit sanitized diagnostic traces."
|
|
4063
|
-
},
|
|
4064
|
-
{
|
|
4065
|
-
"name": "--api-url",
|
|
4066
|
-
"description": "Override the Budget Builder API base URL."
|
|
4067
|
-
},
|
|
4068
|
-
{
|
|
4069
|
-
"name": "--no-browser",
|
|
4070
|
-
"description": "Print the authorization URL without opening a browser."
|
|
4071
|
-
},
|
|
4072
|
-
{
|
|
4073
|
-
"name": "--allow-state-change",
|
|
4074
|
-
"description": "Allow a Budget Builder state change in non-interactive use."
|
|
4075
|
-
},
|
|
4076
|
-
{
|
|
4077
|
-
"name": "--allow-email",
|
|
4078
|
-
"description": "Allow sending email in non-interactive use."
|
|
4079
|
-
},
|
|
4080
|
-
{
|
|
4081
|
-
"name": "--allow-external-write",
|
|
4082
|
-
"description": "Allow writes to external systems in non-interactive use."
|
|
4083
|
-
},
|
|
4084
|
-
{
|
|
4085
|
-
"name": "--allow-delete",
|
|
4086
|
-
"description": "Allow deleting data in non-interactive use."
|
|
4087
|
-
},
|
|
4088
|
-
{
|
|
4089
|
-
"name": "--allow-financial-write",
|
|
4090
|
-
"description": "Allow financial-record changes in non-interactive use."
|
|
4091
|
-
},
|
|
4092
|
-
{
|
|
4093
|
-
"name": "--all-approved",
|
|
4094
|
-
"description": "Select all approved unsent invoices; payload must contain only budgetId and expectedRevision."
|
|
4095
|
-
}
|
|
4096
|
-
],
|
|
4097
|
-
"argumentMode": "legacy-passthrough",
|
|
4098
|
-
"effects": ["state-change", "email", "external-write"],
|
|
4099
|
-
"legacyTarget": "send-customer-invoice-group"
|
|
4100
|
-
},
|
|
4101
3832
|
{
|
|
4102
3833
|
"path": ["customer-invoice", "create"],
|
|
4103
3834
|
"legacyAliases": ["create-customer-invoice", "create_customer_invoice"],
|
package/command-reference.md
CHANGED
|
@@ -617,46 +617,6 @@ Legacy aliases: `import-qbo-customer-invoice`, `import_qbo_customer_invoice`.
|
|
|
617
617
|
|
|
618
618
|
Effects: state-change, financial-write.
|
|
619
619
|
|
|
620
|
-
## `bb customer-invoice splits`
|
|
621
|
-
|
|
622
|
-
Review acceptance invoice splits, due dates, approval states and saved billing details. Arguments: <budgetId>.
|
|
623
|
-
|
|
624
|
-
Legacy aliases: `get-customer-invoice-splits`, `get_customer_invoice_splits`.
|
|
625
|
-
|
|
626
|
-
Effects: none.
|
|
627
|
-
|
|
628
|
-
## `bb customer-invoice preview-splits`
|
|
629
|
-
|
|
630
|
-
Preview splits, GST totals and due-date changes without writes. Requires --payload with the schedule save input.
|
|
631
|
-
|
|
632
|
-
Legacy aliases: `preview-customer-invoice-splits`, `preview_customer_invoice_splits`.
|
|
633
|
-
|
|
634
|
-
Effects: none.
|
|
635
|
-
|
|
636
|
-
## `bb customer-invoice save-splits`
|
|
637
|
-
|
|
638
|
-
Save split amounts and separate due dates after estimate acceptance. Requires --payload; does not create invoices or request approval.
|
|
639
|
-
|
|
640
|
-
Legacy aliases: `save-customer-invoice-splits`, `save_customer_invoice_splits`.
|
|
641
|
-
|
|
642
|
-
Effects: state-change.
|
|
643
|
-
|
|
644
|
-
## `bb customer-invoice create-splits`
|
|
645
|
-
|
|
646
|
-
Create selected split invoices in QBO, then request admin approval for non-admin creators or auto-approve admin creators. Requires --payload with budgetId, expectedRevision, instalmentIds. Never sends customer invoices.
|
|
647
|
-
|
|
648
|
-
Legacy aliases: `create-customer-invoice-splits`, `create_customer_invoice_splits`.
|
|
649
|
-
|
|
650
|
-
Effects: state-change, financial-write, external-write, email.
|
|
651
|
-
|
|
652
|
-
## `bb customer-invoice send-group`
|
|
653
|
-
|
|
654
|
-
Send selected approved invoices together in one email. Requires --payload with budgetId, expectedRevision, instalmentIds, or --all-approved without instalmentIds. Pass one instalment for individual sending.
|
|
655
|
-
|
|
656
|
-
Legacy aliases: `send-customer-invoice-group`, `send_customer_invoice_group`.
|
|
657
|
-
|
|
658
|
-
Effects: state-change, email, external-write.
|
|
659
|
-
|
|
660
620
|
## `bb customer-invoice create`
|
|
661
621
|
|
|
662
622
|
Create Customer Invoice.
|