@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.
- package/CHANGELOG.md +52 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/{chunk-72UK5U7T.cjs → chunk-2HP566NI.cjs} +10 -2
- package/dist/{chunk-QFHVF3YF.js → chunk-2L5JUW7O.js} +65 -21
- package/dist/{chunk-XIE7WJV3.cjs → chunk-DC4QLAI3.cjs} +65 -20
- package/dist/{chunk-YEJUMW4X.js → chunk-IGHYC2WM.js} +10 -2
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +1 -1
- package/dist/{define-content-type-cEGjIwT5.d.cts → define-content-type-DfnTu26S.d.cts} +78 -2
- package/dist/{define-content-type-cEGjIwT5.d.ts → define-content-type-DfnTu26S.d.ts} +78 -2
- package/dist/{define-schema-DgbJ5Kwn.d.cts → define-schema-W-0u1Jg1.d.cts} +13 -20
- package/dist/{define-schema-BPj2srgh.d.ts → define-schema-rbTrXxNN.d.ts} +13 -20
- package/dist/{index-Cv4tmcrw.d.ts → index-B9hDmCho.d.ts} +1 -1
- package/dist/{index-DBoPPlT1.d.cts → index-KuYgc7eG.d.cts} +80 -14
- package/dist/{index-B_rIWO_l.d.cts → index-NnLCwSqF.d.cts} +1 -1
- package/dist/{index-yRJ2IqM_.d.ts → index-rLEBSFvK.d.ts} +80 -14
- package/dist/index.cjs +85 -81
- package/dist/index.d.cts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.js +3 -3
- package/dist/schema/index.cjs +35 -35
- package/dist/schema/index.d.cts +3 -3
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
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-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
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,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-
|
|
2
|
-
import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-
|
|
3
|
-
import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf,
|
|
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,
|
|
2979
|
-
* opens (a network that blocks sockets)
|
|
2980
|
-
*
|
|
2981
|
-
*
|
|
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
|
|
3012
|
-
*
|
|
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,
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
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
|
|
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,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-
|
|
2
|
-
import { aK as components, aJ as paths, W as InferContentType, aa as InferAssetType, a3 as InferSingleton } from './define-content-type-
|
|
3
|
-
import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf,
|
|
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,
|
|
2979
|
-
* opens (a network that blocks sockets)
|
|
2980
|
-
*
|
|
2981
|
-
*
|
|
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
|
|
3012
|
-
*
|
|
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,
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
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
|
|
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 };
|