jaz-clio 5.35.2 → 5.35.4
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/field-map.md +1 -1
- package/assets/skills/api/references/full-api-surface.md +1 -1
- 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 +408 -407
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 5.35.
|
|
3
|
+
version: 5.35.4
|
|
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) — 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
|
|
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, and the public request model exposes no per-leg currency field either. **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
|
|
|
@@ -226,7 +226,7 @@ DIFFERENT shape from single create — easier to confuse.
|
|
|
226
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
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
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.
|
|
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. The public request model exposes no per-leg currency field either, so how a bulk journal carries a non-base currency is not expressible through this endpoint; verify against the spec before advising on it. |
|
|
230
230
|
|
|
231
231
|
---
|
|
232
232
|
|
|
@@ -131,7 +131,7 @@ Four entities sharing one shape. Replace `{entity}` with `sale-quotes`, `sale-or
|
|
|
131
131
|
| GET | `/journals/:resourceId/attachments` | List attachments |
|
|
132
132
|
| POST | `/journals/:resourceId/attachments` | Upload attachment |
|
|
133
133
|
| DELETE | `/journals/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
134
|
-
| POST | `/journals/bulk-upsert` | Bulk create/update manual journals (max 500) — **async**, returns `{ jobId }`. Natural key: `reference
|
|
134
|
+
| POST | `/journals/bulk-upsert` | Bulk create/update manual journals (max 500) — **async**, returns `{ jobId }`. Natural key: `journalReference` (NOT `reference`). Legs are `journalEntries[]`, each `organizationAccountResourceId` + exactly one of `debitAmount`/`creditAmount`. ISO 8601 dates only. |
|
|
135
135
|
|
|
136
136
|
### Cash Entries
|
|
137
137
|
| Method | Path | Description |
|