@@ -109,6 +109,29 @@ export abstract class WidgetDriver {
109109 return Promise . reject ( new Error ( "Failed to override function" ) ) ;
110110 }
111111
112+ /**
113+ * @experimental Part of MSC4354
114+ * Sends a sticky event into a room. If `roomId` is falsy, the client should send the event
115+ * into the room the user is currently looking at. The widget API will have already
116+ * verified that the widget is capable of sending the event to that room.
117+ * @param {number } stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
118+ * @param {string } eventType The event type to be sent.
119+ * @param {* } content The content for the event.
120+ * @param {string|null } roomId The room ID to send the event to. If falsy, the room the
121+ * user is currently looking at.
122+ * @returns {Promise<ISendEventDetails> } Resolves when the event has been sent with
123+ * details of that event.
124+ * @throws Rejected when the event could not be sent.
125+ */
126+ public sendStickyEvent (
127+ stickyDurationMs : number ,
128+ eventType : string ,
129+ content : unknown ,
130+ roomId : string | null = null ,
131+ ) : Promise < ISendEventDetails > {
132+ throw new Error ( "Method not implemented." ) ;
133+ }
134+
112135 /**
113136 * @experimental Part of MSC4140 & MSC4157
114137 * Sends a delayed event into a room. If `roomId` is falsy, the client should send it
@@ -139,6 +162,35 @@ export abstract class WidgetDriver {
139162 return Promise . reject ( new Error ( "Failed to override function" ) ) ;
140163 }
141164
165+ /**
166+ * @experimental Part of MSC4140, MSC4157 and MSC4354
167+ * Sends a delayed sticky event into a room. If `roomId` is falsy, the client should send the event
168+ * into the room the user is currently looking at. The widget API will have already
169+ * verified that the widget is capable of sending the event to that room.
170+ * @param {number } stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
171+ * @param {number|null } delay How much later to send the event, or null to not send the
172+ * event automatically. May not be null if {@link parentDelayId} is null.
173+ * @param {string|null } parentDelayId The ID of the delayed event this one is grouped with,
174+ * or null if it will be put in a new group. May not be null if {@link delay} is null.
175+ * @param {string } eventType The event type to be sent.
176+ * @param {* } content The content for the event.
177+ * @param {string|null } roomId The room ID to send the event to. If falsy, the room the
178+ * user is currently looking at.
179+ * @returns {Promise<ISendDelayedEventDetails> } Resolves when the event has been sent with
180+ * details of that event.
181+ * @throws Rejected when the event could not be sent.
182+ */
183+ public sendDelayedStickyEvent (
184+ delay : number | null ,
185+ parentDelayId : string | null ,
186+ stickyDurationMs : number ,
187+ eventType : string ,
188+ content : unknown ,
189+ roomId : string | null = null ,
190+ ) : Promise < ISendDelayedEventDetails > {
191+ throw new Error ( "Method not implemented." ) ;
192+ }
193+
142194 /**
143195 * @experimental Part of MSC4140 & MSC4157
144196 * Cancel the scheduled delivery of the delayed event matching the provided {@link delayId}.
0 commit comments