jaz-clio 5.58.5 → 5.58.7
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/api/references/errors.md +8 -3
- package/assets/skills/api/references/field-map.md +1 -1
- package/assets/skills/cli/SKILL.md +2 -2
- package/assets/skills/cli/references/agent-gotchas.md +1 -1
- package/assets/skills/cli/references/field-guide.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/assets/skills/transaction-recipes/references/fixed-deposit.md +2 -2
- package/assets/skills/transaction-recipes/references/provisions.md +3 -3
- package/cli.mjs +399 -399
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 5.58.
|
|
3
|
+
version: 5.58.7
|
|
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, 159 production gotchas, error
|
|
@@ -70,7 +70,7 @@ The rest of this skill — field names, gotchas, error catalog, dependency order
|
|
|
70
70
|
13. **Invoice/bill number is `reference`** — not `referenceNumber`.
|
|
71
71
|
|
|
72
72
|
### Transaction Creation
|
|
73
|
-
14. **`saveAsDraft` has OPPOSITE defaults on the two surfaces.** Raw REST: omitting it creates a FINALIZED transaction (`false`). MCP/CLI tools: creates for invoices, bills, both credit notes, journals, sale quotes, purchase requests/orders, and the order-conversions inject `true` — omitting it creates a DRAFT; pass `saveAsDraft: false` to post immediately. When the landing state matters, pass the field explicitly and read `status` off the create response rather than assuming either default.
|
|
73
|
+
14. **`saveAsDraft` has OPPOSITE defaults on the two surfaces.** Raw REST: omitting it creates a FINALIZED transaction (`false`). MCP/CLI tools: creates for invoices, bills, both credit notes, journals, sale quotes, purchase requests/orders, and the order-conversions inject `true` — omitting it creates a DRAFT; pass `saveAsDraft: false` to post immediately. When the landing state matters, pass the field explicitly and read `status` off the create response rather than assuming either default. Cash entries and cash transfers are the exception on both surfaces: they have no draft state, so `saveAsDraft: true` is refused with a 422 and the tools do not offer the field at all.
|
|
74
74
|
15. **If `saveAsDraft: false`** (or omitted on the raw REST surface — see Rule 14), every lineItem MUST have `accountResourceId`.
|
|
75
75
|
16. **Phones MUST be E.164** — `+65XXXXXXXX` (SG), `+63XXXXXXXXXX` (PH). No spaces.
|
|
76
76
|
|
|
@@ -682,13 +682,18 @@ Journals support a top-level `currency` object to create entries in a foreign cu
|
|
|
682
682
|
|
|
683
683
|
## Cash Entry Errors
|
|
684
684
|
|
|
685
|
-
###
|
|
686
|
-
|
|
687
|
-
|
|
685
|
+
### saveAsDraft: true on a cash endpoint (422)
|
|
686
|
+
```
|
|
687
|
+
Cash entries are always recorded as active and cannot be saved as a draft
|
|
688
|
+
Cash transfers are always recorded as active and cannot be saved as a draft
|
|
689
|
+
```
|
|
690
|
+
**Cause**: Sending `saveAsDraft: true` to `POST /cash-in-entries`, `POST /cash-out-entries` or `POST /cash-transfers`. The accounting service records every direct cash journal ACTIVE, so the flag cannot be honoured; the API refuses it rather than dropping it and handing back a posted entry.
|
|
691
|
+
**Fix**: Send `false`, or omit it (the endpoint defaults to `false`). There is no draft to finalize later.
|
|
688
692
|
```json
|
|
689
693
|
{ "saveAsDraft": false, "reference": "CI-001", "valueDate": "2026-02-08",
|
|
690
694
|
"accountResourceId": "uuid-bank", "lines": [...] }
|
|
691
695
|
```
|
|
696
|
+
The same applies on update: `PUT /cash-in-entries/:id` with `saveAsDraft: true` returns 422 `Journal is not draft`, because the stored entry never is one.
|
|
692
697
|
|
|
693
698
|
### Wrong structure — flat fields vs lines
|
|
694
699
|
**Cause**: Using flat structure with `amount`, `bankAccountResourceId`, `description` fields.
|
|
@@ -285,7 +285,7 @@ Uses `purchaseAmount` + `purchaseDate` + `effectiveLife` + `purchaseAssetAccount
|
|
|
285
285
|
| `description` | NOT USED | Cash entries do not have a flat `description` field |
|
|
286
286
|
| `bankAccount` | `accountResourceId` (top level) | Same as above |
|
|
287
287
|
| offset account | `lines[].accountResourceId` | The offsetting account goes in `lines` |
|
|
288
|
-
| (omit saveAsDraft) | `saveAsDraft` |
|
|
288
|
+
| (omit saveAsDraft) | `saveAsDraft` | Send `false` or omit. `true` is refused with a 422 — cash entries have no draft state |
|
|
289
289
|
|
|
290
290
|
## Cash Entries (LIST/GET response shape — DIFFERENT from CREATE!)
|
|
291
291
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-cli
|
|
3
|
-
version: 5.58.
|
|
3
|
+
version: 5.58.7
|
|
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,
|
|
@@ -380,7 +380,7 @@ clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 \
|
|
|
380
380
|
1. **Pipe JSON to jq**: `clio invoices list --json | jq '.data[] | {ref: .reference, amount: .totalAmount}'`
|
|
381
381
|
2. **Export to CSV**: `clio contacts list --all --format csv > contacts.csv`
|
|
382
382
|
3. **Multi-org scripts**: `clio invoices list --org acme-sg --json && clio invoices list --org acme-ph --json`
|
|
383
|
-
4. **Draft-then-finalize**: The CLI defaults to saving as draft (overrides the API default of `saveAsDraft: false`). Use `--finalize` to create a finalized transaction immediately. Note:
|
|
383
|
+
4. **Draft-then-finalize**: The CLI defaults to saving as draft (overrides the API default of `saveAsDraft: false`). Use `--finalize` to create a finalized transaction immediately. Note: `cash-in`, `cash-out` and `cash-transfer` have no draft state and so take no `--finalize` — they always post ACTIVE.
|
|
384
384
|
5. **Idempotent creates**: Use `--input` with the same JSON to get consistent results. The API dedup guards catch duplicate contacts, items, and accounts.
|
|
385
385
|
6. **Check before bulk ops**: Always preview with `--json | jq length` before piping IDs into `quick-fix`.
|
|
386
386
|
7. **Offline calculators for exploration**: `clio calc` commands need no auth -- use them to explore scenarios before committing with `clio ct`.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
1. **Cash entries finalize
|
|
8
|
+
1. **Cash entries and transfers post ACTIVE and take no `--finalize`.** `clio cash-in`, `clio cash-out` and `clio cash-transfer` have no draft state at all — the API refuses `saveAsDraft: true` with a 422 — so there is no flag to pass and nothing to finalize afterwards. Invoices, bills and journals are the ones the CLI saves as draft and `--finalize` posts.
|
|
9
9
|
|
|
10
10
|
2. **Line-item account resolution is NOT fuzzy.** The `accountResourceId` field inside `--lines` JSON arrays requires a UUID or exact account name. Fuzzy matching only works for top-level flags (`--contact`, `--account`). Always resolve accounts first: `clio accounts list --json | jq '.data[] | {name, id: .resourceId}'`.
|
|
11
11
|
|
|
@@ -68,7 +68,7 @@ Use in search: `clio invoices search --status UNPAID --json`
|
|
|
68
68
|
|
|
69
69
|
1. **Create returns minimal response** — only `{ "resourceId": "uuid" }`. Run `clio invoices get <id> --json` for full data.
|
|
70
70
|
2. **Line-item accounts don't fuzzy-resolve** — `--lines` JSON requires exact account name or UUID. Top-level `--account` fuzzy-resolves.
|
|
71
|
-
3. **Transaction creates default to draft** — invoices, bills, journals,
|
|
71
|
+
3. **Transaction creates default to draft** — invoices, bills, journals, credit notes and orders. Use `--finalize` to create as finalized (UNPAID for invoices, ACTIVE for journals). Cash entries and cash transfers are the exception: they post ACTIVE and accept no `--finalize`. Master data has no draft state either: contacts, items, accounts, tags, tax profiles and the rest are created live.
|
|
72
72
|
4. **`--offset` is page number (0-indexed)** — not row skip count. offset=0 + limit=100 = page 1.
|
|
73
73
|
5. **`customer` is boolean** — `--customer true`, not `--customer "Acme"`.
|
|
74
74
|
6. **Dates are YYYY-MM-DD** — org-local timezone. API returns epoch ms but CLI formats them.
|
|
@@ -100,10 +100,10 @@ Verify after finalize:
|
|
|
100
100
|
- Assert: `balance['Interest Income'] (period MTD) == schedule[periodIndex].accrualAmount`.
|
|
101
101
|
- `balance['Fixed Deposit Receivable']` stays at `100,000` until maturity.
|
|
102
102
|
|
|
103
|
-
At maturity (month 12),
|
|
103
|
+
At maturity (month 12), the maturity cash-in needs no finalize step — a cash entry is recorded ACTIVE the moment it is created and has no draft state. Edit it only if the amounts changed:
|
|
104
104
|
```
|
|
105
105
|
**STOP — not selectable by filter.** Journals carry no capsule or fixed-asset link in either direction (`JournalFilter` declares neither; a journal row has no such field even at `view: 'full'`; `GET /capsules/{id}` returns only a `totalTransactions` count — measured 2026-09-07). A date+status search returns every matching DRAFT in the org, so it must never feed `bulk_update_journals` or `delete_journal`. Surface the capsule and its expected count to the practitioner and let them identify the journals.
|
|
106
|
-
update_cash_in(resourceId: <cash-in id>,
|
|
106
|
+
update_cash_in(resourceId: <cash-in id>, lines: [...]) # only to correct it
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Verify after maturity:
|
|
@@ -118,12 +118,12 @@ This is in `year-end-close.md` Y5.
|
|
|
118
118
|
### Step 7 — Settlement (final period)
|
|
119
119
|
|
|
120
120
|
When settlement date arrives:
|
|
121
|
-
-
|
|
121
|
+
- The settlement cash-out needs no finalize step — a cash entry is recorded ACTIVE on creation and has no draft state.
|
|
122
122
|
- Verify: `balance['Provision for Warranties'] == 0`; `balance['Cash']` reduced by 500,000.
|
|
123
123
|
- Close capsule: a manual `update_capsule(title: '<original> [CLOSED]')` (the API has no `status` field for capsules — closure is informational only).
|
|
124
124
|
|
|
125
125
|
If actual settlement amount differs from estimated $500,000 (highly likely for warranty / decommissioning):
|
|
126
|
-
- Edit the settlement cash-out
|
|
126
|
+
- Edit the settlement cash-out to the actual amount: `update_cash_out(resourceId: <id>, lines: [{accountResourceId: <Provision>, amount: <actual>}, ...])`.
|
|
127
127
|
- Post a true-up journal for the difference: Dr/Cr Warranty Expense for the over/under-provision. (If under-provided: Dr Warranty Expense / Cr Cash for the shortfall. If over-provided: Dr Provision / Cr Warranty Expense for the reversal.)
|
|
128
128
|
|
|
129
129
|
---
|
|
@@ -137,7 +137,7 @@ If actual settlement amount differs from estimated $500,000 (highly likely for w
|
|
|
137
137
|
| `plan_recipe` | 422 `rate_invalid` | Discount rate must be > 0. Per IAS 37.47, use a pre-tax rate reflecting current market + obligation-specific risks. SG: typically gov't bond rate + risk premium. |
|
|
138
138
|
| `execute_recipe` | 422 `account_not_found` for `Finance Cost` | Step 3 incomplete. Create via `create_account(accountType: 'Finance Cost', name: 'Finance Cost')`. Note `Finance Cost` is both a valid account TYPE and the account NAME here — the error refers to the missing account, not a bad type. |
|
|
139
139
|
| Step 6 remeasurement | Recipe doesn't natively support mid-life remeasurement | Manual journal + delete remaining DRAFT unwinding journals + re-execute recipe for remaining term. |
|
|
140
|
-
| Step 7 actual settlement ≠ estimated | (always, for real-world provisions) | Edit settlement cash-out via `
|
|
140
|
+
| Step 7 actual settlement ≠ estimated | (always, for real-world provisions) | Edit settlement cash-out via `update_cash_out`, post true-up journal for the delta. |
|
|
141
141
|
| Provision presented as Operating Expense vs Finance Cost confusion | (presentation) | Per IAS 37.84, the unwinding charge is presented in P&L as a Finance Cost (separate from the recognition expense which is Operating Expense). Practitioner judgment if jurisdiction disagrees. |
|
|
142
142
|
|
|
143
143
|
---
|