UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

46 lines (45 loc) 2.66 kB
import { SearchCandidate } from '../search/search-result'; import { Callback, ContentCallback } from './callback'; import { CMS, ContentType, PagingOptions, TopContentType } from './cms'; import { Asset, Button, Carousel, Chitchat, CommonFields, Content, Custom, DateRangeContent, Document, Element, Handoff, Image, Input, Payload, Queue, ScheduleContent, StartUp, Text, TopContent, Url, Video } from './contents'; import { Context } from './context'; /** * Useful for mocking CMS, as ts-mockito does not allow mocking interfaces */ export declare class DummyCMS implements CMS { readonly buttonCallbacks: ContentCallback[]; static readonly IMG = "this_image_does_not_exist.png"; static readonly VIDEO = "this_video_does_not_exist.mp4"; static PDF: string; /** * * @param buttonCallbacks models which contain buttons will return one per each specified callback */ constructor(buttonCallbacks: ContentCallback[]); button(_id: string, _context?: Context | undefined): Promise<Button>; element(_id: string, _context?: Context | undefined): Promise<Element>; carousel(id: string, {}?: Context): Promise<Carousel>; document(id: string, {}?: Context): Promise<Document>; text(id: string, {}?: Context): Promise<Text>; handoff(id: string, {}?: Context): Promise<Handoff>; input(id: string, {}?: Context): Promise<Input>; custom(id: string, {}?: Context): Promise<Custom>; chitchat(id: string, context?: Context): Promise<Chitchat>; startUp(id: string, {}?: Context): Promise<StartUp>; static buttonFromCallback(callback: Callback): Button; private createElement; url(id: string, {}?: Context): Promise<Url>; payload(id: string, {}?: Context): Promise<Payload>; image(id: string, {}?: Context): Promise<Image>; video(id: string, {}?: Context): Promise<Video>; queue(id: string, {}?: Context): Promise<Queue>; topContents<T extends TopContent>(_model: TopContentType, _context?: Context, _filter?: (cf: CommonFields) => boolean, _paging?: PagingOptions): Promise<T[]>; contentsWithKeywords({}?: Context, _paging?: PagingOptions): Promise<SearchCandidate[]>; schedule(id: string, _context?: Context): Promise<ScheduleContent>; asset(id: string, _context?: Context): Promise<Asset>; dateRange(id: string, _context?: Context): Promise<DateRangeContent>; private buttons; content(id: string, context?: Context, _referencesToInclude?: number): Promise<Content>; contents<T extends Content>(_contentType: ContentType, _context?: Context, _paging?: PagingOptions): Promise<T[]>; assets(_context?: Context): Promise<Asset[]>; }