@oddington/sdk 0.1.62 → 0.1.64
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/README.md +26 -4
- package/dist/browser.js +486 -263
- package/dist/index.js +4 -4
- package/dist/types/packages/sdk/src/data-snapshot-history-types.d.ts +28 -0
- package/dist/types/packages/sdk/src/public.d.ts +2 -0
- package/dist/types/shared/data-snapshot-history.d.ts +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -427,10 +427,27 @@ remain body-free. This is one local bounded selection with the same projection,
|
|
|
427
427
|
query and graph bounds and required top-level ceiling; it adds no hosted calls
|
|
428
428
|
or per-Record reads. `$body` cannot be queried as a schema field. Ordinary
|
|
429
429
|
snapshot `all`, `query` and `pages`, and hosted Data `all`, remain structured-only.
|
|
430
|
-
Initialization never refreshes the hosted artifact. Sign-out,
|
|
430
|
+
Initialization never refreshes the hosted artifact. Sign-out, confirmed access
|
|
431
|
+
loss and context replacement invalidate local reads. Expired access waits for
|
|
432
|
+
the existing bounded session recovery before a new read or write can proceed.
|
|
431
433
|
Snapshot initialization requires a hosted browser app; Node, routines and local
|
|
432
434
|
app contexts receive `DataOperationError` with `context_unavailable`.
|
|
433
435
|
|
|
436
|
+
When the named snapshot selects history, `accounting.history.records({ collection,
|
|
437
|
+
at: '2026-10-01T00:00:00Z' })` returns `{ commit, records }`, with ref-sorted
|
|
438
|
+
Records shaped as `{ $ref, values }` containing only the selected historical
|
|
439
|
+
fields. It includes Records later deleted. The timestamp chooses the first
|
|
440
|
+
eligible commit walking backward from the snapshot tip, then replays that
|
|
441
|
+
first-parent ancestry prefix; equal or backward clocks never reorder history.
|
|
442
|
+
Before the collection's first event it returns `commit: null` and no Records.
|
|
443
|
+
`accounting.history.changes({ collection, ref?, field? })` returns matching commit
|
|
444
|
+
groups in ancestry order. A ref matches the event's visible ref, including the
|
|
445
|
+
new ref on a rename; a field selects only its field-update events. Missing slots
|
|
446
|
+
and explicit null remain distinct. Both reads are local and return detached
|
|
447
|
+
values. Unselected history collections or fields reject with `invalid_query`.
|
|
448
|
+
Newer published Changes and local mutations do not enter Git history; only a
|
|
449
|
+
snapshot replacement advances its current Records and history together.
|
|
450
|
+
|
|
434
451
|
`transact` captures a synchronous callback describing create, update, link,
|
|
435
452
|
unlink and delete operations across selected collections. Record methods chain;
|
|
436
453
|
create followed by edits folds into creation on the host. Generated schema
|
|
@@ -438,9 +455,12 @@ declarations refine fields and values, while the normalized runtime schemas and
|
|
|
438
455
|
host remain authoritative. Each call makes one authenticated hosted request;
|
|
439
456
|
transact changes only shared unpublished work. Publish and discard require exact
|
|
440
457
|
current owned Change IDs and versions. Publication uses the canonical writer and
|
|
441
|
-
|
|
458
|
+
installs its canonical Records and settles the same selected Change versions before
|
|
442
459
|
resolving, without waiting for hosted projection settlement. No operation
|
|
443
460
|
refreshes the artifact or adds an unpublished query overlay.
|
|
461
|
+
Assignments and link operations already satisfied by canonical Records succeed;
|
|
462
|
+
their selected Changes retire without publication metadata. A whole no-op creates
|
|
463
|
+
no Git commit or snapshot refresh. Mixed publication commits only real changes.
|
|
444
464
|
|
|
445
465
|
`subscribe(listener)` has no initial callback and returns a synchronous,
|
|
446
466
|
idempotent unsubscribe function. Listeners on one handle share a connection;
|
|
@@ -456,8 +476,10 @@ the response. Repeated hints and unchanged state do not notify.
|
|
|
456
476
|
The SDK reconciles on connection, reconnection and update hints, with bounded
|
|
457
477
|
reconnect backoff and no healthy-connection polling. Changes-only updates reuse
|
|
458
478
|
the unchanged artifact bytes. Subscription never builds or refreshes a snapshot.
|
|
459
|
-
|
|
460
|
-
|
|
479
|
+
Ordinary credential renewal for the same account, workspace and app reconnects
|
|
480
|
+
with current authority and reconciles on the same initialized handle. Sign-out,
|
|
481
|
+
confirmed access loss and identity or scope replacement stop live delivery and
|
|
482
|
+
invalidate the handle under the same local-operation rules.
|
|
461
483
|
|
|
462
484
|
After a lost transact/discard response, `DataOperationError.effect` is
|
|
463
485
|
`uncertain`, `retryable` is false, and that handle is invalid. Explicitly
|