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)

16 lines (15 loc) 1.38 kB
import { Entry } from "contentful"; import { ArrayRelationType, BaseComponentConfig, ComponentDataConfig, RelationType, SingleRelationType } from "@becklyn/ui-types"; import { ContentfulNormalizerService } from "./service"; export declare const getDataFieldNames: (data: Entry<any>, dataConfig: ComponentDataConfig) => string[]; export declare const getDataConfigForContentType: (contentType: string, service: ContentfulNormalizerService) => ComponentDataConfig | null; export declare const getIdFromData: (data: Entry<any>) => string | null; export declare const getComponentKeyFromData: (data: Entry<any>, service: ContentfulNormalizerService) => string | null; export declare const getContentTypeFromData: (data: Entry<any>) => string | null; export declare const getContentTypeFromComponentKey: (componentKey: any, service: ContentfulNormalizerService) => string | null; export declare const isArray: (dataType: any) => dataType is []; export declare const isBaseComponentConfig: (dataType: any) => dataType is BaseComponentConfig; export declare const isRelationType: (dataType: any) => dataType is RelationType; export declare const isArrayRelationType: (dataType: any) => dataType is ArrayRelationType; export declare const isSingleRelationType: (dataType: any) => dataType is SingleRelationType; export declare const getValueOfField: (data: any, locale: string) => any;