@lableb/javascript-sdk
Version:
Lableb cloud search client for javascript
21 lines (15 loc) • 606 B
text/typescript
import * as yup from 'yup';
import { MESSAGES } from '../../config/messages';
import { baseRequestSchema } from '../main/main.request.schema';
import { SearchByIdRequestParams } from './search-by-id.request.type';
// @ts-ignore
export const buildSearchByIdRequestSchema: yup.SchemaOf<SearchByIdRequestParams> =
baseRequestSchema.concat(
yup.object()
.shape({
APIKey: yup
.string()
.required(MESSAGES.API_KEY_IS_REQUIRED),
id: yup.string().required(MESSAGES.DOCUMENT_ID_IS_REQUIRED),
})
);