mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Moved relevantDates from semantics to root
This commit is contained in:
@@ -32,16 +32,6 @@ declare namespace SemanticTagType {
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* For newly-introduced event tickets
|
||||
* in iOS 18
|
||||
*/
|
||||
|
||||
interface RelevantDate {
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
}
|
||||
|
||||
interface Seat {
|
||||
seatSection?: string;
|
||||
seatRow?: string;
|
||||
@@ -73,15 +63,6 @@ const PersonNameComponent =
|
||||
phoneticRepresentation: Joi.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* Minimum supported version: iOS 18
|
||||
*/
|
||||
|
||||
const RelevantDate = Joi.object<SemanticTagType.RelevantDate>().keys({
|
||||
startDate: Joi.string().required(),
|
||||
endDate: Joi.string().required(),
|
||||
});
|
||||
|
||||
const SeatSemantics = Joi.object<SemanticTagType.Seat>().keys({
|
||||
seatSection: Joi.string(),
|
||||
seatRow: Joi.string(),
|
||||
@@ -182,8 +163,6 @@ export interface Semantics {
|
||||
performerNames?: string[];
|
||||
priorityStatus?: string;
|
||||
|
||||
relevantDates?: SemanticTagType.RelevantDate[];
|
||||
|
||||
seats?: SemanticTagType.Seat[];
|
||||
securityScreening?: string;
|
||||
silenceRequested?: boolean;
|
||||
@@ -302,8 +281,6 @@ export const Semantics = Joi.object<Semantics>().keys({
|
||||
performerNames: Joi.array().items(Joi.string()),
|
||||
priorityStatus: Joi.string(),
|
||||
|
||||
relevantDates: Joi.array().items(RelevantDate),
|
||||
|
||||
seats: Joi.array().items(SeatSemantics),
|
||||
securityScreening: Joi.string(),
|
||||
silenceRequested: Joi.boolean(),
|
||||
|
||||
@@ -33,6 +33,26 @@ export const PreferredStyleSchemes = Joi.array().items(
|
||||
"eventTicket",
|
||||
) satisfies Joi.Schema<PreferredStyleSchemes>;
|
||||
|
||||
/**
|
||||
* For newly-introduced event tickets
|
||||
* in iOS 18
|
||||
*/
|
||||
|
||||
interface RelevantDate {
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimum supported version: iOS 18
|
||||
*/
|
||||
|
||||
const RelevantDate = Joi.object<RelevantDate>().keys({
|
||||
startDate: Joi.string().required(),
|
||||
endDate: Joi.string().required(),
|
||||
});
|
||||
|
||||
|
||||
export interface FileBuffers {
|
||||
[key: string]: Buffer;
|
||||
}
|
||||
@@ -66,6 +86,9 @@ export interface PassProps {
|
||||
beacons?: Beacon[];
|
||||
barcodes?: Barcode[];
|
||||
relevantDate?: string;
|
||||
|
||||
relevantDates?: RelevantDate[];
|
||||
|
||||
expirationDate?: string;
|
||||
locations?: Location[];
|
||||
|
||||
@@ -122,6 +145,7 @@ type PassMethodsProps =
|
||||
| "beacons"
|
||||
| "barcodes"
|
||||
| "relevantDate"
|
||||
| "relevantDates"
|
||||
| "expirationDate"
|
||||
| "locations"
|
||||
| "preferredStyleSchemes";
|
||||
@@ -150,6 +174,7 @@ export const PassPropsFromMethods = Joi.object<PassPropsFromMethods>({
|
||||
beacons: Joi.array().items(Beacon),
|
||||
barcodes: Joi.array().items(Barcode),
|
||||
relevantDate: Joi.string().isoDate(),
|
||||
relevantDates: Joi.array().items(RelevantDate),
|
||||
expirationDate: Joi.string().isoDate(),
|
||||
locations: Joi.array().items(Location),
|
||||
preferredStyleSchemes: PreferredStyleSchemes,
|
||||
|
||||
Reference in New Issue
Block a user