foldkit-remote 0.20.0 → 0.22.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 (198) hide show
  1. package/README.md +987 -198
  2. package/dist/answerGaps.d.ts +16 -0
  3. package/dist/answerGaps.d.ts.map +1 -0
  4. package/dist/answerGaps.js +60 -0
  5. package/dist/answerGaps.js.map +1 -0
  6. package/dist/client-B055kQuP.d.ts +110 -0
  7. package/dist/client-B055kQuP.d.ts.map +1 -0
  8. package/dist/client.d.ts +2 -0
  9. package/dist/client.js +142 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/coalesce-CLAr92Nk.d.ts +34 -0
  12. package/dist/coalesce-CLAr92Nk.d.ts.map +1 -0
  13. package/dist/coalesce.d.ts +2 -0
  14. package/dist/coalesce.js +131 -0
  15. package/dist/coalesce.js.map +1 -0
  16. package/dist/connection-BRyaJy89.d.ts +45 -0
  17. package/dist/connection-BRyaJy89.d.ts.map +1 -0
  18. package/dist/connection.d.ts +2 -0
  19. package/dist/connection.js +170 -0
  20. package/dist/connection.js.map +1 -0
  21. package/dist/data.d.ts +7 -0
  22. package/dist/data.d.ts.map +1 -0
  23. package/dist/data.js +21 -0
  24. package/dist/data.js.map +1 -0
  25. package/dist/diagnostics-DHhVYflV.d.ts +125 -0
  26. package/dist/diagnostics-DHhVYflV.d.ts.map +1 -0
  27. package/dist/diagnostics.d.ts +2 -0
  28. package/dist/diagnostics.js +60 -0
  29. package/dist/diagnostics.js.map +1 -0
  30. package/dist/entity-CgsG5Uel.d.ts +196 -0
  31. package/dist/entity-CgsG5Uel.d.ts.map +1 -0
  32. package/dist/entity-DuDxaa3n.js +279 -0
  33. package/dist/entity-DuDxaa3n.js.map +1 -0
  34. package/dist/entity.d.ts +2 -0
  35. package/dist/entity.js +1 -0
  36. package/dist/held.d.ts +19 -0
  37. package/dist/held.d.ts.map +1 -0
  38. package/dist/held.js +70 -0
  39. package/dist/held.js.map +1 -0
  40. package/dist/impact.d.ts +79 -0
  41. package/dist/impact.d.ts.map +1 -0
  42. package/dist/impact.js +166 -0
  43. package/dist/impact.js.map +1 -0
  44. package/dist/index.d.ts +1542 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +2791 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/inspect-DtRQGCRP.d.ts +134 -0
  49. package/dist/inspect-DtRQGCRP.d.ts.map +1 -0
  50. package/dist/inspect.d.ts +2 -0
  51. package/dist/inspect.js +33 -0
  52. package/dist/inspect.js.map +1 -0
  53. package/dist/json-DowLl1eB.d.ts +52 -0
  54. package/dist/json-DowLl1eB.d.ts.map +1 -0
  55. package/dist/json.d.ts +2 -0
  56. package/dist/json.js +123 -0
  57. package/dist/json.js.map +1 -0
  58. package/dist/law.d.ts +56 -0
  59. package/dist/law.d.ts.map +1 -0
  60. package/dist/law.js +201 -0
  61. package/dist/law.js.map +1 -0
  62. package/dist/live-BpTzlCnY.d.ts +79 -0
  63. package/dist/live-BpTzlCnY.d.ts.map +1 -0
  64. package/dist/live.d.ts +2 -0
  65. package/dist/live.js +126 -0
  66. package/dist/live.js.map +1 -0
  67. package/dist/matching-DF5F9Us8.d.ts +100 -0
  68. package/dist/matching-DF5F9Us8.d.ts.map +1 -0
  69. package/dist/matching.d.ts +2 -0
  70. package/dist/matching.js +172 -0
  71. package/dist/matching.js.map +1 -0
  72. package/dist/model-B6zk1NMB.d.ts +710 -0
  73. package/dist/model-B6zk1NMB.d.ts.map +1 -0
  74. package/dist/model.d.ts +2 -0
  75. package/dist/model.js +1308 -0
  76. package/dist/model.js.map +1 -0
  77. package/dist/mutation.d.ts +2 -0
  78. package/dist/mutation.js +612 -0
  79. package/dist/mutation.js.map +1 -0
  80. package/dist/optimistic-CECsfNGY.d.ts +523 -0
  81. package/dist/optimistic-CECsfNGY.d.ts.map +1 -0
  82. package/dist/optimistic.d.ts +2 -0
  83. package/dist/optimistic.js +336 -0
  84. package/dist/optimistic.js.map +1 -0
  85. package/dist/outbox-DNuc4kZp.d.ts +259 -0
  86. package/dist/outbox-DNuc4kZp.d.ts.map +1 -0
  87. package/dist/outbox.d.ts +2 -0
  88. package/dist/outbox.js +326 -0
  89. package/dist/outbox.js.map +1 -0
  90. package/dist/patchValues.d.ts +10 -0
  91. package/dist/patchValues.d.ts.map +1 -0
  92. package/dist/patchValues.js +57 -0
  93. package/dist/patchValues.js.map +1 -0
  94. package/dist/persistence-CCMnvg7-.d.ts +114 -0
  95. package/dist/persistence-CCMnvg7-.d.ts.map +1 -0
  96. package/dist/persistence.d.ts +2 -0
  97. package/dist/persistence.js +205 -0
  98. package/dist/persistence.js.map +1 -0
  99. package/dist/placement-jZdsIpmj.d.ts +50 -0
  100. package/dist/placement-jZdsIpmj.d.ts.map +1 -0
  101. package/dist/placement.d.ts +2 -0
  102. package/dist/placement.js +116 -0
  103. package/dist/placement.js.map +1 -0
  104. package/dist/plan-D9cftxC_.d.ts +35 -0
  105. package/dist/plan-D9cftxC_.d.ts.map +1 -0
  106. package/dist/plan.d.ts +2 -0
  107. package/dist/plan.js +100 -0
  108. package/dist/plan.js.map +1 -0
  109. package/dist/policy-DsWHmIAq.d.ts +42 -0
  110. package/dist/policy-DsWHmIAq.d.ts.map +1 -0
  111. package/dist/policy.d.ts +2 -0
  112. package/dist/policy.js +32 -0
  113. package/dist/policy.js.map +1 -0
  114. package/dist/{port.d.mts → port.d.ts} +3 -2
  115. package/dist/port.d.ts.map +1 -0
  116. package/dist/{port.mjs → port.js} +3 -2
  117. package/dist/port.js.map +1 -0
  118. package/dist/query-BuIU93xA.d.ts +141 -0
  119. package/dist/query-BuIU93xA.d.ts.map +1 -0
  120. package/dist/query.d.ts +2 -0
  121. package/dist/query.js +0 -0
  122. package/dist/query.js.map +1 -0
  123. package/dist/record.d.ts +11 -0
  124. package/dist/record.d.ts.map +1 -0
  125. package/dist/record.js +21 -0
  126. package/dist/record.js.map +1 -0
  127. package/dist/relation-BLBGOZom.d.ts +59 -0
  128. package/dist/relation-BLBGOZom.d.ts.map +1 -0
  129. package/dist/relation.d.ts +2 -0
  130. package/dist/relation.js +93 -0
  131. package/dist/relation.js.map +1 -0
  132. package/dist/remoteData-mK1suYi1.d.ts +148 -0
  133. package/dist/remoteData-mK1suYi1.d.ts.map +1 -0
  134. package/dist/remoteData.d.ts +2 -0
  135. package/dist/remoteData.js +179 -0
  136. package/dist/remoteData.js.map +1 -0
  137. package/dist/reporting.d.ts +12 -0
  138. package/dist/reporting.d.ts.map +1 -0
  139. package/dist/reporting.js +45 -0
  140. package/dist/reporting.js.map +1 -0
  141. package/dist/requirement-D57S2LpH.d.ts +64 -0
  142. package/dist/requirement-D57S2LpH.d.ts.map +1 -0
  143. package/dist/requirement.d.ts +2 -0
  144. package/dist/requirement.js +114 -0
  145. package/dist/requirement.js.map +1 -0
  146. package/dist/resume-Ct5R6yli.d.ts +92 -0
  147. package/dist/resume-Ct5R6yli.d.ts.map +1 -0
  148. package/dist/resume.d.ts +2 -0
  149. package/dist/resume.js +222 -0
  150. package/dist/resume.js.map +1 -0
  151. package/dist/retain-BfNTvBRb.d.ts +48 -0
  152. package/dist/retain-BfNTvBRb.d.ts.map +1 -0
  153. package/dist/retain.d.ts +2 -0
  154. package/dist/retain.js +107 -0
  155. package/dist/retain.js.map +1 -0
  156. package/dist/selection.d.ts +2 -0
  157. package/dist/selection.js +1 -0
  158. package/dist/shown.d.ts +20 -0
  159. package/dist/shown.d.ts.map +1 -0
  160. package/dist/shown.js +40 -0
  161. package/dist/shown.js.map +1 -0
  162. package/dist/sse-C7LhdbiQ.d.ts +17 -0
  163. package/dist/sse-C7LhdbiQ.d.ts.map +1 -0
  164. package/dist/sse.d.ts +2 -0
  165. package/dist/sse.js +127 -0
  166. package/dist/sse.js.map +1 -0
  167. package/dist/store-ah2qjcJW.d.ts +100 -0
  168. package/dist/store-ah2qjcJW.d.ts.map +1 -0
  169. package/dist/store.d.ts +2 -0
  170. package/dist/store.js +218 -0
  171. package/dist/store.js.map +1 -0
  172. package/dist/testing.d.ts +133 -0
  173. package/dist/testing.d.ts.map +1 -0
  174. package/dist/testing.js +0 -0
  175. package/dist/testing.js.map +1 -0
  176. package/dist/why-kgp_Wr3z.d.ts +483 -0
  177. package/dist/why-kgp_Wr3z.d.ts.map +1 -0
  178. package/dist/why.d.ts +2 -0
  179. package/dist/why.js +293 -0
  180. package/dist/why.js.map +1 -0
  181. package/dist/whyReasons.d.ts +42 -0
  182. package/dist/whyReasons.d.ts.map +1 -0
  183. package/dist/whyReasons.js +211 -0
  184. package/dist/whyReasons.js.map +1 -0
  185. package/dist/wire-DthPcTM6.d.ts +787 -0
  186. package/dist/wire-DthPcTM6.d.ts.map +1 -0
  187. package/dist/wire.d.ts +2 -0
  188. package/dist/wire.js +329 -0
  189. package/dist/wire.js.map +1 -0
  190. package/package.json +19 -14
  191. package/dist/index-BEvVAL76.d.mts +0 -4097
  192. package/dist/index-BEvVAL76.d.mts.map +0 -1
  193. package/dist/index.d.mts +0 -2
  194. package/dist/index.mjs +0 -1
  195. package/dist/port.d.mts.map +0 -1
  196. package/dist/port.mjs.map +0 -1
  197. package/dist/src-BDqn7Ocr.mjs +0 -6344
  198. package/dist/src-BDqn7Ocr.mjs.map +0 -1
@@ -0,0 +1,787 @@
1
+ import { a as Requirement, n as RelationRequirement } from "./requirement-D57S2LpH.js";
2
+ import { Schema } from "effect";
3
+ import { Rpc, RpcGroup } from "effect/rpc";
4
+ /**
5
+ * The read/live protocol version. A batch names the version it speaks and the
6
+ * server refuses a mismatch with `RemoteProtocolError`, so a shape change never
7
+ * drifts silently: bump it whenever `ReadRequest` or `LiveRequirement` change.
8
+ */
9
+ declare const REMOTE_PROTOCOL_VERSION = 5;
10
+ declare const RemoteReadError_base: Schema.Class<RemoteReadError, Schema.TaggedStruct<"RemoteReadError", {
11
+ readonly message: Schema.String;
12
+ }>, import("effect/Cause").YieldableError>;
13
+ declare class RemoteReadError extends RemoteReadError_base {}
14
+ declare const RemoteMutationError_base: Schema.Class<RemoteMutationError, Schema.TaggedStruct<"RemoteMutationError", {
15
+ readonly message: Schema.String;
16
+ /** The mutation's own `Refusal`, encoded, when the server refused it as one. */
17
+ readonly refusal: Schema.optional<Schema.Unknown>;
18
+ }>, import("effect/Cause").YieldableError>;
19
+ declare class RemoteMutationError extends RemoteMutationError_base {}
20
+ declare const RemoteUnreachable_base: Schema.Class<RemoteUnreachable, Schema.TaggedStruct<"Unreachable", {
21
+ readonly message: Schema.String;
22
+ }>, import("effect/Cause").YieldableError>;
23
+ /**
24
+ * No answer came back: the request could not be sent, or what came back was
25
+ * not an answer. The server may or may not have run it, so it is safe to send
26
+ * again only as the same operation, which a ledgered writer answers from its
27
+ * record. The outbox sends a durable write again after it (#247).
28
+ */
29
+ declare class RemoteUnreachable extends RemoteUnreachable_base {}
30
+ declare const RemoteForbidden_base: Schema.Class<RemoteForbidden, Schema.TaggedStruct<"Forbidden", {
31
+ readonly message: Schema.String;
32
+ readonly reason: Schema.optional<Schema.String>;
33
+ }>, import("effect/Cause").YieldableError>;
34
+ /**
35
+ * The server refused who is asking: they may not do this, and asking again
36
+ * as the same principal is refused again. `reason` is the application's own
37
+ * words for the person who asked; without it the refusal says nothing of why.
38
+ */
39
+ declare class RemoteForbidden extends RemoteForbidden_base {}
40
+ declare const RemoteUnauthenticated_base: Schema.Class<RemoteUnauthenticated, Schema.TaggedStruct<"Unauthenticated", {
41
+ readonly message: Schema.String;
42
+ readonly reason: Schema.optional<Schema.String>;
43
+ }>, import("effect/Cause").YieldableError>;
44
+ /**
45
+ * The server could not tell who is asking: a credential was sent and no
46
+ * longer holds, or none was sent where one is needed. Asking again as the
47
+ * same caller is refused again; signing in again is the remedy. `reason` is
48
+ * words for the person who asked; without it the refusal says nothing of why.
49
+ */
50
+ declare class RemoteUnauthenticated extends RemoteUnauthenticated_base {}
51
+ declare const RemoteLiveError_base: Schema.Class<RemoteLiveError, Schema.TaggedStruct<"RemoteLiveError", {
52
+ readonly message: Schema.String;
53
+ }>, import("effect/Cause").YieldableError>;
54
+ declare class RemoteLiveError extends RemoteLiveError_base {}
55
+ declare const RemoteLiveRefused_base: Schema.Class<RemoteLiveRefused, Schema.TaggedStruct<"RemoteLiveRefused", {
56
+ readonly message: Schema.String;
57
+ }>, import("effect/Cause").YieldableError>;
58
+ /**
59
+ * The server refused a live subscription for what it asks (more ids of one
60
+ * Entity than `maxIdsPerEntity`), before reading anything. The same
61
+ * requirements are refused again, so a client does not reconnect it.
62
+ */
63
+ declare class RemoteLiveRefused extends RemoteLiveRefused_base {}
64
+ declare const RemoteProtocolError_base: Schema.Class<RemoteProtocolError, Schema.TaggedStruct<"RemoteProtocolError", {
65
+ readonly message: Schema.String;
66
+ readonly expected: Schema.Number;
67
+ readonly received: Schema.Number;
68
+ }>, import("effect/Cause").YieldableError>;
69
+ /** The peer speaks another protocol version; nothing was read. */
70
+ declare class RemoteProtocolError extends RemoteProtocolError_base {}
71
+ /** A page size: a non-negative integer, refused at decode otherwise rather than defaulted. */
72
+ declare const PageSize: Schema.Number;
73
+ declare const WindowSchema: Schema.Struct<{
74
+ readonly first: Schema.optional<Schema.Number>;
75
+ readonly last: Schema.optional<Schema.Number>;
76
+ readonly after: Schema.optional<Schema.String>;
77
+ readonly before: Schema.optional<Schema.String>;
78
+ }>;
79
+ /** A request may not name more fields of one entity than this; a selection never does. */
80
+ declare const MAX_FIELDS_PER_REQUEST = 256;
81
+ /** A selection may not nest relations deeper than this; the wire refuses more. */
82
+ declare const MAX_RELATION_DEPTH = 8;
83
+ declare const RelationRequest: Schema.Codec<RelationRequirement, RelationRequirement, never, never>;
84
+ declare const ReadRequest: Schema.Codec<Requirement, Requirement>;
85
+ declare const ReadBatch: Schema.Struct<{
86
+ readonly version: Schema.Number;
87
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
88
+ }>;
89
+ declare const NormalizedEntity: Schema.Struct<{
90
+ readonly entity: Schema.String;
91
+ readonly id: Schema.String;
92
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
93
+ }>;
94
+ /**
95
+ * Fields a read asked for that the server answered without, and will not
96
+ * answer with: the client stops asking. It says nothing about why, so a rule
97
+ * that withholds a field is not itself on the wire.
98
+ */
99
+ declare const SettledFields: Schema.Struct<{
100
+ readonly entity: Schema.String;
101
+ readonly id: Schema.String;
102
+ readonly fields: Schema.$Array<Schema.String>;
103
+ }>;
104
+ declare const ReadBatchResult: Schema.Struct<{
105
+ readonly entities: Schema.$Array<Schema.Struct<{
106
+ readonly entity: Schema.String;
107
+ readonly id: Schema.String;
108
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
109
+ }>>;
110
+ readonly settled: Schema.$Array<Schema.Struct<{
111
+ readonly entity: Schema.String;
112
+ readonly id: Schema.String;
113
+ readonly fields: Schema.$Array<Schema.String>;
114
+ }>>;
115
+ }>;
116
+ /** A read a mutation's answer carries: what was asked, and what came back. */
117
+ declare const AnswerRead: Schema.Struct<{
118
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
119
+ readonly result: Schema.Struct<{
120
+ readonly entities: Schema.$Array<Schema.Struct<{
121
+ readonly entity: Schema.String;
122
+ readonly id: Schema.String;
123
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
124
+ }>>;
125
+ readonly settled: Schema.$Array<Schema.Struct<{
126
+ readonly entity: Schema.String;
127
+ readonly id: Schema.String;
128
+ readonly fields: Schema.$Array<Schema.String>;
129
+ }>>;
130
+ }>;
131
+ }>;
132
+ /**
133
+ * One operation's identity across every client: minted where it is first sent
134
+ * and sent again with each retry of it. Bounded, since a server keys a record
135
+ * of the write by it.
136
+ */
137
+ declare const OperationId: Schema.String;
138
+ /** A mutation request may name at most this many entities in `shown`. */
139
+ declare const MAX_SHOWN_ENTITIES = 256;
140
+ /**
141
+ * What a client reads of one entity's rows: a read request without its id. It
142
+ * nests as deep as a read request does, so any slice a read asks can be sent.
143
+ */
144
+ declare const ShownSlice: Schema.Codec<RelationRequirement, RelationRequirement>;
145
+ declare const MutationRequest: Schema.Struct<{
146
+ /**
147
+ * This client's id for the request, the same on each retry of it. It is
148
+ * unique within one client's Model only (a counter there), so it names a
149
+ * request to that client; `operation` names it to a server.
150
+ */
151
+ readonly requestId: Schema.String;
152
+ /** The operation's identity across clients: what a server keys a record of the write by. */
153
+ readonly operation: Schema.optional<Schema.String>;
154
+ readonly mutation: Schema.String;
155
+ readonly input: Schema.Unknown;
156
+ /** For a mutation that is a `Write`: the input keys to write, when not all of them. */
157
+ readonly keys: Schema.optional<Schema.$Array<Schema.String>>;
158
+ /**
159
+ * When the reader acted, in milliseconds since the epoch: what the client
160
+ * predicted the write's time as. A server takes it within its `clockSkew`
161
+ * of its own clock. Optional, so a client and a server of either age agree.
162
+ */
163
+ readonly now: Schema.optional<Schema.Int>;
164
+ /**
165
+ * What the client's active reads show of each entity's rows. The server
166
+ * answers, of each row the mutation names, the shown fields its answer
167
+ * left out, read as any read is (`MutationResult.read`).
168
+ */
169
+ readonly shown: Schema.optional<Schema.$Array<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>>;
170
+ }>;
171
+ declare const LiveEdge: Schema.Struct<{
172
+ readonly entity: Schema.String;
173
+ readonly id: Schema.String;
174
+ readonly key: Schema.String;
175
+ }>;
176
+ /** A connection change a mutation confirms: the same facts a live event carries, without a cursor. */
177
+ declare const ConnectionChangeSchema: Schema.Union<readonly [Schema.Struct<{
178
+ readonly _tag: Schema.Literal<"Insert">;
179
+ readonly connection: Schema.String;
180
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
181
+ readonly edge: Schema.Struct<{
182
+ readonly entity: Schema.String;
183
+ readonly id: Schema.String;
184
+ readonly key: Schema.String;
185
+ }>;
186
+ }>, Schema.Struct<{
187
+ readonly _tag: Schema.Literal<"Remove">;
188
+ readonly connection: Schema.String;
189
+ readonly edge: Schema.Struct<{
190
+ readonly entity: Schema.String;
191
+ readonly id: Schema.String;
192
+ readonly key: Schema.String;
193
+ }>;
194
+ }>]>;
195
+ declare const MutationResult: Schema.Struct<{
196
+ readonly output: Schema.Unknown;
197
+ readonly entities: Schema.$Array<Schema.Struct<{
198
+ readonly entity: Schema.String;
199
+ readonly id: Schema.String;
200
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
201
+ }>>;
202
+ /** Connection changes the mutation made, applied alongside its entity patches. */
203
+ readonly connections: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
204
+ readonly _tag: Schema.Literal<"Insert">;
205
+ readonly connection: Schema.String;
206
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
207
+ readonly edge: Schema.Struct<{
208
+ readonly entity: Schema.String;
209
+ readonly id: Schema.String;
210
+ readonly key: Schema.String;
211
+ }>;
212
+ }>, Schema.Struct<{
213
+ readonly _tag: Schema.Literal<"Remove">;
214
+ readonly connection: Schema.String;
215
+ readonly edge: Schema.Struct<{
216
+ readonly entity: Schema.String;
217
+ readonly id: Schema.String;
218
+ readonly key: Schema.String;
219
+ }>;
220
+ }>]>>>;
221
+ /** Entities the mutation deleted; the client knows them absent from then on. */
222
+ readonly deleted: Schema.optional<Schema.$Array<Schema.Struct<{
223
+ readonly entity: Schema.String;
224
+ readonly id: Schema.String;
225
+ }>>>;
226
+ /**
227
+ * A fresh read, after the write, of what the request's `shown` asks of the
228
+ * rows the answer names: the requirements read and what came back, written
229
+ * as a read is.
230
+ */
231
+ readonly read: Schema.optional<Schema.Struct<{
232
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
233
+ readonly result: Schema.Struct<{
234
+ readonly entities: Schema.$Array<Schema.Struct<{
235
+ readonly entity: Schema.String;
236
+ readonly id: Schema.String;
237
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
238
+ }>>;
239
+ readonly settled: Schema.$Array<Schema.Struct<{
240
+ readonly entity: Schema.String;
241
+ readonly id: Schema.String;
242
+ readonly fields: Schema.$Array<Schema.String>;
243
+ }>>;
244
+ }>;
245
+ }>>;
246
+ }>;
247
+ declare const QueryRequest: Schema.Struct<{
248
+ readonly query: Schema.String;
249
+ readonly input: Schema.Unknown;
250
+ readonly window: Schema.Struct<{
251
+ readonly first: Schema.optional<Schema.Number>;
252
+ readonly last: Schema.optional<Schema.Number>;
253
+ readonly after: Schema.optional<Schema.String>;
254
+ readonly before: Schema.optional<Schema.String>;
255
+ }>;
256
+ /**
257
+ * What to read of each item, as the relation slice a read asks the server
258
+ * for. Absent for a query run without one: the response carries only edges,
259
+ * and the client's read entry fetches fields in a second round trip.
260
+ */
261
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
262
+ }>;
263
+ /** A live subscription may watch no more lists than this; each is run again every tick. */
264
+ declare const MAX_LIVE_QUERIES = 32;
265
+ declare const LiveRequirement: Schema.Struct<{
266
+ readonly version: Schema.Number;
267
+ readonly requirements: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
268
+ /** Lists read live (`Data.query(…, { live: true })`), each as its read sends it. */
269
+ readonly queries: Schema.optional<Schema.$Array<Schema.Struct<{
270
+ readonly query: Schema.String;
271
+ readonly input: Schema.Unknown;
272
+ readonly window: Schema.Struct<{
273
+ readonly first: Schema.optional<Schema.Number>;
274
+ readonly last: Schema.optional<Schema.Number>;
275
+ readonly after: Schema.optional<Schema.String>;
276
+ readonly before: Schema.optional<Schema.String>;
277
+ }>;
278
+ /**
279
+ * What to read of each item, as the relation slice a read asks the server
280
+ * for. Absent for a query run without one: the response carries only edges,
281
+ * and the client's read entry fetches fields in a second round trip.
282
+ */
283
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
284
+ }>>>;
285
+ /** Resume cursor; events at or before it are duplicates. */
286
+ readonly after: Schema.Number;
287
+ }>;
288
+ /**
289
+ * A live change. Entity changes update the store; connection changes alter
290
+ * membership and ordering; both carry a per-stream cursor.
291
+ */
292
+ declare const LiveChange: Schema.Union<readonly [Schema.Struct<{
293
+ readonly _tag: Schema.Literal<"EntityPatched">;
294
+ readonly cursor: Schema.Number;
295
+ readonly entity: Schema.String;
296
+ readonly id: Schema.String;
297
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
298
+ readonly changed: Schema.$Array<Schema.String>;
299
+ }>, Schema.Struct<{
300
+ readonly _tag: Schema.Literal<"EntityDeleted">;
301
+ readonly cursor: Schema.Number;
302
+ readonly entity: Schema.String;
303
+ readonly id: Schema.String;
304
+ }>, Schema.Struct<{
305
+ readonly _tag: Schema.Literal<"ConnectionInsert">;
306
+ readonly cursor: Schema.Number;
307
+ readonly connection: Schema.String;
308
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
309
+ readonly edge: Schema.Struct<{
310
+ readonly entity: Schema.String;
311
+ readonly id: Schema.String;
312
+ readonly key: Schema.String;
313
+ }>;
314
+ }>, Schema.Struct<{
315
+ readonly _tag: Schema.Literal<"ConnectionRemove">;
316
+ readonly cursor: Schema.Number;
317
+ readonly connection: Schema.String;
318
+ readonly edge: Schema.Struct<{
319
+ readonly entity: Schema.String;
320
+ readonly id: Schema.String;
321
+ readonly key: Schema.String;
322
+ }>;
323
+ }>, Schema.Struct<{
324
+ readonly _tag: Schema.Literal<"ConnectionInvalidate">;
325
+ readonly cursor: Schema.Number;
326
+ readonly connection: Schema.String;
327
+ }>]>;
328
+ declare const Read: Rpc.Rpc<"FoldkitRemoteRead", Schema.Struct<{
329
+ readonly version: Schema.Number;
330
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
331
+ }>, Schema.Struct<{
332
+ readonly entities: Schema.$Array<Schema.Struct<{
333
+ readonly entity: Schema.String;
334
+ readonly id: Schema.String;
335
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
336
+ }>>;
337
+ readonly settled: Schema.$Array<Schema.Struct<{
338
+ readonly entity: Schema.String;
339
+ readonly id: Schema.String;
340
+ readonly fields: Schema.$Array<Schema.String>;
341
+ }>>;
342
+ }>, Schema.Union<readonly [typeof RemoteReadError, typeof RemoteProtocolError, typeof RemoteUnauthenticated]>, never, never>;
343
+ declare const Mutate: Rpc.Rpc<"FoldkitRemoteMutate", Schema.Struct<{
344
+ /**
345
+ * This client's id for the request, the same on each retry of it. It is
346
+ * unique within one client's Model only (a counter there), so it names a
347
+ * request to that client; `operation` names it to a server.
348
+ */
349
+ readonly requestId: Schema.String;
350
+ /** The operation's identity across clients: what a server keys a record of the write by. */
351
+ readonly operation: Schema.optional<Schema.String>;
352
+ readonly mutation: Schema.String;
353
+ readonly input: Schema.Unknown;
354
+ /** For a mutation that is a `Write`: the input keys to write, when not all of them. */
355
+ readonly keys: Schema.optional<Schema.$Array<Schema.String>>;
356
+ /**
357
+ * When the reader acted, in milliseconds since the epoch: what the client
358
+ * predicted the write's time as. A server takes it within its `clockSkew`
359
+ * of its own clock. Optional, so a client and a server of either age agree.
360
+ */
361
+ readonly now: Schema.optional<Schema.Int>;
362
+ /**
363
+ * What the client's active reads show of each entity's rows. The server
364
+ * answers, of each row the mutation names, the shown fields its answer
365
+ * left out, read as any read is (`MutationResult.read`).
366
+ */
367
+ readonly shown: Schema.optional<Schema.$Array<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>>;
368
+ }>, Schema.Struct<{
369
+ readonly output: Schema.Unknown;
370
+ readonly entities: Schema.$Array<Schema.Struct<{
371
+ readonly entity: Schema.String;
372
+ readonly id: Schema.String;
373
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
374
+ }>>;
375
+ /** Connection changes the mutation made, applied alongside its entity patches. */
376
+ readonly connections: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
377
+ readonly _tag: Schema.Literal<"Insert">;
378
+ readonly connection: Schema.String;
379
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
380
+ readonly edge: Schema.Struct<{
381
+ readonly entity: Schema.String;
382
+ readonly id: Schema.String;
383
+ readonly key: Schema.String;
384
+ }>;
385
+ }>, Schema.Struct<{
386
+ readonly _tag: Schema.Literal<"Remove">;
387
+ readonly connection: Schema.String;
388
+ readonly edge: Schema.Struct<{
389
+ readonly entity: Schema.String;
390
+ readonly id: Schema.String;
391
+ readonly key: Schema.String;
392
+ }>;
393
+ }>]>>>;
394
+ /** Entities the mutation deleted; the client knows them absent from then on. */
395
+ readonly deleted: Schema.optional<Schema.$Array<Schema.Struct<{
396
+ readonly entity: Schema.String;
397
+ readonly id: Schema.String;
398
+ }>>>;
399
+ /**
400
+ * A fresh read, after the write, of what the request's `shown` asks of the
401
+ * rows the answer names: the requirements read and what came back, written
402
+ * as a read is.
403
+ */
404
+ readonly read: Schema.optional<Schema.Struct<{
405
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
406
+ readonly result: Schema.Struct<{
407
+ readonly entities: Schema.$Array<Schema.Struct<{
408
+ readonly entity: Schema.String;
409
+ readonly id: Schema.String;
410
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
411
+ }>>;
412
+ readonly settled: Schema.$Array<Schema.Struct<{
413
+ readonly entity: Schema.String;
414
+ readonly id: Schema.String;
415
+ readonly fields: Schema.$Array<Schema.String>;
416
+ }>>;
417
+ }>;
418
+ }>>;
419
+ }>, Schema.Union<readonly [typeof RemoteMutationError, typeof RemoteForbidden, typeof RemoteUnauthenticated]>, never, never>;
420
+ declare const Live: Rpc.Rpc<"FoldkitRemoteLive", Schema.Struct<{
421
+ readonly version: Schema.Number;
422
+ readonly requirements: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
423
+ /** Lists read live (`Data.query(…, { live: true })`), each as its read sends it. */
424
+ readonly queries: Schema.optional<Schema.$Array<Schema.Struct<{
425
+ readonly query: Schema.String;
426
+ readonly input: Schema.Unknown;
427
+ readonly window: Schema.Struct<{
428
+ readonly first: Schema.optional<Schema.Number>;
429
+ readonly last: Schema.optional<Schema.Number>;
430
+ readonly after: Schema.optional<Schema.String>;
431
+ readonly before: Schema.optional<Schema.String>;
432
+ }>;
433
+ /**
434
+ * What to read of each item, as the relation slice a read asks the server
435
+ * for. Absent for a query run without one: the response carries only edges,
436
+ * and the client's read entry fetches fields in a second round trip.
437
+ */
438
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
439
+ }>>>;
440
+ /** Resume cursor; events at or before it are duplicates. */
441
+ readonly after: Schema.Number;
442
+ }>, import("effect/rpc/RpcSchema").Stream<Schema.Union<readonly [Schema.Struct<{
443
+ readonly _tag: Schema.Literal<"EntityPatched">;
444
+ readonly cursor: Schema.Number;
445
+ readonly entity: Schema.String;
446
+ readonly id: Schema.String;
447
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
448
+ readonly changed: Schema.$Array<Schema.String>;
449
+ }>, Schema.Struct<{
450
+ readonly _tag: Schema.Literal<"EntityDeleted">;
451
+ readonly cursor: Schema.Number;
452
+ readonly entity: Schema.String;
453
+ readonly id: Schema.String;
454
+ }>, Schema.Struct<{
455
+ readonly _tag: Schema.Literal<"ConnectionInsert">;
456
+ readonly cursor: Schema.Number;
457
+ readonly connection: Schema.String;
458
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
459
+ readonly edge: Schema.Struct<{
460
+ readonly entity: Schema.String;
461
+ readonly id: Schema.String;
462
+ readonly key: Schema.String;
463
+ }>;
464
+ }>, Schema.Struct<{
465
+ readonly _tag: Schema.Literal<"ConnectionRemove">;
466
+ readonly cursor: Schema.Number;
467
+ readonly connection: Schema.String;
468
+ readonly edge: Schema.Struct<{
469
+ readonly entity: Schema.String;
470
+ readonly id: Schema.String;
471
+ readonly key: Schema.String;
472
+ }>;
473
+ }>, Schema.Struct<{
474
+ readonly _tag: Schema.Literal<"ConnectionInvalidate">;
475
+ readonly cursor: Schema.Number;
476
+ readonly connection: Schema.String;
477
+ }>]>, Schema.Union<readonly [typeof RemoteLiveError, typeof RemoteLiveRefused, typeof RemoteProtocolError, typeof RemoteUnauthenticated]>>, Schema.Never, never, never>;
478
+ declare const RemoteQueryError_base: Schema.Class<RemoteQueryError, Schema.TaggedStruct<"RemoteQueryError", {
479
+ readonly message: Schema.String;
480
+ }>, import("effect/Cause").YieldableError>;
481
+ declare class RemoteQueryError extends RemoteQueryError_base {}
482
+ declare const WireBoundary: Schema.Union<readonly [Schema.Struct<{
483
+ readonly _tag: Schema.Literal<"Terminal">;
484
+ }>, Schema.Struct<{
485
+ readonly _tag: Schema.Literal<"Cursor">;
486
+ readonly cursor: Schema.String;
487
+ }>, Schema.Struct<{
488
+ readonly _tag: Schema.Literal<"Unknown">;
489
+ }>]>;
490
+ declare const QueryEdge: Schema.Struct<{
491
+ readonly entity: Schema.String;
492
+ readonly id: Schema.String;
493
+ readonly key: Schema.String;
494
+ }>;
495
+ declare const QueryResult: Schema.Struct<{
496
+ readonly edges: Schema.$Array<Schema.Struct<{
497
+ readonly entity: Schema.String;
498
+ readonly id: Schema.String;
499
+ readonly key: Schema.String;
500
+ }>>;
501
+ readonly start: Schema.Union<readonly [Schema.Struct<{
502
+ readonly _tag: Schema.Literal<"Terminal">;
503
+ }>, Schema.Struct<{
504
+ readonly _tag: Schema.Literal<"Cursor">;
505
+ readonly cursor: Schema.String;
506
+ }>, Schema.Struct<{
507
+ readonly _tag: Schema.Literal<"Unknown">;
508
+ }>]>;
509
+ readonly end: Schema.Union<readonly [Schema.Struct<{
510
+ readonly _tag: Schema.Literal<"Terminal">;
511
+ }>, Schema.Struct<{
512
+ readonly _tag: Schema.Literal<"Cursor">;
513
+ readonly cursor: Schema.String;
514
+ }>, Schema.Struct<{
515
+ readonly _tag: Schema.Literal<"Unknown">;
516
+ }>]>;
517
+ /**
518
+ * The selected fields of the page's items, in the same shape a read batch
519
+ * returns. Absent from a server that predates payload planning: the client
520
+ * reads it as empty and fetches fields as before.
521
+ */
522
+ readonly entities: Schema.optional<Schema.$Array<Schema.Struct<{
523
+ readonly entity: Schema.String;
524
+ readonly id: Schema.String;
525
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
526
+ }>>>;
527
+ readonly settled: Schema.optional<Schema.$Array<Schema.Struct<{
528
+ readonly entity: Schema.String;
529
+ readonly id: Schema.String;
530
+ readonly fields: Schema.$Array<Schema.String>;
531
+ }>>>;
532
+ }>;
533
+ declare const QueryRpc: Rpc.Rpc<"FoldkitRemoteQuery", Schema.Struct<{
534
+ readonly query: Schema.String;
535
+ readonly input: Schema.Unknown;
536
+ readonly window: Schema.Struct<{
537
+ readonly first: Schema.optional<Schema.Number>;
538
+ readonly last: Schema.optional<Schema.Number>;
539
+ readonly after: Schema.optional<Schema.String>;
540
+ readonly before: Schema.optional<Schema.String>;
541
+ }>;
542
+ /**
543
+ * What to read of each item, as the relation slice a read asks the server
544
+ * for. Absent for a query run without one: the response carries only edges,
545
+ * and the client's read entry fetches fields in a second round trip.
546
+ */
547
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
548
+ }>, Schema.Struct<{
549
+ readonly edges: Schema.$Array<Schema.Struct<{
550
+ readonly entity: Schema.String;
551
+ readonly id: Schema.String;
552
+ readonly key: Schema.String;
553
+ }>>;
554
+ readonly start: Schema.Union<readonly [Schema.Struct<{
555
+ readonly _tag: Schema.Literal<"Terminal">;
556
+ }>, Schema.Struct<{
557
+ readonly _tag: Schema.Literal<"Cursor">;
558
+ readonly cursor: Schema.String;
559
+ }>, Schema.Struct<{
560
+ readonly _tag: Schema.Literal<"Unknown">;
561
+ }>]>;
562
+ readonly end: Schema.Union<readonly [Schema.Struct<{
563
+ readonly _tag: Schema.Literal<"Terminal">;
564
+ }>, Schema.Struct<{
565
+ readonly _tag: Schema.Literal<"Cursor">;
566
+ readonly cursor: Schema.String;
567
+ }>, Schema.Struct<{
568
+ readonly _tag: Schema.Literal<"Unknown">;
569
+ }>]>;
570
+ /**
571
+ * The selected fields of the page's items, in the same shape a read batch
572
+ * returns. Absent from a server that predates payload planning: the client
573
+ * reads it as empty and fetches fields as before.
574
+ */
575
+ readonly entities: Schema.optional<Schema.$Array<Schema.Struct<{
576
+ readonly entity: Schema.String;
577
+ readonly id: Schema.String;
578
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
579
+ }>>>;
580
+ readonly settled: Schema.optional<Schema.$Array<Schema.Struct<{
581
+ readonly entity: Schema.String;
582
+ readonly id: Schema.String;
583
+ readonly fields: Schema.$Array<Schema.String>;
584
+ }>>>;
585
+ }>, Schema.Union<readonly [typeof RemoteQueryError, typeof RemoteUnauthenticated]>, never, never>;
586
+ declare const RemoteRpc: RpcGroup.RpcGroup<Rpc.Rpc<"FoldkitRemoteLive", Schema.Struct<{
587
+ readonly version: Schema.Number;
588
+ readonly requirements: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
589
+ /** Lists read live (`Data.query(…, { live: true })`), each as its read sends it. */
590
+ readonly queries: Schema.optional<Schema.$Array<Schema.Struct<{
591
+ readonly query: Schema.String;
592
+ readonly input: Schema.Unknown;
593
+ readonly window: Schema.Struct<{
594
+ readonly first: Schema.optional<Schema.Number>;
595
+ readonly last: Schema.optional<Schema.Number>;
596
+ readonly after: Schema.optional<Schema.String>;
597
+ readonly before: Schema.optional<Schema.String>;
598
+ }>;
599
+ /**
600
+ * What to read of each item, as the relation slice a read asks the server
601
+ * for. Absent for a query run without one: the response carries only edges,
602
+ * and the client's read entry fetches fields in a second round trip.
603
+ */
604
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
605
+ }>>>;
606
+ /** Resume cursor; events at or before it are duplicates. */
607
+ readonly after: Schema.Number;
608
+ }>, import("effect/rpc/RpcSchema").Stream<Schema.Union<readonly [Schema.Struct<{
609
+ readonly _tag: Schema.Literal<"EntityPatched">;
610
+ readonly cursor: Schema.Number;
611
+ readonly entity: Schema.String;
612
+ readonly id: Schema.String;
613
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
614
+ readonly changed: Schema.$Array<Schema.String>;
615
+ }>, Schema.Struct<{
616
+ readonly _tag: Schema.Literal<"EntityDeleted">;
617
+ readonly cursor: Schema.Number;
618
+ readonly entity: Schema.String;
619
+ readonly id: Schema.String;
620
+ }>, Schema.Struct<{
621
+ readonly _tag: Schema.Literal<"ConnectionInsert">;
622
+ readonly cursor: Schema.Number;
623
+ readonly connection: Schema.String;
624
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
625
+ readonly edge: Schema.Struct<{
626
+ readonly entity: Schema.String;
627
+ readonly id: Schema.String;
628
+ readonly key: Schema.String;
629
+ }>;
630
+ }>, Schema.Struct<{
631
+ readonly _tag: Schema.Literal<"ConnectionRemove">;
632
+ readonly cursor: Schema.Number;
633
+ readonly connection: Schema.String;
634
+ readonly edge: Schema.Struct<{
635
+ readonly entity: Schema.String;
636
+ readonly id: Schema.String;
637
+ readonly key: Schema.String;
638
+ }>;
639
+ }>, Schema.Struct<{
640
+ readonly _tag: Schema.Literal<"ConnectionInvalidate">;
641
+ readonly cursor: Schema.Number;
642
+ readonly connection: Schema.String;
643
+ }>]>, Schema.Union<readonly [typeof RemoteLiveError, typeof RemoteLiveRefused, typeof RemoteProtocolError, typeof RemoteUnauthenticated]>>, Schema.Never, never, never> | Rpc.Rpc<"FoldkitRemoteMutate", Schema.Struct<{
644
+ /**
645
+ * This client's id for the request, the same on each retry of it. It is
646
+ * unique within one client's Model only (a counter there), so it names a
647
+ * request to that client; `operation` names it to a server.
648
+ */
649
+ readonly requestId: Schema.String;
650
+ /** The operation's identity across clients: what a server keys a record of the write by. */
651
+ readonly operation: Schema.optional<Schema.String>;
652
+ readonly mutation: Schema.String;
653
+ readonly input: Schema.Unknown;
654
+ /** For a mutation that is a `Write`: the input keys to write, when not all of them. */
655
+ readonly keys: Schema.optional<Schema.$Array<Schema.String>>;
656
+ /**
657
+ * When the reader acted, in milliseconds since the epoch: what the client
658
+ * predicted the write's time as. A server takes it within its `clockSkew`
659
+ * of its own clock. Optional, so a client and a server of either age agree.
660
+ */
661
+ readonly now: Schema.optional<Schema.Int>;
662
+ /**
663
+ * What the client's active reads show of each entity's rows. The server
664
+ * answers, of each row the mutation names, the shown fields its answer
665
+ * left out, read as any read is (`MutationResult.read`).
666
+ */
667
+ readonly shown: Schema.optional<Schema.$Array<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>>;
668
+ }>, Schema.Struct<{
669
+ readonly output: Schema.Unknown;
670
+ readonly entities: Schema.$Array<Schema.Struct<{
671
+ readonly entity: Schema.String;
672
+ readonly id: Schema.String;
673
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
674
+ }>>;
675
+ /** Connection changes the mutation made, applied alongside its entity patches. */
676
+ readonly connections: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
677
+ readonly _tag: Schema.Literal<"Insert">;
678
+ readonly connection: Schema.String;
679
+ readonly position: Schema.Union<readonly [Schema.Literal<"prepend">, Schema.Literal<"append">]>;
680
+ readonly edge: Schema.Struct<{
681
+ readonly entity: Schema.String;
682
+ readonly id: Schema.String;
683
+ readonly key: Schema.String;
684
+ }>;
685
+ }>, Schema.Struct<{
686
+ readonly _tag: Schema.Literal<"Remove">;
687
+ readonly connection: Schema.String;
688
+ readonly edge: Schema.Struct<{
689
+ readonly entity: Schema.String;
690
+ readonly id: Schema.String;
691
+ readonly key: Schema.String;
692
+ }>;
693
+ }>]>>>;
694
+ /** Entities the mutation deleted; the client knows them absent from then on. */
695
+ readonly deleted: Schema.optional<Schema.$Array<Schema.Struct<{
696
+ readonly entity: Schema.String;
697
+ readonly id: Schema.String;
698
+ }>>>;
699
+ /**
700
+ * A fresh read, after the write, of what the request's `shown` asks of the
701
+ * rows the answer names: the requirements read and what came back, written
702
+ * as a read is.
703
+ */
704
+ readonly read: Schema.optional<Schema.Struct<{
705
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
706
+ readonly result: Schema.Struct<{
707
+ readonly entities: Schema.$Array<Schema.Struct<{
708
+ readonly entity: Schema.String;
709
+ readonly id: Schema.String;
710
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
711
+ }>>;
712
+ readonly settled: Schema.$Array<Schema.Struct<{
713
+ readonly entity: Schema.String;
714
+ readonly id: Schema.String;
715
+ readonly fields: Schema.$Array<Schema.String>;
716
+ }>>;
717
+ }>;
718
+ }>>;
719
+ }>, Schema.Union<readonly [typeof RemoteMutationError, typeof RemoteForbidden, typeof RemoteUnauthenticated]>, never, never> | Rpc.Rpc<"FoldkitRemoteQuery", Schema.Struct<{
720
+ readonly query: Schema.String;
721
+ readonly input: Schema.Unknown;
722
+ readonly window: Schema.Struct<{
723
+ readonly first: Schema.optional<Schema.Number>;
724
+ readonly last: Schema.optional<Schema.Number>;
725
+ readonly after: Schema.optional<Schema.String>;
726
+ readonly before: Schema.optional<Schema.String>;
727
+ }>;
728
+ /**
729
+ * What to read of each item, as the relation slice a read asks the server
730
+ * for. Absent for a query run without one: the response carries only edges,
731
+ * and the client's read entry fetches fields in a second round trip.
732
+ */
733
+ readonly select: Schema.optional<Schema.Codec<RelationRequirement, RelationRequirement, never, never>>;
734
+ }>, Schema.Struct<{
735
+ readonly edges: Schema.$Array<Schema.Struct<{
736
+ readonly entity: Schema.String;
737
+ readonly id: Schema.String;
738
+ readonly key: Schema.String;
739
+ }>>;
740
+ readonly start: Schema.Union<readonly [Schema.Struct<{
741
+ readonly _tag: Schema.Literal<"Terminal">;
742
+ }>, Schema.Struct<{
743
+ readonly _tag: Schema.Literal<"Cursor">;
744
+ readonly cursor: Schema.String;
745
+ }>, Schema.Struct<{
746
+ readonly _tag: Schema.Literal<"Unknown">;
747
+ }>]>;
748
+ readonly end: Schema.Union<readonly [Schema.Struct<{
749
+ readonly _tag: Schema.Literal<"Terminal">;
750
+ }>, Schema.Struct<{
751
+ readonly _tag: Schema.Literal<"Cursor">;
752
+ readonly cursor: Schema.String;
753
+ }>, Schema.Struct<{
754
+ readonly _tag: Schema.Literal<"Unknown">;
755
+ }>]>;
756
+ /**
757
+ * The selected fields of the page's items, in the same shape a read batch
758
+ * returns. Absent from a server that predates payload planning: the client
759
+ * reads it as empty and fetches fields as before.
760
+ */
761
+ readonly entities: Schema.optional<Schema.$Array<Schema.Struct<{
762
+ readonly entity: Schema.String;
763
+ readonly id: Schema.String;
764
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
765
+ }>>>;
766
+ readonly settled: Schema.optional<Schema.$Array<Schema.Struct<{
767
+ readonly entity: Schema.String;
768
+ readonly id: Schema.String;
769
+ readonly fields: Schema.$Array<Schema.String>;
770
+ }>>>;
771
+ }>, Schema.Union<readonly [typeof RemoteQueryError, typeof RemoteUnauthenticated]>, never, never> | Rpc.Rpc<"FoldkitRemoteRead", Schema.Struct<{
772
+ readonly version: Schema.Number;
773
+ readonly requests: Schema.$Array<Schema.Codec<Requirement, Requirement, never, never>>;
774
+ }>, Schema.Struct<{
775
+ readonly entities: Schema.$Array<Schema.Struct<{
776
+ readonly entity: Schema.String;
777
+ readonly id: Schema.String;
778
+ readonly values: Schema.$Record<Schema.String, Schema.Unknown>;
779
+ }>>;
780
+ readonly settled: Schema.$Array<Schema.Struct<{
781
+ readonly entity: Schema.String;
782
+ readonly id: Schema.String;
783
+ readonly fields: Schema.$Array<Schema.String>;
784
+ }>>;
785
+ }>, Schema.Union<readonly [typeof RemoteReadError, typeof RemoteProtocolError, typeof RemoteUnauthenticated]>, never, never>>;
786
+ export { RemoteMutationError as A, WireBoundary as B, ReadBatch as C, RemoteForbidden as D, RelationRequest as E, RemoteUnauthenticated as F, RemoteUnreachable as I, SettledFields as L, RemoteQueryError as M, RemoteReadError as N, RemoteLiveError as O, RemoteRpc as P, ShownSlice as R, Read as S, ReadRequest as T, QueryEdge as _, LiveEdge as a, QueryRpc as b, MAX_LIVE_QUERIES as c, Mutate as d, MutationRequest as f, PageSize as g, OperationId as h, LiveChange as i, RemoteProtocolError as j, RemoteLiveRefused as k, MAX_RELATION_DEPTH as l, NormalizedEntity as m, ConnectionChangeSchema as n, LiveRequirement as o, MutationResult as p, Live as r, MAX_FIELDS_PER_REQUEST as s, AnswerRead as t, MAX_SHOWN_ENTITIES as u, QueryRequest as v, ReadBatchResult as w, REMOTE_PROTOCOL_VERSION as x, QueryResult as y, WindowSchema as z };
787
+ //# sourceMappingURL=wire-DthPcTM6.d.ts.map