jaz-clio 5.35.0 → 5.35.1

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill whenever you call, debug, or review code that touches the Jaz
6
6
  REST API. Covers field names, response shapes, 158 production gotchas, error
@@ -387,7 +387,7 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
387
387
 
388
388
  ### Bulk Upserts (transactions)
389
389
 
390
- 118. **8 bulk-upsert endpoints for transactions** — `POST /api/v1/{invoices,bills,customer-credit-notes,supplier-credit-notes,journals,fixed-assets}/bulk-upsert` plus line-item variants for invoices and bills (`/invoices/line-items/bulk-upsert`, `/bills/line-items/bulk-upsert`). Max **500 rows per call**. All async — return `{data: {jobId, subscriptionFBPath, status, totalRecords}}`. Poll `search_background_jobs` with `filter: {resourceId: {eq: jobId}}` until terminal status. **Natural keys**: invoices = `invoiceReference`, bills = `billReference`, credit notes = `creditNoteReference`, **journals = `journalReference` (NOT `reference` — asymmetric vs other entities)**, fixed assets = `reference`. **`currencyCode` is REQUIRED** on every transaction row (invoices, bills, CCN, SCN, journals) — missing it returns errorCode `IMPORT_CURRENCY_REQUIRED`. **Journals legs use `journalEntries[]`** (NOT `entries[]` — different from `journals create` which uses entries). Provide `resourceId` (UUID) to update by ID; otherwise the natural key drives upsert. `rowIndex` is optional caller-supplied for error reporting.
390
+ 118. **8 bulk-upsert endpoints for transactions** — `POST /api/v1/{invoices,bills,customer-credit-notes,supplier-credit-notes,journals,fixed-assets}/bulk-upsert` plus line-item variants for invoices and bills (`/invoices/line-items/bulk-upsert`, `/bills/line-items/bulk-upsert`). Max **500 rows per call**. All async — return `{data: {jobId, subscriptionFBPath, status, totalRecords}}`. Poll `search_background_jobs` with `filter: {resourceId: {eq: jobId}}` until terminal status. **Natural keys**: invoices = `invoiceReference`, bills = `billReference`, credit notes = `creditNoteReference`, **journals = `journalReference` (NOT `reference` — asymmetric vs other entities)**, fixed assets = `reference`. **`currencyCode` is REQUIRED** on every transaction row (invoices, bills, CCN, SCN) — missing it returns errorCode `IMPORT_CURRENCY_REQUIRED`. **Journals are the exception**: the bulk journal row has no currency field and any `currencyCode` sent is discarded (multi-currency rides per-leg `transactionCurrency`). **Journals legs use `journalEntries[]`** (NOT `entries[]` — different from `journals create` which uses entries), and **a journal leg is `organizationAccountResourceId` + exactly one of `debitAmount`/`creditAmount`** — NOT the `accountResourceId`+`amount`+`type` shape `journals create` takes, and omit the unused side rather than sending 0. Provide `resourceId` (UUID) to update by ID; otherwise the natural key drives upsert (journals upsert by `journalReference` only). `rowIndex` is optional caller-supplied for error reporting — on journals it sits on the leg, not the row.
391
391
 
392
392
  119. **PARTIAL_SUCCESS handling** — When `search_background_jobs` returns `PARTIAL_SUCCESS` for a bulk-upsert job, the per-row failures are in `data[0].errorDetails` on the SAME response (an array of per-row error objects). Top-level counts (`processedCount`, `failedCount`, `totalRecords`) tell you *how many* failed; `errorDetails` tells you *which rows and why*. Don't pretend the operation succeeded — surface the failed rows to the user. The rule of thumb: poll with `search_background_jobs` filtered by `resourceId: { eq: jobId }`, then read `data[0].errorDetails` for terminal states.
393
393
 
@@ -223,8 +223,10 @@ DIFFERENT shape from single create — easier to confuse.
223
223
  |------------------|-------------------|-------|
224
224
  | `reference` | `journalReference` | Natural key — bulk uses `journalReference` (asymmetric vs other entities which use `<entity>Reference`) |
225
225
  | `entries` | `journalEntries` | Array of legs — same name as single create |
226
- | `amount` + `type: "DEBIT"` | `debitAmount` / `creditAmount` (separate fields per leg) | Bulk uses split numeric fields, NOT amount+type. Set unused side to 0. |
227
- | `currency: { ... }` (object) | `currencyCode: "SGD"` (flat string) | Bulk requires the flat `currencyCode` string per rowREQUIRED. Missing → `IMPORT_CURRENCY_REQUIRED` errorCode. |
226
+ | `accountResourceId` (leg) | `organizationAccountResourceId` | **The leg account field is NOT `accountResourceId`.** Single create uses `accountResourceId`; bulk uses `organizationAccountResourceId`. Sending the single-create name is silently dropped and the row fails `INVALID_ACCOUNT_TO_IMPORT_JOURNAL` with `columnValue: null`. |
227
+ | `amount` + `type: "DEBIT"` | `debitAmount` / `creditAmount` (separate fields per leg) | Split numeric fields, NOT amount+type. **Send exactly one side and OMIT the other** do not set the unused side to 0. Both present → `BOTH_CREDIT_AND_DEBIT_ON_A_JOURNAL_ENTRY_LINE_IS_NOT_ALLOWED`; both zero or `<= 0` → rejected too. Neither present → `INVALID_CREDIT_AND_DEBIT_AMOUNT`. |
228
+ | `rowIndex` on the row | `rowIndex` on the **leg** | 1-based, caller-supplied, echoed back in per-row `errorDetails`. It is a leg field for journals, not a row field. |
229
+ | `currency: { ... }` (object) | *(no currency field)* | **Journals are the exception to the `currencyCode` rule** — the bulk journal row has no currency field at all and any `currencyCode` sent is discarded. Per-leg `transactionCurrency` carries multi-currency instead. |
228
230
 
229
231
  ---
230
232
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-cli
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill when running Clio CLI commands, building shell scripts with
6
6
  Clio, debugging auth issues, understanding --json output, paginating results,
@@ -79,7 +79,7 @@ Complete reference for all 66 command groups. Organized by domain.
79
79
  | `delete <id>` | |
80
80
  | `transfer-trial-balance` (alias: `ttb`) | `--from-date`, `--to-date`, `--target-date` |
81
81
  | `draft list` | `--max-rows N`, `--ids`, `--json` |
82
- | `bulk-upsert` | `--input <file>`, `--json` — ⚠️ Natural key is `journalReference` (NOT `reference`); legs use `journalEntries[]` (NOT `entries[]`); each leg has `debitAmount`+`creditAmount` (NOT `amount`+`type`). `currencyCode` REQUIRED. Async → jobId |
82
+ | `bulk-upsert` | `--input <file>`, `--json` — ⚠️ Natural key is `journalReference` (NOT `reference`); legs use `journalEntries[]` (NOT `entries[]`); each leg is `organizationAccountResourceId` (NOT `accountResourceId`) + exactly one of `debitAmount`/`creditAmount` (NOT `amount`+`type`), omitting the unused side. No `currencyCode` on journal rows. Async → jobId |
83
83
 
84
84
  ### `clio cash-in` — Direct cash-in entries
85
85
  | Subcommand | Key flags |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill when migrating accounting data into Jaz — importing from Xero,
6
6
  QuickBooks, Sage, MYOB, or Excel exports. Covers the full conversion pipeline:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-kit
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill when an accountant, bookkeeper, or owner is running real books
6
6
  in Jaz across one or more organizations from the terminal — setting up a
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-pseudo-sql
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill when answering ad-hoc data questions that aren't covered by
6
6
  download_export (canonical reports — anomaly, audit, aging, P&L, BS, GL,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill for recurring accounting workflows — month/quarter/year-end
6
6
  close, bank reconciliation, GST/VAT filing, payment runs, credit control,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-recipes
3
- version: 5.35.0
3
+ version: 5.35.1
4
4
  description: >-
5
5
  Use this skill when modeling complex multi-step accounting transactions —
6
6
  anything that spans multiple periods, involves changing amounts, or requires
package/cli.mjs CHANGED
@@ -862,7 +862,7 @@ Whole-batch 422 (validate before submit): (1) each contact must have at least on
862
862
 
863
863
  Natural key: invoiceReference (rows sharing one within a batch are MERGED \u2014 last wins). resourceId per row \u2192 update by UUID; omit \u2192 upsert by invoiceReference.
864
864
 
865
- ASYNC: returns jobId \u2192 poll search_background_jobs(filter:{resourceId:{eq:jobId}}); PARTIAL_SUCCESS \u2192 data[0].errorDetails. Dates ISO 8601 (YYYY-MM-DD); dateFormat field removed.`,params:{invoices:{type:"array",description:"Array of invoices to create or update (max 500). Each row needs at least: invoiceReference, contactResourceId, valueDate, totalAmount, invoiceAccountResourceId.",items:{type:"object",properties:{rowIndex:{type:"string",description:"Optional caller-supplied row index for error reporting"},resourceId:{type:"string",description:"Invoice resourceId (UUID) \u2014 provide to update by ID"},invoiceReference:{type:"string",description:"Natural key (e.g., INV-2025-001) \u2014 required"},contactResourceId:{type:"string",description:"Customer contact UUID \u2014 required"},valueDate:{type:"string",description:"Invoice date YYYY-MM-DD \u2014 required"},dueDate:{type:"string",description:"Due date YYYY-MM-DD"},totalAmount:{type:"number",description:"Total amount (BigDecimal)"},currencyCode:{type:"string",description:"Currency (e.g., SGD)"},invoiceAccountResourceId:{type:"string",description:"Revenue account UUID"},itemDescription:{type:"string",description:"Single-line item description"},internalNotes:{type:"string",description:"Internal notes"},tags:{type:"array",items:{type:"string"},description:"Tag resourceIds"}}}}},required:["invoices"],group:"invoices",readOnly:!1,searchHint:"bulk create update invoices upsert import migrate",execute:async(t,e)=>{Ln(e.invoices,"invoices");let r=e.invoices;return dc(r,["valueDate","dueDate"]),PP(t.client,r)}},{name:"bulk_upsert_invoice_line_items",description:`Nested line items per invoice (max 500 invoices per call). Each row carries lineItems[] under its parent invoice (scoped by invoiceReference). ${Jl} Dates are ISO 8601 only.`,params:{invoices:{type:"array",description:"Array of invoices with line items (max 500). Each invoice row has lineItems[].",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string",description:"Invoice resourceId \u2014 provide to update by ID"},invoiceReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Customer UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string",description:"YYYY-MM-DD"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",description:"Line items belonging to this invoice",items:{type:"object",properties:{itemDescription:{type:"string",description:"Line description \u2014 required"},quantity:{type:"number"},unit:{type:"string",description:"Unit of measure (pcs, kg, etc.)"},unitPrice:{type:"number"},accountResourceId:{type:"string",description:"Revenue account UUID"},taxProfileResourceId:{type:"string"}}}}}}}},required:["invoices"],group:"invoices",readOnly:!1,searchHint:"bulk invoices line items multi-line upsert import",execute:async(t,e)=>{Ln(e.invoices,"invoices");let r=e.invoices;return dc(r,["valueDate","dueDate"]),UP(t.client,r)}},{name:"bulk_upsert_bills",description:`Max 500 bills per call. FLAT shape: ONE line per bill via \`itemDescription\` + \`totalAmount\` + \`billAccountResourceId\` at row level. For multi-line bills use \`bulk_upsert_bill_line_items\` instead \u2014 that variant takes nested \`lineItems[]\`. Natural key: \`billReference\` (rows sharing one within a batch are MERGED \u2014 last wins). ${Jl} Dates are ISO 8601 only \u2014 dateFormat field was removed.`,params:{bills:{type:"array",description:"Array of bills to create or update (max 500). Each row needs at least: billReference, contactResourceId, valueDate, totalAmount, billAccountResourceId.",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},billReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string"},totalAmount:{type:"number"},currencyCode:{type:"string"},billAccountResourceId:{type:"string",description:"Expense account UUID"},itemDescription:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}}}}}},required:["bills"],group:"bills",readOnly:!1,searchHint:"bulk create update bills upsert import migrate",execute:async(t,e)=>{Ln(e.bills,"bills");let r=e.bills;return dc(r,["valueDate","dueDate"]),OL(t.client,r)}},{name:"bulk_upsert_bill_line_items",description:`Nested line items per bill (max 500 bills per call). Each row carries lineItems[] under its parent bill (scoped by billReference). ${Jl}`,params:{bills:{type:"array",description:"Array of bills with line items (max 500). Each bill row has lineItems[].",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},billReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unit:{type:"string"},unitPrice:{type:"number"},accountResourceId:{type:"string",description:"Expense account UUID"},taxProfileResourceId:{type:"string"}}}}}}}},required:["bills"],group:"bills",readOnly:!1,searchHint:"bulk bills line items multi-line upsert import",execute:async(t,e)=>{Ln(e.bills,"bills");let r=e.bills;return dc(r,["valueDate","dueDate"]),FL(t.client,r)}},{name:"bulk_upsert_customer_credit_notes",description:`Max 500 customer credit notes per call. Natural key: creditNoteReference. ${Jl} Dates are ISO 8601 only.`,params:{customerCreditNotes:{type:"array",description:"Array of customer credit notes (max 500).",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},creditNoteReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Customer UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unitPrice:{type:"number"},accountResourceId:{type:"string"},taxProfileResourceId:{type:"string"}}}}}}}},required:["customerCreditNotes"],group:"customer_credit_notes",readOnly:!1,searchHint:"bulk customer credit notes refund upsert import",execute:async(t,e)=>{Ln(e.customerCreditNotes,"customerCreditNotes",500,"customer credit notes");let r=e.customerCreditNotes;return dc(r,["valueDate"]),O2(t.client,r)}},{name:"bulk_upsert_supplier_credit_notes",description:`Max 500 supplier credit notes per call. Natural key: creditNoteReference. ${Jl} Dates are ISO 8601 only.`,params:{supplierCreditNotes:{type:"array",description:"Array of supplier credit notes (max 500).",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},creditNoteReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unitPrice:{type:"number"},accountResourceId:{type:"string"},taxProfileResourceId:{type:"string"}}}}}}}},required:["supplierCreditNotes"],group:"supplier_credit_notes",readOnly:!1,searchHint:"bulk supplier credit notes refund upsert import",execute:async(t,e)=>{Ln(e.supplierCreditNotes,"supplierCreditNotes",500,"supplier credit notes");let r=e.supplierCreditNotes;return dc(r,["valueDate"]),$2(t.client,r)}},{name:"bulk_upsert_journals",description:`Max 500 manual journals per call. NATURAL KEY: \`journalReference\` (NOT \`reference\` \u2014 every other bulk-upsert uses entityReference, this one is asymmetric). LEGS field: \`journalEntries[]\` (NOT \`entries[]\` \u2014 different from \`clio journals create\` which uses entries). Each leg has \`accountResourceId\` + \`debitAmount\` + \`creditAmount\` (debit + credit must balance per row). ${Jl} Dates are ISO 8601 (YYYY-MM-DD) only \u2014 dateFormat field was removed.`,params:{journals:{type:"array",description:"Array of journals to create or update (max 500). Each row has entries[] (debit/credit legs).",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},journalReference:{type:"string",description:"Natural key \u2014 required (NOTE: field is `journalReference`, not `reference`)"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},journalEntries:{type:"array",description:"Journal legs (debit + credit amounts must balance) \u2014 field is `journalEntries`, NOT `entries`",items:{type:"object",properties:{accountResourceId:{type:"string",description:"Required"},description:{type:"string"},debitAmount:{type:"number"},creditAmount:{type:"number"},contactResourceId:{type:"string"},taxProfileResourceId:{type:"string"}}}}}}}},required:["journals"],group:"journals",readOnly:!1,searchHint:"bulk manual journals upsert import migration",execute:async(t,e)=>{Ln(e.journals,"journals");let r=e.journals;return dc(r,["valueDate"]),o2(t.client,r)}},{name:"bulk_upsert_fixed_assets",description:`Bulk create/update fixed assets (max 500). Natural key: reference.
865
+ ASYNC: returns jobId \u2192 poll search_background_jobs(filter:{resourceId:{eq:jobId}}); PARTIAL_SUCCESS \u2192 data[0].errorDetails. Dates ISO 8601 (YYYY-MM-DD); dateFormat field removed.`,params:{invoices:{type:"array",description:"Array of invoices to create or update (max 500). Each row needs at least: invoiceReference, contactResourceId, valueDate, totalAmount, invoiceAccountResourceId.",items:{type:"object",properties:{rowIndex:{type:"string",description:"Optional caller-supplied row index for error reporting"},resourceId:{type:"string",description:"Invoice resourceId (UUID) \u2014 provide to update by ID"},invoiceReference:{type:"string",description:"Natural key (e.g., INV-2025-001) \u2014 required"},contactResourceId:{type:"string",description:"Customer contact UUID \u2014 required"},valueDate:{type:"string",description:"Invoice date YYYY-MM-DD \u2014 required"},dueDate:{type:"string",description:"Due date YYYY-MM-DD"},totalAmount:{type:"number",description:"Total amount (BigDecimal)"},currencyCode:{type:"string",description:"Currency (e.g., SGD)"},invoiceAccountResourceId:{type:"string",description:"Revenue account UUID"},itemDescription:{type:"string",description:"Single-line item description"},internalNotes:{type:"string",description:"Internal notes"},tags:{type:"array",items:{type:"string"},description:"Tag resourceIds"}}}}},required:["invoices"],group:"invoices",readOnly:!1,searchHint:"bulk create update invoices upsert import migrate",execute:async(t,e)=>{Ln(e.invoices,"invoices");let r=e.invoices;return dc(r,["valueDate","dueDate"]),PP(t.client,r)}},{name:"bulk_upsert_invoice_line_items",description:`Nested line items per invoice (max 500 invoices per call). Each row carries lineItems[] under its parent invoice (scoped by invoiceReference). ${Jl} Dates are ISO 8601 only.`,params:{invoices:{type:"array",description:"Array of invoices with line items (max 500). Each invoice row has lineItems[].",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string",description:"Invoice resourceId \u2014 provide to update by ID"},invoiceReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Customer UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string",description:"YYYY-MM-DD"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",description:"Line items belonging to this invoice",items:{type:"object",properties:{itemDescription:{type:"string",description:"Line description \u2014 required"},quantity:{type:"number"},unit:{type:"string",description:"Unit of measure (pcs, kg, etc.)"},unitPrice:{type:"number"},accountResourceId:{type:"string",description:"Revenue account UUID"},taxProfileResourceId:{type:"string"}}}}}}}},required:["invoices"],group:"invoices",readOnly:!1,searchHint:"bulk invoices line items multi-line upsert import",execute:async(t,e)=>{Ln(e.invoices,"invoices");let r=e.invoices;return dc(r,["valueDate","dueDate"]),UP(t.client,r)}},{name:"bulk_upsert_bills",description:`Max 500 bills per call. FLAT shape: ONE line per bill via \`itemDescription\` + \`totalAmount\` + \`billAccountResourceId\` at row level. For multi-line bills use \`bulk_upsert_bill_line_items\` instead \u2014 that variant takes nested \`lineItems[]\`. Natural key: \`billReference\` (rows sharing one within a batch are MERGED \u2014 last wins). ${Jl} Dates are ISO 8601 only \u2014 dateFormat field was removed.`,params:{bills:{type:"array",description:"Array of bills to create or update (max 500). Each row needs at least: billReference, contactResourceId, valueDate, totalAmount, billAccountResourceId.",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},billReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string"},totalAmount:{type:"number"},currencyCode:{type:"string"},billAccountResourceId:{type:"string",description:"Expense account UUID"},itemDescription:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}}}}}},required:["bills"],group:"bills",readOnly:!1,searchHint:"bulk create update bills upsert import migrate",execute:async(t,e)=>{Ln(e.bills,"bills");let r=e.bills;return dc(r,["valueDate","dueDate"]),OL(t.client,r)}},{name:"bulk_upsert_bill_line_items",description:`Nested line items per bill (max 500 bills per call). Each row carries lineItems[] under its parent bill (scoped by billReference). ${Jl}`,params:{bills:{type:"array",description:"Array of bills with line items (max 500). Each bill row has lineItems[].",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},billReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},dueDate:{type:"string"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unit:{type:"string"},unitPrice:{type:"number"},accountResourceId:{type:"string",description:"Expense account UUID"},taxProfileResourceId:{type:"string"}}}}}}}},required:["bills"],group:"bills",readOnly:!1,searchHint:"bulk bills line items multi-line upsert import",execute:async(t,e)=>{Ln(e.bills,"bills");let r=e.bills;return dc(r,["valueDate","dueDate"]),FL(t.client,r)}},{name:"bulk_upsert_customer_credit_notes",description:`Max 500 customer credit notes per call. Natural key: creditNoteReference. ${Jl} Dates are ISO 8601 only.`,params:{customerCreditNotes:{type:"array",description:"Array of customer credit notes (max 500).",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},creditNoteReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Customer UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unitPrice:{type:"number"},accountResourceId:{type:"string"},taxProfileResourceId:{type:"string"}}}}}}}},required:["customerCreditNotes"],group:"customer_credit_notes",readOnly:!1,searchHint:"bulk customer credit notes refund upsert import",execute:async(t,e)=>{Ln(e.customerCreditNotes,"customerCreditNotes",500,"customer credit notes");let r=e.customerCreditNotes;return dc(r,["valueDate"]),O2(t.client,r)}},{name:"bulk_upsert_supplier_credit_notes",description:`Max 500 supplier credit notes per call. Natural key: creditNoteReference. ${Jl} Dates are ISO 8601 only.`,params:{supplierCreditNotes:{type:"array",description:"Array of supplier credit notes (max 500).",items:{type:"object",properties:{rowIndex:{type:"string"},resourceId:{type:"string"},creditNoteReference:{type:"string",description:"Natural key \u2014 required"},contactResourceId:{type:"string",description:"Supplier UUID \u2014 required"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},currencyCode:{type:"string"},internalNotes:{type:"string"},tags:{type:"array",items:{type:"string"}},lineItems:{type:"array",items:{type:"object",properties:{itemDescription:{type:"string",description:"Required"},quantity:{type:"number"},unitPrice:{type:"number"},accountResourceId:{type:"string"},taxProfileResourceId:{type:"string"}}}}}}}},required:["supplierCreditNotes"],group:"supplier_credit_notes",readOnly:!1,searchHint:"bulk supplier credit notes refund upsert import",execute:async(t,e)=>{Ln(e.supplierCreditNotes,"supplierCreditNotes",500,"supplier credit notes");let r=e.supplierCreditNotes;return dc(r,["valueDate"]),$2(t.client,r)}},{name:"bulk_upsert_journals",description:`Max 500 manual journals per call. NATURAL KEY: \`journalReference\` (NOT \`reference\` \u2014 every other bulk-upsert uses entityReference, this one is asymmetric). LEGS field: \`journalEntries[]\` (NOT \`entries[]\` \u2014 different from \`clio journals create\` which uses entries). A leg is \`organizationAccountResourceId\` + EXACTLY ONE of \`debitAmount\` / \`creditAmount\` \u2014 omit the unused side, do not send 0, and do NOT use the \`accountResourceId\`+\`amount\`+\`type\` shape \`create_journal\` takes. Debits must equal credits per journal. ${Jl} Dates are ISO 8601 (YYYY-MM-DD) only \u2014 dateFormat field was removed.`,params:{journals:{type:"array",description:"Array of journals to create or update (max 500). Each row has journalEntries[] (debit/credit legs).",items:{type:"object",properties:{journalReference:{type:"string",description:"Natural key \u2014 required (NOTE: field is `journalReference`, not `reference`)"},valueDate:{type:"string",description:"YYYY-MM-DD \u2014 required"},contactResourceId:{type:"string"},taxVatApplicable:{type:"boolean"},taxInclusion:{type:"boolean"},journalEntries:{type:"array",description:"Journal legs (debits must equal credits) \u2014 field is `journalEntries`, NOT `entries`",items:{type:"object",properties:{organizationAccountResourceId:{type:"string",description:"Required \u2014 NOT `accountResourceId`"},debitAmount:{type:"number",description:"Debit leg \u2014 omit on a credit leg"},creditAmount:{type:"number",description:"Credit leg \u2014 omit on a debit leg"},description:{type:"string"},rowIndex:{type:"string",description:"1-based, echoed back on per-row errors"},taxProfileResourceId:{type:"string"}}}}}}}},required:["journals"],group:"journals",readOnly:!1,searchHint:"bulk manual journals upsert import migration. Legs use organizationAccountResourceId + debitAmount or creditAmount, never amount/type",execute:async(t,e)=>{Ln(e.journals,"journals");let r=e.journals;return dc(r,["valueDate"]),o2(t.client,r)}},{name:"bulk_upsert_fixed_assets",description:`Bulk create/update fixed assets (max 500). Natural key: reference.
866
866
 
867
867
  \u26A0\uFE0F DATE FIELD MISMATCH: REQUEST uses valueDate (NOT purchaseDate); GET response uses purchaseDate. Sending purchaseDate \u2192 cryptic 400 "Invalid request body".
868
868
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaz-clio",
3
- "version": "5.35.0",
3
+ "version": "5.35.1",
4
4
  "description": "Clio: Command Line Interface Operator for Jaz AI.",
5
5
  "type": "module",
6
6
  "bin": {