sanity-plugin-recurring-dates 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Tom Smith
3
+ Copyright (c) 2025 Tom Smith
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,49 @@
1
+ import type {DateRule} from 'sanity'
2
+ import type {DatetimeOptions} from 'sanity'
3
+ import type {ObjectDefinition} from 'sanity'
4
+ import {Plugin as Plugin_2} from 'sanity'
5
+
6
+ export declare interface PluginConfig {
7
+ defaultRecurrences?: string[]
8
+ hideEndDate?: boolean
9
+ hideCustom?: boolean
10
+ dateTimeOptions?: DatetimeOptions
11
+ dateOnly?: boolean
12
+ validation?: {
13
+ startDate?: (Rule: DateRule) => DateRule
14
+ endDate?: (Rule: DateRule) => DateRule
15
+ }
16
+ fieldTitles?: {
17
+ startDate?: string
18
+ endDate?: string
19
+ }
20
+ fieldDescriptions?: {
21
+ startDate?: string
22
+ endDate?: string
23
+ }
24
+ }
25
+
26
+ export declare interface RecurringDate {
27
+ rrule?: string
28
+ startDate?: string
29
+ endDate?: string
30
+ }
31
+
32
+ export declare type RecurringDateFieldOptions = Omit<ObjectDefinition, 'type' | 'fields'> & {
33
+ type: 'recurringDates'
34
+ options?: PluginConfig
35
+ }
36
+
37
+ export declare const recurringDates: Plugin_2<void | PluginConfig>
38
+
39
+ export declare type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
40
+ [Property in Key]-?: Type[Property]
41
+ }
42
+
43
+ export {}
44
+
45
+ declare module 'sanity' {
46
+ interface IntrinsicDefinitions {
47
+ recurringDates: RecurringDateFieldOptions
48
+ }
49
+ }