diff --git a/src/schemas/Semantics.ts b/src/schemas/Semantics.ts index dd6b2e9..4dd4b42 100644 --- a/src/schemas/Semantics.ts +++ b/src/schemas/Semantics.ts @@ -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().keys({ + date: Joi.string().isoDate().required(), + ignoreTimeComponents: Joi.boolean(), + timeZone: Joi.string(), +}); + const SeatSemantics = Joi.object().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().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)/,