feat: added botList argument schema

This commit is contained in:
원더 2021-01-09 19:28:18 +09:00
parent 9a5046db0b
commit f12805187a

View File

@ -1,9 +1,16 @@
import * as Yup from 'yup'
import YupKorean from 'yup-locales-ko'
import { ListType } from '../types'
export const botListArgument = Yup.object({
type: Yup.string().oneOf(['VOTE', 'TRUSTED', 'NEW', 'PARTNERED', 'CATEGOORY', 'SEARCH']).required(),
Yup.setLocale(YupKorean)
export const botListArgumentSchema = Yup.object({
type: Yup.string().oneOf(['VOTE', 'TRUSTED', 'NEW', 'PARTNERED', 'CATEGORY', 'SEARCH']).required(),
page: Yup.number().positive().integer().optional().default(1),
query: Yup.string().optional()
})
export interface botListArgument extends Yup.Asserts<typeof botListArgumentSchema> {
type: ListType
}
export default Yup