File tree Expand file tree Collapse file tree 1 file changed +25
-25
lines changed Expand file tree Collapse file tree 1 file changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,31 @@ export class MeiliSearch {
280280 } ) ;
281281 }
282282
283+ ///
284+ /// CHATS
285+ ///
286+
287+ /**
288+ * Get a chat workspace instance
289+ *
290+ * @param workspace - The chat workspace UID
291+ * @returns Instance of ChatWorkspace
292+ */
293+ chat ( workspace : string ) : ChatWorkspace {
294+ return new ChatWorkspace ( this . httpRequest , workspace ) ;
295+ }
296+
297+ /**
298+ * Get all chat workspaces
299+ *
300+ * @returns Promise returning an array of chat workspaces UIDs
301+ */
302+ async getChatWorkspaces ( ) : Promise < ResourceResults < { uid : string } [ ] > > {
303+ return await this . httpRequest . get ( {
304+ path : "chats" ,
305+ } ) ;
306+ }
307+
283308 ///
284309 /// WEBHOOKS
285310 ///
@@ -340,31 +365,6 @@ export class MeiliSearch {
340365 await this . httpRequest . delete ( { path : `webhooks/${ uuid } ` } ) ;
341366 }
342367
343- ///
344- /// CHATS
345- ///
346-
347- /**
348- * Get a chat workspace instance
349- *
350- * @param workspace - The chat workspace UID
351- * @returns Instance of ChatWorkspace
352- */
353- chat ( workspace : string ) : ChatWorkspace {
354- return new ChatWorkspace ( this . httpRequest , workspace ) ;
355- }
356-
357- /**
358- * Get all chat workspaces
359- *
360- * @returns Promise returning an array of chat workspaces UIDs
361- */
362- async getChatWorkspaces ( ) : Promise < ResourceResults < { uid : string } [ ] > > {
363- return await this . httpRequest . get ( {
364- path : "chats" ,
365- } ) ;
366- }
367-
368368 ///
369369 /// Network
370370 ///
You can’t perform that action at this time.
0 commit comments