@datocms/cma-client
Version:
JS client for DatoCMS REST Content Management API
46 lines (45 loc) • 1.94 kB
TypeScript
import BaseResource from '../../BaseResource';
import type { ItemTypeDefinition } from '../../utilities/itemDefinition';
import type * as ApiTypes from '../ApiTypes';
import type * as RawApiTypes from '../RawApiTypes';
type NoInfer<T> = [T][T extends any ? 0 : never];
export default class ScheduledUnpublishing extends BaseResource {
static readonly TYPE: "scheduled_unpublishing";
/**
* Create a new scheduled unpublishing
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing/create
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
create(itemId: string | ApiTypes.ItemData, body: ApiTypes.ScheduledUnpublishingCreateSchema): Promise<ApiTypes.ScheduledUnpublishing>;
/**
* Create a new scheduled unpublishing
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing/create
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawCreate(itemId: string, body: RawApiTypes.ScheduledUnpublishingCreateSchema): Promise<RawApiTypes.ScheduledUnpublishingCreateTargetSchema>;
/**
* Delete a scheduled unpublishing
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
destroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.Item<NoInfer<D>>>;
/**
* Delete a scheduled unpublishing
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawDestroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ScheduledUnpublishingDestroyTargetSchema<NoInfer<D>, true>>;
}
export {};