Renamed Schem< Personalization file to Personalize

This commit is contained in:
Alexander Cerutti
2021-08-25 23:12:01 +02:00
parent 7c2e8db1fb
commit 0c5b4e130f
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
import Joi from "joi";
/**
* @see https://developer.apple.com/documentation/walletpasses/personalize
* @TODO Rename "Personalization" in "Personalize". This will be done in v3.0
*/
export interface Personalization {
description: string;
requiredPersonalizationFields: RequiredPersonalizationFields[];
termsAndConditions?: string;
}
type RequiredPersonalizationFields =
| "PKPassPersonalizationFieldName"
| "PKPassPersonalizationFieldPostalCode"
| "PKPassPersonalizationFieldEmailAddress"
| "PKPassPersonalizationFieldPhoneNumber";
export const Personalization = Joi.object<Personalization>().keys({
description: Joi.string().required(),
requiredPersonalizationFields: Joi.array()
.items(
"PKPassPersonalizationFieldName",
"PKPassPersonalizationFieldPostalCode",
"PKPassPersonalizationFieldEmailAddress",
"PKPassPersonalizationFieldPhoneNumber",
)
.required(),
termsAndConditions: Joi.string(),
});