@datocms/cma-client
Version:
JS client for DatoCMS REST Content Management API
46 lines (45 loc) • 1.92 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 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 | ApiTypes.ItemData, body: ApiTypes.ScheduledPublicationCreateSchema): Promise<ApiTypes.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: RawApiTypes.ScheduledPublicationCreateSchema): Promise<RawApiTypes.ScheduledPublicationCreateTargetSchema>;
/**
* Delete a scheduled publication
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
destroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.Item<NoInfer<D>>>;
/**
* Delete a scheduled publication
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/scheduled-publication/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawDestroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ScheduledPublicationDestroyTargetSchema<NoInfer<D>, true>>;
}
export {};