UNPKG

passkit-generator

Version:

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

162 lines (161 loc) 7.91 kB
import Joi from "joi"; import { PassFieldContent } from "./PassFieldContent.js"; import { Semantics } from "./Semantics.js"; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentrytype/imageurlentry-data.dictionary */ interface ImageURLEntry { /** The SHA256 hash of the image. */ SHA256: string; /** The URL that points to the image asset to be downloaded. This must be an https link. */ URL: string; /** The scale of the image. If unspecified, defaults to 1. */ scale?: number; /** Size of the image asset in bytes. The maximum allowed size is 2 megabytes. */ size?: number; } declare const ImageURLEntry: Joi.ObjectSchema<ImageURLEntry>; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentrytype/image-data.dictionary */ interface Image { /** A list of URLs used to retrieve an image. The upcoming pass information entry uses the item that best matches the device's scale. */ URLs?: ImageURLEntry[]; /** Indicates whether to use the local equivalent image instead of the image specified by URLs. */ reuseExisting?: boolean; } declare const Image: Joi.ObjectSchema<Image>; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentry/images-data.dictionary */ interface Images { /** The name of the image file used for the header image on the details screen. This can be a remote asset. */ headerImage?: Image; /** The name of the image file used for the venue map in the event guide for each upcoming pass information entry. This can be a remote asset and is available for event entries. */ venueMap?: Image; } declare const Images: Joi.ObjectSchema<Images>; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentry/urls-data.dictionary */ interface URLs { /** A URL that links to your or the venue's accessibility content. */ accessibilityURL?: string; /** A URL that links to experiences that you can add on to your ticket or that allows you to access your existing prepurchased or preloaded add-on experiences, including any necessary QR or barcode links to access the experience. For example, loaded value or upgrades for an experience. */ addOnURL?: string; /** A URL that links out to the bag policy of the venue. */ bagPolicyURL?: string; /** The preferred email address to contact the venue, event, or issuer. */ contactVenueEmail?: string; /** The preferred phone number to contact the venue, event, or issuer. */ contactVenuePhoneNumber?: string; /** A URL that links the user to the website of the venue, event, or issuer. */ contactVenueWebsite?: string; /** A URL that links to content you have about getting to the venue. */ directionsInformationURL?: string; /** A URL that links to order merchandise for the specific event. This can be a ship-to-home ecommerce site, a pre-order to pickup at the venue, or other appropriate merchandise flow. This link can also be updated throughout the user's journey to provide more accurately tailored links at certain times. For example, before versus after a user enters an event. This can be done through a pass update. For more information on updating a pass, see Distributing and updating a pass. */ merchandiseURL?: string; /** A URL that links out to the food-ordering page for the venue. This can be in-seat food delivery, pre-order for pickup at a vendor, or other appropriate food-ordering service. */ orderFoodURL?: string; /** A URL that links to any information you have about parking. */ parkingInformationURL?: string; /** A URL that links to your experience to buy or access prepaid parking or general parking information. */ purchaseParkingURL?: string; /** A URL that launches the user into the issuer's flow for selling their current ticket. Provide as deep a link as possible into the sale flow. */ sellURL?: string; /** A URL that launches the user into the issuer's flow for transferring the current ticket. Provide as deep a link as possible into the transfer flow. */ transferURL?: string; /** A URL that links to documentation you have about public or private transit to the venue. */ transitInformationURL?: string; } declare const URLs: Joi.ObjectSchema<URLs>; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentry/dateinformation-data.dictionary */ interface DateInformation { /** * A string containing an ISO 8601 date and time. * The date and time when the event is scheduled. */ date?: string | Date; /** * A Boolean value that controls whether the time appears on the pass. * When true, the pass displays only the date, not the time. */ ignoreTimeComponents?: boolean; /** * A Boolean value that indicates whether the event lasts all day. * When true, the system ignores the time portion of the date. */ isAllDay?: boolean; /** * A Boolean value that indicates whether the event time is unannounced. * When true, the pass displays "Time TBA" instead of the actual time. */ isUnannounced?: boolean; /** * A Boolean value that indicates whether the event time is undetermined. * When true, the pass may display the date differently to indicate uncertainty. */ isUndetermined?: boolean; /** * The time zone for the event. * Use IANA time zone database names (e.g., "America/New_York"). */ timeZone?: string; } declare const DateInformation: Joi.ObjectSchema<DateInformation>; /** * @iOSVersion 26 * @see https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentry */ export interface UpcomingPassInformationEntry { /** A collection of URLs used to populate UI elements in the details view. */ URLs?: URLs; /** The fields of information displayed on the Additional Info section below a pass. */ additionalInfoFields?: PassFieldContent[]; /** * An array of App Store identifiers for apps associated with the upcoming pass information entry. * The associated app on a device is the first item in the array that's compatible with that device. * This key works only for upcoming pass information entries for an event. A link to launch the app * is in the event guide of the entry details view. If the app isn't installed, the link opens to the App Store. */ auxiliaryStoreIdentifiers?: number[]; /** The fields of information displayed on the details view of the upcoming pass information entry. */ backfields?: PassFieldContent[]; /** * Information about the start and end time of the upcoming pass information entry. * If omitted, the entry is labeled as TBD. */ dateInformation?: DateInformation; /** * A string that uniquely identifies the upcoming pass information entry. * The identifier needs to be unique for each upcoming information entry. */ identifier: string; /** A collection of image names used to populate images in the details view. */ images?: Images; /** * Indicates whether the upcoming pass information entry is currently active. * The default value is false. */ isActive?: boolean; /** The name of the upcoming pass information entry. */ name: string; /** The semantic, machine-readable metadata about the upcoming pass information entry. */ semantics?: Semantics & { venuePlaceID: string; }; /** * The type of upcoming pass information entry. * Value: event */ type: "event"; } export declare const UpcomingPassInformationEntry: Joi.ObjectSchema<UpcomingPassInformationEntry>; export {};