import type { CursorPaginatedCollectionProp, DeleteConceptParams, GetConceptDescendantsParams, GetConceptParams, GetManyConceptParams, GetOrganizationParams, UpdateConceptParams } from '../../common-types'; import type { ConceptProps, CreateConceptProps } from '../../entities/concept'; import type { OpPatch } from 'json-patch'; import type { SetOptional } from 'type-fest'; export type ConceptPlainClientAPI = { /** * Create Concept * @returns ConceptProps * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/create-a-concept} * @example * ```javascript * const concept = await client.concept.create({ * organizationId: '', * }, conceptProps); * ``` */ create(params: SetOptional, payload: CreateConceptProps): Promise; /** * Update Concept * @returns the updated Concept * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/concept} * @example * ```javascript * const updatedConcept = await client.concept.update({ * organizationId: '', * }, patch); * ``` */ update(params: SetOptional, payload: OpPatch[]): Promise; /** * Get Concept * @returns the Concept * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/concept} * @example * ```javascript * const concept = await client.concept.get({ * organizationId: '', * conceptId: '', * }); * ``` */ get(params: SetOptional): Promise; /** * Delete Concept * @returns nothing * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/concept} * @example * ```javascript * await client.concept.delete({ * conceptId: '', * version: 1, * }); * ``` */ delete(params: SetOptional): Promise; /** * Get many Concepts * @returns list of many Concepts * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/concept-collection} * @example * ```javascript * const concepts = await client.concept.getMany({ * organizationId: '', * }); * ``` */ getMany(params: SetOptional): Promise>; /** * Get number of total Concept * @returns number of total Concept * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/total-concepts} * @example * ```javascript * const {total} = await client.concept.getTotal({ * organizationId: '', * }); * ``` */ getTotal(params: SetOptional): Promise<{ total: number; }>; /** * Get descendant Concepts * @returns list of Concepts * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/descendants} * @example * ```javascript * const concepts = await client.concept.getDescendants({ * organizationId: '', * conceptId: '', * }); * ``` */ getDescendants(params: SetOptional): Promise>; /** * Get ancestor Concepts * @returns list of ancestor Concepts * @throws if the request fails * @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/ancestors} * @example * ```javascript * const concepts = await client.concept.getAncestors({ * organizationId: '', * conceptId: '', * }); * ``` */ getAncestors(params: SetOptional): Promise>; };