mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Added support to eventTicket.preferredStyleSchemes
This commit is contained in:
@@ -63,7 +63,20 @@ export interface PassProps {
|
|||||||
locations?: Location[];
|
locations?: Location[];
|
||||||
|
|
||||||
boardingPass?: PassFields & { transitType: TransitType };
|
boardingPass?: PassFields & { transitType: TransitType };
|
||||||
eventTicket?: PassFields;
|
eventTicket?: PassFields & {
|
||||||
|
/**
|
||||||
|
* New field coming in iOS 18
|
||||||
|
* `"eventTicket"` is the legacy style.
|
||||||
|
*
|
||||||
|
* If used, passkit will try to render following the old style
|
||||||
|
* first.
|
||||||
|
*
|
||||||
|
* Which means that `primaryFields`, `secondaryFields` and
|
||||||
|
* so on, are not necessary anymore for the new style,
|
||||||
|
* as semantics are preferred.
|
||||||
|
*/
|
||||||
|
preferredStyleSchemes?: ("posterEventTicket" | "eventTicket")[];
|
||||||
|
};
|
||||||
coupon?: PassFields;
|
coupon?: PassFields;
|
||||||
generic?: PassFields;
|
generic?: PassFields;
|
||||||
storeCard?: PassFields;
|
storeCard?: PassFields;
|
||||||
@@ -132,7 +145,24 @@ export const PassKindsProps = Joi.object<PassKindsProps>({
|
|||||||
coupon: PassFields.disallow("transitType"),
|
coupon: PassFields.disallow("transitType"),
|
||||||
generic: PassFields.disallow("transitType"),
|
generic: PassFields.disallow("transitType"),
|
||||||
storeCard: PassFields.disallow("transitType"),
|
storeCard: PassFields.disallow("transitType"),
|
||||||
eventTicket: PassFields.disallow("transitType"),
|
eventTicket: PassFields.disallow("transitType").append(
|
||||||
|
Joi.object<PassProps["eventTicket"]>().keys({
|
||||||
|
/**
|
||||||
|
* New field coming in iOS 18
|
||||||
|
* `"eventTicket"` is the legacy style.
|
||||||
|
*
|
||||||
|
* If used, passkit will try to render following the old style
|
||||||
|
* first.
|
||||||
|
*
|
||||||
|
* Which means that `primaryFields`, `secondaryFields` and
|
||||||
|
* so on, are not necessary anymore for the new style,
|
||||||
|
* as semantics are preferred.
|
||||||
|
*/
|
||||||
|
preferredStyleSchemes: Joi.array().items(
|
||||||
|
Joi.string().allow("posterEventTicket", "eventTicket"),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
),
|
||||||
boardingPass: PassFields,
|
boardingPass: PassFields,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user