Added a new setter and getter for preferredStyleSchemes to throw if type is not an eventTicket and moved PreferredStyleSchemes schemas

This commit is contained in:
Alexander Cerutti
2024-06-15 23:48:33 +02:00
parent 593b64a676
commit 432e380429
4 changed files with 56 additions and 6 deletions

View File

@@ -15,6 +15,13 @@ export const TRANSIT_TYPE = {
"Cannot set transitType because not compliant with Apple specifications. Refer to https://apple.co/3DHuAG4 for more - %s",
} as const;
export const PREFERRED_STYLE_SCHEMES = {
UNEXPECTED_PASS_TYPE:
"Cannot set preferredStyleSchemes on a pass with type different from eventTicket.",
INVALID:
"Cannot set preferredStyleSchemes because not compliant with Apple specifications - %s",
} as const;
export const PASS_TYPE = {
INVALID:
"Cannot set type because not compliant with Apple specifications. Refer to https://apple.co/3aFpSfg for a list of valid props - %s",