open-index/open-npm huggingface dataset:
npm package: @haven/contentful
Description: haven contentful client wrapper
Author: Haven Agency
Latest version: 2.3.3

# Haven Contentful Custom Client

Automatically flattens the contentful response to consolidate fields and sys recursively.

### Usage

Usage is the same as `contentful`. The difference is the response you get back from `getEntries` and `getEntry`.

```
{
    sys: {
        id: '...',
        contentType: {
            sys: {
                id: '...'
            }
        }
    },
    fields: {
        title: '...'
    },
    metadata: {
        ...
    }
}
```

```
{
    id: '...'
    contentType: '...',
    title: '...',
    metadata: {
        ...
    }
}
```


Assets get flattened to a single object:

```
{
    id: "...",
    contentType: "image/png",
    description: "",
    fileName: "...",
    height: 585,
    size: 725715,
    title: "...",
    url: "...",
    width: 920
}
```