Improved EventDateInfo and set date as optional

This commit is contained in:
Alexander Cerutti
2025-10-31 18:28:22 +01:00
parent 019019d4d3
commit e7e3424074

View File

@@ -28,9 +28,8 @@ export const CurrencyAmount = Joi.object<CurrencyAmount>().keys({
* @see \<undiclosed>
*/
export type EventDateInfo =
| {
date: string;
export interface EventDateInfo {
date?: string;
ignoreTimeComponents?: boolean;
timeZone?: string;
@@ -41,11 +40,11 @@ export type EventDateInfo =
* Leads to showing "TBA" in the UI when `date` is set.
* Setting `ignoreTimeComponents` to true, has higher priority
* over this property.
*
* When both `date` and `semantics.eventStartDate` are unset,
* `Date: TBA` will be shown in the UI.
*/
unannounced?: boolean;
}
| {
date?: string;
/**
* @iOSVersion 18.1
@@ -57,13 +56,11 @@ export type EventDateInfo =
*
* This property has higher priority over `unannounced`.
*
* --- Implementation note ---
*
* This is the reason it was splitted from unannounced above.
* Furthermore, it apparently can live without specifying `date`.
* When both `date` and `semantics.eventStartDate` are unset,
* `Date: TBD` will be shown in the UI.
*/
undetermined: boolean;
};
undetermined?: boolean;
}
export const EventDateInfo = Joi.alternatives(
Joi.object<EventDateInfo>().keys({