@spacelr/sdk 0.10.3 → 0.10.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/dist/index.mjs CHANGED
@@ -1325,7 +1325,11 @@ var RealtimeClient = class {
1325
1325
  buildStreamPayload(state) {
1326
1326
  const { projectId, collectionName, where } = state.options;
1327
1327
  const payload = { projectId, collectionName };
1328
- if (state.lastDeliveredId) payload["sinceId"] = state.lastDeliveredId;
1328
+ if (state.lastDeliveredId) {
1329
+ payload["sinceId"] = state.lastDeliveredId;
1330
+ } else if (state.options.fromStart) {
1331
+ payload["fromStart"] = true;
1332
+ }
1329
1333
  if (where && Object.keys(where).length > 0) payload["where"] = where;
1330
1334
  return payload;
1331
1335
  }
@@ -2639,6 +2643,9 @@ var CollectionRef = class {
2639
2643
  projectId: this.projectId,
2640
2644
  collectionName: this.collectionName,
2641
2645
  sinceId,
2646
+ // #685 — only meaningful on a fresh subscription (no sinceId/cursor);
2647
+ // buildStreamPayload ignores it once a cursor exists.
2648
+ fromStart: handlers.fromStart,
2642
2649
  where: handlers.where,
2643
2650
  onEvent,
2644
2651
  onGap: handlers.onGap,