UNPKG

@becklyn/contentful-adapter

Version:

[![CI](https://github.com/Becklyn-Studios/contentful-adapter/actions/workflows/ci.yml/badge.svg)](https://github.com/Becklyn-Studios/contentful-adapter/actions/workflows/ci.yml)

33 lines (32 loc) 1.13 kB
import { BaseComponentConfig } from "@becklyn/ui-types"; import { ContentfulComponentMigration, ContentfulMigrationGenerator } from "../migrations/types"; export type BackendLanguage = "de" | "en"; export interface ContentfulClientConfig { spaceId: string; management: { accessToken: string; }; delivery: { accessToken: string; previewAccessToken: string; }; environmentId: "master" | "staging" | "integration" | string; } export interface ContentfulAdapterConfig { clientConfig: ContentfulClientConfig; backendLanguage: BackendLanguage; components: ContentfulComponentConfig[]; migrations: ContentfulComponentMigration[]; } export interface ContentfulComponentConfig extends BaseComponentConfig { contentType: string; } export interface UiComponentDataConfig { component: BaseComponentConfig; contentType: string; } export interface ContentfulAdapterConfigFile extends ContentfulClientConfig { backendLanguage?: BackendLanguage; components?: (UiComponentDataConfig | BaseComponentConfig)[]; migrations?: ContentfulMigrationGenerator[]; }