RocketChat/Rocket.Chat

View on GitHub
packages/rest-typings/src/v1/groups/GroupsAddAllProps.ts

Summary

Maintainability
A
0 mins
Test Coverage
import Ajv from 'ajv';

import type { GroupsBaseProps } from './BaseProps';
import { withGroupBaseProperties } from './BaseProps';

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

export type GroupsAddAllProps = GroupsBaseProps & {
    activeUsersOnly?: 'true' | 'false' | 1 | 0;
};
const groupsAddAllPropsSchema = withGroupBaseProperties({
    activeUsersOnly: {
        type: 'boolean',
        nullable: true,
    },
});
export const isGroupsAddAllProps = ajv.compile<GroupsAddAllProps>(groupsAddAllPropsSchema);