Merge pull request #245 from slootjes/master

Add support for stripColor
This commit is contained in:
Alexander Cerutti
2025-05-28 22:06:25 +02:00
committed by GitHub
2 changed files with 10 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ interface RequestWithBody extends functions.Request {
textColor: string;
backgroundColor: string;
labelColor: string;
stripColor: string;
relevantDate?: string;
expiryDate?: string;
relevantLocationLat?: number;

View File

@@ -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[];
@@ -398,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<PassPropsFromMethods>({
@@ -441,6 +448,7 @@ export const OverridablePassProps = Joi.object<OverridablePassProps>({
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()),