-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: make channels files list stop to use query param (#33564)
- Loading branch information
1 parent
4ae1773
commit d986b57
Showing
6 changed files
with
96 additions
and
13 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
58 changes: 58 additions & 0 deletions
58
packages/rest-typings/src/v1/channels/ChannelsFilesListProps.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,58 @@ | ||
import Ajv from 'ajv'; | ||
|
||
import type { PaginatedRequest } from '../../helpers/PaginatedRequest'; | ||
|
||
const ajv = new Ajv({ | ||
coerceTypes: true, | ||
}); | ||
|
||
export type ChannelsFilesListProps = PaginatedRequest< | ||
({ roomId: string; roomName?: string } | { roomId?: string; roomName: string }) & { | ||
name?: string; | ||
typeGroup?: string; | ||
query?: string; | ||
} | ||
>; | ||
|
||
const channelsFilesListPropsSchema = { | ||
type: 'object', | ||
properties: { | ||
roomId: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
roomName: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
offset: { | ||
type: 'number', | ||
nullable: true, | ||
}, | ||
count: { | ||
type: 'number', | ||
nullable: true, | ||
}, | ||
sort: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
name: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
typeGroup: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
query: { | ||
type: 'string', | ||
nullable: true, | ||
}, | ||
}, | ||
oneOf: [{ required: ['roomId'] }, { required: ['roomName'] }], | ||
required: [], | ||
additionalProperties: false, | ||
}; | ||
|
||
export const isChannelsFilesListProps = ajv.compile<ChannelsFilesListProps>(channelsFilesListPropsSchema); |
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