UNPKG

passkit-generator

Version:

The easiest way to generate custom Apple Wallet passes in Node.js

51 lines (50 loc) 2.04 kB
import Joi from "joi"; import { Semantics } from "./Semantics.js"; export type PKDataDetectorType = "PKDataDetectorTypePhoneNumber" | "PKDataDetectorTypeLink" | "PKDataDetectorTypeAddress" | "PKDataDetectorTypeCalendarEvent"; export type PKTextAlignmentType = "PKTextAlignmentLeft" | "PKTextAlignmentCenter" | "PKTextAlignmentRight" | "PKTextAlignmentNatural"; export type PKDateStyleType = "PKDateStyleNone" | "PKDateStyleShort" | "PKDateStyleMedium" | "PKDateStyleLong" | "PKDateStyleFull"; export type PKNumberStyleType = "PKNumberStyleDecimal" | "PKNumberStylePercent" | "PKNumberStyleScientific" | "PKNumberStyleSpellOut"; /** * @see https://developer.apple.com/documentation/walletpasses/passfieldcontent */ export interface PassFieldContent { attributedValue?: string | number | Date; changeMessage?: string; dataDetectorTypes?: PKDataDetectorType[]; label?: string; textAlignment?: PKTextAlignmentType; key: string; value: string | number | Date; semantics?: Semantics; dateStyle?: PKDateStyleType; ignoresTimeZone?: boolean; isRelative?: boolean; timeStyle?: PKDateStyleType; currencyCode?: string; numberStyle?: PKNumberStyleType; } /** * @deprecated Use `PassFieldContent` instead, * which is the right Apple name. */ export type Field = PassFieldContent; export interface PassFieldContentWithRow extends PassFieldContent { row?: 0 | 1; } /** * @deprecated Use `PassFieldContentWithRow` instead, * which is the right Apple name. */ export type FieldWithRow = PassFieldContentWithRow; export declare const PassFieldContent: Joi.ObjectSchema<PassFieldContent>; /** * @deprecated Use `PassFieldContent` instead, * which is the right Apple name. */ export declare const Field: Joi.ObjectSchema<PassFieldContent>; export declare const PassFieldContentWithRow: Joi.ObjectSchema<PassFieldContent>; /** * @deprecated Use `PassFieldContentWithRow` instead, * which is the right Apple name. */ export declare const FieldWithRow: Joi.ObjectSchema<PassFieldContent>;