@relyio/sdk 0.8.0 → 0.10.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.
@@ -208,6 +208,23 @@ interface paths {
208
208
  patch?: never;
209
209
  trace?: never;
210
210
  };
211
+ '/internal/usage/stops': {
212
+ parameters: {
213
+ query?: never;
214
+ header?: never;
215
+ path?: never;
216
+ cookie?: never;
217
+ };
218
+ get?: never;
219
+ put?: never;
220
+ /** Record the Usage Limit stops an edge refused */
221
+ post: operations['recordUsageStops'];
222
+ delete?: never;
223
+ options?: never;
224
+ head?: never;
225
+ patch?: never;
226
+ trace?: never;
227
+ };
211
228
  '/v1/{contentType}': {
212
229
  parameters: {
213
230
  query?: never;
@@ -1094,7 +1111,7 @@ interface components {
1094
1111
  ErrorResponse: {
1095
1112
  error: {
1096
1113
  /** @enum {string} */
1097
- code: 'ACCESS_DENIED' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_DELETE_BLOCKED' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED';
1114
+ code: 'ACCESS_DENIED' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_DELETE_BLOCKED' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED' | 'USER_NOT_PROVISIONED';
1098
1115
  messages: string[];
1099
1116
  details?: {
1100
1117
  [key: string]: unknown;
@@ -1495,7 +1512,7 @@ interface components {
1495
1512
  id?: string;
1496
1513
  error: {
1497
1514
  /** @enum {string} */
1498
- code: 'ACCESS_DENIED' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_DELETE_BLOCKED' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED';
1515
+ code: 'ACCESS_DENIED' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_DELETE_BLOCKED' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED' | 'USER_NOT_PROVISIONED';
1499
1516
  messages: string[];
1500
1517
  details?: {
1501
1518
  [key: string]: unknown;
@@ -2140,6 +2157,65 @@ interface operations {
2140
2157
  };
2141
2158
  };
2142
2159
  };
2160
+ recordUsageStops: {
2161
+ parameters: {
2162
+ query?: never;
2163
+ header?: never;
2164
+ path?: never;
2165
+ cookie?: never;
2166
+ };
2167
+ requestBody?: never;
2168
+ responses: {
2169
+ /** @description Success. */
2170
+ 200: {
2171
+ headers: {
2172
+ [name: string]: unknown;
2173
+ };
2174
+ content: {
2175
+ 'application/json': {
2176
+ /** @description The payload itself. */
2177
+ data: unknown;
2178
+ };
2179
+ };
2180
+ };
2181
+ /** @description REQUEST_INVALID */
2182
+ 400: {
2183
+ headers: {
2184
+ [name: string]: unknown;
2185
+ };
2186
+ content: {
2187
+ 'application/json': components['schemas']['RefusalRequestInvalid'];
2188
+ };
2189
+ };
2190
+ /** @description ACCESS_DENIED */
2191
+ 403: {
2192
+ headers: {
2193
+ [name: string]: unknown;
2194
+ };
2195
+ content: {
2196
+ 'application/json': components['schemas']['RefusalAccessDenied'];
2197
+ };
2198
+ };
2199
+ /** @description RESOURCE_NOT_FOUND */
2200
+ 404: {
2201
+ headers: {
2202
+ [name: string]: unknown;
2203
+ };
2204
+ content: {
2205
+ 'application/json': components['schemas']['RefusalResourceNotFound'];
2206
+ };
2207
+ };
2208
+ /** @description INTERNAL_ERROR */
2209
+ 500: {
2210
+ headers: {
2211
+ [name: string]: unknown;
2212
+ };
2213
+ content: {
2214
+ 'application/json': components['schemas']['RefusalInternalError'];
2215
+ };
2216
+ };
2217
+ };
2218
+ };
2143
2219
  listEntries: {
2144
2220
  parameters: {
2145
2221
  query?: {
@@ -1,4 +1,4 @@
1
- import { A as AnyFieldDefinition, c as FieldDefinition, k as AIConfig, v as FieldSchemaContext, x as FieldValues, y as DeclaredFields, aK as components, P as ContentTypeDefinition, a0 as SingletonContentTypeDefinition, aH as WorkflowDefinition, a9 as AssetTypeDefinition, W as InferContentType } from './define-content-type-cEGjIwT5.cjs';
1
+ import { A as AnyFieldDefinition, c as FieldDefinition, k as AIConfig, v as FieldSchemaContext, x as FieldValues, y as DeclaredFields, aK as components, P as ContentTypeDefinition, a0 as SingletonContentTypeDefinition, aH as WorkflowDefinition, a9 as AssetTypeDefinition, W as InferContentType } from './define-content-type-DfnTu26S.cjs';
2
2
 
3
3
  /**
4
4
  * Component definition matching @relyio/schema ComponentSchema
@@ -924,7 +924,7 @@ type ViewFilterValue = string | number | boolean | null | (string | number)[] |
924
924
  to: string | number | Date;
925
925
  } | ViewFilterRelativeDate | Date;
926
926
  /**
927
- * Simple filter condition
927
+ * One filter of a view: a field, an operator and the value it compares with.
928
928
  */
929
929
  interface ViewFilterCondition {
930
930
  /**
@@ -941,22 +941,11 @@ interface ViewFilterCondition {
941
941
  value?: ViewFilterValue;
942
942
  }
943
943
  /**
944
- * Grouped filter conditions with AND/OR logic
944
+ * A view's filter. A view's filters are a flat list joined by AND — the Filters the Studio's entry
945
+ * list takes, each drawn as a Chip — so there is no filter group: an OR within one field is
946
+ * `isAnyOf`. RelyIO refuses a group by name when you deploy.
945
947
  */
946
- interface ViewFilterGroup {
947
- /**
948
- * Logical operator to combine conditions
949
- */
950
- operator: 'and' | 'or';
951
- /**
952
- * Array of conditions in this group
953
- */
954
- conditions: ViewFilterCondition[];
955
- }
956
- /**
957
- * Filter configuration can be simple conditions or groups
958
- */
959
- type ViewFilter = ViewFilterCondition | ViewFilterGroup;
948
+ type ViewFilter = ViewFilterCondition;
960
949
  /**
961
950
  * View definition configuration
962
951
  */
@@ -987,8 +976,12 @@ interface ViewConfig {
987
976
  */
988
977
  scope: ViewScopeConfig;
989
978
  /**
990
- * Filter conditions (optional)
991
- * Simple array of conditions will be combined with AND
979
+ * Filter conditions (optional), combined with AND. A flat list: an OR within one field is
980
+ * `isAnyOf`, and there is no filter group.
981
+ *
982
+ * Deploy judges each against the entries the view lists: the field must be one they can be
983
+ * narrowed by, and it must offer the operator — a boolean field takes `is` with `true` or
984
+ * `false`, for example, not `isTrue`.
992
985
  */
993
986
  filters?: ViewFilter[];
994
987
  /**
@@ -1217,4 +1210,4 @@ type SchemaAssetTypeNames<T extends AnySchemaDefinition> = NonNullable<T['assetT
1217
1210
  */
1218
1211
  type SchemaLocaleCodes<T extends AnySchemaDefinition> = NonNullable<T['locales']> extends readonly LocaleDefinition[] ? NonNullable<T['locales']>[number]['code'] : never;
1219
1212
 
1220
- export { type ViewFilterCondition as $, defineRole as A, isRoleDefinition as B, type ComponentConfig as C, isBuiltInRole as D, getBuiltInRoleActions as E, BUILT_IN_ROLES as F, BUILT_IN_ROLE_ACTIONS as G, type BuiltInRole as H, type InferSettingsGroup as I, type RoleAction as J, type ResourcePermission as K, type LocaleOptions as L, type FieldVisibility as M, type RoleConfig as N, type RoleDefinition as O, defineView as P, type ContentTypeScopeConfig as Q, ROLE_ACTIONS as R, type SchemaConfig as S, type TextDirection as T, type ContentTypesScopeConfig as U, type ViewScopeConfig as V, type EntryTypeScopeConfig as W, type AllScopeConfig as X, type ViewFilterOperator as Y, type ViewFilterValue as Z, type ViewFilterRelativeDate as _, type SchemaDefinition as a, type ViewFilterGroup as a0, type ViewFilter as a1, type ViewConfig as a2, type ViewDefinition as a3, defineQuery as a4, type QueryConfig as a5, type QueryDefinition as a6, type QueryType as a7, type FullTextSearch as a8, type FetchBlock as a9, type AggregateBlock as aa, type SearchBlock as ab, type WhereCondition as ac, type WhereValue as ad, type WhereOperator as ae, type HavingOperator as af, type QueryScalar as ag, type SortCondition as ah, type SortDirection as ai, type IncludeDefinition as aj, type IncludeRelationship as ak, type IncludeSelection as al, type SelectMapping as am, type FilterDefinition as an, type CachePolicy as ao, type CachePolicyObject as ap, type IncludeSubQuery as aq, type IncludeSubQueries as ar, type Parameterizable as as, type QueryParameter as at, type QueryParameterType as au, type QueryCardinality as av, type InferQueryResponse as aw, type InferQueryParams as ax, type FilterOperator as ay, type SchemaContentTypeNames as b, type SchemaSingletonNames as c, defineSchema as d, type SchemaQueryNames as e, type SchemaLocaleCodes as f, type SchemaSettingsGroupNames as g, type SchemaAssetTypeNames as h, type SchemaEntry as i, type SchemaEntryOf as j, defineLocale as k, isLocaleDefinition as l, getLocaleCodes as m, findDefaultLocale as n, getActiveLocales as o, buildFallbackChain as p, type LocaleDefinition as q, defineComponent as r, type ComponentDefinition as s, type ComponentMetadata as t, type ComponentReusabilityMetadata as u, type ComponentValidationMetadata as v, defineSettingsGroup as w, type SettingsGroupConfig as x, type SettingsGroupDefinition as y, type SettingsGroupMetadata as z };
1213
+ export { type ViewFilterCondition as $, defineRole as A, isRoleDefinition as B, type ComponentConfig as C, isBuiltInRole as D, getBuiltInRoleActions as E, BUILT_IN_ROLES as F, BUILT_IN_ROLE_ACTIONS as G, type BuiltInRole as H, type InferSettingsGroup as I, type RoleAction as J, type ResourcePermission as K, type LocaleOptions as L, type FieldVisibility as M, type RoleConfig as N, type RoleDefinition as O, defineView as P, type ContentTypeScopeConfig as Q, ROLE_ACTIONS as R, type SchemaConfig as S, type TextDirection as T, type ContentTypesScopeConfig as U, type ViewScopeConfig as V, type EntryTypeScopeConfig as W, type AllScopeConfig as X, type ViewFilterOperator as Y, type ViewFilterValue as Z, type ViewFilterRelativeDate as _, type SchemaDefinition as a, type ViewFilter as a0, type ViewConfig as a1, type ViewDefinition as a2, defineQuery as a3, type QueryConfig as a4, type QueryDefinition as a5, type QueryType as a6, type FullTextSearch as a7, type FetchBlock as a8, type AggregateBlock as a9, type SearchBlock as aa, type WhereCondition as ab, type WhereValue as ac, type WhereOperator as ad, type HavingOperator as ae, type QueryScalar as af, type SortCondition as ag, type SortDirection as ah, type IncludeDefinition as ai, type IncludeRelationship as aj, type IncludeSelection as ak, type SelectMapping as al, type FilterDefinition as am, type CachePolicy as an, type CachePolicyObject as ao, type IncludeSubQuery as ap, type IncludeSubQueries as aq, type Parameterizable as ar, type QueryParameter as as, type QueryParameterType as at, type QueryCardinality as au, type InferQueryResponse as av, type InferQueryParams as aw, type FilterOperator as ax, type SchemaContentTypeNames as b, type SchemaSingletonNames as c, defineSchema as d, type SchemaQueryNames as e, type SchemaLocaleCodes as f, type SchemaSettingsGroupNames as g, type SchemaAssetTypeNames as h, type SchemaEntry as i, type SchemaEntryOf as j, defineLocale as k, isLocaleDefinition as l, getLocaleCodes as m, findDefaultLocale as n, getActiveLocales as o, buildFallbackChain as p, type LocaleDefinition as q, defineComponent as r, type ComponentDefinition as s, type ComponentMetadata as t, type ComponentReusabilityMetadata as u, type ComponentValidationMetadata as v, defineSettingsGroup as w, type SettingsGroupConfig as x, type SettingsGroupDefinition as y, type SettingsGroupMetadata as z };
@@ -1,4 +1,4 @@
1
- import { A as AnyFieldDefinition, c as FieldDefinition, k as AIConfig, v as FieldSchemaContext, x as FieldValues, y as DeclaredFields, aK as components, P as ContentTypeDefinition, a0 as SingletonContentTypeDefinition, aH as WorkflowDefinition, a9 as AssetTypeDefinition, W as InferContentType } from './define-content-type-cEGjIwT5.js';
1
+ import { A as AnyFieldDefinition, c as FieldDefinition, k as AIConfig, v as FieldSchemaContext, x as FieldValues, y as DeclaredFields, aK as components, P as ContentTypeDefinition, a0 as SingletonContentTypeDefinition, aH as WorkflowDefinition, a9 as AssetTypeDefinition, W as InferContentType } from './define-content-type-DfnTu26S.js';
2
2
 
3
3
  /**
4
4
  * Component definition matching @relyio/schema ComponentSchema
@@ -924,7 +924,7 @@ type ViewFilterValue = string | number | boolean | null | (string | number)[] |
924
924
  to: string | number | Date;
925
925
  } | ViewFilterRelativeDate | Date;
926
926
  /**
927
- * Simple filter condition
927
+ * One filter of a view: a field, an operator and the value it compares with.
928
928
  */
929
929
  interface ViewFilterCondition {
930
930
  /**
@@ -941,22 +941,11 @@ interface ViewFilterCondition {
941
941
  value?: ViewFilterValue;
942
942
  }
943
943
  /**
944
- * Grouped filter conditions with AND/OR logic
944
+ * A view's filter. A view's filters are a flat list joined by AND — the Filters the Studio's entry
945
+ * list takes, each drawn as a Chip — so there is no filter group: an OR within one field is
946
+ * `isAnyOf`. RelyIO refuses a group by name when you deploy.
945
947
  */
946
- interface ViewFilterGroup {
947
- /**
948
- * Logical operator to combine conditions
949
- */
950
- operator: 'and' | 'or';
951
- /**
952
- * Array of conditions in this group
953
- */
954
- conditions: ViewFilterCondition[];
955
- }
956
- /**
957
- * Filter configuration can be simple conditions or groups
958
- */
959
- type ViewFilter = ViewFilterCondition | ViewFilterGroup;
948
+ type ViewFilter = ViewFilterCondition;
960
949
  /**
961
950
  * View definition configuration
962
951
  */
@@ -987,8 +976,12 @@ interface ViewConfig {
987
976
  */
988
977
  scope: ViewScopeConfig;
989
978
  /**
990
- * Filter conditions (optional)
991
- * Simple array of conditions will be combined with AND
979
+ * Filter conditions (optional), combined with AND. A flat list: an OR within one field is
980
+ * `isAnyOf`, and there is no filter group.
981
+ *
982
+ * Deploy judges each against the entries the view lists: the field must be one they can be
983
+ * narrowed by, and it must offer the operator — a boolean field takes `is` with `true` or
984
+ * `false`, for example, not `isTrue`.
992
985
  */
993
986
  filters?: ViewFilter[];
994
987
  /**
@@ -1217,4 +1210,4 @@ type SchemaAssetTypeNames<T extends AnySchemaDefinition> = NonNullable<T['assetT
1217
1210
  */
1218
1211
  type SchemaLocaleCodes<T extends AnySchemaDefinition> = NonNullable<T['locales']> extends readonly LocaleDefinition[] ? NonNullable<T['locales']>[number]['code'] : never;
1219
1212
 
1220
- export { type ViewFilterCondition as $, defineRole as A, isRoleDefinition as B, type ComponentConfig as C, isBuiltInRole as D, getBuiltInRoleActions as E, BUILT_IN_ROLES as F, BUILT_IN_ROLE_ACTIONS as G, type BuiltInRole as H, type InferSettingsGroup as I, type RoleAction as J, type ResourcePermission as K, type LocaleOptions as L, type FieldVisibility as M, type RoleConfig as N, type RoleDefinition as O, defineView as P, type ContentTypeScopeConfig as Q, ROLE_ACTIONS as R, type SchemaConfig as S, type TextDirection as T, type ContentTypesScopeConfig as U, type ViewScopeConfig as V, type EntryTypeScopeConfig as W, type AllScopeConfig as X, type ViewFilterOperator as Y, type ViewFilterValue as Z, type ViewFilterRelativeDate as _, type SchemaDefinition as a, type ViewFilterGroup as a0, type ViewFilter as a1, type ViewConfig as a2, type ViewDefinition as a3, defineQuery as a4, type QueryConfig as a5, type QueryDefinition as a6, type QueryType as a7, type FullTextSearch as a8, type FetchBlock as a9, type AggregateBlock as aa, type SearchBlock as ab, type WhereCondition as ac, type WhereValue as ad, type WhereOperator as ae, type HavingOperator as af, type QueryScalar as ag, type SortCondition as ah, type SortDirection as ai, type IncludeDefinition as aj, type IncludeRelationship as ak, type IncludeSelection as al, type SelectMapping as am, type FilterDefinition as an, type CachePolicy as ao, type CachePolicyObject as ap, type IncludeSubQuery as aq, type IncludeSubQueries as ar, type Parameterizable as as, type QueryParameter as at, type QueryParameterType as au, type QueryCardinality as av, type InferQueryResponse as aw, type InferQueryParams as ax, type FilterOperator as ay, type SchemaContentTypeNames as b, type SchemaSingletonNames as c, defineSchema as d, type SchemaQueryNames as e, type SchemaLocaleCodes as f, type SchemaSettingsGroupNames as g, type SchemaAssetTypeNames as h, type SchemaEntry as i, type SchemaEntryOf as j, defineLocale as k, isLocaleDefinition as l, getLocaleCodes as m, findDefaultLocale as n, getActiveLocales as o, buildFallbackChain as p, type LocaleDefinition as q, defineComponent as r, type ComponentDefinition as s, type ComponentMetadata as t, type ComponentReusabilityMetadata as u, type ComponentValidationMetadata as v, defineSettingsGroup as w, type SettingsGroupConfig as x, type SettingsGroupDefinition as y, type SettingsGroupMetadata as z };
1213
+ export { type ViewFilterCondition as $, defineRole as A, isRoleDefinition as B, type ComponentConfig as C, isBuiltInRole as D, getBuiltInRoleActions as E, BUILT_IN_ROLES as F, BUILT_IN_ROLE_ACTIONS as G, type BuiltInRole as H, type InferSettingsGroup as I, type RoleAction as J, type ResourcePermission as K, type LocaleOptions as L, type FieldVisibility as M, type RoleConfig as N, type RoleDefinition as O, defineView as P, type ContentTypeScopeConfig as Q, ROLE_ACTIONS as R, type SchemaConfig as S, type TextDirection as T, type ContentTypesScopeConfig as U, type ViewScopeConfig as V, type EntryTypeScopeConfig as W, type AllScopeConfig as X, type ViewFilterOperator as Y, type ViewFilterValue as Z, type ViewFilterRelativeDate as _, type SchemaDefinition as a, type ViewFilter as a0, type ViewConfig as a1, type ViewDefinition as a2, defineQuery as a3, type QueryConfig as a4, type QueryDefinition as a5, type QueryType as a6, type FullTextSearch as a7, type FetchBlock as a8, type AggregateBlock as a9, type SearchBlock as aa, type WhereCondition as ab, type WhereValue as ac, type WhereOperator as ad, type HavingOperator as ae, type QueryScalar as af, type SortCondition as ag, type SortDirection as ah, type IncludeDefinition as ai, type IncludeRelationship as aj, type IncludeSelection as ak, type SelectMapping as al, type FilterDefinition as am, type CachePolicy as an, type CachePolicyObject as ao, type IncludeSubQuery as ap, type IncludeSubQueries as aq, type Parameterizable as ar, type QueryParameter as as, type QueryParameterType as at, type QueryCardinality as au, type InferQueryResponse as av, type InferQueryParams as aw, type FilterOperator as ax, type SchemaContentTypeNames as b, type SchemaSingletonNames as c, defineSchema as d, type SchemaQueryNames as e, type SchemaLocaleCodes as f, type SchemaSettingsGroupNames as g, type SchemaAssetTypeNames as h, type SchemaEntry as i, type SchemaEntryOf as j, defineLocale as k, isLocaleDefinition as l, getLocaleCodes as m, findDefaultLocale as n, getActiveLocales as o, buildFallbackChain as p, type LocaleDefinition as q, defineComponent as r, type ComponentDefinition as s, type ComponentMetadata as t, type ComponentReusabilityMetadata as u, type ComponentValidationMetadata as v, defineSettingsGroup as w, type SettingsGroupConfig as x, type SettingsGroupDefinition as y, type SettingsGroupMetadata as z };
@@ -1,4 +1,4 @@
1
- import { aJ as paths, Q as EntryMetadata, aK as components } from './define-content-type-cEGjIwT5.js';
1
+ import { aJ as paths, Q as EntryMetadata, aK as components } from './define-content-type-DfnTu26S.js';
2
2
 
3
3
  /**
4
4
  * Where the SDK's transport gets its truth.
@@ -1,6 +1,6 @@
1
- import { K as MergedRelyIOConfig, A as ApiPath, c as ApiMethod, N as PathParamsOf, w as ApiResponse, W as Wire, v as RequestConfig, B as BaseContent, h as WhereClause, Q as QueryOptions, j as SortOptions, k as ContentQueryResult, C as CreateInput, U as UpdateInput, S as SDKError, H as BaseValidationError, G as ValidationViolation, R as RelyIOConfig, a as RelyIOConfigUpdate } from './index-B_rIWO_l.cjs';
2
- import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-cEGjIwT5.cjs';
3
- import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf, ay as FilterOperator, h as SchemaAssetTypeNames, c as SchemaSingletonNames, g as SchemaSettingsGroupNames, I as InferSettingsGroup, e as SchemaQueryNames, f as SchemaLocaleCodes } from './define-schema-DgbJ5Kwn.cjs';
1
+ import { K as MergedRelyIOConfig, A as ApiPath, c as ApiMethod, N as PathParamsOf, w as ApiResponse, W as Wire, v as RequestConfig, B as BaseContent, h as WhereClause, Q as QueryOptions, j as SortOptions, k as ContentQueryResult, C as CreateInput, U as UpdateInput, S as SDKError, H as BaseValidationError, G as ValidationViolation, R as RelyIOConfig, a as RelyIOConfigUpdate } from './index-NnLCwSqF.cjs';
2
+ import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-DfnTu26S.cjs';
3
+ import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf, ax as FilterOperator, h as SchemaAssetTypeNames, c as SchemaSingletonNames, g as SchemaSettingsGroupNames, I as InferSettingsGroup, e as SchemaQueryNames, f as SchemaLocaleCodes } from './define-schema-W-0u1Jg1.cjs';
4
4
  import { VisitorResyncReason } from './live-visitor.js';
5
5
  import { DevUnreadableReason } from './dev-handshake/index.cjs';
6
6
 
@@ -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 };
@@ -1,4 +1,4 @@
1
- import { aJ as paths, Q as EntryMetadata, aK as components } from './define-content-type-cEGjIwT5.cjs';
1
+ import { aJ as paths, Q as EntryMetadata, aK as components } from './define-content-type-DfnTu26S.cjs';
2
2
 
3
3
  /**
4
4
  * Where the SDK's transport gets its truth.
@@ -1,6 +1,6 @@
1
- import { K as MergedRelyIOConfig, A as ApiPath, c as ApiMethod, N as PathParamsOf, w as ApiResponse, W as Wire, v as RequestConfig, B as BaseContent, h as WhereClause, Q as QueryOptions, j as SortOptions, k as ContentQueryResult, C as CreateInput, U as UpdateInput, S as SDKError, H as BaseValidationError, G as ValidationViolation, R as RelyIOConfig, a as RelyIOConfigUpdate } from './index-Cv4tmcrw.js';
2
- import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-cEGjIwT5.js';
3
- import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf, ay as FilterOperator, h as SchemaAssetTypeNames, c as SchemaSingletonNames, g as SchemaSettingsGroupNames, I as InferSettingsGroup, e as SchemaQueryNames, f as SchemaLocaleCodes } from './define-schema-BPj2srgh.js';
1
+ import { K as MergedRelyIOConfig, A as ApiPath, c as ApiMethod, N as PathParamsOf, w as ApiResponse, W as Wire, v as RequestConfig, B as BaseContent, h as WhereClause, Q as QueryOptions, j as SortOptions, k as ContentQueryResult, C as CreateInput, U as UpdateInput, S as SDKError, H as BaseValidationError, G as ValidationViolation, R as RelyIOConfig, a as RelyIOConfigUpdate } from './index-B9hDmCho.js';
2
+ import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-DfnTu26S.js';
3
+ import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf, ax as FilterOperator, h as SchemaAssetTypeNames, c as SchemaSingletonNames, g as SchemaSettingsGroupNames, I as InferSettingsGroup, e as SchemaQueryNames, f as SchemaLocaleCodes } from './define-schema-rbTrXxNN.js';
4
4
  import { VisitorResyncReason } from './live-visitor.js';
5
5
  import { DevUnreadableReason } from './dev-handshake/index.js';
6
6
 
@@ -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 };