jaz-clio 9.0.0 → 9.0.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.
- package/assets/skills/api/SKILL.md +2 -2
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-kit/SKILL.md +1 -1
- package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/cli.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 9.0.
|
|
3
|
+
version: 9.0.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, 148 production gotchas, error
|
|
@@ -334,7 +334,7 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
|
|
|
334
334
|
97. **Inventory balances: one item or all.** One item: `GET /inventory-item-balance/:itemResourceId` (`get_inventory_balance`) returns `{ itemResourceId, latestAverageCostAmount, baseQty, baseUnit }`; the id is the ITEM resourceId, not an inventory-specific ID. All items: `GET /inventory-balances/:balanceStatus` (`list_inventory_balances`, `clio inventory balances --status`) with `balanceStatus` one of `ALL`, `AVAILABLE`, `FULLY_DRAWN` (anything else is 422); rows carry `itemCode`, `internalName`, `totalQuantity`, `baseUnit`, `averageCostAmount`, `balanceAmount`. The API answers an empty result with 404; the tool and CLI return it as `data: []`. `offset` is a page number here, though the spec says row (probed live 2026-09-23).
|
|
335
335
|
|
|
336
336
|
### Withholding Tax
|
|
337
|
-
98. **Withholding codes are `GET /withholding-codes`** (`list_withholding_codes`, `clio tax-profiles withholding-codes`): the BIR ATCs with `code`, `rate`, `rateType`, `type` (corp, ind, final, wvat), `description` and `resourceId`; filters `countryCode`, `code` (contains, space included) and `type`; `limit` max 100, `offset` is a page. `GET /withholding-tax-codes` is a different list (MSIC/PSIC industry codes) that no withholding field accepts. A customer's 2307 is a sale batch payment with method `WITHHOLDING_TAX_CERTIFICATE` (`record_withholding_tax_certificate`): PH orgs only, sales only, account = the system "Creditable Withholding Tax" account, one allocation per code by `resourceId`, and each allocation's `baseAmount` is the TAX WITHHELD (the dashboard's "Withholding" column; `amount` is the income); the `baseAmount`s must add up to the payment total within 0.01.
|
|
337
|
+
98. **Withholding codes are `GET /withholding-codes`** (`list_withholding_codes`, `clio tax-profiles withholding-codes`): the BIR ATCs with `code`, `rate`, `rateType`, `type` (corp, ind, final, wvat), `description` and `resourceId`; filters `countryCode`, `code` (contains, space included) and `type`; `limit` max 100, `offset` is a page. `GET /withholding-tax-codes` is a different list (MSIC/PSIC industry codes) that no withholding field accepts. A customer's 2307 is a sale batch payment with method `WITHHOLDING_TAX_CERTIFICATE` (`record_withholding_tax_certificate`): PH orgs only, sales only, account = the system "Creditable Withholding Tax" account, one allocation per code by `resourceId`, and each allocation's `baseAmount` is the TAX WITHHELD (the dashboard's "Withholding" column; `amount` is the income); the `baseAmount`s must add up to the payment total within 0.01. The certificate lands on the invoice as `recordedWithholding_ph` (`get_invoice`), not among its payments, so an empty payment list does not mean it failed; `delete_payment` with the record's `resourceId` removes it (verified live 2026-10-07).
|
|
338
338
|
99. **Duplicate detection fields**. API rejects duplicates with 422: Contacts on `name` (NOT `billingName`), Items on `itemCode`, Accounts on `name`, Tax Profiles on `name`. Agent tools auto-search before creating; if a match is found, the existing entity is returned instead of hitting a 422.
|
|
339
339
|
|
|
340
340
|
### Tax Profile Scoping
|
package/cli.mjs
CHANGED
|
@@ -808,7 +808,7 @@ Common: name, quantity, unit, unitPrice, discount {rateType: PERCENTAGE|FLAT, ra
|
|
|
808
808
|
|
|
809
809
|
classifierConfig: set one (\u22651 class by resourceId or entityResourceId) or remove one ({resourceId, deleted: true}); others stay; [] no-op.
|
|
810
810
|
|
|
811
|
-
Response: { updated, failed: [{resourceId, error, errorCode}] }.`,params:{entity:{type:"string",enum:[...u_],description:"Transaction type"},lineItemResourceIds:{type:"array",items:{type:"string"},description:"Line item resourceIds to update (ARAP + accounting entities)"},attributes:{type:"object",description:"Fields to update on all specified line items; only these change"},schedulerUpdates:{type:"array",items:{type:"object"},description:"Per-scheduler updates: [{ schedulerResourceId, lineItemUpdates: [{ arrayIndex, ...fields }] }]. EXCEPTION: journal-schedules use lineItemResourceId (UUID) instead of arrayIndex."}},required:["entity"],group:"quick_fix",readOnly:!1,isDestructive:!0,searchHint:"bulk update line item accounts tax profiles",execute:async(e,t)=>{let r=t.entity,n=RG.includes(r),i={};if(n){if(!t.schedulerUpdates)throw new Error("schedulerUpdates is required for scheduler entities (sale-schedules, purchase-schedules, subscription-schedules, journal-schedules)");i.schedulerUpdates=t.schedulerUpdates}else{if(!t.lineItemResourceIds)throw new Error("lineItemResourceIds is required for non-scheduler entities");let o=eit(e,r,t.lineItemResourceIds,t.attributes??{},"LINE_ITEMS");if(o)return o;i.lineItemResourceIds=t.lineItemResourceIds,i.attributes=t.attributes??{}}return EB(e.client,r,i)}},yr("list_nano_classifiers","List nano classifiers (tracking categories). Paginated. Nano classifiers tag line items with structured categories.","nano_classifiers",(e,t,r)=>LG(e,{limit:r,offset:t}),"list nano classifiers tracking categories types"),Ui("get_nano_classifier","Get a nano classifier by resourceId. Returns type and all classes.","nano_classifiers",(e,t)=>Yy(e,t),"get nano classifier tracking category details"),Vt({name:"search_nano_classifiers",description:"Search nano classifiers (tracking categories).",group:"nano_classifiers",fields:kR,defaults:BR,fetcher:PG,searchHint:"find nano classifiers tracking categories cost centers departments by type name"}),{name:"create_nano_classifier",description:"Create a nano classifier (tracking category). Provide a type name and list of class names. printable defaults to true.",params:{type:{type:"string",description:'Classifier type name (e.g., "Department", "Project")'},classes:{type:"array",items:{type:"string"},description:'Class names: ["Sales", "Marketing", "Engineering"]'},printable:{type:"boolean",description:"Show on printed documents (default: true)."}},required:["type","classes"],group:"nano_classifiers",readOnly:!1,searchHint:"create new nano classifier tracking category",execute:async(e,t)=>bB(e.client,{type:t.type,classes:t.classes,printable:t.printable??!0})},{name:"update_nano_classifier",description:"Update a nano classifier. Omitted fields are kept; classes is optional.",params:{resourceId:{type:"string",description:"Nano classifier resourceId"},type:{type:"string",description:"New type name"},classes:{type:"array",items:{type:"object",properties:{className:{type:"string",description:"Class name"},resourceId:{type:"string",description:"Existing class resourceId (omit to add a new class)"},deleted:{type:"boolean",description:"true removes the class"}},required:["className"]},description:"Diff: [{className, resourceId?, deleted?}]. No resourceId adds; resourceId + new className renames; deleted: true removes. Unlisted classes are kept. Plain strings are rejected."},printable:{type:"boolean",description:"Show on printed documents"},format:{type:"string",enum:[...zrt],description:"Non-CUSTOM replaces the classes with that record list."}},required:["resourceId"],group:"nano_classifiers",readOnly:!1,isDestructive:!0,searchHint:"update nano classifier classes and settings",execute:async(e,t)=>{let r=t.resourceId,n=t.format,i={};return t.type&&(i.type=t.type),t.printable!==void 0&&(i.printable=t.printable),n&&(i.format=n),Object.assign(i,await MG(e.client,r,{classes:t.classes,format:n})),IB(e.client,r,i)}},en("delete_nano_classifier","Delete a nano classifier.","nano_classifiers",(e,t)=>UG(e,t),"permanently delete a nano classifier type"),{name:"list_invoice_payments",description:"List all payments recorded against an invoice. Returns payment records with amounts, dates, and methods.",params:{resourceId:{type:"string",description:"Invoice resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list payment records on an invoice",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>LR(e.client,t.resourceId)},{name:"list_invoice_credits",description:"List all credit notes applied to an invoice.",params:{resourceId:{type:"string",description:"Invoice resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list credit applications on an invoice",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>NU(e.client,t.resourceId)},{name:"reverse_invoice_credit",description:"Reverse (unapply) a credit note from an invoice. The credit note becomes UNAPPLIED again.",params:{resourceId:{type:"string",description:"Invoice resourceId"},creditResourceId:{type:"string",description:"Credit application resourceId to reverse"}},required:["resourceId","creditResourceId"],group:"payments",readOnly:!1,searchHint:"reverse a credit note application on invoice",isDestructive:!0,execute:async(e,t)=>(await OU(e.client,t.resourceId,t.creditResourceId),{reversed:!0,invoiceId:t.resourceId,creditId:t.creditResourceId})},{name:"record_withholding_tax_certificate",description:`Record a customer's Withholding Tax Certificate (BIR Form 2307, creditable withholding / CWT; PH orgs only) against their invoices and customer credit notes, as one payment batch. accountResourceId must be the "Creditable Withholding Tax" system account. Each transaction's amounts are the tax withheld from it. Async: returns a jobId (search_background_jobs).`,params:{accountResourceId:{type:"string",description:'The "Creditable Withholding Tax" account (search_accounts)'},reference:{type:"string",description:"Recorded on every payment record"},valueDate:ho,transactions:{type:"array",items:{type:"object",required:["businessTransactionResourceId","transactionAmount","paymentAmount"],properties:{businessTransactionResourceId:{type:"string",description:"Invoice or customer credit note resourceId"},businessTransactionType:{type:"string",enum:["SALE","SALE_CREDIT_NOTE"],description:"Default SALE"},transactionAmount:{type:"number",description:"Tax withheld, in the transaction currency"},paymentAmount:{type:"number",description:"Tax withheld, in the account currency"},currency:zs}},description:"Transactions the certificate covers (1-500)"},ph2307Details:{type:"object",required:["periodStartDate","periodEndDate","allocations"],properties:{contactResourceId:{type:"string",description:"The customer who issued the certificate. Required."},certificateNumber:{type:"string"},periodStartDate:{type:"string",description:"YYYY-MM-DD, not in the future"},periodEndDate:{type:"string",description:"YYYY-MM-DD, not in the future"},remarks:{type:"string"},paymentAmountPhp:{type:"number",description:"Total withheld in PHP. Required when the payment is not in PHP."},allocations:{type:"array",items:{type:"object",required:["withholdingCodeResourceId","baseAmount"],properties:{withholdingCodeResourceId:{type:"string",description:"list_withholding_codes resourceId; each code once"},baseAmount:{type:"number",description:"TAX WITHHELD under this code (not the income)"},amount:{type:"number",description:"Income it was withheld from; same sign as baseAmount"}}},description:"One row per code on the certificate. The baseAmounts must add up to the transactions' paymentAmount total (credit notes negative), within 0.01."}},description:"The certificate as printed"},customFields:Ni},required:["accountResourceId","reference","valueDate","transactions","ph2307Details"],group:"payments",readOnly:!1,searchHint:"record BIR 2307 withholding tax certificate CWT creditable withholding received from customer on invoices",isDestructive:!0,execute:async(e,t)=>Art(e.client,{accountResourceId:t.accountResourceId,paymentMethod:"WITHHOLDING_TAX_CERTIFICATE",reference:t.reference,valueDate:t.valueDate,transactions:t.transactions,ph2307Details:t.ph2307Details,...t.customFields!==void 0&&{customFields:t.customFields}})},{name:"list_bill_payments",description:"List all payments recorded against a bill. Returns payment records with amounts, dates, and methods.",params:{resourceId:{type:"string",description:"Bill resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list payment records on a bill",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>q0(e.client,t.resourceId)},{name:"list_bill_credits",description:"List all credit notes applied to a bill.",params:{resourceId:{type:"string",description:"Bill resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list credit applications on a bill",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>PQ(e.client,t.resourceId)},{name:"reverse_bill_credit",description:"Reverse (unapply) a supplier credit note from a bill. The credit note becomes UNAPPLIED again.",params:{resourceId:{type:"string",description:"Bill resourceId"},creditResourceId:{type:"string",description:"Credit application resourceId to reverse"}},required:["resourceId","creditResourceId"],group:"payments",readOnly:!1,searchHint:"reverse a credit note application on bill",isDestructive:!0,execute:async(e,t)=>(await MQ(e.client,t.resourceId,t.creditResourceId),{reversed:!0,billId:t.resourceId,creditId:t.creditResourceId})},Ui("get_scheduled_invoice","Get a scheduled (recurring) invoice by resourceId.","schedulers",(e,t)=>zz(e,t),"get scheduled recurring invoice details"),{name:"update_scheduled_invoice",description:"Update a scheduled invoice: change schedule settings and/or the invoice template.",params:{resourceId:{type:"string",description:"Scheduled invoice resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},invoice:{type:"object",description:"Invoice template: { reference, valueDate, dueDate, contactResourceId, lineItems, currency, tag, saveAsDraft }"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled invoice settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.invoice&&(r.invoice=t.invoice),Jz(e.client,t.resourceId,r)}},en("delete_scheduled_invoice","Delete a scheduled (recurring) invoice.","schedulers",(e,t)=>Gz(e,t),"delete a recurring scheduled invoice"),Ui("get_scheduled_bill","Get a scheduled (recurring) bill by resourceId.","schedulers",(e,t)=>Vz(e,t),"get scheduled recurring bill details"),{name:"update_scheduled_bill",description:"Update a scheduled bill: change schedule settings and/or the bill template.",params:{resourceId:{type:"string",description:"Scheduled bill resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},bill:{type:"object",description:"Bill template: { reference, valueDate, dueDate, contactResourceId, lineItems, currency, tag, saveAsDraft }"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled bill settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.bill&&(r.bill=t.bill),Wz(e.client,t.resourceId,r)}},en("delete_scheduled_bill","Delete a scheduled (recurring) bill.","schedulers",(e,t)=>Zz(e,t),"delete a recurring scheduled bill"),Ui("get_scheduled_journal","Get a scheduled (recurring) journal by resourceId.","schedulers",(e,t)=>Kz(e,t),"get scheduled recurring journal details"),{name:"update_scheduled_journal",description:"Update a scheduled journal. Send startDate and the full schedulerEntries every time (422 without). Omitted tax flags reset to off, so a taxed schedule needs taxInclusion.",params:{resourceId:{type:"string",description:"Scheduled journal resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},valueDate:{type:"string",description:"Journal date (YYYY-MM-DD)"},schedulerEntries:{type:"array",items:{type:"object"},description:"Journal entries: [{ accountResourceId, type: CREDIT|DEBIT, amount, ... }]"},reference:{type:"string",description:"Journal reference"},currency:zs,taxVatApplicable:{type:"boolean",description:"Tax on. Defaults true when an entry has a tax profile"},taxInclusion:{type:"boolean",description:"Prices include tax. Required when taxed"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled journal settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.valueDate&&(r.valueDate=t.valueDate),t.schedulerEntries&&(r.schedulerEntries=t.schedulerEntries),t.reference&&(r.reference=t.reference),t.currency&&(r.currency=t.currency),t.taxVatApplicable!==void 0&&(r.taxVatApplicable=t.taxVatApplicable),t.taxInclusion!==void 0&&(r.taxInclusion=t.taxInclusion),Xz(e.client,t.resourceId,r)}},en("delete_scheduled_journal","Delete a scheduled (recurring) journal.","schedulers",(e,t)=>eJ(e,t),"delete a recurring scheduled journal"),Ui("get_payment","Get a payment record. Takes a PAYMENT resourceId; the ledger resourceId search_cashflow_transactions returns is a different entity and 404s here.","payments",(e,t)=>gJ(e,t),"get payment record details by id",{paramDescription:"Payment resourceId (from invoice/bill paymentRecords)"}),{name:"update_payment",description:"Update a payment record: correct amount, reference, date, method, or account.",params:{resourceId:{type:"string",description:"Payment resourceId (from invoice/bill paymentRecords)"},paymentAmount:{type:"number",description:"Corrected payment amount (bank currency)"},reference:{type:"string",description:"Payment reference"},valueDate:{type:"string",description:"Payment date (YYYY-MM-DD)"},paymentMethod:$f,accountResourceId:FB,transactionFee:{type:"object",description:"Transaction fee. The API requires the full fee object; a bare number is rejected.",properties:{feeAccountResourceId:{type:"string",description:"Fee expense account resourceId"},feeType:{type:"string",enum:["FLAT","PERCENTAGE"],description:"How feeValue is interpreted"},feeValue:{type:"number",description:"Fee amount (FLAT) or percentage (PERCENTAGE)"},feeTaxVatApplicable:{type:"boolean",description:"Whether VAT applies to the fee"},feeDescription:{type:"string",description:"Optional fee description"},taxVatProfileResourceId:{type:"string",description:"Optional tax profile for the fee"}},required:["feeAccountResourceId","feeType","feeValue","feeTaxVatApplicable"]},adjustment:Fbr},required:["resourceId"],group:"payments",readOnly:!1,isDestructive:!0,searchHint:"update payment amount reference date method",execute:async(e,t)=>{let r={};return t.paymentAmount!==void 0&&(r.paymentAmount=t.paymentAmount),t.reference&&(r.reference=t.reference),t.valueDate&&(r.valueDate=t.valueDate),t.paymentMethod&&(r.paymentMethod=t.paymentMethod),t.accountResourceId&&(r.accountResourceId=t.accountResourceId),t.transactionFee!==void 0&&(r.transactionFee=t.transactionFee),t.adjustment!==void 0&&(r.adjustment=t.adjustment),yJ(e.client,t.resourceId,r)}},en("delete_payment","Delete (void) a payment record. The associated invoice/bill balance is restored.","payments",(e,t)=>EJ(e,t),"delete void a payment record restore balance"),{name:"get_export_columns",description:"List all exportable columns for an entity type, including their paths and data types. Use paths from this response to build custom column sets for export_records or preview_export_records.",params:{entityType:bpe},required:["entityType"],group:"export_records",readOnly:!0,isConcurrencySafe:!0,searchHint:"list export columns fields for entity type",execute:async(e,t)=>jG(e.client,t.entityType)},{name:"preview_export_records",description:"Preview an export before generating the file. Returns totalRecords, up to 10 sample rows, resolved column definitions, and a human-readable filterDescription. Use this to confirm scope before calling export_records. Pass either query OR filter, never both.",params:{entityType:bpe,query:Pnt,filter:Mnt,columns:Unt,sort:$nt},required:["entityType"],group:"export_records",readOnly:!0,isConcurrencySafe:!0,searchHint:"preview export records count sample rows filter",execute:async(e,t)=>qG(e.client,{entityType:t.entityType,outputFormat:"XLSX",query:t.query,filter:t.filter,columns:t.columns,sort:t.sort})},{name:"export_records",description:`Raw entity-row XLSX export for one entity type (invoices/bills/contacts/items/journals/bank records/cashflow/fixed assets; one row per record, with column selection). Returns pre-signed download URL (~5 min), fileName, totalCount. Pass query OR filter, never both. Use preview_export_records first to confirm scope.
|
|
811
|
+
Response: { updated, failed: [{resourceId, error, errorCode}] }.`,params:{entity:{type:"string",enum:[...u_],description:"Transaction type"},lineItemResourceIds:{type:"array",items:{type:"string"},description:"Line item resourceIds to update (ARAP + accounting entities)"},attributes:{type:"object",description:"Fields to update on all specified line items; only these change"},schedulerUpdates:{type:"array",items:{type:"object"},description:"Per-scheduler updates: [{ schedulerResourceId, lineItemUpdates: [{ arrayIndex, ...fields }] }]. EXCEPTION: journal-schedules use lineItemResourceId (UUID) instead of arrayIndex."}},required:["entity"],group:"quick_fix",readOnly:!1,isDestructive:!0,searchHint:"bulk update line item accounts tax profiles",execute:async(e,t)=>{let r=t.entity,n=RG.includes(r),i={};if(n){if(!t.schedulerUpdates)throw new Error("schedulerUpdates is required for scheduler entities (sale-schedules, purchase-schedules, subscription-schedules, journal-schedules)");i.schedulerUpdates=t.schedulerUpdates}else{if(!t.lineItemResourceIds)throw new Error("lineItemResourceIds is required for non-scheduler entities");let o=eit(e,r,t.lineItemResourceIds,t.attributes??{},"LINE_ITEMS");if(o)return o;i.lineItemResourceIds=t.lineItemResourceIds,i.attributes=t.attributes??{}}return EB(e.client,r,i)}},yr("list_nano_classifiers","List nano classifiers (tracking categories). Paginated. Nano classifiers tag line items with structured categories.","nano_classifiers",(e,t,r)=>LG(e,{limit:r,offset:t}),"list nano classifiers tracking categories types"),Ui("get_nano_classifier","Get a nano classifier by resourceId. Returns type and all classes.","nano_classifiers",(e,t)=>Yy(e,t),"get nano classifier tracking category details"),Vt({name:"search_nano_classifiers",description:"Search nano classifiers (tracking categories).",group:"nano_classifiers",fields:kR,defaults:BR,fetcher:PG,searchHint:"find nano classifiers tracking categories cost centers departments by type name"}),{name:"create_nano_classifier",description:"Create a nano classifier (tracking category). Provide a type name and list of class names. printable defaults to true.",params:{type:{type:"string",description:'Classifier type name (e.g., "Department", "Project")'},classes:{type:"array",items:{type:"string"},description:'Class names: ["Sales", "Marketing", "Engineering"]'},printable:{type:"boolean",description:"Show on printed documents (default: true)."}},required:["type","classes"],group:"nano_classifiers",readOnly:!1,searchHint:"create new nano classifier tracking category",execute:async(e,t)=>bB(e.client,{type:t.type,classes:t.classes,printable:t.printable??!0})},{name:"update_nano_classifier",description:"Update a nano classifier. Omitted fields are kept; classes is optional.",params:{resourceId:{type:"string",description:"Nano classifier resourceId"},type:{type:"string",description:"New type name"},classes:{type:"array",items:{type:"object",properties:{className:{type:"string",description:"Class name"},resourceId:{type:"string",description:"Existing class resourceId (omit to add a new class)"},deleted:{type:"boolean",description:"true removes the class"}},required:["className"]},description:"Diff: [{className, resourceId?, deleted?}]. No resourceId adds; resourceId + new className renames; deleted: true removes. Unlisted classes are kept. Plain strings are rejected."},printable:{type:"boolean",description:"Show on printed documents"},format:{type:"string",enum:[...zrt],description:"Non-CUSTOM replaces the classes with that record list."}},required:["resourceId"],group:"nano_classifiers",readOnly:!1,isDestructive:!0,searchHint:"update nano classifier classes and settings",execute:async(e,t)=>{let r=t.resourceId,n=t.format,i={};return t.type&&(i.type=t.type),t.printable!==void 0&&(i.printable=t.printable),n&&(i.format=n),Object.assign(i,await MG(e.client,r,{classes:t.classes,format:n})),IB(e.client,r,i)}},en("delete_nano_classifier","Delete a nano classifier.","nano_classifiers",(e,t)=>UG(e,t),"permanently delete a nano classifier type"),{name:"list_invoice_payments",description:"List all payments recorded against an invoice. Returns payment records with amounts, dates, and methods.",params:{resourceId:{type:"string",description:"Invoice resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list payment records on an invoice",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>LR(e.client,t.resourceId)},{name:"list_invoice_credits",description:"List all credit notes applied to an invoice.",params:{resourceId:{type:"string",description:"Invoice resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list credit applications on an invoice",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>NU(e.client,t.resourceId)},{name:"reverse_invoice_credit",description:"Reverse (unapply) a credit note from an invoice. The credit note becomes UNAPPLIED again.",params:{resourceId:{type:"string",description:"Invoice resourceId"},creditResourceId:{type:"string",description:"Credit application resourceId to reverse"}},required:["resourceId","creditResourceId"],group:"payments",readOnly:!1,searchHint:"reverse a credit note application on invoice",isDestructive:!0,execute:async(e,t)=>(await OU(e.client,t.resourceId,t.creditResourceId),{reversed:!0,invoiceId:t.resourceId,creditId:t.creditResourceId})},{name:"record_withholding_tax_certificate",description:`Record a customer's Withholding Tax Certificate (BIR Form 2307, creditable withholding / CWT; PH orgs only) against their invoices and customer credit notes, as one payment batch. accountResourceId must be the "Creditable Withholding Tax" system account. Each transaction's amounts are the tax withheld from it. Async: returns a jobId (search_background_jobs). Read it back on get_invoice as recordedWithholding_ph; it is not in the invoice's payment list. delete_payment with that record's resourceId removes it.`,params:{accountResourceId:{type:"string",description:'The "Creditable Withholding Tax" account (search_accounts)'},reference:{type:"string",description:"Recorded on every payment record"},valueDate:ho,transactions:{type:"array",items:{type:"object",required:["businessTransactionResourceId","transactionAmount","paymentAmount"],properties:{businessTransactionResourceId:{type:"string",description:"Invoice or customer credit note resourceId"},businessTransactionType:{type:"string",enum:["SALE","SALE_CREDIT_NOTE"],description:"Default SALE"},transactionAmount:{type:"number",description:"Tax withheld, in the transaction currency"},paymentAmount:{type:"number",description:"Tax withheld, in the account currency"},currency:zs}},description:"Transactions the certificate covers (1-500)"},ph2307Details:{type:"object",required:["periodStartDate","periodEndDate","allocations"],properties:{contactResourceId:{type:"string",description:"The customer who issued the certificate. Required."},certificateNumber:{type:"string"},periodStartDate:{type:"string",description:"YYYY-MM-DD, not in the future"},periodEndDate:{type:"string",description:"YYYY-MM-DD, not in the future"},remarks:{type:"string"},paymentAmountPhp:{type:"number",description:"Total withheld in PHP. Required when the payment is not in PHP."},allocations:{type:"array",items:{type:"object",required:["withholdingCodeResourceId","baseAmount"],properties:{withholdingCodeResourceId:{type:"string",description:"list_withholding_codes resourceId; each code once"},baseAmount:{type:"number",description:"TAX WITHHELD under this code (not the income)"},amount:{type:"number",description:"Income it was withheld from; same sign as baseAmount"}}},description:"One row per code on the certificate. The baseAmounts must add up to the transactions' paymentAmount total (credit notes negative), within 0.01."}},description:"The certificate as printed"},customFields:Ni},required:["accountResourceId","reference","valueDate","transactions","ph2307Details"],group:"payments",readOnly:!1,searchHint:"record BIR 2307 withholding tax certificate CWT creditable withholding received from customer on invoices",isDestructive:!0,execute:async(e,t)=>Art(e.client,{accountResourceId:t.accountResourceId,paymentMethod:"WITHHOLDING_TAX_CERTIFICATE",reference:t.reference,valueDate:t.valueDate,transactions:t.transactions,ph2307Details:t.ph2307Details,...t.customFields!==void 0&&{customFields:t.customFields}})},{name:"list_bill_payments",description:"List all payments recorded against a bill. Returns payment records with amounts, dates, and methods.",params:{resourceId:{type:"string",description:"Bill resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list payment records on a bill",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>q0(e.client,t.resourceId)},{name:"list_bill_credits",description:"List all credit notes applied to a bill.",params:{resourceId:{type:"string",description:"Bill resourceId"}},required:["resourceId"],group:"payments",readOnly:!0,searchHint:"list credit applications on a bill",isConcurrencySafe:!0,maxResultSizeChars:5e4,execute:async(e,t)=>PQ(e.client,t.resourceId)},{name:"reverse_bill_credit",description:"Reverse (unapply) a supplier credit note from a bill. The credit note becomes UNAPPLIED again.",params:{resourceId:{type:"string",description:"Bill resourceId"},creditResourceId:{type:"string",description:"Credit application resourceId to reverse"}},required:["resourceId","creditResourceId"],group:"payments",readOnly:!1,searchHint:"reverse a credit note application on bill",isDestructive:!0,execute:async(e,t)=>(await MQ(e.client,t.resourceId,t.creditResourceId),{reversed:!0,billId:t.resourceId,creditId:t.creditResourceId})},Ui("get_scheduled_invoice","Get a scheduled (recurring) invoice by resourceId.","schedulers",(e,t)=>zz(e,t),"get scheduled recurring invoice details"),{name:"update_scheduled_invoice",description:"Update a scheduled invoice: change schedule settings and/or the invoice template.",params:{resourceId:{type:"string",description:"Scheduled invoice resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},invoice:{type:"object",description:"Invoice template: { reference, valueDate, dueDate, contactResourceId, lineItems, currency, tag, saveAsDraft }"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled invoice settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.invoice&&(r.invoice=t.invoice),Jz(e.client,t.resourceId,r)}},en("delete_scheduled_invoice","Delete a scheduled (recurring) invoice.","schedulers",(e,t)=>Gz(e,t),"delete a recurring scheduled invoice"),Ui("get_scheduled_bill","Get a scheduled (recurring) bill by resourceId.","schedulers",(e,t)=>Vz(e,t),"get scheduled recurring bill details"),{name:"update_scheduled_bill",description:"Update a scheduled bill: change schedule settings and/or the bill template.",params:{resourceId:{type:"string",description:"Scheduled bill resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},bill:{type:"object",description:"Bill template: { reference, valueDate, dueDate, contactResourceId, lineItems, currency, tag, saveAsDraft }"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled bill settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.bill&&(r.bill=t.bill),Wz(e.client,t.resourceId,r)}},en("delete_scheduled_bill","Delete a scheduled (recurring) bill.","schedulers",(e,t)=>Zz(e,t),"delete a recurring scheduled bill"),Ui("get_scheduled_journal","Get a scheduled (recurring) journal by resourceId.","schedulers",(e,t)=>Kz(e,t),"get scheduled recurring journal details"),{name:"update_scheduled_journal",description:"Update a scheduled journal. Send startDate and the full schedulerEntries every time (422 without). Omitted tax flags reset to off, so a taxed schedule needs taxInclusion.",params:{resourceId:{type:"string",description:"Scheduled journal resourceId"},repeat:{type:"string",enum:["ONE_TIME","DAILY","WEEKLY","MONTHLY","YEARLY"],description:"Recurrence interval (QUARTERLY is rejected with 422)"},startDate:{type:"string",description:"First occurrence date (YYYY-MM-DD)"},endDate:{type:"string",description:"Last occurrence date (YYYY-MM-DD)"},status:{type:"string",enum:["ACTIVE","INACTIVE"],description:"Status: ACTIVE or INACTIVE (PAUSED is rejected with 422)"},valueDate:{type:"string",description:"Journal date (YYYY-MM-DD)"},schedulerEntries:{type:"array",items:{type:"object"},description:"Journal entries: [{ accountResourceId, type: CREDIT|DEBIT, amount, ... }]"},reference:{type:"string",description:"Journal reference"},currency:zs,taxVatApplicable:{type:"boolean",description:"Tax on. Defaults true when an entry has a tax profile"},taxInclusion:{type:"boolean",description:"Prices include tax. Required when taxed"}},required:["resourceId"],group:"schedulers",readOnly:!1,isDestructive:!0,searchHint:"update recurring scheduled journal settings",execute:async(e,t)=>{let r={};return t.repeat&&(r.repeat=t.repeat),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.status&&(r.status=t.status),t.valueDate&&(r.valueDate=t.valueDate),t.schedulerEntries&&(r.schedulerEntries=t.schedulerEntries),t.reference&&(r.reference=t.reference),t.currency&&(r.currency=t.currency),t.taxVatApplicable!==void 0&&(r.taxVatApplicable=t.taxVatApplicable),t.taxInclusion!==void 0&&(r.taxInclusion=t.taxInclusion),Xz(e.client,t.resourceId,r)}},en("delete_scheduled_journal","Delete a scheduled (recurring) journal.","schedulers",(e,t)=>eJ(e,t),"delete a recurring scheduled journal"),Ui("get_payment","Get a payment record. Takes a PAYMENT resourceId; the ledger resourceId search_cashflow_transactions returns is a different entity and 404s here.","payments",(e,t)=>gJ(e,t),"get payment record details by id",{paramDescription:"Payment resourceId (from invoice/bill paymentRecords)"}),{name:"update_payment",description:"Update a payment record: correct amount, reference, date, method, or account.",params:{resourceId:{type:"string",description:"Payment resourceId (from invoice/bill paymentRecords)"},paymentAmount:{type:"number",description:"Corrected payment amount (bank currency)"},reference:{type:"string",description:"Payment reference"},valueDate:{type:"string",description:"Payment date (YYYY-MM-DD)"},paymentMethod:$f,accountResourceId:FB,transactionFee:{type:"object",description:"Transaction fee. The API requires the full fee object; a bare number is rejected.",properties:{feeAccountResourceId:{type:"string",description:"Fee expense account resourceId"},feeType:{type:"string",enum:["FLAT","PERCENTAGE"],description:"How feeValue is interpreted"},feeValue:{type:"number",description:"Fee amount (FLAT) or percentage (PERCENTAGE)"},feeTaxVatApplicable:{type:"boolean",description:"Whether VAT applies to the fee"},feeDescription:{type:"string",description:"Optional fee description"},taxVatProfileResourceId:{type:"string",description:"Optional tax profile for the fee"}},required:["feeAccountResourceId","feeType","feeValue","feeTaxVatApplicable"]},adjustment:Fbr},required:["resourceId"],group:"payments",readOnly:!1,isDestructive:!0,searchHint:"update payment amount reference date method",execute:async(e,t)=>{let r={};return t.paymentAmount!==void 0&&(r.paymentAmount=t.paymentAmount),t.reference&&(r.reference=t.reference),t.valueDate&&(r.valueDate=t.valueDate),t.paymentMethod&&(r.paymentMethod=t.paymentMethod),t.accountResourceId&&(r.accountResourceId=t.accountResourceId),t.transactionFee!==void 0&&(r.transactionFee=t.transactionFee),t.adjustment!==void 0&&(r.adjustment=t.adjustment),yJ(e.client,t.resourceId,r)}},en("delete_payment","Delete (void) a payment record. The associated invoice/bill balance is restored.","payments",(e,t)=>EJ(e,t),"delete void a payment record restore balance"),{name:"get_export_columns",description:"List all exportable columns for an entity type, including their paths and data types. Use paths from this response to build custom column sets for export_records or preview_export_records.",params:{entityType:bpe},required:["entityType"],group:"export_records",readOnly:!0,isConcurrencySafe:!0,searchHint:"list export columns fields for entity type",execute:async(e,t)=>jG(e.client,t.entityType)},{name:"preview_export_records",description:"Preview an export before generating the file. Returns totalRecords, up to 10 sample rows, resolved column definitions, and a human-readable filterDescription. Use this to confirm scope before calling export_records. Pass either query OR filter, never both.",params:{entityType:bpe,query:Pnt,filter:Mnt,columns:Unt,sort:$nt},required:["entityType"],group:"export_records",readOnly:!0,isConcurrencySafe:!0,searchHint:"preview export records count sample rows filter",execute:async(e,t)=>qG(e.client,{entityType:t.entityType,outputFormat:"XLSX",query:t.query,filter:t.filter,columns:t.columns,sort:t.sort})},{name:"export_records",description:`Raw entity-row XLSX export for one entity type (invoices/bills/contacts/items/journals/bank records/cashflow/fixed assets; one row per record, with column selection). Returns pre-signed download URL (~5 min), fileName, totalCount. Pass query OR filter, never both. Use preview_export_records first to confirm scope.
|
|
812
812
|
|
|
813
813
|
DO NOT use this for analytical / audit reports, financial statements, aging, summary reports, or statement-of-account; those go through download_export.`,params:{entityType:bpe,query:Pnt,filter:Mnt,columns:Unt,sort:$nt},required:["entityType"],group:"export_records",readOnly:!0,isConcurrencySafe:!0,searchHint:"export records download xlsx file url",execute:async(e,t)=>$G(e.client,{entityType:t.entityType,outputFormat:"XLSX",query:t.query,filter:t.filter,columns:t.columns,sort:t.sort})},Vt({name:"search_background_jobs",description:"Search and poll background jobs. ANY operation that returns a jobId (bulk_upsert_contacts, bulk_upsert_items, bank statement import, magic file processing, etc.) can be tracked here. Filter by resourceId (the jobId value) to poll a specific job. Poll until status is SUCCESS, FAILED, or PARTIAL_SUCCESS. Use processedCount/failedCount/totalRecords for progress. IMPORTANT: filter by resourceId field, NOT jobId; they differ.",group:"background_jobs",fields:qD,defaults:jD,fetcher:CB,searchHint:"poll background job status by jobId type status"}),{name:"bulk_upsert_contacts",description:`Bulk create/update contacts (max 500). resourceId per row \u2192 update (partial; omitted fields preserve existing). Omit resourceId \u2192 create. ${ql} Per-row failures in errorDetails (NOT failedRows; that's the sync pattern). On PARTIAL_SUCCESS: succeeded rows are committed; re-submit only failed rowIndex entries.
|
|
814
814
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jaz-clio",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Fastest ledger for agents. Jaz accounting CLI and MCP server: invoicing, bills, payments, quotes & orders, bank reconciliation, fixed assets, inventory, expense claims, tax, reports, and period close.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|