@@ -35,8 +35,17 @@ export class AttachmentQueue {
3535 /** Adapter for remote file storage operations */
3636 remoteStorage : RemoteStorageAdapter ;
3737
38- /** @deprecated Directory path for storing attachments */
39- attachmentsDirectory ?: string ;
38+ /**
39+ * Callback function to watch for changes in attachment references in your data model.
40+ *
41+ * This should be implemented by the user of AttachmentQueue to monitor changes in your application's
42+ * data that reference attachments. When attachments are added, removed, or modified,
43+ * this callback should trigger the onUpdate function with the current set of attachments.
44+ */
45+ watchAttachments : (
46+ onUpdate : ( attachment : WatchedAttachmentItem [ ] ) => Promise < void > ,
47+ signal : AbortSignal
48+ ) => void ;
4049
4150 /** Name of the database table storing attachment records */
4251 tableName ?: string ;
@@ -123,20 +132,6 @@ export class AttachmentQueue {
123132 this . logger = logger ?? db . logger ;
124133 }
125134
126- /**
127- * Callback function to watch for changes in attachment references in your data model.
128- *
129- * This method should be implemented to monitor changes in your application's
130- * data that reference attachments. When attachments are added, removed, or modified,
131- * this callback should trigger the onUpdate function with the current set of attachments.
132- *
133- * @param onUpdate - Callback to invoke when attachment references change
134- * @throws Error indicating this method must be implemented by the user
135- */
136- watchAttachments ( onUpdate : ( attachment : WatchedAttachmentItem [ ] ) => Promise < void > , signal : AbortSignal ) : void {
137- throw new Error ( 'watchAttachments should be implemented by the user of AttachmentQueue' ) ;
138- }
139-
140135 /**
141136 * Generates a new attachment ID using a SQLite UUID function.
142137 *
0 commit comments