/** * Contentful Management API SDK. Allows you to create instances of a client * with access to the Contentful Content Management API. * @packageDocumentation */ import type { RestAdapterParams } from './adapters/REST/rest-adapter'; import type { XOR } from './common-types'; import type { AdapterParams } from './create-adapter'; import type { ClientAPI } from './create-contentful-api'; import type { PlainClientAPI } from './plain/common-types'; import type { DefaultParams } from './plain/plain-client'; import * as editorInterfaceDefaults from './constants/editor-interface-defaults'; export type { ClientAPI } from './create-contentful-api'; export { asIterator } from './plain/as-iterator'; export { fetchAll } from './plain/pagination-helper'; export { isDraft, isPublished, isUpdated } from './plain/checks'; export type { PlainClientAPI } from './plain/common-types'; export { createClient }; export { RestAdapter } from './adapters/REST/rest-adapter'; export { editorInterfaceDefaults }; export type PlainClientDefaultParams = DefaultParams; export * from './export-types'; interface UserAgentParams { /** * Application name and version e.g myApp/version */ application?: string; /** * Integration name and version e.g react/version */ integration?: string; feature?: string; } /** * @deprecated */ export type ClientParams = RestAdapterParams & UserAgentParams; type ClientOptions = UserAgentParams & XOR; /** * Create a client instance * @param params - Client initialization parameters * * ```javascript * const client = contentfulManagement.createClient({ * accessToken: 'myAccessToken' * }) * ``` */ declare function createClient(params: ClientOptions): ClientAPI; declare function createClient(params: ClientOptions, opts: { type: 'plain'; defaults?: DefaultParams; }): PlainClientAPI; /** * @deprecated The `alphaFeatures` option is no longer supported. Please use the function without this option. */ declare function createClient(params: ClientOptions, opts: { type?: 'plain'; alphaFeatures: string[]; defaults?: DefaultParams; }): ClientAPI | PlainClientAPI;