v0.23.0
Minor Changes
-
2807efb:
createnow returns the created row, not aCommitReceipt.The WebSocket client’s
createalready returned the row (T); the HTTP client and the.model(name)accessor returned aCommitReceipt, so “create returns the thing I created” only held on one transport. Both now return the confirmed, authoritative server row (framework defaults likecreatedAt/createdByincluded). For an idempotent re-create of an existing caller-supplied id, the EXISTING row is returned (not the input).BREAKING (HTTP /
.model()callers only):await ablo.<model>.create(...)now resolves to the row instead of{ status, lastSyncId, ... }. Code that ignored the return value, or that read.id(the row carriesidtoo), is unaffected; code that readlastSyncId/serverTxId/statusoff a typed model create should use the rawcommits.create(...)resource, which still returns aCommitReceipt. WebSocket-client callers are unaffected (already returnedT). -
2807efb:
deleteis idempotent — deleting an already-absent row is a no-op success, not an error.The WebSocket client’s
deletethrewentity_not_foundwhen the row wasn’t in the local pool, while the HTTP client returned without error — so “delete this” was a hard edge on one transport. Both now agree: a row that isn’t present is already gone, so the delete succeeds with no effect. This is AIP-135’s recommended behavior for client-assigned-id / declarative APIs (Ablo is exactly that), and it makes delete safe to retry and to race (two actors deleting the same row). The deliberate “loud 0-row” assertion in@ablo/slides-sdkis unchanged (it keeps its ownallowMissingopt-out). -
2807efb:
retrievereports a missing row asdata: undefinedinstead of throwing.The HTTP client previously threw
model_not_foundfor a missing row while the WebSocket client returnedT | undefined— so the obvious read (“does this row exist?”) was a hard edge an agent had to wrap intry/catchon one transport only. Both transports now agree: an absent row is data-absence, not an error.ModelRead.datais nowT | undefined(matching the documented.data?.xusage). Taking aclaimon a row that doesn’t exist still throwsAbloNotFoundError— a claim has nothing to hold.