@gonvex/protocol 0.1.27 → 0.1.29

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 (2) hide show
  1. package/dist/index.d.ts +81 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -40,7 +40,12 @@ export type FunctionDependencies = {
40
40
  table: string;
41
41
  columns?: string[];
42
42
  }>;
43
+ readsEphemeral?: boolean;
44
+ writesEphemeral?: boolean;
43
45
  shareByPermissions?: boolean;
46
+ shareByVisibility?: string;
47
+ shareResultFrom?: string;
48
+ shareResultField?: string;
44
49
  };
45
50
  export type SubscriptionRevision = {
46
51
  epoch: string;
@@ -57,6 +62,8 @@ export type MessageTrace = {
57
62
  serverSubscriptionStartedAtMs?: number;
58
63
  serverSubscriptionSentAtMs?: number;
59
64
  serverDurationMs?: number;
65
+ /** Non-semantic top-level query performance metadata from result.perf. */
66
+ queryPerf?: JsonValue;
60
67
  };
61
68
  export type BrowserTelemetryInfo = {
62
69
  userAgent?: string;
@@ -97,6 +104,8 @@ export type ServerCapabilities = {
97
104
  syncIntegrity?: 1;
98
105
  /** Server accepts `query.subscribeMany` batched subscription frames. */
99
106
  queryBatch?: 1;
107
+ /** Server emits several independent query updates in one WebSocket frame. */
108
+ queryResultBatch?: 1;
100
109
  /** Server accepts `mutation.callMany` batched offline-queue flushes. */
101
110
  mutationBatch?: 1;
102
111
  /** Server emits connection-level sync revision watermarks. */
@@ -137,6 +146,24 @@ export type ClientCapabilities = {
137
146
  syncReadyMany?: 1;
138
147
  /** Client accepts connection-level `sync.watermark` server frames. */
139
148
  syncWatermark?: 1;
149
+ /** Client accepts keyed patches for object results with a `page` row array. */
150
+ queryPagePatch?: 1;
151
+ /** Client atomically applies keyed patches to named arrays in object results. */
152
+ queryObjectPatch?: 1;
153
+ /** Client applies compact front/back order deltas on keyed patches. */
154
+ queryOrderDelta?: 1;
155
+ /** Client accepts one query payload fanned out to multiple subscription IDs. */
156
+ queryFanout?: 1;
157
+ /** Client accepts several independent query updates in one WebSocket frame. */
158
+ queryResultBatch?: 1;
159
+ };
160
+ export type KeyedCollectionPatch = {
161
+ inserted?: JsonValue[];
162
+ updated?: JsonValue[];
163
+ deleted?: string[];
164
+ order?: string[];
165
+ prepend?: string[];
166
+ append?: string[];
140
167
  };
141
168
  export type GonvexManifest = {
142
169
  project: string;
@@ -210,6 +237,30 @@ export type ClientMessage = {
210
237
  device?: BrowserTelemetryInfo;
211
238
  };
212
239
  export type ServerMessage = {
240
+ type: "query.batch";
241
+ messages: ServerMessage[];
242
+ } | {
243
+ type: "query.fanout";
244
+ queryType: "query.result" | "query.progress" | "query.patch" | "query.pagePatch" | "query.objectPatch";
245
+ ids: string[];
246
+ path?: string;
247
+ result?: JsonValue;
248
+ reason?: "initial" | "invalidate" | "recover";
249
+ trace?: MessageTrace;
250
+ cacheScope?: string;
251
+ cacheRevision?: string;
252
+ subscriptionRevision?: SubscriptionRevision;
253
+ baseRevision?: SubscriptionRevision;
254
+ throughRevision?: SubscriptionRevision;
255
+ inserted?: JsonValue[];
256
+ updated?: JsonValue[];
257
+ deleted?: string[];
258
+ order?: string[];
259
+ prepend?: string[];
260
+ append?: string[];
261
+ collections?: Record<string, KeyedCollectionPatch>;
262
+ mutationIds?: string[];
263
+ } | {
213
264
  type: "session.ready";
214
265
  project?: string;
215
266
  tenant?: string;
@@ -254,6 +305,36 @@ export type ServerMessage = {
254
305
  updated?: JsonValue[];
255
306
  deleted?: string[];
256
307
  order?: string[];
308
+ prepend?: string[];
309
+ append?: string[];
310
+ cacheScope?: string;
311
+ cacheRevision?: string;
312
+ trace?: MessageTrace;
313
+ } | {
314
+ type: "query.pagePatch";
315
+ id: string;
316
+ path?: string;
317
+ reason?: "initial" | "invalidate" | "recover";
318
+ baseRevision: SubscriptionRevision;
319
+ subscriptionRevision: SubscriptionRevision;
320
+ result?: JsonValue;
321
+ inserted?: JsonValue[];
322
+ updated?: JsonValue[];
323
+ deleted?: string[];
324
+ order?: string[];
325
+ prepend?: string[];
326
+ append?: string[];
327
+ cacheScope?: string;
328
+ cacheRevision?: string;
329
+ trace?: MessageTrace;
330
+ } | {
331
+ type: "query.objectPatch";
332
+ id: string;
333
+ path?: string;
334
+ reason?: "initial" | "invalidate" | "recover";
335
+ baseRevision: SubscriptionRevision;
336
+ subscriptionRevision: SubscriptionRevision;
337
+ collections: Record<string, KeyedCollectionPatch>;
257
338
  cacheScope?: string;
258
339
  cacheRevision?: string;
259
340
  trace?: MessageTrace;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonvex/protocol",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"