mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Improved EventDateInfo and set date as optional
This commit is contained in:
@@ -28,42 +28,39 @@ export const CurrencyAmount = Joi.object<CurrencyAmount>().keys({
|
|||||||
* @see \<undiclosed>
|
* @see \<undiclosed>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type EventDateInfo =
|
export interface EventDateInfo {
|
||||||
| {
|
date?: string;
|
||||||
date: string;
|
ignoreTimeComponents?: boolean;
|
||||||
ignoreTimeComponents?: boolean;
|
timeZone?: string;
|
||||||
timeZone?: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @iOSVersion 18.1
|
* @iOSVersion 18.1
|
||||||
*
|
*
|
||||||
* Indicates that the time was not announced yet.
|
* Indicates that the time was not announced yet.
|
||||||
* Leads to showing "TBA" in the UI when `date` is set.
|
* Leads to showing "TBA" in the UI when `date` is set.
|
||||||
* Setting `ignoreTimeComponents` to true, has higher priority
|
* Setting `ignoreTimeComponents` to true, has higher priority
|
||||||
* over this property.
|
* over this property.
|
||||||
*/
|
*
|
||||||
unannounced?: boolean;
|
* When both `date` and `semantics.eventStartDate` are unset,
|
||||||
}
|
* `Date: TBA` will be shown in the UI.
|
||||||
| {
|
*/
|
||||||
date?: string;
|
unannounced?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @iOSVersion 18.1
|
* @iOSVersion 18.1
|
||||||
*
|
*
|
||||||
* Indicates that the time of the event has not been determined yet.
|
* Indicates that the time of the event has not been determined yet.
|
||||||
* Leads to showing "TBD" in the UI when `date` is set.
|
* Leads to showing "TBD" in the UI when `date` is set.
|
||||||
* Setting `ignoreTimeComponents` to true, has higher priority
|
* Setting `ignoreTimeComponents` to true, has higher priority
|
||||||
* over this property.
|
* over this property.
|
||||||
*
|
*
|
||||||
* This property has higher priority over `unannounced`.
|
* This property has higher priority over `unannounced`.
|
||||||
*
|
*
|
||||||
* --- Implementation note ---
|
* When both `date` and `semantics.eventStartDate` are unset,
|
||||||
*
|
* `Date: TBD` will be shown in the UI.
|
||||||
* This is the reason it was splitted from unannounced above.
|
*/
|
||||||
* Furthermore, it apparently can live without specifying `date`.
|
undetermined?: boolean;
|
||||||
*/
|
}
|
||||||
undetermined: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const EventDateInfo = Joi.alternatives(
|
export const EventDateInfo = Joi.alternatives(
|
||||||
Joi.object<EventDateInfo>().keys({
|
Joi.object<EventDateInfo>().keys({
|
||||||
|
|||||||
Reference in New Issue
Block a user