UNPKG

1.64 kBTypeScriptView Raw
1import type { GetUserUIConfigParams } from '../../common-types';
2import type { UserUIConfigProps } from '../../entities/user-ui-config';
3import type { OptionalDefaults } from '../wrappers/wrap';
4export type UserUIConfigPlainClientAPI = {
5 /**
6 * Fetch the UI Config for the current user in a given Space and Environment
7 * @param params entity IDs to identify the UI Config
8 * @returns the UI Config
9 * @throws if the request fails, or the UI Config is not found
10 * @example
11 * ```javascript
12 * const uiConfig = await client.userUIConfig.get({
13 * spaceId: "<space_id>",
14 * environmentId: "<environment_id>",
15 * });
16 * ```
17 */
18 get(params: OptionalDefaults<GetUserUIConfigParams>): Promise<UserUIConfigProps>;
19 /**
20 * Update the UI Config for for the current user in a given Space and Environment
21 * @param params entity IDs to identify the UI Config
22 * @param rawData the UI Config update
23 * @returns the updated UI Config
24 * @throws if the request fails, the UI Config is not found, or the update payload is malformed
25 * @example
26 * ```javascript
27 * await client.userUIConfig.update({
28 * spaceId: "<space_id>",
29 * environmentId: "<environment_id>",
30 * }, {
31 * ...currentUIConfig,
32 * entryListViews: [
33 * ...currentUIConfig.entryListViews,
34 * {
35 * id: 'newFolder',
36 * title: 'New Folder',
37 * views: []
38 * }
39 * ],
40 * });
41 * ```
42 */
43 update(params: OptionalDefaults<GetUserUIConfigParams>, rawData: UserUIConfigProps): Promise<UserUIConfigProps>;
44};