1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import type { RestAdapterParams } from './adapters/REST/rest-adapter';
|
7 | import { AdapterParams } from './create-adapter';
|
8 | import { ClientAPI } from './create-contentful-api';
|
9 | import type { AlphaPlainClientAPI, PlainClientAPI } from './plain/common-types';
|
10 | import type { DefaultParams } from './plain/plain-client';
|
11 | import * as editorInterfaceDefaults from './constants/editor-interface-defaults';
|
12 | export type { ClientAPI } from './create-contentful-api';
|
13 | export { asIterator } from './plain/as-iterator';
|
14 | export { isDraft, isPublished, isUpdated } from './plain/checks';
|
15 | export type { PlainClientAPI, AlphaPlainClientAPI } from './plain/common-types';
|
16 | export { createClient };
|
17 | export { RestAdapter } from './adapters/REST/rest-adapter';
|
18 | export { editorInterfaceDefaults };
|
19 | export declare type PlainClientDefaultParams = DefaultParams;
|
20 | export * from './export-types';
|
21 | interface UserAgentParams {
|
22 | |
23 |
|
24 |
|
25 | application?: string;
|
26 | |
27 |
|
28 |
|
29 | integration?: string;
|
30 | feature?: string;
|
31 | }
|
32 |
|
33 |
|
34 |
|
35 | export declare type ClientParams = RestAdapterParams & UserAgentParams;
|
36 | declare type ClientOptions = (RestAdapterParams | AdapterParams) & UserAgentParams;
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | declare function createClient(params: ClientOptions): ClientAPI;
|
48 | declare function createClient(params: ClientOptions, opts: {
|
49 | type: 'plain';
|
50 | defaults?: DefaultParams;
|
51 | }): PlainClientAPI;
|
52 | declare function createClient<T extends (ReadonlyArray<string> | readonly ['workflows']) & {
|
53 | [K in keyof T]: {
|
54 | [P in K]: 'workflows';
|
55 | };
|
56 | }[number]>(params: ClientOptions, opts: {
|
57 | type: 'plain';
|
58 | alphaFeatures: T;
|
59 | defaults?: DefaultParams;
|
60 | }): AlphaPlainClientAPI;
|
61 | declare function createClient(params: ClientOptions, opts: {
|
62 | type: 'plain';
|
63 | alphaFeatures: string[];
|
64 | defaults?: DefaultParams;
|
65 | }): PlainClientAPI;
|