@walletpass/pass-js
Version:
Apple Wallet Pass generating and pushing updates from Node.js
282 lines • 12.9 kB
TypeScript
import type { ApplePass, Options, SemanticTags } from '../interfaces.js';
import { PassColor } from './pass-color.js';
import { PassImages } from './images.js';
import { Localizations } from './localizations.js';
import { PassStructure } from './pass-structure.js';
import { type UpcomingPassInformationEntry } from './upcoming-pass-information.js';
import { type Personalization } from './personalization.js';
export declare class PassBase extends PassStructure {
readonly images: PassImages;
readonly localization: Localizations;
readonly options: Options | undefined;
private personalizationData;
constructor(fields?: Partial<ApplePass>, images?: PassImages, localizations?: Localizations, options?: Options, personalization?: Personalization);
toJSON(): Partial<ApplePass>;
get passTypeIdentifier(): string | undefined;
set passTypeIdentifier(v: string | undefined);
get teamIdentifier(): string | undefined;
set teamIdentifier(v: string | undefined);
get serialNumber(): string | undefined;
set serialNumber(v: string | undefined);
/**
* Indicates that the sharing of pass can be prohibited.
*
* @type {boolean}
*/
get sharingProhibited(): boolean | undefined;
set sharingProhibited(v: boolean | undefined);
/**
* Indicates that the pass is void—for example, a one time use coupon that has been redeemed.
*
* @type {boolean}
*/
get voided(): boolean;
set voided(v: boolean);
/**
* Date and time when the pass expires.
*
*/
get expirationDate(): ApplePass['expirationDate'];
set expirationDate(v: ApplePass['expirationDate']);
/**
* Date and time when the pass becomes relevant. For example, the start time of a movie.
* Recommended for event tickets and boarding passes; otherwise optional.
*
* @type {string | Date}
*/
get relevantDate(): ApplePass['relevantDate'];
set relevantDate(v: ApplePass['relevantDate']);
/**
* List of dates and date ranges during which the pass is relevant
* (iOS 18+). Supersedes `relevantDate` for multi-window passes.
*/
get relevantDates(): ApplePass['relevantDates'];
set relevantDates(v: ApplePass['relevantDates']);
/**
* Calendar event associated with the pass. `startDate` / `endDate`
* accept either a `Date` or a W3C-formatted string; `Date` values are
* serialized to the W3C format by `normalizeDatesDeep` at `toJSON`
* time.
*/
get calendarEvent(): ApplePass['calendarEvent'];
set calendarEvent(v: ApplePass['calendarEvent']);
/**
* Ordered list of visual style schemes the pass opts into (iOS 18+).
*/
get preferredStyleSchemes(): ApplePass['preferredStyleSchemes'];
set preferredStyleSchemes(v: ApplePass['preferredStyleSchemes']);
/**
* A list of iTunes Store item identifiers for the associated apps.
* Only one item in the list is used—the first item identifier for an app
* compatible with the current device.
* If the app is not installed, the link opens the App Store and shows the app.
* If the app is already installed, the link launches the app.
*/
get associatedStoreIdentifiers(): ApplePass['associatedStoreIdentifiers'];
set associatedStoreIdentifiers(v: ApplePass['associatedStoreIdentifiers']);
/**
* A URL the system passes to the associated app from
* `associatedStoreIdentifiers` when the pass is opened.
*/
get appLaunchURL(): ApplePass['appLaunchURL'];
set appLaunchURL(v: ApplePass['appLaunchURL']);
/**
* Brief description of the pass, used by the iOS accessibility technologies.
* Don’t try to include all of the data on the pass in its description,
* just include enough detail to distinguish passes of the same type.
*/
get description(): string | undefined;
set description(v: string | undefined);
/**
* Machine-readable metadata used by Wallet to offer pass-related actions.
*/
get semantics(): SemanticTags | undefined;
set semantics(v: SemanticTags | undefined);
/**
* Custom information for companion apps. Not displayed to the user.
*/
get userInfo(): ApplePass['userInfo'];
set userInfo(v: ApplePass['userInfo']);
/**
* Contents of `personalization.json`, used by Wallet's NFC reward-card
* signup flow. The file is only emitted when the final bundle also has a
* serialized NFC dictionary and a `personalizationLogo*.png` asset.
*/
get personalization(): Personalization | undefined;
set personalization(v: Personalization | undefined);
/**
* Display name of the organization that originated and signed the pass.
*/
get organizationName(): string | undefined;
set organizationName(v: string | undefined);
/**
* Optional for event tickets and boarding passes; otherwise not allowed.
* Identifier used to group related passes.
* If a grouping identifier is specified, passes with the same style,
* pass type identifier, and grouping identifier are displayed as a group.
* Otherwise, passes are grouped automatically.
* Use this to group passes that are tightly related,
* such as the boarding passes for different connections of the same trip.
*/
get groupingIdentifier(): string | undefined;
set groupingIdentifier(v: string | undefined);
/**
* If true, the strip image is displayed without a shine effect.
* The default value prior to iOS 7.0 is false.
* In iOS 7.0, a shine effect is never applied, and this key is deprecated.
*/
get suppressStripShine(): boolean;
set suppressStripShine(v: boolean);
/**
* Text displayed next to the logo on the pass.
*/
get logoText(): string | undefined;
set logoText(v: string | undefined);
/**
* The URL of a web service that conforms to the API described in PassKit Web Service Reference.
* The web service must use the HTTPS protocol in production; the leading https:// is included in the value of this key.
* On devices configured for development, there is UI in Settings to allow HTTP web services. You can use the options
* parameter to set allowHTTP to be able to use URLs that use the HTTP protocol.
*
* @see {@link https://developer.apple.com/library/archive/documentation/PassKit/Reference/PassKit_WebService/WebService.html#//apple_ref/doc/uid/TP40011988}
*/
get webServiceURL(): URL | string | undefined;
set webServiceURL(v: URL | string | undefined);
/**
* The authentication token to use with the web service.
* The token must be 16 characters or longer.
*/
get authenticationToken(): string | undefined;
set authenticationToken(v: string | undefined);
/**
* Background color of the pass, specified as an CSS-style RGB triple.
*
* @example rgb(23, 187, 82)
*/
get backgroundColor(): [number, number, number] | string | undefined | PassColor;
set backgroundColor(v: string | [number, number, number] | undefined | PassColor);
/**
* Foreground color of the pass, specified as a CSS-style RGB triple.
*
* @example rgb(100, 10, 110)
*/
get foregroundColor(): [number, number, number] | string | undefined | PassColor;
set foregroundColor(v: string | [number, number, number] | PassColor | undefined);
/**
* Color of the label text, specified as a CSS-style RGB triple.
*
* @example rgb(255, 255, 255)
*/
get labelColor(): [number, number, number] | string | undefined | PassColor;
set labelColor(v: string | [number, number, number] | PassColor | undefined);
/**
* Color of the strip text, specified as a CSS-style RGB triple.
*
* @example rgb(255, 255, 255)
*/
get stripColor(): [number, number, number] | string | undefined | PassColor;
set stripColor(v: string | [number, number, number] | PassColor | undefined);
/**
* Maximum distance in meters from a relevant latitude and longitude that the pass is relevant.
* This number is compared to the pass’s default distance and the smaller value is used.
*/
get maxDistance(): number | undefined;
set maxDistance(v: number | undefined);
/**
* Beacons marking locations where the pass is relevant.
*/
get beacons(): ApplePass['beacons'];
set beacons(v: ApplePass['beacons']);
/**
* Information specific to the pass’s barcode.
* The system uses the first valid barcode dictionary in the array.
* Additional dictionaries can be added as fallbacks.
*/
get barcodes(): ApplePass['barcodes'];
set barcodes(v: ApplePass['barcodes']);
/**
* Adds a location where a pass is relevant.
*
* @param {number[] | { lat: number, lng: number, alt?: number } | { longitude: number, latitude: number, altitude?: number }} point
* @param {string} [relevantText]
* @returns {this}
*/
addLocation(point: number[] | {
lat: number;
lng: number;
alt?: number;
} | {
longitude: number;
latitude: number;
altitude?: number;
}, relevantText?: string): this;
get locations(): ApplePass['locations'];
set locations(v: ApplePass['locations']);
get bagPolicyURL(): string | undefined;
set bagPolicyURL(v: string | undefined);
get orderFoodURL(): string | undefined;
set orderFoodURL(v: string | undefined);
get parkingInformationURL(): string | undefined;
set parkingInformationURL(v: string | undefined);
get directionsInformationURL(): string | undefined;
set directionsInformationURL(v: string | undefined);
get purchaseParkingURL(): string | undefined;
set purchaseParkingURL(v: string | undefined);
get merchandiseURL(): string | undefined;
set merchandiseURL(v: string | undefined);
get transitInformationURL(): string | undefined;
set transitInformationURL(v: string | undefined);
get accessibilityURL(): string | undefined;
set accessibilityURL(v: string | undefined);
get addOnURL(): string | undefined;
set addOnURL(v: string | undefined);
get contactVenueWebsite(): string | undefined;
set contactVenueWebsite(v: string | undefined);
get transferURL(): string | undefined;
set transferURL(v: string | undefined);
get sellURL(): string | undefined;
set sellURL(v: string | undefined);
get contactVenueEmail(): string | undefined;
set contactVenueEmail(v: string | undefined);
get contactVenuePhoneNumber(): string | undefined;
set contactVenuePhoneNumber(v: string | undefined);
get eventLogoText(): string | undefined;
set eventLogoText(v: string | undefined);
get suppressHeaderDarkening(): boolean;
set suppressHeaderDarkening(v: boolean);
get useAutomaticColors(): boolean;
set useAutomaticColors(v: boolean);
get footerBackgroundColor(): [number, number, number] | string | undefined | PassColor;
set footerBackgroundColor(v: string | [number, number, number] | undefined | PassColor);
get auxiliaryStoreIdentifiers(): ApplePass['auxiliaryStoreIdentifiers'];
set auxiliaryStoreIdentifiers(v: ApplePass['auxiliaryStoreIdentifiers']);
get changeSeatURL(): string | undefined;
set changeSeatURL(v: string | undefined);
get entertainmentURL(): string | undefined;
set entertainmentURL(v: string | undefined);
get purchaseAdditionalBaggageURL(): string | undefined;
set purchaseAdditionalBaggageURL(v: string | undefined);
get purchaseLoungeAccessURL(): string | undefined;
set purchaseLoungeAccessURL(v: string | undefined);
get purchaseWifiURL(): string | undefined;
set purchaseWifiURL(v: string | undefined);
get upgradeURL(): string | undefined;
set upgradeURL(v: string | undefined);
get managementURL(): string | undefined;
set managementURL(v: string | undefined);
get registerServiceAnimalURL(): string | undefined;
set registerServiceAnimalURL(v: string | undefined);
get reportLostBagURL(): string | undefined;
set reportLostBagURL(v: string | undefined);
get requestWheelchairURL(): string | undefined;
set requestWheelchairURL(v: string | undefined);
get transitProviderWebsiteURL(): string | undefined;
set transitProviderWebsiteURL(v: string | undefined);
get transitProviderEmail(): string | undefined;
set transitProviderEmail(v: string | undefined);
get transitProviderPhoneNumber(): string | undefined;
set transitProviderPhoneNumber(v: string | undefined);
get upcomingPassInformation(): UpcomingPassInformationEntry[] | undefined;
set upcomingPassInformation(v: UpcomingPassInformationEntry[] | undefined);
}
//# sourceMappingURL=base-pass.d.ts.map