mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Add findMessagesMeta to rest client, fix params type (#104)
* Add findMessagesMeta to rest client * Fix type of creator in FindMessagesMetaParams
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
type FindNotificationsParams,
|
||||
type Notification,
|
||||
type MessageID,
|
||||
type MessageMeta,
|
||||
type CardID,
|
||||
type Markdown,
|
||||
type SocialID,
|
||||
@@ -35,7 +36,8 @@ import {
|
||||
type MessageType,
|
||||
type MessageExtra,
|
||||
AttachmentData,
|
||||
AttachmentID
|
||||
AttachmentID,
|
||||
FindMessagesMetaParams
|
||||
} from '@hcengineering/communication-types'
|
||||
import { retry } from '@hcengineering/communication-shared'
|
||||
|
||||
@@ -273,4 +275,8 @@ class RestClientImpl implements RestClient {
|
||||
async findNotifications (params: FindNotificationsParams): Promise<Notification[]> {
|
||||
return await this.find<Notification>('findNotifications', params)
|
||||
}
|
||||
|
||||
async findMessagesMeta (params: FindMessagesMetaParams): Promise<MessageMeta[]> {
|
||||
return await this.find<MessageMeta>('findMessagesMeta', params)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,11 @@ import type {
|
||||
import type {
|
||||
FindNotificationsParams,
|
||||
FindNotificationContextParams,
|
||||
FindMessagesMetaParams,
|
||||
NotificationContext,
|
||||
Notification,
|
||||
MessageID,
|
||||
MessageMeta,
|
||||
Markdown,
|
||||
SocialID,
|
||||
MessageType,
|
||||
@@ -38,6 +40,7 @@ import type {
|
||||
} from '@hcengineering/communication-types'
|
||||
|
||||
export interface RestClient {
|
||||
findMessagesMeta: (params: FindMessagesMetaParams) => Promise<MessageMeta[]>
|
||||
findNotificationContexts: (params: FindNotificationContextParams) => Promise<NotificationContext[]>
|
||||
findNotifications: (params: FindNotificationsParams) => Promise<Notification[]>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import { SortingOrder } from '@hcengineering/core'
|
||||
|
||||
import type { MessageID } from './message'
|
||||
import type { ContextID, NotificationID, NotificationType } from './notification'
|
||||
import type { AccountUuid, CardID, CardType, WorkspaceUuid } from './core'
|
||||
import type { AccountUuid, CardID, CardType, SocialID, WorkspaceUuid } from './core'
|
||||
import type { LabelID } from './label'
|
||||
import { PeerKind } from './peer'
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface FindMessagesParams extends FindParams {
|
||||
export interface FindMessagesMetaParams extends FindParams {
|
||||
cardId?: CardID
|
||||
id?: MessageID
|
||||
creator?: SortingOrder
|
||||
creator?: SocialID
|
||||
}
|
||||
|
||||
export interface FindMessagesOptions {
|
||||
|
||||
Reference in New Issue
Block a user