You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 79b5b48
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ npm test
22
22
## Public API
23
23
24
24
-`AgilityApiClient` - top-level SDK client (`meta`, `data` for rest-1, `assets` for api/asset, `localize` for loc-2, `schema`), and the services on it:
25
+
-`queryV1.query` / `queryV1.queries` - reads through query.v1: the same query bodies as `assets.query`, rows translated the same way, but the endpoint is read-only and answers with rows alone, so it is the safe place to explore a query
25
26
-`resolve.numbers` / `resolve.ref` - asset numbers and OID tokens to assets, in one request
26
27
-`assets.sendGuarded` - a batch as a compare-and-set on each asset's ChangeDate; changed assets come back `skipped`
27
28
-`batch.run` / `batch.reversible` - preview, snapshot, (confirm,) send guarded, and a receipt with a reverse batch
-[x] A3 loc2 (`loc2.localize`, `client.localize`; GET, POST past 2000 encoded chars, culture via Accept-Language)
357
-
-[] A4 slack-shaped reads (queryV1 or api/asset)
360
+
-[x] A4 slack-shaped reads — `queryV1` wire module, `client.queryV1.query`/`queries` (read-only, idempotent, same row translation as api/asset)
358
361
-[x] A5 services port from gh-v1 — `resolve` (`client.resolve.numbers`/`.ref`), `guard` (`client.assets.sendGuarded`), `batch` (`client.batch.run`/`.reversible`)
359
362
-[ ] A6 CI + prerelease publish — CI (`.github/workflows/ci.yml`: verify on Node 20/22/24, `npm pack` artifact) and git-SHA installs (`prepare`) done; publish waits on the registry decision
if(results.length!==expected)thrownewError(`api/asset returned ${results.length} query results for ${expected} queries that did not fail; cannot tell which result belongs to which query`);
// A failure without a sourceCommandIndex may be one of the queries, so
321
+
// no row can be placed with confidence: every slot is null, never a
322
+
// misplaced row, and the failures themselves are the answer (thrown
323
+
// with throwOnFailure, as every read asks). With no such failure, the
324
+
// server's answer is inconsistent, and that is an error of its own.
325
+
if(!failures.some((f)=>f.index===null))thrownewError(`api/asset returned ${results.length} query results for ${queries.filter((q)=>!failed.has(q.index)).length} queries that did not fail; cannot tell which result belongs to which query`);
0 commit comments