UNPKG

@datocms/cma-client

Version:
43 lines (42 loc) 1.72 kB
import BaseResource from '../../BaseResource'; import type * as SchemaTypes from '../SchemaTypes'; import type * as SimpleSchemaTypes from '../SimpleSchemaTypes'; export default class ScheduledPublication extends BaseResource { static readonly TYPE: "scheduled_publication"; /** * Create a new scheduled publication * * Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/create * * @throws {ApiError} * @throws {TimeoutError} */ create(itemId: string | SimpleSchemaTypes.ItemData, body: SimpleSchemaTypes.ScheduledPublicationCreateSchema): Promise<SimpleSchemaTypes.ScheduledPublication>; /** * Create a new scheduled publication * * Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/create * * @throws {ApiError} * @throws {TimeoutError} */ rawCreate(itemId: string, body: SchemaTypes.ScheduledPublicationCreateSchema): Promise<SchemaTypes.ScheduledPublicationCreateTargetSchema>; /** * Delete a scheduled publication * * Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/destroy * * @throws {ApiError} * @throws {TimeoutError} */ destroy(itemId: string | SimpleSchemaTypes.ItemData): Promise<SimpleSchemaTypes.Item>; /** * Delete a scheduled publication * * Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/destroy * * @throws {ApiError} * @throws {TimeoutError} */ rawDestroy(itemId: string): Promise<SchemaTypes.ScheduledPublicationDestroyTargetSchema>; }