Added support to EventDateInfo

This commit is contained in:
Alexander Cerutti
2025-01-09 00:43:30 +01:00
parent f9c480410e
commit e5a8935289

View File

@@ -60,6 +60,17 @@ declare namespace SemanticTagType {
seatSectionColor?: string;
}
/**
* For newly-introduced event tickets
* in iOS 18.
*/
interface EventDateInfo {
date: string;
ignoreTimeComponents?: boolean;
timeZone?: string;
}
interface WifiNetwork {
password: string;
ssid: string;
@@ -82,6 +93,12 @@ const PersonNameComponent =
phoneticRepresentation: Joi.string(),
});
const EventDateInfo = Joi.object<SemanticTagType.EventDateInfo>().keys({
date: Joi.string().isoDate().required(),
ignoreTimeComponents: Joi.boolean(),
timeZone: Joi.string(),
});
const SeatSemantics = Joi.object<SemanticTagType.Seat>().keys({
seatSection: Joi.string(),
seatRow: Joi.string(),
@@ -217,6 +234,19 @@ export interface Semantics {
eventName?: string;
eventStartDate?: string;
/**
* For newly-introduced event tickets
* in iOS 18.
*
* Can be used as an alternative way to
* show show start date, with more control
* on time and timeZone details and as
* a way to show the event guide, both
* instead of `eventStartDate`.
*/
eventStartDateInfo?: SemanticTagType.EventDateInfo;
eventType?:
| "PKEventTypeGeneric"
| "PKEventTypeLivePerformance"
@@ -434,6 +464,18 @@ export const Semantics = Joi.object<Semantics>().keys({
*/
eventLiveMessage: Joi.string(),
/**
* For newly-introduced event tickets
* in iOS 18.
*
* Can be used as an alternative way to
* show show start date, with more control
* on time and timeZone details and as
* a way to show the event guide, both
* instead of `eventStartDate`.
*/
eventStartDateInfo: EventDateInfo,
eventStartDate: Joi.string(),
eventType: Joi.string().regex(
/(PKEventTypeGeneric|PKEventTypeLivePerformance|PKEventTypeMovie|PKEventTypeSports|PKEventTypeConference|PKEventTypeConvention|PKEventTypeWorkshop|PKEventTypeSocialGathering)/,