-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove query field on groups messages listing
- Loading branch information
1 parent
3759af8
commit c39e1f0
Showing
7 changed files
with
222 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
packages/rest-typings/src/v1/groups/GroupsMessagesProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { IRoom } from '@rocket.chat/core-typings'; | ||
import Ajv from 'ajv'; | ||
|
||
import type { PaginatedRequest } from '../../helpers/PaginatedRequest'; | ||
import { withGroupBaseProperties } from './BaseProps'; | ||
|
||
const ajv = new Ajv({ | ||
coerceTypes: true, | ||
}); | ||
|
||
export type GroupsMessagesProps = PaginatedRequest<{ | ||
roomId: IRoom['_id']; | ||
mentionIds?: string; | ||
starredIds?: string; | ||
pinned?: boolean; | ||
query?: Record<string, any>; | ||
}>; | ||
|
||
const GroupsMessagesPropsSchema = withGroupBaseProperties({ | ||
roomId: { | ||
type: 'string', | ||
}, | ||
mentionIds: { | ||
type: 'string', | ||
}, | ||
starredIds: { | ||
type: 'string', | ||
}, | ||
pinned: { | ||
type: 'string', | ||
}, | ||
count: { | ||
type: 'number', | ||
nullable: true, | ||
}, | ||
offset: { | ||
type: 'number', | ||
nullable: true, | ||
}, | ||
sort: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
query: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
}); | ||
|
||
export const isGroupsMessagesProps = ajv.compile<GroupsMessagesProps>(GroupsMessagesPropsSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters