UNPKG

@datocms/cma-client

Version:
119 lines (118 loc) 4.67 kB
import BaseResource from '../../BaseResource'; import type * as SchemaTypes from '../SchemaTypes'; import type * as SimpleSchemaTypes from '../SimpleSchemaTypes'; export default class SchemaMenuItem extends BaseResource { static readonly TYPE: "schema_menu_item"; /** * Create a new schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/create * * @throws {ApiError} * @throws {TimeoutError} */ create(body: SimpleSchemaTypes.SchemaMenuItemCreateSchema): Promise<SimpleSchemaTypes.SchemaMenuItem>; /** * Create a new schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/create * * @throws {ApiError} * @throws {TimeoutError} */ rawCreate(body: SchemaTypes.SchemaMenuItemCreateSchema): Promise<SchemaTypes.SchemaMenuItemCreateTargetSchema>; /** * Update a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/update * * @throws {ApiError} * @throws {TimeoutError} */ update(schemaMenuItemId: string | SimpleSchemaTypes.SchemaMenuItemData, body: SimpleSchemaTypes.SchemaMenuItemUpdateSchema): Promise<SimpleSchemaTypes.SchemaMenuItem>; /** * Update a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/update * * @throws {ApiError} * @throws {TimeoutError} */ rawUpdate(schemaMenuItemId: string, body: SchemaTypes.SchemaMenuItemUpdateSchema): Promise<SchemaTypes.SchemaMenuItemUpdateTargetSchema>; /** * List all schema menu items * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/instances * * @throws {ApiError} * @throws {TimeoutError} */ list(queryParams?: SimpleSchemaTypes.SchemaMenuItemInstancesHrefSchema): Promise<SimpleSchemaTypes.SchemaMenuItemInstancesTargetSchema>; /** * List all schema menu items * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawList(queryParams?: SchemaTypes.SchemaMenuItemInstancesHrefSchema): Promise<SchemaTypes.SchemaMenuItemInstancesTargetSchema>; /** * Retrieve a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/self * * @throws {ApiError} * @throws {TimeoutError} */ find(schemaMenuItemId: string | SimpleSchemaTypes.SchemaMenuItemData): Promise<SimpleSchemaTypes.SchemaMenuItem>; /** * Retrieve a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/self * * @throws {ApiError} * @throws {TimeoutError} */ rawFind(schemaMenuItemId: string): Promise<SchemaTypes.SchemaMenuItemSelfTargetSchema>; /** * Delete a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/destroy * * @throws {ApiError} * @throws {TimeoutError} */ destroy(schemaMenuItemId: string | SimpleSchemaTypes.SchemaMenuItemData): Promise<SimpleSchemaTypes.SchemaMenuItem>; /** * Delete a schema menu item * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/destroy * * @throws {ApiError} * @throws {TimeoutError} */ rawDestroy(schemaMenuItemId: string): Promise<SchemaTypes.SchemaMenuItemDestroyTargetSchema>; /** * Reorders a set of schema menu items * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/reorder * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ reorder(body: SimpleSchemaTypes.SchemaMenuItemReorderSchema): Promise<SimpleSchemaTypes.SchemaMenuItemReorderJobSchema>; /** * Reorders a set of schema menu items * * Read more: https://www.datocms.com/docs/content-management-api/resources/schema-menu_item/reorder * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawReorder(body: SchemaTypes.SchemaMenuItemReorderSchema): Promise<SchemaTypes.SchemaMenuItemReorderJobSchema>; }