Skip to content

Commit fbb6d69

Browse files
committed
1 parent dbe0603 commit fbb6d69

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/types/Notification.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { JSONObject } from "./JSONObject";
2-
import { KDocument, KDocumentContentGeneric } from ".";
2+
import { KDocumentContentGeneric } from ".";
33

44
/**
55
* Enum for notification types
@@ -62,7 +62,21 @@ export interface DocumentNotification<
6262
/**
6363
* Updated document that triggered the notification
6464
*/
65-
result: KDocument<TDocContent>;
65+
result: {
66+
/**
67+
* The message or full document content.
68+
*/
69+
_source: TDocContent;
70+
/**
71+
* Document unique ID.
72+
* `null` if the notification is from a real-time message.
73+
*/
74+
_id: string | null;
75+
/**
76+
* List of fields that have been updated (only available on document partial updates).
77+
*/
78+
_updatedFields?: string[];
79+
};
6680
/**
6781
* State of the document regarding the scope (`in` or `out`)
6882
*/
@@ -95,7 +109,7 @@ export interface UserNotification extends BaseNotification {
95109

96110
export interface ServerNotification extends BaseNotification {
97111
/**
98-
* Server message explaining why this notifications has been triggered
112+
* Server message explaining why this notifications has been triggered.
99113
*/
100114
message: string;
101115

0 commit comments

Comments
 (0)