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