class FrontpageConfigSourceSchema(Schema): docChain = fields.Nested(FrontpageConfigDocChainSchema, many=True, required=True) contentType = fields.String( enum=settings.TRIDENTSTREAM_CONTENT_TYPES, enum_names=settings.TRIDENTSTREAM_CONTENT_TYPES_NAMES, default="", ) template = fields.String( enum=settings.TRIDENTSTREAM_TEMPLATES, enum_names=settings.TRIDENTSTREAM_TEMPLATES_NAMES, default="cover", required=True, ) query = fields.Nested(FrontpageConfigSourceQuerySchema, many=True) enabled = fields.Boolean()
class ListingSchema(Schema): name = fields.String(required=True) display_name = fields.String(default="", ui_schema={"ui:title": "Name"}) levels = fields.Nested(ListingLevelSchema, many=True, default=list) histories = fields.List( RelatedPluginField(plugin_type=HistoryPlugin), many=True, default=list ) rebuild_automatically = fields.Boolean(default=True)
class FilesystemInputSchema(Schema): priority = fields.Integer(default=10) db = RelatedPluginField(plugin_type=DatabasePlugin, required=True) metadata_parsers = fields.List( RelatedPluginField(plugin_type=MetadataParserPlugin), many=True, default=list) paths = fields.Nested(PathSchema, many=True, default=list) notifier = RelatedPluginField(plugin_type=NotifierPlugin)
class ItemInfoSchema(Schema): item_infos = fields.Nested(ItemInfoTypeSchema, many=True)
class FrontpageConfigRootSchema(Schema): sections = fields.Nested(FrontpageConfigSchema, many=True)
class FrontpageConfigSchema(Schema): title = fields.String(required=True) sources = fields.Nested(FrontpageConfigSourceSchema, many=True, required=True) enabled = fields.Boolean()
class SectionServiceSchema(BaseSchema): sections = fields.Nested(SectionSchema, many=True, default=list)
class SectionSchema(ListingSchema): inputs = fields.Nested(SectionInputSchema, many=True, default=list)
class StoreSchema(ListingSchema): searchers = fields.Nested(StoreSearcherSchema, many=True, default=list) rebuild_automatically = fields.Boolean(default=False)
class RemoteFilesystemServiceSchema(Schema): inputs = fields.Nested(RemoteFilesystemInputSchema, many=True)
class RemoteSearcherServiceSchema(Schema): searchers = fields.Nested(RemoteSearcherSchema, many=True) availability = RelatedPluginField(plugin_type=MetadataHandlerPlugin, traits=["availability"])