@@ -288,6 +288,104 @@ declare namespace Smooch {
288288 */
289289 function on ( event : "typing:stop" , callback : ( data : ConversationData ) => void ) : void ;
290290 // tslint:enable:unified-signatures
291+
292+ // tslint:disable:unified-signatures
293+ /**
294+ * Removes a specific handler for the "ready" event, or all handlers if no callback is provided.
295+ */
296+ function off ( event : "ready" , callback ?: ( ) => void ) : void ;
297+ /**
298+ * Removes a specific handler for the "destroy" event, or all handlers if no callback is provided.
299+ */
300+ function off ( event : "destroy" , callback ?: ( ) => void ) : void ;
301+ /**
302+ * Removes a specific handler for the "participant:added" event, or all handlers if no callback is provided.
303+ */
304+ function off (
305+ event : "participant:added" ,
306+ callback ?: ( participant : ConversationParticipant , data : ConversationData ) => void ,
307+ ) : void ;
308+ /**
309+ * Removes a specific handler for the "participant:removed" event, or all handlers if no callback is provided.
310+ */
311+ function off (
312+ event : "participant:removed" ,
313+ callback ?: ( participant : ConversationParticipant , data : ConversationData ) => void ,
314+ ) : void ;
315+ /**
316+ * Removes a specific handler for the "conversation:added" event, or all handlers if no callback is provided.
317+ */
318+ function off (
319+ event : "conversation:added" ,
320+ callback ?: ( participants : ConversationParticipant [ ] , data : ConversationData ) => void ,
321+ ) : void ;
322+ /**
323+ * Removes a specific handler for the "conversation:read" event, or all handlers if no callback is provided.
324+ */
325+ function off (
326+ event : "conversation:read" ,
327+ callback ?: ( payload : ConversationReadEventPayload , data : ConversationData ) => void ,
328+ ) : void ;
329+ /**
330+ * Removes a specific handler for the "conversation:removed" event, or all handlers if no callback is provided.
331+ */
332+ function off ( event : "conversation:removed" , callback ?: ( data : ConversationData ) => void ) : void ;
333+ /**
334+ * Removes a specific handler for the "message:received" event, or all handlers if no callback is provided.
335+ */
336+ function off ( event : "message:received" , callback ?: ( message : Message , data : ConversationData ) => void ) : void ;
337+ /**
338+ * Removes a specific handler for the "message:sent" event, or all handlers if no callback is provided.
339+ */
340+ function off ( event : "message:sent" , callback ?: ( message : Message , data : ConversationData ) => void ) : void ;
341+ /**
342+ * Removes a specific handler for the "message" event, or all handlers if no callback is provided.
343+ */
344+ function off ( event : "message" , callback ?: ( message : Message , data : ConversationData ) => void ) : void ;
345+ /**
346+ * Removes a specific handler for the "unreadCount" event, or all handlers if no callback is provided.
347+ */
348+ function off ( event : "unreadCount" , callback ?: ( unreadCount : number , data : ConversationData ) => void ) : void ;
349+ /**
350+ * Removes a specific handler for the "widget:opened" event, or all handlers if no callback is provided.
351+ */
352+ function off ( event : "widget:opened" , callback ?: ( ) => void ) : void ;
353+ /**
354+ * Removes a specific handler for the "widget:closed" event, or all handlers if no callback is provided.
355+ */
356+ function off ( event : "widget:closed" , callback ?: ( ) => void ) : void ;
357+ /**
358+ * Removes a specific handler for the "log:debug" event, or all handlers if no callback is provided.
359+ */
360+ function off ( event : "log:debug" , callback ?: ( e : DebugLog ) => void ) : void ;
361+ /**
362+ * Removes a specific handler for the "connected" event, or all handlers if no callback is provided.
363+ */
364+ function off ( event : "connected" , callback ?: ( data : ConversationData ) => void ) : void ;
365+ /**
366+ * Removes a specific handler for the "disconnected" event, or all handlers if no callback is provided.
367+ */
368+ function off ( event : "disconnected" , callback ?: ( data : ConversationData ) => void ) : void ;
369+ /**
370+ * Removes a specific handler for the "reconnecting" event, or all handlers if no callback is provided.
371+ */
372+ function off ( event : "reconnecting" , callback ?: ( data : ConversationData ) => void ) : void ;
373+ /**
374+ * Removes a specific handler for the "typing:start" event, or all handlers if no callback is provided.
375+ */
376+ function off (
377+ event : "typing:start" ,
378+ callback ?: ( data : ConversationData & { avatarUrl : string ; name : string } ) => void ,
379+ ) : void ;
380+ /**
381+ * Removes a specific handler for the "typing:stop" event, or all handlers if no callback is provided.
382+ */
383+ function off ( event : "typing:stop" , callback ?: ( data : ConversationData ) => void ) : void ;
384+ /**
385+ * Removes all handlers for all events.
386+ */
387+ function off ( ) : void ;
388+ // tslint:enable:unified-signatures
291389}
292390
293391type Nullable < T > = { [ P in keyof T ] : T [ P ] | null } ;
0 commit comments