From 0419aae516f93860efef6e55ae936412c61f9ffc Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 27 May 2025 20:32:20 +0200 Subject: [PATCH 1/2] Add support for undocumented stripColor property. --- examples/firebase/functions/src/index.ts | 1 + src/schemas/index.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/examples/firebase/functions/src/index.ts b/examples/firebase/functions/src/index.ts index 2beb985..a498c8f 100644 --- a/examples/firebase/functions/src/index.ts +++ b/examples/firebase/functions/src/index.ts @@ -20,6 +20,7 @@ interface RequestWithBody extends functions.Request { textColor: string; backgroundColor: string; labelColor: string; + stripColor: string; relevantDate?: string; expiryDate?: string; relevantLocationLat?: number; diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 4b21743..4955290 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -101,6 +101,13 @@ export interface PassProps { foregroundColor?: string; labelColor?: string; + /** + * Undocumented feature: + * Color of primary fields value when + * rendered on top of a strip. + */ + stripColor?: string; + nfc?: NFC; beacons?: Beacon[]; barcodes?: Barcode[]; @@ -441,6 +448,7 @@ export const OverridablePassProps = Joi.object({ maxDistance: Joi.number().positive(), authenticationToken: Joi.string().min(16), labelColor: Joi.string().regex(RGB_HEX_COLOR_REGEX), + stripColor: Joi.string().regex(RGB_HEX_COLOR_REGEX), backgroundColor: Joi.string().regex(RGB_HEX_COLOR_REGEX), foregroundColor: Joi.string().regex(RGB_HEX_COLOR_REGEX), associatedStoreIdentifiers: Joi.array().items(Joi.number()), From 228323dbcbee2bfa8ef43f66336de54e0eeccdeb Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 27 May 2025 20:33:55 +0200 Subject: [PATCH 2/2] Add to PassColors. --- src/schemas/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 4955290..f2fa903 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -405,7 +405,7 @@ export type PassKindsProps = { [K in PassTypesProps]: PassProps[K] }; export type PassColors = Pick< OverridablePassProps, - "backgroundColor" | "foregroundColor" | "labelColor" + "backgroundColor" | "foregroundColor" | "labelColor" | "stripColor" >; export const PassPropsFromMethods = Joi.object({