diff --git a/types/index.d.ts b/types/index.d.ts index 87b6be4..2934b44 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,10 +2,17 @@ import { Component, Context } from 'react'; import { + Asset, + AssetCollection, + ContentType, + ContentTypeCollection, CreateClientParams, ContentfulClientApi, Entry, EntryCollection, + LocaleCollection, + Space, + SyncCollection, } from 'contentful'; /** @@ -36,14 +43,21 @@ export interface ContentfulClientParams extends CreateClientParams { ssrMode?: boolean; } -export interface ContentfulClientInterface extends ContentfulClientApi { +export class ContentfulClient implements ContentfulClientApi { cache: ContentfulCache; ssrMode: boolean; checkCache(requestKey: string): any; + getAsset(id: string, query?: any): Promise; + getAssets(query?: any): Promise; + getContentType(id: string): Promise; + getContentTypes(query?: any): Promise; + getEntry(id: string, query?: any): Promise>; + getEntries(query?: any): Promise>; + getLocales(): Promise; + getSpace(): Promise; + sync(query: any): Promise; } -export function ContentfulClient(options: CreateClientParams): ContentfulClientInterface; - /** * ContentfulContext */