@relyio/sdk 0.8.0 → 0.9.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.
@@ -2960,6 +2960,18 @@ interface ChangesOptions {
2960
2960
  * the new position, on every refetch. The iterator waits for it.
2961
2961
  */
2962
2962
  onExpired?: 'throw' | 'resync' | ((expired: ChangesExpiredError) => void | Promise<void>);
2963
+ /**
2964
+ * Called once, when the feed was opened without `since`, with the position it starts from: the
2965
+ * first poll's answer, the dataset's head — before the next poll is sent. Read what you show
2966
+ * **after** it and a write your read did not see is after the position, so this feed delivers it,
2967
+ * with no second request to take the position first (`changesHead()` is that request) (REL-1513).
2968
+ *
2969
+ * `followChanges()` passes it (`ChangeSourceOptions.reached`), so a feed that drops before its first
2970
+ * change reopens from there rather than re-reading everything. Never called with a later empty
2971
+ * page's cursor: filtered, that cursor is past rows the filter hid, and a caller that widens the
2972
+ * filter must not reopen from it.
2973
+ */
2974
+ reached?: (cursor: string) => void;
2963
2975
  }
2964
2976
  interface ChangesHeadOptions {
2965
2977
  /** Cancels the request; the promise then rejects. */
@@ -2975,10 +2987,18 @@ interface ChangesHeadOptions {
2975
2987
  * the poll interval, and what each close code and each refused poll means a client does next.
2976
2988
  *
2977
2989
  * **One open, two ways in.** A subscription opens a WebSocket to the edge. Where it cannot — the
2978
- * runtime has no `WebSocket` (Node 18 and 20), constructing one throws, or the socket fails before it
2979
- * opens (a network that blocks sockets) — it polls the edge instead, from the same cursor, about
2980
- * every {@link VISITOR_POLL_INTERVAL_MS}, and tries a socket again about once a minute. Both carry
2981
- * one cursor space, so a switch either way loses nothing.
2990
+ * runtime has no `WebSocket` (Node 18 and 20), constructing one throws, the socket fails before it
2991
+ * opens (a network that blocks sockets), or it has not opened and been caught up within
2992
+ * {@link LIVE_SOCKET_OPEN_TIMEOUT_MS} (a network that holds it) — it polls the edge instead, from the
2993
+ * same cursor, about every {@link VISITOR_POLL_INTERVAL_MS}, and tries a socket again about once a
2994
+ * minute. Both carry one cursor space, so a switch either way loses nothing.
2995
+ *
2996
+ * **Where it starts.** Without `since`, the edge answers the dataset's current position before
2997
+ * anything else — the socket's `feed.opened`, or the first poll's answer — and the subscription hands
2998
+ * it to `reached`. That call is the position, with no request of its own for it: a read sent after it
2999
+ * is answered at or after the position, and every change after it is delivered here, so a publish the
3000
+ * read did not see is announced (REL-1513). The edge counts the subscription as one live connection,
3001
+ * whichever way in it took (`INV-LV-LIVE-IS-METERED`).
2982
3002
  *
2983
3003
  * **It ends only when its signal aborts, and throws every other end** — a socket closed by a refusal
2984
3004
  * or a deploy, a refused poll, a keepalive nobody answered — as a `LiveEdgeError` saying what to do
@@ -3005,11 +3025,51 @@ interface ChangesHeadOptions {
3005
3025
  * receives never learns otherwise that a network change dropped its connection.
3006
3026
  */
3007
3027
  declare const LIVE_KEEPALIVE_INTERVAL_MS = 30000;
3028
+ /**
3029
+ * How long a socket has to open and be caught up — the feed's `feed.opened` — before the subscription
3030
+ * stops waiting on it, closes it and polls instead, as it does for a socket that fails before it opens
3031
+ * (REL-1513).
3032
+ *
3033
+ * The poll interval, because that is what a socket is for: telling the page sooner than a poll would.
3034
+ * A poll is answered at once and polled again within this interval, so a socket that has not caught
3035
+ * up by then has already served the page worse than polling would have. It is well past a healthy
3036
+ * open — the door's checks and one ledger read at the edge — and half the keepalive's verdict on an
3037
+ * open socket that has gone quiet ({@link LIVE_KEEPALIVE_INTERVAL_MS}, twice). It bounds how long
3038
+ * `<RelyIOProvider live>`'s first reads wait for a position on a network that neither opens a socket
3039
+ * nor refuses one — a proxy that holds the upgrade — which without it they would wait on for as long
3040
+ * as the page is open.
3041
+ */
3042
+ declare const LIVE_SOCKET_OPEN_TIMEOUT_MS = 15000;
3008
3043
  interface LiveChangesOptions {
3009
3044
  /**
3010
3045
  * A change's cursor from an earlier subscription. Omitted, the edge answers the dataset's current
3011
- * position first and replays nothing; fetch what you show **after** that position arrives — with
3012
- * `followChanges()`, after `onState` reports `following` — so nothing lands in between unseen.
3046
+ * position first and replays nothing, and the subscription hands that position to `reached` before
3047
+ * anything after it. Read what you show **after** that first call — a read sent before it, from a
3048
+ * subscription opened afterwards without `since`, leaves a publish between the two that neither
3049
+ * sees (REL-1513). With `followChanges()`, which hands the source its own `reached`, call both —
3050
+ * and let the read go if the loop fails first, so content never waits on a feed that is down:
3051
+ *
3052
+ * ```ts
3053
+ * let positioned!: () => void
3054
+ * const position = new Promise<void>(resolve => (positioned = resolve))
3055
+ * const following = followChanges(
3056
+ * from =>
3057
+ * relyio.liveChanges({
3058
+ * ...from,
3059
+ * ids: [id],
3060
+ * reached: cursor => {
3061
+ * from.reached(cursor)
3062
+ * positioned()
3063
+ * },
3064
+ * }),
3065
+ * { signal, onChange, onResync, onState: state => state.kind !== 'following' && positioned() },
3066
+ * )
3067
+ * await position
3068
+ * const post = await relyio.content('post').findById(id).execute()
3069
+ * ```
3070
+ *
3071
+ * The wait is bounded: a socket that has not opened and been told its position within
3072
+ * {@link LIVE_SOCKET_OPEN_TIMEOUT_MS} is given up for a poll, answered at once.
3013
3073
  */
3014
3074
  since?: string;
3015
3075
  /** Content types to keep. Omitted keeps every type; an empty list is refused. At most 50. */
@@ -3036,7 +3096,8 @@ interface LiveChangesOptions {
3036
3096
  /**
3037
3097
  * Called with a position reached without a change to carry it. `followChanges()` passes it so a
3038
3098
  * connection dropped before its first change reconnects from there; see
3039
- * `ChangeSourceOptions.reached`.
3099
+ * `ChangeSourceOptions.reached`. Without `since`, its first call is the position the subscription
3100
+ * starts from (see `since`).
3040
3101
  */
3041
3102
  reached?: (cursor: string) => void;
3042
3103
  }
@@ -3292,9 +3353,14 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
3292
3353
  * (`rly_pub_…`): each change as ids, in order — the transport a browser follows changes with.
3293
3354
  *
3294
3355
  * A WebSocket to the edge, from `since` or the dataset's current position; where a socket cannot
3295
- * open — the runtime has none, or the network refuses it — it polls the edge instead, about every
3296
- * fifteen seconds, from the same cursor. The edge is `liveUrl`, or derived from the default
3297
- * `baseUrl` (see `RelyIOConfig.liveUrl`).
3356
+ * open — the runtime has none, the network refuses it, or it has not opened and been told its
3357
+ * position within `LIVE_SOCKET_OPEN_TIMEOUT_MS` — it polls the edge instead, about every fifteen
3358
+ * seconds, from the same cursor. The edge is `liveUrl`, or derived from the default `baseUrl`
3359
+ * (see `RelyIOConfig.liveUrl`).
3360
+ *
3361
+ * Without `since` it starts at the dataset's current position, which it hands `reached` before
3362
+ * anything after it: read what you show after that call, and a publish your read did not see is
3363
+ * one this subscription announces (see `LiveChangesOptions.since`).
3298
3364
  *
3299
3365
  * One subscription ends only when `signal` aborts, which ends the `for await` cleanly; every other
3300
3366
  * end — a socket a deploy dropped, a refusal, a refused poll — is thrown as a `LiveEdgeError`
@@ -3599,4 +3665,4 @@ declare function createClient<TSchema extends AnySchemaDefinition>(config: Typed
3599
3665
  */
3600
3666
  type ClientSchema<T extends TypedRelyIOClient<AnySchemaDefinition>> = T extends TypedRelyIOClient<infer TSchema> ? TSchema : never;
3601
3667
 
3602
- export { type BatchOperationResult as $, type ActiveSandbox as A, type SearchResultItem as B, type Change as C, type SearchHitMetadata as D, type ExtendedQueryResult as E, type FeedChange as F, type SearchResponse as G, HttpClient as H, type AutocompleteSuggestion as I, type AutocompleteResponse as J, type SimilarResult as K, LIVE_KEEPALIVE_INTERVAL_MS as L, type SimilarResponse as M, type SearchFilter as N, type SearchFields as O, type Project as P, type SearchSort as Q, type Register as R, type SandboxState as S, TypedRelyIOClient as T, type SearchTypeName as U, type SearchEntry as V, BatchClient as W, BatchBuilder as X, type BatchMethod as Y, type BatchOperation as Z, type BatchOptions as _, ChangesExpiredError as a, type BatchSummary as a0, type BatchResponse as a1, AdhocQueryClient as a2, AdhocQueryBuilder as a3, type FetchBlock as a4, type AggregateBlock as a5, type AggregateMetric as a6, type SearchBlock as a7, type FilterValue as a8, type FullTextConfig as a9, type MultipartPart as aA, type MultipartTarget as aB, type UploadProgress as aC, ResourceNotFoundError as aD, ResourceConflictError as aE, ResourceExpiredError as aF, isResourceNotFound as aG, type FileErrorCode as aH, type FileUploadErrorCode as aI, FileUploadError as aJ, FileValidationError as aK, type FileValidationConstraints as aL, validateFile as aM, type AdhocQueryDefinition as aa, type AdhocQueryOptions as ab, type QueryMetadata as ac, type AdhocQueryResult as ad, AssetClient as ae, AssetFileBuilder as af, AssetUploadBuilder as ag, isAssetEntry as ah, type AssetVisibility as ai, type FileStatus as aj, type FileBackend as ak, type AssetFileBlock as al, type AssetFileExtracted as am, type FileStatusResult as an, type AssetUrls as ao, type AssetEntryResponse as ap, type PopulatedAssetReference as aq, type PresignInput as ar, type PresignResult as as, type ConfirmInput as at, type ConfirmResult as au, type ResolveUrlInput as av, type ResolveUrlResult as aw, type CreateAssetOptions as ax, type WaitUntilReadyOptions as ay, type MultipartCreateResult as az, type ChangesExpiredReason as b, createClient as c, type TypedClientConfig as d, type ClientSchema as e, type RegisteredSchema as f, type SendOptions as g, entityTagOf as h, type ConditionalWriteOptions as i, type RetryableWriteOptions as j, type ChangesHeadOptions as k, type ChangesOptions as l, type LiveChangesOptions as m, ContentClient as n, SingletonClient as o, SettingsClient as p, ContentQueryBuilder as q, ContentByIdBuilder as r, type ChildrenOptions as s, type SingletonFetchOptions as t, type SettingsFetchOptions as u, SearchClient as v, SearchBuilder as w, AutocompleteBuilder as x, SimilarBuilder as y, type SearchMode as z };
3668
+ export { type BatchOptions as $, type ActiveSandbox as A, type SearchMode as B, type Change as C, type SearchResultItem as D, type ExtendedQueryResult as E, type FeedChange as F, type SearchHitMetadata as G, HttpClient as H, type SearchResponse as I, type AutocompleteSuggestion as J, type AutocompleteResponse as K, LIVE_KEEPALIVE_INTERVAL_MS as L, type SimilarResult as M, type SimilarResponse as N, type SearchFilter as O, type Project as P, type SearchFields as Q, type Register as R, type SandboxState as S, TypedRelyIOClient as T, type SearchSort as U, type SearchTypeName as V, type SearchEntry as W, BatchClient as X, BatchBuilder as Y, type BatchMethod as Z, type BatchOperation as _, ChangesExpiredError as a, type BatchOperationResult as a0, type BatchSummary as a1, type BatchResponse as a2, AdhocQueryClient as a3, AdhocQueryBuilder as a4, type FetchBlock as a5, type AggregateBlock as a6, type AggregateMetric as a7, type SearchBlock as a8, type FilterValue as a9, type MultipartCreateResult as aA, type MultipartPart as aB, type MultipartTarget as aC, type UploadProgress as aD, ResourceNotFoundError as aE, ResourceConflictError as aF, ResourceExpiredError as aG, isResourceNotFound as aH, type FileErrorCode as aI, type FileUploadErrorCode as aJ, FileUploadError as aK, FileValidationError as aL, type FileValidationConstraints as aM, validateFile as aN, type FullTextConfig as aa, type AdhocQueryDefinition as ab, type AdhocQueryOptions as ac, type QueryMetadata as ad, type AdhocQueryResult as ae, AssetClient as af, AssetFileBuilder as ag, AssetUploadBuilder as ah, isAssetEntry as ai, type AssetVisibility as aj, type FileStatus as ak, type FileBackend as al, type AssetFileBlock as am, type AssetFileExtracted as an, type FileStatusResult as ao, type AssetUrls as ap, type AssetEntryResponse as aq, type PopulatedAssetReference as ar, type PresignInput as as, type PresignResult as at, type ConfirmInput as au, type ConfirmResult as av, type ResolveUrlInput as aw, type ResolveUrlResult as ax, type CreateAssetOptions as ay, type WaitUntilReadyOptions as az, type ChangesExpiredReason as b, createClient as c, type TypedClientConfig as d, type ClientSchema as e, type RegisteredSchema as f, type SendOptions as g, entityTagOf as h, type ConditionalWriteOptions as i, type RetryableWriteOptions as j, type ChangesHeadOptions as k, type ChangesOptions as l, LIVE_SOCKET_OPEN_TIMEOUT_MS as m, type LiveChangesOptions as n, ContentClient as o, SingletonClient as p, SettingsClient as q, ContentQueryBuilder as r, ContentByIdBuilder as s, type ChildrenOptions as t, type SingletonFetchOptions as u, type SettingsFetchOptions as v, SearchClient as w, SearchBuilder as x, AutocompleteBuilder as y, SimilarBuilder as z };
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var chunk72UK5U7T_cjs = require('./chunk-72UK5U7T.cjs');
6
- var chunkXIE7WJV3_cjs = require('./chunk-XIE7WJV3.cjs');
6
+ var chunkSPFRDXAF_cjs = require('./chunk-SPFRDXAF.cjs');
7
7
  require('./chunk-LSRPMNPT.cjs');
8
8
  require('./chunk-PPA2WWOH.cjs');
9
9
  var chunkTZL374LS_cjs = require('./chunk-TZL374LS.cjs');
@@ -20,9 +20,9 @@ function stopOnUnknownAnswer(_answer) {
20
20
  }
21
21
  chunkMWMSFIWN_cjs.__name(stopOnUnknownAnswer, "stopOnUnknownAnswer");
22
22
  function classifyFollowFailure(error) {
23
- if (error instanceof chunkXIE7WJV3_cjs.LiveEdgeError) return liveEdgeVerdict(error);
24
- if (!(error instanceof chunkXIE7WJV3_cjs.SDKError) || !error.retryable) return { retry: false };
25
- const afterMs = chunkXIE7WJV3_cjs.serviceInstructedDelayMs(error, Date.now());
23
+ if (error instanceof chunkSPFRDXAF_cjs.LiveEdgeError) return liveEdgeVerdict(error);
24
+ if (!(error instanceof chunkSPFRDXAF_cjs.SDKError) || !error.retryable) return { retry: false };
25
+ const afterMs = chunkSPFRDXAF_cjs.serviceInstructedDelayMs(error, Date.now());
26
26
  return afterMs === void 0 ? { retry: true } : { retry: true, afterMs };
27
27
  }
28
28
  chunkMWMSFIWN_cjs.__name(classifyFollowFailure, "classifyFollowFailure");
@@ -36,7 +36,7 @@ function liveEdgeVerdict(error) {
36
36
  return { retry: true, ...hint };
37
37
  }
38
38
  case "back-off": {
39
- return { retry: true, ...hint, backOffMs: chunkXIE7WJV3_cjs.VISITOR_ADMISSION_RETRY_AFTER_SECONDS * 1e3 };
39
+ return { retry: true, ...hint, backOffMs: chunkSPFRDXAF_cjs.VISITOR_ADMISSION_RETRY_AFTER_SECONDS * 1e3 };
40
40
  }
41
41
  default: {
42
42
  return stopOnUnknownAnswer(error.retry);
@@ -49,10 +49,10 @@ async function followChanges(source, options) {
49
49
  const classify = options.classify ?? classifyFollowFailure;
50
50
  const random = options.random ?? Math.random;
51
51
  const report = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name((state) => {
52
- if (!chunkXIE7WJV3_cjs.isAborted(signal)) options.onState?.(state);
52
+ if (!chunkSPFRDXAF_cjs.isAborted(signal)) options.onState?.(state);
53
53
  }, "report");
54
54
  const resync = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name(async (cause) => {
55
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return;
55
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return;
56
56
  await onResync(cause);
57
57
  report({ kind: "resynced", resync: cause });
58
58
  }, "resync");
@@ -61,12 +61,12 @@ async function followChanges(source, options) {
61
61
  let unanchored = false;
62
62
  let current;
63
63
  for (; ; ) {
64
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
64
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
65
65
  try {
66
66
  if (unanchored) {
67
67
  unanchored = false;
68
68
  await resync({ cause: "no-cursor" });
69
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
69
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
70
70
  }
71
71
  report({ kind: "following" });
72
72
  const open = {};
@@ -83,13 +83,13 @@ async function followChanges(source, options) {
83
83
  }, "reached")
84
84
  });
85
85
  for await (const change of changes) {
86
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
86
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
87
87
  failures = 0;
88
88
  await onChange(change);
89
89
  since = change.cursor;
90
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
90
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
91
91
  }
92
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
92
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
93
93
  const error = new Error(
94
94
  "The change source completed without its signal aborting; a source ends only on abort and throws every other end."
95
95
  );
@@ -97,7 +97,7 @@ async function followChanges(source, options) {
97
97
  return { kind: "stopped", since, error };
98
98
  } catch (error) {
99
99
  current = void 0;
100
- if (chunkXIE7WJV3_cjs.isAborted(signal)) return { kind: "aborted", since };
100
+ if (chunkSPFRDXAF_cjs.isAborted(signal)) return { kind: "aborted", since };
101
101
  const verdict = classify(error);
102
102
  if (!verdict.retry) {
103
103
  report({ kind: "stopped", error });
@@ -106,7 +106,7 @@ async function followChanges(source, options) {
106
106
  failures += 1;
107
107
  const retryInMs = retryDelayMs(failures, verdict, random);
108
108
  report({ kind: "reconnecting", error, retryInMs });
109
- await chunkXIE7WJV3_cjs.sleep(retryInMs, signal);
109
+ await chunkSPFRDXAF_cjs.sleep(retryInMs, signal);
110
110
  if (since === void 0) unanchored = true;
111
111
  }
112
112
  }
@@ -342,227 +342,231 @@ Object.defineProperty(exports, "fieldset", {
342
342
  });
343
343
  Object.defineProperty(exports, "AdhocQueryBuilder", {
344
344
  enumerable: true,
345
- get: function () { return chunkXIE7WJV3_cjs.AdhocQueryBuilder; }
345
+ get: function () { return chunkSPFRDXAF_cjs.AdhocQueryBuilder; }
346
346
  });
347
347
  Object.defineProperty(exports, "AdhocQueryClient", {
348
348
  enumerable: true,
349
- get: function () { return chunkXIE7WJV3_cjs.AdhocQueryClient; }
349
+ get: function () { return chunkSPFRDXAF_cjs.AdhocQueryClient; }
350
350
  });
351
351
  Object.defineProperty(exports, "AssetClient", {
352
352
  enumerable: true,
353
- get: function () { return chunkXIE7WJV3_cjs.AssetClient; }
353
+ get: function () { return chunkSPFRDXAF_cjs.AssetClient; }
354
354
  });
355
355
  Object.defineProperty(exports, "AssetFileBuilder", {
356
356
  enumerable: true,
357
- get: function () { return chunkXIE7WJV3_cjs.AssetFileBuilder; }
357
+ get: function () { return chunkSPFRDXAF_cjs.AssetFileBuilder; }
358
358
  });
359
359
  Object.defineProperty(exports, "AssetUploadBuilder", {
360
360
  enumerable: true,
361
- get: function () { return chunkXIE7WJV3_cjs.AssetUploadBuilder; }
361
+ get: function () { return chunkSPFRDXAF_cjs.AssetUploadBuilder; }
362
362
  });
363
363
  Object.defineProperty(exports, "AuthorizationError", {
364
364
  enumerable: true,
365
- get: function () { return chunkXIE7WJV3_cjs.AuthorizationError; }
365
+ get: function () { return chunkSPFRDXAF_cjs.AuthorizationError; }
366
366
  });
367
367
  Object.defineProperty(exports, "AutocompleteBuilder", {
368
368
  enumerable: true,
369
- get: function () { return chunkXIE7WJV3_cjs.AutocompleteBuilder; }
369
+ get: function () { return chunkSPFRDXAF_cjs.AutocompleteBuilder; }
370
370
  });
371
371
  Object.defineProperty(exports, "BaseValidationError", {
372
372
  enumerable: true,
373
- get: function () { return chunkXIE7WJV3_cjs.BaseValidationError; }
373
+ get: function () { return chunkSPFRDXAF_cjs.BaseValidationError; }
374
374
  });
375
375
  Object.defineProperty(exports, "BatchBuilder", {
376
376
  enumerable: true,
377
- get: function () { return chunkXIE7WJV3_cjs.BatchBuilder; }
377
+ get: function () { return chunkSPFRDXAF_cjs.BatchBuilder; }
378
378
  });
379
379
  Object.defineProperty(exports, "BatchClient", {
380
380
  enumerable: true,
381
- get: function () { return chunkXIE7WJV3_cjs.BatchClient; }
381
+ get: function () { return chunkSPFRDXAF_cjs.BatchClient; }
382
382
  });
383
383
  Object.defineProperty(exports, "ChangesExpiredError", {
384
384
  enumerable: true,
385
- get: function () { return chunkXIE7WJV3_cjs.ChangesExpiredError; }
385
+ get: function () { return chunkSPFRDXAF_cjs.ChangesExpiredError; }
386
386
  });
387
387
  Object.defineProperty(exports, "ConnectionError", {
388
388
  enumerable: true,
389
- get: function () { return chunkXIE7WJV3_cjs.ConnectionError; }
389
+ get: function () { return chunkSPFRDXAF_cjs.ConnectionError; }
390
390
  });
391
391
  Object.defineProperty(exports, "ContentByIdBuilder", {
392
392
  enumerable: true,
393
- get: function () { return chunkXIE7WJV3_cjs.ContentByIdBuilder; }
393
+ get: function () { return chunkSPFRDXAF_cjs.ContentByIdBuilder; }
394
394
  });
395
395
  Object.defineProperty(exports, "ContentClient", {
396
396
  enumerable: true,
397
- get: function () { return chunkXIE7WJV3_cjs.ContentClient; }
397
+ get: function () { return chunkSPFRDXAF_cjs.ContentClient; }
398
398
  });
399
399
  Object.defineProperty(exports, "ContentQueryBuilder", {
400
400
  enumerable: true,
401
- get: function () { return chunkXIE7WJV3_cjs.ContentQueryBuilder; }
401
+ get: function () { return chunkSPFRDXAF_cjs.ContentQueryBuilder; }
402
402
  });
403
403
  Object.defineProperty(exports, "ErrorMapper", {
404
404
  enumerable: true,
405
- get: function () { return chunkXIE7WJV3_cjs.ErrorMapper; }
405
+ get: function () { return chunkSPFRDXAF_cjs.ErrorMapper; }
406
406
  });
407
407
  Object.defineProperty(exports, "FileUploadError", {
408
408
  enumerable: true,
409
- get: function () { return chunkXIE7WJV3_cjs.FileUploadError; }
409
+ get: function () { return chunkSPFRDXAF_cjs.FileUploadError; }
410
410
  });
411
411
  Object.defineProperty(exports, "FileValidationError", {
412
412
  enumerable: true,
413
- get: function () { return chunkXIE7WJV3_cjs.FileValidationError; }
413
+ get: function () { return chunkSPFRDXAF_cjs.FileValidationError; }
414
414
  });
415
415
  Object.defineProperty(exports, "HttpClient", {
416
416
  enumerable: true,
417
- get: function () { return chunkXIE7WJV3_cjs.HttpClient; }
417
+ get: function () { return chunkSPFRDXAF_cjs.HttpClient; }
418
418
  });
419
419
  Object.defineProperty(exports, "InvalidApiKeyError", {
420
420
  enumerable: true,
421
- get: function () { return chunkXIE7WJV3_cjs.InvalidApiKeyError; }
421
+ get: function () { return chunkSPFRDXAF_cjs.InvalidApiKeyError; }
422
422
  });
423
423
  Object.defineProperty(exports, "InvalidPayloadError", {
424
424
  enumerable: true,
425
- get: function () { return chunkXIE7WJV3_cjs.InvalidPayloadError; }
425
+ get: function () { return chunkSPFRDXAF_cjs.InvalidPayloadError; }
426
426
  });
427
427
  Object.defineProperty(exports, "LIVE_KEEPALIVE_INTERVAL_MS", {
428
428
  enumerable: true,
429
- get: function () { return chunkXIE7WJV3_cjs.LIVE_KEEPALIVE_INTERVAL_MS; }
429
+ get: function () { return chunkSPFRDXAF_cjs.LIVE_KEEPALIVE_INTERVAL_MS; }
430
+ });
431
+ Object.defineProperty(exports, "LIVE_SOCKET_OPEN_TIMEOUT_MS", {
432
+ enumerable: true,
433
+ get: function () { return chunkSPFRDXAF_cjs.LIVE_SOCKET_OPEN_TIMEOUT_MS; }
430
434
  });
431
435
  Object.defineProperty(exports, "LiveEdgeError", {
432
436
  enumerable: true,
433
- get: function () { return chunkXIE7WJV3_cjs.LiveEdgeError; }
437
+ get: function () { return chunkSPFRDXAF_cjs.LiveEdgeError; }
434
438
  });
435
439
  Object.defineProperty(exports, "MethodNotAllowedError", {
436
440
  enumerable: true,
437
- get: function () { return chunkXIE7WJV3_cjs.MethodNotAllowedError; }
441
+ get: function () { return chunkSPFRDXAF_cjs.MethodNotAllowedError; }
438
442
  });
439
443
  Object.defineProperty(exports, "MissingApiKeyError", {
440
444
  enumerable: true,
441
- get: function () { return chunkXIE7WJV3_cjs.MissingApiKeyError; }
445
+ get: function () { return chunkSPFRDXAF_cjs.MissingApiKeyError; }
442
446
  });
443
447
  Object.defineProperty(exports, "NetworkError", {
444
448
  enumerable: true,
445
- get: function () { return chunkXIE7WJV3_cjs.NetworkError; }
449
+ get: function () { return chunkSPFRDXAF_cjs.NetworkError; }
446
450
  });
447
451
  Object.defineProperty(exports, "PUBLISHABLE_KEY_PREFIX", {
448
452
  enumerable: true,
449
- get: function () { return chunkXIE7WJV3_cjs.PUBLISHABLE_KEY_PREFIX; }
453
+ get: function () { return chunkSPFRDXAF_cjs.PUBLISHABLE_KEY_PREFIX; }
450
454
  });
451
455
  Object.defineProperty(exports, "PayloadTooLargeError", {
452
456
  enumerable: true,
453
- get: function () { return chunkXIE7WJV3_cjs.PayloadTooLargeError; }
457
+ get: function () { return chunkSPFRDXAF_cjs.PayloadTooLargeError; }
454
458
  });
455
459
  Object.defineProperty(exports, "PlanFeatureUnavailableError", {
456
460
  enumerable: true,
457
- get: function () { return chunkXIE7WJV3_cjs.PlanFeatureUnavailableError; }
461
+ get: function () { return chunkSPFRDXAF_cjs.PlanFeatureUnavailableError; }
458
462
  });
459
463
  Object.defineProperty(exports, "RateLimitError", {
460
464
  enumerable: true,
461
- get: function () { return chunkXIE7WJV3_cjs.RateLimitError; }
465
+ get: function () { return chunkSPFRDXAF_cjs.RateLimitError; }
462
466
  });
463
467
  Object.defineProperty(exports, "ReadOnlyKeyError", {
464
468
  enumerable: true,
465
- get: function () { return chunkXIE7WJV3_cjs.ReadOnlyKeyError; }
469
+ get: function () { return chunkSPFRDXAF_cjs.ReadOnlyKeyError; }
466
470
  });
467
471
  Object.defineProperty(exports, "ResourceConflictError", {
468
472
  enumerable: true,
469
- get: function () { return chunkXIE7WJV3_cjs.ResourceConflictError; }
473
+ get: function () { return chunkSPFRDXAF_cjs.ResourceConflictError; }
470
474
  });
471
475
  Object.defineProperty(exports, "ResourceExpiredError", {
472
476
  enumerable: true,
473
- get: function () { return chunkXIE7WJV3_cjs.ResourceExpiredError; }
477
+ get: function () { return chunkSPFRDXAF_cjs.ResourceExpiredError; }
474
478
  });
475
479
  Object.defineProperty(exports, "ResourceNotFoundError", {
476
480
  enumerable: true,
477
- get: function () { return chunkXIE7WJV3_cjs.ResourceNotFoundError; }
481
+ get: function () { return chunkSPFRDXAF_cjs.ResourceNotFoundError; }
478
482
  });
479
483
  Object.defineProperty(exports, "SDKError", {
480
484
  enumerable: true,
481
- get: function () { return chunkXIE7WJV3_cjs.SDKError; }
485
+ get: function () { return chunkSPFRDXAF_cjs.SDKError; }
482
486
  });
483
487
  Object.defineProperty(exports, "SearchBuilder", {
484
488
  enumerable: true,
485
- get: function () { return chunkXIE7WJV3_cjs.SearchBuilder; }
489
+ get: function () { return chunkSPFRDXAF_cjs.SearchBuilder; }
486
490
  });
487
491
  Object.defineProperty(exports, "SearchClient", {
488
492
  enumerable: true,
489
- get: function () { return chunkXIE7WJV3_cjs.SearchClient; }
493
+ get: function () { return chunkSPFRDXAF_cjs.SearchClient; }
490
494
  });
491
495
  Object.defineProperty(exports, "ServerError", {
492
496
  enumerable: true,
493
- get: function () { return chunkXIE7WJV3_cjs.ServerError; }
497
+ get: function () { return chunkSPFRDXAF_cjs.ServerError; }
494
498
  });
495
499
  Object.defineProperty(exports, "ServiceIndeterminateError", {
496
500
  enumerable: true,
497
- get: function () { return chunkXIE7WJV3_cjs.ServiceIndeterminateError; }
501
+ get: function () { return chunkSPFRDXAF_cjs.ServiceIndeterminateError; }
498
502
  });
499
503
  Object.defineProperty(exports, "SettingsClient", {
500
504
  enumerable: true,
501
- get: function () { return chunkXIE7WJV3_cjs.SettingsClient; }
505
+ get: function () { return chunkSPFRDXAF_cjs.SettingsClient; }
502
506
  });
503
507
  Object.defineProperty(exports, "SimilarBuilder", {
504
508
  enumerable: true,
505
- get: function () { return chunkXIE7WJV3_cjs.SimilarBuilder; }
509
+ get: function () { return chunkSPFRDXAF_cjs.SimilarBuilder; }
506
510
  });
507
511
  Object.defineProperty(exports, "SingletonClient", {
508
512
  enumerable: true,
509
- get: function () { return chunkXIE7WJV3_cjs.SingletonClient; }
513
+ get: function () { return chunkSPFRDXAF_cjs.SingletonClient; }
510
514
  });
511
515
  Object.defineProperty(exports, "TimeoutError", {
512
516
  enumerable: true,
513
- get: function () { return chunkXIE7WJV3_cjs.TimeoutError; }
517
+ get: function () { return chunkSPFRDXAF_cjs.TimeoutError; }
514
518
  });
515
519
  Object.defineProperty(exports, "TransactionRolledBackError", {
516
520
  enumerable: true,
517
- get: function () { return chunkXIE7WJV3_cjs.TransactionRolledBackError; }
521
+ get: function () { return chunkSPFRDXAF_cjs.TransactionRolledBackError; }
518
522
  });
519
523
  Object.defineProperty(exports, "TypedRelyIOClient", {
520
524
  enumerable: true,
521
- get: function () { return chunkXIE7WJV3_cjs.TypedRelyIOClient; }
525
+ get: function () { return chunkSPFRDXAF_cjs.TypedRelyIOClient; }
522
526
  });
523
527
  Object.defineProperty(exports, "UnknownContractError", {
524
528
  enumerable: true,
525
- get: function () { return chunkXIE7WJV3_cjs.UnknownContractError; }
529
+ get: function () { return chunkSPFRDXAF_cjs.UnknownContractError; }
526
530
  });
527
531
  Object.defineProperty(exports, "UsageQuotaExceededError", {
528
532
  enumerable: true,
529
- get: function () { return chunkXIE7WJV3_cjs.UsageQuotaExceededError; }
533
+ get: function () { return chunkSPFRDXAF_cjs.UsageQuotaExceededError; }
530
534
  });
531
535
  Object.defineProperty(exports, "ValidationError", {
532
536
  enumerable: true,
533
- get: function () { return chunkXIE7WJV3_cjs.ValidationError; }
537
+ get: function () { return chunkSPFRDXAF_cjs.ValidationError; }
534
538
  });
535
539
  Object.defineProperty(exports, "createClient", {
536
540
  enumerable: true,
537
- get: function () { return chunkXIE7WJV3_cjs.createClient; }
541
+ get: function () { return chunkSPFRDXAF_cjs.createClient; }
538
542
  });
539
543
  Object.defineProperty(exports, "default", {
540
544
  enumerable: true,
541
- get: function () { return chunkXIE7WJV3_cjs.createClient; }
545
+ get: function () { return chunkSPFRDXAF_cjs.createClient; }
542
546
  });
543
547
  Object.defineProperty(exports, "entityTagOf", {
544
548
  enumerable: true,
545
- get: function () { return chunkXIE7WJV3_cjs.entityTagOf; }
549
+ get: function () { return chunkSPFRDXAF_cjs.entityTagOf; }
546
550
  });
547
551
  Object.defineProperty(exports, "isAssetEntry", {
548
552
  enumerable: true,
549
- get: function () { return chunkXIE7WJV3_cjs.isAssetEntry; }
553
+ get: function () { return chunkSPFRDXAF_cjs.isAssetEntry; }
550
554
  });
551
555
  Object.defineProperty(exports, "isPublishableKey", {
552
556
  enumerable: true,
553
- get: function () { return chunkXIE7WJV3_cjs.isPublishableKey; }
557
+ get: function () { return chunkSPFRDXAF_cjs.isPublishableKey; }
554
558
  });
555
559
  Object.defineProperty(exports, "isResourceNotFound", {
556
560
  enumerable: true,
557
- get: function () { return chunkXIE7WJV3_cjs.isResourceNotFound; }
561
+ get: function () { return chunkSPFRDXAF_cjs.isResourceNotFound; }
558
562
  });
559
563
  Object.defineProperty(exports, "matchRoute", {
560
564
  enumerable: true,
561
- get: function () { return chunkXIE7WJV3_cjs.matchRoute; }
565
+ get: function () { return chunkSPFRDXAF_cjs.matchRoute; }
562
566
  });
563
567
  Object.defineProperty(exports, "validateFile", {
564
568
  enumerable: true,
565
- get: function () { return chunkXIE7WJV3_cjs.validateFile; }
569
+ get: function () { return chunkSPFRDXAF_cjs.validateFile; }
566
570
  });
567
571
  Object.defineProperty(exports, "camelToSnake", {
568
572
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Change, a as ChangesExpiredError, b as ChangesExpiredReason } from './index-DBoPPlT1.cjs';
2
- export { A as ActiveSandbox, a5 as AdhocAggregateBlock, a4 as AdhocFetchBlock, a3 as AdhocQueryBuilder, a2 as AdhocQueryClient, aa as AdhocQueryDefinition, ab as AdhocQueryOptions, ad as AdhocQueryResult, a7 as AdhocSearchBlock, a6 as AggregateMetric, ae as AssetClient, ap as AssetEntryResponse, al as AssetFileBlock, af as AssetFileBuilder, am as AssetFileExtracted, ag as AssetUploadBuilder, ao as AssetUrls, ai as AssetVisibility, x as AutocompleteBuilder, J as AutocompleteResponse, I as AutocompleteSuggestion, X as BatchBuilder, W as BatchClient, Y as BatchMethod, Z as BatchOperation, $ as BatchOperationResult, _ as BatchOptions, a1 as BatchResponse, a0 as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, s as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, at as ConfirmInput, au as ConfirmResult, r as ContentByIdBuilder, n as ContentClient, q as ContentQueryBuilder, ax as CreateAssetOptions, E as ExtendedQueryResult, F as FeedChange, ak as FileBackend, aH as FileErrorCode, aj as FileStatus, an as FileStatusResult, aJ as FileUploadError, aI as FileUploadErrorCode, aL as FileValidationConstraints, aK as FileValidationError, a8 as FilterValue, a9 as FullTextConfig, H as HttpClient, L as LIVE_KEEPALIVE_INTERVAL_MS, m as LiveChangesOptions, az as MultipartCreateResult, aA as MultipartPart, aB as MultipartTarget, aq as PopulatedAssetReference, ar as PresignInput, as as PresignResult, P as Project, ac as QueryMetadata, R as Register, f as RegisteredSchema, av as ResolveUrlInput, aw as ResolveUrlResult, aE as ResourceConflictError, aF as ResourceExpiredError, aD as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, w as SearchBuilder, v as SearchClient, V as SearchEntry, O as SearchFields, N as SearchFilter, D as SearchHitMetadata, z as SearchMode, G as SearchResponse, B as SearchResultItem, Q as SearchSort, U as SearchTypeName, g as SendOptions, p as SettingsClient, u as SettingsFetchOptions, y as SimilarBuilder, M as SimilarResponse, K as SimilarResult, o as SingletonClient, t as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, aC as UploadProgress, ay as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ah as isAssetEntry, aG as isResourceNotFound, aM as validateFile } from './index-DBoPPlT1.cjs';
1
+ import { C as Change, a as ChangesExpiredError, b as ChangesExpiredReason } from './index-B9axQW8s.cjs';
2
+ export { A as ActiveSandbox, a6 as AdhocAggregateBlock, a5 as AdhocFetchBlock, a4 as AdhocQueryBuilder, a3 as AdhocQueryClient, ab as AdhocQueryDefinition, ac as AdhocQueryOptions, ae as AdhocQueryResult, a8 as AdhocSearchBlock, a7 as AggregateMetric, af as AssetClient, aq as AssetEntryResponse, am as AssetFileBlock, ag as AssetFileBuilder, an as AssetFileExtracted, ah as AssetUploadBuilder, ap as AssetUrls, aj as AssetVisibility, y as AutocompleteBuilder, K as AutocompleteResponse, J as AutocompleteSuggestion, Y as BatchBuilder, X as BatchClient, Z as BatchMethod, _ as BatchOperation, a0 as BatchOperationResult, $ as BatchOptions, a2 as BatchResponse, a1 as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, t as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, au as ConfirmInput, av as ConfirmResult, s as ContentByIdBuilder, o as ContentClient, r as ContentQueryBuilder, ay as CreateAssetOptions, E as ExtendedQueryResult, F as FeedChange, al as FileBackend, aI as FileErrorCode, ak as FileStatus, ao as FileStatusResult, aK as FileUploadError, aJ as FileUploadErrorCode, aM as FileValidationConstraints, aL as FileValidationError, a9 as FilterValue, aa as FullTextConfig, H as HttpClient, L as LIVE_KEEPALIVE_INTERVAL_MS, m as LIVE_SOCKET_OPEN_TIMEOUT_MS, n as LiveChangesOptions, aA as MultipartCreateResult, aB as MultipartPart, aC as MultipartTarget, ar as PopulatedAssetReference, as as PresignInput, at as PresignResult, P as Project, ad as QueryMetadata, R as Register, f as RegisteredSchema, aw as ResolveUrlInput, ax as ResolveUrlResult, aF as ResourceConflictError, aG as ResourceExpiredError, aE as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, x as SearchBuilder, w as SearchClient, W as SearchEntry, Q as SearchFields, O as SearchFilter, G as SearchHitMetadata, B as SearchMode, I as SearchResponse, D as SearchResultItem, U as SearchSort, V as SearchTypeName, g as SendOptions, q as SettingsClient, v as SettingsFetchOptions, z as SimilarBuilder, N as SimilarResponse, M as SimilarResult, p as SingletonClient, u as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, aD as UploadProgress, az as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ai as isAssetEntry, aH as isResourceNotFound, aN as validateFile } from './index-B9axQW8s.cjs';
3
3
  export { fields } from './schema/index.cjs';
4
4
  import { S as SDKError, B as BaseContent } from './index-B_rIWO_l.cjs';
5
5
  export { c as ApiMethod, A as ApiPath, w as ApiResponse, d as ApiSuccessBody, H as BaseValidationError, t as CacheConfig, y as CacheStrategy, k as ContentQueryResult, o as ContentTypeSchema, C as CreateInput, n as CustomQuery, D as DebugConfig, E as Environment, p as FieldOptions, F as FieldTypeName, J as InvalidPayloadError, L as LiveWebSocket, b as LiveWebSocketConstructor, z as LogLevel, M as MatchRouteOptions, P as PerformanceMetrics, Q as QueryOptions, u as RealtimeConfig, r as RealtimeEvent, q as RealtimeEventType, R as RelyIOConfig, a as RelyIOConfigUpdate, v as RequestConfig, x as RetryConfig, e as RouteMatch, l as SingletonContent, j as SortOptions, s as SubscriptionOptions, U as UpdateInput, I as ValidationError, V as ValidationRule, G as ValidationViolation, h as WhereClause, g as WhereFieldCondition, i as WhereOperator, f as WhereScalar, W as Wire, m as matchRoute } from './index-B_rIWO_l.cjs';
@@ -59,10 +59,11 @@ declare const isPublishableKey: (apiKey: string | undefined) => boolean;
59
59
  * `reached()` with the cursor `feed.opened` names, so a socket dropped before its
60
60
  * first change reconnects from that cursor instead of re-reading everything.
61
61
  *
62
- * The long-poll calls neither: `relyio.changes()` takes the public
63
- * `ChangesOptions`, which carries neither, so its back-off resets only on a
64
- * delivered change and a failure before its first change resyncs — as before
65
- * this loop existed.
62
+ * The long-poll never calls `opened()`, so its back-off resets only on a
63
+ * delivered change. It calls `reached()` once, opened without a cursor, with the
64
+ * head its first poll answered (REL-1513) — the position it starts from, and
65
+ * where a failure before its first change reopens — and never with a later
66
+ * empty page's cursor, which for a filtered feed is past rows the filter hid.
66
67
  */
67
68
 
68
69
  /** The ceiling of the first wait after a failure worth retrying; doubled per consecutive failure. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Change, a as ChangesExpiredError, b as ChangesExpiredReason } from './index-yRJ2IqM_.js';
2
- export { A as ActiveSandbox, a5 as AdhocAggregateBlock, a4 as AdhocFetchBlock, a3 as AdhocQueryBuilder, a2 as AdhocQueryClient, aa as AdhocQueryDefinition, ab as AdhocQueryOptions, ad as AdhocQueryResult, a7 as AdhocSearchBlock, a6 as AggregateMetric, ae as AssetClient, ap as AssetEntryResponse, al as AssetFileBlock, af as AssetFileBuilder, am as AssetFileExtracted, ag as AssetUploadBuilder, ao as AssetUrls, ai as AssetVisibility, x as AutocompleteBuilder, J as AutocompleteResponse, I as AutocompleteSuggestion, X as BatchBuilder, W as BatchClient, Y as BatchMethod, Z as BatchOperation, $ as BatchOperationResult, _ as BatchOptions, a1 as BatchResponse, a0 as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, s as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, at as ConfirmInput, au as ConfirmResult, r as ContentByIdBuilder, n as ContentClient, q as ContentQueryBuilder, ax as CreateAssetOptions, E as ExtendedQueryResult, F as FeedChange, ak as FileBackend, aH as FileErrorCode, aj as FileStatus, an as FileStatusResult, aJ as FileUploadError, aI as FileUploadErrorCode, aL as FileValidationConstraints, aK as FileValidationError, a8 as FilterValue, a9 as FullTextConfig, H as HttpClient, L as LIVE_KEEPALIVE_INTERVAL_MS, m as LiveChangesOptions, az as MultipartCreateResult, aA as MultipartPart, aB as MultipartTarget, aq as PopulatedAssetReference, ar as PresignInput, as as PresignResult, P as Project, ac as QueryMetadata, R as Register, f as RegisteredSchema, av as ResolveUrlInput, aw as ResolveUrlResult, aE as ResourceConflictError, aF as ResourceExpiredError, aD as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, w as SearchBuilder, v as SearchClient, V as SearchEntry, O as SearchFields, N as SearchFilter, D as SearchHitMetadata, z as SearchMode, G as SearchResponse, B as SearchResultItem, Q as SearchSort, U as SearchTypeName, g as SendOptions, p as SettingsClient, u as SettingsFetchOptions, y as SimilarBuilder, M as SimilarResponse, K as SimilarResult, o as SingletonClient, t as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, aC as UploadProgress, ay as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ah as isAssetEntry, aG as isResourceNotFound, aM as validateFile } from './index-yRJ2IqM_.js';
1
+ import { C as Change, a as ChangesExpiredError, b as ChangesExpiredReason } from './index-GIfaMlQ7.js';
2
+ export { A as ActiveSandbox, a6 as AdhocAggregateBlock, a5 as AdhocFetchBlock, a4 as AdhocQueryBuilder, a3 as AdhocQueryClient, ab as AdhocQueryDefinition, ac as AdhocQueryOptions, ae as AdhocQueryResult, a8 as AdhocSearchBlock, a7 as AggregateMetric, af as AssetClient, aq as AssetEntryResponse, am as AssetFileBlock, ag as AssetFileBuilder, an as AssetFileExtracted, ah as AssetUploadBuilder, ap as AssetUrls, aj as AssetVisibility, y as AutocompleteBuilder, K as AutocompleteResponse, J as AutocompleteSuggestion, Y as BatchBuilder, X as BatchClient, Z as BatchMethod, _ as BatchOperation, a0 as BatchOperationResult, $ as BatchOptions, a2 as BatchResponse, a1 as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, t as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, au as ConfirmInput, av as ConfirmResult, s as ContentByIdBuilder, o as ContentClient, r as ContentQueryBuilder, ay as CreateAssetOptions, E as ExtendedQueryResult, F as FeedChange, al as FileBackend, aI as FileErrorCode, ak as FileStatus, ao as FileStatusResult, aK as FileUploadError, aJ as FileUploadErrorCode, aM as FileValidationConstraints, aL as FileValidationError, a9 as FilterValue, aa as FullTextConfig, H as HttpClient, L as LIVE_KEEPALIVE_INTERVAL_MS, m as LIVE_SOCKET_OPEN_TIMEOUT_MS, n as LiveChangesOptions, aA as MultipartCreateResult, aB as MultipartPart, aC as MultipartTarget, ar as PopulatedAssetReference, as as PresignInput, at as PresignResult, P as Project, ad as QueryMetadata, R as Register, f as RegisteredSchema, aw as ResolveUrlInput, ax as ResolveUrlResult, aF as ResourceConflictError, aG as ResourceExpiredError, aE as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, x as SearchBuilder, w as SearchClient, W as SearchEntry, Q as SearchFields, O as SearchFilter, G as SearchHitMetadata, B as SearchMode, I as SearchResponse, D as SearchResultItem, U as SearchSort, V as SearchTypeName, g as SendOptions, q as SettingsClient, v as SettingsFetchOptions, z as SimilarBuilder, N as SimilarResponse, M as SimilarResult, p as SingletonClient, u as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, aD as UploadProgress, az as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ai as isAssetEntry, aH as isResourceNotFound, aN as validateFile } from './index-GIfaMlQ7.js';
3
3
  export { fields } from './schema/index.js';
4
4
  import { S as SDKError, B as BaseContent } from './index-Cv4tmcrw.js';
5
5
  export { c as ApiMethod, A as ApiPath, w as ApiResponse, d as ApiSuccessBody, H as BaseValidationError, t as CacheConfig, y as CacheStrategy, k as ContentQueryResult, o as ContentTypeSchema, C as CreateInput, n as CustomQuery, D as DebugConfig, E as Environment, p as FieldOptions, F as FieldTypeName, J as InvalidPayloadError, L as LiveWebSocket, b as LiveWebSocketConstructor, z as LogLevel, M as MatchRouteOptions, P as PerformanceMetrics, Q as QueryOptions, u as RealtimeConfig, r as RealtimeEvent, q as RealtimeEventType, R as RelyIOConfig, a as RelyIOConfigUpdate, v as RequestConfig, x as RetryConfig, e as RouteMatch, l as SingletonContent, j as SortOptions, s as SubscriptionOptions, U as UpdateInput, I as ValidationError, V as ValidationRule, G as ValidationViolation, h as WhereClause, g as WhereFieldCondition, i as WhereOperator, f as WhereScalar, W as Wire, m as matchRoute } from './index-Cv4tmcrw.js';
@@ -59,10 +59,11 @@ declare const isPublishableKey: (apiKey: string | undefined) => boolean;
59
59
  * `reached()` with the cursor `feed.opened` names, so a socket dropped before its
60
60
  * first change reconnects from that cursor instead of re-reading everything.
61
61
  *
62
- * The long-poll calls neither: `relyio.changes()` takes the public
63
- * `ChangesOptions`, which carries neither, so its back-off resets only on a
64
- * delivered change and a failure before its first change resyncs — as before
65
- * this loop existed.
62
+ * The long-poll never calls `opened()`, so its back-off resets only on a
63
+ * delivered change. It calls `reached()` once, opened without a cursor, with the
64
+ * head its first poll answered (REL-1513) — the position it starts from, and
65
+ * where a failure before its first change reopens — and never with a later
66
+ * empty page's cursor, which for a filtered feed is past rows the filter hid.
66
67
  */
67
68
 
68
69
  /** The ceiling of the first wait after a failure worth retrying; doubled per consecutive failure. */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { defineAssetType, defineComponent, defineContentType, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, fields, fieldset } from './chunk-YEJUMW4X.js';
2
- import { LiveEdgeError, SDKError, serviceInstructedDelayMs, VISITOR_ADMISSION_RETRY_AFTER_SECONDS, isAborted, sleep } from './chunk-QFHVF3YF.js';
3
- export { AdhocQueryBuilder, AdhocQueryClient, AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, AutocompleteBuilder, BaseValidationError, BatchBuilder, BatchClient, ChangesExpiredError, ConnectionError, ContentByIdBuilder, ContentClient, ContentQueryBuilder, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, SearchBuilder, SearchClient, ServerError, ServiceIndeterminateError, SettingsClient, SimilarBuilder, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, entityTagOf, isAssetEntry, isPublishableKey, isResourceNotFound, matchRoute, validateFile } from './chunk-QFHVF3YF.js';
2
+ import { LiveEdgeError, SDKError, serviceInstructedDelayMs, VISITOR_ADMISSION_RETRY_AFTER_SECONDS, isAborted, sleep } from './chunk-LGNJIGHL.js';
3
+ export { AdhocQueryBuilder, AdhocQueryClient, AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, AutocompleteBuilder, BaseValidationError, BatchBuilder, BatchClient, ChangesExpiredError, ConnectionError, ContentByIdBuilder, ContentClient, ContentQueryBuilder, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, SearchBuilder, SearchClient, ServerError, ServiceIndeterminateError, SettingsClient, SimilarBuilder, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, entityTagOf, isAssetEntry, isPublishableKey, isResourceNotFound, matchRoute, validateFile } from './chunk-LGNJIGHL.js';
4
4
  import './chunk-BBUB7C2Z.js';
5
5
  import './chunk-IY5LSKXU.js';
6
6
  export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './chunk-H6IBQSMM.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relyio/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "RelyIO is coming soon — this package is not ready for general use yet.",
5
5
  "keywords": [
6
6
  "relyio"
@@ -85,8 +85,8 @@
85
85
  "typedoc": "^0.28.20",
86
86
  "typescript": "npm:@typescript/typescript6@6.0.2",
87
87
  "vitest": "4.1.11",
88
- "@relyio/api-contract": "0.1.0",
89
- "@relyio/eslint-config": "0.0.0"
88
+ "@relyio/eslint-config": "0.0.0",
89
+ "@relyio/api-contract": "0.1.0"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "typescript": ">=4.9.0"