Added support to preferredStyleSchemes import and reset

This commit is contained in:
Alexander Cerutti
2024-06-16 04:04:05 +02:00
parent 432e380429
commit dd08515251
2 changed files with 7 additions and 0 deletions

View File

@@ -415,6 +415,7 @@ export default class PKPass extends Bundle {
Schemas.Field,
),
transitType: undefined,
preferredStyleSchemes: undefined,
};
}
@@ -583,6 +584,7 @@ export default class PKPass extends Bundle {
auxiliaryFields = [],
backFields = [],
transitType,
preferredStyleSchemes = [],
} = data[type] || {};
this.headerFields.push(...headerFields);
@@ -594,6 +596,10 @@ export default class PKPass extends Bundle {
if (this.type === "boardingPass") {
this.transitType = transitType;
}
if (this.type === "eventTicket") {
this.preferredStyleSchemes = preferredStyleSchemes;
}
}
}

View File

@@ -26,6 +26,7 @@ export interface PassFields {
primaryFields: Field[];
secondaryFields: Field[];
transitType?: TransitType;
preferredStyleSchemes?: PreferredStyleSchemes;
}
export const PassFields = Joi.object<PassFields>().keys({