@relyio/sdk 0.17.0 → 0.19.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/automations/index.cjs +71 -0
  3. package/dist/automations/index.d.cts +1590 -0
  4. package/dist/automations/index.d.ts +1590 -0
  5. package/dist/automations/index.js +6 -0
  6. package/dist/{chunk-RSHMA4KT.cjs → chunk-2SPPU2WG.cjs} +68 -68
  7. package/dist/{chunk-VS2DEUTN.js → chunk-356SF5Y2.js} +463 -26
  8. package/dist/chunk-5F3YYPLZ.cjs +19237 -0
  9. package/dist/chunk-7I3SC7SV.cjs +40 -0
  10. package/dist/chunk-DBYMG6MQ.cjs +535 -0
  11. package/dist/chunk-DI6KFDBO.js +43 -0
  12. package/dist/chunk-HDHBYYEY.js +36 -0
  13. package/dist/chunk-L6DXCKVQ.cjs +50 -0
  14. package/dist/{chunk-TZL374LS.cjs → chunk-M7MWNV3Q.cjs} +21 -21
  15. package/dist/{chunk-H6IBQSMM.js → chunk-NJQK5STK.js} +3 -3
  16. package/dist/chunk-NN45CSPZ.cjs +872 -0
  17. package/dist/{chunk-6E22GYPB.cjs → chunk-P23G5NXD.cjs} +781 -337
  18. package/dist/chunk-PZCDJFMA.js +19195 -0
  19. package/dist/chunk-T7LGREB3.js +848 -0
  20. package/dist/{chunk-BBUB7C2Z.js → chunk-W2A4OTCI.js} +3 -3
  21. package/dist/chunk-W2GRVXDG.js +520 -0
  22. package/dist/{chunk-5UMY6CS4.js → chunk-ZAKEY6DY.js} +3 -3
  23. package/dist/{chunk-LSRPMNPT.cjs → chunk-ZO6QDYJG.cjs} +7 -7
  24. package/dist/client/index.cjs +8 -7
  25. package/dist/client/index.d.cts +4 -3
  26. package/dist/client/index.d.ts +4 -3
  27. package/dist/client/index.js +6 -5
  28. package/dist/{define-content-type-AuL9-oz6.d.cts → define-content-type-BZ6X8GvL.d.cts} +4547 -842
  29. package/dist/{define-content-type-BGoQxqLf.d.ts → define-content-type-C12jh8cY.d.ts} +4547 -842
  30. package/dist/{define-schema-DgCX9YB7.d.ts → define-schema-BPlZl4a2.d.cts} +258 -10
  31. package/dist/{define-schema-DkXwpp0I.d.cts → define-schema-CK7TtYot.d.ts} +258 -10
  32. package/dist/dev-handshake/index.cjs +9 -9
  33. package/dist/dev-handshake/index.js +2 -2
  34. package/dist/extensions/index.cjs +100 -0
  35. package/dist/extensions/index.d.cts +6 -0
  36. package/dist/extensions/index.d.ts +6 -0
  37. package/dist/extensions/index.js +96 -0
  38. package/dist/functions/index.cjs +71 -0
  39. package/dist/functions/index.d.cts +6 -0
  40. package/dist/functions/index.d.ts +6 -0
  41. package/dist/functions/index.js +62 -0
  42. package/dist/{index-BBp8_tn9.d.ts → index-BxNnlc5D.d.ts} +167 -494
  43. package/dist/{index-DaMZ4FQ_.d.ts → index-C-MymZTe.d.ts} +1 -1
  44. package/dist/{index-DxRmKPrR.d.cts → index-D5jyIeQ5.d.cts} +167 -494
  45. package/dist/{index-Bp4AiNT3.d.cts → index-DN0l8RHw.d.cts} +1 -1
  46. package/dist/index.cjs +208 -185
  47. package/dist/index.d.cts +147 -17
  48. package/dist/index.d.ts +147 -17
  49. package/dist/index.js +11 -16
  50. package/dist/markdown/index.cjs +382 -382
  51. package/dist/markdown/index.js +1 -1
  52. package/dist/preview/index.cjs +11 -10
  53. package/dist/preview/index.js +3 -2
  54. package/dist/register-BiMQKVp-.d.ts +693 -0
  55. package/dist/register-DeMsaurp.d.cts +693 -0
  56. package/dist/rich-text/index.cjs +12 -12
  57. package/dist/rich-text/index.d.cts +2 -2
  58. package/dist/rich-text/index.d.ts +2 -2
  59. package/dist/rich-text/index.js +2 -2
  60. package/dist/schema/index.cjs +63 -34
  61. package/dist/schema/index.d.cts +14 -5
  62. package/dist/schema/index.d.ts +14 -5
  63. package/dist/schema/index.js +3 -2
  64. package/dist/types/index.d.cts +1 -1
  65. package/dist/types/index.d.ts +1 -1
  66. package/dist/utils/index.cjs +20 -20
  67. package/dist/utils/index.js +2 -2
  68. package/package.json +23 -5
  69. package/dist/chunk-6PTRZP5U.cjs +0 -433
  70. package/dist/chunk-DIZY6CKM.js +0 -950
  71. package/dist/chunk-GHYB6IZK.cjs +0 -983
  72. package/dist/chunk-MWMSFIWN.cjs +0 -17
  73. package/dist/chunk-OVMIHAYK.js +0 -411
  74. package/dist/chunk-XQ4QHWZE.js +0 -13
@@ -1,143 +1,8 @@
1
- import { d2 as paths, cW as RetryConfig, d3 as MergedRelyIOConfig, cV as ApiResponse, aM as EntryMetadata, ap as Reading, cs as BaseContent, al as CheckedIncludes, d4 as ReadWhere, cx as WhereClause, d5 as components, aq as ReadWith, cI as UpdateInput, at as UntypedReading, cC as RevisedContent, cA as CreateInput, cB as CreatedContent, cH as ContentVersionRow, cG as ContentVersion, cF as RestoredContent, cl as SDKError, c$ as BaseValidationError, c_ as ValidationViolation, b2 as AssetServedBlocks, d6 as CheckedInclude, cw as WhereFieldCondition, cq as AssetFileBlock, ct as BaseSingleton, cD as WrittenSingleton, cu as BaseSettingsGroup, cE as WrittenSettingsGroup, aN as InferContentType, an as ContentReading, aT as InferSingleton, cm as RelyIOConfig, b0 as InferAssetType, ak as AssetReading, as as SingletonReading, aY as InferSettingsGroup, ar as SettingsReading, cn as RelyIOConfigUpdate } from './define-content-type-BGoQxqLf.js';
2
- import { a as SchemaDefinition, b as SchemaContentTypeNames, j as SchemaEntryOf, f as SchemaLocaleCodes, c as SchemaSingletonNames, A as AggregateBlock, K as QueryParameterValue, F as FullTextSearch, e as SchemaQueryNames, J as InferQueryParams, L as AnyQueryParameters, h as SchemaAssetTypeNames, g as SchemaSettingsGroupNames } from './define-schema-DgCX9YB7.js';
1
+ import { e as ApiPath, f as ApiMethod, Q as QueryOf, W as Wire, H as HttpClient, A as AnySchemaDefinition, l as RecordsClient, B as BaseRecord, y as RecordBatchOperation, C as RecordBatchOptions, b as RecordBatchResult, R as RegisteredSchema } from './register-BiMQKVp-.js';
2
+ import { aW as EntryMetadata, ay as Reading, da as BaseContent, au as CheckedIncludes, dL as ReadWhere, df as WhereClause, cR as components, az as ReadWith, dr as UpdateInput, aC as UntypedReading, dk as RevisedContent, di as CreateInput, dj as CreatedContent, dq as ContentVersionRow, dp as ContentVersion, dn as RestoredContent, d3 as SDKError, dI as BaseValidationError, dH as ValidationViolation, bc as AssetServedBlocks, dM as CheckedInclude, de as WhereFieldCondition, d8 as AssetFileBlock, db as BaseSingleton, dl as WrittenSingleton, dc as BaseSettingsGroup, dm as WrittenSettingsGroup, aX as InferContentType, aw as ContentReading, b1 as InferSingleton, c$ as paths, d4 as RelyIOConfig, ba as InferAssetType, at as AssetReading, aB as SingletonReading, b6 as InferSettingsGroup, aA as SettingsReading, d5 as RelyIOConfigUpdate, d1 as MergedRelyIOConfig } from './define-content-type-C12jh8cY.js';
3
+ import { b as SchemaContentTypeNames, k as SchemaEntryOf, f as SchemaLocaleCodes, c as SchemaSingletonNames, y as AggregateBlock, a5 as QueryParameterValue, w as FullTextSearch, e as SchemaQueryNames, a4 as InferQueryParams, a6 as AnyQueryParameters, i as SchemaRecordTypeNames, I as InferRecordType, r as RecordWriteFieldsOf, q as RecordUpdateFieldsOf, h as SchemaAssetTypeNames, g as SchemaSettingsGroupNames } from './define-schema-CK7TtYot.js';
3
4
  import { DevUnreadableReason } from './dev-handshake/index.js';
4
5
 
5
- /**
6
- * Where the SDK's transport gets its truth.
7
- *
8
- * Every route this client calls is named by its **path template as the
9
- * committed document spells it**, and the body type it expects is read out of
10
- * that document rather than written down here. `api-schema.ts` beside this file
11
- * is generated by `pnpm api:types` from `apps/services/api/openapi-spec.json`,
12
- * which is itself generated from that service's `RouteContract`s
13
- * (`INV-API-DOCUMENT-IS-DERIVED`). So the chain is: one declaration in
14
- * `routes.ts` → the serializer that produces the body → the document → these
15
- * types → the method that reads it.
16
- *
17
- * That chain is the answer to the question this phase exists to close. Before
18
- * it, six SDK methods read a key the server does not send; each had no caller
19
- * and no test, so nothing could see them. Now:
20
- *
21
- * - A route that changes **kind** — `collection` to `object`, say — changes
22
- * whether the document's 200 body carries `page` and whether `data` is an
23
- * array. `Wire<…>` follows, `readPayload` follows, and the method's declared
24
- * return type stops matching. `tsc` names the method.
25
- * - A route that changes **path** or is deleted stops being a `keyof paths`, so
26
- * the call site fails on the literal.
27
- * - A route that changes **dialect** changes `page` from `CursorPage` to
28
- * `OffsetPage`, and anything reading `nextCursor` fails.
29
- *
30
- * `/v1` lives in these templates because it lives in the document
31
- * (`INV-API-VERSION-IS-DECIDED-ONCE`). Before this phase the SDK's base URL was
32
- * `https://api.relyio.com` and its paths were `/{contentType}`, so every
33
- * versioned request went to a path the router does not serve.
34
- *
35
- * Spec: `devtools/docs/guide/engineering/api-contract-spec.md`,
36
- * `INV-API-CLIENT-IS-DERIVED`.
37
- */
38
-
39
- /** Every path the committed document declares. */
40
- type ApiPath = keyof paths;
41
- type Verb$1 = 'get' | 'post' | 'put' | 'patch' | 'delete';
42
- /** The verbs the document declares on this path — not the seven HTTP has. */
43
- type ApiMethod<P extends ApiPath> = {
44
- [M in Verb$1]: M extends keyof paths[P] ? paths[P][M] extends {
45
- responses: unknown;
46
- } ? M : never : never;
47
- }[Verb$1];
48
- type Operation<P extends ApiPath, M extends ApiMethod<P>> = M extends keyof paths[P] ? paths[P][M] : never;
49
- type JsonBody<R> = R extends {
50
- content: {
51
- 'application/json': infer B;
52
- };
53
- } ? B : never;
54
- /**
55
- * The success body the document declares, preferring 200 where a route serves
56
- * both. A route with neither — `kind: 'empty'`, which serves 204 — resolves to
57
- * `never`, and `readPayload` cannot be called on it.
58
- */
59
- type ApiSuccessBody<P extends ApiPath, M extends ApiMethod<P>> = Operation<P, M> extends {
60
- responses: infer R;
61
- } ? 200 extends keyof R ? JsonBody<R[200]> : 201 extends keyof R ? JsonBody<R[201]> : never : never;
62
- /**
63
- * The document's success body with the payload typed as the caller's `T`.
64
- *
65
- * The array arm is tested **first** on purpose: `{ data: unknown[] }` also
66
- * satisfies `{ data: unknown }`, so the object arm would swallow every
67
- * collection and hand a list route's caller a single entity — which is the
68
- * exact defect class (`ContentClient.children` reading `.data.items` from an
69
- * object route) that this phase makes unrepresentable.
70
- */
71
- type Wire<P extends ApiPath, M extends ApiMethod<P>, T> = ApiSuccessBody<P, M> extends {
72
- data: unknown[];
73
- } ? Omit<ApiSuccessBody<P, M>, 'data'> & {
74
- data: T[];
75
- } : ApiSuccessBody<P, M> extends {
76
- data: unknown;
77
- } ? Omit<ApiSuccessBody<P, M>, 'data'> & {
78
- data: T;
79
- } : ApiSuccessBody<P, M>;
80
- /**
81
- * The path parameters the document declares for this operation, or `never`
82
- * where it declares none.
83
- *
84
- * `never` rather than `{}`: a route with no segments must **forbid** a `path`
85
- * argument, not merely tolerate an empty one, and `keyof Record<string, never>`
86
- * is `string`, so an empty-object encoding cannot be told apart from a real
87
- * one at the type level.
88
- */
89
- type PathParamsOf<P extends ApiPath, M extends ApiMethod<P>> = Operation<P, M> extends {
90
- parameters: {
91
- path?: infer X;
92
- };
93
- } ? [X] extends [undefined] ? never : NonNullable<X> : never;
94
- /**
95
- * The query parameters the document declares for this operation, or `never` where it declares
96
- * none (REL-687).
97
- *
98
- * The service declares them beside each route — a query DTO's whitelisted properties, the names a
99
- * handler reads, `?_fresh` on a read the edge keeps — and `apps/services/api`'s
100
- * `contract/query-parameters.spec.ts` holds the document to what each handler reads. So a name the
101
- * API stops reading stops compiling here, and a name it refuses — `offset` on the entry list, which
102
- * the SDK once sent on every `.offset()` and the API answered with a 400 — never compiled at all.
103
- *
104
- * `never` for the same reason {@link PathParamsOf} uses it: a route with no query must forbid one.
105
- */
106
- type QueryOf<P extends ApiPath, M extends ApiMethod<P>> = Operation<P, M> extends {
107
- parameters: {
108
- query?: infer Q;
109
- };
110
- } ? [Q] extends [undefined] ? never : NonNullable<Q> : never;
111
- /** What {@link matchRoute} recovers from a URL the client emitted. */
112
- interface RouteMatch {
113
- /** The document's path template — the value a tag translator switches on. */
114
- path: ApiPath;
115
- /** The template's `{name}` segments, decoded: the inverse of {@link fillPath}. */
116
- params: Record<string, string>;
117
- /** The query string; a key that appears more than once comes back as an array. */
118
- query: Record<string, string | string[]>;
119
- }
120
- interface MatchRouteOptions {
121
- /**
122
- * The client's `baseUrl`, when it carries a path prefix of its own
123
- * (`https://example.com/relyio`). Its path is removed before the template is
124
- * matched. Unneeded for the default `https://api.relyio.com`.
125
- */
126
- baseUrl?: string;
127
- }
128
- /**
129
- * Recover the route a URL names: the inverse of {@link fillPath}, over the same
130
- * committed document (`INV-API-CLIENT-IS-DERIVED`).
131
- *
132
- * `matchRoute(url).path` is an `ApiPath`, so anything that keys behaviour on a
133
- * request — a cache-tag translator, say — switches on the document's templates
134
- * and never on a route table of its own.
135
- *
136
- * Returns `null` for a URL no declared template matches — a presigned storage
137
- * URL, or a path outside `baseUrl` — rather than a guess.
138
- */
139
- declare function matchRoute(url: string | URL, options?: MatchRouteOptions): RouteMatch | null;
140
-
141
6
  /**
142
7
  * Dev-mode detection for `relyio dev` sandboxes — the SDK's I/O shell over `../dev-handshake`.
143
8
  *
@@ -200,331 +65,6 @@ type ActiveSandbox = Extract<SandboxState, {
200
65
  state: 'active';
201
66
  }>;
202
67
 
203
- /**
204
- * The part of a request a retry decision is allowed to look at.
205
- *
206
- * `method` is typed as a plain `string` rather than as `RequestConfig['method']`
207
- * on purpose. The five verbs that union names are the five the typed transport
208
- * can express today; the question "may this be sent twice?" is a fact about
209
- * HTTP, and an unrecognised verb has to reach the conservative arm rather than
210
- * be unrepresentable.
211
- */
212
- interface RetryableRequest {
213
- method: string;
214
- headers?: Record<string, string>;
215
- }
216
- /**
217
- * Whether a failed request may be sent again, and after how long.
218
- *
219
- * The two halves are separate because they fail separately. The incumbent loop
220
- * had neither: it asked `error.retryable` and nothing else, so a `POST` that met
221
- * a 500 was sent again twice — and `SERVICE_INDETERMINATE`, whose whole meaning
222
- * is "the service could not decide", is marked retryable, which means the write
223
- * may already have landed. Meanwhile the `Retry-After` the service sent was
224
- * collected by the transport and read by nobody, so a 429 whose window is
225
- * measured in minutes was retried after an exponential guess capped at ten
226
- * seconds.
227
- *
228
- * `error` is `Error`, not `SDKError`, because that is what the loop actually
229
- * holds: a `TypeError: fetch failed` is only mapped to an `SDKError` **after**
230
- * the loop gives up, so a policy typed to `SDKError` could not see the transport
231
- * failures it most needs to retry.
232
- */
233
- interface RetryPolicy {
234
- /**
235
- * Never replays a request that could apply twice: a write is retried only
236
- * when it carries `Idempotency-Key`, or the verb is idempotent.
237
- *
238
- * @param attempt - How many attempts have been made, 1 for the first.
239
- */
240
- shouldRetry(attempt: number, error: Error, request: RetryableRequest): boolean;
241
- /** Honours `Retry-After` / `RateLimitError.resetAt` over exponential backoff. */
242
- delayFor(attempt: number, error: Error): number;
243
- }
244
- /**
245
- * Whether sending this request a second time can apply it a second time.
246
- *
247
- * Two ways to be safe, and they are genuinely different questions: the verb may
248
- * be idempotent by definition, or the request may carry an `Idempotency-Key`
249
- * that makes the service answer a replay from the original outcome rather than
250
- * applying it again.
251
- */
252
- declare function isReplaySafe(request: RetryableRequest): boolean;
253
- /**
254
- * The policy the SDK ships with.
255
- *
256
- * Construction takes the same `RetryConfig` the SDK has always exported; what
257
- * it no longer takes is a `retryCondition`, because a caller-supplied predicate
258
- * over `(error, attempt)` structurally **cannot** see the request and so cannot
259
- * express the rule this class exists for.
260
- */
261
- declare class DefaultRetryPolicy implements RetryPolicy {
262
- private readonly config;
263
- constructor(config: RetryConfig);
264
- shouldRetry(attempt: number, error: Error, request: RetryableRequest): boolean;
265
- delayFor(attempt: number, error: Error): number;
266
- }
267
- /**
268
- * The retry policy a client sends with, at `maxAttempts` attempts (the first included): the SDK's
269
- * own, from `retryAttempts`, and the CLI's (REL-721).
270
- *
271
- * The backoff numbers are stated here once. The CLI ran a second policy beside this one —
272
- * `axios-retry` with its own delays and its own reading of a refusal, which retried by numeric
273
- * status — so a refusal one client gave up on, the other sent again. Now both ask this function, and
274
- * a change to when a request is replayed reaches both.
275
- */
276
- declare function retryPolicyFor(maxAttempts: number): RetryPolicy;
277
-
278
- /**
279
- * What a call site supplies beside the route it named.
280
- *
281
- * `path` is required exactly when the document's template has segments, and
282
- * forbidden when it does not — so a call that forgot to scope a request, or one
283
- * that scoped a request the route does not scope, is a compile error rather
284
- * than a URL with a literal `{id}` in it.
285
- */
286
- type SendOptions<P extends ApiPath, M extends ApiMethod<P>> = {
287
- /**
288
- * Query string values: exactly the names the document declares for this route, at the types it
289
- * declares them (`QueryOf`, REL-687). An undeclared name is a compile error, not a 400.
290
- */
291
- query?: QueryOf<P, M>;
292
- body?: unknown;
293
- /** Request headers this call adds, e.g. `If-Match` / `Idempotency-Key` (API4). */
294
- headers?: Record<string, string>;
295
- signal?: AbortSignal;
296
- timeout?: number;
297
- } & ([PathParamsOf<P, M>] extends [never] ? {
298
- path?: never;
299
- } : {
300
- path: PathParamsOf<P, M>;
301
- });
302
- /**
303
- * Core HTTP client for the RelyIO SDK.
304
- *
305
- * `send` is **the** typed entry: it names a route by the path template the
306
- * committed document declares, and returns that operation's body type with the
307
- * payload typed as `T`. `readPayload` from `@relyio/api-contract/client` is
308
- * then the one unwrap — there is no second spelling and no runtime test of
309
- * which envelope arrived (`INV-API-CLIENT-IS-DERIVED`).
310
- *
311
- * What the class makes public is what something outside it calls: `send` and `fetchPayload` are
312
- * the requests; `configure`, `withHeaders` and `setApiKey` are the owning client's (`updateConfig()`,
313
- * `with()`, `setApiKey()`). There are no verb helpers, no header or base-URL accessors and no
314
- * untyped `request` (REL-717): a route is named by its document path, or it is not called.
315
- */
316
- declare class HttpClient {
317
- /** What every request reads off the configuration, derived by {@link configure} and nowhere else. */
318
- protected connection: Connection;
319
- /**
320
- * Set on a view {@link withHeaders} made: the client every request is sent through, and the
321
- * headers laid beneath each request's own. A view keeps no connection of its own that matters —
322
- * everything it is asked to change, it changes on that client.
323
- */
324
- protected view?: {
325
- readonly client: ControlledHttpClient;
326
- readonly headers: Readonly<Record<string, string>>;
327
- };
328
- constructor(config: MergedRelyIOConfig);
329
- protected announce(): void;
330
- /**
331
- * Send bytes to an address that is not a RelyIO route — an asset upload's presigned `PUT` and its
332
- * multipart parts — through the client's configured `fetch`, so a wrapper that records, proxies or
333
- * forbids network access sees every request this client makes (REL-2671). Nothing else is added: no
334
- * key, no retry, no timeout, because the address belongs to the storage service, not to RelyIO.
335
- *
336
- * Static so the instances a customer holds stay `send` and `fetchPayload` (REL-3107). The `fetch`
337
- * is read per call, from the client a view sends through, like the requests are.
338
- */
339
- static transfer(client: HttpClient, url: string, init: RequestInit): Promise<Response>;
340
- /**
341
- * Call a route the committed document declares, and get back the body that
342
- * document says it serves.
343
- */
344
- send<P extends ApiPath, M extends ApiMethod<P>, T = unknown>(path: P, method: M, options: SendOptions<P, M>): Promise<ApiResponse<Wire<P, M, T>>>;
345
- /**
346
- * Call a route and return its payload — `send` plus the one unwrap, which is
347
- * what all but a handful of call sites want.
348
- */
349
- fetchPayload<P extends ApiPath, M extends ApiMethod<P>, T = unknown>(path: P, method: M, options: SendOptions<P, M>): Promise<Wire<P, M, T> extends {
350
- data: unknown;
351
- } ? Wire<P, M, T>['data'] : never>;
352
- /**
353
- * Make an HTTP request, retrying only where a retry is safe.
354
- *
355
- * The headers are merged **once**, before the first attempt, and every attempt
356
- * sends that same object. That is what makes a minted `Idempotency-Key` stable
357
- * across the retries of one logical write: the service sees one key and
358
- * answers the replay from the original outcome instead of applying it twice.
359
- *
360
- * The loop always makes one attempt. The incumbent's `while (attempt <
361
- * maxAttempts)` made none at `retryAttempts: 0` — a value the config validator
362
- * then accepted, and now refuses — and then dereferenced an unassigned
363
- * `lastError`. `retryAttempts` is the most attempts, the first included; an
364
- * `HttpClient` constructed directly is not validated, so the first attempt
365
- * stays unconditional.
366
- *
367
- * A request that would carry no `X-API-Key` makes none: it rejects with
368
- * `MissingApiKeyError` before `fetch` is called, is not retried, and names
369
- * `apiKey`. This is where a client built without a key learns it — the
370
- * constructor accepts one so that a module-scope client can be evaluated by a
371
- * build that holds no key (REL-1120) — and so does one whose `setApiKey` was
372
- * given none.
373
- */
374
- private request;
375
- /**
376
- * One attempt.
377
- *
378
- * The caller's `signal` and the timeout both end it, through one controller.
379
- * The incumbent handed `fetch` the caller's signal **instead of** its own, so a
380
- * request that passed a signal had no timeout at all — and a caller abort then
381
- * surfaced as `Request timed out`. `timedOut` is what tells the two apart: a
382
- * timeout is a `TimeoutError`, a caller abort is the platform's `AbortError`,
383
- * rethrown as it came.
384
- */
385
- private makeRequest;
386
- /**
387
- * The headers without those a browser controls itself, when this is a browser; unchanged when it
388
- * is not.
389
- *
390
- * A name is matched without regard to case (RFC 9110 §5.1), because a browser refuses `Origin`
391
- * whatever case a page spells it in. This matched only the all-lowercase and all-uppercase
392
- * spellings, so `Origin` and `User-Agent` — how people write them — reached `fetch` (REL-1409).
393
- */
394
- private filterHeadersForBrowser;
395
- /**
396
- * Prepare request body based on content type and environment
397
- */
398
- private prepareRequestBody;
399
- private parseResponse;
400
- private resolveUrl;
401
- private mergeRequestConfig;
402
- private buildQueryString;
403
- private headersToObject;
404
- private log;
405
- }
406
- /**
407
- * The client the SDK's own factory holds: {@link HttpClient} plus the three things only the owning
408
- * client does to it — `configure` (`updateConfig()`), `withHeaders` (`with()`) and `setApiKey`
409
- * (`setApiKey()`). It is not exported from the package, so a customer holding the client from
410
- * `getHttpClient()` sees `send` and `fetchPayload` and nothing else (REL-3107).
411
- */
412
- declare class ControlledHttpClient extends HttpClient {
413
- /**
414
- * A view of this client that sends every request through it with `headers` added — beneath the
415
- * request's own, over this client's — and changes nothing else: its key, base URL, timeout,
416
- * retries and `fetch` are this client's as they are when each request is sent, so a later
417
- * `configure()` or `setApiKey()` on this client reaches the view, and one on the view reaches
418
- * this client. `client.with({ dataset })` is one (REL-2417).
419
- */
420
- withHeaders(headers: Readonly<Record<string, string>>): ControlledHttpClient;
421
- /**
422
- * Run on `config` from now on: every later request — whoever holds this client — is sent to its
423
- * `baseUrl`, with its headers, key and dataset, its timeout and retries, through its `fetch`, and
424
- * logged by its `debug` options.
425
- *
426
- * The client's own `updateConfig()` calls this rather than building a second client, so a
427
- * `content()` or other sub-client taken before the update sends through the update too. Anything
428
- * set on this client since it was last configured — `setApiKey()` — is replaced by what `config`
429
- * says.
430
- */
431
- configure(config: MergedRelyIOConfig): void;
432
- /**
433
- * Replace the key every later request sends as `X-API-Key`, and the `apiKey` the configuration
434
- * reports.
435
- *
436
- * The key is read the way construction reads it (`presentKey`): an absent, empty or blank key is
437
- * no key, so the header is dropped and the next request is refused with `MissingApiKeyError`
438
- * before anything is sent. A key header of any other spelling — one given in `headers` — goes
439
- * too, from the headers sent and from the headers the configuration reports, so the old key is
440
- * never sent beside the new one.
441
- *
442
- * The configuration is the one the owning `TypedRelyIOClient` holds (it hands its own to the
443
- * constructor), so its `getConfig().apiKey` — what a surface reads to decide a key's kind — is the
444
- * key sent from here on.
445
- *
446
- * This replaced `setAuthToken`, which added `Authorization: Bearer` beside an `X-API-Key` it
447
- * never touched: the API reads `X-API-Key` first, so the old key was the one used (REL-1385).
448
- */
449
- setApiKey(apiKey: string): void;
450
- }
451
- /** Everything a request reads off the configuration, replaced whole whenever it changes. */
452
- interface Connection {
453
- /**
454
- * The configuration itself, for what is read per request — `fetch`, the `browser` options,
455
- * `debug` — and the object `setApiKey` writes the key into, which the owning client reports.
456
- */
457
- readonly config: MergedRelyIOConfig;
458
- readonly baseUrl: string;
459
- readonly defaultHeaders: Readonly<Record<string, string>>;
460
- readonly timeout: number;
461
- readonly retryPolicy: RetryPolicy;
462
- }
463
-
464
- /**
465
- * API4's two request headers, as the SDK's writes send them.
466
- *
467
- * `Idempotency-Key` is an option on every write whose route declares it (`idempotencyKey`), and the
468
- * SDK mints one when none is given. `If-Match` is never an option: a checked write builds it from
469
- * the entry it was read as (`versionCheckOf`), from the `_metadata` every read carries in its body
470
- * whether or not the edge cache served it (REL-2418). The SDK does not read the separate
471
- * `X-Entity-Tag` header, which the edge removes from what it stores; the API keeps sending it for
472
- * callers using plain HTTP (REL-2427). A batch operation carries its check in its own body, as
473
- * `ifMatch` (`batch/batch-operations.ts`, REL-2421).
474
- */
475
- interface RetryableWriteOptions {
476
- /**
477
- * A key that makes a retry of **this** write safe.
478
- *
479
- * A replay inside the service's window returns the original outcome rather
480
- * than applying twice. The service derives that response from committed state
481
- * pinned to the recorded version — it does not store bytes — so a replay after
482
- * the version has been pruned is refused `RESOURCE_EXPIRED` rather than
483
- * answered from a stale copy.
484
- *
485
- * **The SDK mints one when you do not.** It used to be caller-supplied and
486
- * nothing else, which meant the default write carried no key while the retry
487
- * loop replayed it anyway — the one mechanism that makes a replay safe was
488
- * optional on the one path that needed it. Supply your own to make a key
489
- * outlive the process: a job that may be restarted wants a key derived from
490
- * the work, not one minted per call.
491
- */
492
- idempotencyKey?: string;
493
- }
494
- /**
495
- * An entry a read handed back, as much of it as a version check needs: its `_metadata`'s id, the
496
- * locale it was read in and the two counters it was read at (REL-2418).
497
- *
498
- * Every read carries these in its body, whether origin or the edge cache served it — the edge
499
- * removes only the separate `X-Entity-Tag` header from what it stores, so a check taken from that
500
- * header vanished after a cached read. A `Pick` of the document's `EntryMetadata`, so a counter the
501
- * API stops reporting stops compiling here.
502
- */
503
- interface ReadEntry {
504
- readonly _metadata: Pick<EntryMetadata, 'id' | 'locale' | 'version' | 'sharedVersion'>;
505
- }
506
- /**
507
- * The version check a write takes from the entry it was read as: the entry's id, the locale it was
508
- * read in — which the write addresses, so a read negotiated from `Accept-Language` is written back
509
- * to that locale — and the `If-Match` tag over its two counters, spelled as the API mints it.
510
- */
511
- declare function versionCheckOf(entry: ReadEntry): {
512
- id: string;
513
- locale: string;
514
- ifMatch: string;
515
- };
516
-
517
- /**
518
- * The client's locale as a sub-client holds it: a function it asks on every call, or a locale fixed
519
- * when it was built.
520
- *
521
- * `TypedRelyIOClient` hands every sub-client and builder a function over the configuration it holds,
522
- * so one taken before `updateConfig({ locale })` sends the locale the client holds when the call is
523
- * made, and none once `updateConfig({ locale: null })` has cleared it (REL-1453). A string is a locale
524
- * fixed at construction — a handle built directly, as the tests build one — and stays what it was.
525
- */
526
- type ClientLocale = string | (() => string | undefined);
527
-
528
68
  /**
529
69
  * Site-visitor live, declared once for everyone who speaks it (`live-layer-spec.md` decisions 15, 19
530
70
  * and 20; phase LV5): the wire a visitor's browser meets at `live.relyio.com`, and the two internal
@@ -625,6 +165,70 @@ type VisitorResyncReason = VisitorLedgerResyncReason | 'too-far-behind';
625
165
  */
626
166
  type VisitorRetry = 'stop' | 'retry' | 'back-off';
627
167
 
168
+ /**
169
+ * API4's two request headers, as the SDK's writes send them.
170
+ *
171
+ * `Idempotency-Key` is an option on every write whose route declares it (`idempotencyKey`), and the
172
+ * SDK mints one when none is given. `If-Match` is never an option: a checked write builds it from
173
+ * the entry it was read as (`versionCheckOf`), from the `_metadata` every read carries in its body
174
+ * whether or not the edge cache served it (REL-2418). The SDK does not read the separate
175
+ * `X-Entity-Tag` header, which the edge removes from what it stores; the API keeps sending it for
176
+ * callers using plain HTTP (REL-2427). A batch operation carries its check in its own body, as
177
+ * `ifMatch` (`batch/batch-operations.ts`, REL-2421).
178
+ */
179
+ interface RetryableWriteOptions {
180
+ /**
181
+ * A key that makes a retry of **this** write safe.
182
+ *
183
+ * A replay inside the service's window returns the original outcome rather
184
+ * than applying twice. The service derives that response from committed state
185
+ * pinned to the recorded version — it does not store bytes — so a replay after
186
+ * the version has been pruned is refused `RESOURCE_EXPIRED` rather than
187
+ * answered from a stale copy.
188
+ *
189
+ * **The SDK mints one when you do not.** It used to be caller-supplied and
190
+ * nothing else, which meant the default write carried no key while the retry
191
+ * loop replayed it anyway — the one mechanism that makes a replay safe was
192
+ * optional on the one path that needed it. Supply your own to make a key
193
+ * outlive the process: a job that may be restarted wants a key derived from
194
+ * the work, not one minted per call.
195
+ */
196
+ idempotencyKey?: string;
197
+ }
198
+ /**
199
+ * An entry a read handed back, as much of it as a version check needs: its `_metadata`'s id, the
200
+ * locale it was read in and the two counters it was read at (REL-2418).
201
+ *
202
+ * Every read carries these in its body, whether origin or the edge cache served it — the edge
203
+ * removes only the separate `X-Entity-Tag` header from what it stores, so a check taken from that
204
+ * header vanished after a cached read. A `Pick` of the document's `EntryMetadata`, so a counter the
205
+ * API stops reporting stops compiling here.
206
+ */
207
+ interface ReadEntry {
208
+ readonly _metadata: Pick<EntryMetadata, 'id' | 'locale' | 'version' | 'sharedVersion'>;
209
+ }
210
+ /**
211
+ * The version check a write takes from the entry it was read as: the entry's id, the locale it was
212
+ * read in — which the write addresses, so a read negotiated from `Accept-Language` is written back
213
+ * to that locale — and the `If-Match` tag over its two counters, spelled as the API mints it.
214
+ */
215
+ declare function versionCheckOf(entry: ReadEntry): {
216
+ id: string;
217
+ locale: string;
218
+ ifMatch: string;
219
+ };
220
+
221
+ /**
222
+ * The client's locale as a sub-client holds it: a function it asks on every call, or a locale fixed
223
+ * when it was built.
224
+ *
225
+ * `TypedRelyIOClient` hands every sub-client and builder a function over the configuration it holds,
226
+ * so one taken before `updateConfig({ locale })` sends the locale the client holds when the call is
227
+ * made, and none once `updateConfig({ locale: null })` has cleared it (REL-1453). A string is a locale
228
+ * fixed at construction — a handle built directly, as the tests build one — and stays what it was.
229
+ */
230
+ type ClientLocale = string | (() => string | undefined);
231
+
628
232
  /**
629
233
  * Two read terms every read that takes them writes the same way: the children an entry embeds,
630
234
  * and the refusal of a condition on `_metadata`. Here once, for the list and entry reads
@@ -1871,39 +1475,44 @@ declare class SettingsClient<T = BaseSettingsGroup, R extends Reading = UntypedR
1871
1475
  }
1872
1476
 
1873
1477
  /**
1874
- * Any schema the client can be typed by. `any` is deliberate: the client accepts whatever content
1875
- * types, singletons, queries and settings groups a customer declares.
1876
- *
1877
- * This is the constraint `TypedRelyIOClient`'s `TSchema` carries, so `RegisteredSchema` is inferred
1878
- * against the same one — `createClient` returns `TypedRelyIOClient<RegisteredSchema>`, and a schema
1879
- * inferred against any wider alias would not be provably inside the client's bound.
1880
- */
1881
- type AnySchemaDefinition = SchemaDefinition<any, any, any, any, any>;
1882
- /**
1883
- * The seam `relyio generate-types` fills (`INV-SS-TYPES-INFERRED`).
1884
- *
1885
- * Empty here on purpose. The generated `schema.ts` augments it —
1886
- *
1887
- * ```ts
1888
- * declare module '@relyio/sdk' {
1889
- * interface Register {
1890
- * schema: typeof schema
1891
- * }
1892
- * }
1893
- * ```
1478
+ * The project's Functions over the Content API (spec 2, REL-3821): `relyio.functions.checkout(input)`
1479
+ * runs the Function `checkout` that the key's Branch runs, on the key's Dataset, and answers its
1480
+ * output.
1894
1481
  *
1895
- * — and from then on `createClient({ apiKey })`, with no generic and no `schema:`, is typed by that
1896
- * schema. The pattern is TanStack Router's. It is type-level only: nothing at runtime reads it.
1482
+ * Call it from your server with a secret key. A publishable key calls only a Function declaring
1483
+ * `endUsers` (spec 4, REL-3892) — with a signed-in End user's token (`getToken`) when it says
1484
+ * `'required'` — and is refused any other (`PublishableKeyRefusedError`); a read-only secret key
1485
+ * runs only a Function whose reach writes nothing (`ReadOnlyKeyError`). A call carrying an End
1486
+ * user's token hands the run `run.endUser`, whatever the key. A run whose code threw or was ended at a limit throws
1487
+ * `FunctionRunFailedError`, and one that outlived the service's five-minute wait
1488
+ * `FunctionRunTimedOutError` — each naming the run (`runId`), whose record and console output Manage
1489
+ * serves. A call is never retried: a Function may write, and a second call would be a second run.
1897
1490
  */
1898
- interface Register {
1491
+
1492
+ /** What a Function call takes beside its input. */
1493
+ interface FunctionCallOptions {
1494
+ /** The dataset, by id or name, over the client's. */
1495
+ dataset?: string;
1496
+ signal?: AbortSignal;
1497
+ /** How long to wait, in milliseconds. {@link FUNCTION_CALL_TIMEOUT_MS} when left out. */
1498
+ timeout?: number;
1499
+ /**
1500
+ * A key naming this call (REL-3822): every Record batch the run sends is keyed by it, so the same
1501
+ * key sent again — a shopper's double click, your own retry — runs the Function again but writes
1502
+ * nothing the first call wrote, answering what it answered. Kept 24 hours. None is minted: a call
1503
+ * is never retried by this client.
1504
+ */
1505
+ idempotencyKey?: string;
1899
1506
  }
1507
+ /** One Function, called: its input, as its input Fields declare it, and its output. */
1508
+ type FunctionCall = (input?: Record<string, unknown>, options?: FunctionCallOptions) => Promise<unknown>;
1900
1509
  /**
1901
- * The schema the project registered through `Register`, or `undefined` when nothing did — which is
1902
- * the untyped client, exactly as before the generator ran.
1510
+ * `relyio.functions`: every Function the key's Branch runs, by name. A name the Branch does not run
1511
+ * is refused by the service (`ResourceNotFoundError`), not here.
1903
1512
  */
1904
- type RegisteredSchema = Register extends {
1905
- schema: infer S extends AnySchemaDefinition;
1906
- } ? S : undefined;
1513
+ type FunctionsAccessor = {
1514
+ readonly [name: string]: FunctionCall;
1515
+ };
1907
1516
 
1908
1517
  /**
1909
1518
  * What the search family's routes answer, read from the committed document, and what a search over
@@ -2823,11 +2432,19 @@ interface DeployedContentType {
2823
2432
  }
2824
2433
  /**
2825
2434
  * The defaults `client.with()` gives the client it makes (REL-2417, Q9): the locale and the dataset
2826
- * its reads and writes are in unless a call names its own. A locale is one the schema declares.
2435
+ * its reads and writes are in unless a call names its own, and the End user's token function its
2436
+ * requests ask in place of the parent's (REL-3882). A locale is one the schema declares.
2827
2437
  */
2828
2438
  interface ClientDefaults<TSchema extends AnySchemaDefinition | undefined = undefined> {
2829
2439
  readonly locale?: LocaleCodeOf<TSchema>;
2830
2440
  readonly dataset?: string;
2441
+ /**
2442
+ * The signed-in End user's token, asked for on every request this client sends — and every
2443
+ * request of a client `with()` makes from it that names none — in place of the parent's
2444
+ * `getToken`. `@relyio/react`'s provider hands it Clerk's `useAuth().getToken`. See
2445
+ * `RelyIOConfig.getToken`.
2446
+ */
2447
+ readonly getToken?: () => Promise<string | null>;
2831
2448
  }
2832
2449
  /** The locale codes a client's reads may name: the schema's, or any where no schema types it. */
2833
2450
  type LocaleCodeOf<TSchema extends AnySchemaDefinition | undefined> = TSchema extends AnySchemaDefinition ? SchemaLocaleCodes<TSchema> : string;
@@ -2861,6 +2478,21 @@ interface TypedClientConfig<TSchema extends AnySchemaDefinition | undefined = un
2861
2478
  * const batch = await relyio.batch([{ create: 'product', data: { title: 'New' } }])
2862
2479
  * ```
2863
2480
  */
2481
+ /** The Record type names a client's schema declares, or any string without one. */
2482
+ type RecordTypeNameOf<TSchema> = TSchema extends AnySchemaDefinition ? SchemaRecordTypeNames<TSchema> : string;
2483
+ /**
2484
+ * `relyio.records`: called with a Record type, that type's Records; `.batch([...])`, a list of
2485
+ * Record operations across types in one transaction, all or none (REL-3774).
2486
+ */
2487
+ interface RecordsAccessor<TSchema extends AnySchemaDefinition | undefined> {
2488
+ <K extends RecordTypeNameOf<TSchema>>(recordType: K): TSchema extends AnySchemaDefinition ? RecordsClient<InferRecordType<NonNullable<TSchema['recordTypes']>[K & keyof NonNullable<TSchema['recordTypes']>]>, RecordWriteFieldsOf<NonNullable<TSchema['recordTypes']>[K & keyof NonNullable<TSchema['recordTypes']>]>, RecordUpdateFieldsOf<NonNullable<TSchema['recordTypes']>[K & keyof NonNullable<TSchema['recordTypes']>]>> : RecordsClient<BaseRecord>;
2489
+ /**
2490
+ * Run Record operations — `create`, `update`, `delete`, `increment`, `decrement`, across Record
2491
+ * types — in one transaction: every one lands, or none does. A refused one rolls the batch back
2492
+ * and throws naming it (`refusedOperationOf(error)` reads its index).
2493
+ */
2494
+ batch(operations: ReadonlyArray<RecordBatchOperation<RecordTypeNameOf<TSchema>>>, options?: RecordBatchOptions): Promise<RecordBatchResult>;
2495
+ }
2864
2496
  declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined = undefined> {
2865
2497
  /**
2866
2498
  * The one HTTP client every sub-client sends through. `updateConfig()` and `setApiKey()` change it
@@ -2887,7 +2519,10 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
2887
2519
  * `createClient()` made, which reads its own.
2888
2520
  */
2889
2521
  private parent;
2890
- /** What `with()` gave this client over its parent's: the locale and dataset it names, and no other. */
2522
+ /**
2523
+ * What `with()` gave this client over its parent's: the locale, dataset and End user's token
2524
+ * function it names, and no other.
2525
+ */
2891
2526
  private defaults;
2892
2527
  /** The live edge's poll client id: chosen once, when first needed, and kept for this client's life. */
2893
2528
  private _liveClientId;
@@ -2936,6 +2571,41 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
2936
2571
  * ```
2937
2572
  */
2938
2573
  content<K extends TSchema extends AnySchemaDefinition ? SchemaContentTypeNames<TSchema> : string>(contentType: K): TSchema extends AnySchemaDefinition ? ContentClient<InferContentType<TSchema['contentTypes'][K & keyof TSchema['contentTypes']], TSchema>, ContentReading<TSchema['contentTypes'][K & keyof TSchema['contentTypes']], TSchema>> : ContentClient<BaseContent>;
2574
+ /**
2575
+ * The Records of one Record type (spec 1, REL-3771): `create`, `list`, `get`, `update`, `delete`.
2576
+ * Type-safe when a schema is provided — the names autocomplete its `recordTypes` and the fields
2577
+ * are the type's. `relyio.records.batch([...])` writes Records of any types in one transaction,
2578
+ * all or none (REL-3774).
2579
+ *
2580
+ * A Record is an app's data, written by your server with a secret key and live the moment it
2581
+ * lands. A publishable key reads the Records a Record type's read Policy grants it (spec 4,
2582
+ * REL-3883), and writes them only for the End user whose token it carries, as the type's write
2583
+ * Policy allows (REL-3884); with no token it writes nothing (`PUBLISHABLE_KEY_REFUSED`).
2584
+ *
2585
+ * @example
2586
+ * ```typescript
2587
+ * const order = await relyio.records('order').create({ shopperEmail: 'ada@example.com', total: 19 })
2588
+ * const { data: orders } = await relyio.records('order').list({ where: { status: 'paid' } })
2589
+ * await relyio.records.batch([
2590
+ * { op: 'decrement', type: 'inventory', where: { product: mugId }, field: 'available', by: 1 },
2591
+ * { op: 'create', type: 'order', fields: { shopperEmail: 'ada@example.com', total: 19 } },
2592
+ * ])
2593
+ * ```
2594
+ */
2595
+ readonly records: RecordsAccessor<TSchema>;
2596
+ /**
2597
+ * The project's Functions, by name (spec 2, REL-3821): `relyio.functions.checkout({ cartId })`
2598
+ * runs the Function `checkout` that the key's Branch runs, on the key's Dataset, and answers its
2599
+ * output. Call it from your server with a secret key; a run that failed throws
2600
+ * `FunctionRunFailedError` and one past five minutes `FunctionRunTimedOutError`, each naming the
2601
+ * run. Never retried: a Function may write.
2602
+ *
2603
+ * @example
2604
+ * ```typescript
2605
+ * const { orderId } = (await relyio.functions.checkout({ cartId })) as { orderId: string }
2606
+ * ```
2607
+ */
2608
+ readonly functions: FunctionsAccessor;
2939
2609
  /**
2940
2610
  * Get an asset client for a specific asset type.
2941
2611
  *
@@ -3280,6 +2950,9 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
3280
2950
  * const { data } = await staging.content('post').list({ limit: 10 })
3281
2951
  *
3282
2952
  * const french = relyio.with({ locale: 'fr-FR' }) // ← autocompletes the schema's locales
2953
+ *
2954
+ * // Every request this one sends carries the signed-in End user's token (REL-3882)
2955
+ * const visitor = relyio.with({ getToken: () => session.getToken() })
3283
2956
  * ```
3284
2957
  */
3285
2958
  with(defaults: ClientDefaults<TSchema>): TypedRelyIOClient<TSchema>;
@@ -3361,4 +3034,4 @@ declare function createClient<TSchema extends AnySchemaDefinition>(config: Typed
3361
3034
  */
3362
3035
  type ClientSchema<T extends TypedRelyIOClient<AnySchemaDefinition>> = T extends TypedRelyIOClient<infer TSchema> ? TSchema : never;
3363
3036
 
3364
- export { type ChildrenOptions as $, type AnySchemaDefinition as A, LIVE_KEEPALIVE_INTERVAL_MS as B, type Change as C, type DeployedLocale as D, LIVE_SOCKET_OPEN_TIMEOUT_MS as E, type FeedChange as F, type LiveChangesOptions as G, type Health as H, ContentClient as I, type CreateEntryOptions as J, type EntryPlacement as K, type LocaleCodeOf as L, type MatchRouteOptions as M, type EntryWriteOptions as N, SingletonClient as O, type Project as P, SettingsClient as Q, type Register as R, type SandboxState as S, TypedRelyIOClient as T, type DocumentFields as U, type VisitorRetry as V, type Wire as W, type DocumentVersion as X, type DocumentVersionRow as Y, type DocumentVersionsOptions as Z, type DocumentWriteOptions as _, ChangesExpiredError as a, AssetClient as a$, type ChildrenListOptions as a0, type DocumentReadOptions as a1, type EntryList as a2, type FieldKey as a3, type FreshOption as a4, type GetOptions as a5, type ListAllOptions as a6, type ListOptions as a7, type LocaleOption as a8, type Paging as a9, type SearchSortOption as aA, type SearchWhere as aB, type SimilarOptions as aC, type BatchOperationResult as aD, type BatchSummary as aE, type BatchResponse as aF, type BatchWrite as aG, type BatchWriteOptions as aH, type BatchBody as aI, type BatchCreate as aJ, type BatchUpdate as aK, type BatchReplace as aL, type BatchDelete as aM, type BatchSingletonWrite as aN, type BatchTarget as aO, type BatchDeleteTarget as aP, type AggregateMetric as aQ, type QueryMetadata as aR, type AdhocQuery as aS, type AdhocRecord as aT, type NamedQueryOptions as aU, type NamedQueryParams as aV, type QueryAggregate as aW, type QueryAnswer as aX, type QueryCall as aY, type QueryName as aZ, type QueryTypeName as a_, type ChildEntry as aa, type ChildrenRead as ab, type ReadAs as ac, type WithChildren as ad, type ReadLocale as ae, type SortOption as af, type VersionOptions as ag, type WrittenReadScope as ah, type WrittenSort as ai, type SearchResultItem as aj, type SearchHitMetadata as ak, type SearchResponse as al, type AutocompleteSuggestion as am, type AutocompleteResponse as an, type SimilarResult as ao, type SimilarResponse as ap, type SearchTypeName as aq, type SearchEntry as ar, type AutocompleteOptions as as, type SearchFacet as at, type SearchFieldKey as au, type SearchHighlight as av, type SearchOptions as aw, type SearchPage as ax, type SearchScope as ay, type SearchSelected as az, type ChangesExpiredReason as b, AssetFileBuilder as b0, AssetUploadBuilder as b1, isAssetEntry as b2, type AssetVisibility as b3, type FileStatus as b4, type FileBackend as b5, type AssetFileExtracted as b6, type FileStatusResult as b7, type AssetEntryResponse as b8, type AssetFileWhere as b9, type PopulatedAssetReference as ba, type PresignInput as bb, type PresignResult as bc, type ConfirmInput as bd, type ConfirmResult as be, type ResolveUrlInput as bf, type ResolveUrlResult as bg, type CreateAssetOptions as bh, type AssetPlacement as bi, type UpdateAssetOptions as bj, type WaitUntilReadyOptions as bk, type MultipartCreateResult as bl, type MultipartPart as bm, type MultipartTarget as bn, type UploadProgress as bo, ResourceNotFoundError as bp, ResourceConflictError as bq, ResourceExpiredError as br, isResourceNotFound as bs, isMissingEntry as bt, type FileErrorCode as bu, type FileUploadErrorCode as bv, FileUploadError as bw, FileValidationError as bx, type FileValidationConstraints as by, validateFile as bz, createClient as c, type TypedClientConfig as d, type ClientDefaults as e, type ClientSchema as f, type DeployedContentType as g, type RegisteredSchema as h, type ActiveSandbox as i, HttpClient as j, type SendOptions as k, type ApiPath as l, type ApiMethod as m, type ApiSuccessBody as n, matchRoute as o, type RouteMatch as p, type ReadEntry as q, type RetryableWriteOptions as r, DefaultRetryPolicy as s, isReplaySafe as t, retryPolicyFor as u, versionCheckOf as v, type RetryPolicy as w, type RetryableRequest as x, type ChangesHeadOptions as y, type ChangesOptions as z };
3037
+ export { type SortOption as $, type ActiveSandbox as A, type ChildrenListOptions as B, type Change as C, type DeployedLocale as D, type EntryPlacement as E, type FeedChange as F, type DocumentReadOptions as G, type Health as H, type EntryList as I, type FieldKey as J, type FreshOption as K, type LocaleCodeOf as L, type GetOptions as M, type ListAllOptions as N, type ListOptions as O, type Project as P, type LocaleOption as Q, type RecordsAccessor as R, type SandboxState as S, TypedRelyIOClient as T, type Paging as U, type VisitorRetry as V, type ChildEntry as W, type ChildrenRead as X, type ReadAs as Y, type WithChildren as Z, type ReadLocale as _, ChangesExpiredError as a, type ResolveUrlInput as a$, type VersionOptions as a0, type WrittenReadScope as a1, type WrittenSort as a2, type SearchResultItem as a3, type SearchHitMetadata as a4, type SearchResponse as a5, type AutocompleteSuggestion as a6, type AutocompleteResponse as a7, type SimilarResult as a8, type SimilarResponse as a9, type AggregateMetric as aA, type QueryMetadata as aB, type AdhocQuery as aC, type AdhocRecord as aD, type NamedQueryOptions as aE, type NamedQueryParams as aF, type QueryAggregate as aG, type QueryAnswer as aH, type QueryCall as aI, type QueryName as aJ, type QueryTypeName as aK, AssetClient as aL, AssetFileBuilder as aM, AssetUploadBuilder as aN, isAssetEntry as aO, type AssetVisibility as aP, type FileStatus as aQ, type FileBackend as aR, type AssetFileExtracted as aS, type FileStatusResult as aT, type AssetEntryResponse as aU, type AssetFileWhere as aV, type PopulatedAssetReference as aW, type PresignInput as aX, type PresignResult as aY, type ConfirmInput as aZ, type ConfirmResult as a_, type SearchTypeName as aa, type SearchEntry as ab, type AutocompleteOptions as ac, type SearchFacet as ad, type SearchFieldKey as ae, type SearchHighlight as af, type SearchOptions as ag, type SearchPage as ah, type SearchScope as ai, type SearchSelected as aj, type SearchSortOption as ak, type SearchWhere as al, type SimilarOptions as am, type BatchOperationResult as an, type BatchSummary as ao, type BatchResponse as ap, type BatchWrite as aq, type BatchWriteOptions as ar, type BatchBody as as, type BatchCreate as at, type BatchUpdate as au, type BatchReplace as av, type BatchDelete as aw, type BatchSingletonWrite as ax, type BatchTarget as ay, type BatchDeleteTarget as az, type ChangesExpiredReason as b, type ResolveUrlResult as b0, type CreateAssetOptions as b1, type AssetPlacement as b2, type UpdateAssetOptions as b3, type WaitUntilReadyOptions as b4, type MultipartCreateResult as b5, type MultipartPart as b6, type MultipartTarget as b7, type UploadProgress as b8, ResourceNotFoundError as b9, ResourceConflictError as ba, ResourceExpiredError as bb, isResourceNotFound as bc, isMissingEntry as bd, type FileErrorCode as be, type FileUploadErrorCode as bf, FileUploadError as bg, FileValidationError as bh, type FileValidationConstraints as bi, validateFile as bj, createClient as c, type TypedClientConfig as d, type ClientDefaults as e, type ClientSchema as f, type DeployedContentType as g, type ReadEntry as h, type RetryableWriteOptions as i, type ChangesHeadOptions as j, type ChangesOptions as k, LIVE_KEEPALIVE_INTERVAL_MS as l, LIVE_SOCKET_OPEN_TIMEOUT_MS as m, type LiveChangesOptions as n, ContentClient as o, type CreateEntryOptions as p, type EntryWriteOptions as q, SingletonClient as r, SettingsClient as s, type DocumentFields as t, type DocumentVersion as u, versionCheckOf as v, type DocumentVersionRow as w, type DocumentVersionsOptions as x, type DocumentWriteOptions as y, type ChildrenOptions as z };