Skip to content

Commit 384945a

Browse files
committed
Move chat before webhooks
1 parent 8b7d2b7 commit 384945a

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/meilisearch.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff 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
///

0 commit comments

Comments
 (0)