Skip to content

Commit e1a814b

Browse files
fix(content): add file and long text input interfaces
1 parent 8c1717e commit e1a814b

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

microservices/content/src/interfaces/component.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,39 @@ interface IRelation {
2626
/**
2727
* Primitive input types: Text, Number, Rich Text, Date, Boolean, Email, Password, JSON, ENUM
2828
*/
29-
interface IDefaultSchema extends IBaseSchema {}
29+
interface IDefaultSchema extends IBaseSchema {
30+
isRequired?: boolean;
31+
}
32+
33+
/**
34+
* Text input type options
35+
*/
36+
interface ILongTextSchema extends IDefaultSchema {
37+
isLong: true;
38+
}
3039

3140
/**
32-
* Relation input types: Relation, Media
41+
* Relation input types: Relation
3342
*/
3443
interface IRelationSchema extends IBaseSchema {
3544
relation: IRelation;
3645
}
3746

47+
/**
48+
* Relation input types: Media
49+
*/
50+
interface IFileSchema extends IRelationSchema {
51+
isFiles: true;
52+
}
53+
3854
/**
3955
* Custom input type: Component
4056
*/
41-
interface IComponentSchema extends IBaseSchema, Pick<IRelation, 'hasMany'> {
57+
interface IComponentSchema extends IBaseSchema {
4258
id: string;
59+
hasMany: boolean;
4360
}
4461

45-
type ISchema = IDefaultSchema | IRelationSchema | IComponentSchema;
62+
type ISchema = IDefaultSchema | IRelationSchema | IComponentSchema | IFileSchema | ILongTextSchema;
4663

47-
export { ISchema, IRelationSchema, IComponentSchema, IDefaultSchema };
64+
export { ISchema, IRelationSchema, IComponentSchema, IDefaultSchema, IFileSchema, ILongTextSchema };

0 commit comments

Comments
 (0)