123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /** This file is generated based on JSON schema. Do not modify. */
- import * as Yup from 'yup';
- import { EntityCodec } from '@joystream/types/versioned-store/EntityCodec';
- export const MediaObjectValidationSchema = Yup.object().shape({
- value: Yup.string()
- .required('This field is required')
- .max(66, 'Text is too long. Maximum length is 66 chars.')
- });
- export type MediaObjectFormValues = {
- value: string;
- };
- export type MediaObjectType = {
- classId: number;
- inClassSchemaIndexes: number[];
- id: number;
- value: string;
- };
- export class MediaObjectCodec extends EntityCodec<MediaObjectType> { }
- export function MediaObjectToFormValues (entity?: MediaObjectType): MediaObjectFormValues {
- return {
- value: (entity && entity.value) || ''
- };
- }
- export type MediaObjectPropId =
- 'value'
- ;
- export type MediaObjectGenericProp = {
- id: MediaObjectPropId;
- type: string;
- name: string;
- description?: string;
- required?: boolean;
- maxItems?: number;
- maxTextLength?: number;
- classId?: any;
- };
- type MediaObjectClassType = {
- [id in MediaObjectPropId]: MediaObjectGenericProp
- };
- export const MediaObjectClass: MediaObjectClassType = {
- value: {
- id: 'value',
- name: 'Value',
- description: 'Content id of object in the data directory.',
- type: 'Text',
- required: true,
- maxTextLength: 48
- }
- };
|