@sanity/scheduled-publishing
Version:
> [!IMPORTANT] > As of [v3.39.0](https://www.sanity.io/changelog/e6013ee5-8214-4e03-9593-f7b19124b8a3) of Sanity Studio, this plugin has been deprecated and the Scheduled Publishing functionality has been moved into the core studio package. > Read more an
68 lines (53 loc) • 1.77 kB
TypeScript
import {DocumentActionComponent} from 'sanity'
import {DocumentActionDescription} from 'sanity'
import {DocumentActionProps} from 'sanity'
import {DocumentBadgeComponent} from 'sanity'
import {Plugin as Plugin_2} from 'sanity'
import {PropsWithChildren} from 'react'
declare type Action = DocumentActionComponent
export declare function EditScheduleForm(props: PropsWithChildren<Props>): JSX.Element
/**
* @public
*/
declare interface PluginOptions {
/**
* Date format to use for input fields. This must be a valid `date-fns` {@link https://date-fns.org/docs/format formatted string}.
* @defaultValue 'dd/MM/yyyy HH:mm'
*/
inputDateTimeFormat?: string
}
declare interface Props {
onChange?: (formData: ScheduleFormData) => void
value?: ScheduleFormData | null
}
export declare function resolveDocumentActions(existingActions: Action[]): Action[]
export declare function resolveDocumentBadges(
existingBadges: DocumentBadgeComponent[]
): DocumentBadgeComponent[]
export declare interface Schedule {
author: string
action: ScheduleAction_2
createdAt: string
dataset: string
description: string
documents: {
documentId: string
documentType?: string
}[]
executeAt: string | null
executedAt?: string
id: string
name: string
projectId: string
state: ScheduleState
stateReason: string
}
export declare const ScheduleAction: (props: DocumentActionProps) => DocumentActionDescription
declare type ScheduleAction_2 = 'publish' | 'unpublish'
export declare const ScheduledBadge: DocumentBadgeComponent
export declare const scheduledPublishing: Plugin_2<void | PluginOptions>
declare interface ScheduleFormData {
date: string
}
declare type ScheduleState = 'cancelled' | 'scheduled' | 'succeeded'
export {}