UNPKG

draaft

Version:

A CLI to pull content from https://pilot.pm content collaboration platform and feed your static site generator with markdown files

42 lines (41 loc) 1.54 kB
import { Channel, ChannelsApiResponse, DraaftConfiguration, ItemsApiResponse, ItemType, ItemTypesApiResponse, WorkflowStateApiResponse } from "./types"; export default class DraaftAPI { httpclient: any; config: DraaftConfiguration; /** * Draaft API Wrapper * @param config - Draaft configuration */ constructor(config: DraaftConfiguration); get(endpoint: string, query?: any): Promise<any>; /** * Get all channels * Info {@link https://www.draaft.io/documentation/api/beta/#channels channels} */ channelsGetAll(query: any): Promise<ChannelsApiResponse>; /** * Get one channel by id * Info {@link https://www.draaft.io/documentation/api/beta/#channels channels} */ channelsGetOne(id: number, query: any): Promise<Channel>; /** * Get items list * Info {@link https://www.draaft.io/documentation/api/beta/#items items} */ itemsGetAll(query: any): Promise<ItemsApiResponse>; /** * Get wokflow states list * Info {@link https://www.draaft.io/documentation/api/beta/#workflow workflow} */ workflowGetAll(query: any): Promise<WorkflowStateApiResponse>; /** * Get item types list * Info {@link https://www.draaft.io/documentation/api/beta/#types types} */ typesGetAll(query: any): Promise<ItemTypesApiResponse>; /** * Get one item type by id * Info {@link https://www.draaft.io/documentation/api/beta/#types types} */ typesGetOne(id: number, query: any): Promise<ItemType>; }