RocketChat/Rocket.Chat

View on GitHub
packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts

Summary

Maintainability
A
3 hrs
Test Coverage
import Ajv from 'ajv';

import type { PaginatedRequest } from '../../helpers/PaginatedRequest';

const ajv = new Ajv({ coerceTypes: true });

export type ChannelsGetAllUserMentionsByChannelProps = PaginatedRequest<{ roomId: string }>;

const channelsGetAllUserMentionsByChannelPropsSchema = {
    type: 'object',
    properties: {
        roomId: {
            type: 'string',
        },
        offset: {
            type: 'number',
            nullable: true,
        },
        count: {
            type: 'number',
            nullable: true,
        },
        sort: {
            type: 'string',
            nullable: true,
        },
        query: {
            type: 'string',
            nullable: true,
        },
    },
    required: ['roomId'],

    additionalProperties: false,
};

export const isChannelsGetAllUserMentionsByChannelProps = ajv.compile<ChannelsGetAllUserMentionsByChannelProps>(
    channelsGetAllUserMentionsByChannelPropsSchema,
);