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