contentful-management
Version:
Client for Contentful's Content Management API
26 lines (25 loc) • 831 B
TypeScript
import type { CreateHttpClientParams } from 'contentful-sdk-core';
import type { Adapter, MakeRequestOptions } from '../../common-types';
export type RestAdapterParams = CreateHttpClientParams & {
/**
* Contentful CMA Access Token
*/
accessToken: CreateHttpClientParams['accessToken'];
/**
* API host
* @default api.contentful.com
*/
host?: string;
/**
* direct file upload host
* @default upload.contentful.com
*/
hostUpload?: string;
userAgent?: string | undefined;
};
export declare class RestAdapter implements Adapter {
private readonly params;
private readonly axiosInstance;
constructor(params: RestAdapterParams);
makeRequest<R>({ entityType, action: actionInput, params, payload, headers, userAgent, }: MakeRequestOptions): Promise<R>;
}