@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
67 lines (56 loc) • 1.35 kB
text/typescript
import {ValidationMarker} from 'sanity'
export interface NormalizedTimeZone {
abbreviation: string
alternativeName: string
mainCities: string
name: string
namePretty: string
offset: string
value: string
}
/**
* @public
*/
export 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
}
export interface Schedule {
author: string
action: ScheduleAction
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 type ScheduleAction = 'publish' | 'unpublish'
export interface ScheduleFilter {
state: ScheduleState
title: string
}
export interface ScheduleFormData {
date: string
}
export type ScheduleSort = 'createdAt' | 'executeAt'
export type ScheduleState = 'cancelled' | 'scheduled' | 'succeeded'
export interface ValidationStatus {
isValidating: boolean
validation: ValidationMarker[]
}
/**
* key is schedule.id, NOT documentId
*/
export type ScheduledDocValidations = Record<string, ValidationStatus>