@stamprally/core 0.14.0 → 0.16.0

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 CHANGED
@@ -1,4 +1,4 @@
1
- # @stamprally/core
1
+ # @stamprally/core v0.16.0
2
2
 
3
3
  Dependency-free domain models, immutable state transitions, storage adapters, browser detectors, and safe configuration parsers.
4
4
 
@@ -7,7 +7,7 @@ import { InMemoryStorage, StampRallyClient, type PublicRallyConfig } from "@stam
7
7
 
8
8
  const config: PublicRallyConfig = {
9
9
  id: "city-tour",
10
- version: "0.9.1",
10
+ version: "0.16.0",
11
11
  title: "City Tour",
12
12
  spots: [{ id: "station", orderIndex: 0, name: "Central Station", conditions: [{ type: "passcode" }] }],
13
13
  rewards: [],
@@ -23,7 +23,7 @@ The browser detectors `getCurrentGeoContext`, `readNfcContext`, and `readQrConte
23
23
 
24
24
  `InMemoryStorage`, `LocalStorageAdapter`, and `IndexedDBAdapter` implement `StampStorage`. `updateLocalizedField` updates one locale without dropping existing translations.
25
25
 
26
- ## v0.13 offline synchronization
26
+ ## v0.15.0 offline synchronization
27
27
 
28
28
  Configure `OfflineQueue` with `rallyId` and `userId` to persist pending work under
29
29
  `stamprally:queue:<rallyId>:<userId-or-anonymous>`. `switchUser` loads the other
@@ -32,6 +32,10 @@ timestamps, and gives `CONSUMED` reward states priority; `server_wins` uses the
32
32
  server state unchanged. Sync adapters may return `ACCEPTED`, `REJECTED_PERMANENT`,
33
33
  or `RETRYABLE_ERROR`; only the first two remove an operation.
34
34
 
35
+ When no authenticated user is supplied, the client creates a persistent UUID v4
36
+ `anonymousSessionId` and includes it in sync requests. Queue replay uses Web Locks
37
+ when available and supports bounded exponential backoff through `retryOptions`.
38
+
35
39
  `evaluateSpotStatus` derives `UNCLAIMED`, `CLAIMED`, `LOCKED`, or `VERIFYING`
36
40
  without mutating state. A spot with incomplete `prerequisites` is `LOCKED` and
37
41
  must not be verified by a client or viewer.