@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
35 lines (34 loc) • 1.73 kB
TypeScript
/// <reference types="node" />
import { ClientAPI } from 'contentful-management/dist/typings/create-contentful-api';
import { Stream } from 'stream';
import { AssetId, AssetInfo, ContentId, ContentType } from '../../cms';
import { ContentFieldType } from '../../manage-cms/fields';
import { ManageCms } from '../../manage-cms/manage-cms';
import { ManageContext } from '../../manage-cms/manage-context';
import * as nlp from '../../nlp';
import { ContentfulOptions } from '../../plugin';
export declare class ManageContentful implements ManageCms {
readonly options: ContentfulOptions;
readonly manage: ClientAPI;
private environment;
private readonly manageAsset;
private readonly manageEntry;
constructor(options: ContentfulOptions);
private createClient;
private getEnvironment;
deleteContent(context: ManageContext, contentId: ContentId): Promise<void>;
createContent(context: ManageContext, model: ContentType, id: string): Promise<void>;
updateFields(context: ManageContext, contentId: ContentId, fields: {
[contentFieldType: string]: any;
}): Promise<{
[contentFieldType: string]: any;
}>;
copyField(context: ManageContext, contentId: ContentId, fieldType: ContentFieldType, fromLocale: nlp.Locale, onlyIfTargetEmpty: boolean): Promise<void>;
removeAssetFile(context: ManageContext, assetId: AssetId): Promise<void>;
copyAssetFile(context: ManageContext, assetId: AssetId, fromLocale: nlp.Locale): Promise<void>;
createAsset(context: ManageContext, file: string | ArrayBuffer | Stream, info: AssetInfo): Promise<{
id: string;
url?: string;
}>;
removeAsset(context: ManageContext, assetId: AssetId): Promise<void>;
}