mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Added support to preferredStyleSchemes import and reset
This commit is contained in:
@@ -415,6 +415,7 @@ export default class PKPass extends Bundle {
|
|||||||
Schemas.Field,
|
Schemas.Field,
|
||||||
),
|
),
|
||||||
transitType: undefined,
|
transitType: undefined,
|
||||||
|
preferredStyleSchemes: undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,6 +584,7 @@ export default class PKPass extends Bundle {
|
|||||||
auxiliaryFields = [],
|
auxiliaryFields = [],
|
||||||
backFields = [],
|
backFields = [],
|
||||||
transitType,
|
transitType,
|
||||||
|
preferredStyleSchemes = [],
|
||||||
} = data[type] || {};
|
} = data[type] || {};
|
||||||
|
|
||||||
this.headerFields.push(...headerFields);
|
this.headerFields.push(...headerFields);
|
||||||
@@ -594,6 +596,10 @@ export default class PKPass extends Bundle {
|
|||||||
if (this.type === "boardingPass") {
|
if (this.type === "boardingPass") {
|
||||||
this.transitType = transitType;
|
this.transitType = transitType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.type === "eventTicket") {
|
||||||
|
this.preferredStyleSchemes = preferredStyleSchemes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export interface PassFields {
|
|||||||
primaryFields: Field[];
|
primaryFields: Field[];
|
||||||
secondaryFields: Field[];
|
secondaryFields: Field[];
|
||||||
transitType?: TransitType;
|
transitType?: TransitType;
|
||||||
|
preferredStyleSchemes?: PreferredStyleSchemes;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PassFields = Joi.object<PassFields>().keys({
|
export const PassFields = Joi.object<PassFields>().keys({
|
||||||
|
|||||||
Reference in New Issue
Block a user