@hydranium/protocol 1.0.0-next.284 → 1.0.0-next.287

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.
@@ -62,6 +62,12 @@ export interface TransferDocumentUpdatedEvent<
62
62
  */
63
63
  sourceClientId: string;
64
64
  reason: TransferDocumentUpdateReason;
65
+ /**
66
+ * The position of this event among the update and deletion events the
67
+ * server sent on this connection, which a watch's answer carries as of
68
+ * the moment it was taken: a greater one was sent later.
69
+ */
70
+ sequence: number;
65
71
  }
66
72
 
67
73
  /** Callback shape for `DataClientProtocol.onDocumentUpdated`. */
@@ -158,9 +164,16 @@ export interface TransferDocumentDeletedEvent {
158
164
  /**
159
165
  * The session whose `deleteModelDocument` removed the file, so it can tell
160
166
  * its own deletion from another's; the unknown-client id for a file
161
- * removed outside any session, as a file watcher reports one.
167
+ * removed outside any session, as a file watcher reports one, and for one
168
+ * a `DataConnection` found gone after a reconnect, which no event named.
162
169
  */
163
170
  readonly sourceClientId: string;
171
+ /**
172
+ * The position of this event among the update and deletion events the
173
+ * server sent on this connection, as on an update; absent on a deletion a
174
+ * `DataConnection` found after a reconnect, which the server never sent.
175
+ */
176
+ readonly sequence?: number;
164
177
  }
165
178
 
166
179
  /** Callback shape for `DataClientProtocol.onDocumentDeleted`. */
@@ -98,6 +98,16 @@ export type TransferSavedDocument<TTransfer extends TransferElement, TDiagnostic
98
98
  persisted: { version: TextVersion };
99
99
  };
100
100
 
101
+ /** What a watch answers, once it is in place. */
102
+ export interface TransferWatchedDocument {
103
+ /** The key the watch's events name the document by, which a symlinked URI does not spell. */
104
+ readonly uri: string;
105
+ /** Whether a document exists there; one the server fails to load counts, only a missing one does not. */
106
+ readonly exists: boolean;
107
+ /** The position of the last update or deletion event sent before `exists` was taken; an event past it was sent after. */
108
+ readonly sequence: number;
109
+ }
110
+
101
111
  export namespace TransferDocument {
102
112
  /**
103
113
  * Whether the server had this document. Branch on it where absence is an