@gonvex/protocol 0.1.15 → 0.1.16

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 +25 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -80,6 +80,22 @@ export type QueryCacheDirective = {
80
80
  epoch: string;
81
81
  maxAgeMs: number;
82
82
  };
83
+ export type ServerCapabilities = {
84
+ syncBatch?: 1;
85
+ };
86
+ export type SyncOpenRequest = {
87
+ id: string;
88
+ path: string;
89
+ args: JsonValue;
90
+ cursor?: SyncCursor;
91
+ keys?: string[];
92
+ };
93
+ export type SyncReady = {
94
+ id: string;
95
+ path?: string;
96
+ cursor: SyncCursor;
97
+ mode?: "eager" | "progressive";
98
+ };
83
99
  export type GonvexManifest = {
84
100
  project: string;
85
101
  generatedAt: string;
@@ -97,6 +113,7 @@ export type ClientMessage = {
97
113
  id: string;
98
114
  path: string;
99
115
  args: JsonValue;
116
+ cacheRevision?: string;
100
117
  } | {
101
118
  type: "query.unsubscribe";
102
119
  id: string;
@@ -107,6 +124,9 @@ export type ClientMessage = {
107
124
  args: JsonValue;
108
125
  cursor?: SyncCursor;
109
126
  keys?: string[];
127
+ } | {
128
+ type: "sync.openMany";
129
+ opens: SyncOpenRequest[];
110
130
  } | {
111
131
  type: "sync.close";
112
132
  id: string;
@@ -141,6 +161,7 @@ export type ServerMessage = {
141
161
  project?: string;
142
162
  tenant?: string;
143
163
  queryCache?: QueryCacheDirective;
164
+ capabilities?: ServerCapabilities;
144
165
  } | {
145
166
  type: "session.scope";
146
167
  queryCache?: QueryCacheDirective;
@@ -203,11 +224,11 @@ export type ServerMessage = {
203
224
  upserts?: JsonValue[];
204
225
  deleted?: string[];
205
226
  mutationIds?: string[];
206
- } | {
227
+ } | ({
207
228
  type: "sync.ready";
208
- id: string;
209
- path?: string;
210
- cursor: SyncCursor;
229
+ } & SyncReady) | {
230
+ type: "sync.readyMany";
231
+ ready: SyncReady[];
211
232
  } | {
212
233
  type: "sync.reset";
213
234
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonvex/protocol",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"