UNPKG

757 BTypeScriptView Raw
1import { CreateHttpClientParams } from 'contentful-sdk-core';
2import { Adapter, MakeRequestOptions } from '../../common-types';
3export declare type RestAdapterParams = CreateHttpClientParams & {
4 /**
5 * Contentful CMA Access Token
6 */
7 accessToken: CreateHttpClientParams['accessToken'];
8 /**
9 * API host
10 * @default api.contentful.com
11 */
12 host?: string;
13 /**
14 * direct file upload host
15 * @default upload.contentful.com
16 */
17 hostUpload?: string;
18};
19export declare class RestAdapter implements Adapter {
20 private readonly params;
21 constructor(params: RestAdapterParams);
22 makeRequest<R>({ entityType, action: actionInput, params, payload, headers, userAgent, }: MakeRequestOptions): Promise<R>;
23}