UNPKG

831 BTypeScriptView Raw
1import type { CreateHttpClientParams } from 'contentful-sdk-core';
2import type { Adapter, MakeRequestOptions } from '../../common-types';
3export 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 userAgent?: string | undefined;
19};
20export declare class RestAdapter implements Adapter {
21 private readonly params;
22 private readonly axiosInstance;
23 constructor(params: RestAdapterParams);
24 makeRequest<R>({ entityType, action: actionInput, params, payload, headers, userAgent, }: MakeRequestOptions): Promise<R>;
25}