UNPKG

@itxch/contentful-import

Version:

This tool allows you to import JSON dump exported by contentful-export

48 lines (47 loc) 1.99 kB
import { DestinationData, TransformedSourceData } from '../../types'; type PushToSpaceParams = { destinationData: DestinationData; sourceData: TransformedSourceData; client: any; spaceId: string; environmentId: string; contentModelOnly?: boolean; skipContentModel?: boolean; skipContentUpdates?: boolean; skipLocales?: boolean; skipContentPublishing?: boolean; timeout?: number; retryLimit?: number; listrOptions?: any; uploadAssets?: boolean; skipAssetUpdates?: boolean; assetsDirectory?: string; requestQueue?: any; }; /** * Pushes all changes to a given space. Handles (un)publishing * as well as delays after creation and before publishing. * * Creates everything in the right order so that a content type for a given entry * is there when entry creation for that content type is attempted. * * Allows only content model or only content pushing. * * Options: * - sourceData: see DEFAULT_CONTENT_STRUCTURE * - destinationData: see DEFAULT_CONTENT_STRUCTURE * - client: preconfigured management API client * - spaceId: ID of space content is being copied to * - contentModelOnly: synchronizes only content types and locales * - skipLocales: skips locales when synchronizing the content model * - skipContentModel: synchronizes only entries and assets * - skipContentPublishing: create content but don't publish it * - uploadAssets: upload exported files instead of pointing to an existing URL * - assetsDirectory: path to exported asset files to be uploaded instead of pointing to an existing URL */ export type PushToSpaceContext = { type: string; target: any; }; export default function pushToSpace({ sourceData, destinationData, client, spaceId, environmentId, contentModelOnly, skipContentModel, skipContentUpdates, skipLocales, skipContentPublishing, timeout, retryLimit, listrOptions, uploadAssets, skipAssetUpdates, assetsDirectory, requestQueue }: PushToSpaceParams): any; export {};