@tenkeybridge/mcp 0.7.0 → 0.8.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 +1 -1
- package/dist/cli.js +208 -25
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +208 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +208 -25
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -304,9 +304,8 @@ var CATALOG = {
|
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"qbo": "LinkedTxn",
|
|
307
|
-
"support": "
|
|
308
|
-
"note": "
|
|
309
|
-
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
307
|
+
"support": "partial",
|
|
308
|
+
"note": "Read-only, populated on read: the PurchaseOrder a bill was created from and the BillPayment(s) and VendorCredit(s) applied to it, as {TxnId, TxnType}. Desktop-only link types (ItemReceipt, ...) are omitted. Proven live on QuickBooks Enterprise 24 (2026-10-20): a Bill created from a purchase order carries the PO, and a paid bill carries its check payment. Accepted and ignored on write, as in QBO. Linking a new Bill to a PurchaseOrder is not supported: Desktop's BillAdd LinkToTxnID pulls the PO's lines in, and a line-level link next to explicit lines is refused (3153)."
|
|
310
309
|
},
|
|
311
310
|
{
|
|
312
311
|
"qbo": "operation=void",
|
|
@@ -595,6 +594,65 @@ var CATALOG = {
|
|
|
595
594
|
],
|
|
596
595
|
"unsupported": []
|
|
597
596
|
},
|
|
597
|
+
"ClearedStatus": {
|
|
598
|
+
"entity": "ClearedStatus",
|
|
599
|
+
"verdict": "live",
|
|
600
|
+
"group": "platform",
|
|
601
|
+
"read": "partial",
|
|
602
|
+
"write": "partial",
|
|
603
|
+
"headline": "TenkeyBridge extension (QBO has none): POST /clearedstatus sets QuickBooks Desktop's cleared status (Cleared, NotCleared, Pending) on a check, deposit, bill payment check or journal entry, for the transaction's own bank side (TxnId alone) or for one line (LineId). GET /clearedstatus reads it back per split with one bounded QuickBooks read.",
|
|
604
|
+
"usage": "POST /v3/company/{companyId}/clearedstatus[?requestid=...] and GET /v3/company/{companyId}/clearedstatus?txnid=...&txntype=...",
|
|
605
|
+
"fields": [
|
|
606
|
+
{
|
|
607
|
+
"qbo": "TxnId",
|
|
608
|
+
"support": "full",
|
|
609
|
+
"note": "The Id of the transaction, as a read of the Purchase, Deposit, BillPayment or JournalEntry returned it."
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"qbo": "LineId",
|
|
613
|
+
"support": "full",
|
|
614
|
+
"note": "Optional. A Line.Id of that transaction: sets that one line's account side. The line's account must be a balance sheet account other than A/R and A/P (a bank, credit card or other current asset account); an income, expense or cost of goods line is 422 UNSUPPORTED_BY_DESKTOP. Without it, a Check, Deposit or BillPayment sets its own bank side and a JournalEntry sets its first line."
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"qbo": "ClearedStatus",
|
|
618
|
+
"support": "full",
|
|
619
|
+
"note": "Cleared, NotCleared or Pending (case sensitive). Reconciled is QuickBooks' own state and cannot be written."
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"qbo": "TxnType",
|
|
623
|
+
"support": "partial",
|
|
624
|
+
"note": "Optional on the write: Purchase, Deposit, BillPayment or JournalEntry. Send it with a requestid so a lost outcome can be reconciled with a read. Required on the read (and Transfer is allowed there)."
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"qbo": "Splits",
|
|
628
|
+
"support": "full",
|
|
629
|
+
"note": "In the read-back: one entry per bank or balance sheet posting of the transaction, with Role (Header, Line, From, To), LineId (the value to send back), ClearedStatus and Amount. SetByTxnId marks the split a request without a LineId would set."
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"unsupported": [
|
|
633
|
+
{
|
|
634
|
+
"case": "Transfer",
|
|
635
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
636
|
+
"note": "QuickBooks Desktop refuses a Transfer id for a cleared status change (probe, QB Enterprise 24), so neither side of a transfer can be set. It can be read back. Record the movement as a deposit, check or journal entry instead, or clear it in QuickBooks.",
|
|
637
|
+
"workaround": "Use a Deposit (line from the clearing account) or a JournalEntry, and set the line you need by LineId."
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"case": "Income, expense, cost of goods, A/R or A/P line",
|
|
641
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
642
|
+
"note": "QuickBooks only keeps a cleared status for lines on other balance sheet accounts. A TxnId alone on a JournalEntry whose first line is on such an account is refused the same way."
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"case": "Invoice, Bill, SalesReceipt and the other transaction types",
|
|
646
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
647
|
+
"note": "Only Purchase (check), Deposit, BillPayment (check) and JournalEntry are supported. A credit card Purchase or a credit card BillPayment was not probed."
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"case": "Cleared status on an ordinary read",
|
|
651
|
+
"error": "n/a",
|
|
652
|
+
"note": "Entity reads never carry a cleared status and never cost an extra QuickBooks read; QuickBooks' Ret objects do not hold one. Use GET /clearedstatus."
|
|
653
|
+
}
|
|
654
|
+
]
|
|
655
|
+
},
|
|
598
656
|
"CompanyCurrency": {
|
|
599
657
|
"entity": "CompanyCurrency",
|
|
600
658
|
"verdict": "live",
|
|
@@ -905,9 +963,24 @@ var CATALOG = {
|
|
|
905
963
|
"qbo": "ApplyTaxAfterDiscount",
|
|
906
964
|
"support": "partial",
|
|
907
965
|
"note": "Maps onto the discount line's own sales tax code, proven live on QuickBooks Enterprise 24: Tax is tax after the discount (true), Non is tax on the full amount (false). On write, true or false is never sent as a field; every discount line with no TaxCodeRef of its own is coded Tax or Non, and an explicit TAX or NON that contradicts the value is 400 (code 2010, element Line.DiscountLineDetail.TaxCodeRef). A custom tax code on a discount line wins. DiscountLineDetail.TaxCodeRef is written as that line's sales tax code. With no discount lines the value is accepted and does nothing. Read: present only when the form has discount lines and they are all Tax (true) or all Non (false); omitted when mixed. On a sparse update with no Line, a value equal to the current one is accepted; a different one is 422 UNSUPPORTED_BY_DESKTOP, so send the full Line array to change it. Any value that is not a boolean is 400 (code 2010)."
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"qbo": "operation=void",
|
|
969
|
+
"support": "partial",
|
|
970
|
+
"note": "TenkeyBridge extension: QBO cannot void a CreditMemo; QuickBooks Desktop can. POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType CreditMemo), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QuickBooks Enterprise 24 (2026-10-20). The re-read shows PrivateNote as `VOID: <memo>` (bare `VOID:` when there was none), TotalAmt, Balance and RemainingCredit at 0 and every line quantity and amount at 0, with the lines kept. A void does not reliably advance the SyncToken, so re-read the record instead of relying on it; voiding again is accepted. A credit memo that was applied to an invoice can be voided too: the credit is released, so the invoice's balance reopens by the credit that had been applied and its LinkedTxn drops the credit memo (the cash payment stays). The response is whatever Desktop returns on the re-read (nothing is fabricated)."
|
|
908
971
|
}
|
|
909
972
|
],
|
|
910
973
|
"unsupported": [
|
|
974
|
+
{
|
|
975
|
+
"case": "GET /{id}/pdf",
|
|
976
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
977
|
+
"note": "qbXML cannot render or return a PDF of a transaction, so the route answers 422. Render the PDF from the JSON record in your own application."
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"case": "POST /{id}/send (actually sending the email)",
|
|
981
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
982
|
+
"note": "The route is queue-only: it sets EmailStatus NeedToSend (Desktop IsToBeEmailed) through a sparse update and returns the record, so the form lands in QuickBooks' To be e-mailed queue. TenkeyBridge sends no mail; QuickBooks sends the form to the customer's email address. sendTo is ignored (X-TKB-Warning says so). Desktop refuses the queue (3180) when the company file has no company email."
|
|
983
|
+
},
|
|
911
984
|
{
|
|
912
985
|
"case": "Line.DiscountLineDetail without an ItemRef or a single matching DiscountAccountRef item (bare-percentage or amount-off discounts)",
|
|
913
986
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
@@ -1555,6 +1628,16 @@ var CATALOG = {
|
|
|
1555
1628
|
}
|
|
1556
1629
|
],
|
|
1557
1630
|
"unsupported": [
|
|
1631
|
+
{
|
|
1632
|
+
"case": "GET /{id}/pdf",
|
|
1633
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1634
|
+
"note": "qbXML cannot render or return a PDF of a transaction, so the route answers 422. Render the PDF from the JSON record in your own application."
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"case": "POST /{id}/send (actually sending the email)",
|
|
1638
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1639
|
+
"note": "The route is queue-only: it sets EmailStatus NeedToSend (Desktop IsToBeEmailed) through a sparse update and returns the record, so the form lands in QuickBooks' To be e-mailed queue. TenkeyBridge sends no mail; QuickBooks sends the form to the customer's email address. sendTo is ignored (X-TKB-Warning says so). Desktop refuses the queue (3180) when the company file has no company email."
|
|
1640
|
+
},
|
|
1558
1641
|
{
|
|
1559
1642
|
"case": "Line.DiscountLineDetail without an ItemRef or a single matching DiscountAccountRef item (bare-percentage or amount-off discounts)",
|
|
1560
1643
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
@@ -1630,7 +1713,7 @@ var CATALOG = {
|
|
|
1630
1713
|
"group": "purchasing",
|
|
1631
1714
|
"read": "full",
|
|
1632
1715
|
"write": "partial",
|
|
1633
|
-
"headline": "Quantity adjustments to inventory items
|
|
1716
|
+
"headline": "Quantity and value adjustments to inventory items: create (by difference, to an absolute quantity or value, or with your own value), read, update (header and lines) and delete",
|
|
1634
1717
|
"fields": [
|
|
1635
1718
|
{
|
|
1636
1719
|
"qbo": "AdjustAccountRef",
|
|
@@ -1654,7 +1737,7 @@ var CATALOG = {
|
|
|
1654
1737
|
{
|
|
1655
1738
|
"qbo": "Line",
|
|
1656
1739
|
"support": "partial",
|
|
1657
|
-
"note": "DetailType ItemAdjustmentLineDetail with ItemRef and QtyDiff. QtyDiff is a signed change in quantity on hand (nonzero, at most 5 decimal places) and maps to Desktop QuantityAdjustment/QuantityDifference
|
|
1740
|
+
"note": "DetailType ItemAdjustmentLineDetail with ItemRef and QtyDiff. QtyDiff is a signed change in quantity on hand (nonzero, at most 5 decimal places) and maps to Desktop QuantityAdjustment/QuantityDifference; quantity on hand changes by exactly that amount, verified live. The absolute forms are TenkeyBridge extensions inside ItemAdjustmentLineDetail (QBO only has the QtyDiff delta), create only: NewQty is the quantity on hand AFTER the adjustment (a number of at least 0, at most 5 decimal places; Desktop QuantityAdjustment/NewQuantity). NewValue is the item's TOTAL inventory value after the adjustment (not a unit cost; at most 2 decimal places; Desktop ValueAdjustment/NewValue). Send NewQty alone, NewValue alone (quantity unchanged, QtyDiff reads 0) or both; QtyDiff next to either is a 400 (2010) because Desktop silently ignores NewValue beside a quantity difference. A read never returns NewQty or NewValue, only the resulting QtyDiff and Amount. Proven live on QuickBooks Enterprise 24 (2026-10-20): NewQty 55 on a 50-unit item at average cost 18.00 reads QtyDiff 5, Amount 90.00; NewValue 123.45 on 55 units worth 990.00 reads Amount -866.55 and moves the average cost, and deleting the adjustment reverses it. The same item on two lines is refused (Desktop rejects it). Desktop's ValueDifference is Line.Amount, the value change of the line (the Ret line is flat QuantityDifference/ValueDifference). Without an Amount Desktop computes it as the quantity change times the item's average cost; Line.Amount sets it yourself (proven live 2026-10-21): QtyDiff with Amount, NewQty with Amount, or Amount alone (a value-only line, QtyDiff reads 0). Amount takes at most 2 decimals and cannot be combined with NewValue (both set the value; 400, 2010). A negative Amount is accepted only on a value-only line: next to a quantity decrease Desktop silently ignores it and prices the units at average cost, and next to an increase it refuses it (3210), so the gateway answers 400 (2010) up front. A positive Amount next to a quantity decrease is honored, and 0.00 next to a quantity is honored. Line.Description cannot be written (Desktop has no line memo). Update: Line is the WHOLE table, as in QBO. A line sent with its Id keeps that line (QtyDiff changes it), a line with no Id is added, and a line you leave out is deleted. Omit Line to leave every line alone; an empty array is refused (2020), and a repeated or unknown Id is refused (2010). Posting a read back whole works: an Amount on an existing line that equals the value the read returned is ignored. A different Amount is sent as ValueDifference, alone (the quantity is kept) or with a new QtyDiff. Desktop remembers whether a value was set explicitly: a QtyDiff-only update re-prices a computed value at average cost but keeps an explicit Amount. A value-only line (no quantity change) can be updated with a new Amount, or given a QtyDiff and an Amount; sent unchanged it is kept as it is."
|
|
1658
1741
|
},
|
|
1659
1742
|
{
|
|
1660
1743
|
"qbo": "CurrencyRef",
|
|
@@ -1674,9 +1757,14 @@ var CATALOG = {
|
|
|
1674
1757
|
],
|
|
1675
1758
|
"unsupported": [
|
|
1676
1759
|
{
|
|
1677
|
-
"case": "
|
|
1760
|
+
"case": "NewQty or NewValue on an update line",
|
|
1678
1761
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1679
|
-
"note": "
|
|
1762
|
+
"note": "Desktop's InventoryAdjustmentLineMod only has QuantityDifference and ValueDifference, so the absolute forms work on create only. To change an existing line send QtyDiff."
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"case": "QtyDiff together with NewQty or NewValue on the same line",
|
|
1766
|
+
"error": "2010",
|
|
1767
|
+
"note": "Refused up front: Desktop silently ignores NewValue next to a quantity difference, and NewQty contradicts it. Send QtyDiff alone, or NewQty and/or NewValue."
|
|
1680
1768
|
}
|
|
1681
1769
|
]
|
|
1682
1770
|
},
|
|
@@ -1826,6 +1914,16 @@ var CATALOG = {
|
|
|
1826
1914
|
}
|
|
1827
1915
|
],
|
|
1828
1916
|
"unsupported": [
|
|
1917
|
+
{
|
|
1918
|
+
"case": "GET /{id}/pdf",
|
|
1919
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1920
|
+
"note": "qbXML cannot render or return a PDF of a transaction, so the route answers 422. Render the PDF from the JSON record in your own application."
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
"case": "POST /{id}/send (actually sending the email)",
|
|
1924
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1925
|
+
"note": "The route is queue-only: it sets EmailStatus NeedToSend (Desktop IsToBeEmailed) through a sparse update and returns the record, so the form lands in QuickBooks' To be e-mailed queue. TenkeyBridge sends no mail; QuickBooks sends the form to the customer's email address. sendTo is ignored (X-TKB-Warning says so). Desktop refuses the queue (3180) when the company file has no company email."
|
|
1926
|
+
},
|
|
1829
1927
|
{
|
|
1830
1928
|
"case": "Line.DiscountLineDetail without an ItemRef or a single matching DiscountAccountRef item (bare-percentage or amount-off discounts)",
|
|
1831
1929
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
@@ -1874,7 +1972,7 @@ var CATALOG = {
|
|
|
1874
1972
|
{
|
|
1875
1973
|
"qbo": "DesktopItemType",
|
|
1876
1974
|
"support": "partial",
|
|
1877
|
-
"note": "TenkeyBridge extension (QBO has no such field). Read on every item: Service, NonInventory, Inventory, InventoryAssembly, FixedAsset, OtherCharge, Discount, Subtotal, Payment, SalesTax, SalesTaxGroup or Group. It is also the write selector for the families QBO has no Type for: Discount, OtherCharge, Subtotal, Payment and
|
|
1975
|
+
"note": "TenkeyBridge extension (QBO has no such field). Read on every item: Service, NonInventory, Inventory, InventoryAssembly, FixedAsset, OtherCharge, Discount, Subtotal, Payment, SalesTax, SalesTaxGroup or Group. It is also the write selector for the families QBO has no Type for: Discount, OtherCharge, Subtotal, Payment, InventoryAssembly and FixedAsset (send it with the matching Type: Service for the first four, Inventory for InventoryAssembly, NonInventory for FixedAsset). A value that disagrees with Type, or one that tries to change on update, is a 400 with code 2010. FixedAsset is written with Type NonInventory (the same pair a read returns); see the fixed asset rows below. SalesTax and SalesTaxGroup items cannot be written through the Item API (write a sales tax item through POST /taxrate and a sales tax group through POST /taxservice/taxcode)."
|
|
1878
1976
|
},
|
|
1879
1977
|
{
|
|
1880
1978
|
"qbo": "ItemGroupDetail",
|
|
@@ -1921,10 +2019,35 @@ var CATALOG = {
|
|
|
1921
2019
|
"support": "partial",
|
|
1922
2020
|
"note": "TenkeyBridge extension. Read only, on SalesTaxGroup items: the member tax items."
|
|
1923
2021
|
},
|
|
2022
|
+
{
|
|
2023
|
+
"qbo": "PurchaseDate",
|
|
2024
|
+
"support": "partial",
|
|
2025
|
+
"note": "TenkeyBridge extension. Fixed asset items only (any other item type is a 400, code 2010). The date the asset was bought (YYYY-MM-DD). Required on create (Desktop requires it); read back as sent."
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"qbo": "AcquiredAs",
|
|
2029
|
+
"support": "partial",
|
|
2030
|
+
"note": "TenkeyBridge extension. Fixed asset items only: New or Old (default New on create). Desktop requires it, so a create always sends it."
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"qbo": "VendorOrPayeeName",
|
|
2034
|
+
"support": "partial",
|
|
2035
|
+
"note": "TenkeyBridge extension. Fixed asset items only: who the asset was bought from (text, max 50 characters)."
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"qbo": "Location",
|
|
2039
|
+
"support": "partial",
|
|
2040
|
+
"note": "TenkeyBridge extension. Fixed asset items only: where the asset is kept (max 50 characters)."
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"qbo": "SerialNumber",
|
|
2044
|
+
"support": "partial",
|
|
2045
|
+
"note": "TenkeyBridge extension. Fixed asset items only (max 30 characters)."
|
|
2046
|
+
},
|
|
1924
2047
|
{
|
|
1925
2048
|
"qbo": "Description",
|
|
1926
2049
|
"support": "full",
|
|
1927
|
-
"note": "Desktop sales description: SalesOrPurchase/Desc, SalesAndPurchase/SalesDesc, or SalesDesc on Inventory."
|
|
2050
|
+
"note": "Desktop sales description: SalesOrPurchase/Desc, SalesAndPurchase/SalesDesc, or SalesDesc on Inventory. On a fixed asset item it is the asset description (AssetDesc, max 50 characters), read as the purchase description when the asset has none."
|
|
1928
2051
|
},
|
|
1929
2052
|
{
|
|
1930
2053
|
"qbo": "UnitPrice",
|
|
@@ -1964,12 +2087,12 @@ var CATALOG = {
|
|
|
1964
2087
|
{
|
|
1965
2088
|
"qbo": "AssetAccountRef",
|
|
1966
2089
|
"support": "full",
|
|
1967
|
-
"note": "Inventory
|
|
2090
|
+
"note": "Inventory and fixed asset items; required on create for both (a fixed asset item with no asset account is refused by Desktop, error 3180, so it is a 400 here with code 2020)."
|
|
1968
2091
|
},
|
|
1969
2092
|
{
|
|
1970
2093
|
"qbo": "PurchaseDesc",
|
|
1971
2094
|
"support": "full",
|
|
1972
|
-
"note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase). Purchase-side fields must be present at creation: Desktop cannot turn an existing sales-only item into a two-sided one, so adding them on update is refused with UNSUPPORTED_BY_DESKTOP."
|
|
2095
|
+
"note": "Fixed asset items: required on create (Description is used when it is omitted), max 50 characters. Inventory and two-sided Service/NonInventory (SalesAndPurchase). Purchase-side fields must be present at creation: Desktop cannot turn an existing sales-only item into a two-sided one, so adding them on update is refused with UNSUPPORTED_BY_DESKTOP."
|
|
1973
2096
|
},
|
|
1974
2097
|
{
|
|
1975
2098
|
"qbo": "PurchaseCost",
|
|
@@ -2020,9 +2143,9 @@ var CATALOG = {
|
|
|
2020
2143
|
"workaround": "Write a sales tax item through the TaxRate endpoint (POST /taxrate) and a sales tax group through POST /taxservice/taxcode."
|
|
2021
2144
|
},
|
|
2022
2145
|
{
|
|
2023
|
-
"case": "
|
|
2024
|
-
"error": "
|
|
2025
|
-
"note": "Fixed
|
|
2146
|
+
"case": "Fixed asset item fields beyond the listed extensions (PONumber, Notes, warranty date, asset number, cost basis, year-end depreciation, sales information)",
|
|
2147
|
+
"error": "UNMAPPED_FIELD",
|
|
2148
|
+
"note": "Fixed asset items write and read the fields listed on the DesktopItemType row. The other Desktop fixed asset fields are not mapped."
|
|
2026
2149
|
},
|
|
2027
2150
|
{
|
|
2028
2151
|
"case": "Category items, and turning a sales-only item into a two-sided one",
|
|
@@ -2499,7 +2622,12 @@ var CATALOG = {
|
|
|
2499
2622
|
{
|
|
2500
2623
|
"qbo": "Line",
|
|
2501
2624
|
"support": "partial",
|
|
2502
|
-
"note": "ItemBasedExpenseLineDetail only (PurchaseOrderLineAdd). AccountBasedExpenseLineDetail returns UNSUPPORTED_BY_DESKTOP. ReceivedQty maps from ReceivedQuantity on read (read-only). Updates carrying Line send the full line table (PurchaseOrderLineMod): a line with the Id a read returned keeps that Desktop line (Id = TxnLineID), a line without an Id is added, and any existing line omitted from the array is deleted \u2014 send the whole array. Fields you omit from a line that carries an Id are filled from the current record; changing Qty or UnitPrice without Amount recomputes Amount, and restating Amount alone drops the inherited Rate and Qty. An Id that is not a line of the PO is a 400; an Id listed twice is 2010; an empty Line array is refused. Per-line IsManuallyClosed is not exposed. Item group lines (PurchaseOrderLineGroupRet) read as their component item lines, in the group's place and in Desktop's order, each carrying the TenkeyBridge extension fields GroupLineId (the group's Id) and GroupItemRef; the
|
|
2625
|
+
"note": "ItemBasedExpenseLineDetail only (PurchaseOrderLineAdd). AccountBasedExpenseLineDetail returns UNSUPPORTED_BY_DESKTOP. ReceivedQty maps from ReceivedQuantity on read (read-only). Updates carrying Line send the full line table (PurchaseOrderLineMod): a line with the Id a read returned keeps that Desktop line (Id = TxnLineID), a line without an Id is added, and any existing line omitted from the array is deleted \u2014 send the whole array. Fields you omit from a line that carries an Id are filled from the current record; changing Qty or UnitPrice without Amount recomputes Amount, and restating Amount alone drops the inherited Rate and Qty. An Id that is not a line of the PO is a 400; an Id listed twice is 2010; an empty Line array is refused. Per-line IsManuallyClosed is not exposed. Item group lines (PurchaseOrderLineGroupRet) read as their component item lines, in the group's place and in Desktop's order, each carrying the TenkeyBridge extension fields GroupLineId (the group's Id), GroupItemRef and GroupQuantity; the component lines are read-only. Create: send {DetailType: GroupLineDetail, GroupLineDetail: {GroupItemRef, Quantity}} among the item lines (PurchaseOrderLineGroupAdd; GroupItemRef is required, Quantity optional). Update, with the whole Line array: send all of a group's component lines back to keep the group, none of them to delete it; sending only some is a 400 (2010). A component can be edited in place: change its Qty, UnitPrice, Amount, Description, ItemRef, ClassRef or CustomerRef in the whole array and send every component of the group (the gateway sends one nested PurchaseOrderLineMod per component inside the group's PurchaseOrderLineGroupMod; Desktop deletes any component left out of that list, so a partial list with an edit is a 400, 2010). The edit follows the plain item line rules: a Qty or UnitPrice change re-derives Amount, an Amount change keeps the quantity and derives the rate, an Amount that only repeats the read is ignored. Edits survive a later group quantity change (the component quantities follow the group quantity, 5 at group quantity 2 becomes 7.5 at 3). Changing a component's DetailType or GroupLineId, or combining a component edit with a change to the group's item or quantity in the same request, is a 400 (2010). To change the group itself send a GroupLineDetail line whose Id is the group's GroupLineId (GroupItemRef and Quantity you omit are filled from the current record; PurchaseOrderLineGroupMod); a GroupLineDetail line without an Id adds a new group. An Id cannot change a line between item and group (400, 2010). Verified live on QuickBooks Enterprise 24 (2026-09-30, group create and update 2026-10-20, component edits 2026-10-21): the Id/new/deleted-line table, qty recompute and OSR child order are accepted."
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
"qbo": "LinkedTxn",
|
|
2629
|
+
"support": "partial",
|
|
2630
|
+
"note": "Read-only, populated on read: the Bill(s) created from the purchase order, as {TxnId, TxnType: Bill}. Desktop-only link types (ItemReceipt, ...) are omitted. On a keyed GET, a query and every page of a paged query (live, 2026-10-21). Accepted and ignored on write, as in QBO. Linking a new Bill to a purchase order is not supported (see Bill.LinkedTxn)."
|
|
2503
2631
|
},
|
|
2504
2632
|
{
|
|
2505
2633
|
"qbo": "TotalAmt",
|
|
@@ -2805,16 +2933,22 @@ var CATALOG = {
|
|
|
2805
2933
|
"note": "Desktop's custom summary report (CustomSummaryReportQueryRq, rows by Class over OrdinaryIncome accounts): one row per class plus Unclassified and TOTAL. Takes dates or date_macro, accounting_method, summarize_column_by (Month, Week, Days, Quarter, Year), customer, item, class and transaction_type. The account filter is fixed to income, so account, account_type, vendor and the modified-date filter fault.",
|
|
2806
2934
|
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2807
2935
|
},
|
|
2936
|
+
{
|
|
2937
|
+
"qbo": "TransactionListWithSplits",
|
|
2938
|
+
"support": "partial",
|
|
2939
|
+
"note": "Desktop's custom transaction detail report (CustomDetailReportQueryRq, rows by Account): every transaction line with a Split column, grouped under each account it touches. Takes dates or date_macro, accounting_method, customer, vendor, item, class, account or account_type, transaction_type, start_moddate/end_moddate and columns (default columns: date, type, number, name, memo, account, split, amount). No column split. Each filter was proven against QuickBooks Enterprise 24 (2026-10-20). Desktop groups the rows by account, so a transaction with two splits appears under both accounts.",
|
|
2940
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2941
|
+
},
|
|
2808
2942
|
{
|
|
2809
2943
|
"qbo": "BudgetOverview / BudgetVsActuals",
|
|
2810
2944
|
"support": "partial",
|
|
2811
|
-
"note": "BudgetSummaryReportQueryRq ProfitAndLossBudgetOverview / ProfitAndLossBudgetVsActual, one column group per month plus a period total. Desktop scopes a budget report by fiscal year, so these take fiscal_year (four digits, default: the current year) instead of dates, and no filters or column split; column titles are qualified with their month (for example 'Jan 26 - Budget'). Profit and loss budgets only; balance sheet budgets stay on the Budget entity. Read-only, like QBO.",
|
|
2945
|
+
"note": "BudgetSummaryReportQueryRq ProfitAndLossBudgetOverview / ProfitAndLossBudgetVsActual, one column group per month plus a period total. Desktop scopes a budget report by fiscal year, so these take fiscal_year (four digits, default: the current year) instead of dates, plus an optional class filter (one or more class Ids; sent as BudgetCriterion AccountsAndClasses so the budget side follows the filter, live-proven on a class budget), and no other filters or column split; column titles are qualified with their month (for example 'Jan 26 - Budget'). Profit and loss budgets only; balance sheet budgets stay on the Budget entity. A budget set up only by class (or by customer) reads as zeros without the class filter: the unfiltered read asks Desktop for the account budget, and no customer filter is offered (qbXML cannot create a customer budget, and BudgetCriterion AccountsAndCustomers returned nothing beyond the account budget on the test file). Read-only, like QBO.",
|
|
2812
2946
|
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2813
2947
|
},
|
|
2814
2948
|
{
|
|
2815
2949
|
"qbo": "Desktop extension reports",
|
|
2816
2950
|
"support": "full",
|
|
2817
|
-
"note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport, and since Reports wave 4 TxnDetailByAccount, UnbilledCostsByJob, AuditTrail, 1099Detail, SalesByRepDetail, PurchaseByItemDetail, OpenPOsByJob, EstimatesByJob, JobProgressInvoicesVsEstimates, OpenSalesOrderByCustomer, OpenSalesOrderByItem, PendingSales, IncomeTaxDetail, MissingChecks, SalesTaxRevenueSummary, IncomeTaxSummary, BalanceSheetSummary, InventoryStockStatusByVendor, and the Job and Time reports JobProfitabilitySummary, JobEstimatesVsActualsSummary, ItemProfitability, ItemEstimatesVsActuals, JobProfitabilityDetail, JobEstimatesVsActualsDetail, TimeByJobSummary, TimeByJobDetail, TimeByItem, TimeByName. Filters are enabled only where they were proven live on QuickBooks Enterprise 24 (2026-10-20): customer/vendor, item, class, account type, transaction type and modified date on the detail reports (not the account filter on UnbilledCostsByJob and PendingSales, which Desktop fails with an internal error), the same minus modified date on the summaries, all but vendor on the four Job summaries, customer, item and class on the Time reports; the two Job detail reports require a customer or job Id and take no other filter; MissingChecks requires account Ids (Desktop refuses a bare query and an account type, as it does ReportBasis) and takes transaction type, class, modified date and columns. 1099Detail takes no filter at all (an entity filter crashed QuickBooks, so the gateway refuses every filter on it before it reaches Desktop). The Time reports take no columns (Desktop refuses Duration). Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
|
|
2951
|
+
"note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport, and since Reports wave 4 TxnDetailByAccount, UnbilledCostsByJob, AuditTrail, 1099Detail, SalesByRepDetail, PurchaseByItemDetail, OpenPOsByJob, EstimatesByJob, JobProgressInvoicesVsEstimates, OpenSalesOrderByCustomer, OpenSalesOrderByItem, PendingSales, IncomeTaxDetail, MissingChecks, SalesTaxRevenueSummary, IncomeTaxSummary, BalanceSheetSummary, InventoryStockStatusByVendor, and the Job and Time reports JobProfitabilitySummary, JobEstimatesVsActualsSummary, ItemProfitability, ItemEstimatesVsActuals, JobProfitabilityDetail, JobEstimatesVsActualsDetail, TimeByJobSummary, TimeByJobDetail, TimeByItem, TimeByName, and since Reports wave 5 PhysicalInventoryWorksheet (a bare snapshot: Desktop refuses every period, filter, basis and column option on it, so the gateway refuses them too) and the Advanced Inventory reports InventoryValuationSummaryBySite, LotNumberInStockBySite and SerialNumberInStockBySite (sent bare; a company file without Advanced Inventory answers 3250, which becomes a 422 REPORT_FEATURE_UNAVAILABLE naming the feature; not live-proven past that gate, and unavailable in the sandbox). Filters are enabled only where they were proven live on QuickBooks Enterprise 24 (2026-10-20): customer/vendor, item, class, account type, transaction type and modified date on the detail reports (not the account filter on UnbilledCostsByJob and PendingSales, which Desktop fails with an internal error), the same minus modified date on the summaries, all but vendor on the four Job summaries, customer, item and class on the Time reports; the two Job detail reports require a customer or job Id and take no other filter; MissingChecks requires account Ids (Desktop refuses a bare query and an account type, as it does ReportBasis) and takes transaction type, class, modified date and columns. 1099Detail takes no filter at all (an entity filter crashed QuickBooks, so the gateway refuses every filter on it before it reaches Desktop). The Time reports take no columns (Desktop refuses Duration). Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
|
|
2818
2952
|
},
|
|
2819
2953
|
{
|
|
2820
2954
|
"qbo": "start_date / end_date / date_macro",
|
|
@@ -2895,11 +3029,6 @@ var CATALOG = {
|
|
|
2895
3029
|
"error": "REPORT_UNKNOWN",
|
|
2896
3030
|
"note": "Desktop has no departments. Use ClassSales."
|
|
2897
3031
|
},
|
|
2898
|
-
{
|
|
2899
|
-
"case": "TransactionListWithSplits",
|
|
2900
|
-
"error": "REPORT_UNKNOWN",
|
|
2901
|
-
"note": "No Desktop SDK report of that name. Use JournalReport."
|
|
2902
|
-
},
|
|
2903
3032
|
{
|
|
2904
3033
|
"case": "other QBO report names",
|
|
2905
3034
|
"error": "REPORT_UNKNOWN",
|
|
@@ -3040,6 +3169,16 @@ var CATALOG = {
|
|
|
3040
3169
|
}
|
|
3041
3170
|
],
|
|
3042
3171
|
"unsupported": [
|
|
3172
|
+
{
|
|
3173
|
+
"case": "GET /{id}/pdf",
|
|
3174
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3175
|
+
"note": "qbXML cannot render or return a PDF of a transaction, so the route answers 422. Render the PDF from the JSON record in your own application."
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"case": "POST /{id}/send (actually sending the email)",
|
|
3179
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3180
|
+
"note": "The route is queue-only: it sets EmailStatus NeedToSend (Desktop IsToBeEmailed) through a sparse update and returns the record, so the form lands in QuickBooks' To be e-mailed queue. TenkeyBridge sends no mail; QuickBooks sends the form to the customer's email address. sendTo is ignored (X-TKB-Warning says so). Desktop refuses the queue (3180) when the company file has no company email."
|
|
3181
|
+
},
|
|
3043
3182
|
{
|
|
3044
3183
|
"case": "ApplyTaxAfterDiscount changed on a sparse update that carries no Line",
|
|
3045
3184
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
@@ -3118,7 +3257,8 @@ var CATALOG = {
|
|
|
3118
3257
|
{
|
|
3119
3258
|
"case": "Create or update",
|
|
3120
3259
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3121
|
-
"note": "TaxAgency is a read-only projection of tax
|
|
3260
|
+
"note": "TaxAgency is a read-only projection of the Vendors that a sales tax item names as its tax agency. Desktop has no tax agency record of its own (live probe 2026-10-20: a VendorAdd flagged IsSalesTaxAgency is accepted but nothing reads it back, and the vendor does not become an agency). A vendor becomes a tax agency when a tax rate points at it.",
|
|
3261
|
+
"workaround": "Create the vendor with POST /vendor, then create a tax rate that names it (POST /taxrate with AgencyRef). It then appears in /taxagency."
|
|
3122
3262
|
}
|
|
3123
3263
|
]
|
|
3124
3264
|
},
|
|
@@ -3957,7 +4097,7 @@ function registerTools(server, client) {
|
|
|
3957
4097
|
server.registerTool(
|
|
3958
4098
|
"run_report",
|
|
3959
4099
|
{
|
|
3960
|
-
description: "Run a QuickBooks Desktop report and get QBO-style report JSON (Header, Columns, Rows). Report names are QBO names such as ProfitAndLoss, BalanceSheet or CashFlow, plus Desktop extension reports. Params use QBO names, e.g. start_date, end_date, date_macro, accounting_method, summarize_column_by, customer, vendor, item, class, account, account_type, transaction_type, columns, report_date, start_moddate, end_moddate. BudgetOverview and BudgetVsActuals take fiscal_year instead of dates; MissingChecks requires account, and JobProfitabilityDetail and JobEstimatesVsActualsDetail require customer. ClassSales gives income by class. Read compat://entity/reports for the available reports and which params each takes.",
|
|
4100
|
+
description: "Run a QuickBooks Desktop report and get QBO-style report JSON (Header, Columns, Rows). Report names are QBO names such as ProfitAndLoss, BalanceSheet or CashFlow, plus Desktop extension reports. Params use QBO names, e.g. start_date, end_date, date_macro, accounting_method, summarize_column_by, customer, vendor, item, class, account, account_type, transaction_type, columns, report_date, start_moddate, end_moddate. BudgetOverview and BudgetVsActuals take fiscal_year instead of dates; MissingChecks requires account, and JobProfitabilityDetail and JobEstimatesVsActualsDetail require customer. ClassSales gives income by class; TransactionListWithSplits lists every split line. Read compat://entity/reports for the available reports and which params each takes.",
|
|
3961
4101
|
inputSchema: {
|
|
3962
4102
|
report: import_zod.z.string().describe('Report name, e.g. "ProfitAndLoss" (case-insensitive).'),
|
|
3963
4103
|
params: import_zod.z.record(import_zod.z.string()).optional().describe('Query params, e.g. { "date_macro": "Last Month" }.')
|
|
@@ -4083,10 +4223,53 @@ function registerTools(server, client) {
|
|
|
4083
4223
|
}
|
|
4084
4224
|
}
|
|
4085
4225
|
);
|
|
4226
|
+
const CLEARED_NEEDS = "This TenkeyBridge client has no cleared status methods; upgrade @tenkeybridge/client to 0.8.0.";
|
|
4227
|
+
server.registerTool(
|
|
4228
|
+
"set_cleared_status",
|
|
4229
|
+
{
|
|
4230
|
+
description: "Set QuickBooks Desktop's cleared status (Cleared, NotCleared, Pending) on an existing Purchase (check), Deposit, BillPayment (check) or JournalEntry. A TenkeyBridge extension (QBO has no equivalent). With only the transaction id it sets the transaction's own bank/card side (a journal entry's first line); with line_id it sets that one line's account side, which must be a bank or other balance sheet account other than A/R and A/P (an expense or income line is refused). A Transfer cannot be cleared through the API. Setting a status is idempotent, so retrying is safe; pass request_id (and txn_type) for replay protection. Use get_cleared_status to confirm what stuck.",
|
|
4231
|
+
inputSchema: {
|
|
4232
|
+
txn_id: import_zod.z.string().describe("Id of the transaction, as returned by get/query."),
|
|
4233
|
+
cleared_status: import_zod.z.enum(["Cleared", "NotCleared", "Pending"]),
|
|
4234
|
+
line_id: import_zod.z.string().optional().describe("Line.Id of the line whose account side to set; omit to set the transaction's own bank side."),
|
|
4235
|
+
txn_type: import_zod.z.enum(["Purchase", "Deposit", "BillPayment", "JournalEntry"]).optional().describe("Entity of the transaction; lets a lost outcome be reconciled with a read."),
|
|
4236
|
+
request_id: import_zod.z.string().optional().describe("Idempotency key (1-50 printable ASCII characters).")
|
|
4237
|
+
}
|
|
4238
|
+
},
|
|
4239
|
+
async ({ txn_id, cleared_status, line_id, txn_type, request_id }) => {
|
|
4240
|
+
if (!client.setClearedStatus) return fail(CLEARED_NEEDS);
|
|
4241
|
+
try {
|
|
4242
|
+
return ok(await client.setClearedStatus(
|
|
4243
|
+
{ TxnId: txn_id, ClearedStatus: cleared_status, ...line_id !== void 0 ? { LineId: line_id } : {}, ...txn_type !== void 0 ? { TxnType: txn_type } : {} },
|
|
4244
|
+
request_id !== void 0 ? { requestId: request_id } : {}
|
|
4245
|
+
));
|
|
4246
|
+
} catch (err) {
|
|
4247
|
+
return failure(err);
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
);
|
|
4251
|
+
server.registerTool(
|
|
4252
|
+
"get_cleared_status",
|
|
4253
|
+
{
|
|
4254
|
+
description: "Read the cleared status of each bank / balance sheet split of one transaction (Purchase, Deposit, BillPayment, JournalEntry, or Transfer). Costs one extra bounded QuickBooks read (the transaction's own accounts on its own date). Each split has Role, LineId (to send to set_cleared_status) and ClearedStatus; SetByTxnId marks the split a set without line_id would change. Other values QuickBooks reports (such as a reconciled state) are passed through as it spells them.",
|
|
4255
|
+
inputSchema: {
|
|
4256
|
+
txn_id: import_zod.z.string(),
|
|
4257
|
+
txn_type: import_zod.z.enum(["Purchase", "Deposit", "BillPayment", "JournalEntry", "Transfer"])
|
|
4258
|
+
}
|
|
4259
|
+
},
|
|
4260
|
+
async ({ txn_id, txn_type }) => {
|
|
4261
|
+
if (!client.getClearedStatus) return fail(CLEARED_NEEDS);
|
|
4262
|
+
try {
|
|
4263
|
+
return ok(await client.getClearedStatus({ txnId: txn_id, txnType: txn_type }));
|
|
4264
|
+
} catch (err) {
|
|
4265
|
+
return failure(err);
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4268
|
+
);
|
|
4086
4269
|
}
|
|
4087
4270
|
|
|
4088
4271
|
// src/version.ts
|
|
4089
|
-
var PKG_VERSION = "0.
|
|
4272
|
+
var PKG_VERSION = "0.8.0";
|
|
4090
4273
|
|
|
4091
4274
|
// src/server.ts
|
|
4092
4275
|
var SERVER_NAME = "tenkeybridge";
|