import { Client } from '../../Client'; import { ContentManagementClient } from './ContentManagementClient'; import { MediaManagementClient } from './MediaManagementClient'; import { MemberManagementClient } from './MemberManagementClient'; import { ContentLanguageType, ContentMemberCreateGroupType, ContentMemberGroupType, ContentMemberTypeType, ContentTypeBase, ContentRelationType, ContentRelationTypeType, CreateContentLanguageType, MediaTypeContentManager, Form } from '../../Responses'; /** * ManagementClient is used to access the Content Management API. * @public * * @example * The {@link ManagementClient} must be accessed through {@link Client}. * * ```typescript * import { Client } from '@umbraco/headless-client' * * const client = new Client({ * projectAlias: '', * apiKey: '', * language: '', * }) * * const managementClient = client.management * ``` */ export declare class ManagementClient { private readonly client; /** * @internal */ constructor(client: Client); private readonly makeRequest; /** * The Content client for the Content Management API. * See {@link ContentManagementClient} */ readonly content: ContentManagementClient; /** * The Media client for the Media Management API. * See {@link MediaManagementClient} */ readonly media: MediaManagementClient; /** * The Member client for the Member Management API. * See {@link MemberManagementClient} */ readonly member: MemberManagementClient; /** * ContentType API */ get contentType(): { /** * Fetch all content types */ all: () => Promise; /** * Find content type by alias * @param alias Alias for the content type */ byAlias: (alias: string) => Promise; }; /** * Media API */ get mediaType(): { /** * Fetch all media types */ all: () => Promise; /** * Find media type by alias * @param alias Alias of the media type querying for */ byAlias: (alias: string) => Promise; }; /** * Language API */ get language(): { /** * Fetch all languages */ all: () => Promise; /** * Find language by ISO code * @param id ISO Code for the language (e.g. en-US) */ byISOCode: (id: string) => Promise; /** * Create a language * @param data Data for creating language object */ create: (data: CreateContentLanguageType) => Promise; /** * Update a language * @param id ISO Code for the language (e.g. en-US) * @param data Data for updating language object */ update: (id: string, data: CreateContentLanguageType) => Promise; /** * Delete a language * @param id ISO Code for the language (e.g. en-US) */ delete: (id: string) => Promise; }; /** * Relation API */ get relation(): { /** * Find relation by id * @param id GUID part of an Umbraco UDI */ byId: (id: string) => Promise; /** * Find relation by alias * @param alias Alias of the relation querying for */ byAlias: (alias: string) => Promise; /** * Fetch child for relation with id * @param id GUID part of an Umbraco UDI */ byChild: (id: string) => Promise; /** * Fetch parent for relation with id * @param id GUID part of an Umbraco UDI */ byParent: (id: string) => Promise; /** * Create a relation * @param data Data for creating relation object */ create: (data: any) => Promise; /** * Delete relation with id * @param id GUID part of an Umbraco UDI */ delete: (id: string) => Promise; }; /** * RelationType API */ get relationType(): { /** * Fetch relation type by alias * @param alias Alias for the relation type queryed for */ byAlias: (alias: string) => Promise; }; /** * MemberGroup API */ get memberGroup(): { /** * Fetch member group by name * @param name The name of the group */ byName: (name: string) => Promise; /** * Create a member group * @param data Data for creating a member group */ create: (data: ContentMemberCreateGroupType) => Promise; /** * Delete member group * @param name Name of the member group to be removed */ delete: (name: string) => Promise; }; /** * MemberType API */ get memberType(): { /** * Fetch all member types */ all: () => Promise; /** * Find by alias * @param alias Alias for the member type to be found. */ byAlias: (alias: string) => Promise; }; /** * Forms API */ get forms(): { /** * Fetch all forms */ all: () => Promise; /** * Get form by id */ byId: (id: string) => Promise
; /** * Submit a new form entry */ submitEntry: (formId: string, data: object) => Promise; }; }