draaft
Version:
A CLI to pull content from https://pilot.pm content collaboration platform and feed your static site generator with markdown files
63 lines (62 loc) • 1.73 kB
TypeScript
export declare enum FrontmatterFormat {
yaml = "yaml",
toml = "toml"
}
export declare enum I18nMode {
none = "none",
directory = "directory",
filename = "filename"
}
export declare enum SSGType {
hugo = "hugo",
gatsby = "gatsby"
}
export declare type DraaftConfiguration = {
apiBaseUrl: string;
apiToken: string;
bundlePages: boolean;
contentFieldName: string;
frontmatterFormat: FrontmatterFormat;
i18nMode: I18nMode;
i18nDefaultLanguage: string;
ssg: SSGType;
useChannelName: boolean;
};
export declare type ContentSource = {
channelIds: number[];
publicationStateIds: number[];
};
export declare type ChannelHierarchyNode = any;
export declare type ChannelHierarchy = Array<ChannelHierarchyNode>;
export declare type Channel = {
created_at: string;
created_by: number;
description: string;
hierarchy: ChannelHierarchy;
id: number;
name: string;
owners: Array<number>;
state: "active" | "closed";
type: number;
updated_at: string;
updated_by: number;
};
export declare type Item = any;
export declare type ItemType = any;
export declare type WorkflowState = {
color: string;
id: number;
label: string;
order: number;
};
export declare type PaginatedApiResponse<Type> = {
num_pages: number;
count: number;
next: number | null;
previous: number | null;
objects: Array<Type>;
};
export declare type ChannelsApiResponse = PaginatedApiResponse<Channel>;
export declare type ItemsApiResponse = PaginatedApiResponse<Item>;
export declare type ItemTypesApiResponse = PaginatedApiResponse<ItemType>;
export declare type WorkflowStateApiResponse = PaginatedApiResponse<WorkflowState>;